PolicyBase

class trifinger_rl_datasets.PolicyBase(action_space, observation_space, episode_length)[source]

Base class defining interface for policies.

Parameters:
  • action_space (Space) – Action space of the environment.

  • observation_space (Space) – Observation space of the environment.

  • episode_length (int) – Number of steps in one episode.

abstract get_action(observation)[source]

Returns action that is executed on the robot.

Parameters:

observation (ndarray | Dict[str, Any]) – Observation of the current time step.

Returns:

Action that is sent to the robot.

Return type:

ndarray

static get_policy_config()[source]

Returns the policy configuration.

This specifies what kind of observations the policy expects.

Return type:

PolicyConfig

reset()[source]

Will be called at the beginning of each episode.

Return type:

None