Issue with ROS2 set-up, Deserialization of UORB Topics
-
Hi @jmltt - will try and recreate the same issue you are seeing and the solution you proposed as a fix!
If this is the case I will merge in a PR and it will be on the most recent dev branch for voxl-mpa-to-ros, anyways - will test out the solution soon.
Zach
-
@Zachary-Lowell-0 Sounds good, thank you!
-
@jmltt said in Issue with ROS2 set-up, Deserialization of UORB Topics:
Not sure how many other messages this affects. Is this an easy fix on the dev side?
Reply
So @jmltt it looks like this isnt necessarily an issue with the branch itself as mainline px4_msgs also has the unaided_heading in part of the VehicleLocalPosition:
https://github.com/PX4/px4_msgs/blob/f90685f29174d4debfe31e22b4cf1412c3c16448/msg/VehicleLocalPosition.msg#L42C9-L42C24Trying to figure out a way to remove it without recreating a new submodule - will hopefully have a fix soon.
Zach
-
Ok @jmltt I fixed it - there was a giant conflict with versioning on px4_msgs and px4_ros_coms which was fun to deal with - anyways I have a branch waiting for approval to be merged into the most recent nightly and you can then pull the dev from the apt repository when it gets merged in - until then feel free to rebuild voxl-mpa-to-ros2 deb and install on your voxl2 from the branch zach/submodule update: https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros2/-/tree/zach/submodule_update
Cheers!
Zach -
@Zachary-Lowell-0 The updated Debian package can be found here: http://voxl-packages.modalai.com/dists/qrb5165/dev/binary-arm64/voxl-mpa-to-ros2_0.0.3-202406240850_arm64.deb
-
@Zachary-Lowell-0 Awesome, thanks for fixing this I really appreciate it!
-
I'm following the tutorial at https://docs.modalai.com/building-ros2-nodes/
I dont get the 's' for 'px4_ros_coms'.
Instead, I have 'px4_ros_com' which doesn't have an executable. So I get:rb5:~/colcon_ws$ ros2 run px4_ros_com px4_ros_com
No executable foundAny help on this is welcome.
-
Hi @tahawaru looks like its just a type on the documentation I will update it:
Please just try running
ros2 run px4_ros_com px4_ros_com
- no s anywhere in site. Note this package is fully managed by PX4 - not modalAI and can be followed here: https://github.com/PX4/px4_ros_comLMK if this helps,
Zach -
Still getting the same issue
rb5:~/colcon_ws$ ros2 run px4_ros_com px4_ros_com
No executable found -
@tahawaru said in Issue with ROS2 set-up, Deserialization of UORB Topics:
No executable found
Reply
@tahawaru why are you trying to run px4_ros_com's package in general? The package pertinent to voxl-mpa-to-ros2 is voxl_mpa_to_ros2 - what is it exactly you are trying to do?
-
I'm following this content https://docs.modalai.com/building-ros2-nodes/
After sourcing, and getting the "no executables found" error, I tried
rb5:~/colcon_ws$ ros2 pkg executables px4_ros_com
px4_ros_com debug_vect_advertiser
px4_ros_com offboard_control
px4_ros_com sensor_combined_listener
px4_ros_com vehicle_gps_position_listener -
I'm having a similar error from running a ros2 command
rb5:~/colcon_ws$ ros2 run voxl_offboard_figure8 voxl_offboard_figure8
[INFO] [1723134293.283379373] [offboard_figure8_node]: Offboard Figure 8 Node Alive!
2024-08-08 16:24:53.442 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:53.950 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
[INFO] [1723134294.428290964] [offboard_figure8_node]: Switching to offboard mode
[INFO] [1723134294.428816835] [offboard_figure8_node]: Arm command sent
2024-08-08 16:24:54.452 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:54.951 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:55.452 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:55.961 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:56.461 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:56.971 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:57.482 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:57.988 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:58.488 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:58.998 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:59.507 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:25:00.016 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:25:00.528 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_changeMy Rb5 specs:
rb5:~/colcon_ws$ voxl-versionsystem-image: 1.7.1-M0052-14.1a-perf-nightly-20231025
kernel: #1 SMP PREEMPT Thu Oct 26 05:24:02 UTC 2023 4.19.125hw version: M0052
voxl-suite:
Packages:
Repo: http://voxl-packages.modalai.com/ ./dists/qrb5165/sdk-1.1/binary-arm64/
Last Updated: 2024-07-19 09:01:43
List:
libmodal-cv 0.4.0
libmodal-exposure 0.1.0
libmodal-journal 0.2.2
libmodal-json 0.4.3
libmodal-pipe 2.9.2
libqrb5165-io 0.4.2
libvoxl-cci-direct 0.2.1
libvoxl-cutils 0.1.1
mv-voxl 0.1-r0
qrb5165-bind 0.1-r0
...............
voxl-mavlink 0.1.1
voxl-mavlink-server 1.3.2
voxl-microdds-agent 2.4.1-0
voxl-modem 1.0.8
voxl-mongoose 7.7.0-1
voxl-mpa-to-ros 0.3.7
voxl-mpa-to-ros2 0.0.4
voxl-mpa-tools 1.1.3
voxl-neopixel-manager 0.0.3
voxl-opencv 4.5.5-2
voxl-portal 0.6.3
voxl-px4 1.14.0-2.0.63
voxl-px4-imu-server 0.1.2
voxl-px4-params 0.3.3
voxl-qvio-server 1.0.0
voxl-remote-id 0.0.9
voxl-ros2-foxy 0.0.1
voxl-streamer 0.7.4
voxl-tag-detector 0.0.4
voxl-tflite-server 0.3.1
voxl-utils 1.3.3
voxl-uvc-server 0.1.6
voxl-vision-hub 1.7.3There is no response from the drone.
-
@tom
Hi Tom,
I have downloaded the src files from https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros2/-/tree/master/colcon_ws/src?ref_type=heads
Then I build with colcon build
The command "ros2 run voxl_offboard_figure8 voxl_offboard_figure8 " outputs the following while the rb5 is not responding at all
[INFO] [1727710160.087447748] [offboard_figure8_node]: Offboard Figure 8 Node Alive!
[INFO] [1727710161.215068375] [offboard_figure8_node]: Switching to offboard mode
[INFO] [1727710161.225198835] [offboard_figure8_node]: Arm command sent
[INFO] [1727710170.118029165] [offboard_figure8_node]: Doing figure 8 now
[INFO] [1727710183.178457539] [offboard_figure8_node]: Switching to land modeCan someone update the short introduction to ROS2 usage with the rb5? Please.
@tahawaru said in Issue with ROS2 set-up, Deserialization of UORB Topics:
I'm having a similar error from running a ros2 command
rb5:~/colcon_ws$ ros2 run voxl_offboard_figure8 voxl_offboard_figure8
[INFO] [1723134293.283379373] [offboard_figure8_node]: Offboard Figure 8 Node Alive!
2024-08-08 16:24:53.442 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:53.950 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
[INFO] [1723134294.428290964] [offboard_figure8_node]: Switching to offboard mode
[INFO] [1723134294.428816835] [offboard_figure8_node]: Arm command sent
2024-08-08 16:24:54.452 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:54.951 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:55.452 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:55.961 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:56.461 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:56.971 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:57.482 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:57.988 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:58.488 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:58.998 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:24:59.507 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:25:00.016 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_change
2024-08-08 16:25:00.528 [SUBSCRIBER Error] Deserialization of data failed -> Function deserialize_changeMy Rb5 specs:
rb5:~/colcon_ws$ voxl-versionsystem-image: 1.7.1-M0052-14.1a-perf-nightly-20231025
kernel: #1 SMP PREEMPT Thu Oct 26 05:24:02 UTC 2023 4.19.125hw version: M0052
voxl-suite:
Packages:
Repo: http://voxl-packages.modalai.com/ ./dists/qrb5165/sdk-1.1/binary-arm64/
Last Updated: 2024-07-19 09:01:43
List:
libmodal-cv 0.4.0
libmodal-exposure 0.1.0
libmodal-journal 0.2.2
libmodal-json 0.4.3
libmodal-pipe 2.9.2
libqrb5165-io 0.4.2
libvoxl-cci-direct 0.2.1
libvoxl-cutils 0.1.1
mv-voxl 0.1-r0
qrb5165-bind 0.1-r0
...............
voxl-mavlink 0.1.1
voxl-mavlink-server 1.3.2
voxl-microdds-agent 2.4.1-0
voxl-modem 1.0.8
voxl-mongoose 7.7.0-1
voxl-mpa-to-ros 0.3.7
voxl-mpa-to-ros2 0.0.4
voxl-mpa-tools 1.1.3
voxl-neopixel-manager 0.0.3
voxl-opencv 4.5.5-2
voxl-portal 0.6.3
voxl-px4 1.14.0-2.0.63
voxl-px4-imu-server 0.1.2
voxl-px4-params 0.3.3
voxl-qvio-server 1.0.0
voxl-remote-id 0.0.9
voxl-ros2-foxy 0.0.1
voxl-streamer 0.7.4
voxl-tag-detector 0.0.4
voxl-tflite-server 0.3.1
voxl-utils 1.3.3
voxl-uvc-server 0.1.6
voxl-vision-hub 1.7.3There is no response from the drone.
-
@tahawaru there are a few intermediate steps to get ros2 offboard control:
-
disable offboard_mode (set to false) in voxl-vision-hub.conf line 237:
"offboard_mode": "false"
-
Ensure voxl-microdds-agent is running. You can check by running
systemctl status voxl-microdds-agent
-
Once these steps are complete, and you have the ros2 offboard fig 8 running, you should be able to echo the offboard control mode info either in an adb shell or mavlink console:
In adb you can use the command
px4-listener offboard_control_mode
which should return thisoffboard_control_mode timestamp: 314055050 (0.031338 seconds ago) position: True velocity: False acceleration: False attitude: False body_rate: False actuator: False
- A way to verify the figure 8 ros2 node is sending setpoints to px4 is to echo trajectory setpoints:
ros2 topic echo /fmu/in/trajectory_setpoint
- When you kill the ros2 offboard node, you can echo that offboard mode status again and the timestamp should go stale and no longer update.
-
-
Hi and sorry for the delayed response.
Main result : no response from the rb5
Comments: the offboard code example in cpp is running in Gazebo but I cannot get the drone to arm via ROS2 run px4_ros_com offboard_control.This is the output from my terminal
~/ros2_ws$ ros2 run px4_ros_com offboard_control
Starting offboard control node...
[INFO] [1729601421.989530505] [offboard_control]: Arm command sendNotes: The offboard setting is "off" not "false" on the voxl-vision-hub.conf.
Do you have a recent tutorial on how to use ROS2 with the rb5?
Best wishes,