Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Now, run your open loop controller on a Unicycle with both process & sensor noise. Your open - loop control sequence probably does not drive

Now, run your open loop controller on a Unicycle with both process & sensor noise. Your open-loop control sequence probably does not drive
the system to the goal anymore. This is to be expected! It's like trying to park a car in a parking spot with your eyes closed. We will implement a
much smarter strategy next.
[] np.random. seed (0)
max_num_steps =200
env = gymnasium. make("gym_neu_racing/NEUEmptyWorld-vo")
# Add both sensor noise & process noise to make the problem more challenging
env = NoisyStateFeedbackWrapper(env)
env. unwrapped. motion_model = NoisyUnicycle()
obs, _= env.reset() # initial observation of the system's state vector
observation_history =[obs]
# query your open loop controller based on the initial state of the system
control_sequence = open_loop_control_policy(obs, env.goal, num_steps=max_num_steps)
# Now that we've computed the control sequence, run the system forward until
# we reach max_num_steps or the system's state is close to the goal
for step in range(max_num_steps):
action = control_sequence [step]
obs, ,' terminated,, ,_= env.step(action)
observation_history.append(obs)
if terminated:
break
# Generate a simple plot of the path taken
plot_path(env, observation_history)
if terminated:
print('Success! Your open-loop controller drove the system to the goal.')
else:
print('Your open-loop controller did not successfully drive the system to the goal.')
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions