siconos.mechanics.joints.CouplerJointR (Python class)¶

class siconos.mechanics.joints.CouplerJointR(*args)[source]

Bases: siconos.mechanics.joints.NewtonEulerJointR

This class implements a coupling (equality) between two DoFs of any NewtonEulerJointR.

Can be used e.g. to implement a screw relation (coupled rotation and translation) based on CylindricalJointR.

Generated class (swig), based on C++ header Program listing for file mechanics/src/joints/CouplerJointR.hpp.

Constructors

CouplerJointR()

Empty constructor.

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

CouplerJointR(NewtonEulerJointR joint1, int dof1, NewtonEulerJointR joint2, int dof2, double ratio, array_like (np.float64, 1D) ref1=array_like (np.float64, 1D)(), int ref1_index=0, array_like (np.float64, 1D) ref2=array_like (np.float64, 1D)(), int ref2_index=0)

Initialize a coupler.

See setReferences() for an explanation of the parameters.

CouplerJointR(NewtonEulerJointR joint1, int dof1, NewtonEulerJointR joint2, int dof2, double ratio, NewtonEulerDS refds1, int ref1_index, NewtonEulerDS refds2, int ref2_index)

Initialize a coupler.

See setReferences() for an explanation of the parameters.

computeJachq(double time, Interaction inter, BlockVector q0) → None[source]
computeJachqDoF(double time, Interaction inter, BlockVector q0, array_like (np.float64, 2D) jachq, int axis) → None[source]

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

computeh(double time, BlockVector q0, array_like (np.float64, 1D) y) → None[source]
computehDoF(double time, BlockVector q0, array_like (np.float64, 1D) y, int axis) → None[source]

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

dof1() → int[source]
dof2() → int[source]
joint1() → NewtonEulerJointR[source]
joint2() → NewtonEulerJointR[source]
numberOfConstraints() → int[source]

Get the number of constraints defined in the joint.

Returns: the number of constraints
numberOfDoF() → int[source]

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

Returns: the number of degrees of freedom (DoF)
setBasePositions(array_like (np.float64, 1D) q1, array_like (np.float64, 1D) q2=array_like (np.float64, 1D)()) → None[source]

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.
setRatio(double ratio) → None[source]
setReferences(*args)[source]

Warning - Overloaded function : multiple signatures available, check prototypes below.

setReferences(NewtonEulerJointR joint1, int dof1, NewtonEulerJointR joint2, int dof2, array_like (np.float64, 1D) ref1, int ref1_index, array_like (np.float64, 1D) ref2, int ref2_index) → None[source]

Set reference joints and vectors.

This constraint maintains the equality theta2=theta1*ratio; theta1 is measured by joint1 with reference to some vector ref1 which must replace either the first or second DS of the current relation being defined. If ref1 and ref2 are null, then no reference is used. Typically ref1 and ref2 will be equal in order to implement gear ratios for example. joint1 must be between ref1 and ds1 specified in setBasePositions(), while joint2 must be between ref2 and ds2.

Parameters: joint1 – The joint for the first reference measurement theta1. dof1 – The degree of freedom index of joint1 to use for the first reference measurement theta1. ref1 – The optional reference position for the first reference measurement theta1. ref1_index – Must be 0 or 1, depending on where ref1 appears in joint1. joint2 – The joint for the second reference measurement theta2. dof2 – The degree of freedom index of joint2 to use for the second reference measurement theta2. ref2 – The optional reference position for the second reference measurement theta2. ref2_index – Must be 0 or 1, depending on where ref2 appears in joint2.
setReferences(NewtonEulerJointR joint1, int dof1, NewtonEulerJointR joint2, int dof2, NewtonEulerDS refds1, int ref1_index, NewtonEulerDS refds2, int ref2_index) → None[source]

Set reference joints and vectors.

This constraint maintains the equality theta2=theta1*ratio; theta1 is measured by joint1 with reference to some vector ref1 which must replace either the first or second DS of the current relation being defined. If ref1 and ref2 are null, then no reference is used. Typically ref1 and ref2 will be equal in order to implement gear ratios for example. joint1 must be between ref1 and ds1 specified in setBasePositions(), while joint2 must be between ref2 and ds2. This alternative setReferences() takes NewtonEulerDS as parameters, but the reference vectors will be taken as refds1->q() and refds2->q() respectively.

Parameters: joint1 – The joint for the first reference measurement theta1. dof1 – The degree of freedom index of joint1 to use for the first reference measurement theta1. refds1 – The optional reference vector for the first reference measurement theta1. ref1_index – Must be 0 or 1, depending on where ref1 appears in joint1. joint2 – The joint for the second reference measurement theta2. dof2 – The degree of freedom index of joint2 to use for the second reference measurement theta2. refds2 – The optional reference vector for the second reference measurement theta2. ref2_index – Must be 0 or 1, depending on where ref2 appears in joint2.
typeOfDoF(int axis) → DoF_Type[source]

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

Returns: the type of the degree of freedom (DoF)