2023 Drive base
 
Loading...
Searching...
No Matches
2023 Drive Base

CI may be important https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/math/kinematics/MecanumDriveWheelPositions.html DRIVE subsystem tutorial (follow)

Project Board

Contributing

The enviroment

FIRST robotics projects are made in Visual Studio Code, with the wpilib extension. Look up "wpilib" in the extensions tab of vs-code once it is installed. Use wpilib commands to build and deploy the code.

Download the repository with git clone https://github.com/CCHS-FIRST-Robotics/2023DriveBase.git

How to add your amazing changes!

  1. Run doxygen to update the docs (how to install doxygen is in the "Adding documentation" section).
  2. Create a branch: git branch *name* (replace "\*name\*" with what changes you intend to make).
  3. Track all of your new changes: git add .
  4. Commit the changes: git commit -m "*changes*" (replace "\*changes\*" with what changes you made)
  5. Push the commit to the repository: git push

New to github?

Documentation

Adding documentation

The documentation pages and visuals are created by doxygen. The doxygen configuration is almost completely default, its file is "Doxygen" learn more about doxygen

When updating code, comments, or anything that should be in documentation, run doxygen before commiting. Install Doxygen on mac with Brew: brew install doxygen

If you want to change the doxygen configuration, use the doxygen gui, doxywizard. Make sure you save the outputted doxygen config in the Doxygen file.

How the drive base works

The "heart" of the robot is the roborio, which uses wpilib for instructions. There are a couple base robot templates, but we are using the TimedRobot.

If you want to understand wpilib, start here. After that, you will need the Java library documentation.

Then, learn about our drivebase code.

How the arm works

The arm is controlled very simply the same way we control the drive base. The most difficult part to understand is the kinematic models that help us determine how we should move the motors in order to move the arm at a certain (x, y) linear veloicty – as opposed to controlling the angular veocity – or finding the angular position the encoders need to be for a given cartesian (x, y) position.

If you would like to better understand these models, here are some diagrams/math which show the derivation: alt text alt text

Motors and components

Motors/motor controllers and other components of the robot will need other java libraries, and have other docs aswell.

We are using Rev Robotics SparkMax and ctre Phoenix Talon and Victor motor controllers (links are to their libraries).

The robot also uses a NavX Gyro. The gyro can get lots of information about the robot's orientation, position, etc.

When adding a new component, look up instructions on how to install it, and then update this doc with its library's documenation.

Relevant Articles

Kinematics