FixTheRobot Explore Robotics / Guidance, Navigation and Control / M9 / M9-L2

This lab works on phones, but writing code is much easier on a laptop.

Guidance, Navigation and Control · Trajectory Optimization and Predictive Guidance · M9-L2 · Advanced

Solve the Landing as a Convex Program

Bench log · Hopper on the test range

13:50. Hopper has to land from 250 m and 150 m to one side, with an engine that cannot be throttled below 30% and a glide-slope cone that keeps it clear of the test tower. The guidance engineer has a trajectory from a spreadsheet, and the thrust falls to zero in the middle of it.

You will pick the descent time, pose the landing as a convex problem and solve it with the course solver, and make the guidance replan when a gust displaces the vehicle.

Your task

    Simulation
    solution.pyLoading Python…
    Ctrl+Enter runs
    What Python can I use?

    Plain Python 3 with the standard library and the course library gnckit: g.solve_convex(c, A, b, G, h, socs) minimizes c·x subject to A x = b, G x ≤ h and second-order cone constraints ||F x + g|| ≤ q·x + d. A solve takes about two seconds in the browser. Your code runs in a background worker: an endless loop is stopped after a few seconds.

    Hints

    What this lab teaches

    Stage 1: the fuel of the optimal descent has an interior minimum, and a convex programme reports infeasibility instead of an impossible trajectory. Stage 2: posing the landing as a second-order cone programme: the terminal state as equalities, the thrust bounds and the glide slope as inequalities, the relaxation |u| ≤ Γ; a missing thrust floor is found from the thrust plot. Stage 3: replanning from the state after a gust, which turns the open-loop plan into feedback.

    Grading replays the controls you return: the end state, the thrust limits at the nominal mass, the cone, and the fuel against the optimum from the course solver, on hidden scenarios and gusts. A solve takes about two seconds in the browser; the labs are limited to twelve steps for that reason.

    Theory for this lab

    Trajectory Optimization and Predictive Guidance labs

    1. M9-L1: Find the Switch Time
    2. M9-L2: Solve the Landing as a Convex Program: this lab.

    Educational simplification: a planar descent with a fixed mass profile, twelve steps and a relaxation that the lesson proves lossless for this problem; module 9 treats the mass dynamics, the lossless convexification and the real-time solver.

    Get the next lab

    Get notified when new robotics labs are released. One email per new lab, nothing else.