-
Notifications
You must be signed in to change notification settings - Fork 26
/
__init__.py
58 lines (51 loc) · 1.71 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright (C) 2020 Istituto Italiano di Tecnologia (IIT). All rights reserved.
# This software may be modified and distributed under the terms of the
# GNU Lesser General Public License v2.1 or any later version.
import numpy
from gym.envs.registration import register
from . import models, randomizers, tasks
max_float = float(numpy.finfo(numpy.float32).max)
register(
id="Pendulum-Gazebo-v0",
entry_point="gym_ignition.runtimes.gazebo_runtime:GazeboRuntime",
max_episode_steps=5000,
kwargs={
"task_cls": tasks.pendulum_swingup.PendulumSwingUp,
"agent_rate": 1000,
"physics_rate": 1000,
"real_time_factor": max_float,
},
)
register(
id="CartPoleDiscreteBalancing-Gazebo-v0",
entry_point="gym_ignition.runtimes.gazebo_runtime:GazeboRuntime",
max_episode_steps=5000,
kwargs={
"task_cls": tasks.cartpole_discrete_balancing.CartPoleDiscreteBalancing,
"agent_rate": 1000,
"physics_rate": 1000,
"real_time_factor": max_float,
},
)
register(
id="CartPoleContinuousBalancing-Gazebo-v0",
entry_point="gym_ignition.runtimes.gazebo_runtime:GazeboRuntime",
max_episode_steps=5000,
kwargs={
"task_cls": tasks.cartpole_continuous_balancing.CartPoleContinuousBalancing,
"agent_rate": 1000,
"physics_rate": 1000,
"real_time_factor": max_float,
},
)
register(
id="CartPoleContinuousSwingup-Gazebo-v0",
entry_point="gym_ignition.runtimes.gazebo_runtime:GazeboRuntime",
max_episode_steps=5000,
kwargs={
"task_cls": tasks.cartpole_continuous_swingup.CartPoleContinuousSwingup,
"agent_rate": 1000,
"physics_rate": 1000,
"real_time_factor": max_float,
},
)