ParametrizationDump.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
24#include <optional>
25#include <string>
26
30
32{
33
34 /// One navigation request's velocity profile, before and after parametrization.
36 {
37 /// What the stack was configured to use.
39
40 /// What actually ran. Differs from `requested` whenever TOPP-RA degraded -- recorded in
41 /// the artefact and not only in the log, so an unexpected profile explains itself.
43
44 /// The planner's output. Its velocities are the obstacle-aware limit, which is why the
45 /// caller must copy it before parametrizing in place.
47
48 /// The profile that will be executed.
50
51 /// Null unless TOPP-RA ran; supplies the time axis, which a `GlobalTrajectory` lacks.
52 const algorithms::Toppra* toppra{nullptr};
53
54 /// The bounds the profile was solved against, when TOPP-RA was configured. Reported so
55 /// the constraint-utilization panel can show which one was binding.
56 std::optional<algorithms::Toppra::DriveParams> driveParams;
57
58 float maxVelocity{0.F};
60 };
61
62 /**
63 * @brief Write `record` as JSON, for offline rendering with `plot-navigation-request`.
64 *
65 * The navigator writes data, never pixels: plotting would put matplotlib into the process
66 * that drives the robot, and the embedded interpreter is in any case private to the
67 * `algorithms` target.
68 *
69 * Writes `path` and a timestamped sibling, so the latest is always at a predictable
70 * location while a sequence of requests remains available for comparison.
71 *
72 * Never throws: a debugging aid must not be able to abort a navigation request. Failures are
73 * logged and swallowed.
74 *
75 * The schema deliberately reuses the key names of `global_planning_analysis`'s `result.json`
76 * where the two overlap, so the same plotting functions read both.
77 */
78 void writeParametrizationDump(const ParametrizationRecord& record, const std::string& path);
79
80} // namespace armarx::navigation::server
Time-optimal reparametrization under per-motor torque and command-ramp limits.
Definition Toppra.h:52
TrajectoryParametrization
How the velocities along a planned path are assigned.
This file is part of ArmarX.
void writeParametrizationDump(const ParametrizationRecord &record, const std::string &path)
Write record as JSON, for offline rendering with plot-navigation-request.
One navigation request's velocity profile, before and after parametrization.
core::TrajectoryParametrization applied
What actually ran.
core::TrajectoryParametrization requested
What the stack was configured to use.
std::optional< algorithms::Toppra::DriveParams > driveParams
The bounds the profile was solved against, when TOPP-RA was configured.
core::GlobalTrajectory parametrized
The profile that will be executed.
const algorithms::Toppra * toppra
Null unless TOPP-RA ran; supplies the time axis, which a GlobalTrajectory lacks.
core::GlobalTrajectory planned
The planner's output.