Awesome Open Source
Awesome Open Source

ROS2 USB Camera Node

Its based on both the image_tools cam2image demos for ROS2 as well as the libuvc and usb_cam project for ROS1.


  • CameraInfo available
  • CompressedImage topic (see compressed images for republishing using image_transport)
  • Image topic

There might be major changes to the code as it is a WIP.


/camera_info - topic for camera info /image_raw - topic for raw image data


Make sure to run setup.bash and local_setup.bash for all dependencies or symlink them into the repo.


colcon build


ros2 run usb_camera usb_camera __ns:=/<your namespace> __params:=config.yaml

Calibration files

To use the camera info functionality you need to load a file from the camera_calibration ( library and put it in/name it file:///Users/<youruser>/.ros/camera_info/camera.yaml

Compressed images

To get compressed images (works seamlessly with web streaming) republish the topic using image_transport which is available for ROS2.

ros2 run image_transport republish raw in:=image_raw compressed out:=image_raw_compressed

Make sure to link/install before to enable compressed image republishing using image_transport since its not included in the base package. More information here, here and here


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
C Plus Plus (367,039
Camera (1,664
Ros2 (309
Related Projects