Conversation
Precompute mirrored rectangular blockers in Superstructure to avoid rebuilding geometry every cycle and move latency compensation default initialization into the constructor. Introduce a sampling budget for vision I/O: add MAX_OBSERVATION_SAMPLES_PER_UPDATE and getLatestSampleStartIndex to VisionIO, cap processed samples in VisionIOLimelight and VisionIOPhotonVision, and track/report droppedObservationCount. Refactor detailed-pose logging gating into isDetailedPoseLoggingEnabled helpers and wire up dropped-observation logging in Vision. Add unit tests (VisionPerformanceGuardTest) for the sample-dropping logic and detailed logging behavior.
Add a shared Maple simulation backend and wire it into drivetrain, modules, gyro, and vision systems. Introduces MapleSimManager to host a SimulatedArena and SwerveDriveSimulation, a new GyroIOSim, and a simulation-backed ModuleIOSim that uses Maple simulated motor controllers and modules. Robot lifecycle and RobotState.resetPose now synchronize simulation state; Vision is configured to use PhotonVision sim instances tied to MapleSimManager when simulation is enabled. Also add vendordeps metadata for maple-sim and a small update to VisionIOPhotonVisionSim to throttle sim updates. (Gradle cache/daemon files shown in the diff are environment artifacts and not functionally relevant.)
Add MapleSim integrations and robustness fixes across simulation and drivetrain code. - Add new autonomous path file: Middle_to_depot.json. - RobotState: defend against non-finite odometry/vision inputs to avoid corrupting pose buffer and logging rejection correctly. - VisualizeShot: launch a RebuiltFuelOnFly projectile into MapleSim for physics-based visualization and register hit/trajectory callbacks. - MapleSimManager: track hub hit count, expose logger output, and print counts for projectile hits. - IntakeIOSim: integrate IntakeSimulation to spawn/consume MapleSim game pieces, control intake start/stop logic, and expose simulation metrics. - Shooter: guard against non-finite angle/velocity inputs in setters to prevent invalid actuator commands. - SwerveDrive: add filtered odometry buffers, rejection of tilted odometry samples (based on max tilt config), continuity handling for wheel travel while tilted, helper routines for odometry updates, and additional logging of filtered states. These changes improve simulation fidelity (game pieces and scoring) and harden the robot code against bad sensor inputs and tilt-induced odometry errors.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mainly did some timing problem changes that was mentioned. main goal was to fix the code loop overruns. TEST BEFORE MERGING.