Skip to content

Commit

Permalink
Update and move key concept entries
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel committed Nov 4, 2023
1 parent 4341ba5 commit 1b0e106
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 40 deletions.
2 changes: 2 additions & 0 deletions docs/appendix/glossary/component.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ aka:

A resource that represents a physical component in a robot which a computer controls; for example, a servo, a camera, or an arm.

Each component is typed by a proto API, such as the [component proto definitions](https://github.com/viamrobotics/api/tree/main/proto/viam/component).

For more information, see [Components](/components/).
7 changes: 5 additions & 2 deletions docs/appendix/glossary/modular-resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
title: Modular Resource
id: modular-resource
full_link: https://docs.viam.com/modular-resources/
short_description: A modular resource is a custom model of a component or service that implements the same API methods.
short_description: A modular resource is a custom model of a component or service that implements the standadized API methods for that resource.
aka:
---

A modular resource is a custom {{< glossary_tooltip term_id="model" text="model" >}} of a {{< glossary_tooltip term_id="component" text="component" >}} or {{< glossary_tooltip term_id="service" text="service" >}} that implements the same [API methods](https://docs.viam.com/program/apis/).
A modular resource is a custom {{< glossary_tooltip term_id="model" text="model" >}} of a {{< glossary_tooltip term_id="component" text="component" >}} or {{< glossary_tooltip term_id="service" text="service" >}} that implements the standardized [API methods](https://docs.viam.com/program/apis/) for that {{< glossary_tooltip term_id="resource" text="resource" >}}.
Modular resources are provided by {{< glossary_tooltip term_id="module" text="modules" >}}, and not built into the RDK.
A modular resource runs in the module process.
This differs from built-in resources, which run as part of `viam-server`.

For more information see the [Modular Resource Documentation](/modular-resources/).
6 changes: 4 additions & 2 deletions docs/appendix/glossary/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ short_description: A module provides one or more modular resources, which add re
aka:
---

A module provides one or more {{< glossary_tooltip term_id="modular-resource" text="modular resources" >}}, which add resource types ([components](/components/) and [services](/services/)) or {{< glossary_tooltip term_id="model" text="models" >}} that are not built into Viam.
A _module_ provides one or more {{< glossary_tooltip term_id="modular-resource" text="modular resources" >}}, which add {{< glossary_tooltip term_id="resource" text="resource" >}} {{< glossary_tooltip term_id="type" text="types" >}} or {{< glossary_tooltip term_id="model" text="models" >}} that are not built into Viam.
Modules run alongside `viam-server` as separate processs, communicating with `viam-server` over UNIX sockets.
When the module initializes, it registers those pairs on your robot, making the functionality defined by that pair available for use.

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

For more information see the [modular resource documentation](/modular-resources/).
2 changes: 2 additions & 0 deletions docs/appendix/glossary/resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ Resources are individual, addressable elements of a robot.

Each part has local resources and can also have resources from another {{< glossary_tooltip term_id="remote" text="remote">}} robot part.
The capabilities of each resource are exposed through the part’s API.

Each resource on your robot implements either one of the [existing Viam APIs](/modular-resources/create/#valid-apis-to-implement-in-your-model), or a [custom interface](/modular-resources/advanced/#new-api-subtypes).
2 changes: 2 additions & 0 deletions docs/appendix/glossary/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ aka:

Services are built-in software packages for complex capabilities such as SLAM, computer vision, motion planning, and data collection.

Each service is typed by a proto API, such as the [service proto definitions](https://github.com/viamrobotics/api/tree/main/proto/viam/service).

For more information, see [Services](/services/).
4 changes: 2 additions & 2 deletions docs/modular-resources/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ You configure and manage modular resources the same way as built-in resources an

## The Viam Registry

The [Viam registry](https://app.viam.com/registry) is the central place where you can browse modular resources that add capabilities to your smart machine beyond what is built-in to `viam-server`.
The [Viam registry](https://app.viam.com/registry) is the central place where you can browse {{< glossary_tooltip term_id="module" text="modules" >}} that add capabilities to your smart machine beyond what is built-in to `viam-server`.

You can search the available modular resources from the Viam Registry here:
You can search the available {{< glossary_tooltip term_id="modular-resources" text="modular resoruces" >}} from the Viam Registry here:

<div id="searchbox"></div>
<p>
Expand Down
9 changes: 6 additions & 3 deletions docs/modular-resources/create/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ aliases:
no_list: true
---

If you cannot find existing modular resources from the [Viam Registry](/modular-resources/#theviamregistry) that support your hardware or software, you can add new {{< glossary_tooltip term_id="module" text="modules" >}}.
Each module contains one or more {{< glossary_tooltip term_id="modular-resource" text="modular resources" >}} implementing.
If you cannot find existing modular resources from the [Viam Registry](/modular-resources/#the-viam-registry) that support your hardware or software, you can add new {{< glossary_tooltip term_id="module" text="modules" >}}.

A _module_ provides one or more {{< glossary_tooltip term_id="modular-resource" text="modular resources" >}}, which add {{< glossary_tooltip term_id="resource" text="resource" >}} {{< glossary_tooltip term_id="type" text="types" >}} or {{< glossary_tooltip term_id="model" text="models" >}} that are not built into Viam.
Modules run alongside `viam-server` as separate processs, communicating with `viam-server` over UNIX sockets.
When the module initializes, it registers those pairs on your robot, making the functionality defined by that pair available for use.

In most cases, the {{< glossary_tooltip term_id="modular-resource" text="modular resources" >}} you create should be a new [model](/modular-resources/key-concepts/#models) that implements an existing Viam [API](/program/apis/).
For example, if you have a custom base, you can create a new base model that implements the `rdk:component:base` API.
Expand Down Expand Up @@ -503,7 +506,7 @@ Additional examples are available in the [in the RDK GitHub repository](https://
Name your model according to the namespace of the built-in API you are implementing using all lowercase letters for optimal performance with Viam's SDKs.
For example, `mybase` or `my-cool-sensor`.

For more information see [Naming your model](/modular-resources/upload/#naming-your-model-namespacerepo-namename).
For more information see [Naming your model](/modular-resources/key-concepts/#naming-your-model-namespacerepo-namename).

{{% /alert %}}

Expand Down
33 changes: 2 additions & 31 deletions docs/modular-resources/key-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,9 @@ aliases:
- "/program/extend/modular-resources/key-concepts/"
---

Viam's [Robot Development Kit (RDK)](/internals/rdk/) provides built-in support for a variety of {{< glossary_tooltip term_id="resource" text="resources" >}}:

- 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 smart machine, you can extend Viam by adding a _{{< glossary_tooltip term_id="modular-resource" text="modular resource" >}}_ to your smart machine.

Modular resources are defined in _modules_, which are easy to create and add to your robot.
A module can provide one or more modular resource models, and can be added to any smart machine running on Viam.

## Modules

A _module_ provides one or more [_modular resources_](#resources), and is a flexible way to extend the functionality of your Viam robot.
Modules run alongside `viam-server` as a separate process, communicating with `viam-server` over a UNIX socket.
A module provides definitions for one or more pairs of [APIs](#valid-apis-to-implement-in-your-model) and [models](#models).

When the module initializes, it registers those pairs on your robot, making the functionality defined by that pair available for use.

## Resources

A resource is a [component](/components/) or [service](/services/).
Each component or service is typed by a proto API, such as the [component proto definitions](https://github.com/viamrobotics/api/tree/main/proto/viam/component).

Any resource on your robot needs to implement either one of the [existing Viam APIs](#valid-apis-to-implement-in-your-model), or a [custom interface](/modular-resources/advanced/#new-api-subtypes).

A _modular resource_ is a resource that is provided by a [module](#modules), and not built into the RDK.
A modular resource runs in the module process.
This differs from built-in resources, which run as part of `viam-server`.

## Models

A _model_ describes a specific implementation of a [resource](#resources) that implements (speaks) its [API](/program/apis/).
A _model_ describes a specific implementation of a {{< glossary_tooltip term_id="resource" text="resource" >}} that implements (speaks) its [API](/program/apis/).
Models allow you to control hardware or software of a similar category, such as motors, with a consistent set of methods as an 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).
Expand All @@ -63,7 +34,7 @@ See [Naming your model](#naming-your-model-namespacerepo-namename) for more info
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](#modules) available for download from the [Viam registry](https://app.viam.com/registry), and are written by either Viam or community users.
- Provided in {{< glossary_tooltip term_id="modules" text="custom modules" >}} available for download from the [Viam registry](https://app.viam.com/registry), and are written by either Viam or community users.
Custom modules can also be [local](/modular-resources/configure/#local-modules).

### Built-in models
Expand Down

0 comments on commit 1b0e106

Please sign in to comment.