Robotics Library
0.7.0
|
#include <Kinematics.h>
Public Member Functions | |
Kinematics () | |
virtual | ~Kinematics () |
bool | areColliding (const ::std::size_t &i, const ::std::size_t &j) const |
See if specified bodies should be tested for collisions with each other. More... | |
virtual void | clip (::rl::math::Vector &q) const |
Clip specified configuration to be within joint limits. More... | |
virtual Kinematics * | clone () const |
virtual ::rl::math::Real | distance (const ::rl::math::Vector &q1, const ::rl::math::Vector &q2) const |
Calculate distance measure between specified configuration. More... | |
virtual const ::rl::math::Transform & | forwardPosition (const ::std::size_t &i=0) const |
Get forward position kinematics. More... | |
virtual void | forwardForce (const ::rl::math::Vector &tau, ::rl::math::Vector &f) const |
Calculate forward force kinematics. More... | |
virtual void | forwardVelocity (const ::rl::math::Vector &qdot, ::rl::math::Vector &xdot) const |
Calculate forward velocity kinematics. More... | |
::rl::math::Vector | generatePositionGaussian (const ::rl::math::Vector &rand, const ::rl::math::Vector &mean, const ::rl::math::Vector &sigma) const |
::rl::math::Vector | generatePositionUniform (const ::rl::math::Vector &rand) const |
::std::size_t | getBodies () const |
Get number of links. More... | |
::std::size_t | getDof () const |
Get number of degrees of freedom (DOF). More... | |
const ::rl::math::Transform & | getFrame (const ::std::size_t &i) const |
Get link frame. More... | |
const ::rl::math::Matrix & | getJacobian () const |
Get Jacobian. More... | |
const ::rl::math::Matrix & | getJacobianInverse () const |
Get Jacobian-Inverse. More... | |
Joint * | getJoint (const ::std::size_t &i) const |
::rl::math::Real | getManipulabilityMeasure () const |
Get manipulability measure. More... | |
::std::string | getManufacturer () const |
::rl::math::Real | getMaximum (const ::std::size_t &i) const |
void | getMaximum (::rl::math::Vector &max) const |
::rl::math::Real | getMinimum (const ::std::size_t &i) const |
void | getMinimum (::rl::math::Vector &min) const |
::std::string | getName () const |
::std::size_t | getOperationalDof () const |
Get number of end effectors. More... | |
void | getPosition (::rl::math::Vector &q) const |
Get current joint position. More... | |
void | getPositionUnits (::Eigen::Matrix< ::rl::math::Unit, ::Eigen::Dynamic, 1 > &units) const |
void | getSpeed (::rl::math::Vector &speed) const |
void | getSpeedUnits (::Eigen::Matrix< ::rl::math::Unit, ::Eigen::Dynamic, 1 > &units) const |
virtual void | interpolate (const ::rl::math::Vector &q1, const ::rl::math::Vector &q2, const ::rl::math::Real &alpha, ::rl::math::Vector &q) const |
virtual void | inverseForce (const ::rl::math::Vector &f, ::rl::math::Vector &tau) const |
Calculate inverse force kinematics. More... | |
virtual ::rl::math::Real | inverseOfTransformedDistance (const ::rl::math::Real &d) const |
virtual bool | inversePosition (const ::rl::math::Transform &x, ::rl::math::Vector &q, const ::std::size_t &leaf=0, const ::rl::math::Real &delta=::std::numeric_limits< ::rl::math::Real >::infinity(), const ::rl::math::Real &epsilon=1.0e-3f, const ::std::size_t &iterations=1000) |
Calculate inverse position kinematics. More... | |
virtual void | inverseVelocity (const ::rl::math::Vector &xdot, ::rl::math::Vector &qdot) const |
Calculate inverse velocity kinematics. More... | |
bool | isColliding (const ::std::size_t &i) const |
See if specified body should be tested for collisions with the environment. More... | |
virtual bool | isSingular () const |
Check if current configuration is singular. More... | |
virtual bool | isValid (const ::rl::math::Vector &q) const |
Check if specified configuration is within joint limits. More... | |
virtual ::rl::math::Real | maxDistanceToRectangle (const ::rl::math::Vector &q, const ::rl::math::Vector &min, const ::rl::math::Vector &max) const |
virtual ::rl::math::Real | minDistanceToRectangle (const ::rl::math::Vector &q, const ::rl::math::Vector &min, const ::rl::math::Vector &max) const |
virtual ::rl::math::Real | minDistanceToRectangle (const ::rl::math::Real &q, const ::rl::math::Real &min, const ::rl::math::Real &max, const ::std::size_t &cuttingDimension) const |
virtual ::rl::math::Real | newDistance (const ::rl::math::Real &dist, const ::rl::math::Real &oldOff, const ::rl::math::Real &newOff, const int &cuttingDimension) const |
void | setColliding (const ::std::size_t &i, const bool &doesCollide) |
Set if specified body should be tested for collisions with the environment. More... | |
void | setColliding (const ::std::size_t &i, const ::std::size_t &j, const bool &doCollide) |
Set if specified bodies should be tested for collisions with each other. More... | |
void | setPosition (const ::rl::math::Vector &q) |
Update current joint position. More... | |
virtual void | step (const ::rl::math::Vector &q1, const ::rl::math::Vector &qdot, ::rl::math::Vector &q2) const |
::rl::math::Transform & | tool (const ::std::size_t &i=0) |
const ::rl::math::Transform & | tool (const ::std::size_t &i=0) const |
virtual ::rl::math::Real | transformedDistance (const ::rl::math::Real &d) const |
virtual ::rl::math::Real | transformedDistance (const ::rl::math::Vector &q1, const ::rl::math::Vector &q2) const |
virtual ::rl::math::Real | transformedDistance (const ::rl::math::Real &q1, const ::rl::math::Real &q2, const ::std::size_t &i) const |
virtual void | updateFrames () |
Update frames. More... | |
virtual void | updateJacobian () |
Update Jacobian. More... | |
virtual void | updateJacobianInverse (const ::rl::math::Real &lambda=0.0f, const bool &doSvd=true) |
Update Jacobian-Inverse. More... | |
::rl::math::Transform & | world () |
const ::rl::math::Transform & | world () const |
Static Public Member Functions | |
static Kinematics * | create (const ::std::string &filename) |
Protected Types | |
typedef ::boost::adjacency_list< ::boost::vecS, ::boost::vecS, ::boost::bidirectionalS, ::std::shared_ptr< Frame >, ::std::shared_ptr< Transform >, ::boost::no_property, ::boost::vecS > | Tree |
typedef ::boost::graph_traits< Tree >::edge_descriptor | Edge |
typedef ::boost::graph_traits< Tree >::edge_iterator | EdgeIterator |
typedef ::std::pair< EdgeIterator, EdgeIterator > | EdgeIteratorPair |
typedef ::boost::graph_traits< Tree >::in_edge_iterator | InEdgeIterator |
typedef ::std::pair< InEdgeIterator, InEdgeIterator > | InEdgeIteratorPair |
typedef ::boost::graph_traits< Tree >::out_edge_iterator | OutEdgeIterator |
typedef ::std::pair< OutEdgeIterator, OutEdgeIterator > | OutEdgeIteratorPair |
typedef ::boost::graph_traits< Tree >::vertex_descriptor | Vertex |
typedef ::boost::graph_traits< Tree >::vertex_iterator | VertexIterator |
typedef ::std::pair< VertexIterator, VertexIterator > | VertexIteratorPair |
Protected Member Functions | |
void | update () |
void | update (Vertex &u) |
Protected Attributes | |
::std::vector< Element * > | elements |
::std::vector< Frame * > | frames |
::std::vector< Vertex > | leaves |
::std::vector< Link * > | links |
::rl::math::Matrix | jacobian |
::rl::math::Matrix | jacobianInverse |
::std::vector< Joint * > | joints |
::std::string | manufacturer |
::std::string | name |
Vertex | root |
::std::vector< Edge > | tools |
::std::vector< Transform * > | transforms |
Tree | tree |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
rl::kin::Kinematics::Kinematics | ( | ) |
|
virtual |
bool rl::kin::Kinematics::areColliding | ( | const ::std::size_t & | i, |
const ::std::size_t & | j | ||
) | const |
See if specified bodies should be tested for collisions with each other.
|
virtual |
Clip specified configuration to be within joint limits.
[out] | q | \(\vec{q}\) |
|
virtual |
Reimplemented in rl::kin::Rhino, and rl::kin::Puma.
|
static |
rl::math::Real rl::kin::Kinematics::distance | ( | const ::rl::math::Vector & | q1, |
const ::rl::math::Vector & | q2 | ||
) | const |
Calculate distance measure between specified configuration.
[in] | q1 | \(\vec{q}_{1}\) |
[in] | q2 | \(\vec{q}_{2}\) |
|
virtual |
Calculate forward force kinematics.
\[ \vec{F} = \matr{J}^{-\mathrm{T}} \vec{\tau} \]
[in] | tau | \(\vec{\tau}\) |
[out] | f | \(\vec{F}\) |
|
virtual |
|
virtual |
Calculate forward velocity kinematics.
\[ \dot{\vec{x}} = \matr{J} \dot{\vec{q}} \]
[in] | qdot | \(\dot{\vec{q}}\) |
[out] | xdot | \(\dot{\vec{x}}\) |
rl::math::Vector rl::kin::Kinematics::generatePositionGaussian | ( | const ::rl::math::Vector & | rand, |
const ::rl::math::Vector & | mean, | ||
const ::rl::math::Vector & | sigma | ||
) | const |
rl::math::Vector rl::kin::Kinematics::generatePositionUniform | ( | const ::rl::math::Vector & | rand | ) | const |
std::size_t rl::kin::Kinematics::getBodies | ( | ) | const |
Get number of links.
std::size_t rl::kin::Kinematics::getDof | ( | ) | const |
Get number of degrees of freedom (DOF).
const ::rl::math::Transform & rl::kin::Kinematics::getFrame | ( | const ::std::size_t & | i | ) | const |
Get link frame.
const ::rl::math::Matrix & rl::kin::Kinematics::getJacobian | ( | ) | const |
Get Jacobian.
const ::rl::math::Matrix & rl::kin::Kinematics::getJacobianInverse | ( | ) | const |
Get Jacobian-Inverse.
Joint * rl::kin::Kinematics::getJoint | ( | const ::std::size_t & | i | ) | const |
rl::math::Real rl::kin::Kinematics::getManipulabilityMeasure | ( | ) | const |
Get manipulability measure.
std::string rl::kin::Kinematics::getManufacturer | ( | ) | const |
void rl::kin::Kinematics::getMaximum | ( | ::rl::math::Vector & | max | ) | const |
rl::math::Real rl::kin::Kinematics::getMaximum | ( | const ::std::size_t & | i | ) | const |
void rl::kin::Kinematics::getMinimum | ( | ::rl::math::Vector & | min | ) | const |
rl::math::Real rl::kin::Kinematics::getMinimum | ( | const ::std::size_t & | i | ) | const |
std::string rl::kin::Kinematics::getName | ( | ) | const |
std::size_t rl::kin::Kinematics::getOperationalDof | ( | ) | const |
Get number of end effectors.
void rl::kin::Kinematics::getPosition | ( | ::rl::math::Vector & | q | ) | const |
Get current joint position.
[out] | q | \(\vec{q}\) |
void rl::kin::Kinematics::getPositionUnits | ( | ::Eigen::Matrix< ::rl::math::Unit, ::Eigen::Dynamic, 1 > & | units | ) | const |
void rl::kin::Kinematics::getSpeed | ( | ::rl::math::Vector & | speed | ) | const |
void rl::kin::Kinematics::getSpeedUnits | ( | ::Eigen::Matrix< ::rl::math::Unit, ::Eigen::Dynamic, 1 > & | units | ) | const |
|
virtual |
|
virtual |
Calculate inverse force kinematics.
\[ \vec{\tau} = \matr{J}^{\mathrm{T}} \vec{F} \]
[in] | f | \(\vec{F}\) |
[out] | tau | \(\vec{\tau}\) |
rl::math::Real rl::kin::Kinematics::inverseOfTransformedDistance | ( | const ::rl::math::Real & | d | ) | const |
|
virtual |
Calculate inverse position kinematics.
Reimplemented in rl::kin::Rhino, and rl::kin::Puma.
|
virtual |
Calculate inverse velocity kinematics.
\[ \dot{\vec{q}} = \matr{J}^{\dagger} \dot{\vec{x}} \]
[in] | xdot | \(\dot{\vec{x}}\) |
[out] | qdot | \(\dot{\vec{q}}\) |
bool rl::kin::Kinematics::isColliding | ( | const ::std::size_t & | i | ) | const |
See if specified body should be tested for collisions with the environment.
|
virtual |
Check if current configuration is singular.
Reimplemented in rl::kin::Puma.
|
virtual |
Check if specified configuration is within joint limits.
[in] | q | \(\vec{q}\) |
rl::math::Real rl::kin::Kinematics::maxDistanceToRectangle | ( | const ::rl::math::Vector & | q, |
const ::rl::math::Vector & | min, | ||
const ::rl::math::Vector & | max | ||
) | const |
rl::math::Real rl::kin::Kinematics::minDistanceToRectangle | ( | const ::rl::math::Real & | q, |
const ::rl::math::Real & | min, | ||
const ::rl::math::Real & | max, | ||
const ::std::size_t & | cuttingDimension | ||
) | const |
rl::math::Real rl::kin::Kinematics::minDistanceToRectangle | ( | const ::rl::math::Vector & | q, |
const ::rl::math::Vector & | min, | ||
const ::rl::math::Vector & | max | ||
) | const |
rl::math::Real rl::kin::Kinematics::newDistance | ( | const ::rl::math::Real & | dist, |
const ::rl::math::Real & | oldOff, | ||
const ::rl::math::Real & | newOff, | ||
const int & | cuttingDimension | ||
) | const |
void rl::kin::Kinematics::setColliding | ( | const ::std::size_t & | i, |
const ::std::size_t & | j, | ||
const bool & | doCollide | ||
) |
Set if specified bodies should be tested for collisions with each other.
void rl::kin::Kinematics::setColliding | ( | const ::std::size_t & | i, |
const bool & | doesCollide | ||
) |
Set if specified body should be tested for collisions with the environment.
void rl::kin::Kinematics::setPosition | ( | const ::rl::math::Vector & | q | ) |
Update current joint position.
[in] | q | \(\vec{q}\) |
|
virtual |
rl::math::Transform & rl::kin::Kinematics::tool | ( | const ::std::size_t & | i = 0 | ) |
const ::rl::math::Transform & rl::kin::Kinematics::tool | ( | const ::std::size_t & | i = 0 | ) | const |
rl::math::Real rl::kin::Kinematics::transformedDistance | ( | const ::rl::math::Real & | d | ) | const |
rl::math::Real rl::kin::Kinematics::transformedDistance | ( | const ::rl::math::Real & | q1, |
const ::rl::math::Real & | q2, | ||
const ::std::size_t & | i | ||
) | const |
rl::math::Real rl::kin::Kinematics::transformedDistance | ( | const ::rl::math::Vector & | q1, |
const ::rl::math::Vector & | q2 | ||
) | const |
|
protected |
|
protected |
|
virtual |
Update frames.
\[ {_{0}^{n}\matr{T}} = {_{0}^{1}\matr{T}} \, {_{0}^{1}\matr{T}} \, \ldots \, {_{n-1}^{n}\matr{T}} \]
|
virtual |
Update Jacobian.
\[ {^{0}\matr{J}} = \begin{pmatrix} {^{0}\matr{J}_{1}} & {^{0}\matr{J}_{2}} & \cdots & {^{0}\matr{J}_{n}} \end{pmatrix} \]
|
virtual |
Update Jacobian-Inverse.
\[ \matr{J}^{\dagger}(\vec{q}) = \sum_{i = 1}^{r} \frac{ \sigma_{i} }{ \sigma_{i}^{2} + \lambda^{2} } \, \vec{v}_{i} \, \vec{u}_{i}^{\mathrm{T}} \]
\[ \matr{J}^{\dagger}(\vec{q}) = \matr{J}^{\mathrm{T}}(\vec{q}) \, \bigl( \matr{J}(\vec{q}) \, \matr{J}^{\mathrm{T}}(\vec{q}) + \lambda^{2} \, \matr{1} \bigr)^{-1} \]
[in] | lambda | Damping factor \(\lambda\) |
[in] | doSvd | Use singular value decomposition or damped least squares |
rl::math::Transform & rl::kin::Kinematics::world | ( | ) |
const ::rl::math::Transform & rl::kin::Kinematics::world | ( | ) | const |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |