0
$\begingroup$

Rosanswers logo

MY turtlebot can map straight hallways but has trouble mapping while turning. I have tried mapping the corridor between cubicles at work (small spaces!) as well as cubicles. It maps the corridor fine but cannot map the cubicles. Instead of turning out as box shaped, they turn out like a multitude of corners forming a sphere.

Also when it turns around to come back down the corridor it acts as if it is a second corridor. I have changed my gyro_measurement_range to 250 since my turtlebot is from Clearpath and have ran the calibrations as well as changing them internally.

My guess is that the lag is affecting how it updates the map and is causing it to be extremely incorrect. Any thoughts or ideas?

BAGFILE
turtlebot@turtlebot:~/rosbagfiles$ rosbag info 2012-05-23-08-17-03.bagpath:        2012-05-23-08-17-03.bag
version:     2.0
duration:    4:49s (289s)
start:       May 23 2012 08:17:04.90 (1337779024.90)
end:         May 23 2012 08:21:54.14 (1337779314.14)
size:        34.9 MB
messages:    60655
compression: none [46/46 chunks]
types:       actionlib_msgs/GoalStatusArray          [8b2b82f13216d0a8ea88bd3af735e619]
             app_manager/AppList                     [8a71ede6bf51909653c7c551f462cb30]
             bond/Status                             [eacc84bf5d65b6777d4c50f463dfb9c8]
             diagnostic_msgs/DiagnosticArray         [3cfbeff055e708a24c3d946a5c8139cd]
             diagnostic_msgs/DiagnosticStatus        [67d15a62edb26e9d52b0f0efa3ef9da7]
             dynamic_reconfigure/Config              [be5ce5fa8101a5199199ac5a9b231457]
             dynamic_reconfigure/ConfigDescription   [5f0f929417f58ac7f30dfdd9e4d40ef2]
             geometry_msgs/PolygonStamped            [c6be8f7dc3bee7fe9e8d296070f53340]
             geometry_msgs/PoseWithCovarianceStamped [953b798c0f514ff060a53a3498ce6246]
             geometry_msgs/Twist                     [9f195f881246fdfa2798d1d3eebca84a]
             nav_msgs/GridCells                      [b9e4f5df6d28e272ebde00a3994830f5]
             nav_msgs/MapMetaData                    [10cfc8a2818024d3248802c00c95f11b]
             nav_msgs/OccupancyGrid                  [3381f2d731d4076ec5c71b0759edbe4e]
             nav_msgs/Odometry                       [cd5e73d190d741a2f92e81eda573aca7]
             rosgraph_msgs/Log                       [acffd30cd6b6de30f120938c17c593fb]
             sensor_msgs/CameraInfo                  [c9a58c1b0b154e0e6da7578cb991d214]
             sensor_msgs/Imu                         [6a62c6daae103f4ff57a132d6f95cec2]
             sensor_msgs/JointState                  [3066dcd76a6cfaef579bd0f34173e9fd]
             sensor_msgs/Joy                         [5a9ea5f83505693b71e785041e67a8bb]
             sensor_msgs/LaserScan                   [90c7ef2dc6895d81024acba2ac42f369]
             tf/tfMessage                            [94810edda583a504dfda3829e70d7eec]
             turtlebot_node/LaptopChargeStatus       [201bffbb268bdae8f8389acae4ae6db2]
             turtlebot_node/TurtlebotSensorState     [d8f8ec7fa031fc9cc88e8319cd08a785]
