MAVSDK-Python
MAVSDK-Python copied to clipboard
`mavsdk_server` does not connect over serial until QGC is started
I want to join the Pixhawk with MAVsdk. I use the following command: ./mavsdk_server -p 50051 serial:///dev/ttyACM1:57600 => does NOT start... just waiting If I open and close QGroundControl, than It works!!! If I don't open QGroundControl, then it won't start.
What schould I do? How do I start it?
You have to disable any kind of autoconnect on the serial ports in QGroundControl first.
The best method to find the culprit in cases like this is to use lsof:
sudo apt install lsof
sudo lsof /dev/ttyACM0
I want to join the Pixhawk with MAVsdk.
PX4 or Ardupilot? I'm assuming PX4.
If I open and close QGroundControl, than It works!!!
I do believe that over serial, PX4 needs to receive MAVLink messages before it starts sending them. I think this is fairly new, though. I guess mavsdk_server
should automatically send heartbeats when connecting over serial. Not sure... @julianoes do you have an opinion here?
Yes, PX4 how can i cause heartbeat?
I think you would want to set always_send_heartbeats
, using set_configuration
maybe somewhere around here?
I don't fully understand this
@JonasVautherin should we make a bugfix release for this?
I guess it would be nice to test it first. Also we should do it only for serial://
, shouldn't we?
Yes, PLS!
@JonasVautherin, yes but it's not straightforward I'm afraid.
Did you manage to solve it?
This should be fixed in https://github.com/mavlink/MAVSDK-Python/releases/tag/1.4.4.