ros-perception / image_common

Common code for working with images in ROS
http://www.ros.org/wiki/image_common
125 stars 220 forks source link

Camera info topic is tied to camera image topic #147

Open RValner opened 4 years ago

RValner commented 4 years ago

Hi

I need to remap camera info_topic and camera image_topic individually but it seems that the info_topic is tied to image_topic. As a result I cannot remap the info_topic in a predictable manner.

I can see that info_topic is named by removing the last token (separated by '/') of image_topic and then "camera_info" is added to the resulting token vector.

For example if I try remap the image_topic by running usb_cam (which uses the image_transport package)

$ rosrun usb_cam usb_cam_node /usb_cam/image_raw:=my_image_raw/remapped

and do rostopic list, this is what I get:

/my_image_raw/camera_info
/my_image_raw/remapped

where you can see that image_topic is remapped correctly but info_topic is affected as a result. The only way I can remap the info_topic now is to

rosrun usb_cam usb_cam_node /usb_cam/image_raw:=my_image_raw/remapped /my_image_raw/camera_info:=my_camera_info/remapped

and then I get the result I need:

/my_camera_info/remapped
/my_image_raw/remapped

Is there a valid reason for binding the info_topic with image_topic?