I tried to integrate the ROS 2 control interface with PX4 (firmware v1.15.4) on ROS 2 Jazzy. Here’s what I observed:
ROS 2 topic list before running the example shows both /fmu/in/register_ext_component_request and /fmu/out/register_ext_component_reply among many other /fmu/in/... and /fmu/out/... topics.
When I run the built-in example_mode_manual_cpp node:
ros2 run example_mode_manual_cpp example_mode_manual
it logs:
[DEBUG] [example_mode_manual]: Waiting for FMU…
[DEBUG] [example_mode_manual]: timeout while waiting for FMU
terminate called after throwing an instance of ‘std::runtime_error’
what(): Registration failed
even though other /fmu/out/* topics (like /fmu/out/input_rc) are being published normally.
It seems the RegisterExtComponentReply is visible on the topic list, but the example never actually receives it, so doRegister() times out and the node aborts.
Output
[DEBUG] [example_mode_manual]: Waiting for FMU…
[DEBUG] [example_mode_manual]: timeout while waiting for FMU
terminate called after throwing an instance of ‘std::runtime_error’
what(): Registration failed
I can see /fmu/out/register_ext_component_reply in ros2 topic list, and other /fmu/out/* topics (e.g. /fmu/out/input_rc) are streaming correctly. However the mode never actually receives the RegisterExtComponentReply, so doRegister() times out.
Adding the translation node from PX4 v1.16.0-rc2
I followed the Tools/copy_to_ros_ws.sh script from the PX4 repo, built and sourced a fresh workspace containing:
And finally i tried skip message compatibility check by inserting the setSkipMessageCompatibilityCheck();on px4-ros2-interface-lib/examples/cpp/modes/manual/include/mode.hpp
Then I got following error
I’m now using PX4 v1.16.0-rc3 and the translation_node to bridge message compatibility. With this setup, my custom external mode (My Manual Mode) successfully registers, as confirmed via the commander status command:
External Mode 3: nav_state: 25, name: My Manual Mode
However, in QGroundControl, the mode still appears as:
Unknown 1:<some_id>
and this ID changes on each restart.
While the mode functions correctly and I can verify its registration through the PX4 shell, I have to manually check which external mode index it was assigned (1, 2, or 3) and then switch to that mode accordingly.
Is there any way to have QGC display the actual mode name (e.g. “My Manual Mode”) instead of showing “Unknown”?
Tested QGS version : Daily Built as well as QGC 5.0.6