ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

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

asked 2016-04-14 20:04:02 -0600

littlestar gravatar image

updated 2016-04-18 22:37:57 -0600

hello , i buy a sick_tim561 which is a laser. when i download the sick_tim 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 sick_tim sick_tim551_2050001.launch image description rosrun gmapping slam_gmapping 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

edit retag flag offensive close merge delete


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?

ahendrix gravatar image ahendrix  ( 2016-04-14 22:26:41 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-04-18 13:45:46 -0600

updated 2016-04-19 07:26:39 -0600

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.

edit flag offensive delete link more


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

littlestar gravatar image littlestar  ( 2016-04-18 22:22:30 -0600 )edit

Question Tools



Asked: 2016-04-14 20:04:02 -0600

Seen: 504 times

Last updated: Apr 19 '16