File mechanics/src/joints/PivotJointR.hpp

Go to the source code of this file

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

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

Public Functions

PivotJointR()

Empty constructor.

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

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

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

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.
  • A: SiconosVector of size 3 that defines the cylindrical axis.
  • absoluteRef: if true, P and A are in the absolute frame, otherwise P and A are in d1 frame.

virtual ~PivotJointR()

destructor

SP::SiconosVector A()
virtual void computeh(double time, BlockVector &q0, SiconosVector &y)
virtual void computehDoF(double time, BlockVector &q0, SiconosVector &y, unsigned int axis)

Compute the vector of linear and angular positions of the free axes.

virtual void computeJachqDoF(double time, Interaction &inter, SP::BlockVector q0, SimpleMatrix &jachq, unsigned int axis)

Compute the jacobian of linear and angular DoF with respect to some q.

virtual unsigned int numberOfConstraints()

Get the number of constraints defined in the joint.

Return
the number of constraints

virtual unsigned int numberOfDoF()

Return the number of degrees of freedom of this joint.

Return
the number of degrees of freedom (DoF)

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

virtual void _normalDoF(SiconosVector &ans, const BlockVector &q0, int axis, bool absoluteRef = true)

Return the normal of the angular DoF axis of rotation.

Parameters
  • axis: must be 0

ACCEPT_SERIALIZATION(PivotJointR)

serialization hooks

double AscalA(double q2to1x, double q2to1y, double q2to1z)
double AscalA1(double q2to1x, double q2to1y, double q2to1z)
double AscalA2(double q2to1x, double q2to1y, double q2to1z)
void buildA1A2()
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)
void rot2to1(double q10, double q11, double q12, double q13, double q20, double q21, double q22, double q23, double *q2to1w, double *q2to1x, double *q2to1y, double *q2to1z)

Protected Attributes

SP::SiconosVector _A
double _A1x
double _A1y
double _A1z
double _A2x
double _A2y
double _A2z
double _cq2q101
double _cq2q102
double _cq2q103
double _cq2q104
double _initial_AscalA
double _initial_AscalA1
double _initial_AscalA2
int _previousAngle
int _twistCount

Cumulative number of twists around the joint relative to initial angular difference.