Skip to content

Commit

Permalink
Expand on Robot Config documentation (#854)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansen4857 authored Oct 9, 2024
1 parent 6aa9b35 commit 6cb942e
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 38 deletions.
1 change: 1 addition & 0 deletions Writerside/hi.tree
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
start-page="Home.md">

<toc-element topic="Home.md"/>
<toc-element topic="Robot-Config.md"/>
<toc-element topic="PathPlanner-GUI.topic">
<toc-element topic="gui-Getting-Started.md"/>
<toc-element topic="gui-Editing-Paths-and-Autos.md"/>
Expand Down
87 changes: 87 additions & 0 deletions Writerside/topics/Robot-Config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Robot Config

Both the GUI and PathPlannerLib require various configuration options to be set in order to generate trajectories that
are accurately limited for the performance of your robot. All of these values have an effect on the performance of your
robot, determining its maximum velocity, acceleration, etc. Therefore, you should take care to ensure that these options
are configured as accurately as possible.

## Robot Config Options

Robot Mass
: The mass of the robot, including bumpers and battery, in Kilograms. In most cases, choosing the maximum robot weight
of ~68 KG (150 lbs) will work fine. However, lightweight robots may benefit from increased acceleration and better
friction estimates if the robot mass is measured accurately.

Robot MOI
: The Moment of Inertia, or MOI, of the robot, including battery and bumpers. This can be calculated via CAD software,
or measured in various ways.

### Calculating MOI through sysID (Recommended)

Once sysID has been performed, the robot's MOI can be calculated using the following formula:

$$
\begin{equation}
I = \text{mass} * \frac{\text{trackwidth}}{2} * \frac{kA_{\text{angular}}}{kA_{\text{linear}}}
\end{equation}
$$

Where $kA_{\text{angular}}$ is the acceleration constant of the drive motors while rotating the robot,
and $kA_{\text{linear}}$ is the acceleration constant of the drive motors while driving straight.

### Calculating a Rough MOI Estimate

The robot's MOI can be roughly estimated using the following formula:

$$
\begin{equation}
I = \frac{1}{12} * \text{mass} * (\text{length}^2 + \text{width}^2)
\end{equation}
$$

However, this will likely lead to an inaccurate estimate as it assumes a uniform distribution of mass.

Wheelbase
: The distance between the front and back of the drivebase, in meters. Only relevant in holonomic mode.

Trackwidth
: The distance between the left and right sides of the drivebase, in meters.

## Module Config Options

Wheel Radius
: The radius of the drive wheels, in meters. This should be listed wherever you buy your wheels from, but can also be
measured.

Drive Gearing
: The gear reduction from the motors to the wheels. Since this is a reduction, this value should be greater than 1. For
example, the gearing of an SDS MK4i module with L3 gearing is ~6.12

True Max Drive Speed
: The true maximum speed of the robot/drive module while driving under load, in meters/second.

> **Note**
>
> It is very important that the True Max Drive Speed is measured for your actual robot. This value is not simply a "max
> velocity" limit on the robot. It encodes information about how much motor torque can actually be used to accelerate the
> robot.
>
> This can be easily measured by driving the robot in a straight line as fast as possible on a charged battery, and
> measuring the robot's maximum velocity.
>
> However, this test requires a lot of space and access to the robot. If you are unable to measure this value, it can be
> estimated by using about 85% of the module's free speed.
>
{style="note"}

Wheel COF
: The coefficient of friction between the drive wheels and the carpet. Some wheels will have their COF listed on their
store page. The COF of friction can also be calculated by measuring how much force is required to pull the robot (
causing the wheels to slide) across the carpet. You can also tune this number until the wheels no longer slip while
accelerating or turning in corners.

Drive Motor
: The type of motor used to drive the wheels of the robot.

Drive Current Limit
: The supply current limit applied to the drive motor controllers, in Amps.
40 changes: 2 additions & 38 deletions Writerside/topics/gui-Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,15 @@ The settings menu can be accessed via the [Navigation Menu](gui-Navigation-Menu.

<img src="settings.png" alt="settings" border-effect="rounded"/>

## Robot Config
## Robot Config & Module Config

Bumper Width
: The width of the robot, including bumpers, in meters. Used for visualization.

Bumper Length
: The length of the robot, including bumpers, in meters. Used for visualization.

Robot Mass
: The mass of the robot, including bumpers and battery, in Kilograms.

Robot MOI
: The Moment of Inertia, or MOI, of the robot, including battery and bumpers. This can be calculated via CAD software,
or calculated by applying a constant torque to all drive motors and measuring the angular acceleration of the robot.

Wheelbase
: The distance between the front and back of the drivebase, in meters. Only relevant in holonomic mode.

Trackwidth
: The distance between the left and right sides of the drivebase, in meters.

## Module Config

Wheel Radius
: The radius of the drive wheels, in meters.

Drive Gearing
: The gear reduction from the motors to the wheels.

True Max Drive Speed
: The true maximum speed of the robot/drive module while driving under load, in meters/second.

Wheel COF
: The coefficient of friction between the drive wheels and the carpet. Some wheels will have their COF listed on their
store page. The COF of friction can also be calculated by measuring how much force is required to pull the robot (
causing the wheels to slide) across the carpet. You can also tune this number until the wheels no longer slip while
accelerating or turning in corners.

Drive Motor
: The type of motor used to drive the wheels of the robot.

Drive Current Limit
: The supply current limit applied to the drive motor controllers, in Amps. Below this field, the Max Optimal Limit is
displayed, which is the maximum usable current limit that prevents the wheels from slipping. This is calculated based on
other configuration options.
See [](Robot-Config.md) for Robot/Module Configuration options and how to find them.

## Default Constraints

Expand Down

0 comments on commit 6cb942e

Please sign in to comment.