|
|
#include <armarx/navigation/core/Trajectory.h>
Public Types | |
| using | Indices = std::vector<std::size_t> |
Public Member Functions | |
| Indices | allConnectedPointsInRange (std::size_t idx, float radius) const |
| get all points within a certain radius that are directly connected to idx | |
| void | applyRamping (const std::vector< std::pair< std::size_t, float > > &fixedVelocities, float rampLength) |
| Set the velocity at the given indices to their respective value and ramp down over the specified distance. | |
| GlobalTrajectory | calcSubsampledTrajectory (int subsamplingFactor) const |
| std::vector< std::pair< std::size_t, float > > | calculateCorners (float cornerLimit) const |
| Return a list of the indices of all corneres in the trajectory with their respective angle difference. | |
| float | duration (core::VelocityInterpolation interpolation) const |
| std::optional< GlobalTrajectoryPoint > | getPointAtSpatialDistanceFrom (const Position &point, float distance) const |
| std::optional< GlobalTrajectoryPoint > | getPointAtTemporalDistanceFrom (const Position &point, float distance) const |
| Projection | getProjection (const core::Pose &robotPose, const VelocityInterpolation &velocityInterpolation, std::size_t startSegmentIndex, std::size_t maxSegmentsAhead, float orientationWeight) const |
| Project the robot pose onto the trajectory, searching only within a window of segments ahead of the given start index, and optionally penalizing orientation differences. | |
| Projection | getProjection (const Position &point, const VelocityInterpolation &velocityInterpolation) const |
| float | getRemainingDistance (const Position &point) const |
| Project point onto the trajectory and evaluate the remaining distance from there on. | |
| float | getRemainingDuration (const Position &point, float linearVelocity=400, float angularVelocity=0.5) const |
| Project point onto the trajectory and evaluate the remaining duration from there on. | |
| std::pair< GlobalTrajectory, bool > | getSubTrajectory (const Position &point, const float distance) const |
| Project point onto the trajectory and return a new trajectory along the old one from that point for the specified distance. | |
| GlobalTrajectory | getSubTrajectory (std::size_t s, std::size_t t) const |
| Return a new trajectory along the old one from the given start index (inclusive) to the given end index (exclusive). | |
| GlobalTrajectory ()=default | |
| GlobalTrajectory (const std::vector< GlobalTrajectoryPoint > &points) | |
| bool | hasMaxDistanceBetweenWaypoints (float maxDistance) const |
| bool | isValid () const noexcept |
| float | length () const |
| std::vector< GlobalTrajectoryPoint > & | mutablePoints () |
| const std::vector< GlobalTrajectoryPoint > & | points () const |
| std::vector< Pose > | poses () const noexcept |
| std::vector< Position > | positions () const noexcept |
| GlobalTrajectory | resample (float eps) const |
| void | setMaxVelocity (float maxVelocity) |
Static Public Member Functions | |
| static GlobalTrajectory | FromPath (const Path &path, const std::vector< float > &velocity) |
| static GlobalTrajectory | FromPath (const Path &path, float velocity) |
| Note: the velocity will not be set! | |
| static GlobalTrajectory | FromPath (const Pose &start, const Positions &waypoints, const Pose &goal, const std::vector< float > &velocity) |
| static GlobalTrajectory | FromPath (const Pose &start, const Positions &waypoints, const Pose &goal, float velocity) |
| Note: the velocity will not be set! | |
Definition at line 74 of file Trajectory.h.
| using Indices = std::vector<std::size_t> |
Definition at line 197 of file Trajectory.h.
|
default |
Here is the call graph for this function:
Here is the caller graph for this function:| GlobalTrajectory | ( | const std::vector< GlobalTrajectoryPoint > & | points | ) |
| GlobalTrajectory::Indices allConnectedPointsInRange | ( | std::size_t | idx, |
| float | radius ) const |
get all points within a certain radius that are directly connected to idx
Definition at line 1197 of file Trajectory.cpp.
| void applyRamping | ( | const std::vector< std::pair< std::size_t, float > > & | fixedVelocities, |
| float | rampLength ) |
Set the velocity at the given indices to their respective value and ramp down over the specified distance.
Will only ever decrease the velocity at a given point.
| fixedVelocities | the list of indices and their velocity [mm/s] to adjust |
| rampLength | [mm] the distance over which to ramp the velocity |
Definition at line 566 of file Trajectory.cpp.
Here is the call graph for this function:| GlobalTrajectory calcSubsampledTrajectory | ( | int | subsamplingFactor | ) | const |
|
nodiscard |
Return a list of the indices of all corneres in the trajectory with their respective angle difference.
| cornerLimit | the angle above which two segments are considered a corner [deg] |
Definition at line 664 of file Trajectory.cpp.
Here is the call graph for this function:| float duration | ( | core::VelocityInterpolation | interpolation | ) | const |
Definition at line 1153 of file Trajectory.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Note: the velocity will not be set!
Definition at line 768 of file Trajectory.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Note: the velocity will not be set!
Definition at line 780 of file Trajectory.cpp.
Here is the call graph for this function:| std::optional< GlobalTrajectoryPoint > getPointAtSpatialDistanceFrom | ( | const Position & | point, |
| float | distance ) const |
| std::optional< GlobalTrajectoryPoint > getPointAtTemporalDistanceFrom | ( | const Position & | point, |
| float | distance ) const |
| Projection getProjection | ( | const core::Pose & | robotPose, |
| const VelocityInterpolation & | velocityInterpolation, | ||
| std::size_t | startSegmentIndex, | ||
| std::size_t | maxSegmentsAhead, | ||
| float | orientationWeight ) const |
Project the robot pose onto the trajectory, searching only within a window of segments ahead of the given start index, and optionally penalizing orientation differences.
| robotPose | The current robot pose (translation + orientation). |
| velocityInterpolation | How to interpolate velocity along the segment. |
| startSegmentIndex | Index of the first segment to consider (inclusive). |
| maxSegmentsAhead | Maximum number of segments to search ahead from startSegmentIndex. |
| orientationWeight | Dimensionless weight for orientation cost. Cost = translationDist * (1.0 + orientationWeight * angularDifference). 0 means translation-only. |
Definition at line 395 of file Trajectory.cpp.
| Projection getProjection | ( | const Position & | point, |
| const VelocityInterpolation & | velocityInterpolation ) const |
Project point onto the trajectory and evaluate the remaining distance from there on.
| point | current location, from which on to measure |
Definition at line 510 of file Trajectory.cpp.
| float getRemainingDuration | ( | const Position & | point, |
| float | linearVelocity = 400, | ||
| float | angularVelocity = 0.5 ) const |
Project point onto the trajectory and evaluate the remaining duration from there on.
| point | current location, from which on to measure |
| linearVelocity | velocity for translations in mm/s |
| angularVelocity | velocity for rotations in rad/s |
Definition at line 533 of file Trajectory.cpp.
| std::pair< GlobalTrajectory, bool > getSubTrajectory | ( | const Position & | point, |
| const float | distance ) const |
Project point onto the trajectory and return a new trajectory along the old one from that point for the specified distance.
Definition at line 448 of file Trajectory.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| GlobalTrajectory getSubTrajectory | ( | std::size_t | s, |
| std::size_t | t ) const |
Return a new trajectory along the old one from the given start index (inclusive) to the given end index (exclusive).
Definition at line 492 of file Trajectory.cpp.
Here is the call graph for this function:| bool hasMaxDistanceBetweenWaypoints | ( | float | maxDistance | ) | const |
|
noexcept |
Definition at line 1188 of file Trajectory.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| float length | ( | ) | const |
Definition at line 1091 of file Trajectory.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< GlobalTrajectoryPoint > & mutablePoints | ( | ) |
| const std::vector< GlobalTrajectoryPoint > & points | ( | ) | const |
|
nodiscardnoexcept |
Definition at line 753 of file Trajectory.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
nodiscardnoexcept |
Definition at line 739 of file Trajectory.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| GlobalTrajectory resample | ( | float | eps | ) | const |
Definition at line 990 of file Trajectory.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void setMaxVelocity | ( | float | maxVelocity | ) |