#include #include // #include #include #include "teb/path_smoother.h" #include namespace teb_planner_ns { class TEB_Planner { public: TEB_Planner(); ~TEB_Planner(); void initialize(std::string name, costmap_2d::Costmap2DROS *costmap_ros); bool makePlan(const geometry_msgs::PoseStamped &robot_pose, const std::vector &global_plan, std::vector &local_plan, const bool is_forward); private: std::vector global_plan_; std::vector local_plan_; path_smoother::PathSmoother path_smoother_; costmap_2d::Costmap2DROS *costmap_ros_; std::vector duration_; // TEB每段轨迹的持续时间 std::vector pre_local_plan_; geometry_msgs::PoseStamped robot_pose_; nav_msgs::Path pub_local_plan_; ros::Publisher plan_pub_; bool use_clamp_spline_flag; bool choiceLocalPlanPoint(std::vector &local_plan); void trajectoryOpt(const geometry_msgs::PoseStamped &robot_pose, std::vector &plan); void copyVectorPoseStamped(const std::vector &copied_vec, std::vector &vec); void myWorldToMap(std::vector &local_plan); void myMapToWorld(std::vector &local_plan); }; };