Skip to content

Commit

Permalink
Merge branch 'main' into sguequierre-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
sguequierre authored Sep 14, 2023
2 parents 4fb2428 + 0dfd884 commit 434ad3f
Show file tree
Hide file tree
Showing 33 changed files with 214 additions and 260 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lexi-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
ref: ${{github.event.pull_request.head.sha}}
fetch-depth: 0
- uses: npentrel/lexi@v1.1
- uses: Rebilly/lexi@v2
with:
github-token: ${{ secrets.PR_TOKEN }}
glob: '**/*.md'
Binary file removed assets/services/ml-models-service.png
Binary file not shown.
Binary file removed assets/services/vision/color_detector.png
Binary file not shown.
Binary file removed assets/services/vision/detector_3d_segmenter.png
Binary file not shown.
Binary file removed assets/services/vision/mlmodel.png
Binary file not shown.
Binary file removed assets/services/vision/obstacles_pointcloud.png
Binary file not shown.
Binary file removed assets/tutorials/confetti-bot/app-board-create.png
Binary file not shown.
Binary file removed assets/tutorials/tipsy/app-board-create.png
Binary file not shown.
Binary file removed assets/tutorials/tipsy/app-motor-create.png
Binary file not shown.
Binary file removed assets/tutorials/tipsy/app-service-ml-create.png
Binary file not shown.
Binary file removed assets/tutorials/tipsy/app-service-vision-create.png
Binary file not shown.
5 changes: 3 additions & 2 deletions docs/extend/modular-resources/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Once the module has been uploaded to the Registry, you can [deploy the module](/
### Uploading to Viam Registry

After you finish programming your module, you can [upload your module to the Viam registry](/extend/modular-resources/upload/) to make it available for deployment to robots.
As part of the upload process, you decide whether your module is *public* (visible to all users) or *private* (visible only to other members of your [organization](/manage/fleet/organizations/)).
As part of the upload process, you decide whether your module is *private* (visible only to other members of your [organization](/manage/fleet/organizations/)), or *public* (visible to all Viam users).

You can see details about each module in the [Viam registry](https://app.viam.com/registry) on its module details page.
See the [Odrive module](https://app.viam.com/module/viam/odrive) for an example.
Expand All @@ -47,7 +47,8 @@ When you make changes to your module, you can [uploaded the newer version](/exte

Once you [upload a module to the Viam registry](/extend/modular-resources/upload/), you can [deploy the module](/extend/modular-resources/configure/) to any robot in your organization from [the Viam app](https://app.viam.com/).
Navigate to your robot's **Configuration** tab, click the **+ Create component** button, then start typing the name of the module you would like to deploy.
If you uploaded your module and set its visibility to private, the module will only appear for users within your [organization](/manage/fleet/organizations/).

By default, a newly-created module is *private*, meaning that the module will only appear for users within your [organization](/manage/fleet/organizations/), but you can later [update your module](/extend/modular-resources/upload/#update-an-existing-module) to set it to be *public*, which makes your module available to all Viam users.

When you deploy a module to your robot, you can [choose how to update that module](/extend/modular-resources/configure/#configure-version-update-management-for-a-registry-module) when new versions become available.

Expand Down
4 changes: 2 additions & 2 deletions docs/extend/modular-resources/upload/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ To upload your custom module to the [Viam registry](https://app.viam.com/registr
<td><code>visibility</code></td>
<td>string</td>
<td><strong>Required</strong></td>
<td>Whether the module is visible to all Viam users (<code>public</code>), or accessible only to members of your <a href="/manage/fleet/organizations/">organization</a> (<code>private</code>). You can change this setting later using the <code>viam module update</code> command.<br><br>Default: <code>private</code></td>
<td>Whether the module is accessible only to members of your <a href="/manage/fleet/organizations/">organization</a> (<code>private</code>), or visible to all Viam users (<code>public</code>). You can change this setting later using the <code>viam module update</code> command.<br><br>Default: <code>private</code></td>
</tr>
<tr>
<td><code>url</code></td>
Expand Down Expand Up @@ -102,7 +102,7 @@ To upload your custom module to the [Viam registry](https://app.viam.com/registr
```

{{% alert title="Important" color="note" %}}
If you are publishing a public module (`visibility: "public"`), the [namespace of your model](/extend/modular-resources/key-concepts/#naming-your-model) must match the [namespace of your organization](/manage/fleet/organizations/#create-a-namespace-for-your-organization).
If you are publishing a public module (`"visibility": "public"`), the [namespace of your model](/extend/modular-resources/key-concepts/#naming-your-model) must match the [namespace of your organization](/manage/fleet/organizations/#create-a-namespace-for-your-organization).
In the example above, the model namespace is set to `acme` to match the owning organization's namespace.
If the two namespaces do not match, the command will return an error.
{{% /alert %}}
Expand Down
6 changes: 3 additions & 3 deletions docs/manage/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ All of the `module` commands accept either the `--org-id` or `--public-namespace
* Use the `--public-namespace` argument to supply the [namespace](/manage/fleet/organizations/#create-a-namespace-for-your-organization) of your organization, suitable for uploading your module to the Viam registry and sharing with other users.
* Use the `--org-id` to provide your organization ID instead, suitable for sharing your module privately within your organization.

You may use either argument for the `viam module create` command, but must use `--public-namespace` for the `update` and `upload` commands when uploading as a public module (`visibility: "public"`) to the Viam registry.
You may use either argument for the `viam module create` command, but must use `--public-namespace` for the `update` and `upload` commands when uploading as a public module (`"visibility": "public"`) to the Viam registry.

##### Using the `--platform` argument

Expand Down Expand Up @@ -420,7 +420,7 @@ The `meta.json` file includes the following configuration options:
<td><code>visibility</code></td>
<td>string</td>
<td><strong>Required</strong></td>
<td>Whether the module is visible to all Viam users (<code>public</code>), or accessible only to members of your <a href="/manage/fleet/organizations/">organization</a> (<code>private</code>). You can change this setting later using the <code>viam module update</code> command.<br><br>Default: <code>private</code></td>
<td>Whether the module is accessible only to members of your <a href="/manage/fleet/organizations/">organization</a> (<code>private</code>), or visible to all Viam users (<code>public</code>). You can change this setting later using the <code>viam module update</code> command.<br><br>Default: <code>private</code></td>
</tr>
<tr>
<td><code>url</code></td>
Expand Down Expand Up @@ -467,7 +467,7 @@ For example, the following represents the configuration of an example `my-module
```

{{% alert title="Important" color="note" %}}
If you are publishing a public module (`visibility: "public"`), the [namespace of your model](/extend/modular-resources/key-concepts/#naming-your-model) must match the [namespace of your organization](/manage/fleet/organizations/#create-a-namespace-for-your-organization).
If you are publishing a public module (`"visibility": "public"`), the [namespace of your model](/extend/modular-resources/key-concepts/#naming-your-model) must match the [namespace of your organization](/manage/fleet/organizations/#create-a-namespace-for-your-organization).
In the example above, the model namespace is set to `acme` to match the owning organization's namespace.
If the two namespaces do not match, the command will return an error.
{{% /alert %}}
Expand Down
15 changes: 7 additions & 8 deletions docs/services/base-rc/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Base Remote Control Service"
linkTitle: "Remote Control"
linkTitle: "Base Remote Control"
weight: 60
type: "docs"
description: "The base remote control service allows you to remotely control a base with an input controller like a gamepad."
Expand Down Expand Up @@ -33,12 +33,11 @@ You must configure a [base](/components/base/) with a [movement sensor](/compone
{{% tab name="Config Builder" %}}

Navigate to the **Config** tab of your robot's page in [the Viam app](https://app.viam.com).
Click on the **Services** subtab and navigate to the **Create service** menu.
Select the type `Navigation` and enter a name for your service.
Click the **Services** subtab, then click **Create service** in the lower-left corner.
Select the type `Base Remote Control`.
Enter a name for your service, then click **Create**.

Click **Create service**:

![An example configuration for a Base Remote Control service in the Viam app Config Builder.](/services/base-rc/base-rc-ui-config.png)
![An example configuration for a base remote control service in the Viam app Config Builder.](/services/base-rc/base-rc-ui-config.png)

{{% /tab %}}
{{% tab name="JSON Template" %}}
Expand Down Expand Up @@ -72,8 +71,8 @@ Click **Create service**:
{{% /tab %}}
{{< /tabs >}}

Next, add the JSON `"attributes"` you want the service to have.
The following attributes are available for Base Remote Control services:
Edit and fill in the attributes as applicable.
The following attributes are available for base remote control services:

| Name | Type | Inclusion | Description |
| ---- | ---- | --------- | ----------- |
Expand Down
6 changes: 3 additions & 3 deletions docs/services/data/configure-data-capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ tags: ["data management", "cloud", "sync"]

To capture data from one or more robots, you must first add the [data management service](../):

1. On your robot's **Config** page, navigate to the **Services** tab.
2. At the bottom of the page you can create a service.
1. From your robot's **Config** tab, navigate to the **Services** subtab.
2. Click **Create service** in the lower-left corner of the page.
Choose `Data Management` as the type and specify a name for your data management service, for example `data-manager`.
3. Then click `Create Service`.
3. Click **Create**.
4. On the panel that appears, you can manage the capturing and syncing functions individually and specify the interval and directory.
If the capture frequency or the directory is not specified, the data management service captures data at the default frequency every 0.1 minutes (after every 6 second interval) in the default `~/.viam/capture` directory.

Expand Down
16 changes: 4 additions & 12 deletions docs/services/ml/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,10 @@ The ML Model service allows you to deploy machine learning models to your robots
{{< tabs >}}
{{% tab name="Builder" %}}

Navigate to the [robot page on the Viam app](https://app.viam.com/robots).
Click on the robot you wish to add the ML model service to.
Select the **Config** tab, and click on **Services**.

Scroll to the **Create Service** section.

1. Select `mlmodel` as the **Type**.
2. Enter a name as the **Name**.
3. Select `tflite_cpu` as the **Model**.
4. Click **Create Service**.

![Create a machine learning models service](/services/ml-models-service.png)
Navigate to your robot's **Config** tab on the [Viam app](https://app.viam.com/robots).
Click the **Services** subtab and click **Create service** in the lower-left corner.
Select the `ML Model` type, then select the `TFLite CPU` model.
Enter a name for your service and click **Create**.

You can choose to configure your service with an existing model on the robot or deploy a model onto your robot:

Expand Down
14 changes: 14 additions & 0 deletions docs/services/motion/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,13 @@ Translation in obstacles is not supported by the [navigation service](/services/
- `movement_sensor_name` [(ResourceName)](https://python.viam.dev/autoapi/viam/gen/common/v1/common_pb2/index.html#viam.gen.common.v1.common_pb2.ResourceName): The `ResourceName` of the [movement sensor](/components/movement-sensor/) that you want to use to check the robot's location.
- `obstacles` [(Optional[Sequence[GeoObstacle]])](https://python.viam.dev/autoapi/viam/gen/common/v1/common_pb2/index.html#viam.gen.common.v1.common_pb2.GeoObstacle): Obstacles to consider when planning the motion of the component, with each represented as a `GeoObstacle`. <ul><li> Default: `None` </li></ul>
- `heading` [(Optional[float])](https://docs.python.org/library/typing.html#typing.Optional): The compass heading, in degrees, that the robot's movement sensor should report at the `destination` point. <ul><li> Range: `[0-360)` </li><li>Default: `None`</li></ul>
- `configuration` [(Optional[MotionConfiguration])](https://python.viam.dev/autoapi/viam/proto/service/motion/index.html#viam.proto.service.motion.MotionConfiguration): The configuration you want to set across this robot for this motion service. This parameter and each of its fields are optional.
- `vision_services` [([ResourceName])](https://python.viam.dev/autoapi/viam/gen/common/v1/common_pb2/index.html#viam.gen.common.v1.common_pb2.ResourceName): The name you configured for each vision service you want to use while moving this resource.
- `position_polling_frequency_hz` [(float)](https://docs.python.org/3/library/functions.html#float): The frequency in hz to poll the position of the robot.
- `obstacle_polling_frequency_hz` [(float)](https://docs.python.org/3/library/functions.html#float): The frequency in hz to poll the vision service for new obstacles.
- `plan_deviation_m` [(float)](https://docs.python.org/3/library/functions.html#float): The distance in meters that the machine can deviate from the motion plan.
- `linear_m_per_sec` [(float)](https://docs.python.org/3/library/functions.html#float): Linear velocity this machine should target when moving.
- `angular_degs_per_sec` [(float)](https://docs.python.org/3/library/functions.html#float): Angular velocity this machine should target when turning.
- `extra` [(Optional\[Dict\[str, Any\]\])](https://docs.python.org/library/typing.html#typing.Optional): Extra options to pass to the underlying RPC call.
- `timeout` [(Optional\[float\])](https://docs.python.org/library/typing.html#typing.Optional): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call.

Expand Down Expand Up @@ -470,6 +477,13 @@ success = await motion.move_on_globe(component_name=my_base_resource_name, desti
- `heading` [(float64)](https://pkg.go.dev/builtin#float64): The compass heading, in degrees, that the robot's movement sensor should report at the `destination` point. <ul><li> Range: `[0-360)` </li><li>Default: `None`</li></ul>
- `movementSensorName` [(resource.Name)](https://pkg.go.dev/go.viam.com/rdk/resource#Name): The `resource.Name` of the [movement sensor](/components/movement-sensor/) that you want to use to check the robot's location.
- `obstacles` [([]*spatialmath.GeoObstacle)](https://pkg.go.dev/go.viam.com/rdk/spatialmath#GeoObstacle): Obstacles to consider when planning the motion of the component, with each represented as a `GeoObstacle`. <ul><li> Default: `None` </li></ul>
- `motionConfig` [(*MotionConfiguration)](https://pkg.go.dev/go.viam.com/rdk/services/motion#MotionConfiguration): The configuration you want to set across this robot for this motion service. This parameter and each of its fields are optional.
- `VisionSvc` [([]resource.Name)](https://pkg.go.dev/go.viam.com/rdk/resource#Name): The name you configured for each vision service you want to use while moving this resource.
- `PositionPollingFreqHz` [(float64)](https://pkg.go.dev/builtin#float64): The frequency in hz to poll the position of the robot.
- `ObstaclePollingFreqHz` [(float64)](https://pkg.go.dev/builtin#float64): The frequency in hz to poll the vision service for new obstacles.
- `PlanDeviationM` [(float64)](https://pkg.go.dev/builtin#float64): The distance in meters that the machine can deviate from the motion plan.
- `LinearMPerSec` [(float64)](https://pkg.go.dev/builtin#float64): Linear velocity this machine should target when moving.
- `AngularDegsPerSec` [(float64)](https://pkg.go.dev/builtin#float64): Angular velocity this machine should target when turning.
- `extra` [(map\[string\]interface{})](https://go.dev/blog/maps): Extra options to pass to the underlying RPC call.

**Returns:**
Expand Down
9 changes: 4 additions & 5 deletions docs/services/navigation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ Make sure the [movement sensor](/components/movement-sensor/) you use supports [
{{% tab name="Config Builder" %}}

Navigate to the **Config** tab of your robot's page in [the Viam app](https://app.viam.com).
Click on the **Services** subtab and navigate to the **Create service** menu.
Select the type `navigation` and enter a name for your service.

Click **Create service**:
Click the **Services** subtab, then click **Create service** in the lower-left corner.
Select the type `Navigation`.
Enter a name for your service, then click **Create**.

![An example configuration for a Navigation service in the Viam app Config Builder.](/services/navigation/navigation-ui-config.png)

Expand Down Expand Up @@ -106,7 +105,7 @@ Click **Create service**:
{{% /tab %}}
{{< /tabs >}}

Next, add the JSON `"attributes"` you want the service to have.
Edit and fill in the attributes as applicable.
The following attributes are available for `Navigation` services:

| Name | Type | Inclusion | Description |
Expand Down
18 changes: 5 additions & 13 deletions docs/services/vision/classification.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,15 @@ The types of classifiers supported are:

## Configure an `mlmodel` classifier

To create a `mlmodel` classifier, you need an [ML model service with a suitable model](../../ml/).

Navigate to the [robot page on the Viam app](https://app.viam.com/robots).
Click on the robot you wish to add the vision service to.
Select the **Config** tab, and click on **Services**.

Scroll to the **Create Service** section.
To create an `mlmodel` classifier, you need an [ML model service with a suitable model](../../ml/).

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

1. Select `vision` as the **Type**.
2. Enter a name as the **Name**.
3. Select **ML Model** as the **Model**.
4. Click **Create Service**.

![Create vision service for mlmodel](/services/vision/mlmodel.png)
Navigate to your robot's **Config** tab on the [Viam app](https://app.viam.com/robots).
Click the **Services** subtab and click **Create service** in the lower-left corner.
Select the `Vision` type, then select the `ML Model` model.
Enter a name for your service and click **Create**.

In your vision service's panel, fill in the **Attributes** field.

Expand Down
33 changes: 8 additions & 25 deletions docs/services/vision/detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,10 @@ If the color is not reliably detected, increase the `hue_tolerance_pct`.
{{< tabs >}}
{{% tab name="Builder" %}}

Navigate to the [robot page on the Viam app](https://app.viam.com/robots).
Click on the robot you wish to add the vision service to.
Select the **Config** tab, and click on **Services**.

Scroll to the **Create Service** section.
To create a [vision service](/services/vision/):

1. Select `vision` as the **Type**.
2. Enter a name as the **Name**.
3. Select **Color Detector** as the **Model**.
4. Click **Create Service**.

![Create vision service for color detector](/services/vision/color_detector.png)
Navigate to your robot's **Config** tab on the [Viam app](https://app.viam.com/robots).
Click the **Services** subtab and click **Create service** in the lower-left corner.
Select the `ML Model` type, then select the `Color Detector` model.
Enter a name for your service and click **Create**.

In your vision service's panel, select the color your vision service will be detecting, as well as a hue tolerance and a segment size (in pixels):

Expand Down Expand Up @@ -153,21 +144,13 @@ Proceed to [test your detector](#test-your-detector).
A machine learning detector that draws bounding boxes according to the specified tensorflow-lite model file available on the robot’s hard drive.
To create a `mlmodel` classifier, you need an [ML model service with a suitable model](../../ml/).

Navigate to the [robot page on the Viam app](https://app.viam.com/robots).
Click on the robot you wish to add the vision service to.
Select the **Config** tab, and click on **Services**.

Scroll to the **Create Service** section.

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

1. Select `vision` as the **Type**.
2. Enter a name as the **Name**.
3. Select **ML Model** as the **Model**.
4. Click **Create Service**.

![Create vision service for mlmodel](/services/vision/mlmodel.png)
Navigate to your robot's **Config** tab on the [Viam app](https://app.viam.com/robots).
Click the **Services** subtab and click **Create service** in the lower-left corner.
Select the `Vision` type, then select the `ML Model` model.
Enter a name for your service and click **Create**.

In your vision service's panel, fill in the **Attributes** field.

Expand Down
Loading

0 comments on commit 434ad3f

Please sign in to comment.