Repository navigation
docs: Write sections 4.1, 4.2 and 4.4 of the book: cubic splines, Pure Pursuit and rear wheel feedback - #219
Conversation
|
Thank you, @Dhruv-Sharma29, for writing three sections at once, and at this quality! The derivations are complete and easy to follow (the spline coefficients step by step, the law of sines for the arc, the Frenet equations and the Lyapunov function), the Limits sections say honestly where the code differs from the theory, and the linearized analysis that connects Pure Pursuit and rear wheel feedback ( I checked it against the code and the math:
One request before merging:
Suggestions:
Optional: since #230, the writing guide adds a short Check your understanding part (two or three questions answered from the text, with folded answers) to the theory layer. This PR was opened before that, so it isn't needed here; if you'd like to add questions, the Stanley section has an example, or they can come in a follow-up. 🤖 Generated with Claude Code |
…e Pursuit and rear wheel feedback Add the theory layer of the three remaining sections of chapter 4 (ShisatoYano#200): the natural cubic spline course with its yaw, curvature and target speed, Pure Pursuit with the adaptive look-ahead distance, and rear wheel feedback with its Lyapunov argument and a comparison of the three controllers. Each page has a figure script, and the new symbols are added to Notation.
- 4.2 Limits: Pure Pursuit ignores the course's heading and curvature at the look-ahead point; the old sentence wrongly said the vehicle's heading doesn't matter - 4.4 and Notation: s in the Frenet equations is the true distance along the course, while 4.1 also uses it for the chord-length parameter - 4.2 and the comparison table: give checkable numbers for how fast Pure Pursuit comes back (first reaches the course after 3*pi/4 l_d, within 2 % after about 4 l_d)
|
Thank you for the careful review. I've pushed the changes:
I left the optional "Check your understanding" questions out of this PR. |
e9d0212 to
d96e402
Compare
|
Thank you, @Dhruv-Sharma29, for the quick update! All three points are addressed:
The book still builds without warnings after merging with the current 🤖 Generated with Claude Code |
Closes #200
Overview
Adds the theory layer of the three remaining sections of chapter 4, one page each, following the writing guide and the Stanley section:
doc/path_tracking/cubic_spline.md): the natural cubic spline derived step by step (conditions, coefficients, the tridiagonal system, natural ends), the chord-length parameter of the 2D course, the yaw angle and curvature formulas, and the target speed along the course (switch-backs and the stop at the end).doc/path_tracking/pure_pursuit.md): the look-ahead point, the arc through it (law of sines), the curvature as a proportional law on the look-ahead point's offset, the steering angle from the bicycle model, the speed-dependent look-ahead distance with a linearized analysis of why it grows with speed, and the adaptive look-ahead distance.doc/path_tracking/rear_wheel_feedback.md): the errors at the rear axle, the error dynamics in the course frame, the control law and its Lyapunov argument, the steering angle, and a "Pure Pursuit vs Stanley vs rear wheel feedback" comparison (what each one looks at and how it behaves at speed).Each page has a figure script in$s$ , $l_d$ and $\alpha$ are added to Notation and Units.
doc/path_tracking/figures/(cubic_spline_course.py,pure_pursuit_geometry.py,rear_wheel_feedback_errors.py) that computes its geometry with the page's equations. The pages are listed on the chapter page, and the new symbolsThe Limits sections also say where the code differs from the theory, for example that
RearWheelFeedbackControllersets the whole yaw rate to 0 when the heading error is exactly 0, and that the simulations' course has a turn of about 1 m radius driven at a constant 20 km/h.How I checked it
sphinx-build -W --keep-going -b html doc doc/_build/htmlbuilds without warnings, andpytest test/test_book_chapters.pypasses.CubicSplinefor the simulations' course.