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?
UPDATE:
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.
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.
Hi, thanks for the progress above! I am seeing a similar error when trying to make a wind.msg publisher.
I have made the following edits:
to /PX4-Autopilot/msg/tools/uorb_rtps_message_ids.yaml
- msg: wind
id: 106
send: true
to /px4_ros_com_ros2/src/px4_ros_com/templates/uorb_rtps_message_ids.yaml
- id: 106
msg: Wind
send: true
When trying to build the Autopilot: make px4_sitl_rtps I am getting the error:
src/modules/micrortps_bridge/micrortps_client/microRTPS_client.cpp:55:10: fatal error: uORB_microcdr/topics/wind.h: No such file or directory
55 | #include <uORB_microcdr/topics/wind.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
@moustafa , which build folder did you delete and rebuild? I have not been able to get this to work.