Only released in EOL distros:
Package Summary
hrl_camera
- Author: Hai Nguyen, Advait Jain, Cressel Anderson, Marc Killpack
- License: BSD
- Source: git https://code.google.com/p/gt-ros-pkg.hrl/ (branch: master)
hrl_camera was designed for simpler usage and management of cameras. It includes 3 components. First, it includes scripts for making cameras accessible over ROS. Second, it provides a method to uniquely reference different cameras. Finally, it provides a python interfrace for cameras to be accessed using Python code.
Usage
In Python, to use cameras declared in this package's camera_config.py:
import hrl_camera.hrl_camera as hc camera_object = hc.find_camera('CAMERA_NAME')
The function find_camera takes as input a string, looks up that string in the dictionary declared in camera_config.py, then instantiate and returns an object of the appropriate class.
Entries in camera_config.py
For the above steps to work, each entry in camera_config.py needs to be a dictionary entry mapping from a human friendly name (CAMERA_NAME in the above snipplet) to a dictionary of parameters containing the keys 'class' and 'uuid'. The value specified by 'class' must be the Python legal class name of the object that needs to be instantiated and must be in the PYTHON_PATH of the process that executes find_camera. The value in 'uid' should be the camera's UID provided by the utility camera_uid.py.
Writing a New Camera Class
To be compatible with this package new camera classes needs to have an init() method that takes in the configuration dictionary defined in camera_config.py. For examples, look at dragonfly2.py and firefly.py. Utilities
- camera_uuid.py Prints out connected cameras and associated UIDs
hrl_ros_camera.py CAMERA_NAME Publishes images over ROS (topic "cv_camera_" + CAMERA_NAME with type Image). Publishes CameraInfo messages on topic "cv_camera_" + CAMERA_NAME + "_info". Works with cameras defined in camera_config.py
- ros_camera.py OPENCV_ID Publishes images over ROS (topic "cv_camera" + str(OPENCV_ID) with type Image). Works with any camera openable by OpenCV2.