I am looking for some advice on connecting to the Ardu SITL from my companion computer. I am seeing this same issue with both my real drone (Cube running Ardu Firmware) and the SITL simulation. When I launch the SITL, I am using the following command.
sim_vehicle.py -v ArduCopter -n 1 --no-mavproxy --no-extra-ports --auto-sysid
This launches one instance of the SITL and waits for a TCP connection on port 5760. I can then connect to this port from my companion computer using mavsdk-python
. Upon connection, the SITL will report that it has a New connection on serial port 0
but it will not send any data. However, if I first connect to TCP port 5760 from QGroundControl
, then exit QGroundControl
and reconnect with my python code, everything works fine and I receive telemetry data from the SITL.
This same thing happens on the real drone when connecting to it via the serial port and TELEM2
. Unless I first run QGroundControl
over this connection, it never wakes it up to start sending data. This does not happen when using PX4 SITL. I don’t have a real drone running PX4 firmware, but I suspect it would be the same.
My guess is that I need to send something to the port on the SITL and Cube after connection, to get it to start sending data. I just don’t know what that should be. I also don’t know if this is just a compatibility issue with mavsdk-python
. I have cross-posted this on the PX4 forum, but feedback I have received indicated that this is an ArduPilot difference and not PX4. Any advice would be most helpful.