car_maneuver_recovery.h
Go to the documentation of this file.
1 /*********************************************************************
2  *
3  * Software License Agreement (BSD License)
4  *
5  * Copyright (c) 2016, George Kouros.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of the the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  *
35  * Author: George Kouros
36  *********************************************************************/
37 
38 #ifndef CAR_MANEUVER_RECOVERY_CAR_MANEUVER_RECOVERY_H
39 #define CAR_MANEUVER_RECOVERY_CAR_MANEUVER_RECOVERY_H
40 
41 #include <ros/ros.h>
42 #include <tf/tf.h>
43 #include <costmap_2d/costmap_2d_ros.h>
44 #include <nav_core/recovery_behavior.h>
45 #include <base_local_planner/costmap_model.h>
46 #include <geometry_msgs/Twist.h>
47 
48 namespace car_maneuver_recovery
49 {
50 
56  class CarManeuverRecovery : public nav_core::RecoveryBehavior
57  {
58  public:
59 
64 
69 
77  void initialize(std::string name, tf::TransformListener* tfListener,
78  costmap_2d::Costmap2DROS* globalCostmapROS,
79  costmap_2d::Costmap2DROS* localCostmapROS);
80 
84  void runBehavior();
85 
91  double lineCost(geometry_msgs::Point point1, geometry_msgs::Point point2);
92 
93  private:
94 
96  std::string name_;
99 
101  ros::Publisher twistPub_;
102 
104  tf::TransformListener* tfListener_;
106  costmap_2d::Costmap2DROS* localCostmapROS_;
108  costmap_2d::Costmap2DROS* globalCostmapROS_;
110  base_local_planner::CostmapModel* worldModel_;
111 
117  double wheelbase_;
123  double timeout_;
124 
125 
126  };
127 
128 } // namespace car_maneuver_recovery
129 
130 #endif // CAR_MANEUVER_RECOVERY_CAR_MANEUVER_RECOVERY_H
base_local_planner::CostmapModel * worldModel_
costmap world model
void initialize(std::string name, tf::TransformListener *tfListener, costmap_2d::Costmap2DROS *globalCostmapROS, costmap_2d::Costmap2DROS *localCostmapROS)
Initializes plugin.
double recoverySteeringAngle_
max steering angle of robot
costmap_2d::Costmap2DROS * globalCostmapROS_
global costmap ros wrapper ptr
A move base plugin that implements car like maneuvers as a recovery behavior.
double timeout_
recovery behavior timeout
double lineCost(geometry_msgs::Point point1, geometry_msgs::Point point2)
Calculates line cost.
costmap_2d::Costmap2DROS * localCostmapROS_
local costmap ros wrapper ptr
void runBehavior()
Executes the car maneuver recovery behavior.
bool initialized_
contains the initialization state of the plugin
bool fourWheelSteering_
four wheel steering status
tf::TransformListener * tfListener_
tf transform listener
bool crabSteering_
use crab steering instead of counter steering or ackermann steering


car-maneuver-recovery
Author(s): George Kouros
autogenerated on Mon Aug 1 2016 17:52:25