armarx::navigation::analysis Namespace Reference

This file is part of ArmarX. More...

Classes

struct  Box
 An axis-aligned box obstacle in the ground plane. More...
 
struct  CommandRampCheck
 How far a velocity profile asks for more than the device command ramp can deliver. More...
 
struct  Config
 Everything the application needs, as read from the scene description file. More...
 
struct  ReparametrizationResult
 
struct  Scene
 The synthetic scene: what the world looks like, independent of the planner. More...
 

Functions

algorithms::Costmap buildCostmap (const Config &config)
 Build a costmap holding, per cell, the distance to the closest obstacle reduced by the robot radius (clipped to [0, costmapMaxDistance]).
 
CommandRampCheck checkAgainstCommandRamp (const core::GlobalTrajectory &trajectory, const simulation::CommandRateLimit &rateLimit, float boundaryVelocity)
 Compare the profile's v * dv/ds against rateLimit.
 
core::TrajectoryParametrization parametrizationModeFromString (const std::string &name)
 Parse the --parametrization choice. Throws on an unknown name.
 
Config readConfig (const std::filesystem::path &filename)
 Read the scene description. Throws on malformed input.
 
ReparametrizationResult reparametrize (const core::GlobalTrajectory &trajectory, const Config &config)
 Re-assign the velocities along trajectory according to config.parametrization.
 
std::string toString (const core::TrajectoryParametrization mode)
 
void writeResult (const std::filesystem::path &filename, const Config &config, const algorithms::Costmap &costmap, const std::optional< global_planning::GlobalPlannerResult > &result, const algorithms::ObstacleAwareVelocityLimit &limit, const std::optional< simulation::TrajectoryFollowingSimulation::Result > &simulated, const nlohmann::json &reference, const CommandRampCheck &rampCheck, double parametrizationSeconds)
 Write scene, costmap and planning result as JSON for the python plotting tool.
 

Detailed Description

This file is part of ArmarX.

ArmarX is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

ArmarX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
Fabian Reister ( fabian dot reister at kit dot edu )
Date
2026

Function Documentation

◆ buildCostmap()

algorithms::Costmap buildCostmap ( const Config & config)

Build a costmap holding, per cell, the distance to the closest obstacle reduced by the robot radius (clipped to [0, costmapMaxDistance]).

A value of zero marks a cell in collision, which is what Costmap::isInCollision tests for. Distances are computed analytically from the box obstacles, so the grid is exact up to the cell discretization.

Definition at line 290 of file Scene.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkAgainstCommandRamp()

CommandRampCheck checkAgainstCommandRamp ( const core::GlobalTrajectory & trajectory,
const simulation::CommandRateLimit & rateLimit,
float boundaryVelocity )

Compare the profile's v * dv/ds against rateLimit.

Logs a warning if it exceeds it.

boundaryVelocity is the speed the stack deliberately ends at, so a terminal stopping distance implied by it is by design and not worth warning about.

Definition at line 101 of file reparametrization.cpp.

+ Here is the caller graph for this function:

◆ parametrizationModeFromString()

core::TrajectoryParametrization parametrizationModeFromString ( const std::string & name)

Parse the --parametrization choice. Throws on an unknown name.

Definition at line 195 of file reparametrization.cpp.

+ Here is the caller graph for this function:

◆ readConfig()

Config readConfig ( const std::filesystem::path & filename)

Read the scene description. Throws on malformed input.

Definition at line 76 of file Scene.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reparametrize()

ReparametrizationResult reparametrize ( const core::GlobalTrajectory & trajectory,
const Config & config )

Re-assign the velocities along trajectory according to config.parametrization.

A thin wrapper over fac::TrajectoryParametrizationFactory – the modes themselves live in the algorithms library and are the same objects the Navigator runs, so what this application measures is what the robot would do. All that is added here is assembling Toppra::DriveParams from the scene's simulation config and reading back the time parametrization for the plots.

Exceptions
std::runtime_errorif the parametrization is unavailable or fails.

Definition at line 231 of file reparametrization.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toString()

std::string toString ( const core::TrajectoryParametrization mode)

Definition at line 215 of file reparametrization.cpp.

+ Here is the caller graph for this function:

◆ writeResult()

void writeResult ( const std::filesystem::path & filename,
const Config & config,
const algorithms::Costmap & costmap,
const std::optional< global_planning::GlobalPlannerResult > & result,
const algorithms::ObstacleAwareVelocityLimit & limit,
const std::optional< simulation::TrajectoryFollowingSimulation::Result > & simulated,
const nlohmann::json & reference,
const CommandRampCheck & rampCheck,
double parametrizationSeconds )

Write scene, costmap and planning result as JSON for the python plotting tool.

The costmap grid is written row-major with rows corresponding to x and columns to y. Only the bounds and the cell size are written, not per-cell coordinates: the grid is uniform and axis-aligned, so the reader can reconstruct them.

An empty result means planning failed; the costmap is written either way so that failures can still be inspected.

Every trajectory point additionally carries the maximum permissible velocity that limit reports for its position. Comparing the two is the verification step: if the planner's post-processing deformed the path without updating the velocities, the actual velocity exceeds the limit and the point is reported as a violation.

Parameters
referenceTOPPRA's time-parametrized reference, or null for the other parametrization modes.
parametrizationSecondsWall-clock seconds the parametrization took. Reported separately from the planner's stage timings, which stop at plan() and would otherwise hide it.

Definition at line 274 of file io.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: