Skip to content

Commit

Permalink
DOCS-1067: Add Viam Registry landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
andf-viam committed Sep 7, 2023
1 parent d06ef99 commit a646c11
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 26 deletions.
12 changes: 5 additions & 7 deletions docs/extend/_index.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
---
title: "Extend Viam with custom resources"
title: "Extend Viam with modular resources"
linkTitle: "Extend Viam"
weight: 63
simple_list: true
no_list: true
type: docs
tags: ["server", "rdk", "extending viam", "modular resources", "components", "services"]
description: "Use the SDKs to extend Viam with custom components and services."
description: "Extend Viam with modular resources from the Viam Registry."
aliases:
- "/program/extend/"
---

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 and models of hardware [components](/components/).
- Various types of hardware [components](/components/).
- High-level functionality exposed as [services](/services/).

However, you may want to use a hardware component to build your robot that is not built-in to the RDK.
Alternatively, you might want to add new functionality to an existing model of component or create a custom service for your robot to use.
You can extend Viam in these and other ways by creating and using custom resources.
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.

Click on the cards below for instructions on implementing custom resources through {{< glossary_tooltip term_id="module" text="modules" >}} or {{< glossary_tooltip term_id="remote" text="remotes" >}}:
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" >}}:

{{< cards >}}
{{% card link="/extend/modular-resources" %}}
Expand Down
61 changes: 50 additions & 11 deletions docs/extend/modular-resources/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,70 @@ linkTitle: "Modular Resources"
weight: 10
type: "docs"
tags: ["server", "rdk", "extending viam", "modular resources", "components", "services"]
description: "Use the Viam module system to implement custom resources that can be included in any Viam-powered robot."
description: "Use the Viam module system to implement modular resources that can be included in any Viam-powered robot."
no_list: true
aliases:
- "/program/extend/modular-resources/"
---

The Viam module system allows you to integrate custom {{< glossary_tooltip term_id="resource" text="resources" >}} into any robot running on Viam.
`viam-server` [manages](/extend/modular-resources/key-concepts/) modular resources and built-in resources in the same way.
At Viam, a robot is configured with one or more {{< glossary_tooltip term_id="resource" text="resources" >}} ([components](/components/) and [services](/services/)) which are each defined by a [public API](/extend/modular-resources/key-concepts/#valid-apis-to-implement-in-your-model).
While Viam offers a number of built-in implementations against these APIs, such as the [wheeled base](components/base/wheeled/), you may also write your own implementations in order to extend the capabilities of your robot.

Modular resources can be:
For example, you can:

1. New models of built-in [components](/components/) or [services](/services/) that implement the built-in resource {{< glossary_tooltip term_id="subtype" text="subtype" >}}'s API through Viam's [client SDKs](/program/apis/).
2. Brand new types of resources that define their own API in [protocol buffers](https://developers.google.com/protocol-buffers).
- ***Implement a custom component:** If your robot has specialty hardware, such as an unsupported [motor](/components/motor/), and you want to control it using Viam, you can write a driver to support your hardware by implementing the corresponding component API.

- **Implement a custom service:** If your robot makes use of a specialty algorithm or data model when working with services such as [SLAM](/services/slam/), [Vision](/services/vision/), or [Motion planning](/services/motion/), you can implement your own algorithm or model against the corresponding service API.

- **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 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).
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.
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

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/)).

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/registry/viam/odrive) for an example.
Public modules also display the number of times a module has been deployed to a robot.

When you make changes to your module, you can [uploaded the newer version](/extend/modular-resources/upload/#update-an-existing-module) with a new version number, and the Viam Registry will track each version that you upload.

### Deploying to a Robot

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/).

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.

## Get Started

To get started adding custom resources to your robot, learn the [key concepts](/extend/modular-resources/key-concepts/) behind Viam's resource APIs that make the module system possible.
To get started working with modular resources:

- Learn the [key concepts](/extend/modular-resources/key-concepts/) behind Viam's modular resources that make the module system possible.

- [Create your own module](/extend/modular-resources/create/) implementing at least one modular resource.

- [Upload your module to the Viam Registry](/extend/modular-resources/upload/) to share with the community, or just to your own organization.

