Accessing Video Streams
In this module we will connect to the UAV’s onboard cameras.
Using VLC to stream over RTSP
The UAVs are running a web service (called camera-manager) which exposes cameras over RTSP, the Real Time Streaming Protocol.
VLC is a video player application available on all platforms. On your team laptop:
Open VLC
Go to the main menu, and select
Media -> Open Network Stream
Type in the RTSP URL for the front camera:
rtsp://TEAMNAME.beaver.works:8554/video13
This URL is documented on Intel’s wiki.Click Play
Using ROS 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).
Note: roscore
must first be running. If you have not started it already, open a separate terminal window (with Ctrl+Alt+t
), type roscore
at the prompt, and then press Enter
.
Inspect the list of topics in your terminal:
$ rostopic list
Now, in that terminal window, start the front camera ROS node:
$ roslaunch realsense_camera r200_nodelet_rgbd.launch
Open a new terminal (Ctrl+Alt+t
) and run:
$ rostopic list
You will see several additional topics listed, which include image topics.
Let’s inspect the front camera feed. In the terminal, launch:
$ rqt_image_view
And in the dropdown menu, select the image topic for the front camera (/camera/rgb/image_raw
):
Further reading:
Launching image topics in ROS: https://github.com/intel-aero/meta-intel-aero/wiki/05-Autonomous-drone-programming-with-ROS#launching
Intel’s UAV camera documentation: https://github.com/intel-aero/meta-intel-aero/wiki/06-Cameras-and-Video
ROS image topics:
Image Transport, the ROS messaging system for images