Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

workbenchthis machine

The intent hold falls back to the arm's real settle time (1 s, not 2 s) when the motion gives no duration; arrival stays at 12 ticks or less #535

Parked opened this
Closed without merging

smith/arm:smith/518-the-intent-hold-falls-back-to-the-arm-s → main 1 commit fork

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
2 files changed +4 −4
Software/so101/src/ui/intent.js +1 −1
@@ -7,7 +7,7 @@
77 export class Intent {
88 /** @param {{ hold?: number, near?: number }} [options] hold: ms an unreached target is kept after release; near: ticks that count as arrived */
99 constructor(options = {}) {
10 this.hold = options.hold ?? 2000;
10 this.hold = options.hold ?? 1000; // the servos settle in 150-330 ms (the steward's table); 1 s is that plus margin
1111 this.near = options.near ?? 12;
1212 /** @type {Map<number, { ticks: number, down: boolean, since: number, hold?: number }>} */
1313 this.targets = new Map();
Software/so101/src/ui/intent.test.ts +3 −3
@@ -14,11 +14,11 @@ describe("Intent", () => {
1414 expect(i.target(1, 2995, 600)).toBeNull();
1515 expect(i.target(1, 2048, 700)).toBeNull();
1616 });
17 test("an arm that never arrives is followed again after 2 s", () => {
17 test("an arm that never arrives is followed again after 1 s", () => {
1818 const i = new Intent();
1919 i.set(2, 3000, 0); i.release(2, 0);
20 expect(i.target(2, 2048, 1999)).toBe(3000);
21 expect(i.target(2, 2048, 2000)).toBeNull();
20 expect(i.target(2, 2048, 999)).toBe(3000);
21 expect(i.target(2, 2048, 1000)).toBeNull();
2222 });
2323 test("a held target is not dropped when the arm happens to be there", () => {
2424 const i = new Intent();

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs