Problem with Navigation - Waiting on transform from base_footprint to map [closed]

asked 2013-12-12 23:41:29 -0500

Stefano Primatesta gravatar image

updated 2014-01-28 17:05:51 -0500

ngrennan gravatar image

I'm following this tutorial:

answers.ros.org/question/41433/multiple-robots-simulation-and-navigation/

I want to simulate 2 turtlebot together. The simulation is ok, but I have a problem with navigation. When I run my launch file I see this:

[ WARN] [1386932948.877571799, 677.970000000]: Waiting on transform from base_footprint to map to become available before running costmap, tf error:

I've read other questions but I can not solve the problem.

This is my multiple_navigation.launch

<launch>
<param name="/use_sim_time" value="true"/>

<!-- Run the map server -->
<node name="map_server" pkg="map_server" type="map_server" args="$(find tesi_gazebo)/maps/playground.yaml" >
<param name="frame_id" value="/map" />
</node>

<group ns="robot1">
<param name="tf_prefix" value="robot1_tf" />
<param name="amcl/initial_pose_x" value="1" />
<param name="amcl/initial_pose_y" value="1" />
<include file="$(find tesi_gazebo)/launch/move_base.launch" />
</group>

<group ns="robot2">
<param name="tf_prefix" value="robot2_tf" />
<param name="amcl/initial_pose_x" value="-1" />
<param name="amcl/initial_pose_y" value="1" />
<include file="$(find tesi_gazebo)/launch/move_base.launch" />
</group>

</launch>

and this is move.base.launch

<launch>    
<!--- Run AMCL -->
<include file="$(find turtlebot_navigation)/launch/includes/amcl.launch.xml" />

<!-- Define your move_base node -->
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<rosparam file="$(find tesi_gazebo)/param/costmap_common_params.yaml" command="load" ns="global_costmap"/>
<rosparam file="$(find tesi_gazebo)/param/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find tesi_gazebo)/param/local_costmap_params.yaml"  command="load" />
<rosparam file="$(find tesi_gazebo)/param/global_costmap_params.yaml" command="load" />
<rosparam file="$(find tesi_gazebo)/param/base_local_planner_params.yaml" command="load" />

<remap from="map" to="/map" />
</node>
</launch>

This is amcl.launch.xml

<launch>
<arg name="use_map_topic"  default="false"/>
<arg name="scan_topic"     default="scan"/>
<arg name="initial_pose_x" default="0.0"/>
<arg name="initial_pose_y" default="0.0"/>
<arg name="initial_pose_a" default="0.0"/>

<node pkg="amcl" type="amcl" name="amcl">
<param name="use_map_topic"             value="$(arg use_map_topic)"/>
<!-- Publish scans from best pose at a max of 10 Hz -->
<param name="odom_model_type"           value="diff"/>
<param name="odom_alpha5"               value="0.1"/>
<param name="gui_publish_rate"          value="10.0"/>
<param name="laser_max_beams"             value="60"/>
<param name="laser_max_range"           value="12.0"/>
<param name="min_particles"             value="500"/>
<param name="max_particles"             value="2000"/>
<param name="kld_err"                   value="0.05"/>
<param name="kld_z"                     value="0.99"/>
<param name="odom_alpha1"               value="0.2"/>
<param name="odom_alpha2"               value="0.2"/>
<!-- translation std dev, m -->
<param name="odom_alpha3"               value="0.2"/>
<param name="odom_alpha4"               value="0.2"/>
<param name="laser_z_hit"               value="0.5"/>
<param name="laser_z_short"             value="0.05"/>
<param name="laser_z_max"               value="0.05"/>
<param name="laser_z_rand"              value="0.5"/>
<param name="laser_sigma_hit"           value="0.2"/>
<param name="laser_lambda_short"        value="0.1"/>
<param name="laser_model_type"          value="likelihood_field"/>
<!-- <param name="laser_model_type" value="beam"/> -->
<param name="laser_likelihood_max_dist" value="2.0"/>
<param name="update_min_d"              value="0.25"/>
<param name="update_min_a"              value="0.2"/>
<param name="odom_frame_id"             value="odom"/>
<param name="base_frame_id"             value="base_footprint"/>
<param name="resample_interval"         value="1"/>
<!-- Increase tolerance because the computer can get quite busy -->
<param name="transform_tolerance"       value="1.0"/>
<param name="recovery_alpha_slow"       value="0.0"/>
<param name="recovery_alpha_fast"       value="0.0"/>
<param name="initial_pose_x"            value="$(arg initial_pose_x)"/>
<param name ...
(more)
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:11:26.574622

Comments

can you please post the information about your tf tree you get via tf view_frames ?

pkohout gravatar imagepkohout ( 2013-12-15 20:49:23 -0500 )edit

I see this graph: https://db.tt/TX6LT4ad There isn't a /map node, but I don't know why!

Stefano Primatesta gravatar imageStefano Primatesta ( 2013-12-15 22:14:39 -0500 )edit

Since AMCL should publish the TF transformation between Map and odom, i am pretty sure that the error is somewhere in your amcl configuration. Have you checked that you use the right frame names in amcl ? You simulate two robots, but in the graph i just see the tree from one robot ?

pkohout gravatar imagepkohout ( 2013-12-16 03:20:16 -0500 )edit

Yes, in the graph I see only one robot. This is another problem! I follow this tutorial (answers.ros.org/question/41433/multiple-robots-simulation-and-navigation/), but I never noticed the problem.

Stefano Primatesta gravatar imageStefano Primatesta ( 2013-12-16 09:50:18 -0500 )edit

Ok, where do you spawn the robots ? I do not see the "spawn_model" form gazebo. And please poste the file where you launch gazebo

pkohout gravatar imagepkohout ( 2013-12-17 19:33:15 -0500 )edit

You can see my launch file for the simulation here (http://answers.ros.org/question/111256/problem-with-multiple-turtlebot-simulation/). Yesterday I posted another question for the problem of tf tree.

Stefano Primatesta gravatar imageStefano Primatesta ( 2013-12-17 21:14:38 -0500 )edit