Some base classes for simplifing ROS camera driver node.
For writing a new ros camera driver, you need to inherit and implement the following two base classes.
Base class for a camera node. The node will have a dynamic reconfigure server.
Pure virtual functions
virtual void Acquire() = 0;
virtual void Setup(ConfigType& config) = 0;
Base class for a ros camera. A Ros camera will have the following common features:
- Camera Publisher
- Camera Info Manager
- Diagnostic Updater
Pure virtual functions
virtual bool Grab(const sensor_msgs::ImagePtr& image_msg) = 0;
~image_raw
(sensor_msgs/Image)
The unprocessed image data.
~camera_info
(sensor_msgs/CameraInfo)
Contains the camera calibration (if calibrated) and extra data about the camera configuration.
~set_camera_info
(sensor_msgs/SetCameraInfo)
Set the appropriate camera info (TF frame, calibration parameters, ROI etc.)