Robotics StackExchange | Archived questions

use data from LASER:can not make a map in rviz

hello , i buy a sicktim561 which is a laser. when i download the sicktim package from viki, i change the ip in the package and success to connet the sensors. i have used "rostopic echo " to make sure that the /scan and /tf output datas. but i don't kown the datas is correct or not. when i use the gmapping package to subscribe to the topic /scan ,i use rviz to add /map into the map in rviz. but it shows error like this !

roslaunch sicktim sicktim5512050001.launch image description rosrun gmapping slamgmapping scan:=base_scan rosrun rviz rviz image description image description

rosrun tf view_frames show: image description

do you have any idea about the error?thanks a lot

Asked by littlestar on 2016-04-14 20:04:02 UTC

Comments

It looks like you don't have your transforms set up correctly, so gmapping doesn't know where your laser is mounted on your robot. Have you set up a URDF or static transforms? Do you have a robot with wheels and wheel odometry?

Asked by ahendrix on 2016-04-14 22:26:41 UTC

Answers

Please run rosrun tf view_frames and post the image here. I suspect that you have a a /base_link-->/laser frame but not an /odom-->/base_link frame. That transform is generally provided by a localization node like robot_localization or ropot_pose_ekf. Gmapping provides a transform from /world-->/odom, but needs the other links to complete path from /world-->/laser.

[EDIT] As you can see in the view_frames image, there is a link from map-->odom provided by slam_gmapping. You need to get a link from odom-->laser_mount_link. This is normally provided by the robot using the inverse kinematic equations, or sometimes using a localization node to combine odometry and IMU data.

Asked by Icehawk101 on 2016-04-18 13:45:46 UTC

Comments

i have posted the image now. i don't have any idea about what you say since i am a rookie. can you tell me more about that? thanks

Asked by littlestar on 2016-04-18 22:22:30 UTC