Sensors

sensors

class pymbs.input.mbs_system.AddSensor(world)

Class that provides functions to create sensors

Acceleration(symbol, CS1, CS2, CSref=None, name=None, category=<Mock name='mock.VarKind.Sensor' id='140347107147344'>)

The acceleration sensor measures the relative acceleration between CS1 and CS2 with respect to the reference frame specified by CSref. If CSref has been omitted then CS1 is used.

Parameters:
  • CS1 (MbsSystem, Body, Coordinate System.) – Parent Coordinate System.

  • CS2 (MbsSystem, Body, Coordinate System.) – Child Coordinate System.

  • CSref (MbsSystem, Body, Coordinate System.) – Reference Frame.

  • symbol (String.) – Symbol representing a the sensor result.

  • name (String.) – A name may be assigned to each sensor. If no name is given, then a name like sensor_1 is generated automatically.

Returns:

Symbol of the sensor

Return type:

pymbs.Symbolics.Symbol

AngularAcceleration(symbol, CS1, CS2, CSref=None, name=None, category=<Mock name='mock.VarKind.Sensor' id='140347107147344'>)

The AngularAcceleration sensor measures the relative angular acceleration between CS1 and CS2 with respect to the reference frame specified by CSref. If CSref has been omitted then CS1 is used.

Parameters:
  • CS1 (MbsSystem, Body, Coordinate System.) – Parent Coordinate System.

  • CS2 (MbsSystem, Body, Coordinate System.) – Child Coordinate System.

  • CSref (MbsSystem, Body, Coordinate System.) – Reference Frame.

  • symbol (String.) – Symbol representing a the sensor result.

  • name (String.) – A name may be assigned to each sensor. If no name is given, then a name like sensor_1 is generated automatically.

Returns:

Symbol of the sensor

Return type:

pymbs.Symbolics.Symbol

AngularVelocity(symbol, CS1, CS2, CSref=None, name=None, category=<Mock name='mock.VarKind.Sensor' id='140347107147344'>)

The AngularVelocity sensor measures the relative angular velocity between CS1 and CS2 with respect to the reference frame specified by CSref. If CSref has been omitted then CS1 is used.

Parameters:
  • CS1 (MbsSystem, Body, Coordinate System.) – Parent Coordinate System.

  • CS2 (MbsSystem, Body, Coordinate System.) – Child Coordinate System.

  • CSref (MbsSystem, Body, Coordinate System.) – Reference Frame.

  • symbol (String.) – Symbol representing a the sensor result.

  • name (String.) – A name may be assigned to each sensor. If no name is given, then a name like sensor_1 is generated automatically.

Returns:

Symbol of the sensor

Return type:

pymbs.Symbolics.Symbol

CenterofMass(symbol_str, Bodies=None, name=None, category=<Mock name='mock.VarKind.Sensor' id='140347107147344'>)

The CenterofMass sensor measures the total mass and the position of it. If body is the world (MbsSystem) then the sensor measures the total mass of the system.

Parameters:
  • Bodies – Bodies of which the total mass shall be measured. Pass the world/ MbsSystem if the total mass of all bodies shall be measured.

  • symbol (String.) – Symbol representing a the sensor result.

Returns:

Symbol of the sensor

Return type:

pymbs.Symbolics.Symbol

ConstraintForce(symbol, joint, name=None, category=<Mock name='mock.VarKind.Sensor' id='140347107147344'>)

The Joint sensor returns the joint’s constraint force

Parameters:
  • joint (Joint-Object.) – Joint of which the constraint force shall be measured.

  • symbol (String.) – Symbol representing a the sensor result.

Returns:

Symbol of the sensor

Return type:

pymbs.Symbolics.Symbol

ConstraintTorque(symbol, joint, name=None, category=<Mock name='mock.VarKind.Sensor' id='140347107147344'>)

The Joint sensor returns the joint’s constraint torque

Parameters:
  • joint (Joint-Object.) – Joint of which the constraint torque shall be measured.

  • symbol (String.) – Symbol representing a the sensor result.

Returns:

Symbol of the sensor

Return type:

pymbs.Symbolics.Symbol

Distance(symbol, CS1, CS2, name=None, category=<Mock name='mock.VarKind.Sensor' id='140347107147344'>)

