@wandelbots/nova-js 3.2.0-pr.feat-v2.155.e91b019 → 3.2.0-pr.feat-v2.155.551825d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -35,7 +35,7 @@ If you develop an React application we also provide a set of [React components](
35
35
  The core of this package is the `NovaClient`, which represents a connection to a configured robot cell on a given Nova instance:
36
36
 
37
37
  ```ts
38
- import { NovaClient } from "@wandelbots/nova-js"
38
+ import { NovaClient } from "@wandelbots/nova-js/v2"
39
39
 
40
40
  const nova = new NovaClient({
41
41
  instanceUrl: "https://example.instance.wandelbots.io",
@@ -102,7 +102,7 @@ The reconnecting websocket interface is fairly low-level and you won't get type
102
102
  The library provides an easy to use way to access properties of a motion group.
103
103
 
104
104
  ```ts
105
- activeRobot = await this.nova.connectMotionGroup(`some-motion-group-id`)
105
+ activeRobot = await nova.connectMotionGroup(`some-motion-group-id`)
106
106
  ```
107
107
 
108
108
  This connected motion group opens a websocket and listens to changes of the current joints and the TCP pose. You can read out those values by using the `rapidlyChangingMotionState` of the object. Along other properties it also provides the current `safetySetup` and `tcps`.
@@ -132,8 +132,8 @@ send movement commands
132
132
  // Set jogger to "jogging" mode and sends InitializeJoggingRequest to API
133
133
  await jogger.setJoggingMode("jogging")
134
134
 
135
- // You can update options afeter initializing like this:
136
- await jogger.updateOptions({
135
+ // You can update options ater initializing like this:
136
+ await jogger.setOptions({
137
137
  tcp: "Flange", // TCP id
138
138
  timeout: 3000 // How long the promise should wait when server does not respond to init request
139
139
  orientation: "mode",
@@ -2046,7 +2046,7 @@ var JoggerConnection = class JoggerConnection {
2046
2046
  this.mode = options?.mode || this.DEFAULT_MODE;
2047
2047
  this.onError = options?.onError;
2048
2048
  }
2049
- async updateOptions(options) {
2049
+ async setOptions(options) {
2050
2050
  if (options.tcp) this.tcp = options.tcp;
2051
2051
  if (options.timeout) this.timeout = options.timeout;
2052
2052
  if (options.mode) this.mode = options.mode;
@@ -2279,7 +2279,7 @@ var JoggerConnection = class JoggerConnection {
2279
2279
  if (!data?.result?.kind) throw new Error(`Failed to execute trajectory: Received invalid message ${ev.data}`);
2280
2280
  if (data.result.kind === "INITIALIZE_RECEIVED") messageInitializeMovementResponse(data.result);
2281
2281
  else if (data.result.kind === "START_RECEIVED") messageStartMovementResponse(data);
2282
- else throw new Error(`Failed to execute trajectory, cannot handle message type "${data.result.kind}"`);
2282
+ else if (data.result.kind === "PAUSE_RECEIVED") {} else throw new Error(`Failed to execute trajectory, cannot handle message type "${data.result.kind}"`);
2283
2283
  });
2284
2284
  this.trajectorySocket.sendJson({
2285
2285
  message_type: "InitializeMovementRequest",