Skip to content

feat: add TrajectoryExecutionStore, RobotPad's Move to engine: plan, load, start and pause a move to a pose - #660

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

temmuz merged 1 commit into
revampfrom
feat/move-to-engine-from-robotpad

Conversation

@temmuz

@temmuz temmuz commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

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 feat: take RobotPad's JoggingStore into the library: "Move relative to", jog errors, velocity defaults #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 feat: take RobotPad's step jogging and coordinate-system jogging into JoggerConnection #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.

@temmuz
temmuz force-pushed the feat/jogging-store-from-robotpad branch from 1c252a3 to f3f59a7 Compare November 20, 2026 11:16
Base automatically changed from feat/jogging-store-from-robotpad to revamp November 20, 2026 11:16
…load, start and pause a move to a pose

RobotPad keeps its Move to engine (src/util/TrajectoryExecutionStore.ts)
on its own. This brings it into the library, without the app around it,
so that RobotPad and other apps use one engine:

- 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.
- planTrajectory(target) plans a PTP move to a cartesian pose (in world,
  or in a coordinate system, transformed into world) or to joints, and
  loads it on an execution websocket, so that start() can run it at once.
  A planner rejection is a result ({ ok: false, errorFeedbackName }), not
  an exception; planErrorTranslationKey turns it into a message (en, de).
- start(), pause() (until the robot stands still), stopAndReset(),
  reset(); trajectoryState: idle, planning, planned, moving, stopping;
  reset at the end of the trajectory; lastError.
- By default the 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; an initialization that NOVA answers with an error
message is a refusal, as for JoggerConnection's steps, and its message
goes to lastError.
@temmuz
temmuz force-pushed the feat/move-to-engine-from-robotpad branch from d411021 to 62e6fd1 Compare November 20, 2026 11:17
@temmuz
temmuz merged commit 59a84c7 into revamp Nov 20, 2026
1 check passed
@temmuz
temmuz deleted the feat/move-to-engine-from-robotpad branch November 20, 2026 11:17
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