class JointPower(CentrifugalForce, PrintDataMixin):
+ """Simulation of a virtual power sensor attached to a joint (``r2``).
+ This joint is not powered but because friction is considered
+ an external torque is applied at each simulation step
+ (see :meth:`apply_friction`). Because it is a friction torque,
+ the applied power is negative.
+ The laser is positioned at :attr:`RAY_POS` and its detection range
+ is determined by :attr:`RAY_LENGTH`. The default orientation
+ (positive Z-axis) of the :class:`ars.model.robot.sensors.Laser`
+ may be modified with :attr:`RAY_ROTATION`.
+ The sensor is created in :meth:`create_sim_objects`:
+ `self.sensor = sen.Laser(space, self.RAY_LENGTH)`
+ and it is updated in :meth:`on_post_step`:
joint_object = self.sim.get_joint('r2')