Warning: Timed out waiting for transform from base_link to map to become available before running costmap, tf error: canTransform: target_frame map does not exist
I am trying to set up my navigation stack according to navigation setup tutorial when I encounter the following error:
[ WARN] [1572268788.927613562]: Timed out waiting for transform from base_link to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.101027 timeout was 0.1.
My launch files are
<launch>
<!-- Run ROSARIA (Sensors and odometry) -->
<node pkg="rosaria" type="RosAria" name="rosaria" output="screen">
<param name="publish_aria_lasers" value="true"/>
</node>
<!-- Set up transform configuration (URDF, joint_state_publisher and robot_state_publisher -->
<param name="robot_description" textfile="$(find robot_state_publisher)/amr-ros-config/description/urdf/pioneer-lx.urdf"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
</launch>
and
<launch>
<master auto="start"/>
<!-- Run the map server -->
<arg name="map_file" default="$(find map_server)/maps/willow.yaml"/>
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)"/>
<!--- Run AMCL -->
<include file="$(find amcl)/examples/amcl_omni.launch" />
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<rosparam file="$(find cyborg_2dnav)/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find cyborg_2dnav)/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find cyborg_2dnav)/local_costmap_params.yaml" command="load" />
<rosparam file="$(find cyborg_2dnav)/global_costmap_params.yaml" command="load" />
<rosparam file="$(find cyborg_2dnav)/base_local_planner_params.yaml" command="load" />
</node>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find robot_state_publisher)amr-ros-config/description/urdf/display_urdf.rviz"/>
</launch>
global_costmap_params.yaml:
global_costmap:
global_frame: /map
robot_base_frame: base_link
update_frequency: 5.0
static_map: false
local_costmap_params.yaml:
local_costmap:
global_frame: odom
robot_base_frame: base_link
update_frequency: 5.0
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 6.0
height: 6.0
resolution: 0.05
This rqt_graph shows my current nodes and topics.
I am not sure how to fix this and would appreciate any help!
can you please post the output from:
Here is the transform tree. From the error message and the tree it seems to me that there is no transform from base_link to the map, however I thought amcl published this. Looking at the rqt_graph I can see that amcl is not subscribing to the /map topic published by the map_server. I guess this might be the problem?
yup, your map frame does not exist atm and is not part of the tf tree so the lookup for the transform between base_link to map fails
check the amcl documentation. Under Published Topics you will find this:
Hmm.. I still encounter the same issue when mapping the odom_frame_id to map like this:
I still have the same error message and the same tf tree.
I got it working now when implementing slam_gmapping!
can you please explain how did you implemented it ?