{"id":25412831,"url":"https://github.com/1504/2025-reefscape","last_synced_at":"2025-04-18T05:44:33.499Z","repository":{"id":273126601,"uuid":"918331243","full_name":"1504/2025-Reefscape","owner":"1504","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-23T17:42:41.000Z","size":189,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-16T20:57:54.371Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1504.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-17T17:56:18.000Z","updated_at":"2025-03-23T02:49:06.000Z","dependencies_parsed_at":"2025-02-25T02:20:50.521Z","dependency_job_id":"3fada27d-3bed-47f5-a2d8-603e98d7325f","html_url":"https://github.com/1504/2025-Reefscape","commit_stats":null,"previous_names":["1504/swerve-development","1504/2025-reefscape"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1504%2F2025-Reefscape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1504%2F2025-Reefscape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1504%2F2025-Reefscape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1504%2F2025-Reefscape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1504","download_url":"https://codeload.github.com/1504/2025-Reefscape/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249314611,"owners_count":21249656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-16T13:35:38.696Z","updated_at":"2025-04-17T04:22:14.338Z","avatar_url":"https://github.com/1504.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MAXSwerve Python Template originally from: https://github.com/edubu/MAXSwerve-Python-Template\nThe python implementation of [REV Robotics MAXSwerve Modules](https://docs.revrobotics.com/ion-build-system/motion/maxswerve) as adapted from the [REV Robotics CPP Template](https://github.com/REVrobotics/MAXSwerve-Cpp-Template) for use in an environment using RobotPy. Suitable for FIRST Robotics Teams that want to utilize swerve drive and are using Python for their robot code. As Python is now officially supported by FRC as of 2024, a python adaptation is necessary.\n\n## Requirements\n### Windows 7 (64-bit) or newer\nWindows is only necessary for programming the CAN IDs using the [REV Hardware Client](https://docs.revrobotics.com/rev-hardware-client/gs/install)\n\n## Installation \u0026 Setup\n\n### Install Python \u0026 RobotPy\nFollow the [FRC Installation Guide](https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/python-setup.html) for step by step instructions to get the environment setup for python in FRC.\n\n### Clone this repository\nThe commands below will download this repository and install all of the necessary packages to your environment which will then be transferred over to the RoboRio\n```console\nuser@user:~$ git clone https://github.com/edubu/MAXSwerve-Python-Template.git\nuser@user~$ py -3 -m robotpy sync\n```\n\n### Setup the SparkMax Controllers using CAN\nThe SparkMAX require the use of CAN to communicate with the encoders. If seeking guidance wiring with CAN, checkout [this guide](https://docs.wpilib.org/en/stable/docs/hardware/hardware-basics/can-wiring-basics.html) to help through the process.\n\nAfter the wiring has been completed, you will need to connected to each SparkMax using the [REV Hardware Client](https://docs.revrobotics.com/rev-hardware-client/gs/install)\n\nFollow [this guide](https://docs.revrobotics.com/ion-build-system/motion/maxswerve) to program the SparkMax controllers to their unique CAN IDs\n\n### Modify the SwerveDrive Parameters\nThe swerve drive parameters are located in constants.py and will be used to communicate with the SparkMax controllers and setup the kinematics of the chassis.\n\n#### Change the CAN ID parameters\nconstants.py\n```python\n# SPARK MAX CAN IDs\nkFrontLeftDrivingCanId = 2\nkRearLeftDrivingCanId = 8\nkFrontRightDrivingCanId = 4\nkRearRightDrivingCanId = 6\n\nkFrontLeftTurningCanId = 3\nkRearLeftTurningCanId = 1\nkFrontRightTurningCanId = 5\nkRearRightTurningCanId = 7\n```\n\n#### Set the dimensions of the chassis\nconstants.py\n```python\n# Chassis configuration\nkTrackWidth = 0.6953 # Distance between centers of right and left wheels on robot METERS\nkWheelBase = 0.6953 # Distance between centers of front and back wheels on robot METERS\n```\n\n#### Set the pinion gear used in the MaxSwerve Module\nconstants.py\n```python\n# The MaxSwerve module can be configured with one of the three pinion gears: 12T, 13T, or 14T.\n# This changes the drive speed of the module ( a pinion gear with more teeth will result in a robot that drives faster)\nkDrivingMotorPinionTeeth = 13\n```\n\n## FAQs\n### Do I need to use the NavX Gyroscope?\nNo, the NavX gyroscope was simply used because we had it available. You can use any gyro by simply changing the following to connect to your available hardware\n```python\n # NavX Gyroscope\nself.gyro = navx.AHRS(wpilib.SerialPort.Port.kUSB)\n\n# Example Analog Gyroscope\nself.gyro = wpilib.AnalogGyro(analogChannel)\n```\n\n### What controllers are being used?\nIn this template, an XboxController class is utilized to control the robot. The axis are predefined to control it and utilize SlewRateLimiters as well as a Deadband to facilitate smooth driving.\n\n\n## Resources\n[REV Robotics MAXSwerve Module](https://www.revrobotics.com/rev-21-3005/)\\\n[REV Robotics MAXSwerve Docs](https://docs.revrobotics.com/ion-build-system/motion/maxswerve)\\\n[REV Robotics MAXSwerve CPP Template](https://github.com/REVrobotics/MAXSwerve-Cpp-Template)\\\n[RobotPy Docs](https://robotpy.readthedocs.io/projects/wpilib/en/latest/index.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1504%2F2025-reefscape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1504%2F2025-reefscape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1504%2F2025-reefscape/lists"}