File mechanics/src/joints/KneeJointR.hpp

Go to the source code of this file

class KneeJointR : public NewtonEulerJointR
#include <KneeJointR.hpp>

This class implements a knee joint between one or two Newton/Euler Dynamical system.

Subclassed by PivotJointR

Public Functions

KneeJointR()

Empty constructor.

The relation may be initialized later by setPoint, setAbsolute, and setBasePositions.

KneeJointR(SP::SiconosVector P, bool absoluteRef, SP::NewtonEulerDS d1 = SP::NewtonEulerDS(), SP::NewtonEulerDS d2 = SP::NewtonEulerDS())

Constructor based on one or two dynamical systems and a point.

Parameters
  • d1: first DynamicalSystem linked by the joint.
  • d2: second DynamicalSystem linked by the joint, or NULL for absolute frame.
  • P: SiconosVector of size 3 that defines the point around which rotation is allowed.
  • absoluteRef: if true, P is in the absolute frame, otherwise P is in d1 frame.

virtual ~KneeJointR()

destructor

void checkInitPos(SP::SiconosVector q1, SP::SiconosVector q2)
virtual void computeDotJachq(double time, BlockVector &workQ, BlockVector &workZ, BlockVector &workQdot)
virtual void computeDotJachq(double time, SP::SiconosVector qdot1, SP::SiconosVector qdot2 = SP::SiconosVector())
virtual void computeh(double time, BlockVector &q0, SiconosVector &y)
virtual void computeJachq(double time, Interaction &inter, SP::BlockVector q0)
virtual void initialize(Interaction &inter)
virtual unsigned int numberOfConstraints()

Get the number of constraints defined in the joint.

Return
the number of constraints

virtual unsigned int numberOfDoF()

Get the number of degrees of freedom defined in the joint.

Return
the number of degrees of freedom (DoF)

SP::SiconosVector P()
virtual void setBasePositions(SP::SiconosVector q1, SP::SiconosVector q2 = SP::SiconosVector())

Initialize the joint constants based on the provided base positions.

Parameters
  • q1: A SiconosVector of size 7 indicating translation and orientation in inertial coordinates.
  • q2: An optional SiconosVector of size 7 indicating translation and orientation; if null, the inertial frame will be considered as the second base.

virtual DoF_Type typeOfDoF(unsigned int axis)

Return the type of a degree of freedom of this joint.

Return
the type of the degree of freedom (DoF)

Protected Functions

ACCEPT_SERIALIZATION(KneeJointR)

serialization hooks

virtual void DotJd1(double Xdot1, double Ydot1, double Zdot1, double qdot10, double qdot11, double qdot12, double qdot13)
virtual void DotJd1d2(double Xdot1, double Ydot1, double Zdot1, double qdot10, double qdot11, double qdot12, double qdot13, double Xdot2, double Ydot2, double Zdot2, double qdot20, double qdot21, double qdot22, double qdot23)
double Hx(double X1, double Y1, double Z1, double q10, double q11, double q12, double q13, double X2, double Y2, double Z2, double q20, double q21, double q22, double q23)
double Hy(double X1, double Y1, double Z1, double q10, double q11, double q12, double q13, double X2, double Y2, double Z2, double q20, double q21, double q22, double q23)
double Hz(double X1, double Y1, double Z1, double q10, double q11, double q12, double q13, double X2, double Y2, double Z2, double q20, double q21, double q22, double q23)
virtual void Jd1(double X1, double Y1, double Z1, double q10, double q11, double q12, double q13)
virtual void Jd1d2(double X1, double Y1, double Z1, double q10, double q11, double q12, double q13, double X2, double Y2, double Z2, double q20, double q21, double q22, double q23)

Protected Attributes

double _G1P0x

Absolute coodinates of the vector G1P0 when d1 is located in q=(0,0,0,1,0,0,0) i.e.

P0 in the body frame of d1. These values are computed when the constructor is called.

double _G1P0y
double _G1P0z
double _G2P0x

Absolute coodinates of the vector G2P0 when d2 is located in q=(0,0,0,1,0,0,0) i.e.

P0 in the body frame of d2. These values are computed when the constructor is called.

double _G2P0y
double _G2P0z
SP::SiconosVector _P0

Coordinate of the knee point in the body frame of the first dynamical system _d1.