MAVSDK: Param Server - exception when using custom string parameter
I am trying to accomplish the following:
-
Have a parameter server (supposed to run on the OHD Ground station) for OHD related settings
-
test out the set / get -equivalents inside QOpenHD for then changing the settings.
So far I am just trying things out, but while doing so I stumpled across the following issue:
I add a custom (string) parameter to the server side: https://github.com/OpenHD/Open.HD/blob/consti-test/OpenHD/ohd_telemetry/tests/test_mavsdk.cpp#L40
And just for testing, request all the parameters from the Ground controll application side:
auto result=paramOhdGround->get_all_params();
Both the server and client side crash. On the server side, the output is:
test_mavsdk: /media/consti10/ade719d9-e80a-46da-8802-58ca3b8e08bc1/1_ohd-dev/MAVSDK/src/mavsdk/core/mavlink_parameters.cpp:1999: float mavsdk::MAVLinkParameters::ParamValue::get_4_float_bytes_bytewise() const: Assertion `false' failed.
[12:24:24|Error] Unknown type (mavlink_parameters.cpp:1998)
On the client side the output is less usefull:
See: https://mavsdk.mavlink.io/main/en/cpp/troubleshooting.html#user_callbacks
terminate called after throwing an instance of 'std::future_error'
what(): std::future_error: No associated state
Any ideas ?
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 29 (20 by maintainers)
So the issue seems to be created by the requesting side when calling:
get_all_params();
since when I explicitly request it using the custom keyword:
get_param_custom("OHD_UART_NAME");
It works. So when writing the implementation in mavsdk, the author did not consider that on a call to
get_all_params()
the server might provide mixed mavlink params and mavlink custom params.