File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 2020
2121#include " nav2_core/exceptions.hpp"
2222#include " nav_2d_utils/conversions.hpp"
23+ #include " nav_2d_utils/tf_help.hpp"
2324#include " nav2_util/node_utils.hpp"
2425#include " nav2_util/geometry_utils.hpp"
2526#include " nav2_controller/nav2_controller.hpp"
@@ -328,6 +329,11 @@ void ControllerServer::setPlannerPath(const nav_msgs::msg::Path & path)
328329 controllers_[current_controller_]->setPlan (path);
329330
330331 auto end_pose = path.poses .back ();
332+ end_pose.header .frame_id = path.header .frame_id ;
333+ rclcpp::Duration tolerance (costmap_ros_->getTransformTolerance () * 1e9 );
334+ nav_2d_utils::transformPose (
335+ costmap_ros_->getTfBuffer (), costmap_ros_->getGlobalFrameID (),
336+ end_pose, end_pose, tolerance);
331337 goal_checker_->reset ();
332338
333339 RCLCPP_DEBUG (
You can’t perform that action at this time.
0 commit comments