Ask Your Question
3

Turtlebot SLAM map building problems

asked 2011-12-23 06:28:53 -0500

Vassilis gravatar image

updated 2014-01-28 17:11:02 -0500

ngrennan gravatar image

I have some problems building a map with my Turtlebot. I run the calibration (0.85 for the gyro and 0.93 for odom) multiple times and followed the instructions in the tutorials for starting gmapping. The map looks like a set of scans scattered around, also the orientation shown in rviz is not consistent with where the robot is going.

To me it seems like there is either a problem with the odometry/gyro or the localization is not working properly. The gyro seems to work (I see the values changing when rotating), do I need to change anything in the config files (except the odo/gyro cal values)? I should also mention that I am using all the turtlebot hardware except the Kinect mounting hardware. I made my own mounting pole but the kinect is located approximately at the same place as with the standard turtlebot.

As recommended I did the tests in http://www.ros.org/wiki/navigation/Troubleshooting and it seems like there is something wrong with the odometry, but only while turning, moving straight seems to be fine. The gyro seems to output good values (see plots) and the calibration was done multiple times. Have a look at the following link for a few screenshots and some more details.

https://picasaweb.google.com/109216537228630118124/TurtlebotSLAM?authuser=0&authkey=Gv1sRgCPTsg_Wh7fuqZw&feat=directlink

I did a 180 degree turn and the /odom orientation (yaw) measured 176.8 degrees, however the /robot_pose_ekf/odom orientation (yaw) measured only 60.4 degrees. So that leads me to believe it is either the gyro or something wrong with the EKF.

Also, following is the calibration output (removed a few repeated lines to make the post shorter):

[INFO] [WallTime: 1324939496.895343] ... imu drift is -0.621943 degrees per second

[INFO] [WallTime: 1324939497.197380] Still waiting for imu

[INFO] [WallTime: 1324939497.499277] Still waiting for scan

[INFO] [WallTime: 1324939497.801215] Aligning base with wall

[INFO] [WallTime: 1324939498.103249] Still waiting for imu

[INFO] [WallTime: 1324939498.405232] Still waiting for scan

[INFO] [WallTime: 1324939545.778987] Odom error: 2.295941 percent

[INFO] [WallTime: 1324939545.780867] Imu error: -32.801991 percent

[INFO] [WallTime: 1324939546.090230] Still waiting for imu

[INFO] [WallTime: 1324939546.392098] Still waiting for scan

[INFO] [WallTime: 1324939546.996119] Aligning base with wall

[INFO] [WallTime: 1324939548.270806] Still waiting for imu

[INFO] [WallTime: 1324939548.573036] Still waiting for scan

[INFO] [WallTime: 1324939560.870167] Odom error: -11.098675 percent

[INFO] [WallTime: 1324939560.872639] Imu error: 19.686330 percent

[INFO] [WallTime: 1324939561.178241] Still waiting for imu

[INFO] [WallTime: 1324939561.480022] Still waiting for scan

[INFO] [WallTime: 1324939561.782138] Aligning base with wall

[INFO] [WallTime: 1324939565.640311] Still waiting for imu

[INFO] [WallTime: 1324939565.942336] Still waiting for scan

[INFO] [WallTime: 1324939573.806552] Odom error: 6.987265 percent

[INFO] [WallTime: 1324939573.808156] Imu error: 35.610160 percent

[INFO] [WallTime: 1324939574.111180] Still waiting for imu

[INFO] [WallTime: 1324939574.413042] Still waiting for scan

[INFO] [WallTime: 1324939574.715408] Aligning base with wall

[INFO] [WallTime: 1324939577.046587] Still ... (more)

edit retag flag offensive close merge delete

Comments

