Skip to content

Commit

Permalink
Removed optional second order kinematics, angle KV calculations, and …
Browse files Browse the repository at this point in the history
…added the feedforward back. Added pose estimation patch from 254. Updated styles. Removed freespeed RPM requirement.

Signed-off-by: thenetworkgrinch <[email protected]>
  • Loading branch information
thenetworkgrinch committed Apr 8, 2023
1 parent 1f3d4b4 commit cf647cd
Show file tree
Hide file tree
Showing 21 changed files with 351 additions and 311 deletions.
217 changes: 109 additions & 108 deletions .styles/BroncBotzStyle.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
<code_scheme name="GoogleStyle" version="173">
<AndroidXmlCodeStyleSettings>
<option name="USE_CUSTOM_SETTINGS" value="true"/>
<option name="LAYOUT_SETTINGS">
<value>
<option name="INSERT_BLANK_LINE_BEFORE_TAG" value="false"/>
</value>
</option>
</AndroidXmlCodeStyleSettings>
<JSCodeStyleSettings version="0">
<option name="INDENT_CHAINED_CALLS" value="false"/>
</JSCodeStyleSettings>
<code_scheme name="BroncBotz" version="173">
<JavaCodeStyleSettings>
<option name="ALIGN_MULTILINE_ANNOTATION_PARAMETERS" value="true"/>
<option name="ALIGN_MULTILINE_TEXT_BLOCKS" value="true"/>
Expand All @@ -21,26 +10,12 @@
</option>
<option name="IMPORT_LAYOUT_TABLE">
<value>
<emptyLine/>
<package name="" static="true" withSubpackages="true"/>
<emptyLine/>
<package name="" static="false" withSubpackages="true"/>
</value>
</option>
</JavaCodeStyleSettings>
<Objective-C>
<option name="INDENT_NAMESPACE_MEMBERS" value="0"/>
<option name="INDENT_C_STRUCT_MEMBERS" value="2"/>
<option name="INDENT_CLASS_MEMBERS" value="2"/>
<option name="INDENT_VISIBILITY_KEYWORDS" value="1"/>
<option name="INDENT_INSIDE_CODE_BLOCK" value="2"/>
<option name="KEEP_STRUCTURES_IN_ONE_LINE" value="true"/>
<option name="FUNCTION_PARAMETERS_WRAP" value="5"/>
<option name="FUNCTION_CALL_ARGUMENTS_WRAP" value="5"/>
<option name="TEMPLATE_CALL_ARGUMENTS_WRAP" value="5"/>
<option name="TEMPLATE_CALL_ARGUMENTS_ALIGN_MULTILINE" value="true"/>
<option name="ALIGN_INIT_LIST_IN_COLUMNS" value="false"/>
<option name="SPACE_BEFORE_SUPERCLASS_COLON" value="false"/>
</Objective-C>
<Objective-C-extensions>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property"/>
Expand All @@ -54,6 +29,7 @@
<pair header="h" source="cc"/>
<pair header="h" source="c"/>
</extensions>
<option name="TYPE_QUALIFIERS_PLACEMENT" value="BEFORE"/>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import"/>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro"/>
Expand All @@ -67,56 +43,8 @@
</file>
<option name="GENERATE_INSTANCE_VARIABLES_FOR_PROPERTIES" value="ASK"/>
<option name="RELEASE_STYLE" value="IVAR"/>
<option name="TYPE_QUALIFIERS_PLACEMENT" value="BEFORE"/>
</Objective-C-extensions>
<Python>
<option name="USE_CONTINUATION_INDENT_FOR_ARGUMENTS" value="true"/>
</Python>
<TypeScriptCodeStyleSettings version="0">
<option name="INDENT_CHAINED_CALLS" value="false"/>
</TypeScriptCodeStyleSettings>
<XML>
<option name="XML_ALIGN_ATTRIBUTES" value="false"/>
</XML>
<codeStyleSettings language="CSS">
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="CONTINUATION_INDENT_SIZE" value="4"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="ECMA Script Level 4">
<option name="KEEP_BLANK_LINES_IN_CODE" value="1"/>
<option name="ALIGN_MULTILINE_PARAMETERS" value="false"/>
<option name="ALIGN_MULTILINE_FOR" value="false"/>
<option name="CALL_PARAMETERS_WRAP" value="1"/>
<option name="METHOD_PARAMETERS_WRAP" value="1"/>
<option name="EXTENDS_LIST_WRAP" value="1"/>
<option name="BINARY_OPERATION_WRAP" value="1"/>
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true"/>
<option name="TERNARY_OPERATION_WRAP" value="1"/>
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true"/>
<option name="FOR_STATEMENT_WRAP" value="1"/>
<option name="ARRAY_INITIALIZER_WRAP" value="1"/>
<option name="IF_BRACE_FORCE" value="3"/>
<option name="DOWHILE_BRACE_FORCE" value="3"/>
<option name="WHILE_BRACE_FORCE" value="3"/>
<option name="FOR_BRACE_FORCE" value="3"/>
<option name="PARENT_SETTINGS_INSTALLED" value="true"/>
</codeStyleSettings>
<codeStyleSettings language="HTML">
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="CONTINUATION_INDENT_SIZE" value="4"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JAVA">
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="CONTINUATION_INDENT_SIZE" value="4"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
<option name="RIGHT_MARGIN" value="120"/>
<option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false"/>
<option name="KEEP_BLANK_LINES_IN_CODE" value="1"/>
Expand All @@ -137,7 +65,11 @@
<option name="ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION" value="true"/>
<option name="ALIGN_GROUP_FIELD_DECLARATIONS" value="true"/>
<option name="ALIGN_CONSECUTIVE_VARIABLE_DECLARATIONS" value="true"/>
<option name="CALL_PARAMETERS_WRAP" value="1"/>
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="CONTINUATION_INDENT_SIZE" value="4"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
<option name="PREFER_PARAMETERS_WRAP" value="true"/>
<option name="METHOD_PARAMETERS_WRAP" value="1"/>
<option name="EXTENDS_LIST_WRAP" value="1"/>
Expand All @@ -150,12 +82,14 @@
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true"/>
<option name="FOR_STATEMENT_WRAP" value="1"/>
<option name="ARRAY_INITIALIZER_WRAP" value="1"/>
<option name="ASSIGNMENT_WRAP" value="1"/>
<option name="PLACE_ASSIGNMENT_SIGN_ON_NEXT_LINE" value="true"/>
<option name="WRAP_COMMENTS" value="true"/>
<option name="IF_BRACE_FORCE" value="3"/>
<option name="DOWHILE_BRACE_FORCE" value="3"/>
<option name="WHILE_BRACE_FORCE" value="3"/>
<option name="FOR_BRACE_FORCE" value="3"/>
<option name="WRAP_LONG_LINES" value="true"/>
<option name="CALL_PARAMETERS_WRAP" value="5"/>
</codeStyleSettings>
<codeStyleSettings language="JSON">
<indentOptions>
Expand All @@ -164,10 +98,6 @@
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JavaScript">
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
<option name="RIGHT_MARGIN" value="80"/>
<option name="KEEP_BLANK_LINES_IN_CODE" value="1"/>
<option name="ALIGN_MULTILINE_PARAMETERS" value="false"/>
Expand All @@ -184,12 +114,12 @@
<option name="DOWHILE_BRACE_FORCE" value="3"/>
<option name="WHILE_BRACE_FORCE" value="3"/>
<option name="FOR_BRACE_FORCE" value="3"/>
</codeStyleSettings>
<codeStyleSettings language="ObjectiveC">
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="CONTINUATION_INDENT_SIZE" value="4"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="ObjectiveC">
<option name="RIGHT_MARGIN" value="80"/>
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1"/>
<option name="BLANK_LINES_BEFORE_IMPORTS" value="0"/>
Expand All @@ -201,45 +131,36 @@
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true"/>
<option name="FOR_STATEMENT_WRAP" value="1"/>
<option name="ASSIGNMENT_WRAP" value="1"/>
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="CONTINUATION_INDENT_SIZE" value="4"/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="PROTO">
<option name="RIGHT_MARGIN" value="80"/>
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="CONTINUATION_INDENT_SIZE" value="2"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
<option name="RIGHT_MARGIN" value="80"/>
</codeStyleSettings>
<codeStyleSettings language="Python">
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="CONTINUATION_INDENT_SIZE" value="4"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
<option name="KEEP_BLANK_LINES_IN_CODE" value="1"/>
<option name="RIGHT_MARGIN" value="80"/>
<option name="ALIGN_MULTILINE_PARAMETERS" value="false"/>
<option name="PARENT_SETTINGS_INSTALLED" value="true"/>
<option name="KEEP_BLANK_LINES_IN_CODE" value="1"/>
</codeStyleSettings>
<codeStyleSettings language="SASS">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="SCSS">
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="CONTINUATION_INDENT_SIZE" value="4"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="TypeScript">
<codeStyleSettings language="XML">
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="CONTINUATION_INDENT_SIZE" value="2"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="XML">
<arrangement>
<rules>
<section>
Expand Down Expand Up @@ -556,17 +477,12 @@
</section>
</rules>
</arrangement>
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="CONTINUATION_INDENT_SIZE" value="2"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="protobuf">
<option name="RIGHT_MARGIN" value="80"/>
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="2"/>
</indentOptions>
<option name="RIGHT_MARGIN" value="80"/>
</codeStyleSettings>
<option name="OTHER_INDENT_OPTIONS">
<value>
Expand All @@ -587,14 +503,99 @@
<option name="THROWS_KEYWORD_WRAP" value="1"/>
<option name="METHOD_CALL_CHAIN_WRAP" value="1"/>
<option name="BINARY_OPERATION_WRAP" value="1"/>
<AndroidXmlCodeStyleSettings>
<option name="USE_CUSTOM_SETTINGS" value="true"/>
<option name="LAYOUT_SETTINGS">
<value>
<option name="INSERT_BLANK_LINE_BEFORE_TAG" value="false"/>
</value>
</option>
</AndroidXmlCodeStyleSettings>
<JSCodeStyleSettings version="0">
<option name="INDENT_CHAINED_CALLS" value="false"/>
</JSCodeStyleSettings>
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true"/>
<Objective-C>
<option name="INDENT_NAMESPACE_MEMBERS" value="0"/>
<option name="INDENT_C_STRUCT_MEMBERS" value="2"/>
<option name="INDENT_CLASS_MEMBERS" value="2"/>
<option name="INDENT_VISIBILITY_KEYWORDS" value="1"/>
<option name="INDENT_INSIDE_CODE_BLOCK" value="2"/>
<option name="KEEP_STRUCTURES_IN_ONE_LINE" value="true"/>
<option name="FUNCTION_PARAMETERS_WRAP" value="5"/>
<option name="FUNCTION_CALL_ARGUMENTS_WRAP" value="5"/>
<option name="TEMPLATE_CALL_ARGUMENTS_WRAP" value="5"/>
<option name="TEMPLATE_CALL_ARGUMENTS_ALIGN_MULTILINE" value="true"/>
<option name="ALIGN_INIT_LIST_IN_COLUMNS" value="false"/>
<option name="SPACE_BEFORE_SUPERCLASS_COLON" value="false"/>
</Objective-C>
<option name="TERNARY_OPERATION_WRAP" value="1"/>
<Python>
<option name="USE_CONTINUATION_INDENT_FOR_ARGUMENTS" value="true"/>
</Python>
<TypeScriptCodeStyleSettings version="0">
<option name="INDENT_CHAINED_CALLS" value="false"/>
</TypeScriptCodeStyleSettings>
<XML>
<option name="XML_ALIGN_ATTRIBUTES" value="false"/>
</XML>
<codeStyleSettings language="CSS">
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="CONTINUATION_INDENT_SIZE" value="4"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="ECMA Script Level 4">
<option name="KEEP_BLANK_LINES_IN_CODE" value="1"/>
<option name="ALIGN_MULTILINE_PARAMETERS" value="false"/>
<option name="ALIGN_MULTILINE_FOR" value="false"/>
<option name="CALL_PARAMETERS_WRAP" value="1"/>
<option name="METHOD_PARAMETERS_WRAP" value="1"/>
<option name="EXTENDS_LIST_WRAP" value="1"/>
<option name="BINARY_OPERATION_WRAP" value="1"/>
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true"/>
<option name="TERNARY_OPERATION_WRAP" value="1"/>
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true"/>
<option name="FOR_STATEMENT_WRAP" value="1"/>
<option name="ARRAY_INITIALIZER_WRAP" value="1"/>
<option name="IF_BRACE_FORCE" value="3"/>
<option name="DOWHILE_BRACE_FORCE" value="3"/>
<option name="WHILE_BRACE_FORCE" value="3"/>
<option name="FOR_BRACE_FORCE" value="3"/>
<option name="PARENT_SETTINGS_INSTALLED" value="true"/>
</codeStyleSettings>
<codeStyleSettings language="HTML">
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="CONTINUATION_INDENT_SIZE" value="4"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
</codeStyleSettings>
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true"/>
<option name="FOR_STATEMENT_WRAP" value="1"/>
<option name="ARRAY_INITIALIZER_WRAP" value="1"/>
<option name="WRAP_COMMENTS" value="true"/>
<option name="IF_BRACE_FORCE" value="3"/>
<option name="DOWHILE_BRACE_FORCE" value="3"/>
<codeStyleSettings language="SASS">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="SCSS">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="TypeScript">
<indentOptions>
<option name="INDENT_SIZE" value="2"/>
<option name="TAB_SIZE" value="2"/>
</indentOptions>
</codeStyleSettings>
<option name="WHILE_BRACE_FORCE" value="3"/>
<option name="FOR_BRACE_FORCE" value="3"/>
</code_scheme>
4 changes: 2 additions & 2 deletions docs/assets/js/v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ function getFreeSpeedFromMotors() {
console.log(motor_count);
switch (highest_motor) {
case "neo":
$("#freespeedrpm-input").val(5676);
// $("#freespeedrpm-input").val(5676);
case "falcon":
$("#freespeedrpm-input").val(6800);
// $("#freespeedrpm-input").val(6800);
}
}

