- 3.0.2 rigid body dynamics module.
|
A soft contact model that only uses end-effector positions/velocities to compute the contact force. More...
#include <EEContactModel.h>
Public Types | |
enum | VELOCITY_SMOOTHING { NONE = 0, SIGMOID = 1, TANH = 2, ABS = 3 } |
the type of velcity smoothing More... | |
typedef Kinematics::SCALAR | SCALAR |
typedef iit::rbd::tpl::TraitSelector< SCALAR >::Trait | TRAIT |
typedef std::array< bool, NUM_EE > | ActiveMap |
typedef Kinematics::EEForceLinear | EEForceLinear |
typedef std::array< EEForceLinear, NUM_EE > | EEForcesLinear |
typedef Eigen::Matrix< SCALAR, 3, 1 > | Vector3s |
typedef kindr::Position< SCALAR, 3 > | Position3S |
typedef kindr::Velocity< SCALAR, 3 > | Velocity3S |
Public Member Functions | |
EEContactModel (const SCALAR &k=SCALAR(5000), const SCALAR &d=SCALAR(500.0), const SCALAR &alpha=SCALAR(100.0), const SCALAR &alpha_n=SCALAR(-1.0), const SCALAR &zOffset=SCALAR(0.0), const VELOCITY_SMOOTHING &smoothing=NONE, const std::shared_ptr< Kinematics > &kinematics=std::shared_ptr< Kinematics >(new Kinematics())) | |
Default constructor. More... | |
EEContactModel (const EEContactModel &other) | |
Clone operator. More... | |
EEContactModel * | clone () const |
void | setActiveEE (const ActiveMap &activeMap) |
Sets which end-effectors can have forces excerted on them. More... | |
EEForcesLinear | computeContactForces (const RBDState< NJOINTS, SCALAR > &state) |
Computes the contact forces given a state of the robot. Returns forces expressed in the world frame. More... | |
SCALAR & | alpha () |
SCALAR & | alpha_n () |
SCALAR & | k () |
SCALAR & | d () |
SCALAR & | zOffset () |
VELOCITY_SMOOTHING & | smoothing () |
Static Public Attributes | |
static const size_t | NUM_EE = Kinematics::NUM_EE |
static const size_t | NJOINTS = Kinematics::NJOINTS |
A soft contact model that only uses end-effector positions/velocities to compute the contact force.
This contact model computes forces/torques at the endeffectors given the current state of the robot expressed in generalized coordinates
The contact model assumes a plane with fixed orientation located at the origin (0, 0, 0). The contact dynamics are a combination of a spring-damper perpendicular and a damper in parallel to the surface. The force expressed in world coordinates without velocity smoothing or normal force smoothing is defined as
where is the ground penetration with respect to an offset expressed in world coordinates and is the velocity of the endeffector.
In case normal force smoothing is activated, the first term becomes
In case velocity smoothing is activated, the second term becomes
where the smoothing coefficient is one of the following
Kinematics | the Kinematics implementation of the robot |
typedef Kinematics::SCALAR ct::rbd::EEContactModel< Kinematics >::SCALAR |
typedef iit::rbd::tpl::TraitSelector<SCALAR>::Trait ct::rbd::EEContactModel< Kinematics >::TRAIT |
typedef std::array<bool, NUM_EE> ct::rbd::EEContactModel< Kinematics >::ActiveMap |
typedef Kinematics::EEForceLinear ct::rbd::EEContactModel< Kinematics >::EEForceLinear |
typedef std::array<EEForceLinear, NUM_EE> ct::rbd::EEContactModel< Kinematics >::EEForcesLinear |
typedef Eigen::Matrix<SCALAR, 3, 1> ct::rbd::EEContactModel< Kinematics >::Vector3s |
typedef kindr::Position<SCALAR, 3> ct::rbd::EEContactModel< Kinematics >::Position3S |
typedef kindr::Velocity<SCALAR, 3> ct::rbd::EEContactModel< Kinematics >::Velocity3S |
enum ct::rbd::EEContactModel::VELOCITY_SMOOTHING |
|
inline |
Default constructor.
k | stiffness of vertical spring |
d | damper coefficient |
alpha | velocity smoothing coefficient |
alpha_n | normal force smoothing coefficient |
zOffset | z offset of the plane with respect to (0, 0, 0) |
smoothing | the type of velocity smoothing |
kinematics | instance of the kinematics (optionally). Should be provided for efficiency when using Auto-Diff. |
References i, and ct::rbd::EEContactModel< Kinematics >::NUM_EE.
Referenced by ct::rbd::EEContactModel< Kinematics >::clone().
|
inline |
Clone operator.
other | instance to clone |
|
inline |
|
inline |
Sets which end-effectors can have forces excerted on them.
activeMap | flags of active end-effectors |
|
inline |
Computes the contact forces given a state of the robot. Returns forces expressed in the world frame.
state | The state of the robot |
References ct::rbd::RBDState< NJOINTS, SCALAR >::basePose(), i, ct::rbd::RBDState< NJOINTS, SCALAR >::jointPositions(), and ct::rbd::EEContactModel< Kinematics >::NUM_EE.
Referenced by TEST().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
|
static |