Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/sdk_protos_map.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ arm,MoveThroughJointPositions,,,MoveThroughJointPositions,,
arm,GetJointPositions,,get_joint_positions,JointPositions,jointPositions,getJointPositions
arm,Get3DModels,,,Get3DModels,get3DModels,get3DModels
## HACK: proto for these (and/or inherited in Go SDK), manually mapping:
arm,GetKinematics,,get_kinematics,Kinematics,,getKinematics
arm,GetKinematics,,get_kinematics,Kinematics,getKinematics,getKinematics
arm,IsMoving,,is_moving,IsMoving,isMoving,isMoving
arm,Stop,,stop,Stop,stop,stop
arm,GetGeometries,,get_geometries,Geometries,,getGeometries
arm,GetGeometries,,get_geometries,Geometries,getGeometries,getGeometries
arm,Reconfigure,,,Reconfigure,,
arm,DoCommand,,do_command,DoCommand,doCommand,doCommand
arm,GetStatus,,get_status,,getStatus,getStatus
Expand Down Expand Up @@ -91,6 +91,7 @@ button,Close,No,close,Close,,

## Camera
camera,GetImages,,get_images,Images,getImages,getImages
camera,Stream,,,Stream,,
camera,GetPointCloud,,get_point_cloud,NextPointCloud,pointCloud,getPointCloud
camera,GetProperties,,get_properties,Properties,properties,getProperties
## TED: Camera in Go SDK doesn't appear to implement (inherit) these:
Expand Down Expand Up @@ -119,14 +120,14 @@ gantry,MoveToPosition,,move_to_position,MoveToPosition,moveToPosition,moveToPosi
gantry,GetLengths,,get_lengths,Lengths,lengths,getLengths
gantry,Home,,home,Home,home,home
## TED: Gantry in Go SDK doesn't appear to implement (inherit) this:
gantry,GetGeometries,,get_geometries,,,getGeometries
gantry,GetGeometries,,get_geometries,Geometries,getGeometries,getGeometries
## HACK: proto for these (and/or inherited in Go SDK), manually mapping:
gantry,IsMoving,,is_moving,IsMoving,isMoving,isMoving
gantry,Stop,,stop,Stop,stop,stop
gantry,Reconfigure,,,Reconfigure,,
gantry,DoCommand,,do_command,DoCommand,doCommand,doCommand
gantry,GetStatus,,get_status,,getStatus,getStatus
gantry,GetKinematics,,get_kinematics,Kinematics,,
gantry,GetKinematics,,get_kinematics,Kinematics,getKinematics,getKinematics
gantry,GetResourceName,,get_resource_name,Name,getResourceName,name
gantry,Close,,close,Close,,

