PX4 SITL video stream unavailable on UDP 5600

Hi everyone,

I’m currently working on a project that requires the video feed from a drone in Gazebo. I’m launching the simulation using the command make px4_sitl gz_x500_vision, which runs without issues. In QGC, I’ve set the video settings to UDP h.264 on port 5600, but I’m not seeing any video feed.

I’ve had success with Gazebo Classic, where I was able to view the video feed in QGC using the same video settings. However, I’d prefer to use the latest version of Gazebo for this project.

To troubleshoot, I’ve tried using Wireshark to check if the video feed is being published, but I couldn’t detect anything. I’ve also attempted to view the video feed directly in Gazebo via the topic /world/default/model/x500_vision_0/link/camera_link/sensor/camera_imu/imu, but still no luck.

This has been an ongoing issue for a few weeks, and I haven’t been able to resolve it. Any suggestions or help would be greatly appreciated.

Thanks in advance!

1 Like

I believe I have this same issue. When running in classic were you using a camera plugin? I haven’t found where there is an ability to stream video on UDP in gazebo that is not gazebo-classic. Just seems odd that isn’t a solved problem, so I feel like I’m missing something.

Hi Mark,

I’m pretty sure this just isn’t implemented yet into the simulation on Gazebo Harmonic as the Gstreamer plugins haven’t been made yet that take the /camera topic from gazebo and put it out as a video stream on UDP 5600. I noticed this when digging through the model files for the H480 (I think it was called) from gazebo classic that at the end of the model file had a gstreamer plugin and when looking for this plugin for Gazebo Harmonic it didn’t exist. That’s my theory anyways maybe someone who has a better idea can enlighten us.

I have however managed to get the video from the camera now. If you want me to run through this let me know as I understand the pain.

Wow thank you for the reply. I would love to know how you’re able to get video from the camera. Long story short I am hoping to get video back through px4 for a camera that I plan to have on a companion rPi, so I am trying to simulate that from gazebo to qGC and to PX4 so that I can test. I really appreciate any help you can give me in getting video out of gazebo from a camera attached to a vehicle.

Hi Mark,

No worries, this is the only solution I was able to configure to pull the video feed from Gazebo but sadly it still doesn’t show in QGC. If that was needed I don’t see why you couldn’t write your own ROS2 node that uses gstreamer to put the video feed established out on the correct port for qGC to pick it up. I know it’s a bit of a roundabout way and I’m new to this all as well so there’s probably a better method. Any way please see the instructions below.

Prerequisites and install instructions

PX4 toolchain installation - Ubuntu Development Environment | PX4 Guide (main)

Install the currently supported version of ROS2, Humble in this case - Ubuntu (deb packages) — ROS 2 Documentation: Humble documentation

After following install instructions for ROS2 add the following to the end of .bashrc - source /opt/ros/humble/setup.bash

Install ROS2 & GZ packages - FOR YOUR VERSION OF ROS2 AND GAZEBO!- At writing this is GZ Harmonic and ROS2 Humble. The following link shows how to install for different combinations - Installing Gazebo with ROS — Gazebo ionic documentation. For the combination mentioned previously this will be - $ apt-get install ros-humble-ros-gzharmonic

Setup ros_gz workspace. Select the correct combination of ROS2 and GZ from table and follow the SOURCE install instructions - GitHub - gazebosim/ros_gz at humble

Set-up instructions
#Terminal 1
1.$ cd PX4-Autopilot
2.$ make px4_sitl gz_x500_mono_cam
2.3 dots in the top right of Gazebo and search “Image display” to see video feed

#Terminal 2
1.cd ros_gz_ws
2.Check /camera topic is visible with $ gz topic -l
3.REMEMBER TO SOURCE INSTALL! $ source ./install/setup.bash
4.$ ros2 run ros_gz_bridge parameter_bridge /camera@sensor_msgs/msg/Image@gz.msgs.Image

#Termianl 3
1.ros2 run rqt_image_view rqt_image_view
2.Select /camera topic

First, thank you so much for this info. I’m not sure if my setup is broken or not but figured I’d ask to see if you’ve ever seen this. I am able to see the camera in gazebo. I can run gz topic -l and see the camera topic. In fact when I run “gz topic -I -t /camera” I get this:
gz topic -i -t /camera
Publishers [Address, Message Type]:
tcp://192.168.1.144:59381, gz.msgs.Image
Subscribers [Address, Message Type]:
tcp://192.168.1.144:59953, gz.msgs.Image

Unfortunately though when I run ros gz bridge I get this error:

ros2 run ros_gz_bridge parameter_bridge /camera@sensor_msgs/msg/Image[gz.msgs.Image

[INFO] [1738202018.006959614] [ros_gz_bridge]: Creating GZ->ROS Bridge: [/camera (gz.msgs.Image) → /camera (sensor_msgs/msg/Image)] (Lazy 0)

Unknown message type [8].

Unknown message type [8].

Unknown message type [8].

Unknown message type [8].

Unknown message type [8].

Unknown message type [9].

Unknown message type [8].

Unknown message type [9].

Unknown message type [9].

Unknown message type [9].

Have you ever seen this? Is there a way for me to get more info?

Hi Mark,

I have seen this before but I cant remember where. Let me have a think but this may help. I think my instructions were wrong on terminal 2. I don’t think it’s necessary to source ./install/setup.bash so step 3 can be omitted. Let me know how you get on.