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

P2os navigation stack

asked 2013-01-16 23:04:17 -0600

camilla gravatar image

updated 2013-01-21 03:29:38 -0600

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?

edit retag flag offensive close merge delete


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:

georgebrindeiro gravatar image georgebrindeiro  ( 2013-01-16 23:19:33 -0600 )edit

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

camilla gravatar image camilla  ( 2013-01-16 23:34:49 -0600 )edit

Thank you so much george. Can you tell me how can I set properly the scan_topic in amcl?

camilla gravatar image camilla  ( 2013-01-17 03:00:11 -0600 )edit

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).

georgebrindeiro gravatar image georgebrindeiro  ( 2013-01-17 05:55:25 -0600 )edit

Done and the error disappeared!Thx!If you want to post your comment as an answer I'll mark it as right :)

camilla gravatar image camilla  ( 2013-01-17 22:21:35 -0600 )edit
camilla gravatar image camilla  ( 2013-01-18 00:19:40 -0600 )edit

Which part of it was actually the right answer? Was it remapping the /scan topic?

georgebrindeiro gravatar image georgebrindeiro  ( 2013-01-18 05:43:01 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-01-21 03:27:01 -0600

updated 2013-01-21 03:27:34 -0600

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.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2013-01-16 23:04:17 -0600

Seen: 720 times

Last updated: Jan 21 '13