Materials: [Python/landercasadiPythonVideos123.zip]
This video continues the lunar spacecraft case study whose generic problem
statement and vehicle dynamics were discussed in video [
In this second installment, we discuss the core optimization code, in Python, using CasADi and IPOpt. We discuss cost index formulation, waypoints, and the integrator that stitches them (assuming constant thrust and pitch in the inter-waypoint segment). We also discuss the needed constraints (integrator-related ones, plus actuator bounds, avoidance of collisions with terrain, and an optional smooth descent velocity constraint as a function of the current spacecraft elevation above the terrain).Once all decision variables and constraints are specified, the solver is called, and an animation of the solution, along with various plots, is executed. Nevertheless, the cosmetic animation code is not discussed in the video for brevity.
Several simulations changing initial conditions, constraints and cost index will
be deferred to video [
*Link to my [whole collection] of videos in English. Link to larger [Colección completa] in Spanish.