Skip to content

Commit

Permalink
[RSDK-9680] Remove robot.DiscoverComponents from docs. (#3801)
Browse files Browse the repository at this point in the history
  • Loading branch information
randhid authored Jan 9, 2025
1 parent 39bfa67 commit acc7360
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 104 deletions.
1 change: 0 additions & 1 deletion .github/workflows/sdk_protos_map.csv
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ robot,ResourceNames,,,ResourceNames,
robot,ResourceRPCSubtypes,,,,
robot,CancelOperation,,cancel_operation,,
robot,BlockForOperation,,block_for_operation,,
robot,DiscoverComponents,,discover_components,DiscoverComponents,discoverComponents
robot,FrameSystemConfig,,get_frame_system_config,FrameSystemConfig,
robot,TransformPose,,transform_pose,TransformPose,
robot,TransformPCD,,,TransformPointCloud,
Expand Down
1 change: 0 additions & 1 deletion static/include/robot/apis/generated/robot-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
| [`ResourceNames`](/dev/reference/apis/robot/#resourcenames) | Get a list of all known resource names connected to this machine. |
| [`CancelOperation`](/dev/reference/apis/robot/#canceloperation) | Cancel the specified operation on the machine. |
| [`BlockForOperation`](/dev/reference/apis/robot/#blockforoperation) | Blocks on the specified operation on the machine. |
| [`DiscoverComponents`](/dev/reference/apis/robot/#discovercomponents) | Get a list of discovered component configurations. |
| [`FrameSystemConfig`](/dev/reference/apis/robot/#framesystemconfig) | Get the configuration of the frame system of a given machine. |
| [`TransformPose`](/dev/reference/apis/robot/#transformpose) | Transform a given source Pose from the original reference frame to a new destination reference frame. |
| [`TransformPCD`](/dev/reference/apis/robot/#transformpcd) | Transforms the pointcloud to the desired frame in the robot's frame system. |
Expand Down
80 changes: 0 additions & 80 deletions static/include/robot/apis/generated/robot.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,86 +130,6 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/
{{% /tab %}}
{{< /tabs >}}

### DiscoverComponents

Get a list of discovered component configurations.

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

**Parameters:**

- `queries` ([List[viam.proto.robot.DiscoveryQuery]](https://python.viam.dev/autoapi/viam/proto/robot/index.html#viam.proto.robot.DiscoveryQuery)) (required): The list of component models to lookup potential configurations for.

**Returns:**

- ([List[viam.proto.robot.Discovery]](https://python.viam.dev/autoapi/viam/proto/robot/index.html#viam.proto.robot.Discovery)): A list of discovered potential component configurations.

**Example:**

```python {class="line-numbers linkable-line-numbers"}
from viam.proto.robot import DiscoveryQuery

# Define a new discovery query.
q = DiscoveryQuery(subtype="camera", model="webcam")

# Define a list of discovery queries.
qs = [q]

# Get component configurations with these queries.
component_configs = await machine.discover_components(qs)
```

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/robot/client/index.html#viam.robot.client.RobotClient.discover_components).

{{% /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.
- `qs` [([]resource.DiscoveryQuery)](https://pkg.go.dev/go.viam.com/rdk/resource#DiscoveryQuery): A list of [tuples of API and model](https://pkg.go.dev/go.viam.com/rdk/resource#DiscoveryQuery) that you want to retrieve the component configurations corresponding to.

**Returns:**

- [([]resource.Discovery)](https://pkg.go.dev/go.viam.com/rdk/resource#Discovery): The search query `qs` and the corresponding list of discovered component configurations as an interface called `Results`. `Results` may be comprised of primitives, a list of primitives, maps with string keys (or at least can be decomposed into one), or lists of the forementioned type of maps.
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

**Example:**

```go {class="line-numbers linkable-line-numbers"}
// Define a new discovery query.
q := resource.NewDiscoveryQuery(camera.API, resource.Model{Name: "webcam", Family: resource.DefaultModelFamily})

// Define a list of discovery queries and get potential component configurations with these queries.
out, err := machine.DiscoverComponents(context.Background(), []resource.DiscoveryQuery{q})
```

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

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

**Parameters:**

- `queries` [List](https://api.flutter.dev/flutter/dart-core/List-class.html)\<[DiscoveryQuery](https://flutter.viam.dev/viam_sdk/DiscoveryQuery-class.html)\> (required)

**Returns:**

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

**Example:**

```dart {class="line-numbers linkable-line-numbers"}
var queries = [DiscoveryQuery(subtype: 'camera', model: 'webcam', extra: {'username': 'admin', 'password': 'admin'})];
var discoveredComponents = await machine.discoverComponents(queries);
```

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

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

### FrameSystemConfig

Get the configuration of the frame system of a given machine.
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions test-scripts/machine-management-qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from viam.rpc.dial import DialOptions, dial
from viam.proto.common import Pose, PoseInFrame

from viam.proto.robot import DiscoveryQuery

async def connect(address) -> RobotClient:
opts = RobotClient.Options(
Expand Down Expand Up @@ -38,17 +37,6 @@ async def main():
print(result.version)
print(result.api_version)

# Define a new discovery query.
# just implemented for webcam -- for modules returns name of modules
q = DiscoveryQuery(subtype="camera", model="webcam")

# Define a list of discovery queries.
qs = [q]

# # Get component configurations with these queries.
component_configs = await machine.discover_components(qs)
print(component_configs)

frame_system = await machine.get_frame_system_config()
print(f"frame system configuration: {frame_system}")

Expand Down
6 changes: 0 additions & 6 deletions test-scripts/test-go/machine-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ func main() {

defer machine.Close(context.Background())

q := resource.NewDiscoveryQuery(camera.API, resource.Model{Name: "webcam", Family: resource.DefaultModelFamily})

// Define a list of discovery queries and get potential component configurations with these queries.
out, err := machine.DiscoverComponents(context.Background(), []resource.DiscoveryQuery{q})
logger.Info(out)

frameSystem, err := machine.FrameSystemConfig(context.Background())
fmt.Println(frameSystem)

Expand Down

0 comments on commit acc7360

Please sign in to comment.