How nusha97/quad-lcd works
Project type and purpose
• This is a research-oriented full-stack robotics codebase (“Quad-LCD”) for dynamics-aware trajectory generation and control of quadrotors.
• It provides pipelines for data generation (using RotorPy simulator and hardware bag sync), training (ICNNs/MLPs for penalty learning), and inference (trajectory regularization), as well as deployment in simulation (ROS/RViz) and on hardware.
File structure
• Top-level:
• Dockerfile / build.sh / run.sh – containerized environment build & launch
• configs/ – YAML experiment and model parameters
• notebooks/ – Jupyter workflows for data inspection, model debugging, visualization
• scripts/ – stand-alone Python entrypoints for data gen, training, inference
• src/layered_quadrotor_control/ – ROS-compatible Python/C++ package:
– scripts/datagen/ (detailed data-generation modules)
– scripts/learning/ (core learning utilities in JAX)
– scripts/inference/ (inference & regularized trajectory modules)
– scripts/utils/ (common helpers, plotting, bag-processing)
– src/sync_msg/ (C++ node for ROS bag synchronization)
• Key patterns:
• Layered pipeline: Data → Training → Inference → Deployment
• Separation of concerns: Python high-level scripts vs. C++ real-time sync node
• Containerization (Docker + run/build scripts)
• ROS package structure (CMakeLists, package.xml)
README for additional insights
• Confirms three major stages: data gen → model training → inference
• Leverages RotorPy for simulation backbone
• Targets two quadrotor platforms (Crazyflie, Dragonfly) in sim & hardware
• Points to ROS deployment (rviz, rosrun sync_msg)
• Specifies Python (JAX, MLP/ICNN), CMake/C++, YAML configs
1. Environment & Orchestration
– Docker Container (base image, dependencies), build.sh/run.sh
– Conda environment
2. Configuration Store
– configs/*.yaml (experiment parameters, network hyperparams)
3. Data Generation Layer
– Python entrypoint: scripts/rotorpy_data.py
– Module: src/.../scripts/datagen (RotorPy sim, hardware bag loaders)
– ROS C++ node: sync_msg for bag recording
4. Training Layer
– scripts/training.py
– JAX models (MLP, ICNN) in scripts/learning/
5. Inference Layer
– scripts/singletraj_inference.py
– scripts/inference/regularized_trajectory.py, l1adaptive_control, SGD
6. Deployment & Visualization
– ROS simulation: demo_sim.sh, rviz
– Hardware interface: mav_layer_interface, rosrun layered_ref_control
– Notebooks for analysis (Inference.ipynb, Testing_*.ipynb)
– configs → DataGen
– DataGen → RawDatasets (bag files, numpy arrays)
– RawDatasets → Training → TrainedModel artifacts
– TrainedModel + configs → Inference → RegularizedTrajectories
– RegularizedTrajectories → ROS Simulation / Hardware
– Notebooks can consume data at each stage
c. Architectural patterns & principles:
– Layered pipeline (clear stage separation)
– Modular ROS package and standalone scripts
– Containerized reproducibility
– Data-driven learning loop with feedback (rollouts → penalty learning → planning)
d. Technologies, frameworks, libraries:
– Python 3, JAX, PyTorch (if used), NumPy, YAML
– ROS (C++, Python nodes), CMake, package.xml
– RotorPy simulator
– Docker, Conda
– Jupyter notebooks
Capturing essential architectural elements
• Container boundary enclosing all Python/C++ code and dependencies.
• Detail the ROS package structure within the container.
• How configs parameterize each stage.
• Iterative learning loop (rollout → penalty update → replan).