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
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
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:
robot_state_publisher
reads the URDF, subscribes to thejoint_state
topic and publishes all tfs within the robot, starting from the robot's root tf frame (often calledbase_link
). For gmapping, it's important that there is a tf chain frombase_link
=> ... =>laser
(assuming that's the frame of thescan
messages).- 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. - Either
robot_pose_ekf
orrobot_localization
subscribes to those messages and publishes a tfodom
=>base_link
. - 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