Expand All @@ -145,11 +146,11 @@ gripper,Open,,open,Open,open,open
gripper,Grab,,grab,Grab,grab,grab
## HACK: proto for these (and/or inherited in Go SDK), manually mapping:
gripper,IsMoving,,is_moving,IsMoving,isMoving,isMoving
gripper,IsHoldingSomething,,is_holding_something,IsHoldingSomething,isHoldingSomething,
gripper,IsHoldingSomething,,is_holding_something,IsHoldingSomething,isHoldingSomething,isHoldingSomething
gripper,Stop,,stop,Stop,stop,stop
gripper,GetGeometries,,get_geometries,Geometries,,getGeometries
gripper,GetCurrentInputs,,get_current_inputs,CurrentInputs,,getCurrentInputs
gripper,GoToInputs,,go_to_inputs,GoToInputs,,goToInputs
gripper,GetCurrentInputs,,get_current_inputs,CurrentInputs,getCurrentInputs,getCurrentInputs
gripper,GoToInputs,,go_to_inputs,GoToInputs,goToInputs,goToInputs
gripper,Reconfigure,,,Reconfigure,,
gripper,DoCommand,,do_command,DoCommand,doCommand,doCommand
gripper,GetStatus,,get_status,,getStatus,getStatus
Expand Down
38 changes: 38 additions & 0 deletions static/include/components/apis/generated/arm.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,25 @@ API](https://docs.viam.com/dev/reference/apis/components/arm/#getkinematics).

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/classes/ArmClient.html#getkinematics).

{{% /tab %}}
{{% tab name="Flutter" %}}

**Parameters:**

- `extra` [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<Kinematics>

**Example:**

```dart {class="line-numbers linkable-line-numbers"}
var kinematics = await myArm.getKinematics();
```

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/Arm/getKinematics.html).

{{% /tab %}}
{{< /tabs >}}

Expand Down Expand Up @@ -892,6 +911,25 @@ console.log(geometries);

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/classes/ArmClient.html#getgeometries).

{{% /tab %}}
{{% tab name="Flutter" %}}

**Parameters:**

- `extra` [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Geometry](https://flutter.viam.dev/viam_protos.common.common/Geometry-class.html)>\>

**Example:**

```dart {class="line-numbers linkable-line-numbers"}
final geometries = await myArm.getGeometries();
```

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/Arm/getGeometries.html).

{{% /tab %}}
{{< /tabs >}}

Expand Down
1 change: 1 addition & 0 deletions static/include/components/apis/generated/camera-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
| Method Name | Description |
| ----------- | ----------- |
| [`GetImages`](/reference/apis/components/camera/#getimages) | `GetImages` is used for getting simultaneous images from different imagers from 3D cameras along with associated metadata, and single images from non-3D cameras, for example webcams, RTSP cameras, etc. in the image list in the response. |
| [`Stream`](/reference/apis/components/camera/#stream) | Stream live video frames from the camera. |
| [`GetPointCloud`](/reference/apis/components/camera/#getpointcloud) | Get a point cloud from the camera as bytes with a MIME type describing the structure of the data. |
| [`GetProperties`](/reference/apis/components/camera/#getproperties) | Get the camera intrinsic parameters and camera distortion, as well as whether the camera supports returning point clouds. |
| [`DoCommand`](/reference/apis/components/camera/#docommand) | Execute model-specific commands that are not otherwise defined by the component API. |
Expand Down
29 changes: 29 additions & 0 deletions static/include/components/apis/generated/camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,35 @@ For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_s
{{% /tab %}}
{{< /tabs >}}

### Stream

Stream live video frames from the camera.

{{< tabs >}}
{{% tab name="Go" %}}

{{% alert title="Info" color="info" %}}

Unlike most Viam [component APIs](/reference/apis/#component-apis), the methods of the Go camera client do not map exactly to the names of the other SDK's camera methods.
To get an image in the Go SDK, you first need to construct a `Stream` and then you can get the next image from that stream.

{{% /alert %}}

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `errHandlers` [(...gostream.ErrorHandler)](https://pkg.go.dev/go.viam.com/rdk/gostream#ErrorHandler): A handler for errors allowing for logic based on consecutively retrieved errors.

**Returns:**

- [(gostream.VideoStream)](https://pkg.go.dev/go.viam.com/rdk/gostream#VideoStream): A `VideoStream` that streams video until closed.
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/components/camera#VideoSource).

{{% /tab %}}
{{< /tabs >}}

### GetPointCloud

Get a point cloud from the camera as bytes with a MIME type describing the structure of the data.
Expand Down
92 changes: 92 additions & 0 deletions static/include/components/apis/generated/gantry.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,36 @@ if geometries:

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/components/gantry/client/index.html#viam.components.gantry.client.GantryClient.get_geometries).

{{% /tab %}}
{{% tab name="Go" %}}

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `extra` [(map[string]interface{})](https://go.dev/blog/maps): Extra options to pass to the underlying RPC call.

**Returns:**

- [([]spatialmath.Geometry)](https://pkg.go.dev/go.viam.com/rdk/spatialmath#Geometry): The geometries associated with this resource, in any order.
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

**Example:**

```go {class="line-numbers linkable-line-numbers"}
// This example shows using Geometries with an gantry component.
myGantry, err := gantry.FromProvider(machine, "my_gantry")

geometries, err := myGantry.Geometries(context.Background(), nil)

if len(geometries) > 0 {
// Get the center of the first geometry
elem := geometries[0]
fmt.Println("Pose of the first geometry's center point:", elem.Pose())
}
```

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/resource#Shaped).

{{% /tab %}}
{{% tab name="TypeScript" %}}

Expand All @@ -458,6 +488,25 @@ const geometries = await gantry.getGeometries();

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/classes/GantryClient.html#getgeometries).

{{% /tab %}}
{{% tab name="Flutter" %}}

**Parameters:**

- `extra` [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Geometry](https://flutter.viam.dev/viam_protos.common.common/Geometry-class.html)>\>

**Example:**

```dart {class="line-numbers linkable-line-numbers"}
final geometries = await myGantry.getGeometries();
```

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/Gantry/getGeometries.html).

{{% /tab %}}
{{< /tabs >}}

Expand Down Expand Up @@ -898,6 +947,49 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/robot/framesystem#InputEnabled).

{{% /tab %}}
{{% tab name="TypeScript" %}}

**Parameters:**

- `extra` (None) (optional)
- `callOptions` (CallOptions) (optional)

**Returns:**

- (Promise<GetKinematicsResult>): The legacy kinematics data shape or the newer object containing kinematics data plus a
map of URDF mesh file paths to mesh data.

**Example:**

```ts {class="line-numbers linkable-line-numbers"}
const gantry = new VIAM.GantryClient(machine, 'my_gantry');

// Get the kinematics information associated with the gantry
const kinematics = await gantry.getKinematics();
```

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/classes/GantryClient.html#getkinematics).

{{% /tab %}}
{{% tab name="Flutter" %}}

**Parameters:**

- `extra` [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<Kinematics>

**Example:**

```dart {class="line-numbers linkable-line-numbers"}
var kinematics = await myGantry.getKinematics();
```

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/Gantry/getKinematics.html).

{{% /tab %}}
{{< /tabs >}}

Expand Down
51 changes: 51 additions & 0 deletions static/include/components/apis/generated/gripper.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,30 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/components/gripper#Gripper).

{{% /tab %}}
{{% tab name="TypeScript" %}}

**Parameters:**

- `extra` (None) (optional)
- `callOptions` (CallOptions) (optional)

**Returns:**

- (Promise<boolean>)

**Example:**

```ts {class="line-numbers linkable-line-numbers"}
const gripper = new VIAM.GripperClient(machine, 'my_gripper');

// Check if the gripper is holding something
const holding = await gripper.isHoldingSomething();
console.log('Gripper is holding something:', holding);
```

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/classes/GripperClient.html#isholdingsomething).

{{% /tab %}}
{{% tab name="Flutter" %}}

Expand Down Expand Up @@ -585,6 +609,19 @@ console.log('Current inputs:', inputs);

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/classes/GripperClient.html#getcurrentinputs).

{{% /tab %}}
{{% tab name="Flutter" %}}

**Parameters:**

- `extra` [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[double](https://api.flutter.dev/flutter/dart-core/double-class.html)>\>

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/Gripper/getCurrentInputs.html).

{{% /tab %}}
{{< /tabs >}}

Expand Down Expand Up @@ -641,6 +678,20 @@ await gripper.goToInputs([0.5]);

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/classes/GripperClient.html#gotoinputs).

{{% /tab %}}
{{% tab name="Flutter" %}}

**Parameters:**

- `values` [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[double](https://api.flutter.dev/flutter/dart-core/double-class.html)> (required)
- `extra` [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void>

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/Gripper/goToInputs.html).

{{% /tab %}}
{{< /tabs >}}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Stream live video frames from the camera.
Loading