- To create your own module and modular resources, follow [these instructions](/extend/modular-resources/create/).
- Browse [the Viam Registry](https://app.viam.com/registry) to see modules uploaded by other users.

- To download modules and add modular resources that other users have built to your robot, follow one of Viam's [module setup guides](/extend/modular-resources/examples/).
- [Deploy a module](/extend/modular-resources/configure/) to your robot from the Registry.

- To configure a module and modular resource, follow [these instructions](/extend/modular-resources/configure/).
- Browse the [modular resources tutorials](/extend/modular-resources/examples/) for examples of deploying and using custom modular resources on your robot.

Once you have configured a modular resource, you can test the custom resource using the [Control tab](/manage/fleet/#remote-control) and [program](/program/) it with Viam's Go or Python SDKs.
Once you have deployed a modular resource, you can test the custom resource using the [Control tab](/manage/fleet/#remote-control) and [program](/program/) it with Viam's Go or Python SDKs.

## Related tutorials

Expand Down
2 changes: 1 addition & 1 deletion docs/extend/modular-resources/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Follow these steps to configure a module and its modular resources locally:

1. [Save the executable](#make-sure-viam-server-can-access-your-executable) in a location your `viam-server` instance can access.
2. [Add a **module**](#configure-your-module) referencing this executable to the configuration of your robot.
3. [Add a new component or service](#configure-your-modular-resource) referencing the custom resource provided by the configured **module** to the configuration of your robot.
3. [Add a new component or service](#configure-your-modular-resource) referencing the modular resource provided by the configured **module** to the configuration of your robot.

### Make sure `viam-server` can access your executable

Expand Down
6 changes: 3 additions & 3 deletions docs/extend/modular-resources/create/_index.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
title: "Code your own modules to create custom resources"
title: "Code your own modules to create modular resources"
linkTitle: "Create"
weight: 20
type: "docs"
tags: ["server", "rdk", "extending viam", "modular resources", "components", "services"]
description: "Use the Viam module system to implement custom resources that can be included in any Viam-powered robot."
description: "Use the Viam module system to implement modular resources that can be included in any Viam-powered robot."
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.

A common use case for modular resources is to create a new model that implements an existing Viam API.

Once you have created your custom resource, you can use the [Viam CLI](/manage/cli/) to [upload your custom 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, to share it with other Viam users or just to other users in your organization.

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

Expand Down
2 changes: 1 addition & 1 deletion docs/extend/modular-resources/examples/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ aliases:
---

To familiarize yourself with creating and using modular resources, follow one of these example [tutorials](#tutorials) or clone one of these example [repositories](#repositories).
Once you have created a modular resource, you can test your custom resource using the [Control tab](/manage/fleet/#remote-control) and program it using the [Viam SDKs](/program/apis/).
Once you have created a modular resource, you can test your modular resource using the [Control tab](/manage/fleet/#remote-control) and program it using the [Viam SDKs](/program/apis/).

## Tutorials

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/custom/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Custom Resource Tutorials"
linkTitle: "Custom Resources"
title: "Modular Resource Tutorials"
linkTitle: "Modular Resources"
childTitleEndOverwrite: "Tutorial"
weight: 50
type: docs
Expand Down
12 changes: 11 additions & 1 deletion docs/viam/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ You will not need to write a single line of code to integrate them, and swapping
You can make use of computer vision, motion planning, SLAM, data management, machine learning, and more by configuring Viam's built-in {{< glossary_tooltip term_id="service" text="services">}}.
- **Architecture**:
You can build simple robots or multi-part robots that use secure communication channels across local networks and the cloud, all of which can be managed with a uniform API.
- **Extensibility**: If you need additional functionality, you can leverage community contributed and custom resources to [extend](/extend/) Viam.
- **Extensibility**: If you need additional functionality, you can leverage community contributed and modular resources to [extend](/extend/) Viam from [the Viam Registry](/extend/modular-resources/).

Join the [**Viam community**](https://discord.gg/viam) to collaborate during planning and beyond.

Expand Down Expand Up @@ -132,6 +132,16 @@ With it you can:
- Manage software across your fleet, including deployment of code and machine learning models.
- Keep your robot configuration and capabilities up-to-date.

## Extensibility

You can also extend Viam to support additional hardware components or software services by deploying a module from the [Viam Registry](https://app.viam.com/registry) to your robot.

The Viam 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.
You can also [upload your own module to the Viam Registry](/extend/modular-resources/upload/).

See [Modular resources](/extend/modular-resources/) for more information.

## Next steps

Start by borrowing one of our robots.
Expand Down

0 comments on commit a646c11

Please sign in to comment.