Issues Running ROS2-PX4

Hello everybody,
I’e been following the guide to setup up PX4-ROS 2 bridge here: ROS 2 User Guide (PX4-ROS 2 Bridge) | PX4 User Guide .

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

I have the same issue.

I have the following setup: Ubuntu 20.04 & ROS Foxy
openjdk 13.0.7
fastrtpsgen 1.0.4

All other steps are successful and subscribers and publishers seem to be all set up succesfully (u until VehicleTrajectoryWaypointDesired publisher)

Hello Stonkens,

There is an issue with the last release of AutoPilot PX4.

Hello,
Even I’m facing the same issue.
When can we expect a fix?

@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.

Thank you @hhjj0506 I reverted back to an earlier version and it solved the issue

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.

Hello @Benja !
Thank you for the solution, it did work with the latest version of PX4 using the uorb_to_ros_msgs.py.

1 Like