|
Billiard
1
A Gym Environment with a ball pushing arm
|


Public Member Functions | |
| def | __init__ (self, seed=None, max_steps=500) |
| def | seed (self, seed=None) |
| def | reset (self) |
| def | step (self, action) |
| def | render (self, mode='human') |
Public Attributes | |
| screen | |
| params | |
| physics_eng | |
| observation_space | |
| Ball XY positions can be between -1.5 and 1.5. More... | |
| action_space | |
| Joint commands can be between [-1, 1]. More... | |
| steps | |
| state | |
| clock | |
Static Public Attributes | |
| dictionary | metadata |
State is composed of: s = ([ball_x, ball_y], [joint0_angle, joint1_angle], [joint0_speed, joint1_speed]) The values that these components can take are: ball_x, ball_y -> [-1.5, 1.5] joint0_angle -> [-pi/2, pi/2] joint1_angle -> [-pi, pi] joint0_speed, joint1_speed -> [-50, 50]
| def gym_billiard.envs.billiard_env.BilliardEnv.__init__ | ( | self, | |
seed = None, |
|||
max_steps = 500 |
|||
| ) |
Constructor :param seed: the random seed for the environment :param max_steps: the maximum number of steps the episode lasts :return:
| def gym_billiard.envs.billiard_env.BilliardEnv.render | ( | self, | |
mode = 'human' |
|||
| ) |
Rendering function :param mode: if human, renders on screen. If rgb_array, renders as numpy array :return: screen if mode=human, array if mode=rgb_array
| def gym_billiard.envs.billiard_env.BilliardEnv.reset | ( | self | ) |
Function to reset the environment. - If param RANDOM_BALL_INIT_POSE is set, the ball appears in a random pose, otherwise it will appear at [-0.5, 0.2] - If param RANDOM_ARM_INIT_POSE is set, the arm joint positions will be set randomly, otherwise they will have [0, 0] :return: Initial observation
| def gym_billiard.envs.billiard_env.BilliardEnv.seed | ( | self, | |
seed = None |
|||
| ) |
Function to seed the environment :param seed: The random seed :return: [seed]
| def gym_billiard.envs.billiard_env.BilliardEnv.step | ( | self, | |
| action | |||
| ) |
Performs an environment step. :param action: Arm Motor commands. Can be either torques or velocity, according to TORQUE_CONTROL parameter :return: state, reward, final, info
| gym_billiard.envs.billiard_env.BilliardEnv.action_space |
Joint commands can be between [-1, 1].
| gym_billiard.envs.billiard_env.BilliardEnv.clock |
|
static |
| gym_billiard.envs.billiard_env.BilliardEnv.observation_space |
Ball XY positions can be between -1.5 and 1.5.
Arm joint can have positons: Joint 0: [-Pi/2, Pi/2] Joint 1: [-Pi, Pi]
| gym_billiard.envs.billiard_env.BilliardEnv.params |
| gym_billiard.envs.billiard_env.BilliardEnv.physics_eng |
| gym_billiard.envs.billiard_env.BilliardEnv.screen |
| gym_billiard.envs.billiard_env.BilliardEnv.state |
| gym_billiard.envs.billiard_env.BilliardEnv.steps |
1.8.17