37 #ifndef POSE_FOLLOWER_POSE_FOLLOWER_H_ 38 #define POSE_FOLLOWER_POSE_FOLLOWER_H_ 45 #include <geometry_msgs/PoseStamped.h> 46 #include <geometry_msgs/Twist.h> 47 #include <nav_msgs/Odometry.h> 56 bool setPlan(
const std::vector<geometry_msgs::PoseStamped>& global_plan);
60 inline double sign(
double n){
61 return n < 0.0 ? -1.0 : 1.0;
65 geometry_msgs::Twist
limitTwist(
const geometry_msgs::Twist& twist);
66 double headingDiff(
double pt_x,
double pt_y,
double x,
double y,
double heading);
70 std::vector<geometry_msgs::PoseStamped>& transformed_plan);
72 void odomCallback(
const nav_msgs::Odometry::ConstPtr& msg);
void odomCallback(const nav_msgs::Odometry::ConstPtr &msg)
ros::Publisher global_plan_pub_
ros::Subscriber odom_sub_
base_local_planner::TrajectoryPlannerROS collision_planner_
unsigned int current_waypoint_
bool turn_in_place_first_
ros::Time goal_reached_time_
void publishPlan(const std::vector< geometry_msgs::PoseStamped > &path, const ros::Publisher &pub)
double max_heading_diff_before_moving_
double trans_stopped_velocity_
double headingDiff(double pt_x, double pt_y, double x, double y, double heading)
tf::TransformListener * tf_
bool setPlan(const std::vector< geometry_msgs::PoseStamped > &global_plan)
TFSIMD_FORCE_INLINE const tfScalar & y() const
std::vector< geometry_msgs::PoseStamped > global_plan_
double tolerance_timeout_
bool transformGlobalPlan(const tf::TransformListener &tf, const std::vector< geometry_msgs::PoseStamped > &global_plan, const costmap_2d::Costmap2DROS &costmap, const std::string &global_frame, std::vector< geometry_msgs::PoseStamped > &transformed_plan)
bool computeVelocityCommands(geometry_msgs::Twist &cmd_vel)
TFSIMD_FORCE_INLINE const tfScalar & x() const
double in_place_trans_vel_
void initialize(std::string name, tf::TransformListener *tf, costmap_2d::Costmap2DROS *costmap_ros)
double rot_stopped_velocity_
geometry_msgs::Twist diff2D(const tf::Pose &pose1, const tf::Pose &pose2)
geometry_msgs::Twist limitTwist(const geometry_msgs::Twist &twist)
double min_in_place_vel_th_
costmap_2d::Costmap2DROS * costmap_ros_
nav_msgs::Odometry base_odom_