A revolute joint constrains to bodies to share a common point while they are free to rotate about the point. The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated.

Hierarchy (View Summary)

Constructors

Methods

  • Enable/disable the joint limit.

    Parameters

    • flag: boolean

      True to enable, false to disable.

    Returns void

  • Enable/disable the joint motor.

    Parameters

    • flag: boolean

      True to enable, false to diasable.

    Returns void

  • Get the current joint angle speed in radians per second.

    Returns number

    Joint speed.

  • Get the motor speed in radians per second.

    Returns number

    Motor speed.

  • Get the current motor torque, usually in N-m.

    Returns number

    Motor torque.

  • Is the joint limit enabled?

    Returns boolean

    True if enabled, false if disabled.

  • Is the joint motor enabled?

    Returns boolean

    True if enabled, false if disabled.

  • Set the joint limits in radians.

    Parameters

    • lower: number

      New lower limit.

    • upper: number

      New upper limit.

    Returns void

  • Set the maximum motor torque, usually in N-m.

    Parameters

    • torque: number

      New max torque.

    Returns void

  • Set the motor speed in radians per second.

    Parameters

    • speed: number

      New motor speed.

    Returns void