-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Multiple SITL instances on one host connecting to multiple MicroXRCEAgent on different IPs #26560
Copy link
Copy link
Open
Description
Describe problem solved by the proposed feature
I have a setup here where I run:
- Gazebo and N PX4 SITL instances in one Docker container
- and I want to connect them to N
MicroXRCEAgents (each one in its own separate Docker container)
Each container has its own IP (using docker network) and ROS_DOMAIN_ID
The main motivation is isolating the multi-drone "simulation" (Gazebo + NxSITL) from the "deployable" edge compute autonomy using separate containers
Describe your preferred solution
Right now, I achieve this with
PX4_SYS_AUTOSTART=<%= autostart %> ROS_DOMAIN_ID=<%= drone_id %>
PX4_UXRCE_DDS_NS="Drone<%= drone_id %>" PX4_UXRCE_DDS_AG_IP=<%= "#{sim_subnet}.90.#{drone_id}" %> PX4_UXRCE_DDS_PORT=8888
/PX4-Autopilot/build/px4_sitl_default/bin/px4 -i <%= sitl_instance %>
and adding a new env variable PX4_UXRCE_DDS_AG_IP here
| uxrce_dds_client start -t udp -p $uxrce_dds_port $uxrce_dds_ns |
like this
uxrce_dds_client start -t udp -h "${PX4_UXRCE_DDS_AG_IP:-127.0.0.1}" -p $uxrce_dds_port $uxrce_dds_ns
Describe possible alternatives
I'm not sure if this could be done natively/differently and/or more concisely modifying
PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/rcS
Lines 183 to 184 in 24833f4
| # set default IP to localhost | |
| param set-default UXRCE_DDS_AG_IP 2130706433 # 127.0.0.1 |
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels