turtlebot AMCL - waiting on transform from robot1/base_footprint to map to become available, tf error [closed]
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 "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.
Hi evangravelle, what does your tf tree currently look like? (rosrun tf view_frames)
frames.pdf The missing link is from map to titianbot/odom
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 <group> tag.
did you solve your problem ? I'm struggling on this for a week without finding a way to make it work
Any solutions guys?