topics:      /camera/depth/camera_info                                       4 msgs    : sensor_msgs/CameraInfo                 
             /camera/depth/image/compressed/parameter_descriptions           5 msgs    : dynamic_reconfigure/ConfigDescription  
             /camera/depth/image/compressed/parameter_updates                5 msgs    : dynamic_reconfigure/Config             
             /camera/depth/image/theora/parameter_descriptions               5 msgs    : dynamic_reconfigure/ConfigDescription  
             /camera/depth/image/theora/parameter_updates                    5 msgs    : dynamic_reconfigure/Config             
             /camera/depth/image_raw/compressed/parameter_descriptions       5 msgs    : dynamic_reconfigure/ConfigDescription  
             /camera/depth/image_raw/compressed/parameter_updates            5 msgs    : dynamic_reconfigure/Config             
             /camera/depth/image_raw/theora/parameter_descriptions           5 msgs    : dynamic_reconfigure/ConfigDescription  
             /camera/depth/image_raw/theora/parameter_updates                5 msgs    : dynamic_reconfigure/Config             
             /camera/rgb/camera_info                                         5 msgs    : sensor_msgs/CameraInfo                 
             /camera/rgb/image_color/compressed/parameter_descriptions       5 msgs    : dynamic_reconfigure/ConfigDescription  
             /camera/rgb/image_color/compressed/parameter_updates            5 msgs    : dynamic_reconfigure/Config             
             /camera/rgb/image_color/theora/parameter_descriptions           5 msgs    : dynamic_reconfigure/ConfigDescription  
             /camera/rgb/image_color/theora/parameter_updates                5 msgs    : dynamic_reconfigure/Config             
             /camera/rgb/image_mono/compressed/parameter_descriptions        5 msgs    : dynamic_reconfigure/ConfigDescription  
             /camera/rgb/image_mono/compressed/parameter_updates             5 msgs    : dynamic_reconfigure/Config             
             /camera/rgb/image_mono/theora/parameter_descriptions            5 msgs    : dynamic_reconfigure/ConfigDescription  
             /camera/rgb/image_mono/theora/parameter_updates                 5 msgs    : dynamic_reconfigure/Config             
             /camera/rgb/image_raw/compressed/parameter_descriptions         5 msgs    : dynamic_reconfigure/ConfigDescription  
             /camera/rgb/image_raw/compressed/parameter_updates              5 msgs    : dynamic_reconfigure/Config             
             /camera/rgb/image_raw/theora/parameter_descriptions             5 msgs    : dynamic_reconfigure/ConfigDescription  
             /camera/rgb/image_raw/theora/parameter_updates                  5 msgs    : dynamic_reconfigure/Config             
             /cmd_vel                                                     1542 msgs    : geometry_msgs/Twist                    
             /diagnostics                                                 1893 msgs    : diagnostic_msgs/DiagnosticArray         (3 connections)
             /diagnostics_agg                                              288 msgs    : diagnostic_msgs/DiagnosticArray        
             /diagnostics_toplevel_state                                   289 msgs    : diagnostic_msgs/DiagnosticStatus       
             /imu/data                                                    8674 msgs    : sensor_msgs/Imu                        
             /imu/raw                                                     8674 msgs    : sensor_msgs/Imu                        
             /joint_states                                                 283 msgs    : sensor_msgs/JointState                 
             /joy                                                        11138 msgs    : sensor_msgs/Joy                        
             /kinect_laser/parameter_descriptions                            5 msgs    : dynamic_reconfigure/ConfigDescription  
             /kinect_laser/parameter_updates                                 5 msgs    : dynamic_reconfigure/Config             
             /kinect_laser_narrow/parameter_descriptions                     5 msgs    : dynamic_reconfigure/ConfigDescription  
             /kinect_laser_narrow/parameter_updates                          5 msgs    : dynamic_reconfigure/Config             
             /laptop_charge                                                290 msgs    : turtlebot_node/LaptopChargeStatus      
             /map                                                            1 msg     : nav_msgs/OccupancyGrid                 
             /map_metadata                                                   1 msg     : nav_msgs/MapMetaData                   
             /move_base/TrajectoryPlannerROS/parameter_descriptions          1 msg     : dynamic_reconfigure/ConfigDescription  
             /move_base/TrajectoryPlannerROS/parameter_updates               1 msg     : dynamic_reconfigure/Config             
             /move_base/global_costmap/parameter_descriptions                1 msg     : dynamic_reconfigure/ConfigDescription  
             /move_base/global_costmap/parameter_updates                     1 msg     : dynamic_reconfigure/Config             
             /move_base/local_costmap/inflated_obstacles                   243 msgs    : nav_msgs/GridCells                     
             /move_base/local_costmap/obstacles                            243 msgs    : nav_msgs/GridCells                     
             /move_base/local_costmap/parameter_descriptions                 1 msg     : dynamic_reconfigure/ConfigDescription  
             /move_base/local_costmap/parameter_updates                      1 msg     : dynamic_reconfigure/Config             
             /move_base/local_costmap/robot_footprint                      244 msgs    : geometry_msgs/PolygonStamped           
             /move_base/local_costmap/unknown_space                        246 msgs    : nav_msgs/GridCells                     
             /move_base/parameter_descriptions                               1 msg     : dynamic_reconfigure/ConfigDescription  
             /move_base/parameter_updates                                    1 msg     : dynamic_reconfigure/Config             
             /move_base/status                                             245 msgs    : actionlib_msgs/GoalStatusArray         
             /odom                                                        8654 msgs    : nav_msgs/Odometry                      
             /openni_camera/parameter_descriptions                           5 msgs    : dynamic_reconfigure/ConfigDescription  
             /openni_camera/parameter_updates                               13 msgs    : dynamic_reconfigure/Config             
             /openni_manager/bond                                          259 msgs    : bond/Status                             (5 connections)
             /robot_pose_ekf/odom                                         2885 msgs    : geometry_msgs/PoseWithCovarianceStamped
             /rosout                                                        96 msgs    : rosgraph_msgs/Log                       (14 connections)
             /rosout_agg                                                    40 msgs    : rosgraph_msgs/Log                      
             /scan                                                           1 msg     : sensor_msgs/LaserScan                  
             /tf                                                          5591 msgs    : tf/tfMessage                            (3 connections)
             /turtlebot/app_list                                             1 msg     : app_manager/AppList                    
             /turtlebot_node/parameter_descriptions                          1 msg     : dynamic_reconfigure/ConfigDescription  
             /turtlebot_node/parameter_updates                               1 msg     : dynamic_reconfigure/Config             
             /turtlebot_node/sensor_state                                 8677 msgs    : turtlebot_node/TurtlebotSensorState

