-
Notifications
You must be signed in to change notification settings - Fork 0
/
learner.py
29 lines (22 loc) · 841 Bytes
/
learner.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
import numpy as np
import cbf
import dynamics_gp
class LEARNER():
def __init__(self,env):
self.firstIter = 1
self.count = 1
self.env = env
self.torque_bound = 15.
self.max_speed = 60.
#Set up observation space and action space
self.observation_space = env.observation_space
self.action_space = env.action_space
print('Observation space', self.observation_space)
print('Action space', self.action_space)
#Determine dimensions of observation & action space
self.observation_size = self.env.observation_space.shape[0]
self.action_size = self.action_space.shape[0]
# Build barrier function model
cbf.build_barrier(self)
# Build GP model of dynamics
dynamics_gp.build_GP_model(self)