Skip to content

Commit 291f0af

Browse files
authored
Fix incorrect bumper thickness in robot config defaults (#232)
* Fix incorrect bumper thickness in robot config defaults * format
1 parent 93fa43e commit 291f0af

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/document/RobotConfigStore.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,21 @@ import { InToM, LbsToKg } from "../util/UnitConversions";
88
import { IStateStore } from "./DocumentModel";
99
import { SavedRobotConfig } from "./DocumentSpecTypes";
1010

11+
const DEFAULT_FRAME_SIZE = InToM(28);
12+
const DEFAULT_BUMPER = DEFAULT_FRAME_SIZE + 2 * InToM(2.5 + 0.75); // 28x28 bot with 2.5" noodle and 0.75" backing
13+
const DEFAULT_WHEELBASE = DEFAULT_FRAME_SIZE - 2 * InToM(2.625); //SDS Mk4i contact patch is 2.625 in from frame edge
14+
1115
export const ROBOT_CONFIG_DEFAULTS = {
1216
mass: LbsToKg(150),
1317
rotationalInertia: 6,
1418
motorMaxVelocity: MotorCurves.KrakenX60.motorMaxVelocity * 0.8,
1519
motorMaxTorque: maxTorqueCurrentLimited(MotorCurves.KrakenX60.kt, 60),
1620
gearing: 6.75, // SDS L2 mk4/mk4i
1721
wheelRadius: InToM(2),
18-
bumperWidth: InToM(28 + 2.75 + 2.75), // 28x28 bot with 2.75" bumpers
19-
bumperLength: InToM(28 + 2.75 + 2.75),
20-
wheelbase: InToM(28 - 2.625 - 2.625), //SDS Mk4i contact patch is 2.625 in from frame edge
21-
trackWidth: InToM(28 - 2.625 - 2.625),
22+
bumperWidth: DEFAULT_BUMPER,
23+
bumperLength: DEFAULT_BUMPER,
24+
wheelbase: DEFAULT_WHEELBASE,
25+
trackWidth: DEFAULT_WHEELBASE,
2226
};
2327
export const RobotConfigStore = types
2428
.model("RobotConfigStore", {

0 commit comments

Comments
 (0)