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

Overlay LaserScan data on Camera in rviz

asked 2012-04-24 12:37:48 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I have a setup with a simple VGA Camera and a Hokuyo 2D Laser and I want to OVERLAY the readings from the Hokuyo on the window of the camera in rviz. I can see the hokuyo readings on the main window and I can also see the camera image in a separate window. I've already set the frame_id for camera to /camera and for the hokuyo to /laser. Also I publish the tf for /world frame to each of the aforementioned frames. The camera is next to the laser so the translation transform for the camera is 0,0,0 and for the laser is like 0, 0.05 ,0 which means 5 cm at the right. I want to see a line on the camera window much as like in the rviz tutorials (second video around 2:40).

edit retag flag offensive close merge delete

Comments

Do you directly or indirectly publish transforms from /world -> /camera and from /world -> /laser?

joq gravatar image joq  ( 2012-04-24 16:56:19 -0500 )edit

i've tried [ /world -> /camera , /camera -> /laser] & [ /world -> /camera , /world -> /laser] is this what you mean? in the second case they are both direct children of the /world frame.

kabamaru gravatar image kabamaru  ( 2012-04-24 22:34:49 -0500 )edit

Did you try moving the camera window on top of the laser display area?

joq gravatar image joq  ( 2012-04-25 06:01:34 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-04-25 04:22:27 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

well it was a matter of some transform manipulation after all. the POVs of the camera and the laser (hokuyo) are not aligned. just for reference the tf that worked for me was: xyz ypr [0 0 0 -1.57 0 -1.57]

<node pkg="tf" type="static_transform_publisher" name="world_to_camera" args=" 0 0 1 -1.57 0 -1.57 /world /camera 100"/>

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-04-24 12:37:48 -0500

Seen: 1,967 times

Last updated: Apr 25 '12