29using ::cl_nav2z::odom_tracker::OdomTracker;
32using namespace std::chrono_literals;
36 listener = std::make_shared<tf2_ros::Buffer>(this->
getNode()->get_clock());
41 nav_msgs::msg::Path forwardpath = odomTracker->getPath();
44 odomTracker->setWorkingMode(WorkingMode::CLEAR_PATH);
52 rclcpp::sleep_for(1
s);
56 if (forwardpath.poses.size() > 0)
58 goal.pose = forwardpath.poses.front();
59 goal.pose.header.stamp =
getNode()->now();
60 plannerSwitcher->setUndoPathBackwardPlanner();
67 RCLCPP_INFO_STREAM(
getLogger(),
"[" <<
getName() <<
"] Exiting: undo navigation ");
73 getName() <<
" - Exiting: undo navigation successful, popping odom tracker path");
cl_nav2z::ClNav2Z * moveBaseClient_
rclcpp_action::ResultCode navigationResult_
std::shared_ptr< tf2_ros::Buffer > listener
void setGoalCheckerId(std::string goal_checker_id)
void popPath(int pathCount=1, bool keepPreviousPath=false)
std::string getName() const
virtual rclcpp::Logger getLogger()
virtual rclcpp::Node::SharedPtr getNode()
TComponent * getComponent()
std::shared_future< typename GoalHandle::SharedPtr > sendGoal(Goal &goal)
typename ActionClient::Goal Goal