Robot Dynamics Library
|
Structure that contains both constraint information and workspace memory. More...
#include <Contacts.hpp>
Public Member Functions | |
ConstraintSet () | |
unsigned int | addConstraint (unsigned int body_id, const Math::Vector3d &body_point, const Math::Vector3d &world_normal, const char *constraint_name=NULL, double normal_acceleration=0.) |
Adds a constraint to the constraint set. More... | |
ConstraintSet | Copy () |
Copies the constraints and resets its ConstraintSet::bound flag. More... | |
void | setSolver (Math::LinearSolver solver) |
Specifies which method should be used for solving undelying linear systems. More... | |
bool | bind (const Model &model) |
Initializes and allocates memory for the constraint set. More... | |
size_t | size () const |
Returns the number of constraints. More... | |
void | clear () |
Clears all variables in the constraint set. More... | |
Public Attributes | |
Math::LinearSolver | linear_solver |
Method that should be used to solve internal linear systems. More... | |
bool | bound |
Whether the constraint set was bound to a model (mandatory!). More... | |
std::vector< std::string > | name |
std::vector< unsigned int > | body |
std::vector< Math::Vector3d > | point |
std::vector< Math::Vector3d > | normal |
Math::VectorNd | acceleration |
Math::VectorNd | force |
Math::VectorNd | impulse |
Math::VectorNd | v_plus |
Math::MatrixNd | H |
Workspace for the joint space inertia matrix. More... | |
Math::VectorNd | C |
Workspace for the coriolis forces. More... | |
Math::VectorNd | gamma |
Workspace of the lower part of b. More... | |
Math::MatrixNd | G |
Math::MatrixNd | A |
Workspace for the Lagrangian left-hand-side matrix. More... | |
Math::VectorNd | b |
Workspace for the Lagrangian right-hand-side. More... | |
Math::VectorNd | x |
Workspace for the Lagrangian solution. More... | |
Eigen::HouseholderQR< Math::MatrixNd > | GT_qr |
Workspace for the QR decomposition of the null-space method. More... | |
Math::MatrixNd | GT_qr_Q |
Math::MatrixNd | Y |
Math::MatrixNd | Z |
Math::VectorNd | qddot_y |
Math::VectorNd | qddot_z |
Math::MatrixNd | K |
Workspace for the Inverse Articulated-Body Inertia. More... | |
Math::VectorNd | a |
Workspace for the accelerations of due to the test forces. More... | |
Math::VectorNd | QDDot_t |
Workspace for the test accelerations. More... | |
Math::VectorNd | QDDot_0 |
Workspace for the default accelerations. More... | |
Math::SpatialForceV | f_t |
Workspace for the test forces. More... | |
Math::SpatialForceV | f_ext_constraints |
Workspace for the actual spatial forces. More... | |
std::vector< Math::Vector3d > | point_accel_0 |
Workspace for the default point accelerations. More... | |
Math::SpatialForceV | d_pA |
Workspace for the bias force due to the test force. More... | |
std::vector< Math::SpatialVector > | d_a |
Workspace for the acceleration due to the test force. More... | |
Math::VectorNd | d_u |
std::vector< Math::SpatialMatrix > | d_IA |
Workspace for the inertia when applying constraint forces. More... | |
std::vector< Math::SpatialVector > | d_U |
Workspace when applying constraint forces. More... | |
Math::VectorNd | d_d |
Workspace when applying constraint forces. More... | |
std::vector< Math::Vector3d > | d_multdof3_u |
Structure that contains both constraint information and workspace memory.
This structure is used to reduce the amount of memory allocations that are needed when computing constraint forces.
The ConstraintSet has to be bound to a model using ConstraintSet::bind() before it can be used in forwardDynamicsContacts .
|
inline |
unsigned int RobotDynamics::ConstraintSet::addConstraint | ( | unsigned int | body_id, |
const Math::Vector3d & | body_point, | ||
const Math::Vector3d & | world_normal, | ||
const char * | constraint_name = NULL , |
||
double | normal_acceleration = 0. |
||
) |
Adds a constraint to the constraint set.
body_id | the body which is affected directly by the constraint |
body_point | the point that is constrained relative to the contact body |
world_normal | the normal along the constraint acts (in base coordinates) |
constraint_name | a human readable name (optional, default: NULL) |
normal_acceleration | the acceleration of the contact along the normal (optional, default: 0.) |
bool RobotDynamics::ConstraintSet::bind | ( | const Model & | model | ) |
Initializes and allocates memory for the constraint set.
This function allocates memory for temporary values and matrices that are required for contact force computation. Both model and constraint set must not be changed after a binding as the required memory is dependent on the model size (i.e. the number of bodies and degrees of freedom) and the number of constraints in the Constraint set.
The values of ConstraintSet::acceleration may still be modified after the set is bound to the model.
void RobotDynamics::ConstraintSet::clear | ( | ) |
Clears all variables in the constraint set.
|
inline |
Copies the constraints and resets its ConstraintSet::bound flag.
|
inline |
Specifies which method should be used for solving undelying linear systems.
|
inline |
Returns the number of constraints.
Math::MatrixNd RobotDynamics::ConstraintSet::A |
Workspace for the Lagrangian left-hand-side matrix.
Math::VectorNd RobotDynamics::ConstraintSet::a |
Workspace for the accelerations of due to the test forces.
Math::VectorNd RobotDynamics::ConstraintSet::acceleration |
Enforced accelerations of the contact points along the contact normal.
Math::VectorNd RobotDynamics::ConstraintSet::b |
Workspace for the Lagrangian right-hand-side.
std::vector<unsigned int> RobotDynamics::ConstraintSet::body |
bool RobotDynamics::ConstraintSet::bound |
Whether the constraint set was bound to a model (mandatory!).
Math::VectorNd RobotDynamics::ConstraintSet::C |
Workspace for the coriolis forces.
std::vector<Math::SpatialVector> RobotDynamics::ConstraintSet::d_a |
Workspace for the acceleration due to the test force.
Math::VectorNd RobotDynamics::ConstraintSet::d_d |
Workspace when applying constraint forces.
std::vector<Math::SpatialMatrix> RobotDynamics::ConstraintSet::d_IA |
Workspace for the inertia when applying constraint forces.
std::vector<Math::Vector3d> RobotDynamics::ConstraintSet::d_multdof3_u |
Math::SpatialForceV RobotDynamics::ConstraintSet::d_pA |
Workspace for the bias force due to the test force.
Math::VectorNd RobotDynamics::ConstraintSet::d_u |
std::vector<Math::SpatialVector> RobotDynamics::ConstraintSet::d_U |
Workspace when applying constraint forces.
Math::SpatialForceV RobotDynamics::ConstraintSet::f_ext_constraints |
Workspace for the actual spatial forces.
Math::SpatialForceV RobotDynamics::ConstraintSet::f_t |
Workspace for the test forces.
Math::VectorNd RobotDynamics::ConstraintSet::force |
Actual constraint forces along the contact normals.
Math::MatrixNd RobotDynamics::ConstraintSet::G |
Math::VectorNd RobotDynamics::ConstraintSet::gamma |
Workspace of the lower part of b.
Eigen::HouseholderQR<Math::MatrixNd> RobotDynamics::ConstraintSet::GT_qr |
Workspace for the QR decomposition of the null-space method.
Math::MatrixNd RobotDynamics::ConstraintSet::GT_qr_Q |
Math::MatrixNd RobotDynamics::ConstraintSet::H |
Workspace for the joint space inertia matrix.
Math::VectorNd RobotDynamics::ConstraintSet::impulse |
Actual constraint impulses along the contact normals.
Math::MatrixNd RobotDynamics::ConstraintSet::K |
Workspace for the Inverse Articulated-Body Inertia.
Math::LinearSolver RobotDynamics::ConstraintSet::linear_solver |
Method that should be used to solve internal linear systems.
std::vector<std::string> RobotDynamics::ConstraintSet::name |
std::vector<Math::Vector3d> RobotDynamics::ConstraintSet::normal |
std::vector<Math::Vector3d> RobotDynamics::ConstraintSet::point |
std::vector<Math::Vector3d> RobotDynamics::ConstraintSet::point_accel_0 |
Workspace for the default point accelerations.
Math::VectorNd RobotDynamics::ConstraintSet::QDDot_0 |
Workspace for the default accelerations.
Math::VectorNd RobotDynamics::ConstraintSet::QDDot_t |
Workspace for the test accelerations.
Math::VectorNd RobotDynamics::ConstraintSet::qddot_y |
Math::VectorNd RobotDynamics::ConstraintSet::qddot_z |
Math::VectorNd RobotDynamics::ConstraintSet::v_plus |
The velocities we want to have along the contact normals after calling ComputeContactImpulsesLagrangian
Math::VectorNd RobotDynamics::ConstraintSet::x |
Workspace for the Lagrangian solution.
Math::MatrixNd RobotDynamics::ConstraintSet::Y |
Math::MatrixNd RobotDynamics::ConstraintSet::Z |