Actions#
Abstract base class#
- class enki_env.config.ActionConfig#
The abstract base class of action configurations.
It defines how a robot actuates actions.
- abstractmethod actuate(act: Action, robot: pyenki.DifferentialWheeled, dt: float) None#
How a robot actuates an action.
Must be implemented by concrete classes!
- Parameters:
act – The action
robot – The robot that actuates the action
dt – The time step
- abstract property space: gym.spaces.Box#
The action space
Must be implemented by concrete classes!
Robot base class#
- class enki_env.robots.DifferentialDriveAction(max_speed: float = 0, max_acceleration: float = 1, fix_orientation: bool = False, fix_position: bool = False, acceleration: bool = False, dtype: type[~numpy.floating[~Any]] = <class 'numpy.float64'>)#
Bases:
ActionConfigThe action configuration common to all robots.
Actions are given by two numbers in [-1, 1] which are re-scaled and actuated either as (linear) wheel speeds or (linear) wheel accelerations:
left = action[0] right = action[1]
If either
fix_orientation=Trueorfix_position=Trueactions are instead given by a single number in [-1, 1] that is mapped to left/right wheel likeleft = +action[0] if fix_orientation = -action[0] if fix_position right = action[0]
- fix_orientation: bool = False#
Whether to nullify the angular component. If set, it reduces the dimension of the action space by one.
- fix_position: bool = False#
Whether to nullify the linear component. If set, it reduces the dimension of the action space by one.