7#ifndef RBDL_LOOP_CONSTRAINT_H
8#define RBDL_LOOP_CONSTRAINT_H
141 const unsigned int bodyIdPredecessor,
142 const unsigned int bodyIdSuccessor,
146 bool enableBaumgarteStabilization =
false,
147 double stabilizationTimeConstant = 0.1,
148 const char *loopConstraintName = NULL,
149 unsigned int userDefinedId = std::numeric_limits<unsigned int>::max(),
150 bool positionLevelConstraint=
true,
151 bool velocityLevelConstraint=
true);
155 void bind(
const Model &model)
override;
158 void calcConstraintJacobian( Model &model,
164 bool updateKinematics=
false)
override;
167 void calcGamma( Model &model,
174 bool updateKinematics=
false)
override;
177 void calcPositionError( Model &model,
182 bool updateKinematics=
false)
override;
185 void calcVelocityError( Model &model,
192 bool updateKinematics=
false)
override;
195 void calcConstraintForces(
202 std::vector< unsigned int > &constraintBodiesUpd,
203 std::vector< Math::SpatialTransform > &constraintBodyFramesUpd,
204 std::vector< Math::SpatialVector > &constraintForcesUpd,
206 bool resolveAllInRootFrame =
false,
207 bool updateKinematics=
false)
override;
228 bool positionLevelConstraint =
true,
229 bool velocityLevelConstraint =
true);
234 std::vector< Math::SpatialVector >
T;
Interface to define general-purpose constraints.
Implements a rigid kinematic loop (or body-to-body) constraints as described in Ch....
const std::vector< Math::SpatialVector > & getConstraintAxes()
double dblA
A local working double.
std::vector< Math::SpatialVector > T
Vector of constraint axis resolved in the predecessor frame.
Compact representation of spatial transformations.