Skip to content

feat: take RobotPad's step jogging and coordinate-system jogging into JoggerConnection - #658

Merged
temmuz merged 1 commit into
revampfrom
feat/jogger-from-robotpad
Nov 20, 2026
Merged

temmuz merged 1 commit into
revampfrom
feat/jogger-from-robotpad

Conversation

@temmuz

@temmuz temmuz commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

The second PR that brings RobotPad's newer jogging logic into the library, so that RobotPad can use the library's classes and delete its copies (the first is #657, MotionStreamConnection; this one is stacked on it). This one: JoggerConnection and its step jogging.

What changes

  • "Move relative to": a coordinateSystem option and field. Continuous TCP jogs move along, or turn about, the axes of a chosen coordinate system, as in RobotPad.
  • Steps follow the frame: runIncrementalCartesianMotion steps along the tool's axes in tool orientation and along the coordinate system's axes otherwise, through the pure function computeIncrementalTargetPose (RobotPad's). They always moved along the world's axes.
  • TCP offset: a step sends the active TCP's offset to the planner, so it moves by the requested distance instead of jumping by the offset.
  • A step ends at standstill: it resolves once the robot stands still again, not right after the trajectory is sent, guarded by a watchdog (twice the planned time plus 5 s). Each step has its own socket; a step asked for while one runs is dropped; dispose() or a change of the jogging mode ends a running step.
  • Errors: a plan with error_feedback, or a trajectory the controller refuses, is not started. Errors go to onError, or reject the step without it, instead of being thrown inside websocket listeners.
  • Options: motionGroupModel for the planner, and an optional logger (ConnectionLogger, from feat: take RobotPad's motion stream readout, update order and logging into MotionStreamConnection #657), which open() also hands to its motion stream.
  • IncrementalCartesianMotionRequest is exported; its coordSystemId is optional and deprecated (the coordinate system comes from the jogger).

The library's own improvements stay: open() and its disposal of the motion stream it opened, the jogging init that always settles, setOptions returning the re-init promise, the internal client.

Behavior changes for current users

  • A step's promise now resolves after the motion, so a motion lock around it covers the whole step.
  • A step asked for during another one is dropped.
  • Errors reach onError or the step's promise instead of being thrown in a listener.
  • A refused trajectory, or a failed plan, is not executed.
  • With a TCP offset, a step moves by the requested distance.
  • In tool orientation, steps follow the tool's axes (the library's panel never steps in tool orientation, so only direct API users see this).

Public API

Additions only: the options coordinateSystem, motionGroupModel and logger, the coordinateSystem field, and the exported types IncrementalCartesianMotionRequest and IncrementalMotion; coordSystemId becomes optional. API reports updated.

Checked

  • RobotPad's tests of the steps (incrementalCartesianMotion, incrementalJoggingConcurrency, Pose3) ported, plus new tests for the coordinate system, the TCP offset and the error paths: 17 failed before the change. Breaking any of eight rules (refusal guard, in-flight drop, tool-frame step, coordinate-system rotation, end on dispose, TCP offset, error_feedback guard, model option) fails a test.
  • Lint, typecheck, all 311 unit tests, build, api:check, consumer tests, and on a NOVA instance test:e2e (2) and all 17 playground tests.

… JoggerConnection

RobotPad's copy of JoggerConnection (src/jogging/) has moved ahead of the
library's. This brings its changes here, so that RobotPad can use the
library's class and drop its copy:

- coordinateSystem option and field: continuous TCP jogs move along, or
  turn about, the axes of a chosen coordinate system ("Move relative
  to"), as in RobotPad.
- Steps (runIncrementalCartesianMotion) follow the tool's axes in tool
  orientation and the coordinate system's axes otherwise, through the
  pure function computeIncrementalTargetPose; they always moved along
  the world's axes.
- A step sends the active TCP's offset to the planner, so it moves by the
  requested distance instead of jumping by the offset.
- A step resolves once the robot stands still again, not right after the
  trajectory is sent, guarded by a watchdog (twice the planned time plus
  5 s); each step has its own socket, and a step asked for while one runs
  is dropped. dispose() or a change of the jogging mode ends a running
  step.
- A plan with error_feedback, or a trajectory the controller refuses, is
  not started; errors go to onError, or reject the step without it,
  instead of being thrown inside websocket listeners.
- motionGroupModel option for the planner, and an optional logger
  (ConnectionLogger), which open() also hands to its motion stream.
- IncrementalCartesianMotionRequest is exported; its coordSystemId is
  optional and deprecated (the coordinate system comes from the jogger).

RobotPad's tests of the steps (incrementalCartesianMotion,
incrementalJoggingConcurrency, Pose3) are ported, with new tests for the
error paths, the TCP offset and the coordinate system.
@temmuz
temmuz force-pushed the feat/jogger-from-robotpad branch from 7faf7b3 to f41ebe4 Compare November 20, 2026 11:15
@temmuz
temmuz merged commit 68ad910 into revamp Nov 20, 2026
1 check passed
@temmuz
temmuz deleted the feat/jogger-from-robotpad branch November 20, 2026 11:15
temmuz added a commit that referenced this pull request Nov 20, 2026
…o", jog errors, velocity defaults (#659)

The third PR that brings RobotPad's newer jogging logic into the
library, so that RobotPad can use the library's classes and delete its
copies (#657 `MotionStreamConnection`, #658 `JoggerConnection`; this one
is stacked on #658). This one: `JoggingStore`.

## What changes

- **"Move relative to":** `jogCoordSystemId` (saved with the other
settings under `joggingToolStore`), `jogCoordSystem`,
`setMoveRelativeToCoordSystem`, `setMoveRelativeToSelectedTcp`.
`activate()` hands the coordinate system, resolved into world, to the
jogger (#658). Coordinate systems that refer to others are resolved
through `PoseTransformer` (ported in part: the coordinate-system half).
World is always known, also when a controller lists no coordinate
systems (RobotPad's resolver threw then).
- **`tcpPoseInSelectedCoordSystem`:** the TCP's readout (#657) in the
selected coordinate system.
- **Jog errors:** the store latches the jogger's errors in
`lastJogError`, with a translation key (en and de, RobotPad's texts),
and still calls an `onError` the app set; `activate()` clears it. The
old `JoggingPanel`'s stream state line shows it.
- **Velocity defaults as in RobotPad:** 10 % of the T1 limit for
translation (25 mm/s, at most 250), 5 °/s for rotation, a minimum of 1
mm/s. `setVelocityFromSlider` ignores values that are not finite or out
of range.
- **`onBeforeActivate`:** an optional hook that `activate()` awaits
(RobotPad releases a staged Move to there).
- **Steps in tool orientation** stay available, as steps now follow the
tool's axes (#658).
- **`JoggingStore.create(jogger, { coordinateSystems, description,
kinematicModel })`** from data an app already loaded; `loadFor` uses it.
- `tabs` typed as a non-empty tuple.

The library's own improvements stay: `loadFor`, `ORIENTATION_IDS`,
`activate()` awaiting the jogging mode, `unblock()` catching errors.

## Behavior changes for current users

- Default velocities 25 mm/s and 5 °/s instead of 10 mm/s and 1 °/s; the
slider minimum is 1 mm/s instead of 5.
- `setVelocityFromSlider` ignores out-of-range or non-finite values.
- Errors no longer reject `activate()` or a step: they latch in
`lastJogError` (and reach the app's `onError`). The old panel shows
them.
- Steps are offered in tool orientation.
- Each cartesian `activate()` sets the jogger's coordinate system to the
jog coordinate system (world unless the app picks another).

## Public API

Additions: `create`, `jogCoordSystem`, `jogCoordSystemId`,
`lastJogError`, `lastJogErrorTranslationKey`, `onBeforeActivate`,
`setLastJogError`, `setMoveRelativeToCoordSystem`,
`setMoveRelativeToSelectedTcp`, `tcpPoseInSelectedCoordSystem`, and
`jogCoordSystemId` in the saved settings. `tabs`, `currentTab` and
`tabsById` are typed with `JoggingTab` (still usable as before). API
reports updated.

## Checked

- 45 new tests (store, velocity defaults and checks, `PoseTransformer`,
`Pose3`) failed before the change, plus two for an empty
coordinate-system list. Five tests of the old panel that encoded the old
defaults were updated. Breaking the velocity range check, the finite
check, the awaited `onBeforeActivate`, the coordinate system handed to
the jogger, its resolution into world, the readout's coordinate system,
or the call of the app's `onError` fails a test.
- Lint, typecheck, all 367 unit tests, build, `api:check`, consumer
tests, and on a NOVA instance `test:e2e` (2) and all 17 playground
tests.
temmuz added a commit that referenced this pull request Nov 20, 2026
…load, start and pause a move to a pose (#660)

The fourth PR that brings RobotPad's newer logic into the library, so
that RobotPad can use it and delete its copies (#657
`MotionStreamConnection`, #658 `JoggerConnection`, #659 `JoggingStore`;
this one is stacked on #659). This one adds RobotPad's Move to engine,
`TrajectoryExecutionStore`, without the app around it.

## The API

- `new TrajectoryExecutionStore({ joggingStore, isLocked?,
ensureMovementOwnership?, logger? })` uses the jogging store's jogger:
its NOVA connection, cell, motion group, motion stream and planner
model, and the store's TCP and velocities. `isLocked` defaults to never
locked.
- `planTrajectory(target)`: a PTP move to a cartesian pose (`{ type:
"cartesian", pose, coordinateSystemId? }`, in world or in a coordinate
system that is transformed into world with the `PoseTransformer` of
#659) or to joints (`{ type: "joint", joints }`). It loads the
trajectory on an execution websocket, so that `start()` runs it at once.
A planner rejection is a result (`{ ok: false, errorFeedbackName }`),
not an exception; `planErrorTranslationKey` turns it into a message
(RobotPad's texts, en and de).
- `start()`, `pause()` (until the robot stands still), `stopAndReset()`,
`reset()`, `clearError()`, `dispose()`; `trajectoryState` (`idle`,
`planning`, `planned`, `moving`, `stopping`), `plannedTrajectory`,
`lastError`, `executionState`. It resets at the end of the trajectory.
- By default a move takes the robot over from jogging (it deactivates
the jogging store and switches the jogger to its trajectory mode), as
RobotPad does; an app can pass its own `ensureMovementOwnership`.

## Differences from RobotPad's copy

- A planner that cannot be reached no longer leaves the store in
"planning".
- State changes after an `await` run in MobX actions (RobotPad's copy
logs strict-mode warnings there).
- An initialization that NOVA answers with an error `message` is a
refusal, as for the steps of #658, and the message goes to `lastError`
(RobotPad's copy counted it as accepted).
- It waits for standstill on the motion stream, as `JoggerConnection`
does, instead of comparing NATS joint values; no `tcpId` in the target
(RobotPad plans with the selected TCP too).

The playground's Move to demo (#656) switches to this engine in a
follow-up, once #656 is in.

## Public API

Additions only: `TrajectoryExecutionStore`, its options,
`TrajectoryTarget`, `PlanTrajectoryResult`, `PlannedTrajectory`,
`TrajectoryState`, `planErrorTranslationKey`. API reports updated.

## Checked

- RobotPad's tests of its engine, ported, plus tests for the default
ownership, joint targets, the unreachable planner, MobX actions, the
error texts and a refusal by message: 45 new tests, all failing before
the code. Breaking the coordinate-system transform, the reset at the end
of the trajectory, the rule for a pause acknowledgement after the motion
settled, or the default ownership fails a test.
- Lint, typecheck, all 412 unit tests, build, `api:check`, consumer
tests, and on a NOVA instance `test:e2e` (2) and all 17 playground
tests.

## Known, older than this PR

`JoggerConnection`'s step jogs (in the library before and in RobotPad)
send the controller's limits as `global` in the motion group setup;
NOVA's field is `global_limits`. To check and fix on its own.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant