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

image_transport republish with camera_info.

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

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

/usb_cam_repub/camera_info

$ rostopic echo /usb_cam_repub/camera_info

does not show anything.

However,

$ 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
2

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

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

Comments

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 -0600 )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 -0600 )edit

Question Tools

Stats

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

Seen: 2,554 times

Last updated: Jun 06 '12