ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

turtlebot AMCL - waiting on transform from robot1/base_footprint to map to become available, tf error [closed]

asked 2014-06-19 19:05:28 -0500

evangravelle gravatar image

updated 2014-06-19 22:42:17 -0500

fergs gravatar image

I am trying to run amcl under a namespace (we'll call it robot_name) for a single turtlebot, in order to eventually use amcl on multiple robots. I run titianbot.launch first:

<arg name="robot_name" default="titianbot"/>

  <group ns="$(arg robot_name)">

    <param name="tf_prefix" value="$(arg robot_name)" />

    <include file="$(find turtlebot_bringup)/launch/minimal.launch"/>

    <param name="mobile_base/base_frame" value="$(arg robot_name)/base_footprint" />
    <param name="mobile_base/odom_frame" value="$(arg robot_name)/odom" />


Note the parameter changes to include the namespace prefix. I then run titian_amcl.launch

  <arg name="robot_name" default="titianbot"/>

  <!-- MAP SERVER -->
  <arg name="map_file" default="$(find map_server)/maps/theoffice.yaml" />
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />
  <param name="frame_id" value="/map" />

  <group ns="$(arg robot_name)"> 

    <arg name="tf_prefix" value="$(arg robot_name)" />
    <param name="tf_prefix" value="$(arg tf_prefix)" />

    <include file="$(find turtlebot_bringup)/launch/3dsensor.launch">
      <arg name="depth_registration" value="false" />
      <arg name="scan_topic" value="/$(arg robot_name)/scan" />

    <!-- AMCL NODE -->
    <arg name="initial_pose_x" default="0.0"/> 
    <arg name="initial_pose_y" default="0.0"/> 
    <arg name="initial_pose_a" default="0.0"/>
    <include file="$(find turtlebot_navigation)/launch/includes/amcl.launch.xml">
      <arg name="initial_pose_x" value="$(arg initial_pose_x)"/>
      <arg name="initial_pose_y" value="$(arg initial_pose_y)"/>
      <arg name="initial_pose_a" value="$(arg initial_pose_a)"/>

    <param name="amcl/odom_frame_id" value="$(arg tf_prefix)/odom"/>
    <param name="amcl/base_frame_id" value="$(arg tf_prefix)/base_footprint"/>
    <param name="amcl/global_frame_id" value="/map"/>

    <!-- MOVE_BASE NODE -->
    <include file="$(find turtlebot_navigation)/launch/includes/move_base.launch.xml">
      <arg name="odom_topic" value="/$(arg robot_name)/odom"/>

    <param name="move_base/global_costmap/robot_base_frame" value="/$(arg robot_name)/base_footprint" />
    <param name="move_base/local_costmap/robot_base_frame" value="/$(arg robot_name)/base_footprint" /> 


Note the parameter changes to include the tf_prefix namespace. I get the following error repeated every 5 seconds forever:

 [ WARN] [1403220638.626315765]: Waiting on transform from titianbot/base_footprint to map to become available before running costmap, tf error:

You can see that I attempt to change the relevant parameters to include this "robot_name" prefix. When amcl_demo is run with no namespace, amcl node publishes on 6 topics, and the map-->odom transform is published, however in this version with the namespace, only 4 topics are published, and the transform from map-->robot_name/odom is not published. So it seems like the amcl node isn't fully initializing, though I don't know why.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by 130s
close date 2015-07-11 13:14:30.107584


Hi evangravelle, what does your tf tree currently look like? (rosrun tf view_frames)

al-dev gravatar image al-dev  ( 2014-06-20 03:20:08 -0500 )edit

frames.pdf The missing link is from map to titianbot/odom

evangravelle gravatar image evangravelle  ( 2014-06-20 14:29:03 -0500 )edit

Have you looked at the "amcl/odom_frame_id" is not explicitly specified for each robot, he only specifies the tf_prefix inside the <group> tag.

al-dev gravatar image al-dev  ( 2014-06-20 21:33:12 -0500 )edit

did you solve your problem ? I'm struggling on this for a week without finding a way to make it work

marguedas gravatar image marguedas  ( 2015-04-30 10:10:44 -0500 )edit

Any solutions guys?

Usman Arif gravatar image Usman Arif  ( 2015-11-27 13:01:37 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-05-29 01:57:32 -0500

snowburnerx gravatar image

I am submitting this as a comment and not an answer because the latest update to indigo (date 5-26-15) seems to have changed the 3D sensor launch config. It seems that the tf frame params set for the 3D sensor, mobile base and the NavPlanner are not resolving correctly.

edit flag offensive delete link more

Question Tools



Asked: 2014-06-19 19:05:28 -0500

Seen: 2,728 times

Last updated: Jun 19 '14