I have two drones, In each drone pixhawk is connected to companion computer via FTDI cable both running mavros with different system ID. before I use the following to connect my GCS with single drone
I think you just need to initiate one ros master.
If youre working with 2 drones and 1 GCS, means that you’re running 3 ros systems. So your configuration could be like this.
Example:
Drone1 ip: 192.168.0.2
Drone2 ip: 192.168.0.3
GCS ip: 192.168.0.4
You can initiate the ros master in GCS, and inside it, do,
Since both drone are working with same topic name, you need to set a namespace for both. Let say for drone 1, “drone1”, and for drone 2, “drone2”, the mavros topic will be,