Accessing Video Streams

In this module we will connect to the UAV’s onboard cameras.

Video Streaming with QStreamer and QGroundControl

PX4-based vehicles support video streaming using a camera connected to a companion computer. We will need access to this stream later on in the course. See the link below for setup instructions:

PX4 Video Streaming

Using ROS2 to view image topics

Recall the basics of ROS topics, which are named “buses” or “channels” of information which ROS uses to pass around ROS messages between ROS nodes. These topics can contain streaming camera sensor data, which we will inspect as part of this module.

We will use rqt_image_view, a desktop program which decodes and visualizes the binary information in a ROS image topic. However, first we need to launch the ROS node which publishes ROS Image messages on the topic.

On the small HDMI display connected to the drone, open a terminal with the shortcut Ctrl+Alt+t (using the keyboard connected to the drone).

Inspect the list of topics in your terminal:

$ ros2 topic list

Now, in that terminal window, start the front camera ROS node:

$ ros2 run v4l2_camera v4l2_camera_node

Ignore the red error. This is due to the lack of a camera calibration file

Open a new terminal (Ctrl+Alt+t) and run:

$ ros2 topic list

You will see several additional topics listed, which include image topics.

Let’s inspect the front camera feed. In the terminal, launch:

$ rqt

And in the dropdown menu, select the image topic for the front camera (/image_raw): 0113ce26b9ab478986d5e5f48b217205

[ ]:

[ ]: