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

Slam mapping with Rviz, realsense and a turtlebot

asked 2017-09-07 00:53:13 -0500

cylrax gravatar image

Lately, I started a hobby project of my own. This involves 2d SLAM gmapping using a realsense 3d camera, a kobuki base (turtlebot) and Rviz for subsequent visualisation. I'm starting it up by the following sequence of commands :

roscore
roslaunch turtlebot_bringup minimal.launch
roslaunch realsense_camera r200_nodelet_default.launch
rosrun depthtimage_to_laserscan depthtimage_to_laserscan image:=/camera/depth/image_raw
rosrun tf static_transform_publisher 0 0 0 0 0 0 1 map camera_link 10
rosrun gmapping slam_gmapping scan:=scan _odom_frame:=odom
rosrun rviz rviz

and consequently added the required topics for visualisation at the left side. (like laserscan, and the like)

But the problem is, though the 2d map is being generated, the map is getting overlapped. Elaborating further, through teleop, if we rotate the bot by 180 degrees, (basically the camera is rear-facing now); in the map, the newly scanned area (which is the one opposite to the previously scanned area) is not being shown in the Rviz to be directly opposite to the previously scanned area(before rotation), but is simply overlaying this on TOP of the previously scanned area (before rotating). The same goes for when we move the bot around as well.

Also, the Costmap section in the Rviz is showing := "/map not detected". Is it something that normally happens during scanning and gets rectified during navigation, or is it because of something that I did wrong? (Also, the bot is flickering on Rviz, upon running static transform, is it a normal thing? or should I fine-tune the parameters further?) I'm relatively new to ROS and the ideas surrounding it, so any advice would be greatly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-07-14 18:56:25 -0500

srnand gravatar image

updated 2018-07-15 02:18:57 -0500

jayess gravatar image

I think it is because, the base_link is not connected with the camera_link. Your base_link moves when tele operating the robot but the camera_link stays there. You have to statically transform base_link to camera_link to tf.

rosrun tf static_transform_publisher 0 0 0 0 0 0 1 base_link camera_link 10
edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2017-09-07 00:53:13 -0500

Seen: 1,887 times

Last updated: Jul 15 '18