0
$\begingroup$

Rosanswers logo

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.

http://www.ist.tugraz.at/robotics/bin/view/Main/Poineer_mapping

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.

http://ros-users.122217.n3.nabble.com/Pioneer3-td1265101.html

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?


Originally posted by ParNurZeal on ROS Answers with karma: 91 on 2011-11-19

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by joq with karma: 25443 on 2011-11-19

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by ParNurZeal on 2011-11-22:
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.

Comment by prince on 2012-03-18:
I also faced same problem. Is it correct to remove division by 1000? Yes, map is generated after correction. This link http://www.ist.tugraz.at/robotics/bin/view/Main/Ros_first_steps shall also get updated!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.