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_2

Step: 3

blur-text-image_3

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

When should you avoid using exhaust brake select all that apply

Answered: 1 week ago