From c9ace091f9db8f81ef2edbf5f0ae6d01c50b2c6f Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Tue, 5 Aug 2025 19:48:20 +0200 Subject: [PATCH 1/2] Draft --- docs/_index.md | 72 ++++++++++++------------------------------ docs/data-ai/_index.md | 64 +++++++++++-------------------------- docs/dev/_index.md | 22 +++++++++++++ docs/manage/_index.md | 61 ++++++++++++----------------------- docs/operate/_index.md | 67 ++++++++++++++++++--------------------- 5 files changed, 113 insertions(+), 173 deletions(-) diff --git a/docs/_index.md b/docs/_index.md index 24efe8cae3..daf2d50072 100644 --- a/docs/_index.md +++ b/docs/_index.md @@ -27,68 +27,38 @@ aliases: - "/platform/" --- -
-
-
-

Viam Documentation

-

- Viam integrates with hardware and software on any device in the physical world. Once you set up your machines, you can use Viam SDKs to program your devices and connected hardware. Everything is managed in the cloud and you can add use machine learning, data management, and much more for your projects. -

- -
- App illustration -
-
-
-
-

The Viam platform +

Viam Documentation

-

Viam allows you to control and program any sensor, actuator or other hardware that is connected to a device. The Viam platform offers builtin capabilities to capture data from devices to the cloud, to build and deploy machine learning models, to alert on problems, and much more. With the connection to the cloud, you can configure, control, and manage your devices from anywhere.

+

Viam is a software platform for devices that interact with the physical world.


-
-
- Platform diagram - Platform diagram with connect elements highlighted - Platform diagram with apps element highlighted - Platform diagram with motion elements highlighted -
-
-
+- [**`viam-server` →**](/operate/reference/viam-server/) -
+ The open-source server that runs on machines to manage hardware and software. -
-

Build & integrate

To get started, install Viam on any device and integrate your hardware. Then you can control your device and any attached physical hardware securely from anywhere in the world.

Learn more

