Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: source_frame base_footprint does not exist.
Hello, I am trying to launch a navigation stack on multiple robots, so they can navigate autonomously in gazebo. I have cloned the following turtlebot3 githubs to access models, descriptions, costmaps, and how to set up the launch files.
https://github.com/ROBOTIS-GIT/turtlebot3/tree/melodic-devel
https://github.com/ROBOTIS-GIT/turtlebot3_simulations/tree/melodic-devel
https://github.com/ROBOTIS-GIT/turtlebot3_msgs/tree/melodic-devel
My problem is that when I add namespaces for the robots, the following error occurs.
Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: source_frame base_footprint does not exist.
I have placed everything in a single launch file to make it easier to troubleshoot:
<launch>
<!-- Model and namespace-->
<arg name="model" default="burger"/> <!-- Model, change for process/products -->
<arg name="robot" default="bot"/> <!-- Name space, change for each robot -->
<!-- Visualization and map location -->
<arg name="map_file" default="$(find gazebo_worlds)/maps/factory_map.yaml"/>
<arg name="open_rviz" default="true"/>
<arg name="open_gazebo" default="true"/>
<!-- Positions -->
<arg name="x_pos" default=" 0.0"/>
<arg name="y_pos" default=" 0.0"/>
<arg name="z_pos" default=" 0.0"/>
<arg name="yaw" default=" 1.57"/>
<!-- Robot group -->
<group ns = "$(arg robot)">
<param name="robot_description" command="$(find xacro)/xacro --inorder $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen">
<param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg robot)" />
</node>
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg robot) -x $(arg x_pos) -y $(arg y_pos) -z $(arg z_pos) -Y $(arg yaw) -param robot_description" />
</group>
<!-- Map server -->
<node pkg="map_server" name="map_server" type="map_server" args="$(arg map_file)" >
<param name="frame_id" value="map"/>
</node>
<!-- Tf transformer -->
<node pkg="tf" type="static_transform_publisher" name="world_to_$(arg robot)_tf_broadcaster" args="0 0 0 0 0 0 /map /$(arg robot)/map 100"/>
<!-- AMCL -->
<node pkg="amcl" type="amcl" name="$(arg robot)_amcl">
<param name="min_particles" value="500"/>
<param name="max_particles" value="3000"/>
<param name="kld_err" value="0.02"/>
<param name="update_min_d" value="0.20"/>
<param name="update_min_a" value="0.20"/>
<param name="resample_interval" value="1"/>
<param name="transform_tolerance" value="0.5"/>
<param name="recovery_alpha_slow" value="0.00"/>
<param name="recovery_alpha_fast" value="0.00"/>
<param name="initial_pose_x" value="$(arg x_pos)"/>
<param name="initial_pose_y" value="$(arg y_pos)"/>
<param name="initial_pose_a" value="$(arg yaw)"/>
<param name="gui_publish_rate" value="50.0"/>
<remap from="scan" to="$(arg robot)/scan"/>
<param name="laser_max_range" value="3.5"/>
<param name="laser_max_beams" value="180"/>
<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 ...