I’m working with a Unitree Go2 EDU robot and trying to integrate its data streams into a FastAPI + ROS2 bridge for a custom dashboard. I’ve run into an issue with the camera feed topic.
The topic /frontvideostream is visible with ros2 topic list.
When I run ros2 topic info /frontvideostream, it shows the type as unitree_go/msg/Go2FrontVideoData (sometimes mixed with sensor_msgs/msg/CompressedImage or sensor_msgs/msg/Image).
If I try to ros2 topic echo /frontvideostream or subscribe to it as CompressedImage, I get CycloneDDS errors like:
Basically the subscriber crashes because the type doesn’t match.
Has anyone successfully integrated the Go2 camera into their own visualization/dashboard pipeline, and how did you handle the custom message?
Any guidance would be much appreciated
Thanks in advance!
Hi the unitree topic is coming as a special unitree msg and not a ros2 video stream. You can refer to unitree docs for the exact topic interface type or simply ros2 topic info /frontvideostream -v
Is there a working example of using /frontvideostream in ROS 2 (or any other way apart from the sdk) ?
I’m trying to get it running, but I’m not sure how to interpret the data inside the Go2FrontVideoData message, especially the video720p array:
The frontvideostream type is unitree_go/msg/Go2FrontVideoData
I tried concatenating video720p packets directly into a file and playing it with ffplay. The result is only partially correct: I can see some content, but only the top rows of the image render properly (see screenshot).
You can refer to the qre_go2 repositories go2_platform ros2 packages → video stream script to see how it works as it sends the stream as compressed sensor image_raw and image_raw
If you do not have access to the qre_go2 or havent purchased the robot from us then you can refer to unitree_sdk2’s src script which has an example of streaming and decoding it.
First of all, thank you for your response. I have a follow-up question: where can I find the actual implementation of the decoding process? I only see the header files here: video_client.hpp
It looks like the SDK doesn’t include the source code, but instead provides only the precompiled libraries under the lib folder) it seems to come without source in the sdk as ther is a lib folder