From 4e4c361289af294c73ac789dbfba81b43dec9f60 Mon Sep 17 00:00:00 2001 From: spencerfolk Date: Tue, 2 Jan 2024 15:21:08 -0500 Subject: [PATCH] Reduced state space to regular quad states --- rotorpy/learning/quadrotor_environments.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rotorpy/learning/quadrotor_environments.py b/rotorpy/learning/quadrotor_environments.py index 2f87476..cd9078f 100644 --- a/rotorpy/learning/quadrotor_environments.py +++ b/rotorpy/learning/quadrotor_environments.py @@ -90,7 +90,7 @@ class QuadrotorEnv(gym.Env): # motor_speeds, rotor_speeds, observation_state[16:20] # For simplicitly, we assume these observations can lie within -inf to inf. - self.observation_space = spaces.Box(low = -np.inf, high=np.inf, shape = (20,), dtype=np.float32) + self.observation_space = spaces.Box(low = -np.inf, high=np.inf, shape = (13,), dtype=np.float32) ############ ACTION SPACE @@ -391,7 +391,7 @@ class QuadrotorEnv(gym.Env): def _get_obs(self): # Concatenate all the state variables into a single vector - state_vec = np.concatenate([self.vehicle_state['x'], self.vehicle_state['v'], self.vehicle_state['q'], self.vehicle_state['w'], self.vehicle_state['wind'], self.vehicle_state['rotor_speeds']], dtype=np.float32) + state_vec = np.concatenate([self.vehicle_state['x'], self.vehicle_state['v'], self.vehicle_state['q'], self.vehicle_state['w']], dtype=np.float32) return state_vec