ocra-recipes
Doxygen documentation for the ocra-recipes repository
|
#include <Trajectory.h>
Public Member Functions | |
Trajectory () | |
void | setMaxVelocity (double newMaxVel) |
void | setMaxVelocity (const Eigen::VectorXd &newMaxVel) |
double | getMaxVelocity () |
Eigen::VectorXd | getMaxVelocityVector () |
void | setMaxAcceleration (double newMaxAcc) |
void | setMaxAcceleration (const Eigen::VectorXd &newMaxAcc) |
double | getMaxAcceleration () |
Eigen::VectorXd | getMaxAccelerationVector () |
void | setWaypoints (const std::vector< double > &startingDoubleVec, const std::vector< double > &endingDoubleVec, const int waypointSelector=0, bool endsWithQuaternion=false) |
void | setWaypoints (const Eigen::VectorXd &startingVector, const Eigen::VectorXd &endingVector, bool endsWithQuaternion=false) |
void | setWaypoints (Eigen::Displacementd &startingDisplacement, Eigen::Displacementd &endingDisplacement, bool endsWithQuaternion=true) |
void | setWaypoints (Eigen::Rotation3d &startingOrientation, Eigen::Rotation3d &endingOrientation, bool endsWithQuaternion=true) |
void | setWaypoints (const std::list< Eigen::VectorXd > &_waypoints, bool _endsWithQuaternion=false) |
void | setWaypoints (Eigen::MatrixXd &waypoints, bool endsWithQuaternion=false) |
virtual | ~Trajectory () |
void | setDuration () |
void | setDuration (const Eigen::VectorXd &_pointToPointDurationVector) |
void | setDuration (double time) |
bool | isFinished () |
virtual Eigen::MatrixXd | getDesiredValues (double time) |
virtual void | getDesiredValues (double time, Eigen::MatrixXd &desiredValues, Eigen::VectorXd &variance) |
Eigen::MatrixXd | getFullTrajectory (double dt=0.01) |
void | getDesiredValues (double time, std::vector< double > &doubleVec) |
void | getDesiredValues (double time, Eigen::Displacementd &disp) |
void | getDesiredValues (double time, Eigen::Rotation3d &orient) |
void | getDesiredValues (double time, Eigen::Displacementd &pos, Eigen::Twistd &vel, Eigen::Twistd &acc) |
virtual double | getDuration () |
Eigen::Rotation3d | quaternionSlerp (double tau, Eigen::Rotation3d &qStart, Eigen::Rotation3d &qEnd) |
Eigen::VectorXd | displacementToEigenVector (Eigen::Displacementd &disp) |
Eigen::VectorXd | quaternionToEigenVector (Eigen::Rotation3d &quat) |
bool | eigenVectorToStdVector (const Eigen::VectorXd &dispVec, std::vector< double > &doubleVec) |
bool | eigenMatrixToStdVector (const Eigen::MatrixXd &dispMat, std::vector< double > &doubleVec) |
bool | eigenVectorToDisplacement (const Eigen::VectorXd &dispVec, Eigen::Displacementd &disp) |
bool | eigenVectorToQuaternion (const Eigen::VectorXd &quatVec, Eigen::Rotation3d &quat) |
bool | eigenVectorToTwist (const Eigen::VectorXd &twistVec, Eigen::Twistd &twist) |
virtual void | recalculateTrajectory () |
Protected Member Functions | |
virtual void | initializeTrajectory () |
Protected Attributes | |
double | maximumVelocity |
Eigen::VectorXd | maximumVelocityVector |
double | maximumAcceleration |
Eigen::VectorXd | maximumAccelerationVector |
std::list< Eigen::VectorXd > | waypointList |
Eigen::MatrixXd | waypoints |
int | nDoF |
int | nWaypoints |
bool | endsWithQuaternion |
bool | startTrigger |
int | currentWaypointIndex |
int | nonRotationDof |
Eigen::VectorXd | pointToPointDurationVector |
double | pointToPointDuration |
double | totalTrajectoryDuration |
bool | usingDurationVector |
bool | trajectoryFinished |
Definition at line 31 of file Trajectory.h.
ocra::Trajectory::Trajectory | ( | ) |
The Trajectory class. Constructor function.
Definition at line 18 of file Trajectory.cpp.
|
virtual |
Definition at line 25 of file Trajectory.cpp.
Eigen::VectorXd ocra::Trajectory::displacementToEigenVector | ( | Eigen::Displacementd & | _disp | ) |
Useful auxiliary functions
Convert from a Displacement (double) to and Eigen Vector (double) Stored as [x, y, z, qw, qx, qy, qz]^T
Definition at line 334 of file Trajectory.cpp.
bool ocra::Trajectory::eigenMatrixToStdVector | ( | const Eigen::MatrixXd & | dispMat, |
std::vector< double > & | doubleVec | ||
) |
Definition at line 384 of file Trajectory.cpp.
bool ocra::Trajectory::eigenVectorToDisplacement | ( | const Eigen::VectorXd & | dispVec, |
Eigen::Displacementd & | disp | ||
) |
Definition at line 402 of file Trajectory.cpp.
bool ocra::Trajectory::eigenVectorToQuaternion | ( | const Eigen::VectorXd & | quatVec, |
Eigen::Rotation3d & | quat | ||
) |
Definition at line 435 of file Trajectory.cpp.
bool ocra::Trajectory::eigenVectorToStdVector | ( | const Eigen::VectorXd & | dispVec, |
std::vector< double > & | doubleVec | ||
) |
Definition at line 372 of file Trajectory.cpp.
bool ocra::Trajectory::eigenVectorToTwist | ( | const Eigen::VectorXd & | twistVec, |
Eigen::Twistd & | twist | ||
) |
Definition at line 451 of file Trajectory.cpp.
|
inlinevirtual |
Reimplemented in ocra::GaussianProcessTrajectory, ocra::ExperimentalTrajectory, ocra::TimeOptimalTrajectory, ocra::LinearInterpolationTrajectory, and ocra::MinimumJerkTrajectory.
Definition at line 71 of file Trajectory.h.
|
inlinevirtual |
Reimplemented in ocra::GaussianProcessTrajectory, and ocra::ExperimentalTrajectory.
Definition at line 74 of file Trajectory.h.
void ocra::Trajectory::getDesiredValues | ( | double | time, |
std::vector< double > & | doubleVec | ||
) |
Definition at line 204 of file Trajectory.cpp.
void ocra::Trajectory::getDesiredValues | ( | double | time, |
Eigen::Displacementd & | disp | ||
) |
Definition at line 213 of file Trajectory.cpp.
void ocra::Trajectory::getDesiredValues | ( | double | time, |
Eigen::Rotation3d & | orient | ||
) |
Definition at line 220 of file Trajectory.cpp.
void ocra::Trajectory::getDesiredValues | ( | double | time, |
Eigen::Displacementd & | pos, | ||
Eigen::Twistd & | vel, | ||
Eigen::Twistd & | acc | ||
) |
Definition at line 227 of file Trajectory.cpp.
|
inlinevirtual |
Reimplemented in ocra::GaussianProcessTrajectory, and ocra::TimeOptimalTrajectory.
Definition at line 89 of file Trajectory.h.
Eigen::MatrixXd ocra::Trajectory::getFullTrajectory | ( | double | dt = 0.01 | ) |
Definition at line 484 of file Trajectory.cpp.
double ocra::Trajectory::getMaxAcceleration | ( | ) |
Definition at line 194 of file Trajectory.cpp.
Eigen::VectorXd ocra::Trajectory::getMaxAccelerationVector | ( | ) |
Definition at line 199 of file Trajectory.cpp.
double ocra::Trajectory::getMaxVelocity | ( | ) |
Definition at line 167 of file Trajectory.cpp.
Eigen::VectorXd ocra::Trajectory::getMaxVelocityVector | ( | ) |
Definition at line 172 of file Trajectory.cpp.
|
inlineprotectedvirtual |
Reimplemented in ocra::GaussianProcessTrajectory, ocra::ExperimentalTrajectory, and ocra::TimeOptimalTrajectory.
Definition at line 108 of file Trajectory.h.
|
inline |
Definition at line 67 of file Trajectory.h.
Eigen::Rotation3d ocra::Trajectory::quaternionSlerp | ( | double | tau, |
Eigen::Rotation3d & | qStart, | ||
Eigen::Rotation3d & | qEnd | ||
) |
_tau | Interpolation variable, 0 <= tau <= 1. Should be something like time/duration. |
_qStart | Starting quaternion |
_qEnd | Ending quaternion |
Definition at line 241 of file Trajectory.cpp.
Eigen::VectorXd ocra::Trajectory::quaternionToEigenVector | ( | Eigen::Rotation3d & | quat | ) |
Convert from a Quaternion (double) to and Eigen Vector (double) Stored as [qw, qx, qy, qz]^T
Definition at line 355 of file Trajectory.cpp.
|
inlinevirtual |
Reimplemented in ocra::TimeOptimalTrajectory.
Definition at line 104 of file Trajectory.h.
void ocra::Trajectory::setDuration | ( | ) |
Definition at line 284 of file Trajectory.cpp.
void ocra::Trajectory::setDuration | ( | const Eigen::VectorXd & | _pointToPointDurationVector | ) |
Definition at line 300 of file Trajectory.cpp.
void ocra::Trajectory::setDuration | ( | double | time | ) |
Definition at line 314 of file Trajectory.cpp.
void ocra::Trajectory::setMaxAcceleration | ( | double | newMaxAcc | ) |
Definition at line 177 of file Trajectory.cpp.
void ocra::Trajectory::setMaxAcceleration | ( | const Eigen::VectorXd & | newMaxAcc | ) |
Definition at line 185 of file Trajectory.cpp.
void ocra::Trajectory::setMaxVelocity | ( | double | newMaxVel | ) |
Definition at line 150 of file Trajectory.cpp.
void ocra::Trajectory::setMaxVelocity | ( | const Eigen::VectorXd & | newMaxVel | ) |
Definition at line 158 of file Trajectory.cpp.
void ocra::Trajectory::setWaypoints | ( | const std::vector< double > & | startingDoubleVec, |
const std::vector< double > & | endingDoubleVec, | ||
const int | waypointSelector = 0 , |
||
bool | endsWithQuaternion = false |
||
) |
Definition at line 30 of file Trajectory.cpp.
void ocra::Trajectory::setWaypoints | ( | const Eigen::VectorXd & | startingVector, |
const Eigen::VectorXd & | endingVector, | ||
bool | endsWithQuaternion = false |
||
) |
Definition at line 58 of file Trajectory.cpp.
void ocra::Trajectory::setWaypoints | ( | Eigen::Displacementd & | startingDisplacement, |
Eigen::Displacementd & | endingDisplacement, | ||
bool | endsWithQuaternion = true |
||
) |
Definition at line 76 of file Trajectory.cpp.
void ocra::Trajectory::setWaypoints | ( | Eigen::Rotation3d & | startingOrientation, |
Eigen::Rotation3d & | endingOrientation, | ||
bool | endsWithQuaternion = true |
||
) |
Definition at line 93 of file Trajectory.cpp.
void ocra::Trajectory::setWaypoints | ( | const std::list< Eigen::VectorXd > & | _waypoints, |
bool | _endsWithQuaternion = false |
||
) |
Initialization function
Definition at line 111 of file Trajectory.cpp.
void ocra::Trajectory::setWaypoints | ( | Eigen::MatrixXd & | waypoints, |
bool | endsWithQuaternion = false |
||
) |
Initialization function
Definition at line 129 of file Trajectory.cpp.
|
protected |
used for keeping track of waypoints during execution
Definition at line 122 of file Trajectory.h.
|
protected |
weather or not there is a quaternion component of the trajectory - this is needed for interpolation considerations
Definition at line 120 of file Trajectory.h.
|
protected |
Definition at line 112 of file Trajectory.h.
|
protected |
Definition at line 113 of file Trajectory.h.
|
protected |
Definition at line 108 of file Trajectory.h.
|
protected |
Definition at line 111 of file Trajectory.h.
|
protected |
the number of Degrees of Freedom (DoF) of the trajectory
Definition at line 118 of file Trajectory.h.
|
protected |
the number of DoF which are not part of the quaternion
Definition at line 123 of file Trajectory.h.
|
protected |
the total number of waypoints
Definition at line 119 of file Trajectory.h.
|
protected |
the total duration between the current two waypoints
Definition at line 127 of file Trajectory.h.
|
protected |
the estimated durations between points
Definition at line 126 of file Trajectory.h.
|
protected |
used for zeroing the trajectory time
Definition at line 121 of file Trajectory.h.
|
protected |
Definition at line 128 of file Trajectory.h.
|
protected |
Definition at line 130 of file Trajectory.h.
|
protected |
Definition at line 129 of file Trajectory.h.
|
protected |
Definition at line 116 of file Trajectory.h.
|
protected |
the trajectory waypoints
Definition at line 117 of file Trajectory.h.