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 controlsequence 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 NoisyUnicycleUnicycle:
Same as Unicycle but add process noise at each step.""
definitself
processnoiselimitsnparray
:
self.processnoiselimits processnoiselimits
super :( minmin,maxmax,minmin,maxmax
def stepself currentstate, action, dt npndarray:
Add process noise to the parent kinematics model."
nextstate superstep currentstate, action,
perturbednextstate nextstate nprandom. uniformlowself.processnoiselimits highself.processnoiselimits
return perturbednextstate
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 NoisyStateFeedbackWrapperObservationWrapper:
def self env, sensornoiselimitsnparray :
self. sensornoiselimits sensornoiselimits
super :env
def observationself observation: dict npndarray:
obs observation state nprandom.uniformlowself.sensornoiselimits highself.sensornoiselimits
return obs
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
