Implements comprehensive robot localization system as third template option. Teams can now start with professional positioning and navigation code. Template Features: - 12x12 field grid system (12-inch cells) - Multi-sensor fusion (encoders, IMU, vision) - Kalman-filter-style sensor combination - Fault-tolerant positioning (graceful degradation) - 21 files, ~1,500 lines, 3 passing tests Core Components: - GridCell/Pose2D/FieldGrid - Coordinate system - RobotLocalizer - Sensor fusion engine - OdometryTracker - Dead reckoning from encoders - ImuLocalizer - Heading from gyroscope - VisionLocalizer - Position from AprilTags Sensor Fusion Strategy: Priority 1: Vision (AprilTags) → ±2" accuracy, 100% confidence Priority 2: IMU + Odometry → ±4" accuracy, 70% confidence Priority 3: Odometry only → ±12" accuracy, 40% confidence System gracefully degrades when sensors fail, maintaining operation even with partial sensor availability. Hardware Abstraction: - Interfaces (Encoder, GyroSensor, VisionCamera) - Mock implementations for unit testing - Teams implement FTC wrappers for their hardware Documentation: - LOCALIZATION_GUIDE.md - System architecture and usage - GRID_SYSTEM.md - Field coordinate reference - README.md - Quick start and examples Usage: weevil new my-robot --template localization cd my-robot ./gradlew test # 3 tests pass in < 1 second This teaches professional robotics concepts (sensor fusion, fault tolerance, coordinate systems) not found in other FTC tools. Positions Nexus Workshops as teaching advanced autonomous programming. Updated src/templates/mod.rs to register localization template with proper metadata and feature descriptions. All tests passing (10/10 template tests).
{{ project_name }}
FTC Robot Project generated by Weevil v{{ generator_version }}
Project Structure
{{ project_name }}/
├── src/
│ ├── main/java/robot/
│ │ ├── subsystems/ # Robot subsystems (drivetrain, intake, etc.)
│ │ ├── hardware/ # Hardware abstraction layer
│ │ └── opmodes/ # TeleOp and Autonomous programs
│ └── test/java/robot/ # Unit tests
├── build.gradle.kts # Build configuration
└── settings.gradle.kts # Links to FTC SDK
Getting Started
Run Tests
./gradlew test
Build Project
./gradlew build
Deploy to Robot
weevil deploy {{ project_name }}
FTC SDK
This project uses FTC SDK located at:
{{ sdk_dir }}
Development
- Write your robot code in
src/main/java/robot/ - Write tests in
src/test/java/robot/ - Run tests frequently:
./gradlew test - Deploy when ready:
weevil deploy
Resources
Generated by Weevil v{{ generator_version }} | Nexus Workshops LLC