ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The problem of getting the map -> odom
transformation is essentially the robot localization problem. So, if you have a map of the environment, you can use a ROS localization package like robot_pose_ekf or AMCL depending on the type of map and the sensor available.
However, if what you need is a simple pose for the robot, you can use the libgazebo_ros_p3d.so
gazebo plugin as used here.
It will publish a nav_message/Odometry
message to the specified topic. This message essentially is the map -> base_link
transformation. You can manipulate this information to publish a /tf
yourself. Since ROS
doesn't allow multiple parent frames, you can't simply publish a /tf
using message_to_tf. You will need to publish map -> odom
by subtracting odom -> base_link
from map -> base_link
. A clear example is given in the AMCL implementation.
2 | No.2 Revision |
The problem of getting the map -> odom
transformation is essentially the robot localization problem. So, if you have a map of the environment, you can use a ROS localization package like robot_pose_ekf or AMCL depending on the type of map and the sensor sensors available.
However, if what you need is a simple pose for the robot, you can use the libgazebo_ros_p3d.so
gazebo plugin as used here.
It will publish a nav_message/Odometry
message to the specified topic. This message essentially is the map -> base_link
transformation. You can manipulate this information to publish a /tf
yourself. Since ROS
doesn't allow multiple parent frames, you can't simply publish a /tf
using message_to_tf. You will need to publish map -> odom
by subtracting odom -> base_link
from map -> base_link
. A clear example is given in the AMCL implementation.