template<typename T>
class drake::trajectories::PiecewiseQuaternionSlerp< T >
A class representing a trajectory for quaternions that are interpolated using piecewise slerp (spherical linear interpolation).
All the orientation samples are expected to be with respect to the same parent reference frame, i.e. q_i represents the rotation R_PBi for the orientation of frame B at the ith sample in a fixed parent frame P. The world frame is a common choice for the parent frame. The angular velocity and acceleration are also relative to the parent frame and expressed in the parent frame. Since there is a sign ambiguity when using quaternions to represent orientation, namely q and -q represent the same orientation, the internal quaternion representations ensure that q_n.dot(q_{n+1}) >= 0. Another intuitive way to think about this is that consecutive quaternions have the shortest geodesic distance on the unit sphere. Note that the quarternion value is in w, x, y, z order when represented as a Vector4.
- Template Parameters
-
|
| | PiecewiseQuaternionSlerp ()=default |
| | Builds an empty PiecewiseQuaternionSlerp. More...
|
| |
| | PiecewiseQuaternionSlerp (const std::vector< T > &breaks, const std::vector< Quaternion< T >> &quaternions) |
| | Builds a PiecewiseQuaternionSlerp. More...
|
| |
| | PiecewiseQuaternionSlerp (const std::vector< T > &breaks, const std::vector< Matrix3< T >> &rotation_matrices) |
| | Builds a PiecewiseQuaternionSlerp. More...
|
| |
| | PiecewiseQuaternionSlerp (const std::vector< T > &breaks, const std::vector< math::RotationMatrix< T >> &rotation_matrices) |
| | Builds a PiecewiseQuaternionSlerp. More...
|
| |
| | PiecewiseQuaternionSlerp (const std::vector< T > &breaks, const std::vector< AngleAxis< T >> &angle_axes) |
| | Builds a PiecewiseQuaternionSlerp. More...
|
| |
| | ~PiecewiseQuaternionSlerp () final |
| |
| Quaternion< T > | orientation (const T &time) const |
| | Interpolates orientation. More...
|
| |
| Vector3< T > | angular_velocity (const T &time) const |
| | Interpolates angular velocity. More...
|
| |
| Vector3< T > | angular_acceleration (const T &time) const |
| | Interpolates angular acceleration. More...
|
| |
| const std::vector< Quaternion< T > > & | get_quaternion_samples () const |
| | Getter for the internal quaternion samples. More...
|
| |
| bool | is_approx (const PiecewiseQuaternionSlerp< T > &other, double tol) const |
| | Returns true if all the corresponding segment times are within tol seconds, and the angle difference between the corresponding quaternion sample points are within tol (using ExtractDoubleOrThrow). More...
|
| |
| void | Append (const T &time, const Quaternion< T > &quaternion) |
| | Given a new Quaternion, this method adds one segment to the end of this. More...
|
| |
| void | Append (const T &time, const math::RotationMatrix< T > &rotation_matrix) |
| | Given a new RotationMatrix, this method adds one segment to the end of this. More...
|
| |
| void | Append (const T &time, const AngleAxis< T > &angle_axis) |
| | Given a new AngleAxis, this method adds one segment to the end of this. More...
|
| |
|
| | PiecewiseQuaternionSlerp (const PiecewiseQuaternionSlerp &)=default |
| |
| PiecewiseQuaternionSlerp & | operator= (const PiecewiseQuaternionSlerp &)=default |
| |
| | PiecewiseQuaternionSlerp (PiecewiseQuaternionSlerp &&)=default |
| |
| PiecewiseQuaternionSlerp & | operator= (PiecewiseQuaternionSlerp &&)=default |
| |
| | ~PiecewiseTrajectory () override |
| |
| int | get_number_of_segments () const |
| |
| T | start_time (int segment_number) const |
| |
| T | end_time (int segment_number) const |
| |
| T | duration (int segment_number) const |
| |
| boolean< T > | is_time_in_range (const T &t) const |
| | Returns true iff t >= getStartTime() && t <= getEndTime(). More...
|
| |
| int | get_segment_index (const T &t) const |
| |
| const std::vector< T > & | get_segment_times () const |
| |
| void | segment_number_range_check (int segment_number) const |
| |
| virtual | ~Trajectory () |
| |
| std::unique_ptr< Trajectory< T > > | Clone () const |
| |
| MatrixX< T > | value (const T &t) const |
| | Evaluates the trajectory at the given time t. More...
|
| |
| MatrixX< T > | vector_values (const std::vector< T > &t) const |
| | If cols()==1, then evaluates the trajectory at each time t, and returns the results as a Matrix with the ith column corresponding to the ith time. More...
|
| |
| MatrixX< T > | vector_values (const Eigen::Ref< const VectorX< T >> &t) const |
| | If cols()==1, then evaluates the trajectory at each time t, and returns the results as a Matrix with the ith column corresponding to the ith time. More...
|
| |
| bool | has_derivative () const |
| | Returns true iff the Trajectory provides and implementation for EvalDerivative() and MakeDerivative(). More...
|
| |
| MatrixX< T > | EvalDerivative (const T &t, int derivative_order=1) const |
| | Evaluates the derivative of this at the given time t. More...
|
| |
| std::unique_ptr< Trajectory< T > > | MakeDerivative (int derivative_order=1) const |
| | Takes the derivative of this Trajectory. More...
|
| |
| Eigen::Index | rows () const |
| |
| Eigen::Index | cols () const |
| |
| T | start_time () const |
| |
| T | end_time () const |
| |