did you edit the turtlebot.launch file in etc to store the calibration values and then restart the turtlebot service?
mmwise gravatar imagemmwise ( 2011-12-23 07:06:02 -0500 )edit
Yes that was done.
Vassilis gravatar imageVassilis ( 2011-12-23 13:20:43 -0500 )edit
Can you do the three tests under 1. here: http://www.ros.org/wiki/navigation/Troubleshooting ? If they go fine and the laserscans look OK, then everything should be setup OK on the robot side.
dornhege gravatar imagedornhege ( 2011-12-23 16:07:56 -0500 )edit
Done, please have a look at the revised question for the details. Thanks!
Vassilis gravatar imageVassilis ( 2011-12-26 08:41:31 -0500 )edit
If picture 1 and 2 are from the same run before/after one rotation, then the gyro seems to be the problem, given that the graphs look OK. How does it look with the decay enabled, are the laserscans smeared over the rotation?
dornhege gravatar imagedornhege ( 2011-12-26 12:19:14 -0500 )edit
I'm not familiar with the turtlebot imu, but for Imu error reported above seems quite high to me. Maybe some of the turtlebot guys know what the problem might be.
dornhege gravatar imagedornhege ( 2011-12-26 12:20:04 -0500 )edit
The laser scans are all over the place with the delay on, I do agree there seems to be something wrong with the gyro. I got the Turtlebot sensor/power board last week, so I am not sure what to expect out of the gyro. Maybe somebody with a similar setup can have a look at the IMU plots?
Vassilis gravatar imageVassilis ( 2011-12-26 13:30:38 -0500 )edit
My only guess would be that "Multiply the 'turtlebot_node/gyro_scale_correction' parameter with 0.876864" didn't happen or not where it's supposed to be.
dornhege gravatar imagedornhege ( 2011-12-26 14:17:35 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2011-12-27 15:16:41 -0500

Vassilis gravatar image

updated 2011-12-27 15:23:02 -0500

I think I figured this out! My sensor/power board has the ADXRS620 gyro and not the ADXRS613, the big difference is that ADXRS613 has a +/- 150deg/s output and the ADXRS620 has a +/- 300 deg/s output. This is important because for the same angular speed the raw outputs will differ by a factor of two.

Also looking at turtlebot_node/src/turtlebot_node/gyro.py the raw signal from the analog input is multiplied by 150 to convert to deg/sec, when I changed it to 300 it worked fine with the values recommended by the calibration.

One problem with the higher rate sensor is that the resolution is now halved. As a result I noticed that the drift is very high even with the robot stationary. I added a short averaging filter on the analog input in gyro.py and it helped a lot but I need to experiment with this a bit more.

To fix this the gyro type could be defined as a parameter of turtlebot_node. I would be happy to fix this myself if I can get access to commit code.

edit flag offensive delete link more

Comments

I think the developers will appreciate a patch!
dornhege gravatar imagedornhege ( 2011-12-28 02:55:55 -0500 )edit
nice work tracking that down. in theory, adjusting params for the EKF would work more reliably than averaging filter...
Nick Armstrong-Crews gravatar imageNick Armstrong-Crews ( 2011-12-28 11:22:23 -0500 )edit
if the calibration value if off by a large enough value the calibration routine will not measure the proper value. multiply by two and then run calibration again and I suspect you will get proper results
mmwise gravatar imagemmwise ( 2011-12-29 07:17:47 -0500 )edit
2

answered 2011-12-27 05:20:07 -0500

Vassilis gravatar image

It seems like I am getting much better odometry when setting turtlebot_node/gyro_scale_correction to 2.55 instead of 0.876864 that is recommended by the odometry calibration.

Not sure if this is normal!

edit flag offensive delete link more

Comments

It says: "Multiply by" - might that be the mistake?
dornhege gravatar imagedornhege ( 2011-12-27 06:36:59 -0500 )edit
Not sure enough but if configuring gyro upon calibration is the root cause, that's what I faced with mapping on turtlebots. In addition to tutorials & FAQ about turtlebot's calibration, see also http://answers.ros.org/question/3088/turtlebot-calibration-returns-absolute-parameters
130s gravatar image130s ( 2011-12-27 12:44:28 -0500 )edit
+1: setting the value to 2.5 works well for me, although the calibration tells me to set it to .85 (multiplier for the original value, 1)
Nick Armstrong-Crews gravatar imageNick Armstrong-Crews ( 2011-12-27 14:51:14 -0500 )edit
tfoote gravatar imagetfoote ( 2012-01-01 17:43:04 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-12-23 06:28:53 -0500

Seen: 1,487 times

Last updated: Dec 27 '11