Robowflex
v0.1
Making MoveIt Easy
|
A SO(3) joint modeled with quaternions. More...
#include <joints.h>
Public Member Functions | |
SO3Joint (StateSpace *space, dart::dynamics::Joint *joint) | |
Constructor. More... | |
Eigen::Quaterniond | toQuat (const Eigen::Ref< const Eigen::VectorXd > &a) const |
Get the quaternion corresponding to the joint configuration. More... | |
void | setQuat (Eigen::Ref< Eigen::VectorXd > a, const Eigen::Quaterniond &q) const |
Set the joint configuration to a quaternion. More... | |
double | distance (const Eigen::Ref< const Eigen::VectorXd > &a, const Eigen::Ref< const Eigen::VectorXd > &b) const override |
Compute the distance between two joint configurations. More... | |
double | getMaximumExtent () const override |
Get the maximum extent of this joint (maximum distance). More... | |
void | interpolate (const Eigen::Ref< const Eigen::VectorXd > &a, const Eigen::Ref< const Eigen::VectorXd > &b, double t, Eigen::Ref< Eigen::VectorXd > c) const override |
Interpolate to a new configuration c which is t from a to b. More... | |
void | enforceBounds (Eigen::Ref< Eigen::VectorXd > a) const override |
Enforce bounds on a joint configuration. More... | |
bool | satisfiesBounds (const Eigen::Ref< const Eigen::VectorXd > &a) const override |
Check if a joint configuration satisfies bounds. More... | |
void | sample (Eigen::Ref< Eigen::VectorXd > a) const override |
Sample a configuration for this joint. More... | |
void | sampleNear (Eigen::Ref< Eigen::VectorXd > a, const Eigen::Ref< const Eigen::VectorXd > &near, double r) const override |
Sample a configuration for this joint near another configuration near. More... | |
void | setJointState (WorldPtr world, const Eigen::Ref< const Eigen::VectorXd > &a) const override |
Set the state of the joint in world. More... | |
void | getJointState (WorldPtr world, Eigen::Ref< Eigen::VectorXd > a) const override |
Get the state of the joint in world. More... | |
Public Member Functions inherited from robowflex::darts::Joint | |
Joint (StateSpace *space, unsigned int skelIndex, unsigned int jointIndex, unsigned int sizeInSpace, unsigned int startIndex, unsigned int numDof) | |
Constructor. More... | |
Joint (StateSpace *space, dart::dynamics::Joint *joint, unsigned int sizeInSpace, unsigned int startIndex=0, unsigned int numDof=0) | |
Constructor. More... | |
Eigen::Ref< Eigen::VectorXd > | getSpaceVars (Eigen::Ref< Eigen::VectorXd > a) |
Gets the joint configuration (subvector of variables for this joint) from a configuration. More... | |
Eigen::Ref< const Eigen::VectorXd > | getSpaceVarsConst (const Eigen::Ref< const Eigen::VectorXd > &a) |
Gets the subvector of variables for this joint from a configuration. More... | |
const std::vector< std::size_t > & | getIndices () const |
Get the indices in the skeleton for this joint. More... | |
const std::vector< std::string > & | getDofs () const |
Get the names of the DoF in the skeleton for this joint. More... | |
std::size_t | getSkeletonIndex () const |
Get the index of the skeleton for this joint in the world. More... | |
std::size_t | getJointIndex () const |
Get the index of the joint in the skeleton. More... | |
std::size_t | getDimension () const |
Get the dimension of this joint. More... | |
virtual void | setUpperLimits (const Eigen::Ref< const Eigen::VectorXd > &v) |
Set the upper limits of a joint. More... | |
virtual void | setLowerLimits (const Eigen::Ref< const Eigen::VectorXd > &v) |
Set the lower limits of a joint. More... | |
virtual Eigen::VectorXd | getUpperLimits () const |
Get the upper limits of a joint. More... | |
virtual Eigen::VectorXd | getLowerLimits () const |
Get the lower limits of a joint. More... | |
dart::dynamics::Joint * | getJoint (WorldPtr world) const |
Get the Dart joint from a world. More... | |
Additional Inherited Members | |
Protected Attributes inherited from robowflex::darts::Joint | |
StateSpace * | space_ |
State space this joint is for. More... | |
ompl::RNG & | rng_ |
Random number generator. More... | |
std::vector< std::size_t > | indices_ |
Indices this joint corresponds to. More... | |
std::vector< std::string > | dofs_ |
Controlled DoF names. More... | |
unsigned int | skelIndex_ |
Index of skeleton. More... | |
unsigned int | jointIndex_ |
Index of joint. More... | |
unsigned int | startInSpace_ |
Start index in space configuration. More... | |
unsigned int | sizeInSpace_ |
Size of joint in space configuration. More... | |
unsigned int | startIndex_ |
Start index in joint. More... | |
unsigned int | numDof_ |
Number of DoF this joint controls. More... | |
SO3Joint::SO3Joint | ( | StateSpace * | space, |
dart::dynamics::Joint * | joint | ||
) |
Constructor.
[in] | space | State space. |
[in] | joint | Joint. |
Definition at line 11 of file so3joint.cpp.
|
overridevirtual |
Compute the distance between two joint configurations.
Implements robowflex::darts::Joint.
Definition at line 35 of file so3joint.cpp.
|
overridevirtual |
Enforce bounds on a joint configuration.
[in,out] | a | Joint configuration to modify. |
Implements robowflex::darts::Joint.
Definition at line 55 of file so3joint.cpp.
|
overridevirtual |
Get the state of the joint in world.
Reimplemented from robowflex::darts::Joint.
Definition at line 109 of file so3joint.cpp.
|
overridevirtual |
Get the maximum extent of this joint (maximum distance).
Implements robowflex::darts::Joint.
Definition at line 41 of file so3joint.cpp.
|
overridevirtual |
Interpolate to a new configuration c which is t from a to b.
[in] | a | Joint configuration a. |
[in] | b | Joint configuration b. |
[in] | t | Amount to interpolate. |
[out] | c | Interpolated configuration. |
Implements robowflex::darts::Joint.
Definition at line 46 of file so3joint.cpp.
|
overridevirtual |
Sample a configuration for this joint.
[out] | a | Joint configuration to sample. |
Implements robowflex::darts::Joint.
Definition at line 67 of file so3joint.cpp.
|
overridevirtual |
Sample a configuration for this joint near another configuration near.
[out] | a | Joint configuration to sample. |
[in] | near | Joint configuration to sample near. |
[in] | r | Distance from near to sample within. |
Implements robowflex::darts::Joint.
Definition at line 77 of file so3joint.cpp.
|
overridevirtual |
Check if a joint configuration satisfies bounds.
[in,out] | a | Joint configuration to check. |
Implements robowflex::darts::Joint.
Definition at line 61 of file so3joint.cpp.
|
overridevirtual |
Set the state of the joint in world.
Reimplemented from robowflex::darts::Joint.
Definition at line 97 of file so3joint.cpp.
void SO3Joint::setQuat | ( | Eigen::Ref< Eigen::VectorXd > | a, |
const Eigen::Quaterniond & | q | ||
) | const |
Set the joint configuration to a quaternion.
[out] | a | Joint configuration. |
[in] | q | Quaternion to set. |
Definition at line 26 of file so3joint.cpp.
Eigen::Quaterniond SO3Joint::toQuat | ( | const Eigen::Ref< const Eigen::VectorXd > & | a | ) | const |
Get the quaternion corresponding to the joint configuration.
[in] | a | Joint configuration. |
Definition at line 21 of file so3joint.cpp.