Skip to content

LarryDong/usb_cam_utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

usb_cam_utils

My usb camera's codes. This repo includes:

rgb_driver

Start a usb camera and publish the topic.

Usage

roslaunch rgb_driver rgb_driver.launch

Setting

  • video_port: default 0. If you have many cameras (like a built-in cam), you may need change this value to 2 or 3.
  • fps: camera's fps. Some USB cameras cannot change this value, so the actual-fps may be different.
  • exposure: exposure time in s. 0 for auto-exposure, others for exposure time (e.g., 0.02 is 20ms). If you change to auto-exposure, you need to reset camera by reconnection.
  • output_rate: ros publish image topic rate. If the rate is larger than actual-fps, the published images may be duplicated.
  • show_image: show image in a new window. Press 'q' to quit showing.

Features

  • The usb camera's buff is always read by a new thread. Thus the published images are the newest.

image_writer

Write a rosbag (offline) or online camera to save images and ts.

Usage

roslanch image_writer offline_writer.launch

The images are saved to output_folder/image, and timestamps are saved to output_folder/ts.csv.
Roslaunch need to give an absolute path.

About

My usb camera's codes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published