Merge branch 'master' into development

This commit is contained in:
Dzmitry Maladzenkau 2024-04-27 15:13:24 +02:00 committed by GitHub
commit 895053f69c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 8 deletions

View File

@ -2,7 +2,9 @@
This project is a migration from ROS1 to ROS2. The original code was developed by [CircusMonkey](https://github.com/CircusMonkey/ros_rtsp/tree/master). I would like to express my gratitude for his contribution. This project is a migration from ROS1 to ROS2. The original code was developed by [CircusMonkey](https://github.com/CircusMonkey/ros_rtsp/tree/master). I would like to express my gratitude for his contribution.
## image2rtsp ## image2rtsp
This project enables the conversion of a selected ROS2 topic of type `sensor_msgs::msg::Image` into an `RTSP` stream, with an anticipated delay of approximately 30-50ms. The generated stream can be utilized for various purposes such as remote control, object detection tasks, monitoring, and more. Please note that the migration process is ongoing, and therefore, the complete functionality of the original package is not yet available. This project enables the conversion of a selected ROS2 topic of type `sensor_msgs::msg::Image` into an `RTSP` stream, with an anticipated delay of approximately 300-500ms. It also supports usb camera as a direct source. The generated stream can be utilized for various purposes such as remote control, object detection tasks, monitoring, and more. Please note that the migration process is ongoing, and therefore, the complete functionality of the original package is not yet available.
Currently supported formats: "RGB", "RGB16", "RGBA", "RGBA16", "BGR", "BGR16", "BGRA", "BGRA16", "GRAY8", "GRAY16_LE".
The development is being carried out on Ubuntu 20.04 with ROS2 Foxy, also tested on Ubuntu 22.04 with ROS2 Humble. The development is being carried out on Ubuntu 20.04 with ROS2 Foxy, also tested on Ubuntu 22.04 with ROS2 Humble.
@ -34,7 +36,14 @@ sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1
gedit ~/ros2_ws/src/image2rtsp/config/parameters.yaml gedit ~/ros2_ws/src/image2rtsp/config/parameters.yaml
``` ```
# Example ROS2 Image topic stream # Example ROS2 Image topic stream
topic: "/color/image_raw" # The ROS2 topic to subscribe to
# If camera serves as a source (switched off by default)
camera: False
source: "v4l2src device=/dev/video0"
topic: "/color/image_raw" # The ROS2 topic to subscribe to. Dont change, if you use a camera
# Parameters for both cases
mountpoint: "/back" # Choose the mountpoint for the rtsp stream. mountpoint: "/back" # Choose the mountpoint for the rtsp stream.
# This will be able to be accessed from rtsp://<server_ip>/portAndMountpoint # This will be able to be accessed from rtsp://<server_ip>/portAndMountpoint
bitrate: "500" bitrate: "500"
@ -73,8 +82,7 @@ source install/setup.bash
ros2 launch image2rtsp rtsp.launch.py ros2 launch image2rtsp rtsp.launch.py
``` ```
## Limitations ## Limitations
- As was previously mentioned, this package allows the conversion of only one topic into an RTSP Stream. - As was previously mentioned, this package allows the conversion of only data source into an RTSP Stream.
## To Do ## To Do
- Add the camera directly as a source
- Add web camera ros2 topic formats - Add web camera ros2 topic formats
- Add compressed images formats (jpeg, png) - Add compressed images formats (jpeg, png)

View File

@ -2,11 +2,11 @@
ros__parameters: ros__parameters:
# If camera serves as a source # If camera serves as a source
camera: False camera: False
source: "v4l2src device=/dev/video0" source: "v4l2src device=/dev/video0"
# If the source is a ros2 topic # If the source is a ros2 topic (default case)
topic: "/image_raw" topic: "/color/image_raw"
# General setup # General setup
mountpoint: "/back" mountpoint: "/back"