Question: Now, let's see what happens if we try that same control _ sequence on a version of the environment where the wheels are a little

Now, let's see what happens if we try that same control_sequence on a version of the environment where the wheels are a little bit slippery,
so our simple unicycle model does not describe the true system perfectly.
[] class NoisyUnicycle(Unicycle):
"'"'Same as Unicycle but add process noise at each step.""'"
def_init_(self,
process_noise_limits=np.array ([0.1,0.1,0.5]),
:
self.process_noise_limits = process_noise_limits
super () :( v-min=v-min,v-max=v-max,w-min=w-min,w-max=w-max )
def step(self, current_state, action, dt=0.1) np.ndarray:
"'"'"Add process noise to the parent kinematics model." "'"
next_state =super().step current_state, action, dt=dt)
perturbed_next_state = next_state + np.random. uniform(low=-self.process_noise_limits, high=self.process_noise_limits)
return perturbed_next_state
This class we wrote for you will make it so you can't perfectly measure the system's state. It adds random noise to the obs that the env
returns at each step:
[] from gymnasium import ObservationWrapper
class NoisyStateFeedbackWrapper(ObservationWrapper):
def (self, env, sensor_noise_limits=np.array([0.05,0.05,0.2] :
self. sensor_noise_limits = sensor_noise_limits
super() :(env)
def observation(self, observation: dict) np.ndarray:
obs = observation ["state"]+ np.random.uniform(low=-self.sensor_noise_limits, high=self.sensor_noise_limits)
return obs
 Now, let's see what happens if we try that same control_sequence

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!