libmove3d-planners
|
Represents a discretized joint-space trajectory for CHOMP. More...
#include <chompTrajectory.hpp>
Public Member Functions | |
ChompTrajectory (const API::Trajectory &T, int diff_rule_length, const ChompPlanningGroup &active_joints_) | |
Constructs a trajectory for a given robot model, trajectory duration, and discretization. | |
ChompTrajectory (const ChompTrajectory &source_traj, int diff_rule_length) | |
Constructs a trajectory for a given robot model, number of trajectory points, and discretization. More... | |
virtual | ~ChompTrajectory () |
Destructor. | |
double & | operator() (int traj_point, int joint) |
double | operator() (int traj_point, int joint) const |
Eigen::MatrixXd::RowXpr | getTrajectoryPoint (int traj_point) |
void | getTrajectoryPointP3d (int traj_point, Eigen::VectorXd &jnt_array) const |
Eigen::MatrixXd::ColXpr | getJointTrajectory (int joint) |
int | getNumPoints () const |
Gets the number of points in the trajectory. | |
int | getNumFreePoints () const |
Gets the number of points (that are free to be optimized) in the trajectory. | |
int | getNumJoints () const |
Gets the number of joints in each trajectory point. | |
double | getDiscretization () const |
Gets the discretization time interval of the trajectory. | |
void | fillInMinJerk () |
Generates a minimum jerk trajectory from the start index to end index. More... | |
void | setStartEndIndex (int start_index, int end_index) |
Sets the start and end index for the modifiable part of the trajectory. More... | |
int | getStartIndex () const |
Gets the start index. | |
int | getEndIndex () const |
Gets the end index. | |
Eigen::MatrixXd & | getTrajectory () |
Gets the entire trajectory matrix. | |
Eigen::Block< Eigen::MatrixXd, Eigen::Dynamic, Eigen::Dynamic > | getFreeTrajectoryBlock () |
Gets the block of the trajectory which can be optimized. | |
Eigen::Block< Eigen::MatrixXd, Eigen::Dynamic, Eigen::Dynamic > | getFreeJointTrajectoryBlock (int joint) |
Gets the block of free (optimizable) trajectory for a single joint. | |
void | updateFromGroupTrajectory (const ChompTrajectory &group_trajectory) |
Updates the full trajectory (*this) from the group trajectory. | |
int | getFullTrajectoryIndex (int i) const |
Gets the index in the full trajectory which was copied to this group trajectory. | |
template<typename Derived > | |
void | getJointVelocities (int traj_point, Eigen::MatrixBase< Derived > &velocities) |
Gets the joint velocities at the given trajectory point. | |
double | getDuration () const |
Robot * | getRobot () |
void | print () |
Represents a discretized joint-space trajectory for CHOMP.
ChompTrajectory::ChompTrajectory | ( | const ChompTrajectory & | source_traj, |
int | diff_rule_length | ||
) |
Constructs a trajectory for a given robot model, number of trajectory points, and discretization.
Creates a new containing only the joints of interest, and adds padding to the start and end if needed, to have enough trajectory points for the differentiation rules
void ChompTrajectory::fillInMinJerk | ( | ) |
Generates a minimum jerk trajectory from the start index to end index.
Only modifies points from start_index_ to end_index_, inclusive.
|
inline |
Sets the start and end index for the modifiable part of the trajectory.
(Everything before the start and after the end index is considered fixed) The values default to 1 and getNumPoints()-2