2#include <angles/angles.h> 
    4#include <pluginlib/class_list_macros.h> 
   10namespace pure_spinning_local_planner
 
   13#if ROS_VERSION_MINIMUM(1, 13, 0) 
   16  geometry_msgs::PoseStamped paux;
 
   17  costmapRos->getRobotPose(paux);
 
   18  tf::Stamped<tf::Pose> tfpose;
 
   19  tf::poseStampedMsgToTF(paux, tfpose);
 
   26  tf::Stamped<tf::Pose> tfpose;
 
   27  costmapRos->getRobotPose(tfpose);
 
   33  : paramServer_(ros::NodeHandle(
"~PureSpinningLocalPlanner"))
 
   35  ROS_INFO_STREAM(
"[PureSpinningLocalPlanner] pure spinning planner already created");
 
   49                                          costmap_2d::Costmap2DROS *costmapRos)
 
   57  ros::NodeHandle nh(
"~/PureSpinningLocalPlanner");
 
   63  dynamic_reconfigure::Server<::pure_spinning_local_planner::PureSpinningLocalPlannerConfig>::CallbackType f;
 
   81  geometry_msgs::PoseStamped currentPose;
 
   82  tf::poseStampedTFToMsg(tfpose, currentPose);
 
   85  tf::Quaternion q = tfpose.getRotation();
 
   86  auto currentYaw = tf::getYaw(currentPose.pose.orientation);
 
   93    targetYaw = tf::getYaw(goal.pose.orientation);
 
   96    angular_error = targetYaw - currentYaw ;
 
  112  auto omega = angular_error * 
k_betta_;
 
  117  ROS_DEBUG_STREAM(
"[PureSpinningLocalPlanner] angular error: " << angular_error << 
"("<<
yaw_goal_tolerance_<<
")");
 
  118  ROS_DEBUG_STREAM(
"[PureSpinningLocalPlanner] command angular speed: " << cmd_vel.angular.z);
 
  123    ROS_DEBUG_STREAM(
"[PureSpinningLocalPlanner] GOAL REACHED ");
 
  137  ROS_DEBUG_STREAM(
"[PureSpinningLocalPlanner] setting global plan to follow");
 
PLUGINLIB_EXPORT_CLASS(cl_move_base_z::backward_global_planner::BackwardGlobalPlanner, nav_core::BaseGlobalPlanner)
 
void reconfigCB(::pure_spinning_local_planner::PureSpinningLocalPlannerConfig &config, uint32_t level)
 
rad_s max_angular_z_speed_
 
rad intermediate_goal_yaw_tolerance_
 
std::vector< geometry_msgs::PoseStamped > plan_
 
PureSpinningLocalPlanner()
 
dynamic_reconfigure::Server<::pure_spinning_local_planner::PureSpinningLocalPlannerConfig > paramServer_
 
costmap_2d::Costmap2DROS * costmapRos_
 
virtual ~PureSpinningLocalPlanner()
 
virtual bool setPlan(const std::vector< geometry_msgs::PoseStamped > &plan) override
Set the plan that the local planner is following.
 
virtual bool isGoalReached() override
Check if the goal pose has been achieved by the local planner.
 
virtual bool computeVelocityCommands(geometry_msgs::Twist &cmd_vel) override
Given the current position, orientation, and velocity of the robot: compute velocity commands to send...
 
tf::Stamped< tf::Pose > optionalRobotPose(costmap_2d::Costmap2DROS *costmapRos)
 
void publishGoalMarker(double x, double y, double phi)