MAVSDK-Python
MAVSDK-Python copied to clipboard
mavsdk_server errors not shown to users
I was using mavsdk to try communicating with PX4 SITL today and also had mavros running, which made mavsdk_server crash on launch because the udp connection I was trying was already in use. It was hard to debug because when system.py
runs mavsdk_server
as a subprocess, the stdout is redirected to a logging thread which logs everything at debug level, which is not shown to users (and for new users like me I don't even know how to get it to show me the debug output). From the user's perspective, the call to connect
just hangs forever. This error also happens if you input a malformed URL like udp://14540
(which is missing a colon before the port number), it'll just hang forever instead of giving the user a useful error message.