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

transformation from map to laser

asked 2018-11-21 00:51:37 -0500

AutoCar gravatar image

Hi, I have a robot system which has frame odom and laser. tf publish the transfermation from odom to laser. I am building my own localization node which publish the frame "map" and the transformation from map to odom. When I use rviz, if I select odom as fixed frame, I can see the laser data. If I select "map" as fixed frame, rviz complains that there is no transformation from map to laser. I thought since I defined the transformation from map to odom, and the existing system has the transformation from odom to laser, rviz should be able to figure out the transformation from map to laser. But this does not seem to be the case. What's wrong?

edit retag flag offensive close merge delete

Comments

Try rosrun tf view_frames which will produce a graph showing the connections between the TF frames. Use evince frames.pdf to view the graph. Are all the frames joined up as you expect?

Andy West gravatar image Andy West  ( 2018-11-21 02:47:39 -0500 )edit

I can see map->odom->base_link->base_footprint. But laser it not there.

AutoCar gravatar image AutoCar  ( 2018-11-21 21:27:52 -0500 )edit

Please note that the transformation from odom to base_link is inside tf. However, the transformation from base_link to Laser is described in tf_static.

AutoCar gravatar image AutoCar  ( 2018-11-21 21:38:40 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-11-24 01:16:59 -0500

AutoCar gravatar image

I found the root cause was the time when running bag files. I need to set use_sim_time to be true. fine.

edit flag offensive delete link more
0

answered 2018-11-22 03:04:36 -0500

Andy West gravatar image

If there is no link between base_link and Laser in the TF tree, then you need to publish your own static transform using the static transform publisher in TF.

To test this, try a transform publisher which places the laser 0.3 metres above the base_link:

rosrun tf static_transform_publisher 0 0 0.3 0 0 0 base_link Laser 100

The arguments are:x y z yaw pitch roll frame_id child_frame_id period_in_ms. If this works, it can be added to your launch file.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-11-21 00:51:37 -0500

Seen: 2,231 times

Last updated: Nov 24 '18