Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCS-1107: Day-of MR tweaks #1812

Merged
Merged
Show file tree
Hide file tree
Changes from 7 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
6 changes: 4 additions & 2 deletions docs/appendix/glossary/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
title: Module
id: module
full_link:
short_description: Modular resources are a way to add resource types or models that are not built into Viam.
short_description: A module provides one or more modular resources, which add resource types or models that are not built into Viam.
aka:
---

Modular resources are a way to add resource types or models that are not built into Viam.
A module provides one or more [modular resources](/extend/modular-resources/), which add resource types (such as [components](/components/) and [services](/services/)) or {{< glossary_tooltip term_id="model" text="models" >}} that are not built into Viam.
andf-viam marked this conversation as resolved.
Show resolved Hide resolved

You can extend the capabilities of Viam on your robot by [creating your own module](/extend/modular-resources/create/) or [adding an existing module from the Viam registry](/extend/modular-resources/configure/).

For more information see the [modular resource documentation](/extend/modular-resources/).
4 changes: 2 additions & 2 deletions docs/appendix/glossary/resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ aka:

Resources are individual, addressable elements of a robot.

{{< glossary_tooltip term_id="part" text="Parts" >}} operate multiple types of resources:
{{< glossary_tooltip term_id="part" text="Parts" >}} can operate multiple types of resources:

- physical {{< glossary_tooltip term_id="component" text="components" >}}
- software {{< glossary_tooltip term_id="service" text="services" >}}
- {{< glossary_tooltip term_id="module" text="modules" >}}
- [modular resources](/extend/modular-resources/) provided by {{< glossary_tooltip term_id="module" text="modules" >}}
- {{< glossary_tooltip term_id="process" text="processes" >}}

Each part has local resources and can also have resources from another {{< glossary_tooltip term_id="remote" text="remote">}} robot part.
Expand Down
4 changes: 2 additions & 2 deletions docs/extend/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Viam's [Robot Development Kit (RDK)](/internals/rdk/) provides built-in support
- Various types of hardware [components](/components/).
- High-level functionality exposed as [services](/services/).

However, if you want to work with a new hardware component that is not already supported by Viam, or want to introduce a new software service or service model to support additional functionality on your robot, you can extend Viam by adding a {{< glossary_tooltip term_id="module" text="modular resource" >}} to your robot.
However, if you want to work with a new hardware component that is not already supported by Viam, or want to introduce a new software service or service model to support additional functionality on your robot, you can extend Viam by adding a [modular resource](/extend/modular-resources/) to your robot.

Click on the cards below for instructions on implementing modular resources through {{< glossary_tooltip term_id="module" text="modules" >}} or {{< glossary_tooltip term_id="remote" text="remotes" >}}:

Expand All @@ -27,7 +27,7 @@ Click on the cards below for instructions on implementing modular resources thro

{{% alert title="Tip" color="tip" %}}

{{< glossary_tooltip term_id="module" text="Modular resources" >}} are the preferred method of creating custom resource implementations with the [Python and Go SDKs](/program/).
[Modular resources](/extend/modular-resources/) provided by custom {{< glossary_tooltip term_id="module" text="modules" >}} are the preferred method of creating custom resource implementations.

[Adding a custom component as a remote](/extend/custom-components-remotes/) is recommended if you are hosting `viam-server` on a non-Linux system or have another issue with compilation.

Expand Down
4 changes: 2 additions & 2 deletions docs/extend/modular-resources/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ For example, you can:

- **Implement fully custom logic:** If your robot runs specialty or proprietary logic, and you want to use Viam to manage and control that logic, such as when managing a software development lifecyle, you can implement your own custom logic by wrapping the generic API.

