> For the complete documentation index, see [llms.txt](https://docs.yagsl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yagsl.com/configuring-yagsl/configuration/physical-properties-configuration.md).

# Physical Properties Configuration

## Swerve Module Physical Properties (`modules/physicalproperties.json`)

This JSON configures the physical properties shared with all the Swerve Modules. It maps 1:1 with [`PhysicalPropertiesJson`](https://yet-another-software-suite.github.io/YAGSL/javadocs/swervelib/parser/json/PhysicalPropertiesJson.html) which creates [`SwerveModulePhysicalCharacteristics`](https://yet-another-software-suite.github.io/YAGSL/javadocs/swervelib/parser/SwerveModulePhysicalCharacteristics.htmll).

{% hint style="info" %}
Use the [Standard Conversion Factors](/configuring-yagsl/standard-conversion-factors.md) page to set the conversion factors for your robot if you're using a COTS swerve module!
{% endhint %}

## Fields

<table data-full-width="true"><thead><tr><th>Name</th><th>Units</th><th width="115">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>conversionFactors</code></td><td><a href="#conversion-factor-composition">Conversion Factor Composition</a></td><td>Y</td><td>Conversion factor composition. Factor is calculated on startup.</td></tr><tr><td><code>optimalVoltage</code></td><td>Voltage</td><td>Y</td><td>Optimal voltage to compensate to and base feedforward calculations off of.</td></tr><tr><td><code>currentLimit</code></td><td><a href="#motorconfig">MotorConfig</a><br>More info <a href="/pages/95zjYx8yJSQbEIBMHmsD#current-limiting">here</a>.</td><td>N</td><td>The current limit in AMPs to apply to the motors. Stator limit for SparkMAXs, Supply limit for TalonFXs.</td></tr><tr><td><code>rampRate</code></td><td><a href="#motorconfig">MotorConfig</a></td><td>N</td><td>The minimum number of seconds to take for the motor to go from 0 to full throttle.</td></tr><tr><td><code>friction</code></td><td><a href="#motorconfig">MotorConfig</a></td><td>N</td><td>The minimum voltage to move the wheel or module. Defaults to <code>0.2</code> for drive motors, and <code>0.3</code> for angle motors.</td></tr><tr><td><code>robotMass</code></td><td>Lb (Pounds)</td><td>N</td><td>Default is <code>50</code>kgs.</td></tr><tr><td><code>steerRotationalInertia</code></td><td>KilogramMetersSquare</td><td>N</td><td>The rotational inertia in <code>KilogramMetersSquare</code> . Defaults to <code>0.03</code>.</td></tr><tr><td><code>wheelGripCoefficientOfFriction</code></td><td>Coefficient of Friction on Carpet</td><td>N</td><td>The grip tape coefficient of friction on carpet. Used to calculate the practical maximum acceleration.</td></tr></tbody></table>

#### MotorConfig

| Name    | Units  | Required | Description        |
| ------- | ------ | -------- | ------------------ |
| `drive` | Number | Y        | Drive motor value. |
| `angle` | Number | Y        | Angle motor value. |

#### Conversion Factor Composition

<table><thead><tr><th>Name</th><th>Units</th><th width="62">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>drive</code></td><td><a href="#drive-conversion-factor-composition">Drive Composition</a></td><td>Y</td><td>Drive conversion factor composition</td></tr><tr><td><code>angle</code></td><td><a href="#angle-conversion-factor-composition">Angle Composition</a></td><td>Y</td><td>Angle conversion factor composition</td></tr></tbody></table>

#### Drive Conversion Factor Composition

<table><thead><tr><th width="149">Name</th><th width="117">Units</th><th width="106">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>diameter</code></td><td>Inches</td><td>Y</td><td>Diameter of the wheel.</td></tr><tr><td><code>gearRatio</code></td><td>Number</td><td>Y</td><td>Gear ratio of the drive motor to wheel.</td></tr><tr><td><code>factor</code></td><td>Number</td><td>N</td><td>Pre-calculated conversion factor.</td></tr></tbody></table>

#### Angle Conversion Factor Composition

<table><thead><tr><th width="156">Name</th><th width="123">Units</th><th width="87">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>gearRatio</code></td><td>Number</td><td>Y</td><td>Gear ratio of the angle/steering/azimuth motor to wheel.</td></tr><tr><td><code>factor</code></td><td>Number</td><td>N</td><td>Pre-calculated conversion factor.</td></tr></tbody></table>

## Example Configuration File

<pre class="language-json"><code class="lang-json">{
  <a data-footnote-ref href="#user-content-fn-1">"conversionFactors"</a>: {
	"angle": {"gearRatio": 28.125},
	"drive": {"diameter": 4, "gearRatio": 6.75}
  },
  "currentLimit": {
    "drive": 40,
    "angle": 20
  },
  "rampRate": {
    "drive": 0.25,
    "angle": 0.25
  },
  "wheelGripCoefficientOfFriction": 1.19,
  "optimalVoltage": 12
}
</code></pre>

[^1]: Can be found for COTS swerve modules in [Standard Conversion Factors](/configuring-yagsl/standard-conversion-factors.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.yagsl.com/configuring-yagsl/configuration/physical-properties-configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
