analytical_kinematic_box_quadrotor_decoupled_6d.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018, The Regents of the University of California (Regents).
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met:
8  *
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * 2. Redistributions in binary form must reproduce the above
13  * copyright notice, this list of conditions and the following
14  * disclaimer in the documentation and/or other materials provided
15  * with the distribution.
16  *
17  * 3. Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  *
33  * Please contact the author(s) of this library if you have any questions.
34  * Authors: David Fridovich-Keil ( dfk@eecs.berkeley.edu )
35  */
36 
38 //
39 // Defines the AnalyticalKinematicBoxQuadrotorDecoupled6D class, which inherits
40 // from the ValueFunction base class. This class assumes Kinematic planner
41 // dynamics and QuadrotorDecoupled6D tracker dynamics, and uses a Box tracking
42 // error bound.
43 //
45 
46 #ifndef FASTRACK_VALUE_ANALYTICAL_KINEMATIC_BOX_QUADROTOR_DECOUPLED_6D_H
47 #define FASTRACK_VALUE_ANALYTICAL_KINEMATIC_BOX_QUADROTOR_DECOUPLED_6D_H
48 
49 #include <fastrack/bound/box.h>
56 #include <fastrack/utils/types.h>
59 
60 #include <ros/ros.h>
61 
62 namespace fastrack {
63 namespace value {
64 
65 using bound::Box;
74 
76  : public ValueFunction<PositionVelocity, QuadrotorControl,
77  QuadrotorDecoupled6D<QuadrotorControlBoundBox>,
78  PositionVelocity, VectorXd,
79  Kinematics<PositionVelocity>, Box> {
80  public:
83 
84  // Value and gradient at particular relative states.
85  double Value(const PositionVelocity& vehicle_x,
86  const PositionVelocity& planner_x) const;
87 
88  std::unique_ptr<RelativeState<PositionVelocity, PositionVelocity>> Gradient(
89  const PositionVelocity& vehicle_x,
90  const PositionVelocity& planner_x) const;
91 
92  // Priority of the optimal control at the given vehicle and planner states.
93  // This is a number between 0 and 1, where 1 means the final control signal
94  // should be exactly the optimal control signal computed by this
95  // value function.
96  double Priority(const PositionVelocity& vehicle_x,
97  const PositionVelocity& planner_x) const;
98 
99  private:
100  // Load parameters and register callbacks.
101  bool LoadParameters(const ros::NodeHandle& n);
102  bool RegisterCallbacks(const ros::NodeHandle& n);
103 
104  // Maximum acceleration.
105  Vector3d max_acc_;
106 
107  // Disturbance bounds (assumed to be symmetric).
108  Vector3d vel_dist_;
109  Vector3d acc_dist_;
110 
111  // Position/velocity expansion.
112  Vector3d pos_exp_;
113  Vector3d vel_exp_;
114 }; //\class AnalyticalKinematicBoxQuadrotorDecoupled6D
115 
116 } // namespace value
117 } // namespace fastrack
118 
119 #endif
double Value(const PositionVelocity &vehicle_x, const PositionVelocity &planner_x) const
Definition: box.h:53
double Priority(const PositionVelocity &vehicle_x, const PositionVelocity &planner_x) const
std::unique_ptr< RelativeState< PositionVelocity, PositionVelocity > > Gradient(const PositionVelocity &vehicle_x, const PositionVelocity &planner_x) const


fastrack
Author(s): David Fridovich-Keil
autogenerated on Mon Aug 3 2020 21:28:37