turtlebot AMCL - waiting on transform from robot1/base_footprint to map to become available, tf error
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:
<launch>
<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" />
</group>
</launch>
Note the parameter changes to include the namespace prefix. I then run titian_amcl.launch
<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" />
</include>
<!-- 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)"/>
</include>
<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"/>
</include>
<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" />
</group>
</launch>
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 "robotname" prefix. When amcldemo 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.
Asked by evangravelle on 2014-06-19 19:05:28 UTC
Answers
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.
Asked by snowburnerx on 2015-05-29 01:57:32 UTC
Comments
Hi evangravelle, what does your tf tree currently look like? (rosrun tf view_frames)
Asked by al-dev on 2014-06-20 03:20:08 UTC
frames.pdf
The missing link is from map to titianbot/odom
Asked by evangravelle on 2014-06-20 14:29:03 UTC
Have you looked at http://answers.ros.org/question/41433/multiple-robots-simulation-and-navigation/? the "amcl/odom_frame_id" is not explicitly specified for each robot, he only specifies the tf_prefix inside the tag.
Asked by al-dev on 2014-06-20 21:33:12 UTC
did you solve your problem ? I'm struggling on this for a week without finding a way to make it work
Asked by marguedas on 2015-04-30 10:10:44 UTC
Any solutions guys?
Asked by Usman Arif on 2015-11-27 14:01:37 UTC