ArduSub Simulation SITL , Qground issue and Control

Hi @patrickelectric , I have been following the post about ardusub simulation with SITL and even Gazebo, the main post i follow is this one: Setting up a simulation environment

I just have a quick question:

  • When running the simulatin using:
    sim_vehicle.py -L RATBeach --out=udp:0.0.0.0:14550 --map --console
    Everything seems fine, the different windows on the commented post appears, all good, and even Qground detects it, so far so good.
    The reason to use the simulation is to test a personal code without the physical ROV and with extra safety. Normally we have the script using pymavlink to do the connection and interaction with the ROV.
    I tried doing the same, using same udpin, and everything went good, mavlink connection was set, there was a heartbeat, so all good, but here is the but, Qground losses connection.

I know the simulation gives us a console of the state of the simulated ROV but we wanted to see it on Qground. Do you know or have an idea of why it is happening? Is it a normal behavior? It is worth highlighting that we have test it before on the physical ROV and Qground never lost connection.

We are using all the updated software:

  • Ubuntu 22.04
  • Qground
  • SITL most recent version based on github repo
  • Python3

Second question:
Is there a way to control the simulated ROV? Like with a joystick like a normal ROV?

Thanks in advance.

CC: @SaferHarbors

1 Like

Hi @reimonha,

It may be necessary to add another UDP connection to avoid connection conflicts between QGC and your Pymavlink program - in general only one program can connect to a given port.

When the connection is established correctly it should be possible to control the simulated ROV with a joystick, just like normal. Note that there will likely be issues attempting to do so if you are sending commands via a separate pymavlink program at the same time.

3 Likes

Thanks for the response Eliot.

The UDP connection issues is closed, we could work with what you recommended.

For the controller, as we are working on a virtual machine (VirtualBox), it is only a matter of configuration of the same virtual machine so it can accept the input of the controller.