How to create map with gmapping
Hi,
I am using irobot create2 and kinect2 to create map with gmapping, fake laser scan can be created correctly,but i met a problem now when creating map, this is what i have done:
(1) start irobot driver
roslaunch turtlebot_bringup minimal.launch
(2) start kinect2 driver and depthimage_to_laserscan is also included correctly
roslaunch kinect2_bridge kinect2_bridge.launch publish_tf:=true
(3) run gmapping
rosparam ser use_sim_time true
rosrun gmapping slam_gmapping scan:=scan
(4) start rviz
rosrun rviz rviz
It only shows the map of first-sight view, when i move my kinect2, the map doesn't change and laser scan is moving. It outputs like:
[ WARN] : Failed to compute laser pose, aborting initialization (Lookup would require extrapolation into the future. Requested time 1443169289.383570176 but the latest data is at time 1443169289.318866014, when looking up transform from frame [map] to frame [base_link]) -maxUrange 9.99 -maxUrange 9.99 -sigma 0.05 -kernelSize 1 -lstep 0.05 -lobsGain 3 -astep 0.05 -srr 0.1 -srt 0.2 -str 0.1 -stt 0.2 -linearUpdate 1 -angularUpdate 0.5 -resampleThreshold 0.5 -xmin -100 -xmax 100 -ymin -100 -ymax 100 -delta 0.05 -particles 30 update frame 0 update ld=0 ad=0 Laser Pose= 0 0 -0.00514984 m_count 0 Registering First Scan
Can you post your TF tree?
Hi, I'm having the same exact issue with a similar configuration. I'm using a Kinect1 with the depth2laser node to convert it in laser scan. The only difference is that I don't get any warning, it seems like gmapping is working properly. Did you find a solution?
Yes, my TF tree is not correct at first, you should check your tf tree, maybe this can help.