Robotics StackExchange | Archived questions

rviz can't find /map

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

Asked by littlestar on 2016-04-18 22:11:26 UTC

Comments

Answers

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

Asked by Martin Günther on 2016-04-19 03:37:52 UTC

Comments