-
+- [**Viam →**](https://app.viam.com/robots) -
-

Work with Data and AI

Viam's data and AI capabilities enable you to capture and sync or upload data, build a dataset, train and deploy ML models, and run inference with computer vision. Then, you can act or alert on inferences.

Learn more

-
+ The cloud app for configuration and management. -
-

Deploy, manage, and troubleshoot

Viam’s fleet management tooling allows you to remotely deploy and manage software on any fleet of devices. You can monitor all connected devices and troubleshoot any issues - from anywhere.

Learn more

-
+- [**Architectural Overview →**](/operate/reference/architecture/) + + How a machine is structured, including on-device and cloud communications. + +- [**Building machines →**](/operate/) + + Mix and match from existing software resources or make your own. + +- [**Data management & AI →**](/data-ai/) + + Manage data from your devices and use it with machine learning. + +- [**Fleet Management →**](/manage/) + + Remotely deploy and manage software on any fleet of devices. -
diff --git a/docs/data-ai/_index.md b/docs/data-ai/_index.md index c002e81b2e..2cb00ce934 100644 --- a/docs/data-ai/_index.md +++ b/docs/data-ai/_index.md @@ -1,6 +1,6 @@ --- linkTitle: "AI and Data" -title: "Work with Data and AI" +title: "AI and Data" weight: 250 layout: "docs" type: "docs" @@ -12,54 +12,28 @@ notoc: true description: "Sync and store sensor data, images, and any other binary or timeseries data. Then use ML and AI to turn your data into insights and action." --- -Viam's data and AI capabilities enable you to capture and sync or upload data, build a dataset, train and deploy ML models, and run inference with computer vision. -Then, you can act or alert on inferences. -You can also monitor your machines through teleop, power your application logic, or analyze historical data trends. +
+

Manage data from your devices and use it with machine learning.

+
-
- Platform diagram - Platform diagram with data capture elements highlighted - Platform diagram with data usage elements highlighted - Platform diagram with AI elements highlighted -
+- [**Data Management →**](/data-ai/capture-data/capture-sync/) -
+ Capture and sync data from devices. -{{< how-to-expand "Capture data" "4" "BEGINNER-FRIENDLY" "" "data-platform-capture" >}} -{{< cards >}} -{{% card link="/data-ai/capture-data/capture-sync/" noimage="true" %}} -{{% card link="/data-ai/capture-data/filter-before-sync/" noimage="true" %}} -{{% card link="/data-ai/capture-data/conditional-sync/" noimage="true" %}} -{{% card link="/data-ai/capture-data/lorawan/" noimage="true" %}} -{{< /cards >}} -{{< /how-to-expand >}} +- [**Machine Learning →**](/data-ai/train/train-tflite/) -{{< how-to-expand "Work with data" "4" "BEGINNER-FRIENDLY" "" "data-platform-work" >}} -{{< cards >}} -{{% card link="/data-ai/data/query/" noimage="true" %}} -{{% card link="/data-ai/data/visualize/" noimage="true" %}} -{{% card link="/data-ai/data/advanced/alert-data/" noimage="true" %}} -{{% card link="/data-ai/data/export/" noimage="true" %}} -{{< /cards >}} -{{< /how-to-expand >}} + Build a dataset to train machine learning models for your machines. -{{< how-to-expand "Train an ML model" "5" "INTERMEDIATE" "" "data-platform-ai" >}} -{{< cards >}} -{{% card link="/data-ai/train/create-dataset/" noimage="true" %}} -{{% card link="/data-ai/train/capture-annotate-images/" noimage="true" %}} -{{% card link="/data-ai/train/train-tflite/" noimage="true" %}} -{{% card link="/data-ai/train/train/" noimage="true" %}} -{{% card link="/data-ai/train/upload-external-data/" noimage="true" %}} -{{< /cards >}} -{{< /how-to-expand >}} +- [**Computer Vision →**](/data-ai/ai/run-inference/) -{{< how-to-expand "Infer with ML models" "4" "INTERMEDIATE" "" "data-platform-ai" >}} -{{< cards >}} -{{% card link="/data-ai/ai/deploy/" noimage="true" %}} -{{% card link="/data-ai/ai/run-inference/" noimage="true" %}} -{{% card link="/data-ai/ai/alert/" noimage="true" %}} -{{% card link="/data-ai/ai/act/" noimage="true" %}} -{{< /cards >}} -{{< /how-to-expand >}} + Allow machines to interpret their environments. -
+- [**Query data →**](/data-ai/data/query/) + + Graph or query data from all your devices. + +- [**LoRaWAN networks →**](/data-ai/capture-data/lorawan/) + + Collect LoRaWAN sensor data with Viam. + +
diff --git a/docs/dev/_index.md b/docs/dev/_index.md index 96d513ab79..f1b32e9878 100644 --- a/docs/dev/_index.md +++ b/docs/dev/_index.md @@ -16,6 +16,28 @@ aliases: - /internals/ --- +
+

Remotely deploy and manage software on any fleet of devices - from anywhere.

+
+ +- [**CLI →**](/dev/tools/cli/) + + Manage your machines resources from the command line. + +- [**Tutorials →**](LINK) + + Build small projects while learning new skills. + +- [**APIs →**](LINK) + + Every Viam resource exposes an API described through protocol buffers. + +- [**SDKs →**](/dev/reference/sdks/) + + Control your machines with Go, Python, TypeScript, Flutter, C++, and more.. + +
+
diff --git a/docs/manage/_index.md b/docs/manage/_index.md index 9495b51517..a9839df987 100644 --- a/docs/manage/_index.md +++ b/docs/manage/_index.md @@ -17,51 +17,32 @@ aliases: - /product-overviews/fleet-management/ --- -Viam's fleet management tooling allows you to remotely deploy and manage software on any fleet of devices. You can monitor all connected devices and troubleshoot any issues - from anywhere. +
+

Remotely deploy and manage software on any fleet of devices - from anywhere.

+
-
- Platform diagram - Platform diagram with team management elements highlighted - Platform diagram with deploy and manage elements highlighted - Platform diagram with monitoring elements highlighted -
+- [**Fleet Management →**](/manage/fleet/reuse-configuration/) + + Set up all your machines with shared configuration fragments. + +- [**Provisioning →**](/manage/fleet/provision/setup/) + + Set up machines with a pre-defined configuration as they come online. + +- [**Monitoring →**](/manage/troubleshoot/monitor/) + + Remotely monitor and operate all your machines. + +- [**Access Control →**](manage/manage/access/) -
+ Collaborate with others on your machines. -{{< how-to-expand "Deploy a fleet of machines" "4" "INTERMEDIATE" "" "fleet-platform-management">}} -{{< cards >}} -{{% card link="/manage/fleet/reuse-configuration/" noimage="true" %}} -{{% card link="/manage/fleet/system-settings/" noimage="true" %}} -{{% card link="/manage/fleet/provision/setup/" noimage="true" %}} -{{% card link="manage/fleet/provision/end-user-setup/" noimage="true" %}} -{{< /cards >}} -{{< /how-to-expand >}} +- [**Maintenance and Updates →**](/manage/software/update-software/) -{{< how-to-expand "Deploy code and manage software on machines" "2" "INTERMEDIATE" "fleet-platform-management" >}} -{{< cards >}} -{{% card link="/manage/software/control-logic/" noimage="true" %}} -{{% card link="/manage/software/deploy-software/" noimage="true" %}} -{{% card link="/manage/software/update-software/" noimage="true" %}} -{{< /cards >}} -{{< /how-to-expand >}} + Roll out software updates to your machines in a few clicks. -{{< how-to-expand "Manage access for organizations" "4" "INTERMEDIATE" "" "fleet-platform-team" >}} -{{< cards >}} -{{% card link="/manage/manage/access/" noimage="true" %}} -{{% card link="/manage/manage/rbac/" noimage="true" %}} -{{% card link="/manage/manage/oauth/" noimage="true" %}} -{{% card link="/manage/manage/white-labelled-billing/" noimage="true" %}} -{{< /cards >}} -{{< /how-to-expand >}} +- [**OS settings & Networking →**](/manage/fleet/system-settings/) -{{< how-to-expand "Remotely monitor and troubleshoot" "5" "INTERMEDIATE" "" "fleet-platform-monitor" >}} -{{< cards >}} -{{% card link="/manage/troubleshoot/monitor/" noimage="true" %}} -{{% card link="/manage/troubleshoot/alert/" noimage="true" %}} -{{% card link="/manage/troubleshoot/teleoperate/custom-interface" customTitle="Teleoperate with custom interface" noimage="true" %}} -{{% card link="/manage/troubleshoot/teleoperate/default-interface" customTitle="Teleoperate with default interface" noimage="true" %}} -{{% card link="/manage/troubleshoot/troubleshoot/" noimage="true" %}} -{{< /cards >}} -{{< /how-to-expand >}} + Configure networks and package updates for the host operating system.
diff --git a/docs/operate/_index.md b/docs/operate/_index.md index 0da6f04f8e..76cbf44198 100644 --- a/docs/operate/_index.md +++ b/docs/operate/_index.md @@ -14,43 +14,36 @@ aliases: - /build/ --- -To get started, install Viam on any device and integrate your hardware. Then you can control your device and any attached physical hardware securely from anywhere in the world. - - -
- Platform diagram - Platform diagram with connect elements highlighted - Platform diagram with apps element highlighted - Platform diagram with motion elements highlighted -
+
+

Control your device and any attached physical hardware from anywhere in the world.

+
+ +- [**Installation →**](/operate/get-started/setup/) + + Install Viam on any device. + +- [**Registry →**](/operate/get-started/supported-hardware/) + + An online hub of resources you can use on your machines.. + +- [**Modules →**](/operate/get-started/other-hardware/create-module/) + + Create modules to support your specialized hardware and software. + +- [**Viam applications →**](/operate/control/viam-applications/) + + Deploy web applications to provide an interface for your machines. + +- [**SDKs →**](/dev/reference/sdks/) + + Control your machines with Go, Python, TypeScript, Flutter, C++, and more. + +- [**Motion planning →**](/operate/mobility/motion-concepts/) + + Use built-in motion planning software to move arms, bases, etc. + +- [**Micro-RDK →**](/operate/reference/viam-micro-server/) -
- -{{< how-to-expand "Connect devices" "4" "BEGINNER-FRIENDLY" "" "build-platform-connect" >}} -{{< cards >}} -{{% card link="/operate/get-started/basics/" noimage="true" %}} -{{% card link="/operate/get-started/setup/" noimage="true" %}} -{{% card link="/operate/get-started/supported-hardware/" noimage="true" %}} -{{% card link="/operate/get-started/other-hardware/" noimage="true" %}} -{{< /cards >}} -{{< /how-to-expand >}} - -{{< how-to-expand "Build apps" "4" "BEGINNER-FRIENDLY" "" "build-platform-apps" >}} -{{< cards >}} -{{% card link="/operate/control/viam-applications/" noimage="true" %}} -{{% card link="/operate/control/web-app/" noimage="true" %}} -{{% card link="/operate/control/mobile-app/" noimage="true" %}} -{{% card link="/operate/control/headless-app/" noimage="true" %}} -{{< /cards >}} -{{< /how-to-expand >}} - -{{< how-to-expand "Intelligent actuation and motion planning" "4" "INTERMEDIATE" "" "build-platform-motion" >}} -{{< cards >}} -{{% card link="/operate/mobility/motion-concepts/" noimage="true" %}} -{{% card link="/operate/mobility/move-arm/" noimage="true" %}} -{{% card link="/operate/mobility/move-base/" noimage="true" %}} -{{% card link="/operate/mobility/move-gantry/" noimage="true" %}} -{{< /cards >}} -{{< /how-to-expand >}} + The lightweight version of `viam-server` for microcontrollers.
From d88f2ce11763e40e318ce9d95c941ce0867f9547 Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Tue, 12 Aug 2025 12:55:32 +0200 Subject: [PATCH 2/2] Draft2 --- docs/_index.md | 26 +- docs/data-ai/_index.md | 23 +- docs/dev/_index.md | 798 +---------------------------------------- docs/manage/_index.md | 26 +- docs/operate/_index.md | 29 +- 5 files changed, 57 insertions(+), 845 deletions(-) diff --git a/docs/_index.md b/docs/_index.md index daf2d50072..4dc0978ba4 100644 --- a/docs/_index.md +++ b/docs/_index.md @@ -29,7 +29,7 @@ aliases:
-

Viam Documentation +

Software engineering principles applied to hardware. @@ -37,25 +37,29 @@ aliases:

Viam is a software platform for devices that interact with the physical world.


-- [**`viam-server` →**](/operate/reference/viam-server/) +- [**Component-Based Approach →**]() - The open-source server that runs on machines to manage hardware and software. + Divide complex projects into small, loosely coupled components that can be created and tested independently. -- [**Viam →**](https://app.viam.com/robots) +- [**Standardized Interfaces →**]() - The cloud app for configuration and management. + Common hardware components such as robotic arms or cameras use the same APIs. -- [**Architectural Overview →**](/operate/reference/architecture/) +- [**Viam Registry →**]() - How a machine is structured, including on-device and cloud communications. + Mix and match publicly available components from the Viam Registry with your own components. -- [**Building machines →**](/operate/) +- [**Infrastructure as code →**]() - Mix and match from existing software resources or make your own. + Define the set of components that work together in a machine in JSON format. -- [**Data management & AI →**](/data-ai/) +- [**Incremental Development →**]() - Manage data from your devices and use it with machine learning. + Make versioned changes to the JSON configuration for a machine's hardware and software. + +- [**Platform Capabilities →**]() + + Make use of builtin data management, machine learning, motion planning, and more. - [**Fleet Management →**](/manage/) diff --git a/docs/data-ai/_index.md b/docs/data-ai/_index.md index 2cb00ce934..92847a56ee 100644 --- a/docs/data-ai/_index.md +++ b/docs/data-ai/_index.md @@ -10,30 +10,27 @@ open_on_desktop: true overview: true notoc: true description: "Sync and store sensor data, images, and any other binary or timeseries data. Then use ML and AI to turn your data into insights and action." +noTitle: true ---
-

Manage data from your devices and use it with machine learning.

+

Gather machine data and use it to make inferences.


-- [**Data Management →**](/data-ai/capture-data/capture-sync/) +- [**Collect machine data →**](/data-ai/capture-data/capture-sync/) - Capture and sync data from devices. + Capture and sync data from any device. -- [**Machine Learning →**](/data-ai/train/train-tflite/) +- [**Query machine data →**](/data-ai/data/query/) - Build a dataset to train machine learning models for your machines. - -- [**Computer Vision →**](/data-ai/ai/run-inference/) - - Allow machines to interpret their environments. + Graph or query data from all your devices. -- [**Query data →**](/data-ai/data/query/) +- [**Train ML models →**](/data-ai/train/train-tflite/) - Graph or query data from all your devices. + Train machine learning models based on your machine data. -- [**LoRaWAN networks →**](/data-ai/capture-data/lorawan/) +- [**Run ML Inference →**](/data-ai/ai/run-inference/) - Collect LoRaWAN sensor data with Viam. + Enable machines to interpret their environments.
diff --git a/docs/dev/_index.md b/docs/dev/_index.md index f1b32e9878..0882427f1f 100644 --- a/docs/dev/_index.md +++ b/docs/dev/_index.md @@ -1,6 +1,6 @@ --- linkTitle: "Dev tools" -title: "Dev tools" +title: "Program hardware in any language." weight: 600 layout: "docs" type: "docs" @@ -17,809 +17,23 @@ aliases: ---
-

Remotely deploy and manage software on any fleet of devices - from anywhere.

+

Program hardware in any language.


- [**CLI →**](/dev/tools/cli/) - Manage your machines resources from the command line. + Manage and control machines from the command line. - [**Tutorials →**](LINK) - Build small projects while learning new skills. + Build small projects with Viam. - [**APIs →**](LINK) - Every Viam resource exposes an API described through protocol buffers. + Every Viam resource exposes an API. - [**SDKs →**](/dev/reference/sdks/) - Control your machines with Go, Python, TypeScript, Flutter, C++, and more.. + Manage and control machines with Go, Python, TypeScript, Flutter, C++, and more.
- -
-
-
-

Dev tools

-

- Viam integrates with hardware and software on any device. Once you've set up your machines you can use the CLI and APIs to control and manage them. -

- -
- Robot illustration -
-
-
- -
- -Once you've set up your machine you can control your device and any attached physical hardware with [Viam APIs](/dev/reference/apis/), for example: - -{{< tabs class="horizontalheaders program" navheader="Examples">}} -{{% tab name="Drive a base" %}} - -
- -{{< tabs >}} -{{% tab name="Python" %}} - -```python -async def moveInSquare(base): - for _ in range(4): - # Move forward 500mm at 500mm/s - await base.move_straight(velocity=500, distance=500) - # Spin 90 degrees at 100 degrees/s - await base.spin(velocity=100, angle=90) -``` - -{{% /tab %}} -{{% tab name="Go" %}} - -```go -func moveInSquare(ctx context.Context, base base.Base, logger logging.Logger) { - for i := 0; i < 4; i++ { - // Move forward 500mm at 500mm/s - base.MoveStraight(ctx, 600, 500.0, nil) - // Spin 90 degrees at 100 degrees/s - base.Spin(ctx, 90, 100.0, nil) - } -} -``` - -{{% /tab %}} -{{% tab name="TypeScript" %}} - -```ts -async function moveInSquare(baseClient: VIAM.BaseClient) { - for (let i = 0; i < 4; i++) { - // Move forward 500mm at 500mm/s - await baseClient.moveStraight(500, 500); - // Spin 90 degrees at 100 degrees/s - await baseClient.spin(90, 100); - } -} -``` - -{{% /tab %}} -{{% tab name="Flutter" %}} - -```dart -Future moveSquare() async { - for (var i=0; i<4; i++) { - // Move forward 500mm at 500mm/s - await base.moveStraight(500, 500); - // Spins the rover 90 degrees at 100 degrees/s - await base.spin(90, 100); - } -} -``` - -{{% /tab %}} -{{% tab name="C++" %}} - -```cpp -void move_in_square(std::shared_ptr base) { - for (int i = 0; i < 4; ++i) { - // Move forward 500mm at 500mm/s - base->move_straight(500, 500); - // Spins the rover 90 degrees at 100 degrees/s - base->spin(90, 100); - } -} -``` - -{{% /tab %}} -{{< /tabs >}} - -
-
- -Once you have configured a robotic base, you can drive it using the base API. - -[Drive a base →](/tutorials/control/drive-rover/) - -
-
- -{{}} - -
-
-
- -{{% /tab %}} -{{% tab name="Control motor" %}} - -
- -{{< tabs >}} -{{% tab name="Python" %}} - -```python -async def spin_motor(motor): - # Turn the motor at 35% power forwards - await motor.set_power(power=0.35) - # Let the motor spin for 3 seconds - time.sleep(3) - # Stop the motor - await motor.stop() -``` - -{{% /tab %}} -{{% tab name="Go" %}} - -```go -func spinMotor(ctx context.Context, motor motor.Motor, logger logging.Logger) { - // Turn the motor at 35% power forwards - err = motor.SetPower(context.Background(), 0.35, nil) - // Let the motor spin for 3 seconds - time.Sleep(3 * time.Second) - // Stop the motor - err = motor.Stop(context.Background(), nil) -} -``` - -{{% /tab %}} -{{% tab name="TypeScript" %}} - -```ts -async function spinMotor(motorClient: VIAM.MotorClient) { - // Turn the motor at 35% power forwards - await motorClient.setPower(0.35); - // Let the motor spin for 3 seconds - const sleep = (ms: number) => - new Promise((resolve) => setTimeout(resolve, ms)); - await sleep(3000); - // Stop the motor - await motorClient.stop(); -} -``` - -{{% /tab %}} -{{% tab name="Flutter" %}} - -```dart -Future spinMotor() async { - // Turn the motor at 35% power forwards - await motorClient.setPower(0.35); - // Let the motor spin for 3 seconds - await Future.delayed(Duration(seconds: 3)); - // Stop the motor - await motorClient.stop(); -} -``` - -{{% /tab %}} -{{% tab name="C++" %}} - -```cpp -void spin_motor(std::shared_ptr motor) { - // Turn the motor at 35% power forwards - motor->set_power(0.35); - // Let the motor spin for 3 seconds - sleep(3); - // Stop the motor - motor->stop(); -} -``` - -{{% /tab %}} -{{< /tabs >}} - -
-
- -Once you have configured a motor, you can operate it using the motor API. - -[Control a motor →](/dev/reference/apis/components/motor/) - -
-
- -{{}} - -
-
-
-{{% /tab %}} -{{% tab name="Get sensor reading" %}} -
- -{{< tabs >}} -{{% tab name="Python" %}} - -```python -# Get the readings provided by the sensor. -co_2_monitor = Sensor.from_robot(machine, "co2-monitor") -co_2_monitor_return_value = await co_2_monitor.get_readings() -print(f"co2-monitor get_readings return value: {co_2_monitor_return_value}") -``` - -{{% /tab %}} -{{% tab name="Go" %}} - -```go -// Get the readings provided by the sensor. -co2Monitor, err := sensor.FromRobot(machine, "co2-monitor") -co2MonitorReturnValue, err := co2Monitor.Readings( - context.Background(), map[string]interface{}{}) -logger.Infof("co2-monitor return value: %+v", co2MonitorReturnValue) -``` - -{{% /tab %}} -{{% tab name="TypeScript" %}} - -```ts -// Get the readings provided by the sensor. -const co2MonitorClient = new VIAM.SensorClient(machine, "co2-monitor"); -const co2MonitorReturnValue = await co2MonitorClient.getReadings(); -console.log("co2-monitor return value:", co2MonitorReturnValue); -``` - -{{% /tab %}} -{{% tab name="Flutter" %}} - -```dart -// Get the readings provided by the sensor. -final co2Monitor = Sensor.fromRobot(client, "co2-monitor"); -var readings = await co2Monitor.readings(); -print(readings); -``` - -{{% /tab %}} -{{% tab name="C++" %}} - -```cpp -// Get the readings provided by the sensor. -auto co2monitor = machine->resource_by_name("co2-monitor"); -auto co2monitor_get_readings_return_value = co2monitor->get_readings(); -std::cout << "co2-monitor get_readings return value " << co2monitor_get_readings_return_value << "\n"; -``` - -{{% /tab %}} -{{< /tabs >}} - -
-
- -Once you have configured a physical sensor or anything else that provides measurements, you can get sensor readings using the sensor API. - -[Collect sensor data →](/data-ai/capture-data/capture-sync/) - -
-
-
-{{% /tab %}} -{{% tab name="Move an arm" %}} -
- -{{< tabs >}} -{{% tab name="Python" %}} - -```python -# Command a joint position move: move the forearm of the arm slightly up -cmd_joint_positions = JointPositions(values=[0, 0, -30.0, 0, 0, 0]) -await my_arm_component.move_to_joint_positions( - positions=cmd_joint_positions) - -# Generate a simple pose move +100mm in the +Z direction of the arm -cmd_arm_pose = await my_arm_component.get_end_position() -cmd_arm_pose.z += 100.0 -await my_arm_component.move_to_position(pose=cmd_arm_pose) -``` - -{{% /tab %}} -{{% tab name="Go" %}} - -```go -// Command a joint position move: move the forearm of the arm slightly up -cmdJointPositions := &armapi.JointPositions{Values: []float64{0.0, 0.0, -30.0, 0.0, 0.0, 0.0}} -err = myArmComponent.MoveToJointPositions(context.Background(), cmdJointPositions, nil) - -// Generate a simple pose move +100mm in the +Z direction of the arm -currentArmPose, err := myArmComponent.EndPosition(context.Background(), nil) -adjustedArmPoint := currentArmPose.Point() -adjustedArmPoint.Z += 100.0 -cmdArmPose := spatialmath.NewPose(adjustedArmPoint, currentArmPose.Orientation()) - -err = myArmComponent.MoveToPosition(context.Background(), cmdArmPose, nil) -``` - -{{% /tab %}} -{{< /tabs >}} - -
-
- -Once you have configured a robotic arm, you can move it using the arm API. - -[Move a robotic arm →](/operate/mobility/move-arm/) - -
-
- -{{}} - -
-
-
-{{% /tab %}} -{{% tab name="Operate custom hardware" %}} -
- -{{< tabs >}} -{{% tab name="Python" %}} - -```python -my_button = Generic.from_robot(robot=machine, name="my_button") - -# Use a custom command to push the button 5 -command = {"cmd": "push_button", "button": 5} -result = await my_button.do_command(command) -``` - -{{% /tab %}} -{{% tab name="Go" %}} - -```go -myButton, err := generic.FromRobot(machine, "my_button") - -// Use a custom command to push the button 5 -command := map[string]interface{}{"cmd": "push_button", "button": 5} -result, err := myButton.DoCommand(context.Background(), command) -``` - -{{% /tab %}} -{{< /tabs >}} - -
-
- -Using the Viam Registry you can create _{{< glossary_tooltip term_id="resource" text="resources" >}}_ for additional hardware types or models and then deploy them to your machines. -You can use an existing component or service type or create generic resources. - -[Create a module →](/operate/get-started/other-hardware/create-module/hello-world-module/) - -
-
-
-{{% /tab %}} -{{% tab name="Virtual hardware & Custom logic" %}} -
- -{{< tabs >}} -{{% tab name="Python" %}} - -```python -my_twilio_svc = Generic.from_robot(robot=machine, name="my_twilio_svc") - -# Use a custom command to send a text message with Twilio -command = {"to": "+1 234 567 8901", "body": "Hello world!"} -result = await my_twilio_svc.do_command(command) -``` - -{{% /tab %}} -{{% tab name="Go" %}} - -```go -myTwilioSvc, err := generic.FromRobot(machine, "my_twilio_svc") - -// Use a custom command to send a text message with Twilio -command := map[string]interface{}{"to": "+1 234 567 8901", "body": "Hello world!"} -result, err := myTwilioSvc.DoCommand(context.Background(), command) -``` - -{{% /tab %}} -{{< /tabs >}} - -
-
- -Using the Viam Registry you can turn services and your own custom business logic into _{{< glossary_tooltip term_id="module" text="modules" >}}_. You can then deploy your modules to your machines. - -[Create a module →](/operate/get-started/other-hardware/create-module/) - -
-
-
-{{% /tab %}} -{{< /tabs >}} - -
-
-
- -You can also manage data, use higher level services, and manage your machines: - -{{< tabs class="horizontalheaders services" navheader="Examples">}} -{{% tab name="Use computer vision" %}} - -
- -{{< tabs >}} -{{% tab name="Python" %}} - -```python -# Get image from camera stream on construction site -cam = Camera.from_robot(machine, "construction-site-cam") -img = await cam.get_image() - -# Use machine learning model to gather information from the image -hardhat_detector = VisionClient.from_robot(machine, "hardhat_detector") -detections = await hardhat_detector.get_detections(img) - -# Check whether a person is detected not wearing a hardhat -for d in detections: - if d.confidence > 0.8 and d.class_name == "NO-Hardhat": - print("Violation detected.") -``` - -{{% /tab %}} -{{% tab name="Go" %}} - -```go -// Get image from camera stream on construction site -myCamera, err := camera.FromRobot(machine, "construction-site-cam") -img, err = camera.DecodeImageFromCamera(context.Background(), utils.MimeTypeJPEG, nil, myCamera) - -// Use machine learning model to gather information from the image -visService, err := vision.FromRobot(machine, "hardhat_detector") -detections, err := visService.Detections(context.Background(), img, nil) - -// Check whether a person is detected not wearing a hardhat -for i := 0; i < len(detections); i++ { - if (detection[i].confidence > 0.8) && (detection[i].class_name == "NO-Hardhat") { - logger.Info("Violation detected.") - } -} -``` - -{{% /tab %}} -{{< /tabs >}} - -
-
- -Computer vision enables your machine to use connected cameras to interpret the world around it. -With inferences about a machine's surroundings, you can program machines to act based on this input using the vision service API. - -[Try the vision service →](/tutorials/projects/helmet/) - -
-
- -{{}} - -
-
-
- -{{% /tab %}} -{{% tab name="Query captured data" %}} - -
- -{{< tabs >}} -{{% tab name="Python" %}} - -```python -# Tag data from the my_camera component -my_filter = create_filter(component_name="my_camera") -tags = ["frontview", "trainingdata"] -res = await data_client.add_tags_to_binary_data_by_filter(tags, my_filter) - -# Query sensor data by filter -my_data = [] -my_filter = create_filter( - component_name="sensor-1", - start_time=Timestamp('2024-10-01 10:00:00', tz='US/Pacific'), - end_time=Timestamp('2024-10-12 18:00:00', tz='US/Pacific') -) -tabular_data, count, last = await data_client.tabular_data_by_filter( - my_filter, last=None) -``` - -{{% /tab %}} -{{< /tabs >}} - -
-
- -You can query synced sensor data, images, and any other binary or timeseries data from all your machines using the data client API. - -[Learn about Data Management →](/data-ai/capture-data/capture-sync/) - -
-
-
-{{% /tab %}} -{{% tab name="Move arms" %}} -
- -{{< tabs >}} -{{% tab name="Python" %}} - -```python -# Add a table obstacle to a WorldState -table_origin = Pose(x=-202.5, y=-546.5, z=-19.0) -table_dimensions = Vector3(x=635.0, y=1271.0, z=38.0) -table_object = Geometry(center=table_origin, - box=RectangularPrism(dims_mm=table_dimensions)) -obstacles_in_frame = GeometriesInFrame(reference_frame="world", - geometries=[table_object]) -world_state = WorldState(obstacles=[obstacles_in_frame]) - -# Destination pose to move to -dest_in_frame = PoseInFrame( - reference_frame="world", - pose=Pose(x=510.0, y=0.0, z=526.0, o_x=0.7, o_y=0.0, o_z=-0.7, theta=0.0)) - -# Move arm to destination pose -motion_service = MotionClient.from_robot(robot, "builtin") -await motion_service.move( - component_name=Arm.get_resource_name("myArm"), - destination=dest_in_frame, world_state=world_state) -``` - -{{% /tab %}} -{{% tab name="Go" %}} - -```go -// Add a table obstacle to a WorldState -obstacles := make([]spatialmath.Geometry, 0) -tableOrigin := spatialmath.NewPose( - r3.Vector{X: 0.0, Y: 0.0, Z: -10.0}, - &spatialmath.OrientationVectorDegrees{OX: 0.0, OY: 0.0, OZ: 1.0, Theta: 0.0}, -) -tableDimensions := r3.Vector{X: 2000.0, Y: 2000.0, Z: 20.0} -tableObj, err := spatialmath.NewBox(tableOrigin, tableDimensions, "table") -obstacles = append(obstacles, tableObj) -obstaclesInFrame := referenceframe.NewGeometriesInFrame(referenceframe.World, obstacles) -worldState, err := referenceframe.NewWorldState([]*referenceframe.GeometriesInFrame{obstaclesInFrame}, nil) - -// Destination pose to move to -destinationPose := spatialmath.NewPose( - r3.Vector{X: 510.0, Y: 0.0, Z: 526.0}, - &spatialmath.OrientationVectorDegrees{OX: 0.7071, OY: 0.0, OZ: -0.7071, Theta: 0.0}, -) -destPoseInFrame := referenceframe.NewPoseInFrame( - referenceframe.World, destinationPose) - -// Move arm to destination pose -motionService, err := motion.FromRobot(robot, "builtin") -_, err = motionService.Move(context.Background(), arm.Named("myArm"), destPoseInFrame, worldState, nil, nil) -``` - -{{% /tab %}} -{{< /tabs >}} - -
-
- -The motion service enables your machine to plan and move relative to itself, other machines, and the world. You can use it with the motion service API. - -[Try the motion service →](/tutorials/services/plan-motion-with-arm-gripper/) - -
-
- -{{}} - -
-
-
-{{% /tab %}} -{{% tab name="Navigate bases" %}} -
- -{{< tabs >}} -{{% tab name="Python" %}} - -```python -my_nav = NavigationClient.from_robot(robot=robot, name="my_nav_service") - -# Create a new waypoint at the specified latitude and longitude -location = GeoPoint(latitude=40.76275, longitude=-73.96) - -# Add waypoint to the service's data storage -await my_nav.add_waypoint(point=location) - -my_nav = NavigationClient.from_robot(robot=robot, name="my_nav_service") - -# Set the service to operate in waypoint mode and begin navigation -await my_nav.set_mode(Mode.ValueType.MODE_WAYPOINT) -``` - -{{% /tab %}} -{{% tab name="Go" %}} - -```go -myNav, err := navigation.FromRobot(robot, "my_nav_service") - -// Create a new waypoint at the specified latitude and longitude -location = geo.NewPoint(40.76275, -73.96) - -// Add waypoint to the service's data storage -err := myNav.AddWaypoint(context.Background(), location, nil) - -myNav, err := navigation.FromRobot(robot, "my_nav_service") - -// Set the service to operate in waypoint mode and begin navigation -mode, err := myNav.SetMode(context.Background(), Mode.MODE_WAYPOINT, nil) -``` - -{{% /tab %}} -{{< /tabs >}} - -
-
- -Autonomously navigate a machine to defined waypoints using the navigation service API. - -[Try the navigation service →](/tutorials/services/navigate-with-rover-base/) - -
-
-
-{{% /tab %}} -{{% tab name="Check machine status" %}} - -
- -{{< tabs >}} -{{% tab name="Python" %}} - -```python -# Get all machines in a location -machines = await cloud.list_robots(location_id="abcde1fghi") - -for m in machines: - # Connect and get status information or latest logs - machine_parts = await cloud.get_robot_parts(m.id) - main_part = next(filter(lambda part: part.main_part, machine_parts), None) - - try: - # Get status for machine - machine = await connect(main_part.fqdn) - status = await machine.get_machine_status() - except ConnectionError: - # If no connection can be made, get last logs - logs = await cloud.get_robot_part_logs( - robot_part_id=main_part.id, num_log_entries=5) -``` - -{{% /tab %}} -{{< /tabs >}} - -
-
- -Get status information and logs from all your deployed machines using the fleet management API. - -[Learn about Platform APIs →](/dev/reference/apis/#platform-apis) - -
-
-
- -{{% /tab %}} -{{% tab name="Train ML models" %}} - -
- -{{< tabs >}} -{{% tab name="Python" %}} - -```python -# Start a training job to create a classification model based on the dataset -job_id = await ml_training_client.submit_training_job( - org_id="abbc1c1c-d2e3-5f67-ab8c-de912345f678", - dataset_id="12ab3cd4e56f7abc89de1fa2", - model_name="recognize_gestures", - model_version="1", - model_type=ModelType.MODEL_TYPE_MULTI_LABEL_CLASSIFICATION, - tags=["follow", "stop"] -) - -# Get status information for training job -job_metadata = await ml_training_client.get_training_job( - id=job_id) -``` - -{{% /tab %}} -{{< /tabs >}} - -
-
- -Build machine learning models based on your machines' data any time using the ML training client API - -[Train and deploy ML models →](/data-ai/train/train-tflite/) - -
-
-
- -{{% /tab %}} -{{% tab name="Manage access and resources" %}} - -
- -{{< tabs >}} -{{% tab name="Python" %}} - -```python -# Create a new machine -new_machine_id = await cloud.new_robot( - name="new-machine", location_id="abcde1fghi") - -# Get organization associated with authenticated user / API key -org_list = await cloud.list_organizations() - -# Create a new API key with owner access for the new machine -auth = APIKeyAuthorization( - role="owner", - resource_type="robot", - resource_id=new_machine_id -) -api_key, api_key_id = await cloud.create_key( - org_list[0].id, [auth], "key_for_new_machine") -``` - -{{% /tab %}} -{{< /tabs >}} - -
-
- -Viam allows you to organize and manage any number of machines. When collaborating with others, you can assign permissions using Role-Based Access Control (RBAC). Programmatically you can do this with the fleet management API. - -[Learn about access control →](/manage/manage/rbac/) - -
-
-
- -{{% /tab %}} -{{< /tabs >}} diff --git a/docs/manage/_index.md b/docs/manage/_index.md index a9839df987..72158d5ca1 100644 --- a/docs/manage/_index.md +++ b/docs/manage/_index.md @@ -5,10 +5,10 @@ weight: 300 layout: "docs" type: "docs" no_list: true -notoc: true -noedit: true open_on_desktop: true overview: true +noTitle: true +notoc: true description: "Remotely deploy and manage software on any fleet of devices. You can monitor all connected devices and troubleshoot any issues - from anywhere." aliases: - /cloud/ @@ -18,30 +18,26 @@ aliases: ---
-

Remotely deploy and manage software on any fleet of devices - from anywhere.

+

Remotely deploy and manage software on any fleet of devices - from anywhere.


-- [**Fleet Management →**](/manage/fleet/reuse-configuration/) +- [**Manage fleets →**](/manage/fleet/reuse-configuration/) - Set up all your machines with shared configuration fragments. + Share configuration fragments across machines. -- [**Provisioning →**](/manage/fleet/provision/setup/) +- [**Provision devices →**](/manage/fleet/provision/setup/) Set up machines with a pre-defined configuration as they come online. -- [**Monitoring →**](/manage/troubleshoot/monitor/) - - Remotely monitor and operate all your machines. - -- [**Access Control →**](manage/manage/access/) +- [**Monitor devices →**](/manage/troubleshoot/monitor/) - Collaborate with others on your machines. + Remotely monitor and debug machines. -- [**Maintenance and Updates →**](/manage/software/update-software/) +- [**Update software on devices →**](/manage/software/update-software/) - Roll out software updates to your machines in a few clicks. + Control the roll out of software updates to machines. -- [**OS settings & Networking →**](/manage/fleet/system-settings/) +- [**Configure system settings →**](/manage/fleet/system-settings/) Configure networks and package updates for the host operating system. diff --git a/docs/operate/_index.md b/docs/operate/_index.md index 76cbf44198..8c55a5e48b 100644 --- a/docs/operate/_index.md +++ b/docs/operate/_index.md @@ -5,9 +5,10 @@ weight: 150 layout: "docs" type: "docs" no_list: true -noedit: true open_on_desktop: true overview: true +noTitle: true +notoc: true description: "Install Viam on any device and integrate your hardware. Then you can control your device and attached physical hardware securely from anywhere in the world." notoc: true aliases: @@ -15,35 +16,35 @@ aliases: ---
-

Control your device and any attached physical hardware from anywhere in the world.

+

Write code in any programming language to control hardware.


-- [**Installation →**](/operate/get-started/setup/) +- [**Install `viam-server` →**](/operate/get-started/setup/) - Install Viam on any device. + The open-source server that runs on Raspberry Pi, Nvidia Jetson, and other computers. -- [**Registry →**](/operate/get-started/supported-hardware/) +- [**Building machines on Viam →**](/operate/get-started/supported-hardware/) - An online hub of resources you can use on your machines.. + Mix and match from existing hardware and software resources in the Viam registry. -- [**Modules →**](/operate/get-started/other-hardware/create-module/) +- [**Add modules →**](/operate/get-started/other-hardware/create-module/) - Create modules to support your specialized hardware and software. + Create custom resources for hardware or software. -- [**Viam applications →**](/operate/control/viam-applications/) +- [**Run control code →**](/manage/software/control-logic/) - Deploy web applications to provide an interface for your machines. + Write code to operate a machine's hardware. -- [**SDKs →**](/dev/reference/sdks/) +- [**Build applications →**](/operate/control/viam-applications/) - Control your machines with Go, Python, TypeScript, Flutter, C++, and more. + Build and deploy web or mobile applications to monitor and operate machines. - [**Motion planning →**](/operate/mobility/motion-concepts/) Use built-in motion planning software to move arms, bases, etc. -- [**Micro-RDK →**](/operate/reference/viam-micro-server/) +- [**Install `viam-micro-server` →**](/operate/reference/viam-micro-server/) - The lightweight version of `viam-server` for microcontrollers. + The lightweight version of viam-server for microcontrollers.