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

Revision history [back]

click to hide/show revision 1
initial version

The RobotModel display in rviz moves based on input from /tf messages. You need to check your tf tree and the fixed frame in rviz. The default fixed frame in rviz is "map", which should work fine if it matches the map_frame you gave to gmapping (default is also "map", so should be OK). If you've set it to "base_link" the robot won't move. If you set it to "odom" (or whatever you are calling the base frame for integrating your visual odometry data), you should see the robot move with the pose estimated only by vo.

There are several tools to investigate tf problems:

rosrun tf tf_monitor

The RobotModel display in rviz moves based on input from /tf messages. You need to check your tf tree and the fixed frame "fixed frame" in rviz. The default fixed frame in rviz is "map", which should work fine if it matches the map_frame you gave to gmapping (default is also "map", so should be OK). If you've set it the "fixed frame" in rviz to "base_link" the robot won't move. If you set it to "odom" (or whatever you are calling the base frame for integrating your visual odometry data), you should see the robot move with the pose estimated only by vo.

There are several tools to investigate tf problems:

tf_monitor runs in a shell and displays all the tf transforms coming in:

rosrun tf tf_monitor

tf_monitor

rqt_tf_tree is an rqt plugin which shows a graphical version of the tf tree:

rosrun rqt_tf_tree rqt_tf_tree

Then there's tf_echo, which just continuously spits out a single transform between two requested frames:

rosrun tf tf_echo map base_link

Whichever method you use, you need to look for a connection in the tf tree between "map" and "base_link", or whatever you are calling your map frame and your robot base frame.

gmapping by default publishes a transform between frame "odom" and frame "map", and listens to the transform from "odom" to "base_link". If you are using a different tf frame name for any of those, you'll need to tell gmapping by setting rosparams for it.

The RobotModel display in rviz moves based on input from /tf messages. You need to check your tf tree and the "fixed frame" in rviz. The default fixed frame in rviz is "map", which should work fine if it matches the map_frame you gave to gmapping (default is also "map", so should be OK). If you've set the "fixed frame" in rviz to "base_link" the robot won't move. If you set it to "odom" (or whatever you are calling the base frame for integrating your visual odometry data), you should see the robot move with the pose estimated only by vo.

There are several tools to investigate tf problems:

tf_monitor tf_monitor runs in a shell and displays all the tf transforms coming in:

rosrun tf tf_monitor

rqt_tf_tree is an rqt plugin which shows a graphical version of the tf tree:

rosrun rqt_tf_tree rqt_tf_tree

Then there's tf_echo, tf_echo, which just continuously spits out a single transform between two requested frames:

rosrun tf tf_echo map base_link

Whichever method you use, you need to look for a connection in the get to a point where the tf tree between includes both "map" and "base_link", or "base_link" (or whatever you are calling your map frame and your robot base frame.frame) in a single tree.

gmapping by default publishes a transform between frame "odom" and frame "map", and listens to the transform from "odom" to "base_link". If you are using a different tf frame name for any of those, you'll need to tell gmapping by setting rosparams for it.