Skip to content

webbe035/rtsp-ros-driver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rtsp_ros_driver

This ROS package contains a driver node that reads frames from an RTSP video stream (e.g., IP Camera) and publishes them out as sensor_msgs/Image ROS messages.

Configuration

rtsp_ros_driver implements the ROS camera_info_manager interface. This means that the driver node can seamlessly handle camera calibration files. rtsp_ros_driver stores camera calibration files in the directory $ROS_HOME/camera_info/. Export the environment variable $ROS_HOME to point to your catkin_ws directory.

 export ROS_HOME=<path_to_your_catkin_ws>

Tutorial

You can launch the rtsp_ros_driver main node by running:

roslaunch rtsp_ros_driver rtsp_camera.launch <arguments>

Launch files

rtsp_camera.launch

Launches the main node of the package (i.e., rtsp_driver_node). Unlike the rtsp_driver_node node, this launch file allows us to specify hostname, username, password, and other parameters about the camera separately. These parameters will be combined into a standard URL format and sent to the rtsp_driver_node node.

Subscribed topics

None.

Published topics

Identical to the rtsp_driver_node node (see below).

Arguments

Mandatory arguments

hostname    (string)
         Hostname or IP of the RTSP camera.

username    (string)
         Username for the RTSP camera.

password    (string)
         Password for the RTSP camera.

stream    (string)
         Name of the video stream published by the RTSP camera.

Optional arguments

camera_name    (string, default: rtsp_camera)
         Namespace of the camera.

camera_frame    (string, default: rtsp_camera_link)
         Name of the camera reference frame.

image_raw_topic    (string, default: ~image_raw)
         Name of the output image topic.

camera_info_topic    (string, default: ~camera_info)
         Name of the output camera info topic.

port    (int, default: 554)
         Port of the RTSP camera.

Nodes

rtsp_driver_node

Main node of the package, it is responsible for reading frames from the given RTSP video stream source and publishing them out as sensor_msgs/Image ROS messages.

Subscribed topics

None.

Published topics

/<camera_name>/<image_raw_topic>    (sensor_msgs/Image)
         Raw image stream from the camera.

/<camera_name>/<camera_info_topic>    (sensor_msgs/CameraInfo)
         Camera metadata.

Parameters

Mandatory parameters

~rtsp_resource    (string)
         RTSP URL to the camera string.

Optional parameters

~camera_name    (string, default: rtsp_camera)
         Namespace of the camera.

~camera_frame    (string, default: rtsp_camera_link)
         Name of the camera reference frame.

~image_raw_topic    (string, default: ~image_raw)
         Name of the output image topic.

~camera_info_topic    (string, default: ~camera_info)
         Name of the output camera info topic.

About

ROS driver node for RTSP cameras

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 68.0%
  • Python 27.0%
  • Dockerfile 5.0%