Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2 b ) Closed - Loop Control: Pure Pursuit Algorithm One of the most powerful ideas in robotic control is feedback. In this next part,
b ClosedLoop Control: Pure Pursuit Algorithm
One of the most powerful ideas in robotic control is feedback. In this next part, we will implement a controller that measures the system's state
at each step and uses that measurement to compute an action. This way, if the system ended up in a slightly different state than was expected
from the simple model, the measurement will contain information about this discrepancy. Feedback control is often a great way to compensate
for imperfect knowledge of the system you are working with.
Your job is to implement the PurePursuitController class with a getaction method that takes in the current obs and the env.goal
coordinate expressed in the global frame and outputs one action This getaction method will be called at each step, so there is
no need to calculate a whole sequence of actions. The controller that you implement should be capable of driving the system to the goal.
class PurePursuitController:
definitself L:
Store any hyperparameters here.""
self.L L
def getactionself obs: npndarray, goal: npndarray npndarray:
Your implementation goes here""""
raise NotImplementedError
return nparraylinearspeed, angularspeed
This validation function may come in handy for debuggingtesting your controller in some random scenarios
def validationcontroller motionmodelUnicycle, sensormodelStateFeedbackWrapper, plotFalse, numruns maxnumstepsperrur
successperrun np empty numruns,
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started