Materials: [ Cód.: RobotTrajectoryOptimizationCode.zip ]
This video continues with the detailed Casadi (+Ipopt) Python code analysis (basically line-by-line equivalent to the Matlab script also provided).
In the previous video [
In this video, we discuss the:
Cost index, the integral of a loss function L(x,u)
Integrator object, computing via Runge-Kutta 4 the next state and the accumulated cost from waypoint to waypoint
The main loop defining , , and connecting them via the Integrator; also, constraints for being in a suitable rectangle being part of the safe corridor in the form .
How the overall problem is cast, and then the optimizer is called.
For brevity, plotting/animation code is not explained, as it is out of the scope of the present video.
Actual runs of the code, with simulation and animations of the resulting
trajectories will be the goal of video [
Also, in some cases we may consider posing the collision avoidance
problem instead of staying inside a safe corridor as staying outside of
polyhedral obstacles. This idea is discussed in depth in video [
*Link to my [ whole collection] of videos in English. Link to larger [ Colección completa] in Spanish.
Colección completa en ESPA
Previous Nonlinear predictive control of unicycle robot (2): code analysis, part I, preliminaries
Next Nonlinear predictive control of unicycle robot (4): simulations
Full collection in ENGLISH [View all]:
Previous Nonlinear predictive control of unicycle robot (2): code analysis, part I, preliminaries
Next Nonlinear predictive control of unicycle robot (4): simulations