1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Autonomous motion control algorithms.
//!
//! This module provides tools for precise robot movement during autonomous
//! periods. It includes:
//!
//! * **Odometry**: Position tracking using tracking wheels and an inertial sensor.
//! * **PID Control**: Proportional-Integral-Derivative controllers for accurate
//! linear and rotational movement.
//! * **Path Following**: The Candidate-Based Pursuit algorithm for smooth path
//! tracking.
//!
//! # Architecture
//!
//! The motion system is built around asynchronous control loops that run
//! independently from your main autonomous routine. You initialize the
//! controllers, then call movement methods that set targets and wait for
//! completion.
//!
//! # Example
//!
//! ```ignore
//! use antaeus::motion::feedback_control::legacy_pid::linear_pid::{PIDMovement, PIDValues};
//! use antaeus::motion::feedback_control::legacy_pid::DrivetrainConfig;
//!
//! // Create and initialize PID controller
//! let pid = PIDMovement { /* ... */ };
//! pid.init();
//!
//! // Execute movements
//! pid.travel(24.0, 2000, 100).await; // Move 24 inches
//! pid.rotate(90.0, 2000, 100).await; // Turn 90 degrees
//! ```
/// Odometry tracking for position estimation.
///
/// Provides the [`Tracker`](localization::tracker::Tracker) implementation
/// for tracking the robot's global position using tracking wheels and an inertial sensor.
/// Candidate-Based Pursuit path following algorithm.
///
/// A more robust variant of pure pursuit that handles edge cases
/// like the robot being off the path or near path endpoints.