Running two micrortps_clients

Hello,

I’m trying to run two instances of SITL PX4 in my computer using the Gazebo simulator. But when I tried to use two px4-micrortps_client instances to connect with each PX4 processes the first problem that I found is that I can’t use more than 1 instance. Because I see an error in the terminal like this:

Already running

I commented out these 4 lines. Right now I’m able to run as many instances as I want. But I don’t know if can do this.

In the following image I can understand that I can run several px4-micrortps_clients because it’s the client the one connecting to the uorb topics

I have two main questions:

  • Why can I only launch one micrortps_client instance?
  • How I should configure the ports to connects with two different PX4 instances? The default ones are 2019 and 2020, but for the second instance?

Thank you

1 Like

I managed to do it

px4-micrortps_client --instance X
1 Like

Hey @ahcorde thanks for posting, this is really helpful.