ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

XV-11 gmapping map_server issues

asked 2012-03-03 09:31:46 -0600

Autrywk gravatar image

updated 2014-01-28 17:11:34 -0600

ngrennan gravatar image

Below are the commands that I have previously been attempting to use to initialize gmapping with the Neato XV-11 lidar. The laser data is published to "/scan" . The issue I have been stumped by has been "[INFO] [1330801449.815455981]: Waiting for the map" So a map is never created. /odom is not on rxgraph as it is with many other gmapping tutorials so it may have something to do with that missing node. Also "rosbag record -O mylaserdata /scan /tf" tells me that no clock is received. I would like to know how to successfully use my XV-11 Lidar with gmapping for SLAM.

Build a map

cd ros .

rosmake gmapping


//////////////////////////////////////////////// New Tab ////////////////////////////////////////////////

rosmake --rosdep-install xv_11_laser_driver

//////////////////////////////////////////////// Plug in USB to XV-11 Lidar ////////////////////////////////////////////////

rosrun xv_11_laser_driver neato_laser_publisher _port:=/dev/ttyUSB0

//////////////////////////////////////////////// New Tab ////////////////////////////////////////////////

rosrun tf static_transform_publisher 0 0 0 0 0 0 base_link scan 100

//////////////////////////////////////////////// New Tab ////////////////////////////////////////////////

rosparam set use_sim_time true rosrun gmapping slam_gmapping scan:=scan

Save map (New Tab)

rosrun map_server map_saver -f my_lab_map

(To check if data is being published: rostopic echo --noarr -n 1 map)

Create own bag (New Tab)

rosbag record -O mylaserdata /scan /tf

(Ctrl+C to end capture)

rosbag play mylaserdata.bag

Watch mapping (New Tab)

rosmake rviz rosrun rviz rviz /static_map:=/dynamic_map


Ok well I installed the scan_tools stack and proceeded to try the demo and I got this rxconsole error: "Node: /laser_scan_matcher_node Time: 1282836372.076217409 Severity: Warn Location: /tmp/buildd/ros-electric-scan-tools-1.1.0/debian/ros-electric-scan-tools/opt/ros/electric/stacks/scan_tools/laser_scan_matcher/src/laser_scan_matcher.cpp:LaserScanMatcher::getBaseToLaserTf:620 Published Topics: /rosout, /tf, /pose2D

ScanMatcher: Could not get initial laser transform(Unable to lookup transform, cache is empty, when looking up transform from frame [/laser] to frame [/base_link])." So I changed /laser to /scan and now I receive "[ WARN] [1330810596.512410015, 1282836375.091389701]: ScanMatcher: Skipping scan Frame /base_link exists with parent NO_PARENT.)"

I'm new to ROS so I'm absolutely sure I'm doing something wrong and it's not the laser_scan_matcher.

edit retag flag offensive close merge delete



Make sure you publish a static tf from base_link to laser, and set the publish_tf parameter of scan_matcher to true. Also please review the wiki pages of laser_scan_matcher and scan_gmapping, everything is documented there. Laser_scan_macther has an example launch file with bag data you can examine.

Ivan Dryanovski gravatar image Ivan Dryanovski  ( 2012-03-03 10:50:32 -0600 )edit

The topic of the laser data should be called /scan. The frame of the laser data should be called /laser.

Ivan Dryanovski gravatar image Ivan Dryanovski  ( 2012-03-03 10:51:25 -0600 )edit

The default frame_id for the XV11 is 'neato_laser', not 'laser', so you'll have to make sure to publish the correct tf's.

Eric Perko gravatar image Eric Perko  ( 2012-03-03 11:14:45 -0600 )edit

When I initialize the tf as: "rosrun tf static_transform_publisher 0 0 0 0 0 0 base_link neato_laser 100" I receive the same amount of errors. [ WARN] [1330815201.923587244, 1282836389.428243224]: TF_OLD_DATA ignoring data from the past for frame /base_link at time 1.28284e+09 according to authority

Autrywk gravatar image Autrywk  ( 2012-03-03 11:55:10 -0600 )edit


Autrywk gravatar image Autrywk  ( 2012-03-03 11:55:17 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-03-03 09:56:47 -0600

updated 2012-03-03 09:57:49 -0600

slam_gmapping requires a source of odometry, in the form of a tf pusblished from odom to base_link

Either of these can resolve your issue. In conjunction to slam_gmapping:

  • Run robot_pose_ekf, in the case that you have an odometric sensors such as wheel encoders, and a driver for them that can publish an Odom message
  • Run laser_scan_matcher if you have no odometric sensors
edit flag offensive delete link more


Thank you for such a quick response. I will run laser_scan_matcher and post my results shortly.

Autrywk gravatar image Autrywk  ( 2012-03-03 10:00:13 -0600 )edit

I've edited my initial post regarding the demo.launch

Autrywk gravatar image Autrywk  ( 2012-03-03 10:41:08 -0600 )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


Asked: 2012-03-03 09:31:46 -0600

Seen: 1,249 times

Last updated: Mar 03 '12