PX4-ROS 2 node for Custom node, Error Waiting for FMU U

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.

@Benja Is this something you can advise on? I can see that the topic is supposed to be exported in v1.15 PX4-Autopilot/src/modules/uxrce_dds_client/dds_topics.yaml at release/1.15 · PX4/PX4-Autopilot · GitHub

Hi @vinothpandiyan , have you tried listening to /fmu/out/register_ext_component_reply to check if the reply reaches the ROS 2 network?

Let me check and update you.

Hi @Benja,

Here’s where I’m at:

Setup
Airframe - Generic Ground Vehicle
PX4 firmware:** v1.15.4 (built on FMUv6XRT)
ROS 2:Jazzy
px4_msgs - main branch
image

px4-ros2-interface-lib

Micro XRCE Agent:** running over UART

  1. Running the example without a translation node
    ros2 run example_mode_manual_cpp example_mode_manual

    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.
  2. 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:

  • translation_node (v1.16-rc2)

I then launched the translator:

ros2 run translation_node translation_node_bin &

Translation node logs:

[INFO] [translation_node]: Registered pub/sub topics and versions:
[INFO] [translation_node]: – /fmu/out/vehicle_status: 0, 1
[INFO] [translation_node]: Found subscriber for ‘/fmu/out/vehicle_status’, version: 1, adding publisher
[INFO] [translation_node]: Removing subscriber for ‘/fmu/out/vehicle_status’, version: 0

Re-running the example with translation

ros2 run example_mode_manual_cpp example_mode_manual

Output:

[DEBUG] [example_mode_manual]: Waiting for FMU…
[DEBUG] [example_mode_manual]: Checking message compatibility…
[DEBUG] [example_mode_manual]: Subscriber found, continuing
[DEBUG] [example_mode_manual]: Publisher found, continuing
[ERROR] [example_mode_manual]: Mismatch for the following topics, update PX4 or the px4_ros2 library and px4_msgs:
– fmu/in/arming_check_reply
– fmu/in/aux_global_position
– fmu/in/vehicle_attitude_setpoint
– fmu/out/battery_status
– fmu/out/vehicle_global_position
– fmu/out/vehicle_local_position
– fmu/out/vehicle_status
terminate called after throwing an instance of ‘std::runtime_error’
what(): Registration failed

Any guidance or suggestions would be greatly appreciated!

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

And below translation Node