Expand Down
6 changes: 0 additions & 6 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ <h1 class="d-inline display-6">Module Properties</h1>
of
Friction</label>
</div>
<div class="form-floating mb-3" style="display: none;">
<input class="form-control" id="freespeedrpm-input" name="angleMotorFreeSpeedRPM"
placeholder="5676"
type="number" value="5676">
<label class="form-label" for="freespeedrpm-input">Angle Motor Free Speed RPM</label>
</div>
<hr/>
<div class="form-floating mb-3">
<input class="form-control" id="gearRatio_drive-input" name="gearRatio_drive"
Expand Down
18 changes: 9 additions & 9 deletions docs/json/physicalproperties.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ which creates

# Fields

| Name | Units | Required | Description |
|--------------------------------|-----------------------------------|----------|----------------------------------------------------------------------------------------------------------|
| wheelDiameter | Inches | Y | Module wheel diameters in inches. |
| gearRatio | [MotorConfig](#MotorConfig) | Y | Gear ratio for the motors, number of times the motor has to spin before the wheel rotates a single time. |
| encoderPulsePerRotation | [MotorConfig](#MotorConfig) | N | Encoder pulse per rotation for non-integrated encoders. 1 for integrated encoders. |
| currentLimit | [MotorConfig](#MotorConfig) | N | The current limit in AMPs to apply to the motors. |
| rampRate | [MotorConfig](#MotorConfig) | N | The minimum number of seconds to take for the motor to go from 0 to full throttle. |
| wheelGripCoefficientOfFriction | Coefficient of Friction on Carpet | N | The grip tape coefficient of friction on carpet. Used to calculate the practical maximum acceleration. |
| angleMotorFreeSpeedRPM | Rotations per Minute | Y | Angle motor free speed rotations per minute. |
| Name | Units | Required | Description |
|--------------------------------|-----------------------------------|----------|---------------------------------------------------------------------------------------------------------------------|
| wheelDiameter | Inches | Y | Module wheel diameters in inches. |
| gearRatio | [MotorConfig](#MotorConfig) | Y | Gear ratio for the motors, number of times the motor has to spin before the wheel rotates a single time. |
| encoderPulsePerRotation | [MotorConfig](#MotorConfig) | N | Encoder pulse per rotation for non-integrated encoders. 1 for integrated encoders. |
| currentLimit | [MotorConfig](#MotorConfig) | N | The current limit in AMPs to apply to the motors. |
| rampRate | [MotorConfig](#MotorConfig) | N | The minimum number of seconds to take for the motor to go from 0 to full throttle. |
| wheelGripCoefficientOfFriction | Coefficient of Friction on Carpet | N | The grip tape coefficient of friction on carpet. Used to calculate the practical maximum acceleration. |
| moduleFeedForwardClosedLoop | Feedforward between `[-1, 0]` | N | The feedforward scalar to apply for 2nd order kinematics. If robot arcs while translating and rotating negate this. |

### MotorConfig

Expand Down
Loading

0 comments on commit cf647cd

Please sign in to comment.