Skip to content

Commit

Permalink
updated link to python api credit @virtuald
Browse files Browse the repository at this point in the history
  • Loading branch information
jasondaming committed Dec 6, 2023
1 parent 2e45190 commit 895ac00
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions source/_static/css/frc-rtd.css
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,8 @@ summary {
font-weight: bold;
margin: -.5em -.5em 0;
padding: .5em;
}

code.py-class {
all: unset!important;
}
4 changes: 4 additions & 0 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@ def new_send(self, data):

intersphinx_mapping = {
"robotpy": ("https://robotpy.readthedocs.io/en/stable/", None),
"wpimath": (
f"https://robotpy.readthedocs.io/projects/wpimath/en/stable/",
None,
),
}

# We recommend adding the following config value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ Introduction to Kinematics and The ChassisSpeeds Class

What is kinematics?
-------------------
The kinematics suite contains classes for differential drive, swerve drive, and mecanum drive kinematics and odometry. The kinematics classes help convert between a universal ``ChassisSpeeds`` (`Java <https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/math/kinematics/ChassisSpeeds.html>`__, `C++ <https://github.wpilib.org/allwpilib/docs/release/cpp/structfrc_1_1_chassis_speeds.html>`__, :doc:`Python <robotpy:wpimath.kinematics/ChassisSpeeds>`)object, containing linear and angular velocities for a robot to usable speeds for each individual type of drivetrain i.e. left and right wheel speeds for a differential drive, four wheel speeds for a mecanum drive, or individual module states (speed and angle) for a swerve drive.
The kinematics suite contains classes for differential drive, swerve drive, and mecanum drive kinematics and odometry. The kinematics classes help convert between a universal ``ChassisSpeeds`` (`Java <https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/math/kinematics/ChassisSpeeds.html>`__, `C++ <https://github.wpilib.org/allwpilib/docs/release/cpp/structfrc_1_1_chassis_speeds.html>`__, :external:py:class:`Python <wpimath.kinematics.ChassisSpeeds>`)object, containing linear and angular velocities for a robot to usable speeds for each individual type of drivetrain i.e. left and right wheel speeds for a differential drive, four wheel speeds for a mecanum drive, or individual module states (speed and angle) for a swerve drive.

What is odometry?
-----------------
Odometry involves using sensors on the robot to create an estimate of the position of the robot on the field. In FRC, these sensors are typically several encoders (the exact number depends on the drive type) and a gyroscope to measure robot angle. The odometry classes utilize the kinematics classes along with periodic user inputs about speeds (and angles in the case of swerve) to create an estimate of the robot's location on the field.

The ChassisSpeeds Class
------------------------
-----------------------
The ``ChassisSpeeds`` object is essential to the new WPILib kinematics and odometry suite. The ``ChassisSpeeds`` object represents the speeds of a robot chassis. This struct has three components:

* ``vx``: The velocity of the robot in the x (forward) direction.
Expand Down

0 comments on commit 895ac00

Please sign in to comment.