-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,57 @@ | ||
# Maple-Swerve-Skeleton | ||
Iron Maple's swerve-drive skeleton project, embedded with advanced features | ||
# The 🍁 Swerve Skeleton | ||
|
||
--- | ||
|
||
Iron Maple’s Swerve Drive Skeleton Project | ||
|
||
High-Freq Odometry, Log-Replay, Vision Odometry, Auto-Alignment, Decisive Auto, and Digital Twin, all set to go! | ||
|
||
> 🙏 We extend our deepest appreciation to [Littleton Robotics](https://www.littletonrobotics.org/) for their [open source projects](https://github.com/Mechanical-Advantage), which have made this project possible. | ||
> | ||
> ⚖️ This project is based on the [Advanced Swerve Drive Example](https://github.com/Mechanical-Advantage/AdvantageKit/tree/main/example_projects/advanced_swerve_drive/src/main) from [AdvantageKit](https://github.com/Mechanical-Advantage/AdvantageKit/), which is under the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html#license-text) license. All teams are welcome to use this project, provided that you adhere to the [Advantage Kit License](./AdvantageKit-License.md). | ||
## 🕹️Driving | ||
|
||
- **250HZ Odometer**, Time-Synchronized with CAN FD | ||
- **A Star Driving** | ||
- **Skid Detection** inspired by [1690 online software session](https://youtu.be/N6ogT5DjGOk?feature=shared&t=1674) | ||
- **Drive Wheels Feedforward** with a Look-Up-Table. | ||
- **Acceleration Constraining** during TeleOp. | ||
- **Robot Configuration Storage** in JSON files. | ||
- **Robot Status Visualization** through [Elastic Dashboard](https://github.com/Gold872/elastic-dashboard), [AdvantageScope](https://github.com/Mechanical-Advantage/AdvantageScope), LED and [Network Alerts](https://github.com/Mechanical-Advantage/NetworkAlerts) | ||
|
||
![Screenshot 2024-06-17 005557.png](./media/Screenshot_2024-06-17_005557.png) | ||
|
||
## 🤖Auto | ||
|
||
- **Decisive Autonomous Framework** with custom auto-follower, allowing robots to “react to its surroundings”. | ||
- **Path-Planning**, [PathPlanner](https://github.com/mjansen4857/pathplanner) and [Choreo](https://github.com/SleipnirGroup/Choreo) both supported. | ||
|
||
## 📝Logging | ||
|
||
Built Upon [AdvantageKit](https://github.com/Mechanical-Advantage/AdvantageKit), everything is logged and recorded for after-match analysis | ||
|
||
## 👁️Vision | ||
|
||
[GitHub - Shenzhen-Robotics-Alliance/FRC-Phantom-Vision: a rapid, powerful, easy-to-use and open-source vision framework for FRC](https://github.com/Shenzhen-Robotics-Alliance/FRC-Phantom-Vision) | ||
|
||
- **April-tag Robot Localization** Custom filtering mechanism and odometry calibration algorithm, also compatible with photon-vision. | ||
- **Auto Alignment** command, set-to-go! | ||
- **360° Game-Piece Detection** running on Jetson-Orin-Nano coprocessor. | ||
|
||
## 👭Digital-Twin | ||
|
||
A complete match simulation, with physics, score-count, human-players and even opponent robots. | ||
|
||
- **Uses Actual Robot Code** in the simulator. This means that you can tune Auto-Stages, PIDs, Auto-Scoring functions and more. The simulator display robots through https://github.com/Mechanical-Advantage/AdvantageScope. | ||
- **Swerve-Drive Physics Simulation**, fine-tuned with experimental data measured in our training field, as well as real-life data gathered from real competitions this year. | ||
|
||
![physics simulation 2.gif](./media/physics_simulation_2.gif) | ||
|
||
- **2D Rigid-Body Collision Simulation** for game-pieces and robots on field. Using open source 2d physics engine https://github.com/dyn4j/dyn4j. | ||
|
||
![robot physics simulation.gif](./media/robot_physics_simulation.gif) | ||
|
||
- **Opponent Robots Simulation** that can either be controlled by a gamepad to play defense or follow pre-stored cycle paths. | ||
|
||
![Untitled video - Made with Clipchamp.gif](./media/Untitled_video_-_Made_with_Clipchamp.gif) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":1.0,"grid_size":128,"tabs":[{"name":"Teleoperated","grid_layout":{"layouts":[],"containers":[{"title":"Match Time (s)","x":768.0,"y":0.0,"width":256.0,"height":256.0,"type":"Match Time","properties":{"topic":"/Shuffleboard/other/Match Time (s)","period":0.2,"data_type":"double","time_display_mode":"Minutes and Seconds","red_start_time":15,"yellow_start_time":30}},{"title":"pilot controller type","x":0.0,"y":0.0,"width":256.0,"height":128.0,"type":"ComboBox Chooser","properties":{"topic":"/SmartDashboard/pilot controller type","period":0.06,"sort_options":false}},{"title":"orientation mode","x":0.0,"y":128.0,"width":256.0,"height":128.0,"type":"Split Button Chooser","properties":{"topic":"/SmartDashboard/orientation mode","period":0.06}},{"title":"Delay","x":512.0,"y":0.0,"width":256.0,"height":256.0,"type":"Graph","properties":{"topic":"/SmartDashboard/robot main thread delay","period":0.06,"data_type":"double","time_displayed":10.0,"min_value":0.0,"max_value":50.0,"color":4278238420,"line_width":4.0}},{"title":"Current (A)","x":1024.0,"y":0.0,"width":256.0,"height":256.0,"type":"Graph","properties":{"topic":"/Shuffleboard/other/Current (A)","period":0.06,"data_type":"double","time_displayed":5.0,"min_value":null,"max_value":100.0,"color":4292083712,"line_width":2.0}},{"title":"Voltage (V)","x":1280.0,"y":0.0,"width":256.0,"height":256.0,"type":"Voltage View","properties":{"topic":"/Shuffleboard/other/Voltage (V)","period":0.06,"data_type":"double","min_value":4.0,"max_value":13.0,"divisions":5,"inverted":false,"orientation":"horizontal"}},{"title":"field","x":0.0,"y":384.0,"width":1024.0,"height":512.0,"type":"Field","properties":{"topic":"/SmartDashboard/field","period":0.02,"field_game":"Crescendo","robot_width":0.85,"robot_length":0.85,"show_other_objects":true,"show_trajectories":true}},{"title":"desired swerve state","x":1024.0,"y":384.0,"width":256.0,"height":256.0,"type":"SwerveDrive","properties":{"topic":"/SmartDashboard/chassis/desired swerve state","period":0.02,"show_robot_rotation":true,"rotation_unit":"Radians"}},{"title":"actual swerve state","x":1024.0,"y":640.0,"width":256.0,"height":256.0,"type":"SwerveDrive","properties":{"topic":"/SmartDashboard/chassis/actual swerve state","period":0.02,"show_robot_rotation":true,"rotation_unit":"Radians"}},{"title":"Status Light","x":0.0,"y":256.0,"width":1664.0,"height":128.0,"type":"Multi Color View","properties":{"topic":"/SmartDashboard/Status Light","period":0.02,"data_type":"string[]"}},{"title":"Alerts","x":1280.0,"y":384.0,"width":384.0,"height":512.0,"type":"Alerts","properties":{"topic":"/SmartDashboard/Alerts","period":0.1}}]}},{"name":"Autonomous","grid_layout":{"layouts":[],"containers":[{"title":"Select Auto","x":512.0,"y":0.0,"width":256.0,"height":128.0,"type":"ComboBox Chooser","properties":{"topic":"/SmartDashboard/Select Auto","period":0.06,"sort_options":false}},{"title":"position (x)","x":512.0,"y":128.0,"width":256.0,"height":128.0,"type":"Text Display","properties":{"topic":"/Shuffleboard/auto/position (x)","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"position (y)","x":512.0,"y":256.0,"width":256.0,"height":128.0,"type":"Text Display","properties":{"topic":"/Shuffleboard/auto/position (y)","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"rotation (deg)","x":384.0,"y":256.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/Shuffleboard/auto/rotation (deg)","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"rotation T","x":768.0,"y":256.0,"width":256.0,"height":128.0,"type":"Text Display","properties":{"topic":"/Shuffleboard/auto/rotation T","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"segment ID","x":384.0,"y":128.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/Shuffleboard/auto/segment ID","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"translational scaled T","x":768.0,"y":128.0,"width":256.0,"height":128.0,"type":"Text Display","properties":{"topic":"/Shuffleboard/auto/translational scaled T","period":0.06,"data_type":"double","show_submit_button":false}}]}},{"name":"tunings","grid_layout":{"layouts":[{"title":"shooter","x":384.0,"y":0.0,"width":256.0,"height":256.0,"type":"List Layout","properties":{"label_position":"TOP"},"children":[{"title":"armAngle0","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/shooter/armAngle0","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"armAngle1","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/shooter/armAngle1","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"armAngle2","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/shooter/armAngle2","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"armAngle3","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/shooter/armAngle3","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"armAngle4","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/shooter/armAngle4","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"armAngle5","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/shooter/armAngle5","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"defaultShootingRPM","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/shooter/defaultShootingRPM","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"shooterRPM0","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/shooter/shooterRPM0","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"shooterRPM1","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/shooter/shooterRPM1","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"shooterRPM2","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/shooter/shooterRPM2","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"shooterRPM3","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/shooter/shooterRPM3","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"shooterRPM4","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/shooter/shooterRPM4","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"shooterRPM5","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/shooter/shooterRPM5","period":0.06,"data_type":"double","show_submit_button":false}}]},{"title":"arm","x":640.0,"y":0.0,"width":256.0,"height":256.0,"type":"List Layout","properties":{"label_position":"TOP"},"children":[{"title":"position-DEFAULT","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/arm/position-DEFAULT","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"position-INTAKE","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/arm/position-INTAKE","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"position-SCORE_AMPLIFIER","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/arm/position-SCORE_AMPLIFIER","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"position-SHOOT_NOTE","x":0.0,"y":0.0,"width":128.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/arm/position-SHOOT_NOTE","period":0.06,"data_type":"double","show_submit_button":false}}]}],"containers":[]}},{"name":"electric","grid_layout":{"layouts":[],"containers":[{"title":"PDP","x":512.0,"y":0.0,"width":384.0,"height":512.0,"type":"PowerDistribution","properties":{"topic":"/SmartDashboard/PDP","period":0.06}}]}},{"name":"calibration","grid_layout":{"layouts":[],"containers":[{"title":"moveDrivingWheel","x":512.0,"y":256.0,"width":256.0,"height":128.0,"type":"Command","properties":{"topic":"/SmartDashboard/Calibration/moveDrivingWheel","period":0.06,"show_type":true}},{"title":"moveSteeringWheel","x":768.0,"y":256.0,"width":256.0,"height":128.0,"type":"Command","properties":{"topic":"/SmartDashboard/Calibration/moveSteeringWheel","period":0.06,"show_type":true}},{"title":"save","x":640.0,"y":384.0,"width":256.0,"height":128.0,"type":"Command","properties":{"topic":"/SmartDashboard/Calibration/save","period":0.06,"show_type":true}},{"title":"Select Wheel to Calibrate","x":512.0,"y":0.0,"width":512.0,"height":128.0,"type":"ComboBox Chooser","properties":{"topic":"/SmartDashboard/Select Wheel to Calibrate","period":0.06,"sort_options":false}},{"title":"Steer Motor Turning Direction (Should be Spinning Counter-Clockwise)","x":512.0,"y":128.0,"width":256.0,"height":128.0,"type":"ComboBox Chooser","properties":{"topic":"/SmartDashboard/Steer Motor Turning Direction (Should be Spinning Counter-Clockwise)","period":0.06,"sort_options":false}},{"title":"Can Coder Reading (Rad)","x":768.0,"y":128.0,"width":256.0,"height":128.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/Can Coder Reading (Rad)","period":0.06,"data_type":"double","show_submit_button":false}}]}},{"name":"match simulation","grid_layout":{"layouts":[],"containers":[{"title":"Opponent Robot 2 Mode","x":896.0,"y":128.0,"width":256.0,"height":128.0,"type":"ComboBox Chooser","properties":{"topic":"/SmartDashboard/Opponent Robot 2 Mode","period":0.06,"sort_options":false}},{"title":"Opponent Robot 0 Mode","x":384.0,"y":128.0,"width":256.0,"height":128.0,"type":"ComboBox Chooser","properties":{"topic":"/SmartDashboard/Opponent Robot 0 Mode","period":0.06,"sort_options":false}},{"title":"Opponent Robot 1 Mode","x":640.0,"y":128.0,"width":256.0,"height":128.0,"type":"ComboBox Chooser","properties":{"topic":"/SmartDashboard/Opponent Robot 1 Mode","period":0.06,"sort_options":false}},{"title":"Reset Field","x":512.0,"y":0.0,"width":512.0,"height":128.0,"type":"Command","properties":{"topic":"/SmartDashboard/Reset Field","period":0.06,"show_type":true}}]}}]} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.