Class PathParameterizerTOPPRA
Defined in File toppra.hpp
Class Documentation
-
class PathParameterizerTOPPRA
Trajectory time parameterizer using the TOPP-RA algorithm.
This directly uses https://github.com/hungpham2511/toppra.
Public Functions
Constructor.
- Parameters:
scene – A pointer to the scene to use for path parameterization.
group_name – The name of the joint group to use.
-
tl::expected<JointTrajectory, std::string> generate(const JointPath &path, const double dt, const SplineFittingMode mode = SplineFittingMode::Hermite, const double velocity_scale = 1.0, const double acceleration_scale = 1.0, const int max_adaptive_iterations = 10, const double max_adaptive_step_size = 0.05)
Time-parameterizes a joint-space path using TOPP-RA.
SplineFittingMode::Hermite: Fits a cubic Hermite spline with zero velocity at all waypoints. This can cause slow execution, but guarantees perfect adherence to the path.SplineFittingMode::Cubic: Fits a cubic spline with zero velocity only at the endpoints. This is smoother, but can cause deviations from the desired path that could lead to collision.SplineFittingMode::Adaptive: Uses the cubic mode but iteratively collision checks and adds intermediate points if it finds collisions, up to a maximum number of iterations. If the path is not collision-free after the maximum iterations, falls back to Hermite mode. Refer to Section 3.5 of https://groups.csail.mit.edu/rrg/papers/Richter_ISRR13.pdf for more details on this approach.
- Parameters:
velocity_scale – A scaling factor (between 0 and 1) for velocity limits.
acceleration_scale – A scaling factor (between 0 and 1) for acceleration limits.
max_adaptive_iterations – Maximum number of adaptive iterations, if adaptive mode is enabled.
max_adaptive_step_size – If adaptive mode is enabled, this is the maximum joint configuration step size to sample generated splines for collision checking.
path – The path to time parameterize.
dt – The sample time of the output trajectory, in seconds.
mode – The mode to use for spline fitting the path. Options include:
- Returns:
A time-parameterized joint trajectory.