8#ifndef RBDL_KINEMATICS_H
9#define RBDL_KINEMATICS_H
84 bool update_kinematics =
true);
100 unsigned int body_id,
102 bool update_kinematics =
true);
118 const unsigned int body_id,
119 bool update_kinematics =
true);
143 unsigned int body_id,
146 bool update_kinematics =
true
171 unsigned int body_id,
174 bool update_kinematics =
true
200 unsigned int body_id,
202 bool update_kinematics =
true
220 unsigned int body_id,
222 bool update_kinematics =
true
243 unsigned int body_id,
245 bool update_kinematics =
true
275 unsigned int body_id,
277 bool update_kinematics =
true
309 unsigned int body_id,
311 bool update_kinematics =
true
314#ifndef RBDL_USE_CASADI_MATH
350 const std::vector<unsigned int>& body_id,
351 const std::vector<Math::Vector3d>& body_point,
352 const std::vector<Math::Vector3d>& target_pos,
354 double step_tol = 1.0e-12,
355 double lambda = 0.01,
356 unsigned int max_iter = 55
364 ConstraintTypePosition = 0,
369 ConstraintTypePositionCoMXY
398 unsigned int AddPointConstraint (
unsigned int body_id,
const Math::Vector3d &body_point,
const Math::Vector3d &target_pos,
float weight = 1.);
402 unsigned int AddOrientationConstraint (
unsigned int body_id,
const Math::Matrix3d &target_orientation,
float weight = 1.);
406 unsigned int ClearConstraints();
408 unsigned int AddPointConstraintXY (
unsigned int body_id,
const Math::Vector3d &body_point,
const Math::Vector3d &target_pos,
float weight = 1.);
409 unsigned int AddPointConstraintZ (
unsigned int body_id,
const Math::Vector3d &body_point,
const Math::Vector3d &target_pos,
float weight = 1.);
410 unsigned int AddPointConstraintCoMXY (
unsigned int body_id,
const Math::Vector3d &target_pos,
float weight = 1.);
RBDL_DLLAPI Matrix3d CalcBodyWorldOrientation(Model &model, const VectorNd &Q, const unsigned int body_id, bool update_kinematics)
Returns the orientation of a given body as 3x3 matrix.
RBDL_DLLAPI void UpdateKinematics(Model &model, const VectorNd &Q, const VectorNd &QDot, const VectorNd &QDDot)
Updates and computes velocities and accelerations of the bodies.
RBDL_DLLAPI Vector3d CalcAngularVelocityfromMatrix(const Matrix3d &RotMat)
RBDL_DLLAPI void CalcBodySpatialJacobian(Model &model, const VectorNd &Q, unsigned int body_id, MatrixNd &G, bool update_kinematics)
Computes the spatial jacobian for a body.
RBDL_DLLAPI void CalcPointJacobian6D(Model &model, const VectorNd &Q, unsigned int body_id, const Vector3d &point_position, MatrixNd &G, bool update_kinematics)
Computes a 6-D Jacobian for a point on a body.
RBDL_DLLAPI Vector3d CalcBodyToBaseCoordinates(Model &model, const VectorNd &Q, unsigned int body_id, const Vector3d &point_body_coordinates, bool update_kinematics)
Returns the base coordinates of a point given in body coordinates.
RBDL_DLLAPI SpatialVector CalcPointAcceleration6D(Model &model, const VectorNd &Q, const VectorNd &QDot, const VectorNd &QDDot, unsigned int body_id, const Vector3d &point_position, bool update_kinematics)
Computes linear and angular acceleration of a point on a body.
RBDL_DLLAPI void UpdateKinematicsCustom(Model &model, const VectorNd *Q, const VectorNd *QDot, const VectorNd *QDDot)
Selectively updates model internal states of body positions, velocities and/or accelerations.
RBDL_DLLAPI void CalcPointJacobian(Model &model, const VectorNd &Q, unsigned int body_id, const Vector3d &point_position, MatrixNd &G, bool update_kinematics)
Computes the point jacobian for a point on a body.
RBDL_DLLAPI Vector3d CalcBaseToBodyCoordinates(Model &model, const VectorNd &Q, unsigned int body_id, const Vector3d &point_base_coordinates, bool update_kinematics)
Returns the body coordinates of a point given in base coordinates.
RBDL_DLLAPI Vector3d CalcPointVelocity(Model &model, const VectorNd &Q, const VectorNd &QDot, unsigned int body_id, const Vector3d &point_position, bool update_kinematics)
Computes the velocity of a point on a body.
RBDL_DLLAPI bool InverseKinematics(Model &model, const VectorNd &Qinit, const std::vector< unsigned int > &body_id, const std::vector< Vector3d > &body_point, const std::vector< Vector3d > &target_pos, VectorNd &Qres, double step_tol, double lambda, unsigned int max_iter)
Computes the inverse kinematics iteratively using a damped Levenberg-Marquardt method (also known as ...
RBDL_DLLAPI Math::SpatialVector CalcPointVelocity6D(Model &model, const Math::VectorNd &Q, const Math::VectorNd &QDot, unsigned int body_id, const Math::Vector3d &point_position, bool update_kinematics)
Computes angular and linear velocity of a point that is fixed on a body.
RBDL_DLLAPI Vector3d CalcPointAcceleration(Model &model, const VectorNd &Q, const VectorNd &QDot, const VectorNd &QDDot, unsigned int body_id, const Vector3d &point_position, bool update_kinematics)
Computes the linear acceleration of a point on a body.
SpatialVector_t SpatialVector
std::vector< Math::Vector3d > target_positions
@ ConstraintTypePositionZ
@ ConstraintTypePositionXY
@ ConstraintTypeOrientation
std::vector< unsigned int > body_ids
Math::MatrixNd G
the Jacobian of all constraints
unsigned int num_constraints
Vector with all the constraint residuals.
std::vector< Math::Vector3d > body_points
std::vector< float > constraint_weight
unsigned int num_steps
Damping factor, the default value of 1.0e-6 is reasonable for most problems.
std::vector< unsigned int > constraint_row_index
std::vector< Math::Matrix3d > target_orientations
Math::VectorNd e
temporary storage of a single body Jacobian
std::vector< ConstraintType > constraint_type