DIFFERENT BAGFILE

turtlebot@turtlebot:~/rosbagfiles$ rosbag record /odom /odom_combined
[ INFO] [1337795997.639122275]: Subscribing to /odom
[ INFO] [1337795997.647354971]: Subscribing to /odom_combined
[ INFO] [1337795997.654560292]: Recording to 2012-05-23-12-59-57.bag.
rtlebot@turtlebot:~/rosbagfiles$ rosbag info 2012-05-23-13-11-50.bag
path:        2012-05-23-13-11-50.bag
version:     2.0
duration:    4:00s (240s)
start:       May 23 2012 13:11:51.10 (1337796711.10)
end:         May 23 2012 13:15:51.89 (1337796951.89)
size:        5.4 MB
messages:    7224
compression: none [8/8 chunks]
types:       nav_msgs/Odometry [cd5e73d190d741a2f92e81eda573aca7]
topics:      /odom   7224 msgs    : nav_msgs/Odometry

I also do not know how to use the bagfile to build the map offline but will research it. I attempted building a map offline by using:

turtlebot@turtlebot:/$ rosrun gmapping slam_gmapping scan:=base_scan turtlebot@turtlebot:~/rosbagfiles$ rosbag play 2012-05-23-13-11-50.bag (Different Terminal)


Originally posted by TaylorC on ROS Answers with karma: 148 on 2012-05-22

Post score: 2


Original comments

Comment by TaylorC on 2012-05-22:
Also I am using Electric and keeping the speed at 0.3/straight 1/turn

Comment by Eric Perko on 2012-05-22:
Could you post a link to a bagfile that reproduces this error? If you record all of the data and build the map offline, do you have this same problem?

Comment by Lorenz on 2012-05-23:
Make sure that you also include the /odom and /odom_combined topics in your bag. To me it looks like rotation is not handled correctly, Maybe a problem with your gyro.

Comment by Ryan on 2012-05-23:
What are your current calibration values?

Comment by TaylorC on 2012-05-23:
Updated my original post. Eric I do not know how to build the map offline using the data. I assume the command is similar to gmapping_demo?

Comment by TaylorC on 2012-05-23:
Ryan - Current calibration values are

Comment by dornhege on 2012-05-23:
I think this is either too much system load or wrong rotation information in odo and would guess that it is the second. Perform Test 1 here to verify: http://www.ros.org/wiki/navigation/Troubleshooting

Comment by TaylorC on 2012-05-23:
dornhege - Yea it is not matching up, not to mention there is an extreme case of lag.

Comment by Eric Perko on 2012-05-23:
@TaylorC: See this tutorial: http://ros.org/wiki/slam_gmapping/Tutorials/MappingFromLoggedData . As @Lorenz points out, please include any odometry topics in your bagfile in addition to those topics requested by that tutorial.

Comment by TaylorC on 2012-05-23:
Eric - I am getting TF_OLD_DATA warnings that seem to be happening because I stopped the loading halfway through. Is there a way of resetting the time? Also how do I add odometry to my bagfile?

Comment by Eric Perko on 2012-05-23:
@TaylorC: So if you are trying to run gmapping on that bag file you'll want to play it back with "rosbag play --clock", as well as setting up the use_sim_time parameter according to that tutorial. Also, you probably won't be able to restart bag playback without restarting gmapping.

