Build failed when activating a new uORB message

I am running PX4 and ROS2 foxy on Ubuntu 20.04. I tested the communication between the micrortps client and agent on simulation and it works with SensorCombined topic.

Now I am trying to activate the rc_channels topic because I would like to get data from the remote control on ROS2 side.

In /px4-firmware/msg/tools/uorb_rtps_message_ids.yaml file, I added the following line to the rc_channels message:

  • msg: rc_channels
    id: 58
    send: true

Now, when ever I try to make px4_sitl_rtps gazebo, I get the following error:

src/modules/micrortps_bridge/micrortps_client/microRTPS_client.cpp:51:10: fatal error: uORB_microcdr/topics/rc_channels.h: No such file or directory
   51 | #include <uORB_microcdr/topics/rc_channels.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

So, the rc_channels.h is not generated in px4_firmware/build/px4_sitl_rtps/uORB_microcdr/topics

Do I have to modify any other file in order to activate the new uORB topic? Also do I have to add anything on ROS2 side in order to be able to see the topic?

I deleted the build folder and rebuilt and the build was successful. However, I can’t find the rc_channels topic whenever I run uorb top in the shell.

Can you elaborate more on what you are trying? Did you also updated

Thanks for your reply, I did update this file, but it wasn’t matching /px4-firmware/msg/tools/uorb_rtps_message_ids.yaml for this specific message. I had it as sent: true on one side and as receive: true on the other side.