Qualcomm Navigator Flight Control Interface  2.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
planner_config.hpp
1 /****************************************************************************
2  * Copyright (c) 2018 John A. Dougherty. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in
12  * the documentation and/or other materials provided with the
13  * distribution.
14  * 3. Neither the name ATLFlight nor the names of its contributors may be
15  * used to endorse or promote products derived from this software
16  * without specific prior written permission.
17  *
18  * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
26  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  *
32  * In addition Supplemental Terms apply. See the SUPPLEMENTAL file.
33  ****************************************************************************/
34 
35 #ifndef SNAV_FCI_PLANNER_CONFIG_HPP_
36 #define SNAV_FCI_PLANNER_CONFIG_HPP_
37 
38 namespace snav_fci
39 {
40 
45 {
46 public:
47 
51  enum class TrajType
52  {
53  SHORTEST_PATH = 0,
56  MIN_ACC,
57  MIN_JERK,
58  MIN_SNAP,
59  };
60 
65  enum class TimestampStrategy
66  {
67  USE_PROVIDED = 0,
72  };
73 
78  {
81  average_speed_xy = 0.5;
82  average_speed_z = 0.3;
83  max_allowed_vel_xy = 3.0; // these are sane values based on the Qualcomm
84  // Navigator default params for the Dragon DDK
85  max_allowed_vel_z = 1.0;
86  max_allowed_acc_xy = 6.0; // theoretical max approx. equals:
87  // gravity * tan(max_tilt_angle)
88  // in idealized and simplified scenario
89  max_allowed_acc_z = 6.0; // theoretical max approx. equals:
90  // ((thrust / weight) - 1) * gravity
91  // in idealized and simplified scenario
92  max_allowed_jerk_xy = 50; // setting somewhat arbitrarily high
93  max_allowed_jerk_z = 50; // setting somewhat arbitrarily high
94  loop = false; // Warning: this must be false until bug in snav_traj_gen
95  // is fixed
96  }
97 
102  {
103  this->traj_type = traj_type;
104  }
105 
111 
152  bool loop;
155 };
156 
157 } // namespace snav_api
158 
159 #endif // SNAV_FCI_PLANNER_CONFIG_HPP_
160 
Structure containing options for the Planner.
Definition: planner_config.hpp:44
PlannerConfig()
Default constructor.
Definition: planner_config.hpp:77
float max_allowed_acc_z
Definition: planner_config.hpp:145
bool loop
Definition: planner_config.hpp:152
float max_allowed_jerk_xy
Definition: planner_config.hpp:148
PlannerConfig(TrajType traj_type)
Definition: planner_config.hpp:101
float average_speed_xy
Definition: planner_config.hpp:114
float max_allowed_vel_xy
Definition: planner_config.hpp:126
TrajType traj_type
Specifies the trajectory-generation method for an instance of Planner.
Definition: planner_config.hpp:110
float average_speed_z
Definition: planner_config.hpp:120
float max_allowed_vel_z
Definition: planner_config.hpp:132
float max_allowed_acc_xy
Definition: planner_config.hpp:138
TimestampStrategy timing
Definition: planner_config.hpp:112
TrajType
Enum used to handle different methods of generating trajectories.
Definition: planner_config.hpp:51
float max_allowed_jerk_z
Definition: planner_config.hpp:150
TimestampStrategy
Enum used to specify the timestamp strategy when generating trajectories.
Definition: planner_config.hpp:65