These custom implementations are called {{< glossary_tooltip term_id="module" text="modular resources" >}}, and are made available for use on a robot through [modules](/extend/modular-resources/key-concepts/#modules).
These custom implementations are called *modular resources*, and are made available for use on a robot through {{< glossary_tooltip term_id="module" text="modules" >}}.
A module can provide one or more modular resources, and can be added to your robot from the Viam registry.

## The Viam Registry

The [Viam registry](https://app.viam.com/registry) allows hardware and software engineers to collaborate on their robotics projects by writing and sharing custom modules with each other.
You can add a module from the Viam registry directly from your robot's **Configuration** tab in [the Viam app](https://app.viam.com/), using the **+ Create component** button.

The code behind any modular resource can be packaged as a [module](/extend/modular-resources/key-concepts/#modules) and uploaded to the Viam registry.
The code behind any modular resource can be packaged as a {{< glossary_tooltip term_id="module" text="module" >}} and uploaded to the Viam registry.
Once the module has been uploaded to the Registry, you can [deploy the module](/extend/modular-resources/configure/) to any robot in your organization from [the Viam app](https://app.viam.com/).

### Uploading to Viam Registry
Expand Down
6 changes: 6 additions & 0 deletions docs/extend/modular-resources/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ To add a modular [component](/components/) from the Viam registry to your robot:

{{<imgproc src="extend/modular-resources/configure/add-component-screen.png" resize="400x" declaredimensions=true alt="The add a component modal showing the intel realsense module pane, with the 'Add module' button shown">}}

Be sure the modular component you select supports the [platform](/manage/cli/#using-the---platform-argument) you intend to use it with, such as `linux arm64`.
You can see which platforms the module supports at bottom of the module information screen before you add it.

When you add a module from the Viam registry, the custom modular component it provides appears under the **Components** subtab like any other component.
You can also find [the module itself](#configure-a-module-from-the-viam-registry) listed as **Deployed** under the **Modules** subtab.

Expand All @@ -68,6 +71,9 @@ To add a modular [service](/services/) from the Viam registry to your robot:

{{<imgproc src="extend/modular-resources/configure/add-service-screen.png" resize="400x" declaredimensions=true alt="The add a component modal showing the mlmodelservice triton module pane, with the 'Add module' button shown">}}

Be sure the modular service you select supports the [platform](/manage/cli/#using-the---platform-argument) you intend to use it with, such as `linux arm64`.
You can see which platforms the module supports at bottom of the module information screen before you add it.

When you add a module from the Viam registry, the custom modular service it provides appears under the **Services** subtab like any other service.
You can also find [the module itself](#configure-a-module-from-the-viam-registry) listed as **Deployed** under the **Modules** subtab.

Expand Down
7 changes: 4 additions & 3 deletions docs/extend/modular-resources/create/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ description: "Use the Viam module system to implement modular resources that can
no_list: true
---

You can extend Viam by creating a custom [module](/extend/modular-resources/key-concepts/#modules) that provides one or more modular {{< glossary_tooltip term_id="resource" text="resources" >}} ([components](/components/) and [services](/services/)), and can be added to any robot running on Viam.
You can extend Viam by creating a custom {{< glossary_tooltip term_id="module" text="module" >}} that provides one or more modular {{< glossary_tooltip term_id="resource" text="resources" >}} ([components](/components/) and [services](/services/)) or {{< glossary_tooltip term_id="model" text="models" >}}, and can be added to any robot running on Viam.

A common use case for modular resources is to create a new model that implements an existing Viam API.
A common use case for modular resources is to create a new [model](/extend/modular-resources/key-concepts/#models) that implements an existing Viam [API](/program/apis/).

Once you have created your modular resource, you can use the [Viam CLI](/manage/cli/) to [upload your modular resource](/extend/modular-resources/upload/) to the Viam registry, to share it with other Viam users or just to other users in your organization.
Once you have created your modular resource, you can use the [Viam CLI](/manage/cli/) to [upload your modular resource](/extend/modular-resources/upload/) to the [Viam registry](https://app.viam.com/registry), to share it with other Viam users or just to other users in your organization.
You can also configure [automatic upload of new versions of your module](/extend/modular-resources/upload/#update-an-existing-module-using-a-github-action) as part of a continuous integration (CI) workflow, using a GitHub Action.
andf-viam marked this conversation as resolved.
Show resolved Hide resolved

Alternatively, you can add your module locally to your robot without uploading to the Viam registry.

Expand Down
10 changes: 5 additions & 5 deletions docs/extend/modular-resources/key-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ A modular resource runs in the module process. This differs from built-in resour

## Models

A *model* describes a specific implementation of a [resource](#resources) that implements (speaks) its API.
Models allow you to control different instances of resource with a consistent interface, even if the underlying implementation differs.
A *model* describes a specific implementation of a [resource](#resources) that implements (speaks) its [API](/program/apis/).
Models allow you to control different instances of a resource with a consistent interface, even if the underlying implementation differs.

For example, some DC motors communicate using [GPIO](/components/board/), while other DC motors use serial protocols like the [SPI bus](/components/board/#spis).
Regardless, you can power any motor model that implements the `rdk:component:motor` API with the `SetPower()` method.
Expand All @@ -47,7 +47,7 @@ See [Naming your model](/extend/modular-resources/key-concepts/#naming-your-mode
Models are either:

- Built into the RDK, and included when you [install `viam-server`](/installation/) or when you use one of the [Viam SDKs](/program/apis/).
- Provided in custom modules available for download from the [Viam registry](https://app.viam.com/registry), and are written by either Viam or community users.
- Provided in [custom modules](#modules) available for download from the [Viam registry](https://app.viam.com/registry), and are written by either Viam or community users.

### Built-in models

Expand All @@ -66,13 +66,13 @@ These models run outside `viam-server` as a separate process.

#### Valid APIs to implement in your model

When implementing a custom model of an existing [component](/components/), valid [APIs](/program/apis/) are always:
When implementing a custom [model](#models) of an existing [component](/components/), valid [APIs](/program/apis/) are always:

- `namespace`: `rdk`
- `type`: `component`
- `subtype`: any one of [these component proto files](https://github.com/viamrobotics/api/tree/main/proto/viam/component).

When implementing a custom model of an existing [service](/services/), valid [APIs](/program/apis/) are always
When implementing a custom [model](#models) of an existing [service](/services/), valid [APIs](/program/apis/) are always

- `namespace`: `rdk`
- `type`: `service`
Expand Down
9 changes: 5 additions & 4 deletions docs/manage/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,11 @@ viam logout

### module

The `module` command allows to you to manage [custom modules](/extend/modular-resources/).
The `module` command allows to you to manage custom {{< glossary_tooltip term_id="module" text="modules" >}}
This includes:

* Creating a new custom modular resource
* Updating an existing module with new changes
* Uploading a new module to the Viam registry
* Creating a new custom {{< glossary_tooltip term_id="resource" text="modular resource" >}}
* Uploading a new module to the [Viam registry](https://app.viam.com/registry)
* Updating an existing module in the Viam registry

```sh {class="command-line" data-prompt="$"}
Expand Down Expand Up @@ -480,6 +479,8 @@ If the two namespaces do not match, the command will return an error.

See [Upload a custom module](/extend/modular-resources/upload/#upload-a-custom-module) and [Update an existing module](/extend/modular-resources/upload/#update-an-existing-module) for a detailed walkthrough of the `viam module` commands.

See [Modular resources](/extend/modular-resources/) for a conceptual overview of modules and the modular resource system at Viam.

### organization

The *organization* command allows you to create a new organization API key.
Expand Down
2 changes: 1 addition & 1 deletion docs/manage/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ The **Config** tab has subtabs for each section of your robot's config:

- [Components](#components): Components are the hardware of your robot.
- [Services](#services): Services are the software that runs on your robot.
- [Modules](#modules): Modular resources are a way to add resource types or models that are not built into Viam.
- [Modules](#modules): {{< glossary_tooltip term_id="module" text="Modules" >}} provide [modular resources](/extend/modular-resources/), which are a way to add resource types or models that are not built into Viam.
- [Remotes](#remotes): Remotes are a way to connect two separate robots so one can access the resources of the other.
- [Processes](#processes): Processes automatically run specified scripts when the robot boots.
- [Fragments](#fragments): Fragments are a way of sharing and managing identical configuration files (or parts of config files) across multiple robots.
Expand Down
Loading