raise exc.PhysicsObjectCreationError(type_='Rotary joint')

def add_torque(self, torque):

- """Applies the torque about the rotation axis

+ """Apply torque about the rotation axis.

+ :param torque: magnitude

dispatcher.send(signals.JOINT_PRE_ADD_TORQUE, sender=self,

- """Returns the angle (float) between the two bodies. Its value is

- between -pi and +pi. The zero angle is determined by the position of

- the bodies when joint anchor is set."""

+ """Return the angle between the two bodies.

+ The zero angle is determined by the position of the bodies

+ when joint's anchor was set.

+ :return: value ranging ``-pi`` and ``+pi``

return self._inner_joint.getAngle()

- """Returns the angle rate (float)"""

+ """Return the rate of change of the angle between the two bodies.

return self._inner_joint.getAngleRate()

raise exc.JointError(self, 'Failed to get the angle rate of this joint')

def set_speed(self, speed, max_force=None):

+ """Set rotation speed to ``speed``.

+ The joint will set that speed by applying a force up to

+ ``max_force``, so it is not guaranteed that ``speed``

+ :param speed: speed to set

+ :param max_force: if not None, the maximum force the joint can

+ apply when trying to set the rotation speed

+ :type max_force: float or None

dispatcher.send(signals.JOINT_PRE_SET_SPEED, sender=self, speed=speed)

if max_force is not None:

self._inner_joint.setParam(ode.ParamFMax, max_force)