Ramping.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 * @date 2026
18 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19 * GNU General Public License
20 */
21
22#pragma once
23#pragma once
24
27
29{
30
31 /**
32 * @brief Ramps the velocity down at the start, at the goal and at every corner.
33 *
34 * The navigation stack's historical behaviour, moved here verbatim from
35 * `Navigator::setupRamping`. Parameters stay in `core::GeneralConfig` -- `rampLength`,
36 * `cornerVelocity`, `boundaryVelocity`, `cornerLimit` and the three enable flags -- so
37 * existing configurations keep working unchanged.
38 *
39 * The ramp itself is acceleration-bounded -- `v(s) = sqrt(v_fixed^2 + 2 a s)` with `a`
40 * derived so it spans `rampLength` from `goalVelocity` to `maxVel` -- so it stays well
41 * defined on a trajectory shorter than `rampLength`. It still knows nothing about the
42 * motors: `a` comes from the configured distance, not from what the drive can deliver, so
43 * the profile can demand more than the device command ramp will execute.
44 */
46 {
47 public:
48 explicit Ramping(const core::GeneralConfig& config);
49
50 void apply(core::GlobalTrajectory& trajectory, float startVelocity) const override;
51
52 private:
53 core::GeneralConfig config_;
54 };
55
56} // namespace armarx::navigation::algorithms
Assigns the velocities along an already planned path.
This file is part of ArmarX.
@ Ramping
Ramp down at the start, the goal and every corner. The stack's historical behaviour.