65 refactor drivecoordinator and add drive to climb state#70
65 refactor drivecoordinator and add drive to climb state#70avidraccoon wants to merge 163 commits intomainfrom
Conversation
Adds a Python script that validates JSON constant files against their corresponding Java class fields, catching silently ignored keys at build time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use javap -verbose to read RuntimeVisibleAnnotations from .class files, so fields annotated with @JSONExclude are excluded from the missing-key check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a new /vision page with gain constants editing, camera add/remove with slider+text controls for translation and rotation, and wire format conversion between flat camera keys and array model. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add synced inches input alongside meters for translation fields, with local state to allow arbitrary precision typing. Add npm dev:robot script to proxy API to robot at 10.4.1.2. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Relabel "Save" → "Save to Robot" and "Save & Activate" → "Save to Robot & Activate" in both ShotMapsEditor and VisionEditor. Add a "Save to Local" button that writes config JSON to the source tree via a new Vite dev server middleware endpoint. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Static fields are not serialized to/from JSON, so they should not be checked for presence in constant JSON files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a GET /local-load endpoint to read config JSON from the source tree, a loadLocal API function, and "Load from Local" buttons in both ShotMapsEditor and VisionEditor. Also refactors the Vite plugin to share validation logic between load and save routes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
I am currently trying to see if putting a null check before it gets to that constructor fixes it |
Is this the |
Probably But I have a solution for this that works, and I am making an issue and branch on coppercore right now. |
|
When I put a this.rotationRadius = target.getRotationRadius().orElse(null); |
| # Auto registration | ||
| # --------------------------------------------------------------------------- | ||
|
|
||
| _autos: Dict[str, Any] = {} |
There was a problem hiding this comment.
What's the difference between _autos and _routines?
| # Internal pointer stack | ||
| # --------------------------------------------------------------------------- | ||
|
|
||
| _command_pointers: List[List[Any]] = [] |
There was a problem hiding this comment.
I think that ContextVars might be better to use here than a global variable.
| def serialize_autos() -> str: | ||
| """Serializes all registered autos to a JSON string.""" | ||
| result = {name: _serialize_value(action) for name, action in _autos.items()} | ||
| return json.dumps(result, indent=4) |
There was a problem hiding this comment.
indent=2 would be better here IMO.
| jerk=0.1, | ||
| ) | ||
|
|
||
| left_climb_location = FieldConstants.Tower.left_upright().to_pose2d().transform_by(climb_offset) |
There was a problem hiding this comment.
verify that this works for either alliance.
|
|
||
| climb_lineup_velocity = 100.0 | ||
|
|
||
| climb_left_lineup_entry_angle = rotation2d(degrees=0) |
There was a problem hiding this comment.
same question: does this angle work for both alliances?
| headingController.reset(); | ||
| } | ||
|
|
||
| @Override |
There was a problem hiding this comment.
Comments are missing. What is the purpose of this function?
| @@ -0,0 +1,25 @@ | |||
| package frc.robot.util.ts; | |||
There was a problem hiding this comment.
This is no longer .ts is it.
| // properties | ||
| m( | ||
| """ | ||
| @property |
There was a problem hiding this comment.
Again, why is there so much python code in Java string literals?
| CopperCoreMetadata.printInfo(); | ||
|
|
||
| jsonHandler = JsonConstants.loadConstants(); | ||
| jsonHandler = JsonConstants.loadConstants(this); |
There was a problem hiding this comment.
Looks like this is passing a half-initialized RobotContainer
| def coppercoreVersion = "2026.2.15" | ||
| def coppercoreVersion = "2026.2.16" | ||
|
|
||
| implementation "com.google.code.gson:gson:2.11.0" |
There was a problem hiding this comment.
why is this necessary and how do we guarantee it matches coppercore's?
|
@godmar I verified that these climb changes are legitimate; we did some climb tuning during auto tuning. |
…s for consistency; update Autos.json to enhance auto sequences.
Thanks! Let's be careful, so close to the finish line. @avidraccoon can you revise so that, perhaps, we can merge tomorrow before or during shop? At least the parts that aren't referring to specific autos. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
How did everything go today? Can we get this merged tomorrow? |
We tried some autos, but had trouble with taking in enough fuel and it's not clear what the strategy is when it comes to deciding on where to shoot from. I think this branch has now become the quasi integration branch. @avidraccoon made a number of changes, I hope all of them made it in here. I would like @avidraccoon to prioritize getting this merged. Some of my comments we won't have time to address. |
Still need to push the commits from last night I think |
…hooting performance; update JSON configurations for better action sequences.
…te' of https://github.com/team401/2026-Robot-Code into 65-refactor-drivecoordinator-and-add-drive-to-climb-state
…ot last night we were we were coming very close to hitting the trench.
This pull request introduces a new TypeScript-based auto-generation system for robot autonomous routines, including infrastructure for compiling, registering, and serializing auto actions, as well as updates to field and drive constants. The most important changes are grouped below:
Auto Generator System Implementation
auto_generatordirectory with TypeScript configuration (tsconfig.json), build scripts (compile_autos.mjs,run_autos.mjs), and supporting files for compiling and running auto routines. This includes a sample auto routine (newTestAuto.ts) and utility modules (AutoLib.ts,Shorthands.ts). [1] [2] [3] [4] [5] [6] [7]AutoAction.tsto represent auto actions, targets, profiles, gains, and related types for serialization and execution.Auto Serialization and Output
Autos.jsonfile insrc/main/deploycontaining serialized auto routines, such as the "Random Auto" sequence for testing.Field and Drive Constants Updates
DriveConstants.jsonfiles to includedefaultAutoPilotHeadingGains, providing default PID gains for autopilot heading control in both competition and test drivebase configurations. [1] [2]BlueFieldLocations.jsonandRedFieldLocations.json, specifying translation and rotation for left and right climb positions. [1] [2]Vision and Controller Configuration
VisionConstants.jsonfor the test drivebase, increasing the standard deviation factors.vision-sample.json) and updated controller bindings incontrollers-xbox.jsonto include a new test command. [1] [2]Miscellaneous
.gitignoreentries fornode_modulesanddistto theauto_generatordirectory.