ROS package to capture frames from any UVC camera. The frame are shared using image_transport package. Camera settings (height, width and frequency) can be changed dynamically with the ROS service "set_camera".
Keywords: camera, capture, uvc
The source code is released under a BSD 2-Clause license.
Author: Anthony Cavin
The camera_capture package has been tested under ROS kinetic and Ubuntu 16.04.
Reference page to install ROS kinetic on Ubuntu:
- Robot Operating System (ROS) (middleware for robotics),
- image_transport (ROS package),
- OpenCV (library for computer vision)
To build from source, clone the latest version from this repository into your catkin workspace and compile the package using
cd catkin_workspace/src
git clone https://github.com/AnthonyCvn/camera_capture.git
cd ../
catkin build camera_capture
Run the unit tests with
catkin run_tests camera_capture
Run the main node with
roslaunch camera_capture camera_capture.launch
-
camera_capture.launch: Launch one camera.
Argument set 1
is_running
Run (true) or stop (false) the camera. Default:true
.
Argument set 2
camera_num
Camera number to run. Default:0
.
Argument set 3
is_stereo
Set true for stereo camera. Default:false
.
Argument set 4
height
Resolution in pixel. Default:720
.
Argument set 5
width
Resolution in pixel. Default:2560
.
Argument set 6
fps
Frame per second to capture from the camera. Default:30
.
Open the UVC camera and share the frames using image_transport package.
-
/image
(sensor_msgs/Image)The images captured with the camera in raw format.
-
/image/theora
(theora_image_transport/Packet)The images captured with the camera compressed with the Theora codec.
-
set_camera
([camera_capture/SetCamera])Set dynamically camera's settings.
rosservice call /camera_capture/set_camera "{height: 1080, width: 1920, fps: 30, conf_camera: true, run_camera: true}"
Please report bugs and request features using the Issue Tracker.