NavigationStackGeneralConfig.h
Go to the documentation of this file.
1/**
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @author Fabian Reister ( fabian dot reister at kit dot edu )
17 * @author Christian R. G. Dreher ( c dot dreher at kit dot edu )
18 * @date 2021
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
26
28
30{
31 /**
32 * @brief How the velocities along a planned path are assigned.
33 *
34 * The planner produces a *spatial* trajectory -- one linear speed per waypoint, taken from
35 * the obstacle-aware limit -- and nothing in it knows what the base can dynamically achieve.
36 * This selects what happens to that profile before it is executed.
37 */
39 {
40 /// Leave the planner's velocities alone.
42
43 /// Ramp down at the start, the goal and every corner. The stack's historical behaviour.
45
46 /// Time-optimal under per-motor torque and command-ramp limits. Needs the python
47 /// package; throws at runtime when it was not available at build time.
49 };
50
51 /// The lowercase name used in configs, logs and the analysis application's results.
52 std::string ToString(TrajectoryParametrization parametrization);
53
55 {
56 // if the desired velocity is below this threshold, the platform will not be moved
57 core::TwistLimits minVel{.linear = 0.F, .angular = 0.F};
58
59 //! max velocity
60 core::TwistLimits maxVel{.linear = 200.F, .angular = 0.2F};
61
62 //! How the planned velocity profile is (re-)assigned before execution.
64
65 // Ramping at start and end of trajectory. Read by TrajectoryParametrization::Ramping.
66 bool enableRampingStart = true;
67 bool enableRampingEnd = true;
69 float rampLength{1000}; // [mm]
70 float cornerVelocity = 200; // [mm/s]
71 /**
72 * @brief Speed the profile is floored at [mm/s].
73 *
74 * Needed at the *start*: a `GlobalTrajectory` assigns a velocity to a position, so
75 * `v(s = 0) = 0` is a fixed point -- the controller looks up zero at the pose it is
76 * standing in, commands zero, and the robot never leaves the start.
77 */
78 float boundaryVelocity = 150; // [mm/s]
79
80 /**
81 * @brief Speed the profile is allowed to fall to at the *goal* [mm/s].
82 *
83 * The start's argument does not apply here: nothing has to get the robot moving again
84 * once it is at the goal, and a floor of `boundaryVelocity` there is precisely what it
85 * overshoots on. The feed-forward tracks the profile up to the last waypoint, so the
86 * robot arrives at the goal still commanded at that speed; the controller's
87 * final-segment law then steps the demand down in a single cycle and the command slew
88 * needs `v^2 / (2 a)` of run-out to absorb it -- measured at 45-59 mm on ARMAR-7 with
89 * the historical 150 mm/s.
90 *
91 * Kept above zero rather than at it, so the fixed-point argument cannot bite here
92 * either if the robot is nudged back onto the tail of the profile.
93 */
94 float goalVelocity = 10; // [mm/s]
95 // the minimum angle between two trajectory segments to be considered a corner (regarding ramping)
96 float cornerLimit = 35; // [deg]
97
98 //! Maximum distance [mm] to search for a valid recovery position when robot starts in collision
100
101 //! If true and the goal is not reachable, navigate to the closest reachable position instead of failing
103
104 virtual ~GeneralConfig() = default;
105
106 virtual aron::data::DictPtr toAron() const;
107
108 static GeneralConfig FromAron(const aron::data::DictPtr& dict);
109 };
110
111} // namespace armarx::navigation::core
std::shared_ptr< Dict > DictPtr
Definition Dict.h:42
This file is part of ArmarX.
TrajectoryParametrization
How the velocities along a planned path are assigned.
@ Ramping
Ramp down at the start, the goal and every corner. The stack's historical behaviour.
@ Toppra
Time-optimal under per-motor torque and command-ramp limits.
std::string ToString(const TrajectoryParametrization parametrization)
The lowercase name used in configs, logs and the analysis application's results.
TrajectoryParametrization parametrization
How the planned velocity profile is (re-)assigned before execution.
static GeneralConfig FromAron(const aron::data::DictPtr &dict)
float goalVelocity
Speed the profile is allowed to fall to at the goal [mm/s].
float boundaryVelocity
Speed the profile is floored at [mm/s].
bool navigateCloseAsPossible
If true and the goal is not reachable, navigate to the closest reachable position instead of failing.
float inCollisionDistanceThresholdForRecovery
Maximum distance [mm] to search for a valid recovery position when robot starts in collision.