Skip to content

soricpetar/synccamerasv1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS Synchronized Cameras

This package provides a ROS node for synchronizing two USB cameras. The images from the two cameras are captured and synchronized using ROS message filters. This is useful in scenarios where stereo image processing or other multi-camera applications are needed.

Dependencies

The following ROS packages are needed:

  • usb_cam: A ROS driver for USB cameras. This driver publishes images as sensor_msgs/Image messages, which can be used directly in ROS.
  • cv_bridge: A ROS library for converting between ROS image messages and OpenCV image objects.
  • message_filters: A ROS library for processing messages from multiple topics.

In addition, the following Python libraries are needed:

  • rospy: A Python library for writing ROS nodes.
  • cv2: OpenCV's Python library, used for image processing.

Installation

First, clone this repository into your catkin workspace:

cd ~/catkin_ws/src
git clone https://github.com/yourgithubusername/ros_synchronized_cameras.git

Next, install the dependencies:

sudo apt update
sudo apt install ros-noetic-usb-cam ros-noetic-cv-bridge python3-opencv python3-rospy ros-noetic-common-msgs

Please replace noetic with your ROS distribution if you're using a different one.

After installing the dependencies, build your catkin workspace:

cd ~/catkin_ws
catkin_make

Usage

First, start the USB camera drivers for both cameras. You can use the file usb_cam_sync.launch inside the launch folder, note that you should change params "video_device" to represent the device paths for your cameras.

roslaunch launch/usb_cam_sync.launch

Next, start the sync_cameras node:

rosrun ros_synchronized_cameras sync_cameras.py

The node will display the synchronized images from both cameras in a single window. The node will keep running until you press 'q' to close the window.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published