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

Map is rotating with the robot

asked 2022-10-09 08:48:40 -0500

Kostas Tzias gravatar image

updated 2022-10-09 08:49:30 -0500

My fixed frame is Map . While the robot is moving linear the map is staying still but when the robot starts rotating the map is rotating too .

My odom data are very accurate and i've checked them with tf in rviz .

My transforms are :

  • map -> odom from gmapping package
  • odom -> base_link , from odom package i've created to process odom data
  • base_link -> laser , from urdf file

Any thoughts why is this happening ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-10-09 16:22:16 -0500

ct2034 gravatar image

updated 2022-10-11 15:41:47 -0500

Hi. I think what's happening is that gmapping gives the transformation from map -> odom, as it should. But if you then give odom -> base_link, this will rotate the map, when the odometry rotates.

You will have to change your package to publish base_link -> odom and also the urdf must give laser -> base link. I think both of those transformations are published the wrong way round. It should also be mentioned here http://wiki.ros.org/amcl?distro=noeti... and here https://wiki.ros.org/gmapping?distro=...

EDIT: I think the way you write the transformations is correct, I just think that maybe the implementation does not match that which would give the indicated behaviour.

edit flag offensive delete link more

Comments

I don't think that's right because now my tree frame is broken into map->odom and laser->base_link . Are you sure this is the right way ?

Kostas Tzias gravatar image Kostas Tzias  ( 2022-10-11 08:28:07 -0500 )edit

just to be clear, the arrow x->y indicates a transformation of frame y in terms of x. Saying where y is within x. Note that this is the way, the tf documentation uses the arrow directions and also the link i posted from gmapping uses this orientation of arrows. The amcl documentation has the arrows the other way around but means the same thing. And just to make things even more complicated, rviz uses the wrong orientation, i.e. the one that also the amcl documentation uses.

ct2034 gravatar image ct2034  ( 2022-10-11 15:41:51 -0500 )edit

could you maybe post the output of rosrun tf view_frames

ct2034 gravatar image ct2034  ( 2022-10-11 15:43:11 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-10-09 08:48:40 -0500

Seen: 303 times

Last updated: Oct 11 '22