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

image_proc needs one camera_info for every image !?

asked 2019-06-07 10:19:35 -0500

Eduardo Soares gravatar image

I'm developing some camera driver, and also testing image_proc nodelets, but seems like it needs the camera_info msg for every image_raw. but it shouldn't be necessary because most of the parameters are the same, and is just using cpu and memory.

Best regards Eduardo Soares

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-06-08 18:48:05 -0500

JustinBlack02 gravatar image

While true, on the driver side you don't know when the application will start listening on the messages so you should just constantly stream them. On the application side, you don't know if any of the camera parameters will change during runtime (e.g. binning or ROI) so you should listen in on them. If you want to save CPU and memory and you know your parameters are not changing during run time you could run a custom version of the image_proc nodelets and do two things:

  1. Edit the required nodelets to unsubscribe to the topic once the camera info has been received (see here )
  2. Publish your camera info message only if there are subscribers detected.
edit flag offensive delete link more




3 . use a latched topic

gvdhoorn gravatar image gvdhoorn  ( 2019-06-09 02:17:57 -0500 )edit

I hadn't thought about that. The option @gvdhoorn suggest is probably the best one.

JustinBlack02 gravatar image JustinBlack02  ( 2019-06-09 15:58:11 -0500 )edit

Question Tools


Asked: 2019-06-07 10:19:35 -0500

Seen: 260 times

Last updated: Jun 08 '19