File mechanics/src/joints/PrismaticJointR.hpp#
Go to the source code of this file
-
class PrismaticJointR : public NewtonEulerJointR
- #include <PrismaticJointR.hpp>
This class implements a prismatic joint between one or two Newton/Euler Dynamical system.
From a given axis, we construct two unit othorgonal vectors to the axis V1 and V2 such that (axis,V1,V2) is an orthogonal frame
Public Functions
-
PrismaticJointR()
Empty constructor.
The relation may be initialized later by setPoint, setAbsolute, and setBasePositions.
-
PrismaticJointR(SP::SiconosVector axis, bool absoluteRef, SP::NewtonEulerDS d1 = SP::NewtonEulerDS(), SP::NewtonEulerDS d2 = SP::NewtonEulerDS())
Constructor based on one or two dynamical systems and an axis.
- Parameters:
d1 – first DynamicalSystem linked by the joint.
d2 – second DynamicalSystem linked by the joint, or NULL for absolute frame.
axis – SiconosVector of size 3 that defines the prismatic axis.
absoluteRef – if true, A is in the absolute frame, otherwise A is in d1 frame.
-
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.
-
void displayInitialPosition()#
-
void computeV1V2FromAxis()#
-
virtual void computehDoF(double time, const 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.
-
inline virtual ~PrismaticJointR()
destructor
-
virtual void computeJachq(double time, Interaction &inter, SP::BlockVector q0)#
-
virtual void computeh(double time, const BlockVector &q0, SiconosVector &y)
to compute the output y = h(t,q,z) of the Relation
- Parameters:
time – current time value
q – coordinates of the dynamical systems involved in the relation
y – the resulting vector
-
virtual void computeDotJachq(double time, const BlockVector &workQ, BlockVector &workZ, const BlockVector &workQdot)#
-
double H1(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 H2(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 H3(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 H5(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 H4(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 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 Jd1(double X1, double Y1, double Z1, double q10, double q11, double q12, double q13)#
-
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)#
-
void DotJd2(double Xdot1, double Ydot1, double Zdot1, double qdot10, double qdot11, double qdot12, double qdot13, double X2, double Y2, double Z2, double qdot20, double qdot21, double qdot22, double qdot23)#
-
inline virtual unsigned int numberOfConstraints()
Get the number of constraints defined in the joint.
- Returns:
the number of constraints
-
inline virtual unsigned int numberOfDoF()
Return the number of degrees of freedom of this joint.
- Returns:
the number of degrees of freedom (DoF)
-
inline virtual DoF_Type typeOfDoF(unsigned int axis)
Return the type of a degree of freedom of this joint.
- Returns:
the type of the degree of freedom (DoF)
Protected Functions
-
ACCEPT_SERIALIZATION(PrismaticJointR)#
-
virtual void _normalDoF(SiconosVector &ans, const BlockVector &q0, int axis, bool absoluteRef = true)#
Return the normal of the linear DoF axis.
- Parameters:
ans –
q0 –
axis – must be 0
absoluteRef –
Protected Attributes
-
SP::SiconosVector _V1#
_V1 is an unit vector that is orthogonal to the prismatic axis _axis0.
It forms with _V2 and _axis0 a base such that (_axis0,_V1,_v2) is an orthogonal frame
-
SP::SiconosVector _V2#
_V2 is an unit vector that is orthogonal to the prismatic axis _axis0.
It forms with _V2 and _axis0 a base such that (_axis0,_V1,_v2) is an orthogonal frame
-
double _V1x#
Convenient storage of the components of _V1 and _V2.
-
double _V1y#
-
double _V1z#
-
double _V2x#
-
double _V2y#
-
double _V2z#
-
double _G10G20d1x#
-
double _G10G20d1y#
-
double _G10G20d1z#
-
double _cq2q101#
-
double _cq2q102#
-
double _cq2q103#
-
double _cq2q104#
-
PrismaticJointR()