Ask Your Question
0

rviz can't find /map

asked 2016-04-18 22:11:26 -0500

littlestar gravatar image

hello everyone, i use gmapping to subscibe a topic called scan which advertises data from laser. when i run "rosrun gmapping slam_gmapping scan:=scan"
and "rosrun rviz rviz " ,but it show like this image description image description

it shows nothing in rviz. i use indigo ,ubuntu14.04

do you have any idea about that? thanks a lot

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-04-19 03:37:52 -0500

updated 2016-04-19 03:40:37 -0500

The error message (the one in the terminal, not in RViz) means that there is no node that publishes the odom frame. Usually it works like this:

  1. robot_state_publisher reads the URDF, subscribes to the joint_state topic and publishes all tfs within the robot, starting from the robot's root tf frame (often called base_link). For gmapping, it's important that there is a tf chain from base_link => ... => laser (assuming that's the frame of the scan messages).
  2. You have a driver node for your robot base that computes odometry information and publishes the result as a nav_msgs/Odometry message. Most robots also have an IMU.
  3. Either robot_pose_ekf or robot_localization subscribes to those messages and publishes a tf odom => base_link.
  4. You run gmapping, amcl or some such, which publishes map => odom.

It looks like (3) is missing. You can check if your tf tree is correct by running:

rosrun rqt_tf_tree rqt_tf_tree
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-04-18 22:11:26 -0500

Seen: 855 times

Last updated: Apr 19 '16