Error while data type conversion from "Unsigned char" to "Const mavlink" {aka mavlink message type}

I now have the complete functionality working. The current version of the tutorial is way out of date. I found the following issues while working through it:

  • The callback function ‘keyboard_cb’ is missing steps to create a msg and add data to the field (see above post)
  • The CMake file for the keyboard module has “platforms__common” as a dependency. I could not get it to compile with it included. Removing it worked fine.
  • There is no “timestamp” field in the key_command msg template. This is required for an assertion check to pass. This field is also used by a later function in the current version of the tutorial so it is a clear omission. This field also needs to be defined in the xml files for PX4 and MAVROS.
  • The names of the included header files for the PX4 side of the implementation look to be for an older version. For example include <px4_config.h> did not work but include <px4_platform_common/config.h> did.
  • Targeting a test deployment for SITL is an easier test than assuming access to hardware. I was able to get it running with jamvsim SITL.
  • The template used for the PX4 key_receiver module is out of date. The “while(true)” is gross.
5 Likes