SMACC
Loading...
Searching...
No Matches
undo_path_global_planner.h
Go to the documentation of this file.
1/*****************************************************************************************************************
2 * ReelRobotix Inc. - Software License Agreement Copyright (c) 2018
3 * Authors: Pablo Inigo Blasco, Brett Aldrich
4 *
5 ******************************************************************************************************************/
6#pragma once
7
8#include <nav_core/base_global_planner.h>
9#include <nav_msgs/GetPlan.h>
10#include <nav_msgs/Path.h>
11#include <ros/ros.h>
12
13namespace cl_move_base_z
14{
15namespace undo_path_global_planner
16{
17class UndoPathGlobalPlanner : public nav_core::BaseGlobalPlanner
18{
19public:
21
22 virtual ~UndoPathGlobalPlanner();
23
24 bool makePlan(const geometry_msgs::PoseStamped &start,
25 const geometry_msgs::PoseStamped &goal, std::vector<geometry_msgs::PoseStamped> &plan);
26
27 bool makePlan(const geometry_msgs::PoseStamped &start,
28 const geometry_msgs::PoseStamped &goal, std::vector<geometry_msgs::PoseStamped> &plan,
29 double &cost);
30
31 virtual bool createDefaultUndoPathPlan(const geometry_msgs::PoseStamped &start,
32 const geometry_msgs::PoseStamped &goal, std::vector<geometry_msgs::PoseStamped> &plan);
33
34 virtual void initialize(std::string name, costmap_2d::Costmap2DROS *costmap_ros_) override;
35
36private:
37 ros::NodeHandle nh_;
38
39 ros::Subscriber forwardPathSub_;
40
41 ros::Publisher planPub_;
42
43 ros::Publisher markersPub_;
44
45 nav_msgs::Path lastForwardPathMsg_;
46
48 costmap_2d::Costmap2DROS *costmap_ros_;
49
50 void onForwardTrailMsg(const nav_msgs::Path::ConstPtr &trailMessage);
51
52 void publishGoalMarker(const geometry_msgs::Pose &pose, double r, double g, double b);
53
54 ros::ServiceServer cmd_server_;
55
57
58 double puresSpinningRadStep_; // rads
59};
60} // namespace backward_global_planner
61} // namespace cl_move_base_z
void publishGoalMarker(const geometry_msgs::Pose &pose, double r, double g, double b)
bool makePlan(const geometry_msgs::PoseStamped &start, const geometry_msgs::PoseStamped &goal, std::vector< geometry_msgs::PoseStamped > &plan)
virtual bool createDefaultUndoPathPlan(const geometry_msgs::PoseStamped &start, const geometry_msgs::PoseStamped &goal, std::vector< geometry_msgs::PoseStamped > &plan)
virtual void initialize(std::string name, costmap_2d::Costmap2DROS *costmap_ros_) override
costmap_2d::Costmap2DROS * costmap_ros_
stored but almost not used
void onForwardTrailMsg(const nav_msgs::Path::ConstPtr &trailMessage)