I’m able to successfully run “make px4_sitl_rtps gazebo”, however when I try to launch the micrortps_client in another terminal (after sourcing my ros distro), I run into the following error:
terminate called after throwing an instance of ‘eprosima::fastcdr::exception::BadParamException’
what(): Unexpected byte value in Cdr::deserialize(bool), expected 0 or 1
Aborted (core dumped)
Has anyone else had the same issue? Thanks in advance
@RyanDsouza
I ran into the same problem very recently, and reverting back to the earlier version solved the problem.
The issue is currently closed due to the fix being made to the most recent version, but I don’t know if anyone has checked if the change is working or not.
For more details, please visit the links below.
Hi @RyanDsouza , @hhjj0506 , the issue is almost fixed as the problems on the PX4 side should be now solved. However, the message definitions of px4_msgs are still out of date (something about a broken CI/CD it seems). You can see here how to manually generate the message definitions in order to use the last version of PX4 without having to revert back. Simply run uorb_to_ros_msgs.py with the PX4-Autopilot/msg/ and the px4_msgs/msg/ paths (adapted to your cases) as first and second argument respectively, and then recompile.
If you have time to check this solution, please let us know the outcome in the above mentioned github issue.
Just tried this with the tip of main on PX4-Autopilot, the tip of master on px4_msgs, the tip of master on px4_ros_com, and ROS2 humble, all running on Ubuntu 22.04 LTS… and it works.
I cannot get it to run, neither on Ubuntu 20, nor Ubuntu 22. Could you please let me know your exact commits and versions of all involved libraries? That would help me so much.
Hi @maxinho
I use ubuntu 20.04, all repository on the current main branches
PX4: e780a583cd2f3c0c42978ff0e5c010f104443267
px4_ros_com: 3a42a27fcdc4b67c120ee84267d236d558951c18
px4_msgs: 7f89976091235579633935b7ccaab68b2debbe19
after having manually updated the msgs definition everything works just fine.
parallels@ubuntu-linux-20-04-desktop:/media/psf/Home/Proj/PX4-Autopilot$ python3 Tools/generate_microRTPS_bridge.py -s msg/sensor_baro.msg -r msg/sensor_combined.msg
python3: can't open file 'Tools/generate_microRTPS_bridge.py': [Errno 2] No such file or directory
You don’t have to generate the whole microRTPS_bridge. You only need to generate the message definitions.
You are running the wrong script.
The right one is uorb_to_ros_msgs.py. Please see the link above.
Thx a lot for your support, @Benja.
I have it working now with the Micro XRCE-DDS and microROS. Though, I couldn’t thorougly test it, yet. Maybe, I’ll run into issues with this setup and have to switch back to the micrortps agent. We will see…
Thank you @Benja. Your solution solved my issue (Ubuntu 18.04, ROS2 Dashing, latest PX4 main repo).
I have another tips for some other guys who may encounter the same error:
When you guys recompile the ros2 source, you first need to completely delete already built files.
That is,