How lucassihan/lucaslib works
This repository combines VEX robot-control firmware with two desktop/web tools: a motion-trace debugger and a robot-diagram editor. The robot workflow runs competition modes, uses controller input or autonomous routines to command movement, and tracks chassis pose; the debugger captures movement telemetry for inspection, while the diagram app edits and exports scenes. The tree also shows pursuit, sandbox simulation, velocity tuning, and trace-library features. Source evidence is partial: several app pages and runtime modules were not sampled, so their internal links are omitted or marked unverified.
Components 22
Robot Runtime
- Competition modes
src/main.cpp - Autonomous routines
src/auton.cpp - Driver control
src/misc/driverControllers.cpp - Button monitoring
src/misc/controllerButtonMonitoring.cpp - Robot devices
src/coreConfigs.cpp - Background tasks
src/tasks.cpp
Motion Control
- Pose tracking
src/movement/odometry.cpp - Movement controllers
src/movement/movement.cpp - PID control
src/movement/pid.cpp - Ramsete tracking
src/ramsete/ramseteController.cpp - Trajectory execution
src/ramsete/executeTrajectory.cpp
Trace Debugger
- Trace capture
src/debugger/debugger.cpp - Trace inspection
debugger-app/src/routes/+page.svelte - Pursuit planner
debugger-app/src/lib/components/pursuit - Motion sandbox
debugger-app/src/lib/sandbox - Velocity tuning
debugger-app/src/lib/velocity - Trace file APIs
debugger-app/src/routes/api
Diagram Editor
- Scene editor
diagram-app/src/App.svelte - Canvas interaction
diagram-app/src/lib/components/Canvas.svelte - Scene model
diagram-app/src/lib/model/scene.svelte.ts - PNG export
diagram-app/src/lib/render/exportPng.ts
Other components
- Robot operator
Connections 21
- Competition modes → Autonomous routines: runs
src/main.cpp - Competition modes → Driver control: runs
src/main.cpp - Competition modes → Background tasks: starts
src/main.cpp - Robot operator → Driver control: controls
- Driver control → Button monitoring: updates
- Driver control → Robot devices: commands
- Autonomous routines → Trajectory execution: executes
- Background tasks → Pose tracking: starts
- Movement controllers → PID control: uses
src/movement/movement.cpp - Movement controllers → Pose tracking: reads pose
src/movement/movement.cpp - Movement controllers → Trace capture: records
src/movement/movement.cpp - Ramsete tracking → Pose tracking: reads pose
src/ramsete/ramseteController.cpp - Trajectory execution → Ramsete tracking: follows schedule
- Trace capture → Trace inspection: exports trace
- Trace inspection → Trace file APIs: loads files
- Trace inspection → Pursuit planner: offers planning
- Trace inspection → Motion sandbox: offers simulation
- Trace inspection → Velocity tuning: offers tuning
- Canvas interaction → Scene model: edits scene
- Canvas interaction → Scene editor: renders in
- Canvas interaction → PNG export: exports