Rosanswers logo

I'm using the navigation stack of the p2os package with Gazebo.
I'm launching pioneer3dx.gazebo.launch to simulate the p3dx robot.


  <include file="$(find gazebo_worlds)/launch/office_world.launch"/>

  <include file="$(find p2os_urdf)/launch/upload_pioneer3dx.xml"/>

  <!-- push robot_description to factory and spawn robot in gazebo -->
  <node name="spawn_pioneer" pkg="gazebo" type="spawn_model" 
    args="-z 0.051 
          -param robot_description  
          -model robot_description" 
    respawn="false" output="screen" />

  <!-- Controller Manager -->
  <include file="$(find pr2_controller_manager)/controller_manager.launch" />

  <!-- load controllers -->
  <node name="diffdrive" pkg="gazebo_plugins" type="gazebo_ros_diffdrive" respawn="true" output="screen"/>


Then I'm launching the navigation.launch file:

    <master auto="start"/>
    <!-- Run the map server (you can run it here or in another terminal) -->
    <node name="map_server" pkg="map_server" type="map_server" args="$(find p2os_nav)/simple_office_map.png 0.1" respawn="true"/> 

    <!--- Run AMCL -->
    <include file="$(find p2os_launch)/amcl.launch" />
    <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
        <rosparam file="$(find p2os_launch)/costmap_common_params.yaml" command="load" ns="global_costmap" />
        <rosparam file="$(find p2os_launch)/costmap_common_params.yaml" command="load" ns="local_costmap" />
        <rosparam file="$(find p2os_launch)/local_costmap_params.yaml" command="load" />
        <rosparam file="$(find p2os_launch)/global_costmap_params.yaml" command="load" />
        <rosparam file="$(find p2os_launch)/base_local_planner_params.yaml" command="load" />
        <param name="base_global_planner" type="string" value="NavfnROS" />
        <param name="conservative_reset_dist" type="double" value="3.0" />
        <param name="controller_frequency" type="double" value="15.0" />

but I get this error:

[ WARN] [1358420453.650886449, 1103.836000000]: Waiting on transform from /base_link to /map to become available before running costmap, tf error:

This transformation shouldn't be published by the navigation stack itself? I should create a node which publish it?

Originally posted by camilla on ROS Answers with karma: 255 on 2013-01-17

Post score: 0

Original comments

Comment by georgebrindeiro on 2013-01-17:
Does the Pioneer 3-DX model you use have a laser scanner? Is the tf between the laser scanner and /base_link being published? I have a feeling your problem might be related to amcl not being able to localize your robot because these are missing: http://ros.org/wiki/amcl#Transforms

Comment by camilla on 2013-01-17:
I tried to publish a static tf between odom and map and now i get this warn: [ WARN] [1358422420.491334367, 44.120000000]: The scan observation buffer has not been updated for 32.25 seconds, and it should be updated every 0.20 seconds. so you're right probably there is some problem with the laser

Comment by georgebrindeiro on 2013-01-17:
This might interest you: http://answers.ros.org/question/28171/transform-from-base_link-to-map/

Comment by camilla on 2013-01-17:
Thank you so much george. Can you tell me how can I set properly the scan_topic in amcl?

Comment by georgebrindeiro on 2013-01-17:
What is the topic the simulated Hokuyo is publishing scans to? You have to remap that to the /scan topic in amcl.launch (or somewhere else).

Comment by camilla on 2013-01-17:
Done and the error disappeared!Thx!If you want to post your comment as an answer I'll mark it as right :)

Comment by camilla on 2013-01-18:
I have this problem now: http://answers.ros.org/question/52708/navigation-stack-problem/

Comment by georgebrindeiro on 2013-01-18:
Which part of it was actually the right answer? Was it remapping the /scan topic?

Comment by camilla on 2013-01-20:
yes the fact that problem was in tha amcl file and that i have to remap the scan topic


1 Answer 1


Rosanswers logo

Run rxgraph to see what is going on: the Hokuyo laser needs to publish its scans to the same topic AMCL is listening. If needed, you can remap the /scan topic in amcl.launch. You may be interested in this related question.

Originally posted by georgebrindeiro with karma: 1264 on 2013-01-21

This answer was ACCEPTED on the original site

Post score: 1


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.