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

Why TF tranformations from odometry to robot_base in P3DX devide by 1000?

asked 2011-11-19 00:42:31 -0600

ParNurZeal gravatar image

updated 2014-01-28 17:10:50 -0600

ngrennan gravatar image

I am trying to do Gmapping on P3DX using Hokuyo sensor and using RosAria in controlling.

I have seen many suggestion on doing TF like following tutorial.

In this tutorial, the code that transform odometry is below.

tf::Transform txOdom(odomQ, tf::Point((double) pos.getX()/1000.0, (double) pos.getY()/1000.0, pos.getTh())); tf.sendTransform(tf::StampedTransform(txOdom, ros::Time::now() ,"odom", "base_footprint"));

And the discussion below which one gave the code of tf from odometry to base divide by 1000 as well.

They all divided by 1000 in position from odometry. Why?

The problem I have when I divided by 1000 is gmapping seems to receive only first scan and do nothing else and wait for something. I guess Gmapping think the robot doesn't move. So, I tried to delete 1000 out and now Gmapping accept more data and make a map. I am not sure that I do it right or not in deleting 1000 out.

Could anyone explain the meaning of this? I would be very appreciated. like what is the unit from aria and RosAria and what is the unit gmapping want to receive?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-11-19 02:22:30 -0600

joq gravatar image

I suspect whatever node published the /odom transform is (mistakenly) doing it in millimeters instead of the ROS standard, which is meters. Perhaps the Pioneer provides them in millimeters and the publishing node is not correcting it.

edit flag offensive delete link more


Thank you for guiding! I looked into Aria, they use millimeters as their base unit. RosAria also already changed the unit to meters. Therefore, I think there is no need to divide by 1000 anymore. If I am right, other people are transforming wrong data to gmapping.
ParNurZeal gravatar image ParNurZeal  ( 2011-11-22 17:19:29 -0600 )edit

I also faced same problem. Is it correct to remove division by 1000? Yes, map is generated after correction. This link shall also get updated!

prince gravatar image prince  ( 2012-03-18 23:47:14 -0600 )edit

Question Tools


Asked: 2011-11-19 00:42:31 -0600

Seen: 1,512 times

Last updated: Nov 19 '11