Thymio#

Actions#

class enki_env.ThymioAction(max_speed: float = 16.6, max_acceleration: float = 1, fix_orientation: bool = False, fix_position: bool = False, acceleration: bool = False, dtype: type[~numpy.floating[~Any]] = <class 'numpy.float64'>, prox_comm: bool = False, max_proximity_comm_payload: int = 1)#

Bases: DifferentialDriveAction

The action configuration for pyenki.Thymio2.

Sets by default max_speed=16.6.

max_proximity_comm_payload: int = 1#

The maximal value of broadcasted messages.

max_speed: float = 16.6#

Maximal wheel speed in cm/s.

prox_comm: bool = False#

If set, there is an additional action in [-1, 1] that is first converted to an integer in [0, max_proximity_comm_payload] before being broadcasted using proximity sensors.

Observations#

class enki_env.ThymioObservation(max_speed: float = 16.6, speed: bool = False, normalize: bool = True, dtype: type[~numpy.floating[~Any]] = <class 'numpy.float64'>, proximity_distance: bool = False, proximity_value: bool = True, proximity_comm_payload: bool = False, proximity_comm_intensity: bool = False, proximity_comm_rx: bool = False, max_proximity_distance: float = 28, max_proximity_value: float = 4505, max_proximity_comm_payload: int = 1, max_proximity_comm_intensity: float = 4600, max_proximity_comm_number: int = 1)#

Bases: DifferentialDriveObservation

The observation configuration for pyenki.Thymio2.

If normalize=True, fields prox/distance, prox/value, prox_comm/intensity, prox_comm/payload, and prox_comm/rx are re-scaled in [0, 1] using to the values of max_proximity_distance, max_proximity_value, max_proximity_comm_intensity, and max_proximity_comm_payload respectively .

The values of proximity_comm_... fields are sorted by the intensity of the messages, from highest to lowest.

Sets by default max_speed=12.8.

max_proximity_comm_intensity: float = 4600#

The maximal proximity communication intensity

max_proximity_comm_number: int = 1#

The maximal number of proximity communication messages to include in the observations. When there are exceeding messages, messages with the lowest intensities will be excluded.

max_proximity_comm_payload: int = 1#

The maximal proximity communication payload

max_proximity_distance: float = 28#

The maximal range of the proximity sensors

max_proximity_value: float = 4505#

The maximal values read by proximity sensors

max_speed: float = 16.6#

Maximal wheel speed in cm/s.

proximity_comm_intensity: bool = False#

If set, observations include field "prox_comm/intensity" with the intensity of IR messages received by proximity sensors.

proximity_comm_payload: bool = False#

If set, observations include field "prox_comm/payload" with the payload of IR messages received by proximity sensors.

proximity_comm_rx: bool = False#

If set, observations include field "prox_comm/rx" with IR messages.

proximity_distance: bool = False#

If set, observations include field "prox/distance" with distances measured by the proximity sensors.

proximity_value: bool = True#

If set, observations include field "prox/value" with readings from the proximity sensors.