MAVSDK: add_any_connection not working as intended

Currently trying to get some of the examples to run on my Windows 11 system and haven’t been successful.

I’m building the examples with the local install of MAVSDK (from mavsdk-windows-x64-release) rather then building from source, and including the mavsdk.dll in the same directory as the executable for each example. When trying to run each example as intended ex: “./build/Debug/gimbal_device_tester.exe udpin://0.0.0.0:14540” Ill get an error saying that the protocol / connection URL is invalid, and when switching to “udpin://:14540” the error doesn’t appear, but when add_any_connection is called during execution it hangs indefinitely, and eventually causes the program to abort with no indication of why this is happening.

Same behavior is observed running other examples such as: takeoff_and_land, autopilot_server, etc.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17

Most upvoted comments

As mentioned it seems the incompatibility between doing a debug build of the examples with the release binaries was the reason for this issue. Considering:

After running: cmake --build build --config Release -j4 over cmake --build build -j4 I was able to get the examples up and running using the release binaries.

A similar situation is documented in: https://github.com/mavlink/MAVSDK/issues/1902 and as @julianoes mentioned I think it would be worthwhile to include this detail regarding appropriately setting build config.

Thank you both for your time given to the matter.