polled_camera defines the ROS interface that client nodes use to request images from a polling camera driver node (e.g. prosilica_camera). The protocol is:
The camera driver advertises a service call <camera>/request_image of type polled_camera/GetPolledImage.
- The client calls the service, specifying an output namespace.
- On receiving a request, the driver captures an image and returns its time stamp in the service response.
- Clients subscribe to the response topics just like any other camera image stream.
- When a disconnection causes the number of subscribers to drop to zero, the publisher shuts down.
See the code API (unstable) for more information on writing polled camera drivers or clients.
There are several reasons for publishing images to topics instead of returning them from the service call:
- Consistency. Client-side processing is always performed in an image callback, regardless of what type of camera is used.
Reproducibility. Topics can be bagged and played back later.
Compression: Can take advantage of image_transport to compressed images, if desired.
Continually requests images from a polled camera at a specified rate in Hz, making the camera look like it is capturing continuously.
# Poll "my_camera" at 5 Hz, publishing in namespace my_polled_output/. $ poller 5 camera:=my_camera output:=my_polled_output
Published Topics<output>/image_raw (sensor_msgs/Image)
- Image topic, actually published by the camera driver. output should be remapped by the user.
- Info topic, actually published by the camera driver. output should be remapped by the user.
Services Called<camera>/request_image (polled_camera/GetPolledImage)
- The camera driver's polled image service. camera should be remapped by the user to the camera namespace.