ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to develop ROS camera driver?

asked 2018-02-20 09:01:51 -0600

SumitP gravatar image


I am new to driver development.

So, what are the basic requirements to develop ROS camera driver?

Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-20 09:46:59 -0600

lucasw gravatar image

updated 2018-02-20 09:47:34 -0600

The bare minimum is to get images from your camera and then publish them as sensor_msgs/Image.

OpenCV is good as a data intermediate format, if you can get images from your camera and display them with cv::imshow or save them to disk with imwrite and they look good then converting them to ros with cv_bridge should be painless.

The next thing to do is use image_transport CameraPublisher and use a CameraInfoManager along with it and you will be able to get compressed image outputs and synchronized camera_info messages along with the standard image.

For performance it is good to have the driver be a nodelet.

Dynamic reconfigure support is nice for changing parameters that should be adjustable live- exposure, frame rate, and anything else the camera supports.

Beyond that look at examples of existing cameras:

(Is there a generic network or security camera driver?)

edit flag offensive delete link more


@lucasw thank you for your information. For Point grey camera Blackfly S (Spinnaker SDK).

SumitP gravatar image SumitP  ( 2018-02-20 09:55:17 -0600 )edit

Is that not supported by the existing pointgrey drivers? If it is only a small set of changes on the existing drivers you should try to fork and make required changes then pull request the changes so that others can use it.

lucasw gravatar image lucasw  ( 2018-02-20 11:23:13 -0600 )edit

No. Existing Point Grey camera driver is using Flycapture 2 SDK but I need to use Spinnaker SDK since Blackfly S won't support Flycapture 2.

SumitP gravatar image SumitP  ( 2018-02-20 12:06:15 -0600 )edit

Doesn't look like much has happened:

camera_aravis looks like it has been forked like crazy which makes it hard to use, but maybe a generic genicam interface work with the Blackfly S?

lucasw gravatar image lucasw  ( 2018-02-20 12:33:01 -0600 )edit

Question Tools

1 follower


Asked: 2018-02-20 09:01:51 -0600

Seen: 1,114 times

Last updated: Feb 20 '18