How to attach to px4 shell when using multi-vehicle simulation

I am trying to run multi-vehicle SITL RTPS simulation using the gazebo_sitl_multiple_run.sh like this:

./Tools/gazebo_sitl_multiple_run.sh -m iris -t px4_sitl_rtps -n 2

How can I attach the terminal to each px4 process in order to access px4 shell to execute some commands such as enabling micrortps_client?

1 Like

Looks like you can take advantage of the iris_rtps model and have it start automatically

1 Like

I will be providing at some point this week my launch script for ROS2 for those that prefer something more “ROS integrated”, it spawns the models and opens an xterm window for each model. Furthermore, it can be set to automatically start the micrortps_client for any spawned model you choose while still allowing the other models to be non-RTPS if desired.

2 Likes

Have you provided that ros2 launch script by now?

I am trying something similar while also including lidar and would love to take a look at your approach!

The closest thing i found was:

which i could not get running without errors.

Hello,
As I am new to Ros2, can you guys please explain exactly which commands to use to run multiple vehicles in Gazebo while opening multiple px4 shells as well so that I can enable a micrortps_client for each vehicle? I am not sure how to run this launch file that you provided. Thank you very much and I am very looking forward to a reply.
Thanks