Linear interpolation motion Each Motion is assumed to have constant linear velocity and angular velocity The motion is R(t)(p - p_ref) + p_ref + T(t) Therefore, R(0) = R0, R(1) = R1 T(0) = T0 + R0 p_ref - p_ref T(1) = T1 + R1 p_ref - p_ref. More...
#include <motion.h>
Public Member Functions | |
template<> | |
FCL_REAL | computeMotionBound (const RSS &bv, const Vec3f &n) const |
FCL_REAL | computeMotionBound (const BV &bv, const Vec3f &n) const |
Compute the motion bound for a bounding volume along a given direction n For general BV, not implemented so return trivial 0. | |
FCL_REAL | computeMotionBound (const Vec3f &a, const Vec3f &b, const Vec3f &c, const Vec3f &n) const |
Compute the motion bound for a triangle along a given direction n according to mu < |v * n| + ||w x n||(max||ci*||) where ||ci*|| = ||R0(ci) x w|| / \|w\|. w is the angular velocity and ci are the triangle vertex coordinates. Notice that the triangle is in the local frame of the object, but n should be in the global frame (the reason is that the motion (t1, t2 and t) is in global frame) | |
template<> | |
FCL_REAL | computeMotionBound (const RSS &bv, const Vec3f &n) const |
void | getCurrentRotation (Matrix3f &R) const |
void | getCurrentTransform (Matrix3f &R, Vec3f &T) const |
Get the rotation and translation in current step. | |
void | getCurrentTransform (Transform3f &tf_) const |
void | getCurrentTranslation (Vec3f &T) const |
bool | integrate (double dt) |
Integrate the motion from 0 to dt We compute the current transformation from zero point instead of from last integrate time, for precision. | |
InterpMotion () | |
Default transformations are all identities. | |
InterpMotion (const Matrix3f &R1, const Vec3f &T1, const Matrix3f &R2, const Vec3f &T2) | |
Construct motion from the initial rotation/translation and goal rotation/translation. | |
InterpMotion (const Transform3f &tf1_, const Transform3f &tf2_) | |
InterpMotion (const Matrix3f &R1, const Vec3f &T1, const Matrix3f &R2, const Vec3f &T2, const Vec3f &O) | |
Construct motion from the initial rotation/translation and goal rotation/translation related to some rotation center. | |
InterpMotion (const Transform3f &tf1_, const Transform3f &tf2_, const Vec3f &O) | |
Protected Member Functions | |
Quaternion3f | absoluteRotation (FCL_REAL dt) const |
void | computeVelocity () |
Quaternion3f | deltaRotation (FCL_REAL dt) const |
Protected Attributes | |
Vec3f | angular_axis |
Angular velocity axis. | |
FCL_REAL | angular_vel |
Angular speed. | |
Vec3f | linear_vel |
Linear velocity. | |
Vec3f | reference_p |
Reference point for the motion (in the object's local frame) | |
Transform3f | tf |
The transformation at current time t. | |
Transform3f | tf1 |
The transformation at time 0. | |
Transform3f | tf2 |
The transformation at time 1. |
Linear interpolation motion Each Motion is assumed to have constant linear velocity and angular velocity The motion is R(t)(p - p_ref) + p_ref + T(t) Therefore, R(0) = R0, R(1) = R1 T(0) = T0 + R0 p_ref - p_ref T(1) = T1 + R1 p_ref - p_ref.
fcl::InterpMotion< BV >::InterpMotion | ( | ) | [inline] |
fcl::InterpMotion< BV >::InterpMotion | ( | const Matrix3f & | R1, |
const Vec3f & | T1, | ||
const Matrix3f & | R2, | ||
const Vec3f & | T2 | ||
) | [inline] |
fcl::InterpMotion< BV >::InterpMotion | ( | const Transform3f & | tf1_, |
const Transform3f & | tf2_ | ||
) | [inline] |
fcl::InterpMotion< BV >::InterpMotion | ( | const Matrix3f & | R1, |
const Vec3f & | T1, | ||
const Matrix3f & | R2, | ||
const Vec3f & | T2, | ||
const Vec3f & | O | ||
) | [inline] |
fcl::InterpMotion< BV >::InterpMotion | ( | const Transform3f & | tf1_, |
const Transform3f & | tf2_, | ||
const Vec3f & | O | ||
) | [inline] |
Quaternion3f fcl::InterpMotion< BV >::absoluteRotation | ( | FCL_REAL | dt | ) | const [inline, protected] |
FCL_REAL fcl::InterpMotion< RSS >::computeMotionBound | ( | const RSS & | bv, |
const Vec3f & | n | ||
) | const |
Definition at line 44 of file motion.cpp.
FCL_REAL fcl::InterpMotion< BV >::computeMotionBound | ( | const BV & | bv, |
const Vec3f & | n | ||
) | const [inline, virtual] |
Compute the motion bound for a bounding volume along a given direction n For general BV, not implemented so return trivial 0.
Implements fcl::MotionBase< BV >.
FCL_REAL fcl::InterpMotion< BV >::computeMotionBound | ( | const Vec3f & | a, |
const Vec3f & | b, | ||
const Vec3f & | c, | ||
const Vec3f & | n | ||
) | const [inline, virtual] |
Compute the motion bound for a triangle along a given direction n according to mu < |v * n| + ||w x n||(max||ci*||) where ||ci*|| = ||R0(ci) x w|| / \|w\|. w is the angular velocity and ci are the triangle vertex coordinates. Notice that the triangle is in the local frame of the object, but n should be in the global frame (the reason is that the motion (t1, t2 and t) is in global frame)
Implements fcl::MotionBase< BV >.
FCL_REAL fcl::InterpMotion< RSS >::computeMotionBound | ( | const RSS & | bv, |
const Vec3f & | n | ||
) | const |
void fcl::InterpMotion< BV >::computeVelocity | ( | ) | [inline, protected] |
Quaternion3f fcl::InterpMotion< BV >::deltaRotation | ( | FCL_REAL | dt | ) | const [inline, protected] |
void fcl::InterpMotion< BV >::getCurrentRotation | ( | Matrix3f & | R | ) | const [inline, virtual] |
Implements fcl::MotionBase< BV >.
void fcl::InterpMotion< BV >::getCurrentTransform | ( | Matrix3f & | R, |
Vec3f & | T | ||
) | const [inline, virtual] |
Get the rotation and translation in current step.
Implements fcl::MotionBase< BV >.
void fcl::InterpMotion< BV >::getCurrentTransform | ( | Transform3f & | tf_ | ) | const [inline, virtual] |
Implements fcl::MotionBase< BV >.
void fcl::InterpMotion< BV >::getCurrentTranslation | ( | Vec3f & | T | ) | const [inline, virtual] |
Implements fcl::MotionBase< BV >.
bool fcl::InterpMotion< BV >::integrate | ( | double | dt | ) | [inline, virtual] |
Integrate the motion from 0 to dt We compute the current transformation from zero point instead of from last integrate time, for precision.
Implements fcl::MotionBase< BV >.
Vec3f fcl::InterpMotion< BV >::angular_axis [protected] |
FCL_REAL fcl::InterpMotion< BV >::angular_vel [protected] |
Vec3f fcl::InterpMotion< BV >::linear_vel [protected] |
Vec3f fcl::InterpMotion< BV >::reference_p [protected] |
Transform3f fcl::InterpMotion< BV >::tf [protected] |
Transform3f fcl::InterpMotion< BV >::tf1 [protected] |
Transform3f fcl::InterpMotion< BV >::tf2 [protected] |