ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

image_transport republish with camera_info.

asked 2012-06-05 04:03:07 -0500

Hyon Lim gravatar image

When I using republish of image_transport as follows,

$ rosrun image_transport republish compressed in:=/usb_cam/image_raw out:=/usb_cam_repub/image_raw

In this case, there is no message in


$ rostopic echo /usb_cam_repub/camera_info

does not show anything.


$ rostopic echo /usb_cam/camera_info

shows camera parameters.

How can I copy /usb_cam/camera_info to /usb_cam_repub/camera_info ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-06-06 08:48:22 -0500

The republish node does not republish the CameraInfo message. You can use topic remapping to solve this problem. In the application which uses the republished image message, you should be able to remap the camera_info message back to the old one. Your call will look something like:

rosrun package binary usb_cam_repub/camera_info:=usb_cam/camera_info

You can read more about remapping arguments here

edit flag offensive delete link more


Hi. Actually, this does not work. My problem is that when I subscribe /usb_cam_repub/image_raw in rviz, the rviz is finding /usb_cam_repub/camera_info by default, however, there is no topic. So I changed it to /usb_cam, then camera_info is loaded once, then I changed to /usb_cam_repub, it will work

Hyon Lim gravatar image Hyon Lim  ( 2012-06-06 17:42:19 -0500 )edit

Did you try running "rosrun rviz rviz /usb_cam_repub/camera_info:=/usb_cam/camera_info". I just did a quick test and it works for me.

piyushk gravatar image piyushk  ( 2012-06-07 11:42:11 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-06-05 04:03:07 -0500

Seen: 2,391 times

Last updated: Jun 06 '12