# Kinematic Loops¶

## Loops¶

class PyMbs.Input.MbsSystem.AddLoop(world)

Class that provides functions to create loops

CrankSlider(CS1, CS2, name=None)

Close a loop which we call a CrankSlider. It is a planar mechanism consisting of a series of three revolute and one translational joints. Its best example is the piston in an engine.

Parameters: CS1 (Coordinate System, Body or MbsSystem.) – Reference to parent coordinate system / parent frame. CS2 (Coordinate System, Body or MbsSystem.) – Reference to child coordinate system / child frame. name (string) – A name may be assigned to each loop. If no name is given, then a name like loop_1 is generated automatically. The name is used for code generation only, i.e. the symbols connected with this force will contain the name.
ExpJoint(j, exp, name=None)

The ExpJoint allows the user to provide an expression for the joint coordinate. Currently, only kinematic calculations is supported.

Parameters: j (Joint-Object.) – joint. exp (Expression.) – Expression for joint coordinate name (string) – A name may be assigned to each loop. If no name is given, then a name like loop_1 is generated automatically. The name is used for code generation only, i.e. the symbols connected with this force will contain the name.
FourBar(CS1, CS2, posture=1, name=None)

Handles a classic planar four bar linkage mechanism comprising four revolute joints. The posture parameter specifies which solution shall be used (crossing beams or not).

Parameters: CS1 (Coordinate System, Body or MbsSystem.) – Reference to parent coordinate system / parent frame. CS2 (Coordinate System, Body or MbsSystem.) – Reference to child coordinate system / child frame. posture (int - either 1 or -1) – Specifying the solution which shall be used - most time it means, if beams are crossed name (string) – A name may be assigned to each loop. If no name is given, then a name like loop_1 is generated automatically. The name is used for code generation only, i.e. the symbols connected with this force will contain the name.
FourBarTrans(CS1, CS2, posture=1, name=None)

The FourBarTrans is an extension to the FourBarLinkage. Whereas the classical four bar linkage consists of only four revolute joints, the FourBarTrans is extended by a translational joint. This mechanism is often found in wheel loaders.

Parameters: CS1 (Coordinate System, Body or MbsSystem.) – Reference to parent coordinate system / parent frame. CS2 (Coordinate System, Body or MbsSystem.) – Reference to child coordinate system / child frame. name (string) – A name may be assigned to each loop. If no name is given, then a name like loop_1 is generated automatically. The name is used for code generation only, i.e. the symbols connected with this force will contain the name.
Hexapod(CS1, CS2, name=None)

Close a loop which we call a ThreeBarTrans. It is a planar mechanism consisting of a series of three revolute and one translational joints. It often occurs in conjunction with hydraulic cylinders.

Parameters: CS1 (Coordinate System, Body or MbsSystem.) – Reference to parent coordinate system / parent frame. CS2 (Coordinate System, Body or MbsSystem.) – Reference to child coordinate system / child frame. name (string) – A name may be assigned to each loop. If no name is given, then a name like loop_1 is generated automatically. The name is used for code generation only, i.e. the symbols connected with this force will contain the name.
Hexapod_m_AV(CS1, CS2, name=None)

Close a loop which we call a ThreeBarTrans. It is a planar mechanism consisting of a series of three revolute and one translational joints. It often occurs in conjunction with hydraulic cylinders.

Parameters: CS1 (Coordinate System, Body or MbsSystem.) – Reference to parent coordinate system / parent frame. CS2 (Coordinate System, Body or MbsSystem.) – Reference to child coordinate system / child frame. name (string) – A name may be assigned to each loop. If no name is given, then a name like loop_1 is generated automatically. The name is used for code generation only, i.e. the symbols connected with this force will contain the name.
Steering(CS1, CS2, setUpH=1, setUpS=1, name=None)

Close a loop which we call Steering. More detailed explanation follows.

Parameters: CS1 (Coordinate System, Body or MbsSystem.) – Reference to parent coordinate system / parent frame. CS2 (Coordinate System, Body or MbsSystem.) – Reference to child coordinate system / child frame. setUp – Specifying the solution which shall be used - most time it means, if beams are crossed name (string) – A name may be assigned to each loop. If no name is given, then a name like loop_1 is generated automatically. The name is used for code generation only, i.e. the symbols connected with this force will contain the name.
ThreeBarTrans(CS1, CS2, name=None)

Close a loop which we call a ThreeBarTrans. It is a planar mechanism consisting of a series of three revolute and one translational joints. It often occurs in conjunction with hydraulic cylinders.

Parameters: CS1 (Coordinate System, Body or MbsSystem.) – Reference to parent coordinate system / parent frame. CS2 (Coordinate System, Body or MbsSystem.) – Reference to child coordinate system / child frame. name (string) – A name may be assigned to each loop. If no name is given, then a name like loop_1 is generated automatically. The name is used for code generation only, i.e. the symbols connected with this force will contain the name.
Transmission(j1, j2, ratio=1, name=None)

The transmission loop introduces a relation between two joints, such that their joint coordinates q1 and q2 are related by the following equation: j1 = ratio * v2; This can either be used to synchronise joints or to create a fixed joint by choosing ratio =0.

Parameters: j1 (Joint-Object.) – First joint. j2 (Joint-Object.) – Second Joint. ratio (int/float.) – Ratio between two joints. name (string) – A name may be assigned to each loop. If no name is given, then a name like loop_1 is generated automatically. The name is used for code generation only, i.e. the symbols connected with this force will contain the name.