E-puck#
- class pyenki.EPuck#
Bases:
DifferentialWheeled,PhysicalObject- Parameters:
A
DifferentialWheelede-Puck robot.The robots has a 60 pixels frontal looking camera placed at a height of 2.2 cm and with a fov of 60 degrees, and 8 infrared proximity sensors (maximal range 12 cm) placed at a height of 2.5 cm and at angles: -18, -45, -90, -142, 142, 90, 45, 18 degrees.
Example:
>>> import pyenki >>> world = pyenki.World() >>> epuck = pyenki.EPuck() >>> world.add_object(epuck) >>> epuck.position = (-10, 0) >>> epuck.set_led_ring(True) >>> obj = pyenki.PhysicalObject(radius=2.0, height=5.0, mass=-1, pyenki.Color(0.3, 0.7, 0)) >>> world.add_object(obj) >>> world.step(0.1) >>> epuck.prox_values array([98.52232283, 3.30197324, ... >>> epuck.camera_image array([[0.5, 0.5, 0.5, 1. ] ...
- prox_values#
An array of 8 proximity sensor readings, one for each sensors (readonly).
- Type:
- prox_distances#
An array of 8 distances between proximity sensor and nearest obstacles, one for each sensors (readonly). please note that this value would not directly be accessible by a real robot (readonly).
- Type:
- scan#
An array of 64 radial distances, ordered from -180 degrees to 180 degrees, in centimeters.
- Type: