- 3.0.2 rigid body dynamics module.
|
A general class for computing Kinematic properties. More...
#include <Kinematics.h>
Public Types | |
using | Ptr_t = std::shared_ptr< Kinematics< RBD, N_EE > > |
using | ROBCOGEN = RBD |
using | SCALAR = typename ROBCOGEN::SCALAR |
using | HomogeneousTransform = typename ROBCOGEN::HomogeneousTransform |
using | HomogeneousTransforms = typename ROBCOGEN::HomogeneousTransforms |
using | ForceTransform = typename ROBCOGEN::ForceTransform |
using | Jacobian = typename ROBCOGEN::Jacobian |
using | Jacobians = typename ROBCOGEN::Jacobians |
using | Vector3Tpl = Eigen::Matrix< SCALAR, 3, 1 > |
using | Matrix3Tpl = Eigen::Matrix< SCALAR, 3, 3 > |
using | Position3Tpl = kindr::Position< SCALAR, 3 > |
using | Velocity3Tpl = kindr::Velocity< SCALAR, 3 > |
using | QuaterionTpl = kindr::RotationQuaternion< SCALAR > |
using | RigidBodyPoseTpl = tpl::RigidBodyPose< SCALAR > |
using | EEForce = SpatialForceVector< SCALAR > |
using | EEForceLinear = Vector3Tpl |
using | JointState_t = JointState< NJOINTS, SCALAR > |
Public Member Functions | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | Kinematics (std::shared_ptr< RBD > rbdContainer=std::shared_ptr< RBD >(new RBD())) |
Kinematics (const Kinematics< RBD, N_EE > &other) | |
virtual | ~Kinematics ()=default |
Kinematics< RBD, N_EE > * | clone () const |
void | initEndeffectors (std::array< EndEffector< NJOINTS, SCALAR >, NUM_EE > &endeffectors) |
EndEffector< NJOINTS, SCALAR > & | getEndEffector (size_t id) |
Get an end-effector. More... | |
void | setEndEffector (size_t id, const EndEffector< NJOINTS, SCALAR > &ee) |
Set an end-effector. More... | |
Jacobian | getJacobianBaseEEbyId (size_t eeId, const RBDState< NJOINTS, SCALAR > &rbdState) |
FloatingBaseTransforms< RBD > & | floatingBaseTransforms () |
FloatingBaseTransforms< RBD > & | floatingBaseTransforms () const |
const HomogeneousTransforms & | transforms () const |
HomogeneousTransforms & | transforms () |
const Jacobians & | jacobians () const |
Jacobians & | jacobians () |
Velocity3Tpl | getEEVelocityInBase (size_t eeId, const RBDState< NJOINTS, SCALAR > &rbdState) |
Velocity3Tpl | getEEVelocityInWorld (size_t eeId, const RBDState< NJOINTS, SCALAR > &rbdState) |
Position3Tpl | getEEPositionInBase (size_t eeID, const typename JointState_t::Position &jointPosition) |
RigidBodyPoseTpl | getEEPoseInBase (size_t eeID, const typename JointState_t::Position &jointPosition) |
Matrix3Tpl | getEERotInBase (size_t eeID, const typename JointState_t::Position &jointPosition) |
Position3Tpl | getEEPositionInWorld (size_t eeID, const RigidBodyPoseTpl &basePose, const typename JointState_t::Position &jointPosition) |
RigidBodyPoseTpl | getEEPoseInWorld (size_t eeID, const RigidBodyPoseTpl &basePose, const typename JointState_t::Position &jointPosition) |
get the end-effector pose in world coordinates More... | |
Matrix3Tpl | getEERotInWorld (size_t eeID, const RigidBodyPoseTpl &basePose, const typename JointState_t::Position &jointPosition) |
get the end-effector rotation matrix expressed in world coordinates More... | |
void | addIKSolver (const std::shared_ptr< InverseKinematicsBase< NJOINTS, SCALAR >> &solver, size_t eeID, size_t solverID=0) |
std::shared_ptr< InverseKinematicsBase< NJOINTS, SCALAR > > | getIKSolver (const size_t eeID, const size_t solverID=0) const |
EEForce | mapForceFromWorldToLink3d (const Vector3Tpl &W_force, const RigidBodyPoseTpl &basePose, const typename JointState_t::Position &jointPosition, size_t eeId) |
Transforms a force applied at an end-effector and expressed in the world into the link frame the EE is rigidly connected to. More... | |
EEForce | mapForceFromWorldToLink (const EEForce &W_force, const RigidBodyPoseTpl &basePose, const typename JointState_t::Position &jointPosition, size_t eeId) |
Transforms a force applied at an end-effector and expressed in the world into the link frame the EE is rigidly connected to. More... | |
EEForce | mapForceFromWorldToLink (const EEForce &W_force, const RigidBodyPoseTpl &basePose, const typename JointState_t::Position &jointPosition, const Position3Tpl &B_x_EE, size_t eeId) |
Transforms a force applied at an end-effector and expressed in the world into the link frame the EE is rigidly connected to. More... | |
EEForce | mapForceFromEEToLink (const EEForce &EE_force, const RigidBodyPoseTpl &T_B_EE, const typename JointState_t::Position &jointPosition, size_t eeId) |
Transforms a force applied at an end-effector expressed in an arbitrary (end-effector) frame into the link frame the EE is rigidly connected to. More... | |
RBD & | robcogen () |
Static Public Attributes | |
static const size_t | NUM_EE = N_EE |
static const size_t | NJOINTS = RBD::NJOINTS |
static const size_t | NLINKS = RBD::NLINKS |
A general class for computing Kinematic properties.
This class implements useful Kinematic quantities. It wraps RobCoGen to have access to efficient transforms and jacobians.
using ct::rbd::Kinematics< RBD, N_EE >::Ptr_t = std::shared_ptr<Kinematics<RBD, N_EE> > |
using ct::rbd::Kinematics< RBD, N_EE >::ROBCOGEN = RBD |
using ct::rbd::Kinematics< RBD, N_EE >::SCALAR = typename ROBCOGEN::SCALAR |
using ct::rbd::Kinematics< RBD, N_EE >::HomogeneousTransform = typename ROBCOGEN::HomogeneousTransform |
using ct::rbd::Kinematics< RBD, N_EE >::HomogeneousTransforms = typename ROBCOGEN::HomogeneousTransforms |
using ct::rbd::Kinematics< RBD, N_EE >::ForceTransform = typename ROBCOGEN::ForceTransform |
using ct::rbd::Kinematics< RBD, N_EE >::Jacobian = typename ROBCOGEN::Jacobian |
using ct::rbd::Kinematics< RBD, N_EE >::Jacobians = typename ROBCOGEN::Jacobians |
using ct::rbd::Kinematics< RBD, N_EE >::Vector3Tpl = Eigen::Matrix<SCALAR, 3, 1> |
using ct::rbd::Kinematics< RBD, N_EE >::Matrix3Tpl = Eigen::Matrix<SCALAR, 3, 3> |
using ct::rbd::Kinematics< RBD, N_EE >::Position3Tpl = kindr::Position<SCALAR, 3> |
using ct::rbd::Kinematics< RBD, N_EE >::Velocity3Tpl = kindr::Velocity<SCALAR, 3> |
using ct::rbd::Kinematics< RBD, N_EE >::QuaterionTpl = kindr::RotationQuaternion<SCALAR> |
using ct::rbd::Kinematics< RBD, N_EE >::RigidBodyPoseTpl = tpl::RigidBodyPose<SCALAR> |
using ct::rbd::Kinematics< RBD, N_EE >::EEForce = SpatialForceVector<SCALAR> |
using ct::rbd::Kinematics< RBD, N_EE >::EEForceLinear = Vector3Tpl |
using ct::rbd::Kinematics< RBD, N_EE >::JointState_t = JointState<NJOINTS, SCALAR> |
|
inline |
|
inline |
|
virtualdefault |
Referenced by ct::rbd::Kinematics< RBD, NEE >::Kinematics().
|
inline |
|
inline |
Referenced by ct::rbd::Kinematics< RBD, NEE >::Kinematics().
|
inline |
Get an end-effector.
id | end-effector id |
Referenced by ct::rbd::Kinematics< RBD, NEE >::mapForceFromEEToLink(), and ct::rbd::Kinematics< RBD, NEE >::mapForceFromWorldToLink().
|
inline |
Set an end-effector.
id | end-effector id |
ee | end-effector |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by ct::rbd::Kinematics< RBD, NEE >::getEEVelocityInWorld().
|
inline |
|
inline |
Computes the forward kinematics for the end-effector position and expresses the end-effector position in robot base coordinates.
eeID | unique identifier of the end-effector in question |
jointPosition | current robot joint positions |
* \xrefitem todo 2.
Referenced by ct::rbd::Kinematics< RBD, NEE >::getEEPositionInWorld(), ct::rbd::Kinematics< RBD, NEE >::getEEVelocityInBase(), ct::rbd::tpl::ConstraintJacobian< ct::rbd::Kinematics< RBD, NEE >, MAX_JAC_SIZE, NJOINTS, Scalar >::getJacobianOrigin(), and ct::rbd::Kinematics< RBD, NEE >::mapForceFromWorldToLink().
|
inline |
Computes the forward kinematics for the end-effector position and expresses the end-effector pose in robot base coordinates.
eeID | unique identifier of the end-effector in question |
jointPosition | current robot joint positions |
Referenced by ct::rbd::Kinematics< RBD, NEE >::getEEPoseInWorld().
|
inline |
compute the forward kinematics and return a rotation matrix specifying the ee-rotation w.r.t. the base frame
Referenced by ct::rbd::Kinematics< RBD, NEE >::getEERotInWorld().
|
inline |
Computes the forward kinematics for the end-effector position and expresses the end-effector position in world coordinates
eeID | unique identifier of the end-effector in question |
basePose | current robot base pose |
jointPosition | current robot joint positions |
|
inline |
get the end-effector pose in world coordinates
|
inline |
get the end-effector rotation matrix expressed in world coordinates
|
inline |
|
inline |
|
inline |
Transforms a force applied at an end-effector and expressed in the world into the link frame the EE is rigidly connected to.
W_force | Force expressed in world coordinates |
basePose | Pose of the base (in the world) |
jointPosition | Joint angles |
eeId | ID of the end-effector |
|
inline |
Transforms a force applied at an end-effector and expressed in the world into the link frame the EE is rigidly connected to.
W_force | Force expressed in world coordinates |
basePose | Pose of the base (in the world) |
jointPosition | Joint angles |
eeId | ID of the end-effector |
Referenced by ct::rbd::Kinematics< RBD, NEE >::mapForceFromWorldToLink(), and ct::rbd::Kinematics< RBD, NEE >::mapForceFromWorldToLink3d().
|
inline |
Transforms a force applied at an end-effector and expressed in the world into the link frame the EE is rigidly connected to.
W_force | Force expressed in world coordinates |
basePose | Pose of the base (in the world) |
jointPosition | Joint angles |
B_x_EE | Position of the end effector in the base |
eeId | ID of the end-effector |
|
inline |
Transforms a force applied at an end-effector expressed in an arbitrary (end-effector) frame into the link frame the EE is rigidly connected to.
This function does not assume any position or orientation of the end-effector. Therefore, the user must specify the orientation of the end-effector in the base. There are two common choices: use zero rotation to assume forces/torques are expressed in the base. Or use the base orientation to assume the end-effector forces/torques are expressed in the world. For this variant, also see mapForceFromWorldToLink().
NOTE: Even if zero or base rotation is assumed, you have to pass the correct position of the end-effector expressed in the base as part of T_B_EE! Do NOT pass the base pose directly here!
EE_force | 6D torque/force vector expressed in the EE frame |
T_B_EE | transform from end-effector to base |
jointPosition | joint angles |
eeId | ID of the end-effector |
|
inline |
Referenced by ct::rbd::Kinematics< RBD, NEE >::getEEPoseInBase(), ct::rbd::Kinematics< RBD, NEE >::getEEPositionInBase(), ct::rbd::Kinematics< RBD, NEE >::getEERotInBase(), ct::rbd::Kinematics< RBD, NEE >::getEEVelocityInBase(), ct::rbd::Kinematics< RBD, NEE >::getJacobianBaseEEbyId(), ct::rbd::tpl::ConstraintJacobian< ct::rbd::Kinematics< RBD, NEE >, MAX_JAC_SIZE, NJOINTS, Scalar >::getJacobianOrigin(), ct::rbd::tpl::ConstraintJacobian< ct::rbd::Kinematics< RBD, NEE >, MAX_JAC_SIZE, NJOINTS, Scalar >::getJacobianOriginDerivative(), ct::rbd::Kinematics< RBD, NEE >::jacobians(), ct::rbd::Kinematics< RBD, NEE >::mapForceFromEEToLink(), ct::rbd::Kinematics< RBD, NEE >::mapForceFromWorldToLink(), and ct::rbd::Kinematics< RBD, NEE >::transforms().
|
static |
Referenced by ct::rbd::Kinematics< RBD, NEE >::initEndeffectors().
|
static |
|
static |