ROS2 component that publishes raw images taken from an IP camera.
Note: to cross-compile for ARM architecture see the related article.
git clone https://github.com/surfertas/ros2_ipcamera.git
colcon build --symlink-install
. install/setup.bash
Docker:
git clone https://github.com/surfertas/ros2_ipcamera.git
cd ros2_ipcamera
sudo docker build -t ros2_ipcamera/latest .
- Update
rtsp_uri
parameter found in/config/ipcamera.yaml
with the appropriate rtsp uri to your IP camera. - Set the width and height to match the resolution of the IP camera. The node does not resize the image, but only sets the capture.
- Generate a camera_info.yaml file and place in
/config
.
ros2 run ros2_ipcamera composition
# Alternatively use the launch file
ros2 launch ros2_ipcamera ipcamera.launch.py
Docker:
# Update rtsp_uri in the yaml file.
sudo docker run -it ros2_ipcamera/latest bash
vi src/ros2_ipcamera/config/ipcamera.yaml
source ./install/setup.bash
ros2 launch ros2_ipcamera ipcamera.launch.py
Topics:
/ipcamera/image_raw
- topic for raw image data
/ipcamera/camera_info
- topic for camera info
- https://github.com/ros2/demos/blob/master/image_tools/src/cam2image.cpp
- http://surfertas.github.io/ros2/2019/08/17/ros2-qos.html
- https://github.com/klintan/ros2_usb_camera/blob/master/src/usb_camera_driver.cpp
- https://github.com/ros-perception/image_common/wiki/ROS2-Migration
- https://github.com/ros2/demos/tree/master/composition
- https://github.com/christianrauch/raspicam2_node/blob/master/src/RasPiCamPublisherNode.cpp