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

Your issue arises from not having a localisation in the map frame. You are localising yourself in the odom frame but not in the map frame. The transform should be as per ROS REP 105. To solve this since you cannot use amcl to localise in the map frame, you should run the map in the odom frame. From default, you will be loading the map with map server of which has the parameter frame_id which specifies what frame to load the map in. Use case will be:

command line

rosrun map_server map_server mymap.yaml frame_id:=odom

launch

<launch>

  <arg name="map_file" default="$(find [package where your map is])/mymap.yaml"/>

  <!-- Run the map server -->
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" >
        <param name="frame_id" value="odom"/>
 </node>

</launch>