Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
The 3D viewer draws the table at the model floor, not at the enforced plane #183
Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.
The 3D view now draws the table and its grid at the plane the safe zone enforces, not at the model's floor. One function, ArmModel.tableZ(settings), works out that plane, and the server and the viewer both use it. src/kinematics.ts: adds tableZ(settings), which is the model's floor plus tableOffset (0 when absent).
shipped merged
The 3D view now draws the table and its grid at the plane the safe zone enforces, not at the model's floor. One function, ArmModel.tableZ(settings), works out that plane, and the server and the viewer both use it.
src/kinematics.ts: addstableZ(settings), which is the model's floor plustableOffset(0 when absent). The zone's table check now uses it.ZoneSettings.tableOffset?is written exactly as #173 writes it.src/server.ts:/model.jsonand/statusboth carrytableZ. Because/statusis pushed over/live, the drawing moves as soon as the table does, without a reload.lowestMmand the closest-approach metric are now measured fromtableZtoo.src/ui/table.js(new):tablePlaneZ(status, modelInfo)picks where to draw. It uses the status first, then/model.json'stableZ, thenfloorZfor an older server, and draws nothing for a value that isn't a finite number.viewer.htmlloads it withreach.jsand places the table on every status.- Terminal: table-here does not go into
src/tty.ts. Setting the table is a calibration done while watching the arm in the 3D view and camera, which a terminal doesn't have. The terminal stays a room door that only stops what moves; the header ofsrc/terminal.tsnow says so.
Overlap with #173: the offset setting and POST /settings/table-here are still in #173, which isn't merged. On main the offset is always 0, so tableZ equals floorZ and nothing changes on screen yet. This pull edits the same three lines #173 edits, where it adds the offset by hand: the table check, lowestMm and the metric. Whichever lands second gets a small conflict; keep model.tableZ(zoneSettings()) and #173's tableOffset in zoneSettings(). Once #173 is in, its README line "The 3D view still draws the model's table" is out of date and should go.
Tests: new tests in kinematics.test.ts and ui/table.test.ts, and tableZ assertions in server.test.ts. kinematics, server, ui/*, relay and lobby pass (168 tests). bun x tsc --noEmit reports nothing in the files changed here; the only errors are in src/ui/lobby-panel.js, where they already exist on main.
To try it: run bun run Software/so101/bench/fake-serve.ts. /model.json and /status both show tableZ, and the table sits at that height in the 3D pane.
🤖 Generated with Claude Code
The 3D view now draws the table and its grid at the plane the safe zone enforces, not at the model's floor. ArmModel.tableZ(settings) (the model's floor plus the table offset) is now the only place that plane is computed. The zone check, /status lowestMm, the closest-approach metric and the viewer all use it.
src/kinematics.ts: the zone's table check istableZ(settings) + floorMargin, where main had added the offset inline.src/server.ts:/model.jsonand/statuscarrytableZ./statusis pushed over/live, so afterPOST /settings/table-herethe drawn table moves without a reload. ThetableOffsetMmsetting and the table-here route from #173 are unchanged; their inline offset arithmetic now goes throughtableZ.src/ui/table.js(new):tablePlaneZ(status, modelInfo)picks where to draw. It uses the status first, then/model.json'stableZ, thenfloorZfrom an older server, and draws nothing for a value that isn't a finite number.viewer.htmlplaces the table and grid with it on every status.- Terminal: table-here stays out of
src/tty.ts. Setting the table is done while watching the arm in the page's 3D view and camera, which a terminal doesn't have. The header ofsrc/terminal.tsnow says the terminal makes no arm settings. - README: "The 3D view still draws the model's table" now reads "The 3D view draws the table there."
tableZis documented next to the trims.
Tests: after table-here, /status and /model.json both report tableZ equal to floorZ + tableOffsetMm / 1000. In the kinematics test, an offset puts the resting arm 15 mm under the table (10 mm below the raised plane plus the 5 mm margin), and tableZ reports the raised plane. ui/table.test.ts covers which value the viewer picks. The kinematics, server, ui/*, relay and lobby suites pass (171 tests). bun x tsc --noEmit reports errors only in src/ui/lobby-panel.js, and main has the same errors.
To try it: run bun run Software/so101/bench/fake-serve.ts, then POST /settings/table-here from the page's origin. tableZ on /status changes and the drawn table moves with it.
🤖 Generated with Claude Code
Approved. One function (ArmModel.tableZ) now owns the enforced plane; the zone check, lowestMm, the approach metric, /model.json, /status and the viewer all use it. Each new behaviour has a test that fails without it (kinematics offset, server tableZ after table-here, ui/table.js fallbacks). Fallback to floorZ keeps the viewer working against an older server. No new dependency; the README and terminal header are updated, and leaving table-here out of the tty is reasoned and consistent with the existing terminal scope.
Caveat: on the preview, /model.json and /status carry no tableZ. The arm behind it reports source live 100.89.95.68:8101, so it is not running this build, and the page fell back to floorZ. I could not see the moved table there, so it is checked by tests only.
Next: (1) reflow the README sentence added mid-paragraph; it is one very long line and splits the jam sentence awkwardly. (2) Add a short 3D-view note on the page when tableZ differs from floorZ, so a person knows the drawn table is the enforced one.
The 3D view now draws the table and its grid at the plane the safe zone enforces, not at the model's floor. One function,
ArmModel.tableZ(settings), works out that plane, and the server and the viewer both use it.src/kinematics.ts: addstableZ(settings), which is the model's floor plustableOffset(0 when absent). The zone's table check now uses it.ZoneSettings.tableOffset?is written exactly as #173 writes it.src/server.ts:/model.jsonand/statusboth carrytableZ. Because/statusis pushed over/live, the drawing moves as soon as the table does, without a reload.lowestMmand the closest-approach metric are now measured fromtableZtoo.src/ui/table.js(new):tablePlaneZ(status, modelInfo)picks where to draw. It uses the status first, then/model.json'stableZ, thenfloorZfor an older server, and draws nothing for a value that isn't a finite number.viewer.htmlloads it withreach.jsand places the table on every status.src/tty.ts. Setting the table is a calibration done while watching the arm in the 3D view and camera, which a terminal doesn't have. The terminal stays a room door that only stops what moves; the header ofsrc/terminal.tsnow says so.Overlap with #173: the offset setting and
POST /settings/table-hereare still in #173, which isn't merged. On main the offset is always 0, sotableZequalsfloorZand nothing changes on screen yet. This pull edits the same three lines #173 edits, where it adds the offset by hand: the table check,lowestMmand the metric. Whichever lands second gets a small conflict; keepmodel.tableZ(zoneSettings())and #173'stableOffsetinzoneSettings(). Once #173 is in, its README line "The 3D view still draws the model's table" is out of date and should go.Tests: new tests in
kinematics.test.tsandui/table.test.ts, andtableZassertions inserver.test.ts.kinematics,server,ui/*,relayandlobbypass (168 tests).bun x tsc --noEmitreports nothing in the files changed here; the only errors are insrc/ui/lobby-panel.js, where they already exist on main.To try it: run
bun run Software/so101/bench/fake-serve.ts./model.jsonand/statusboth showtableZ, and the table sits at that height in the 3D pane.🤖 Generated with Claude Code
Closes #179