tu-darmstadt-ros-pkg / hector_navigation

hector_navigation provides packages related to navigation of unmanned vehicles in USAR environments.
125 stars 90 forks source link

Timed out waiting for transform from base_link to map to become available before running costmap #28

Closed robbiedood closed 3 years ago

robbiedood commented 3 years ago

Dear hector_navigation friends,

We were confused by below warning message (it shows all the time) when executing roslaunch hector_exploration_node exploration_planner.launch:

[ WARN] [1599873235.583082494]: 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: source_frame base_link does not exist.. canTransform returned after 0.100983 timeout was 0.1.

However, map and base_link are already in tf tree. We could verify it by rosrun tf tf_echo base_link map, and visualize it by rosrun tf view_frames.

So we were wondering how to hook up map and base_link to hector_exploration_node. Maybe need to tell/initialize hector_exploration_node with a setting ?

Hope to hear your expertise.

Best, -- Luke

robbiedood commented 3 years ago

Dear hector_navigation friends,

We were confused by below warning message (it shows all the time) when executing roslaunch hector_exploration_node exploration_planner.launch:

[ WARN] [1599873235.583082494]: 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: source_frame base_link does not exist.. canTransform returned after 0.100983 timeout was 0.1.

However, map and base_link are already in tf tree. We could verify it by rosrun tf tf_echo base_link map, and visualize it by rosrun tf view_frames.

So we were wondering how to hook up map and base_link to hector_exploration_node. Maybe need to tell/initialize hector_exploration_node with a setting ?

Hope to hear your expertise.

Best, -- Luke

Problem solved. Transform listener is required for tf2_ros buffer in order to make canTransform working. Code snippet:

#include <tf2_ros/transform_listener.h>

tf2_ros::TransformListener tfListener(buffer_);