Observations#

Abstract base class#

class enki_env.config.ObservationConfig#

The abstract base class of observation configurations.

It defines how observations are generated from the sensor readings and internal state of robots.

abstractmethod get(robot: pyenki.DifferentialWheeled) Observation#

How a robot generates an observation.

Parameters:

robot – The robot generating the observation

Returns:

The observation

Must be implemented by concrete classes!

abstract property space: gym.spaces.Dict#

The observation space

Must be implemented by concrete classes!

Robot base class#

class enki_env.robots.DifferentialDriveObservation(max_speed: float = 0, speed: bool = False, normalize: bool = True, dtype: type[~numpy.floating[~Any]] = <class 'numpy.float64'>)#

Bases: ObservationConfig

The observation configuration common to all robots.

dtype#

The scalar type of observations.

alias of float64

get(robot: pyenki.DifferentialWheeled) Observation#

How a robot generates an observation.

Parameters:

robot – The robot generating the observation

Returns:

The observation

Must be implemented by concrete classes!

max_speed: float = 0#

Maximal wheel speed in cm/s.

normalize: bool = True#

Whether to re-scale the observations in [-1, 1].

speed: bool = False#

If set, observations will contain field "wheel_speeds" with the current speed of the wheels (an array of length 2).