How hanruihua/rda-planner works
Project type and purpose
• RDA Planner is an open-source, optimization-based Python library for MPC motion planning, not a web or full-stack app.
• Its goal is to compute collision-free trajectories in cluttered environments using ADMM-based decomposition for real-time performance.
File structure
• Top‐level package “RDA_planner/” contains core modules:
• mpc.py – defines the MPC formulation (prediction horizon, cost)
• rda_solver.py – implements the ADMM solver, subproblem decomposition
• setup.py – installation metadata
• example/ – scenario drivers, each with:
• A .py script invoking RDA_planner on a scenario (corridor, path_track, reverse, lidar_nav, dynamic_obs)
• Optional reference data (.npy) for path comparison
• No GUI; integration with ir-sim (external sim engine) and optional ROS wrapper.
README for additional insights
• Describes high-level workflow: load config → set up simulation → call RDA solver → output control sequence
• Highlights dependencies: Python ≥3.9, ir-sim for visualization, separate rda_ros package for ROS integration
a. Main components
1. Scenario Loader
– reads YAML, scenario scripts (example/*.py)
2. Simulation Interface
– ir-sim module or ROS wrapper (external)
3. RDA Planner Core
– MPC formulation (mpc.py)
– ADMM-based RDA solver (rda_solver.py)
4. Subproblem Modules
– Dynamics constraints
– Collision avoidance constraints (per obstacle, parallel)
5. Output Publisher
– Trajectory sequence → simulation or ROS topics
b. Relationships and data flow
• Scenario Loader → (config, initial state) → Simulation Interface → current state, obstacles → RDA Planner Core
• Planner Core → splits into subproblems → solves in parallel → aggregates updated trajectory
• Output Publisher → control commands → back to Simulation Interface or ROS
c. Architectural patterns
– Modular separation: I/O (scenario), core algorithm (MPC + solver), external interfaces
– Data-flow pipeline: config → state → solver → control
– Parallel subproblem execution (ADMM)
d. Key technologies and libraries
– Python 3.9+
– NumPy (for data arrays, .npy files)
– ir-sim (external sim engine)
– (Optional) ROS for real-robot interface via rda_ros
Final advice
• Every layer: from user scripts through solver internals to external interfaces