3 #ifndef __TRAPEZOIDAL_TRAJECTORY_HPP__
4 #define __TRAPEZOIDAL_TRAJECTORY_HPP__
30 void setTargetPosition(
double startTimestamp,
double initialPosition,
double initialVelocity,
31 double targetPosition,
double refSpeed,
double refAcceleration);
34 void setTargetVelocity(
double startTimestamp,
double initialPosition,
double initialVelocity,
35 double targetVelocity,
double refAcceleration);
38 void reset(
double currentPosition);
62 void configure(
double startTimestamp,
double initialPosition,
double initialVelocity,
63 double targetPosition,
double refSpeed,
double refAcceleration);
65 double ta, a1, a2, a3;
67 double tc, c1, c2, c3;
69 double startTimestamp;
70 double targetPosition;
72 double positionReference;
73 double velocityReference;
74 double accelerationReference;
78 mutable std::mutex mutex;
Definition: TrapezoidalTrajectory.hpp:17
TrapezoidalTrajectory()
Constructor.
Definition: TrapezoidalTrajectory.cpp:29
void setTargetVelocity(double startTimestamp, double initialPosition, double initialVelocity, double targetVelocity, double refAcceleration)
Set motion parameters (infinite motion).
Definition: TrapezoidalTrajectory.cpp:58
void setTargetPosition(double startTimestamp, double initialPosition, double initialVelocity, double targetPosition, double refSpeed, double refAcceleration)
Set motion parameters (using target position).
Definition: TrapezoidalTrajectory.cpp:44
double queryAcceleration() const
Retrieve last acceleration reference (units/seconds^2).
Definition: TrapezoidalTrajectory.cpp:318
double getTargetPosition() const
Query configured target position (units).
Definition: TrapezoidalTrajectory.cpp:294
void reset(double currentPosition)
Reset state, remember current position (units).
Definition: TrapezoidalTrajectory.cpp:224
Reference update(double timestamp)
Update trajectory state, must be called on regular intervals of period.
Definition: TrapezoidalTrajectory.cpp:242
double queryVelocity() const
Retrieve last velocity reference (units/seconds).
Definition: TrapezoidalTrajectory.cpp:310
bool isActive() const
Whether the trajectory is currently ongoing.
Definition: TrapezoidalTrajectory.cpp:334
double queryPosition() const
Retrieve last position reference (units).
Definition: TrapezoidalTrajectory.cpp:302
double queryTime() const
Retrieve elapsed time since start (seconds).
Definition: TrapezoidalTrajectory.cpp:326
The main, catch-all namespace for Robotics Lab UC3M.
Definition: groups.dox:6
Definition: TrapezoidalTrajectory.hpp:20