|
|
Time-optimal reparametrization under per-motor torque and command-ramp limits. More...
#include <armarx/navigation/algorithms/parametrization/Toppra.h>
Inheritance diagram for Toppra:Classes | |
| struct | DriveParams |
| Everything the python side needs that does not change between paths. More... | |
| class | Impl |
| struct | MecanumGeometry |
ARMAR-6's and ARMAR-DE's four-wheel drive, following VirtualRobot::MecanumPlatformKinematics. More... | |
| struct | OmniWheelGeometry |
ARMAR-7's three-wheel drive, in the units VirtualRobot::OmniWheelPlatformKinematics uses: mm for the radii, rad for the angles. More... | |
Public Types | |
| enum class | DriveType { OmniWheel , Mecanum } |
| Which drive the platform has. More... | |
| enum | SampleColumn { T = 0 , X = 1 , Y = 2 , YAW = 3 , VELOCITY = 4 , ANGULAR_VELOCITY = 5 , TANGENTIAL_ACCELERATION = 6 , ANGULAR_ACCELERATION = 7 , SAMPLE_COLUMN_COUNT = 8 } |
Column layout of lastSamples(). More... | |
Public Member Functions | |
| void | apply (core::GlobalTrajectory &trajectory, float startVelocity) const override |
Re-assign the velocities of trajectory in place. | |
| double | lastDuration () const |
Duration [s] of the profile behind lastSamples(). Zero until apply() has run. | |
| const Eigen::MatrixXd & | lastSamples () const |
The time-parametrized profile from the most recent apply(), (M, 8). | |
| Toppra (const core::GeneralConfig &config, const DriveParams &drive) | |
| ~Toppra () override | |
Public Member Functions inherited from TrajectoryParametrization | |
| virtual | ~TrajectoryParametrization ()=default |
Static Public Member Functions | |
| static bool | available () |
Whether the python side was found at configure time. False means apply() throws. | |
| static std::string | unavailableReason () |
| Why it is unavailable, as recorded at configure time. Empty when available. | |
Time-optimal reparametrization under per-motor torque and command-ramp limits.
Delegates to armarx_navigation.reparametrization through an embedded Python interpreter. The robot model and the wheel Jacobian are loaded once, when this object is constructed; each apply() then exchanges two arrays with it and nothing else.
The header is deliberately not guarded by the build-time availability macro, so the class exists whether or not the python side was found. When it was not, the constructor succeeds and apply() throws with the reason recorded at configure time – that keeps the factory free of preprocessor branches.
|
strong |
| enum SampleColumn |
Column layout of lastSamples().
Mirrors SampleColumn in the python package, which is the single source of truth for the array boundary.
| Enumerator | |
|---|---|
| T | |
| X | |
| Y | |
| YAW | |
| VELOCITY | |
| ANGULAR_VELOCITY | |
| TANGENTIAL_ACCELERATION | |
| ANGULAR_ACCELERATION | |
| SAMPLE_COLUMN_COUNT | |
| Toppra | ( | const core::GeneralConfig & | config, |
| const DriveParams & | drive ) |
Definition at line 362 of file Toppra.cpp.
|
overridedefault |
|
overridevirtual |
Re-assign the velocities of trajectory in place.
| startVelocity | Speed the robot already carries [mm/s]. The caller passes the measured platform speed when picking a trajectory up mid-motion, and GeneralConfig::boundaryVelocity when starting from rest. |
| std::runtime_error | if the implementation is unavailable in this build. |
Implements TrajectoryParametrization.
Definition at line 401 of file Toppra.cpp.
Here is the call graph for this function:
|
static |
Whether the python side was found at configure time. False means apply() throws.
Definition at line 217 of file Toppra.cpp.
| double lastDuration | ( | ) | const |
Duration [s] of the profile behind lastSamples(). Zero until apply() has run.
Definition at line 357 of file Toppra.cpp.
| const Eigen::MatrixXd & lastSamples | ( | ) | const |
The time-parametrized profile from the most recent apply(), (M, 8).
Introspection only – for plots and offline analysis, never for control. apply() hands back a GlobalTrajectory, which stores a speed per position, so the time axis TOPP-RA computed is lost the moment the result is converted. This keeps it.
Empty until apply() has run; overwritten by each call. Columns are SampleColumn.
Definition at line 351 of file Toppra.cpp.
Here is the caller graph for this function:
|
static |
Why it is unavailable, as recorded at configure time. Empty when available.
Definition at line 227 of file Toppra.cpp.
Here is the caller graph for this function: