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

transforms for laser

asked 2012-07-31 05:15:08 -0500

Brad gravatar image

I recently wrote a ROS node for an older hokuyo laser. I wrote my own node because my laser is older and uses a protocol that is not supported by the hokuyo_node ROS package. My node is successfully publishing laserscan messages and I would like to view the laser scans in RViz. I'm having a problem viewing the data in RViz. The error I get is: Transform [sender=/hokuyo_pub] For frame [robot_pose_ekf/odom]: Frame [robot_pose_ekf/odom] does not exist

I think the problem involves transforms. I had to specify a frameid in the header of my laserscan message. I wasn't sure what to put here but tried: robot_pose_ekf/odom. I am using turtlebot.

Thanks for any advice!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-07-31 05:39:19 -0500

DimitriProsser gravatar image

Ideally, I would suggest that you write a transform publisher for your laser scanner using the tutorials located in the tf package. You must publish the laser scan data in a frame that exists on your Turtlebot. If you don't know what these frames are, you can use the following to see all of the transforms published on your robot:

rosrun tf view_frames
edit flag offensive delete link more

answered 2012-07-31 15:42:39 -0500

weiin gravatar image

Contrary to Dimitri's answer, I would suggest either publishing the scan message with "laser" as the frame_id, or extending your laser driver with the driver_base::Driver class (like what is done in the current hokuyo_node).

I do not think you need a transform publisher specifically for the laser if it is static. The turtlebot urdf can be updated with the laser link, and let robot_state_publisher handle the tf.

This way, your laser can be used for any other robots, or on its own, when needed.

edit flag offensive delete link more


Updating the URDF is also a valid solution. However, not all robots run robot_state_publisher and, if that's the case, you can't rely on it to publish your transform. I do agree that the scanner should publish messages in its own frame, which needs to be set up using either of these methods.

DimitriProsser gravatar image DimitriProsser  ( 2012-08-01 03:50:33 -0500 )edit

Question Tools

1 follower


Asked: 2012-07-31 05:15:08 -0500

Seen: 2,015 times

Last updated: Jul 31 '12