7#ifndef RBDL_CONTACT_CONSTRAINT_H
8#define RBDL_CONTACT_CONSTRAINT_H
126 const unsigned int bodyId,
129 const char *contactConstraintName = NULL,
130 unsigned int userDefinedId = std::numeric_limits<unsigned int>::max(),
131 bool enableBaumgarteStabilization=
false,
132 double stabilizationTimeConstant=0.1,
133 bool velocityLevelConstraint=
true);
136 void bind(
const Model &model)
override;
138 void calcConstraintJacobian( Model &model,
144 bool updateKinematics=
false)
override;
146 void calcGamma( Model &model,
153 bool updateKinematics=
false)
override;
155 void calcPositionError( Model &model,
160 bool updateKinematics=
false)
override;
162 void calcVelocityError( Model &model,
169 bool updateKinematics=
false)
override;
171 void calcConstraintForces(
178 std::vector< unsigned int > &constraintBodiesUpd,
179 std::vector< Math::SpatialTransform > &constraintBodyFramesUpd,
180 std::vector< Math::SpatialVector > &constraintForcesUpd,
182 bool resolveAllInRootFrame =
false,
183 bool updateKinematics=
false)
override;
202 bool velocityLevelConstraint=
true);
214 void calcPointAccelerations(Model &model,
218 std::vector<Math::Vector3d> &pointAccelerationSysUpd,
219 bool updateKinematics=
false);
232 void calcPointAccelerations(Model &model,
237 bool updateKinematics=
false);
247 void calcPointAccelerationError(
248 const std::vector<Math::Vector3d> &pointAccelerationsSys,
259 void calcPointForceJacobian(
263 std::vector<Math::SpatialVector> &fExtSysUpd,
264 bool updateKinematics=
false);
268 std::vector< Math::Vector3d >
T;
Interface to define general-purpose constraints.
Implements a rigid kinematic body-point–to–ground constraint along a normal direction as described in...
double dblA
A working double.
Math::Vector3d groundPoint
The location of the ground reference point.
std::vector< Math::Vector3d > T
A vector of the ground normal vectors used in this constraint.
const std::vector< Math::Vector3d > & getConstraintNormalVectors()