Comment by Eric Perko on 2012-05-23:
@TaylorC: To add odometry to your bagfile, you should also record the /odom and /odom_combined topics (whichever you have present) when driving the robot around collecting data. To record everything (don't do this if you have cameras streaming), just use "rosbag record -a"

Comment by TaylorC on 2012-05-23:
Eric - I edited my original post with my attempt at recording odom data. Is this correct? I used "info" but I don't see much relating to odom other than the fact it was indeed gathering data. I managed to calibrate my bot as I can rotate in place and get fairly accurate overlaps. Will follow up...

Comment by TaylorC on 2012-05-23:
The forums say that ClearPath Robotics use 250 deg/s but I looked at their site and they state it is 150 deg/s . I changed it multiple times and re-ran the calibration. Sadly as soon as it started to work well I ran out of power and it died. I will update tomorrow with my exact settings.

Comment by TaylorC on 2012-05-24:
Currently I have the gyro_measurement_range = 150 deg/s, I have calibrations set at 1.35(gyro) and 1.02(odom). Getting accurate overlays in rviz while rotating (I had to keep the buffer at 1s instead of 30s because of lag but used my pointer as a point of reference). Going to attempt mapping.

Comment by TaylorC on 2012-05-24:
Eric - I am still getting "TF_OLD_DATA ignoring data from the past [...]" I have recorded a new bagfile after setting the use_sim_time to true and used "rosbag play {FILE} --clock" to play it back.

Comment by TaylorC on 2012-05-24:
Running normal "rosrun rviz rviz" and rotating the bot works perfectly. I have ridiculous accuracy in spinning circles and ending up in the same position as before both physically and virtually. The problem is when I start attempting to gmap based on the tutorial it somehow ends up ~180deg off

Comment by TaylorC on 2012-05-24:
All the calibration settings including the gyro_measurement needs to be changed within the turtlebot files correct?

Comment by Ryan on 2012-05-24:
Hi Taylor, we do use 250 deg/s now (there was an EOL issue with our old gyros). If you want to change the settings used on startup with the turtlebot service, you'd want to look at /etc/ros/electric/turtlebot.launch, and you can verify the param setting with "rosparam get". Could you perhaps (con't)

Comment by Ryan on 2012-05-24:
(con't) post a picture or video of how your gmapping progress is going? The fact that the normal rviz is working seems to indicate that all of the calibration is OK.

Comment by TaylorC on 2012-05-25:
Ryan - I actually just got everything working. I ended up finding a website that suggested adding an additional line of code in etc/ros/electric/turtlebot.launch to set the gyro to 250. I then ran the calibration program but was getting varying results so I openned up gmapping and used the (con't)

Comment by TaylorC on 2012-05-25:
(con't) dynamic reconfigure to change calibration values until it was fairly accurate. I mapped out a solid map until the turtlebot got stuck and localization threw the whole map off. I plan on getting a solid map on Tuesday as I am out of battery power and will not be around it this weekend.

Comment by TaylorC on 2012-05-25:\

is the extra line of code I threw into turtlebot.launch if anyone runs into this issue. I am new to this so if this was the correction I needed to make in the beginning I apologize. Changing the value in the gyro.py didn't work.
$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I added this line of code into etc/ros/electric/turtlebot.launch :

"< param name="turtlebot_node/gyro_measurement_range" value="250"/>"

I then calibrated it within Rviz while running the gmapping_demo by using the dynamic reconfigure gui and "eyeballing" it. The code to run the gui (for reference purposes) is (in the workstation terminal):

"rosrun dynamic_reconfigure reconfigure_gui"

*Still no idea why it worked without gmapping and not in gmapping until this change.


Originally posted by TaylorC with karma: 148 on 2012-05-25

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Rydel on 2012-06-06:
How did you manually calibrate the turtlebot in rviz I think I have a similar problem.

Comment by TaylorC on 2012-06-07:
Place a unique object in front of the robot and open up gmapping_demo (follow the gmapping tutorial for turtlebots). Then up the length of time the laser scan holds data (in Rviz > the laser scan > decay time) to 20-30s. Rotate in place 720 degrees and see if the laser scans overlap correctly. ....

Comment by TaylorC on 2012-06-07:
If the overlay doesn't match up then adjust the calibration parameters by using the command "rosrun dynamic_reconfigure reconfigure_gui" in a workstation terminal WHILE Rviz is running. Go into the turtlebot_node and alter the gyro calibrations then exit the gui and try the rotation again.....

Comment by TaylorC on 2012-06-07:
Rinse and repeat until it is accurate. If you are having lag issues then turn off the map, tf, obstacles, etc objects.

Comment by weiin on 2012-06-13:
I believe you have a turtlebot from Clearpath? See http://www.ros.org/wiki/turtlebot_calibration/Tutorials/Calibrate%20Odometry%20and%20Gyro

$\endgroup$

Your Answer

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