A distance sensor measures the scalar distance (always positive) between two coordinate systems. Furthermore it measures the velocity, i.e. the rate at which the distance changes with time. If you want to measure the distance vector have a look at the PositionSensor (ref:’Position’).

Parameters:
  • CS1 (MbsSystem, Body, Coordinate System.) – Parent Coordinate System.

  • CS2 (MbsSystem, Body, Coordinate System.) – Child Coordinate System.

  • symbol (String.) – Symbol representing a the sensor result.

  • name (String.) – A name may be assigned to each sensor. If no name is given, then a name like sensor_1 is generated automatically.

Returns:

Symbol of the sensor

Return type:

pymbs.Symbolics.Symbol

Energy(symbol_str, body, name=None, category=<Mock name='mock.VarKind.Sensor' id='140347107147344'>)

The Energy sensor measures the potential and the kinetic energy of body. If body is the world (MbsSystem) then the sensor measures the sum of the energies of each body in the system.

Parameters:
  • body (MbsSystem, Body, Coordinate System) – Body of which the energy shall be measured. Pass the world/ MbsSystem if the energy of all bodies shall be measured.

  • symbol (String.) – Symbol representing a the sensor result.

Returns:

Symbol of the sensor

Return type:

pymbs.Symbolics.Symbol

Joint(symbol, joint, name=None, category=<Mock name='mock.VarKind.Sensor' id='140347107147344'>)

The Joint sensor returns the joint coordinate as well as the joint velocity.

Parameters:
  • joint (Joint-Object.) – Joint of which the coordinate shall be extracted.

  • symbol (String.) – Symbol representing a the sensor result.

Returns:

Symbol of the sensor

Return type:

pymbs.Symbolics.Symbol

Orientation(symbol, CS1, CS2, name=None, category=<Mock name='mock.VarKind.Sensor' id='140347107147344'>)

The Orientation sensor measures the relative orientation between CS1 and CS2, described by a transformation matrix.

Parameters:
  • CS1 (MbsSystem, Body, Coordinate System.) – Parent Coordinate System.

  • CS2 (MbsSystem, Body, Coordinate System.) – Child Coordinate System.

  • symbol (String.) – Symbol representing a the sensor result.

  • name (String.) – A name may be assigned to each sensor. If no name is given, then a name like sensor_1 is generated automatically.

Returns:

Symbol of the sensor

Return type:

pymbs.Symbolics.Symbol

Position(symbol, CS1, CS2, CSref=None, name=None, category=<Mock name='mock.VarKind.Sensor' id='140347107147344'>)

A position sensor measuring the distance vector between CS1 and CS2 with the arrow pointing to CS2. The vector is written with respect to the reference frame specified by CSref. If CSref has been omitted then CS1 is used.

Parameters:
  • CS1 (MbsSystem, Body, Coordinate System.) – Parent Coordinate System.

  • CS2 (MbsSystem, Body, Coordinate System.) – Child Coordinate System.

  • CSref (MbsSystem, Body, Coordinate System.) – Reference Frame.

  • symbol (String.) – Symbol representing a the sensor result.

  • name (String.) – A name may be assigned to each sensor. If no name is given, then a name like sensor_1 is generated automatically.

Returns:

Symbol of the sensor

Return type:

pymbs.Symbolics.Symbol

Velocity(symbol, CS1, CS2, CSref=None, name=None, category=<Mock name='mock.VarKind.Sensor' id='140347107147344'>)

The velocity sensor measures the relative velocity between CS1 and CS2 with respect to the reference frame specified by CSref. If CSref has been omitted then CS1 is used.

Parameters:
  • CS1 (MbsSystem, Body, Coordinate System.) – Parent Coordinate System.

  • CS2 (MbsSystem, Body, Coordinate System.) – Child Coordinate System.

  • CSref (MbsSystem, Body, Coordinate System.) – Reference Frame.

  • symbol (String.) – Symbol representing a the sensor result.

  • name (String.) – A name may be assigned to each sensor. If no name is given, then a name like sensor_1 is generated automatically.

Returns:

Symbol of the sensor

Return type:

pymbs.Symbolics.Symbol