From dfcd2b5d5f4cd9811d2fa4cbd7482218a6d63166 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Fri, 1 Sep 2023 12:02:27 -0400 Subject: [PATCH 01/33] make wheeledodometry page --- .../movement-sensor/wheeledodometry.md | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 docs/components/movement-sensor/wheeledodometry.md diff --git a/docs/components/movement-sensor/wheeledodometry.md b/docs/components/movement-sensor/wheeledodometry.md new file mode 100644 index 0000000000..fff9f0d51b --- /dev/null +++ b/docs/components/movement-sensor/wheeledodometry.md @@ -0,0 +1,57 @@ +-- +title: "Configure a wheeledodometry movement sensor" +linkTitle: "wheeledodometry" +type: "docs" +description: "Configure a wheeledodometry movement sensor." +images: ["/icons/components/movement-sensor.svg"] +tags: ["movement sensor", "components", "movement sensor"] +# SMEs: Martha Johnston +--- + +Configure a `wheeledodometry` movement sensor to implement _wheeledodometry odometry_ on your robot. + +Wheeled odometry is the estimation of position, orientation, linear velocity, and angular velocity using the dimensions of a base. + +Then, you can use your wheeledodometry base with Viam's built-in services like the [navigation service](/services/navigation/). + +{{< tabs name="Configure an wheeledodometry movement sensor" >}} +{{% 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 **Components** subtab and navigate to the **Create component** menu. +Enter a name for your movement sensor, select the type `movement sensor`, and select the `wheeledodometry` model. + +Click **Create component**. + +![Configuration of a wheeledodometry movement sensor in the Viam app config builder.](/components/movement-sensor/configure-wheeledodometry.png) + +Fill in and edit the attributes as applicable. + +{{% /tab %}} +{{% tab name="JSON Template" %}} + +```json {class="line-numbers linkable-line-numbers"} +"name" : "your-wheeledodometry-movement-sensor", +"type" : "movement_sensor", +"model" : "wheeledodometry", +"attributes" : { + "base" : "your--base-name", + "left_motors" : ["your-base-left-motor-name-1", "your-base-left-motor-name-2"], + "right_motors" : ["your-base-right-motor-name-1", "your-base-right-motor-name-2"], + "time-interval-msec": +} +``` + +{{% /tab %}} +{{< /tabs >}} + +## Attributes + +The following attributes are available for `wheeledodometry` movement sensors: + +| Name | Type | Inclusion | Description | +| ---- | ---- | --------- | ----------- | +| `base` | string | **Required** | The `name` of the [base](/components/base/) to which this movement sensor is wired. | +| `left_motors` | object | **Required** | A struct holding the names of the bases' left motors wired to this movement sensor: | +| `right_motors` | object | **Required** | A struct holding the name of the bases' right motors wired to this movement sensor: | +| `time_interval_msec` | number | **Required** | todo | From 366cabf42b6153acc8db6c0c1c3adfd67363f9c2 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Fri, 1 Sep 2023 12:26:38 -0400 Subject: [PATCH 02/33] make wheeledodometry page better --- docs/components/movement-sensor/_index.md | 1 + .../movement-sensor/wheeledodometry.md | 57 ++++++++++--------- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/docs/components/movement-sensor/_index.md b/docs/components/movement-sensor/_index.md index e86223619d..5c16f8bdb2 100644 --- a/docs/components/movement-sensor/_index.md +++ b/docs/components/movement-sensor/_index.md @@ -38,6 +38,7 @@ Model | Description [`accel-adxl345`](./adxl345/) | The [Analog Devices ADXL345](https://www.analog.com/en/products/adxl345.html) digital accelerometer [`gyro-mpu6050`](./mpu6050/) | A gyroscope/accelerometer manufactured by TDK InvenSense [`merged`](./merged/) | A model that allows you to aggregate the API methods supported by multiple sensors into a singular sensor client, effectively merging the models of the individual resources +[`wheeledodometry`](./wheeledodometry/) | A model that uses [encoders](/components/encoder/) to get an odometry estimate from a wheeled base [`fake`](./fake/) | Used to test code without hardware ## Control your movement sensor with Viam's client SDK libraries diff --git a/docs/components/movement-sensor/wheeledodometry.md b/docs/components/movement-sensor/wheeledodometry.md index fff9f0d51b..8573388b68 100644 --- a/docs/components/movement-sensor/wheeledodometry.md +++ b/docs/components/movement-sensor/wheeledodometry.md @@ -1,49 +1,45 @@ --- +--- title: "Configure a wheeledodometry movement sensor" linkTitle: "wheeledodometry" type: "docs" description: "Configure a wheeledodometry movement sensor." -images: ["/icons/components/movement-sensor.svg"] +images: ["/icons/components/imu.svg"] tags: ["movement sensor", "components", "movement sensor"] -# SMEs: Martha Johnston +# SMEs: Rand, Martha --- -Configure a `wheeledodometry` movement sensor to implement _wheeledodometry odometry_ on your robot. +Configure a `wheeledodometry` movement sensor to implement _wheeled odometry_ on your robot. -Wheeled odometry is the estimation of position, orientation, linear velocity, and angular velocity using the dimensions of a base. - -Then, you can use your wheeledodometry base with Viam's built-in services like the [navigation service](/services/navigation/). +_Wheeled odometry_ is the estimation of position, orientation, linear velocity, and angular velocity using the dimensions of a base. +This model uses [encoders](/components/encoder/) to get an odometry estimate from an encoder wheeled base. -{{< tabs name="Configure an wheeledodometry movement sensor" >}} -{{% tab name="Config Builder" %}} +## Set-up requirements -Navigate to the **Config** tab of your robot's page in [the Viam app](https://app.viam.com). -Click on the **Components** subtab and navigate to the **Create component** menu. -Enter a name for your movement sensor, select the type `movement sensor`, and select the `wheeledodometry` model. +To prepare your robot, attach [encoders](/components/encoder/) to each the motors of your base to measure their rotation. -Click **Create component**. +- Configure each of these encoded motors [as encoder components](/components/encoder/#configuration). +- Then, proceed to [configure](#configuration) a `wheeledodometry` movement sensor with the name of each of the encoder components. -![Configuration of a wheeledodometry movement sensor in the Viam app config builder.](/components/movement-sensor/configure-wheeledodometry.png) - -Fill in and edit the attributes as applicable. +## Configuration -{{% /tab %}} -{{% tab name="JSON Template" %}} +Navigate to the **Config** tab of your robot's page in [the Viam app](https://app.viam.com). +Click on the **Components** subtab and navigate to the **Create component** menu. +Select **Raw JSON** mode. +Copy and paste the following: ```json {class="line-numbers linkable-line-numbers"} -"name" : "your-wheeledodometry-movement-sensor", +"name" : "", "type" : "movement_sensor", "model" : "wheeledodometry", "attributes" : { - "base" : "your--base-name", - "left_motors" : ["your-base-left-motor-name-1", "your-base-left-motor-name-2"], - "right_motors" : ["your-base-right-motor-name-1", "your-base-right-motor-name-2"], + "base" : "", + "left_motors" : ["", ""], + "right_motors" : [""], "time-interval-msec": } ``` -{{% /tab %}} -{{< /tabs >}} +Fill in and edit the attributes as applicable. ## Attributes @@ -51,7 +47,12 @@ The following attributes are available for `wheeledodometry` movement sensors: | Name | Type | Inclusion | Description | | ---- | ---- | --------- | ----------- | -| `base` | string | **Required** | The `name` of the [base](/components/base/) to which this movement sensor is wired. | -| `left_motors` | object | **Required** | A struct holding the names of the bases' left motors wired to this movement sensor:
  • i: {{< glossary_tooltip term_id="pin-number" text="Pin number" >}} of the pin to which the movement sensor is wired.
| -| `right_motors` | object | **Required** | A struct holding the name of the bases' right motors wired to this movement sensor:
  • i: {{< glossary_tooltip term_id="pin-number" text="Pin number" >}} of the pin to which the movement sensor is wired.
| -| `time_interval_msec` | number | **Required** | todo | +| `base` | string | **Required** | The `name` of the [base](/components/base/) to which the encoders making up this movement sensor are wired. | +| `left_motors` | object | **Required** | A struct holding the name(s) of the bases' left [encoded motors](/components/encoder/). | +| `right_motors` | object | **Required** | A struct holding the name(s) of the bases' right [encoded motors](/components/encoder/). | +| `time_interval_msec` | number | **Required** | The time in between each wheeled odometry calculation. | + +With a configured `wheeledodometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. +You can access these readings through the [movement sensor API](/components/movement-sensor/#api). + +After configuring a `wheeledodometry` movement sensor, you can operate your base with Viam's built-in services like the [navigation service](/services/navigation/). From 4975d81242d92c6bfe2a33c35e969d86befa51c3 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Fri, 1 Sep 2023 12:32:06 -0400 Subject: [PATCH 03/33] Update wheeledodometry.md make time_interval_msec optional --- docs/components/movement-sensor/wheeledodometry.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/components/movement-sensor/wheeledodometry.md b/docs/components/movement-sensor/wheeledodometry.md index 8573388b68..1e5aaba3f0 100644 --- a/docs/components/movement-sensor/wheeledodometry.md +++ b/docs/components/movement-sensor/wheeledodometry.md @@ -48,9 +48,9 @@ The following attributes are available for `wheeledodometry` movement sensors: | Name | Type | Inclusion | Description | | ---- | ---- | --------- | ----------- | | `base` | string | **Required** | The `name` of the [base](/components/base/) to which the encoders making up this movement sensor are wired. | -| `left_motors` | object | **Required** | A struct holding the name(s) of the bases' left [encoded motors](/components/encoder/). | -| `right_motors` | object | **Required** | A struct holding the name(s) of the bases' right [encoded motors](/components/encoder/). | -| `time_interval_msec` | number | **Required** | The time in between each wheeled odometry calculation. | +| `left_motors` | object | **Required** | A struct holding the name of each of the bases' left [encoded motors](/components/encoder/). | +| `right_motors` | object | **Required** | A struct holding the name of each of the bases' right [encoded motors](/components/encoder/). | +| `time_interval_msec` | number | Optional | The time in between each wheeled odometry calculation.
Default: `500.0`
| With a configured `wheeledodometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. You can access these readings through the [movement sensor API](/components/movement-sensor/#api). From 8d20302fa2f1374c2862d2d90a6a11102523008b Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Fri, 1 Sep 2023 12:38:23 -0400 Subject: [PATCH 04/33] Update docs/components/movement-sensor/wheeledodometry.md --- docs/components/movement-sensor/wheeledodometry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/movement-sensor/wheeledodometry.md b/docs/components/movement-sensor/wheeledodometry.md index 1e5aaba3f0..236996c840 100644 --- a/docs/components/movement-sensor/wheeledodometry.md +++ b/docs/components/movement-sensor/wheeledodometry.md @@ -52,7 +52,7 @@ The following attributes are available for `wheeledodometry` movement sensors: | `right_motors` | object | **Required** | A struct holding the name of each of the bases' right [encoded motors](/components/encoder/). | | `time_interval_msec` | number | Optional | The time in between each wheeled odometry calculation.
Default: `500.0`
| -With a configured `wheeledodometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. +With a configured `wheeledodometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions/), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. You can access these readings through the [movement sensor API](/components/movement-sensor/#api). After configuring a `wheeledodometry` movement sensor, you can operate your base with Viam's built-in services like the [navigation service](/services/navigation/). From 9cc187d0cc616d8ed9acf1f436d6821f962fed33 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Fri, 1 Sep 2023 12:53:27 -0400 Subject: [PATCH 05/33] Add configure base step --- docs/components/movement-sensor/wheeledodometry.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/components/movement-sensor/wheeledodometry.md b/docs/components/movement-sensor/wheeledodometry.md index 236996c840..a5d3540a35 100644 --- a/docs/components/movement-sensor/wheeledodometry.md +++ b/docs/components/movement-sensor/wheeledodometry.md @@ -17,6 +17,7 @@ This model uses [encoders](/components/encoder/) to get an odometry estimate fro To prepare your robot, attach [encoders](/components/encoder/) to each the motors of your base to measure their rotation. +- Configure your rover as a [wheeled base component](/components/base/wheeled/). - Configure each of these encoded motors [as encoder components](/components/encoder/#configuration). - Then, proceed to [configure](#configuration) a `wheeledodometry` movement sensor with the name of each of the encoder components. From f801f13e9db6a80f06f96aa3dcca2b68cdd9660b Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Fri, 1 Sep 2023 13:54:05 -0400 Subject: [PATCH 06/33] Apply rand's inline suggestions from code review Co-authored-by: randhid <35934754+randhid@users.noreply.github.com> --- docs/components/movement-sensor/_index.md | 2 +- docs/components/movement-sensor/wheeledodometry.md | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/components/movement-sensor/_index.md b/docs/components/movement-sensor/_index.md index 5c16f8bdb2..8e20ba0900 100644 --- a/docs/components/movement-sensor/_index.md +++ b/docs/components/movement-sensor/_index.md @@ -38,7 +38,7 @@ Model | Description [`accel-adxl345`](./adxl345/) | The [Analog Devices ADXL345](https://www.analog.com/en/products/adxl345.html) digital accelerometer [`gyro-mpu6050`](./mpu6050/) | A gyroscope/accelerometer manufactured by TDK InvenSense [`merged`](./merged/) | A model that allows you to aggregate the API methods supported by multiple sensors into a singular sensor client, effectively merging the models of the individual resources -[`wheeledodometry`](./wheeledodometry/) | A model that uses [encoders](/components/encoder/) to get an odometry estimate from a wheeled base +[`wheeled-odometry`](./wheeledodometry/) | A model that uses [encoders](/components/encoder/) to get an odometry estimate from a wheeled base [`fake`](./fake/) | Used to test code without hardware ## Control your movement sensor with Viam's client SDK libraries diff --git a/docs/components/movement-sensor/wheeledodometry.md b/docs/components/movement-sensor/wheeledodometry.md index a5d3540a35..1aebda41bb 100644 --- a/docs/components/movement-sensor/wheeledodometry.md +++ b/docs/components/movement-sensor/wheeledodometry.md @@ -1,17 +1,17 @@ --- title: "Configure a wheeledodometry movement sensor" -linkTitle: "wheeledodometry" +linkTitle: "wheeled-odometry" type: "docs" -description: "Configure a wheeledodometry movement sensor." +description: "Configure a wheeled-odometry movement sensor." images: ["/icons/components/imu.svg"] tags: ["movement sensor", "components", "movement sensor"] # SMEs: Rand, Martha --- -Configure a `wheeledodometry` movement sensor to implement _wheeled odometry_ on your robot. +Configure a `wheeled-odometry` movement sensor to implement _wheeled odometry_ on your robot. _Wheeled odometry_ is the estimation of position, orientation, linear velocity, and angular velocity using the dimensions of a base. -This model uses [encoders](/components/encoder/) to get an odometry estimate from an encoder wheeled base. +This model uses [encoders](/components/encoder/) from Position Reporting motors to get an odometry estimate from a wheeled base. ## Set-up requirements @@ -56,4 +56,4 @@ The following attributes are available for `wheeledodometry` movement sensors: With a configured `wheeledodometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions/), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. You can access these readings through the [movement sensor API](/components/movement-sensor/#api). -After configuring a `wheeledodometry` movement sensor, you can operate your base with Viam's built-in services like the [navigation service](/services/navigation/). +After configuring a `wheeled-odometry` movement sensor, you can operate your base with Viam's built-in services like the [navigation service](/services/navigation/). From 4afa892c3dd61fd59b632cc1cc335b6874005b87 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Fri, 1 Sep 2023 13:59:13 -0400 Subject: [PATCH 07/33] Apply suggestions from code review position reporting motors --- docs/components/movement-sensor/wheeledodometry.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/components/movement-sensor/wheeledodometry.md b/docs/components/movement-sensor/wheeledodometry.md index 1aebda41bb..4255b604c6 100644 --- a/docs/components/movement-sensor/wheeledodometry.md +++ b/docs/components/movement-sensor/wheeledodometry.md @@ -11,14 +11,15 @@ tags: ["movement sensor", "components", "movement sensor"] Configure a `wheeled-odometry` movement sensor to implement _wheeled odometry_ on your robot. _Wheeled odometry_ is the estimation of position, orientation, linear velocity, and angular velocity using the dimensions of a base. -This model uses [encoders](/components/encoder/) from Position Reporting motors to get an odometry estimate from a wheeled base. +This model uses [encoders](/components/encoder/) from [position reporting motors](/components/motor/gpio/) to get an odometry estimate from a wheeled base. ## Set-up requirements -To prepare your robot, attach [encoders](/components/encoder/) to each the motors of your base to measure their rotation. +To prepare your robot, attach [encoders](/components/encoder/) to each of the position-reporting motors on your base to measure their rotation. - Configure your rover as a [wheeled base component](/components/base/wheeled/). -- Configure each of these encoded motors [as encoder components](/components/encoder/#configuration). +- Configure each of these position-reporting motors [as `gpio` motor components](/components/motor/gpio/). +- Configure an [encoder component](/components/encoder/#configuration) for each of the encoders you attached to the position-reporting motors. - Then, proceed to [configure](#configuration) a `wheeledodometry` movement sensor with the name of each of the encoder components. ## Configuration @@ -49,8 +50,8 @@ The following attributes are available for `wheeledodometry` movement sensors: | Name | Type | Inclusion | Description | | ---- | ---- | --------- | ----------- | | `base` | string | **Required** | The `name` of the [base](/components/base/) to which the encoders making up this movement sensor are wired. | -| `left_motors` | object | **Required** | A struct holding the name of each of the bases' left [encoded motors](/components/encoder/). | -| `right_motors` | object | **Required** | A struct holding the name of each of the bases' right [encoded motors](/components/encoder/). | +| `left_motors` | object | **Required** | A struct holding the name of each of the bases' left [position-reporting motors](/components/motor/gpio/). | +| `right_motors` | object | **Required** | A struct holding the name of each of the bases' right [position-reporting motors](/components/motor/gpio/). | | `time_interval_msec` | number | Optional | The time in between each wheeled odometry calculation.
Default: `500.0`
| With a configured `wheeledodometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions/), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. From 45eb353a540038d1d0664fb789e1855e53df9fc8 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Fri, 1 Sep 2023 15:55:10 -0400 Subject: [PATCH 08/33] Apply suggestions from code review more fix with `wheeledodometry` Co-authored-by: randhid <35934754+randhid@users.noreply.github.com> --- docs/components/movement-sensor/wheeledodometry.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/components/movement-sensor/wheeledodometry.md b/docs/components/movement-sensor/wheeledodometry.md index 4255b604c6..d9633d8524 100644 --- a/docs/components/movement-sensor/wheeledodometry.md +++ b/docs/components/movement-sensor/wheeledodometry.md @@ -1,5 +1,5 @@ --- -title: "Configure a wheeledodometry movement sensor" +title: "Configure a wheeled-odometry movement sensor" linkTitle: "wheeled-odometry" type: "docs" description: "Configure a wheeled-odometry movement sensor." @@ -11,7 +11,7 @@ tags: ["movement sensor", "components", "movement sensor"] Configure a `wheeled-odometry` movement sensor to implement _wheeled odometry_ on your robot. _Wheeled odometry_ is the estimation of position, orientation, linear velocity, and angular velocity using the dimensions of a base. -This model uses [encoders](/components/encoder/) from [position reporting motors](/components/motor/gpio/) to get an odometry estimate from a wheeled base. +This model uses [encoders](/components/encoder/) from [position reporting motors](/components/motor/) to get an odometry estimate from a wheeled base. ## Set-up requirements @@ -54,7 +54,7 @@ The following attributes are available for `wheeledodometry` movement sensors: | `right_motors` | object | **Required** | A struct holding the name of each of the bases' right [position-reporting motors](/components/motor/gpio/). | | `time_interval_msec` | number | Optional | The time in between each wheeled odometry calculation.
Default: `500.0`
| -With a configured `wheeledodometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions/), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. +With a configured `wheeled-odometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions/), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. You can access these readings through the [movement sensor API](/components/movement-sensor/#api). After configuring a `wheeled-odometry` movement sensor, you can operate your base with Viam's built-in services like the [navigation service](/services/navigation/). From e9682213487450b8a7b2b372c4c85bebbb8e3ede Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Fri, 1 Sep 2023 15:58:11 -0400 Subject: [PATCH 09/33] Update wheeledodometry.md more suggestions from code review --- docs/components/movement-sensor/wheeledodometry.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/components/movement-sensor/wheeledodometry.md b/docs/components/movement-sensor/wheeledodometry.md index d9633d8524..136c259391 100644 --- a/docs/components/movement-sensor/wheeledodometry.md +++ b/docs/components/movement-sensor/wheeledodometry.md @@ -13,12 +13,18 @@ Configure a `wheeled-odometry` movement sensor to implement _wheeled odometry_ o _Wheeled odometry_ is the estimation of position, orientation, linear velocity, and angular velocity using the dimensions of a base. This model uses [encoders](/components/encoder/) from [position reporting motors](/components/motor/) to get an odometry estimate from a wheeled base. +With a configured `wheeled-odometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions/), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. +You can access these readings through the [movement sensor API](/components/movement-sensor/#api). + +After configuring a `wheeled-odometry` movement sensor, you can operate your base with Viam's built-in services like the [navigation service](/services/navigation/). + ## Set-up requirements To prepare your robot, attach [encoders](/components/encoder/) to each of the position-reporting motors on your base to measure their rotation. +- Pick out motors that can report their own position, like [gpio motors](/components/motor/gpio/) with [encoders](/components/encoder/#configuration). - Configure your rover as a [wheeled base component](/components/base/wheeled/). -- Configure each of these position-reporting motors [as `gpio` motor components](/components/motor/gpio/). +- Configure each of the position-reporting motors [as motor components](/components/motor/). - Configure an [encoder component](/components/encoder/#configuration) for each of the encoders you attached to the position-reporting motors. - Then, proceed to [configure](#configuration) a `wheeledodometry` movement sensor with the name of each of the encoder components. @@ -53,8 +59,3 @@ The following attributes are available for `wheeledodometry` movement sensors: | `left_motors` | object | **Required** | A struct holding the name of each of the bases' left [position-reporting motors](/components/motor/gpio/). | | `right_motors` | object | **Required** | A struct holding the name of each of the bases' right [position-reporting motors](/components/motor/gpio/). | | `time_interval_msec` | number | Optional | The time in between each wheeled odometry calculation.
Default: `500.0`
| - -With a configured `wheeled-odometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions/), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. -You can access these readings through the [movement sensor API](/components/movement-sensor/#api). - -After configuring a `wheeled-odometry` movement sensor, you can operate your base with Viam's built-in services like the [navigation service](/services/navigation/). From 047e2cd455cfcda927a301e610aca03a14e2f17c Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Fri, 1 Sep 2023 16:21:21 -0400 Subject: [PATCH 10/33] Update wheeledodometry.md more suggestions from code review --- docs/components/movement-sensor/wheeledodometry.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/components/movement-sensor/wheeledodometry.md b/docs/components/movement-sensor/wheeledodometry.md index 136c259391..6203366e0f 100644 --- a/docs/components/movement-sensor/wheeledodometry.md +++ b/docs/components/movement-sensor/wheeledodometry.md @@ -22,7 +22,8 @@ After configuring a `wheeled-odometry` movement sensor, you can operate your bas To prepare your robot, attach [encoders](/components/encoder/) to each of the position-reporting motors on your base to measure their rotation. -- Pick out motors that can report their own position, like [gpio motors](/components/motor/gpio/) with [encoders](/components/encoder/#configuration). +- Pick out motors that can report their own position, like the [`roboclaw`](/components/motor/roboclaw/) or [`gpio` motors](/components/motor/gpio/) with [encoders](/components/encoder/#configuration). +You can access this property of a configured motor through the [motor API's `GetProperties()`](/components/motor/#getproperties). - Configure your rover as a [wheeled base component](/components/base/wheeled/). - Configure each of the position-reporting motors [as motor components](/components/motor/). - Configure an [encoder component](/components/encoder/#configuration) for each of the encoders you attached to the position-reporting motors. From 0b589d4e0281923d87674a93b19c0af7d866ff2b Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Fri, 1 Sep 2023 16:24:30 -0400 Subject: [PATCH 11/33] Remove trailing space --- docs/components/movement-sensor/wheeledodometry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/movement-sensor/wheeledodometry.md b/docs/components/movement-sensor/wheeledodometry.md index 6203366e0f..451f2a05d4 100644 --- a/docs/components/movement-sensor/wheeledodometry.md +++ b/docs/components/movement-sensor/wheeledodometry.md @@ -22,7 +22,7 @@ After configuring a `wheeled-odometry` movement sensor, you can operate your bas To prepare your robot, attach [encoders](/components/encoder/) to each of the position-reporting motors on your base to measure their rotation. -- Pick out motors that can report their own position, like the [`roboclaw`](/components/motor/roboclaw/) or [`gpio` motors](/components/motor/gpio/) with [encoders](/components/encoder/#configuration). +- Pick out motors that can report their own position, like the [`roboclaw`](/components/motor/roboclaw/) or [`gpio` motors](/components/motor/gpio/) with [encoders](/components/encoder/#configuration). You can access this property of a configured motor through the [motor API's `GetProperties()`](/components/motor/#getproperties). - Configure your rover as a [wheeled base component](/components/base/wheeled/). - Configure each of the position-reporting motors [as motor components](/components/motor/). From 3a761f2bc25f70a5359e84431784b5f686424746 Mon Sep 17 00:00:00 2001 From: Matt Vella <1242958+mcvella@users.noreply.github.com> Date: Thu, 31 Aug 2023 16:07:54 -0400 Subject: [PATCH 12/33] Fix typo (#1726) --- docs/services/slam/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/services/slam/_index.md b/docs/services/slam/_index.md index 9f5ba941b4..d063df35c6 100644 --- a/docs/services/slam/_index.md +++ b/docs/services/slam/_index.md @@ -139,7 +139,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/ slam_svc = SLAMClient.from_robot(robot=robot, name="my_slam_service") # Get the point cloud map in standard PCD format. -pcd_map = await slam.get_point_cloud_map() +pcd_map = await slam_svc.get_point_cloud_map() ``` {{% /tab %}} From 4c897d82745a623383a61bdefd1e99c57c091aa5 Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Fri, 1 Sep 2023 15:26:19 +0100 Subject: [PATCH 13/33] Update image on servo test sections (#1728) --- static/include/components/servo-control.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/include/components/servo-control.md b/static/include/components/servo-control.md index f304f44cb9..4e227e1923 100644 --- a/static/include/components/servo-control.md +++ b/static/include/components/servo-control.md @@ -2,4 +2,4 @@ After you establish the connection to your servo motor, navigate to the [Control tab](/manage/fleet/robots/#control) and select the dropdown panel dedicated to the motor. Use the buttons to move the servo motor to the desired angle. -![The servo component in the control tab](components/servo/servo-control-tab.png) +{{}} From 5b503f4730580ae1392e00ec83fd9d3cdffd296c Mon Sep 17 00:00:00 2001 From: andf-viam <132301587+andf-viam@users.noreply.github.com> Date: Fri, 1 Sep 2023 14:16:54 -0400 Subject: [PATCH 14/33] DOCS-1058: Add --force flag to CLI (#1727) --- docs/extend/modular-resources/upload/_index.md | 4 ++++ docs/manage/CLI.md | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/extend/modular-resources/upload/_index.md b/docs/extend/modular-resources/upload/_index.md index 2c11cb5bda..3bfb30e225 100644 --- a/docs/extend/modular-resources/upload/_index.md +++ b/docs/extend/modular-resources/upload/_index.md @@ -173,6 +173,8 @@ To upload your custom module to the Viam Registry, either as a public or private viam module upload --version 1.0.0 --platform darwin/arm64 module.tar.gz ``` + When you `upload` a module, the command performs basic [validation](/manage/cli/#upload-validation) of your packaged module to ensure it is compatible with the Viam Registry. + For more information, see the [`viam module` command](/manage/cli/#module) ## Update an existing module @@ -226,4 +228,6 @@ You can also use the [Viam CLI](/manage/cli/) to update an existing custom modul viam module upload --version 1.0.1 --platform darwin/arm64 my-module.tar.gz ``` + When you `upload` a module, the command performs basic [validation](/manage/cli/#upload-validation) of your packaged module to ensure it is compatible with the Viam Registry. + For more information, see the [`viam module` command](/manage/cli/#module) diff --git a/docs/manage/CLI.md b/docs/manage/CLI.md index 30c0406322..25c5d5ab5e 100644 --- a/docs/manage/CLI.md +++ b/docs/manage/CLI.md @@ -284,13 +284,14 @@ See [Upload a custom module](/extend/modular-resources/upload/#upload-a-custom-m | ----------- | ----------- | ----------- | | `create` | generate new metadata for a custom module on your local filesystem | - | | `update` | update an existing custom module on your local filesystem with recent changes to the [`meta.json` file](#the-metajson-file) | - | -| `upload` | upload a new or existing custom module on your local filesystem to the Viam Registry | +| `upload` | validate and upload a new or existing custom module on your local filesystem to the Viam Registry. See [Upload validation](#upload-validation) for more information | | `--help` | return help | - | ##### Named arguments | argument | description | applicable commands | required | ----------- | ----------- | ----------- | ----------- | +| `--force` | skip local validation of the packaged module, which may result in an unusable module if the contents of the packaged module are not correct | `upload` | false | | `--module` | the path to the [`meta.json` file](#the-metajson-file) for the custom module, if not in the current directory | `update`, `upload` | false | | `--name` | the name of the custom module to be created | `create` | true | | `--org-id` | the organization ID to associate the module to. See [Using the `--org-id` argument](#using-the---org-id-and---public-namespace-arguments) | `create`, `update`, `upload` | true | @@ -331,6 +332,16 @@ Users can choose to pin to a specific patch version, permit upgrades within majo When you `update` a module configuration and then `upload` it, the `entrypoint` for that module defined in the [`meta.json` file](#the-metajson-file) is associated with the specific `--version` for that `upload`. Therefore, you are able to change the `entrypoint` file from version to version, if desired. +##### Upload validation + +When you `upload` a module, the command validates your local packaged module to ensure that it meets the requirements to successfully upload to the Viam Registry. +The following criteria are checked for every `upload`: + +* The packaged module must exist on the filesystem at the path provided to the `upload` command. +* The packaged module must use the `.tar.gz` extension. +* The entry point file specified in the [`meta.json` file](#the-metajson-file) must exist on the filesystem at the path specified. +* The entry point file must be executable. + ##### The `meta.json` file When uploading a custom module, the Viam Registry tracks your module's metadata in a `meta.json` file. From eff3ebd87faad747a4d4ad00cf8bb3a4eba8ab1b Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Fri, 1 Sep 2023 16:27:59 -0400 Subject: [PATCH 15/33] add tip about roboclaw and rename file --- .../{wheeledodometry.md => wheeled-odometry.md} | 7 +++++++ 1 file changed, 7 insertions(+) rename docs/components/movement-sensor/{wheeledodometry.md => wheeled-odometry.md} (92%) diff --git a/docs/components/movement-sensor/wheeledodometry.md b/docs/components/movement-sensor/wheeled-odometry.md similarity index 92% rename from docs/components/movement-sensor/wheeledodometry.md rename to docs/components/movement-sensor/wheeled-odometry.md index 451f2a05d4..b30f0d136b 100644 --- a/docs/components/movement-sensor/wheeledodometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -29,6 +29,13 @@ You can access this property of a configured motor through the [motor API's `Get - Configure an [encoder component](/components/encoder/#configuration) for each of the encoders you attached to the position-reporting motors. - Then, proceed to [configure](#configuration) a `wheeledodometry` movement sensor with the name of each of the encoder components. +{{% alert title="Tip" color="tip" %}} + +The `roboclaw` motor does not require you to configure [encoder components](/components/encoder/#configuration) for use with the `wheeled-odometry` movement sensor. +It reports its own position with a built-in encoded motor. + +{{% /alert %}} + ## Configuration Navigate to the **Config** tab of your robot's page in [the Viam app](https://app.viam.com). From e7f6bc8bbddb0d289290857191b4fb66990e2cba Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Fri, 1 Sep 2023 17:30:34 -0400 Subject: [PATCH 16/33] Update movement sensor page link to wheeled-odometry for page renaming --- docs/components/movement-sensor/_index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/components/movement-sensor/_index.md b/docs/components/movement-sensor/_index.md index 8e20ba0900..03da1c57fb 100644 --- a/docs/components/movement-sensor/_index.md +++ b/docs/components/movement-sensor/_index.md @@ -38,7 +38,8 @@ Model | Description [`accel-adxl345`](./adxl345/) | The [Analog Devices ADXL345](https://www.analog.com/en/products/adxl345.html) digital accelerometer [`gyro-mpu6050`](./mpu6050/) | A gyroscope/accelerometer manufactured by TDK InvenSense [`merged`](./merged/) | A model that allows you to aggregate the API methods supported by multiple sensors into a singular sensor client, effectively merging the models of the individual resources -[`wheeled-odometry`](./wheeledodometry/) | A model that uses [encoders](/components/encoder/) to get an odometry estimate from a wheeled base +[`wheeled-odometry`](./wheeled-odometry/) | A model that uses [encoders](/components/encoder/) to get an odometry estimate from a wheeled base + [`fake`](./fake/) | Used to test code without hardware ## Control your movement sensor with Viam's client SDK libraries From c9f4d34d8a07f51ae221f8f15c5b122fbf76308e Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Fri, 1 Sep 2023 17:31:39 -0400 Subject: [PATCH 17/33] Apply suggestions from code review --- docs/components/movement-sensor/wheeled-odometry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index b30f0d136b..505243eb55 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -10,7 +10,7 @@ tags: ["movement sensor", "components", "movement sensor"] Configure a `wheeled-odometry` movement sensor to implement _wheeled odometry_ on your robot. -_Wheeled odometry_ is the estimation of position, orientation, linear velocity, and angular velocity using the dimensions of a base. +_Wheeled odometry_ is the estimation of the rate of change of position, orientation, linear velocity, and angular velocity using the dimensions of a base, calculated by measuring the movement of the motors through encoders. This model uses [encoders](/components/encoder/) from [position reporting motors](/components/motor/) to get an odometry estimate from a wheeled base. With a configured `wheeled-odometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions/), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. From eef4f198a19a56a8265d14002c4781117c72031e Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Tue, 5 Sep 2023 13:20:22 -0400 Subject: [PATCH 18/33] Apply suggestions from rand/martha inline code review Co-authored-by: randhid <35934754+randhid@users.noreply.github.com> --- docs/components/movement-sensor/wheeled-odometry.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index 505243eb55..f18abc0339 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -11,7 +11,7 @@ tags: ["movement sensor", "components", "movement sensor"] Configure a `wheeled-odometry` movement sensor to implement _wheeled odometry_ on your robot. _Wheeled odometry_ is the estimation of the rate of change of position, orientation, linear velocity, and angular velocity using the dimensions of a base, calculated by measuring the movement of the motors through encoders. -This model uses [encoders](/components/encoder/) from [position reporting motors](/components/motor/) to get an odometry estimate from a wheeled base. +This model uses [encoders](/components/encoder/) from [position reporting motors](/components/motor/) to get an odometry estimate of a wheeled base as it moves. With a configured `wheeled-odometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions/), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. You can access these readings through the [movement sensor API](/components/movement-sensor/#api). @@ -22,12 +22,11 @@ After configuring a `wheeled-odometry` movement sensor, you can operate your bas To prepare your robot, attach [encoders](/components/encoder/) to each of the position-reporting motors on your base to measure their rotation. -- Pick out motors that can report their own position, like the [`roboclaw`](/components/motor/roboclaw/) or [`gpio` motors](/components/motor/gpio/) with [encoders](/components/encoder/#configuration). +- Pick out motors that can report their own position, like an encoded [`roboclaw`](/components/motor/roboclaw/) or [`gpio` motors](/components/motor/gpio/) with [encoders](/components/encoder/#configuration), or the [`odrive`](/components/motor/odrive/) module. You can access this property of a configured motor through the [motor API's `GetProperties()`](/components/motor/#getproperties). - Configure your rover as a [wheeled base component](/components/base/wheeled/). - Configure each of the position-reporting motors [as motor components](/components/motor/). -- Configure an [encoder component](/components/encoder/#configuration) for each of the encoders you attached to the position-reporting motors. -- Then, proceed to [configure](#configuration) a `wheeledodometry` movement sensor with the name of each of the encoder components. +- Then, proceed to [configure](#configuration) a `wheeledodometry` movement sensor with the name of each of the motor components. {{% alert title="Tip" color="tip" %}} @@ -64,6 +63,6 @@ The following attributes are available for `wheeledodometry` movement sensors: | Name | Type | Inclusion | Description | | ---- | ---- | --------- | ----------- | | `base` | string | **Required** | The `name` of the [base](/components/base/) to which the encoders making up this movement sensor are wired. | -| `left_motors` | object | **Required** | A struct holding the name of each of the bases' left [position-reporting motors](/components/motor/gpio/). | -| `right_motors` | object | **Required** | A struct holding the name of each of the bases' right [position-reporting motors](/components/motor/gpio/). | +| `left_motors` | object | **Required** | A list holding the name of each of the bases' left [position-reporting motors](/components/motor/gpio/). | +| `right_motors` | object | **Required** | A list holding the name of each of the bases' right [position-reporting motors](/components/motor/gpio/). | | `time_interval_msec` | number | Optional | The time in between each wheeled odometry calculation.
Default: `500.0`
| From 904d3827b11e62913ba50487f3b02c0bdedca0cf Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Tue, 5 Sep 2023 13:22:09 -0400 Subject: [PATCH 19/33] Apply suggestions from code review add warning for time interval --- docs/components/movement-sensor/wheeled-odometry.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index f18abc0339..d63c06ce48 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -15,6 +15,7 @@ This model uses [encoders](/components/encoder/) from [position reporting motors With a configured `wheeled-odometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions/), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. You can access these readings through the [movement sensor API](/components/movement-sensor/#api). +For best accuracy, it is recommended you configure a time interval less of than `1000` milliseconds. After configuring a `wheeled-odometry` movement sensor, you can operate your base with Viam's built-in services like the [navigation service](/services/navigation/). From 26dc6dfa6854523937f54959844bc5a77ef809c1 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Tue, 5 Sep 2023 13:33:12 -0400 Subject: [PATCH 20/33] Update docs/components/movement-sensor/wheeled-odometry.md --- docs/components/movement-sensor/wheeled-odometry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index d63c06ce48..6e8b44d27f 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -23,7 +23,7 @@ After configuring a `wheeled-odometry` movement sensor, you can operate your bas To prepare your robot, attach [encoders](/components/encoder/) to each of the position-reporting motors on your base to measure their rotation. -- Pick out motors that can report their own position, like an encoded [`roboclaw`](/components/motor/roboclaw/) or [`gpio` motors](/components/motor/gpio/) with [encoders](/components/encoder/#configuration), or the [`odrive`](/components/motor/odrive/) module. +- Pick out motors that can report their own position, like an encoded [`roboclaw`](/components/motor/roboclaw/) or [`gpio` motors](/components/motor/gpio/) with [encoders](/components/encoder/#configuration), or the [`odrive`](/extend/modular-resources/examples/odrive/) module. You can access this property of a configured motor through the [motor API's `GetProperties()`](/components/motor/#getproperties). - Configure your rover as a [wheeled base component](/components/base/wheeled/). - Configure each of the position-reporting motors [as motor components](/components/motor/). From b845418a77919a5bcaf7cb982f03aae5a03adca0 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Tue, 5 Sep 2023 13:41:33 -0400 Subject: [PATCH 21/33] Remove trailing space --- docs/components/movement-sensor/wheeled-odometry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index 6e8b44d27f..392e846988 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -15,7 +15,7 @@ This model uses [encoders](/components/encoder/) from [position reporting motors With a configured `wheeled-odometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions/), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. You can access these readings through the [movement sensor API](/components/movement-sensor/#api). -For best accuracy, it is recommended you configure a time interval less of than `1000` milliseconds. +For the best accuracy with odometry calculations, it is recommended you configure a time interval less of than `1000` milliseconds. After configuring a `wheeled-odometry` movement sensor, you can operate your base with Viam's built-in services like the [navigation service](/services/navigation/). From 138bd6c28903f7603e0ce32ff7bdb9a87d2c8bb5 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Tue, 5 Sep 2023 14:34:17 -0400 Subject: [PATCH 22/33] Update docs/components/movement-sensor/wheeled-odometry.md --- docs/components/movement-sensor/wheeled-odometry.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index 392e846988..d9038cefda 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -26,6 +26,7 @@ To prepare your robot, attach [encoders](/components/encoder/) to each of the po - Pick out motors that can report their own position, like an encoded [`roboclaw`](/components/motor/roboclaw/) or [`gpio` motors](/components/motor/gpio/) with [encoders](/components/encoder/#configuration), or the [`odrive`](/extend/modular-resources/examples/odrive/) module. You can access this property of a configured motor through the [motor API's `GetProperties()`](/components/motor/#getproperties). - Configure your rover as a [wheeled base component](/components/base/wheeled/). +Make sure to configure the base width and circumference, as these measurements as a property of the base are vital for accurate odometry estimations by your movement sensor. - Configure each of the position-reporting motors [as motor components](/components/motor/). - Then, proceed to [configure](#configuration) a `wheeledodometry` movement sensor with the name of each of the motor components. From 8cb1e0d8499635fa07c19349662ab7339081f6e7 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Tue, 5 Sep 2023 16:05:50 -0400 Subject: [PATCH 23/33] Apply final suggestions from code review Co-authored-by: randhid <35934754+randhid@users.noreply.github.com> --- docs/components/movement-sensor/wheeled-odometry.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index d9038cefda..574afc76f5 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -26,16 +26,10 @@ To prepare your robot, attach [encoders](/components/encoder/) to each of the po - Pick out motors that can report their own position, like an encoded [`roboclaw`](/components/motor/roboclaw/) or [`gpio` motors](/components/motor/gpio/) with [encoders](/components/encoder/#configuration), or the [`odrive`](/extend/modular-resources/examples/odrive/) module. You can access this property of a configured motor through the [motor API's `GetProperties()`](/components/motor/#getproperties). - Configure your rover as a [wheeled base component](/components/base/wheeled/). -Make sure to configure the base width and circumference, as these measurements as a property of the base are vital for accurate odometry estimations by your movement sensor. +Make sure to configure the base width and circumference, as these measurements as a property of the base are vital for accurate odometry estimations by your movement sensor. This movement sensor accesses these values through the base's `GetProperties()` API method. - Configure each of the position-reporting motors [as motor components](/components/motor/). - Then, proceed to [configure](#configuration) a `wheeledodometry` movement sensor with the name of each of the motor components. -{{% alert title="Tip" color="tip" %}} - -The `roboclaw` motor does not require you to configure [encoder components](/components/encoder/#configuration) for use with the `wheeled-odometry` movement sensor. -It reports its own position with a built-in encoded motor. - -{{% /alert %}} ## Configuration From 8858a0830be9cc0aaf52715735779fdab9a560f0 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Wed, 6 Sep 2023 06:48:20 -0400 Subject: [PATCH 24/33] Apply andrew suggestions from code review for clarity Co-authored-by: andf-viam <132301587+andf-viam@users.noreply.github.com> --- docs/components/movement-sensor/wheeled-odometry.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index 574afc76f5..8e95761f09 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -11,9 +11,9 @@ tags: ["movement sensor", "components", "movement sensor"] Configure a `wheeled-odometry` movement sensor to implement _wheeled odometry_ on your robot. _Wheeled odometry_ is the estimation of the rate of change of position, orientation, linear velocity, and angular velocity using the dimensions of a base, calculated by measuring the movement of the motors through encoders. -This model uses [encoders](/components/encoder/) from [position reporting motors](/components/motor/) to get an odometry estimate of a wheeled base as it moves. +This model of movement sensor uses [encoders](/components/encoder/) from [position reporting motors](/components/motor/) to get an odometry estimate of a wheeled base as it moves. -With a configured `wheeled-odometry` movement sensor, after every time `time_interval_msec` elapses during a [session](/program/apis/sessions/), your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base. +With a configured `wheeled-odometry` movement sensor, your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base each time `time_interval_msec` elapses during a [session](/program/apis/sessions/). You can access these readings through the [movement sensor API](/components/movement-sensor/#api). For the best accuracy with odometry calculations, it is recommended you configure a time interval less of than `1000` milliseconds. @@ -23,14 +23,13 @@ After configuring a `wheeled-odometry` movement sensor, you can operate your bas To prepare your robot, attach [encoders](/components/encoder/) to each of the position-reporting motors on your base to measure their rotation. -- Pick out motors that can report their own position, like an encoded [`roboclaw`](/components/motor/roboclaw/) or [`gpio` motors](/components/motor/gpio/) with [encoders](/components/encoder/#configuration), or the [`odrive`](/extend/modular-resources/examples/odrive/) module. +- Select motors that can report their own position, like an encoded [`roboclaw`](/components/motor/roboclaw/) or [`gpio` motors](/components/motor/gpio/) with [encoders](/components/encoder/#configuration), or the [`odrive`](/extend/modular-resources/examples/odrive/) module. You can access this property of a configured motor through the [motor API's `GetProperties()`](/components/motor/#getproperties). - Configure your rover as a [wheeled base component](/components/base/wheeled/). Make sure to configure the base width and circumference, as these measurements as a property of the base are vital for accurate odometry estimations by your movement sensor. This movement sensor accesses these values through the base's `GetProperties()` API method. - Configure each of the position-reporting motors [as motor components](/components/motor/). - Then, proceed to [configure](#configuration) a `wheeledodometry` movement sensor with the name of each of the motor components. - ## Configuration Navigate to the **Config** tab of your robot's page in [the Viam app](https://app.viam.com). @@ -59,6 +58,6 @@ The following attributes are available for `wheeledodometry` movement sensors: | Name | Type | Inclusion | Description | | ---- | ---- | --------- | ----------- | | `base` | string | **Required** | The `name` of the [base](/components/base/) to which the encoders making up this movement sensor are wired. | -| `left_motors` | object | **Required** | A list holding the name of each of the bases' left [position-reporting motors](/components/motor/gpio/). | -| `right_motors` | object | **Required** | A list holding the name of each of the bases' right [position-reporting motors](/components/motor/gpio/). | -| `time_interval_msec` | number | Optional | The time in between each wheeled odometry calculation.
Default: `500.0`
| +| `left_motors` | object | **Required** | A list containing the name of each of the bases' left [position-reporting motors](/components/motor/gpio/). | +| `right_motors` | object | **Required** | A list containing the name of each of the bases' right [position-reporting motors](/components/motor/gpio/). | +| `time_interval_msec` | number | Optional | The time in milliseconds between each wheeled odometry calculation.
Default: `500.0`
| From 5b8efa32b196a351669e63850f71b45ad882236d Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Wed, 6 Sep 2023 06:49:30 -0400 Subject: [PATCH 25/33] Apply suggestions from code review change tags --- docs/components/movement-sensor/wheeled-odometry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index 8e95761f09..bfe1296581 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -4,7 +4,7 @@ linkTitle: "wheeled-odometry" type: "docs" description: "Configure a wheeled-odometry movement sensor." images: ["/icons/components/imu.svg"] -tags: ["movement sensor", "components", "movement sensor"] +tags: ["movement sensor", "components", "encoder", "motor", "base", "wheeled", "odometry"] # SMEs: Rand, Martha --- From 8095af2beb1ad53ec0d35492883996c982e381b4 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Wed, 6 Sep 2023 06:52:54 -0400 Subject: [PATCH 26/33] Apply suggestions from code review make what this is more clear --- docs/components/movement-sensor/wheeled-odometry.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index bfe1296581..4a1e60966a 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -11,7 +11,8 @@ tags: ["movement sensor", "components", "encoder", "motor", "base", "wheeled", " Configure a `wheeled-odometry` movement sensor to implement _wheeled odometry_ on your robot. _Wheeled odometry_ is the estimation of the rate of change of position, orientation, linear velocity, and angular velocity using the dimensions of a base, calculated by measuring the movement of the motors through encoders. -This model of movement sensor uses [encoders](/components/encoder/) from [position reporting motors](/components/motor/) to get an odometry estimate of a wheeled base as it moves. +You don't have to have a specific piece of movement sensor hardware to implement this model of movement sensor on your robot. +This model uses [encoders](/components/encoder/) from [position reporting motors](/components/motor/) to get an odometry estimate of a wheeled base as it moves. With a configured `wheeled-odometry` movement sensor, your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base each time `time_interval_msec` elapses during a [session](/program/apis/sessions/). You can access these readings through the [movement sensor API](/components/movement-sensor/#api). From 0a657dd28552ae43f8e5ba286f4f54524c52c527 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Wed, 6 Sep 2023 06:56:08 -0400 Subject: [PATCH 27/33] Apply suggestions from code review --- docs/components/movement-sensor/wheeled-odometry.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index 4a1e60966a..8ff46bec24 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -11,12 +11,12 @@ tags: ["movement sensor", "components", "encoder", "motor", "base", "wheeled", " Configure a `wheeled-odometry` movement sensor to implement _wheeled odometry_ on your robot. _Wheeled odometry_ is the estimation of the rate of change of position, orientation, linear velocity, and angular velocity using the dimensions of a base, calculated by measuring the movement of the motors through encoders. -You don't have to have a specific piece of movement sensor hardware to implement this model of movement sensor on your robot. +Because of this method of estimation, you don't have to have a specific piece of movement sensor hardware to implement `wheeledodometry` on your robot. This model uses [encoders](/components/encoder/) from [position reporting motors](/components/motor/) to get an odometry estimate of a wheeled base as it moves. With a configured `wheeled-odometry` movement sensor, your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base each time `time_interval_msec` elapses during a [session](/program/apis/sessions/). You can access these readings through the [movement sensor API](/components/movement-sensor/#api). -For the best accuracy with odometry calculations, it is recommended you configure a time interval less of than `1000` milliseconds. +For the best accuracy with odometry calculations, it is recommended you configure a time interval of less than `1000` milliseconds. After configuring a `wheeled-odometry` movement sensor, you can operate your base with Viam's built-in services like the [navigation service](/services/navigation/). From 24dc83686dfb01f160798759effb61b020afdb7c Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Wed, 6 Sep 2023 06:56:44 -0400 Subject: [PATCH 28/33] fixup --- docs/components/movement-sensor/wheeled-odometry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index 8ff46bec24..d2782c7029 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -11,7 +11,7 @@ tags: ["movement sensor", "components", "encoder", "motor", "base", "wheeled", " Configure a `wheeled-odometry` movement sensor to implement _wheeled odometry_ on your robot. _Wheeled odometry_ is the estimation of the rate of change of position, orientation, linear velocity, and angular velocity using the dimensions of a base, calculated by measuring the movement of the motors through encoders. -Because of this method of estimation, you don't have to have a specific piece of movement sensor hardware to implement `wheeledodometry` on your robot. +Because of this method of estimation, you don't have to have a specific piece of movement sensor hardware to implement `wheeled-odometry` on your robot. This model uses [encoders](/components/encoder/) from [position reporting motors](/components/motor/) to get an odometry estimate of a wheeled base as it moves. With a configured `wheeled-odometry` movement sensor, your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base each time `time_interval_msec` elapses during a [session](/program/apis/sessions/). From af320a22e32d147ec435ab93a3d4991f4c8db0a0 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Wed, 6 Sep 2023 06:57:06 -0400 Subject: [PATCH 29/33] fixup blank line --- docs/components/movement-sensor/_index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/components/movement-sensor/_index.md b/docs/components/movement-sensor/_index.md index 03da1c57fb..8a06c78fc0 100644 --- a/docs/components/movement-sensor/_index.md +++ b/docs/components/movement-sensor/_index.md @@ -39,7 +39,6 @@ Model | Description [`gyro-mpu6050`](./mpu6050/) | A gyroscope/accelerometer manufactured by TDK InvenSense [`merged`](./merged/) | A model that allows you to aggregate the API methods supported by multiple sensors into a singular sensor client, effectively merging the models of the individual resources [`wheeled-odometry`](./wheeled-odometry/) | A model that uses [encoders](/components/encoder/) to get an odometry estimate from a wheeled base - [`fake`](./fake/) | Used to test code without hardware ## Control your movement sensor with Viam's client SDK libraries From 72afcd65904758848de5944222e364ad23789078 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Wed, 6 Sep 2023 06:57:42 -0400 Subject: [PATCH 30/33] Fixup --- docs/components/movement-sensor/wheeled-odometry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index d2782c7029..7f47172c22 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -29,7 +29,7 @@ You can access this property of a configured motor through the [motor API's `Get - Configure your rover as a [wheeled base component](/components/base/wheeled/). Make sure to configure the base width and circumference, as these measurements as a property of the base are vital for accurate odometry estimations by your movement sensor. This movement sensor accesses these values through the base's `GetProperties()` API method. - Configure each of the position-reporting motors [as motor components](/components/motor/). -- Then, proceed to [configure](#configuration) a `wheeledodometry` movement sensor with the name of each of the motor components. +- Then, proceed to [configure](#configuration) a `wheeled-odometry` movement sensor with the name of each of the motor components. ## Configuration From 5a8a967dec572c504b08c65d0c1a88e67b211af2 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Wed, 6 Sep 2023 06:58:57 -0400 Subject: [PATCH 31/33] Fixup modelname `wheeled-odometry` --- docs/components/movement-sensor/wheeled-odometry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index 7f47172c22..a7db86f8c9 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -41,7 +41,7 @@ Copy and paste the following: ```json {class="line-numbers linkable-line-numbers"} "name" : "", "type" : "movement_sensor", -"model" : "wheeledodometry", +"model" : "wheeled-odometry", "attributes" : { "base" : "", "left_motors" : ["", ""], From 498f4f00f6fd72a1ff98016f28350c8ef3996453 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Wed, 6 Sep 2023 07:02:09 -0400 Subject: [PATCH 32/33] Fixup `wheeledodometry` to `wheeled-odometry` --- docs/components/movement-sensor/wheeled-odometry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index a7db86f8c9..cf90942d54 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -54,7 +54,7 @@ Fill in and edit the attributes as applicable. ## Attributes -The following attributes are available for `wheeledodometry` movement sensors: +The following attributes are available for `wheeled-odometry` movement sensors: | Name | Type | Inclusion | Description | | ---- | ---- | --------- | ----------- | From 4ed6cea3ab6035703563ae231d12237a30ad20d7 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Wed, 6 Sep 2023 09:55:34 -0400 Subject: [PATCH 33/33] Update docs/components/movement-sensor/wheeled-odometry.md --- docs/components/movement-sensor/wheeled-odometry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/movement-sensor/wheeled-odometry.md b/docs/components/movement-sensor/wheeled-odometry.md index cf90942d54..0e7d40f571 100644 --- a/docs/components/movement-sensor/wheeled-odometry.md +++ b/docs/components/movement-sensor/wheeled-odometry.md @@ -11,7 +11,7 @@ tags: ["movement sensor", "components", "encoder", "motor", "base", "wheeled", " Configure a `wheeled-odometry` movement sensor to implement _wheeled odometry_ on your robot. _Wheeled odometry_ is the estimation of the rate of change of position, orientation, linear velocity, and angular velocity using the dimensions of a base, calculated by measuring the movement of the motors through encoders. -Because of this method of estimation, you don't have to have a specific piece of movement sensor hardware to implement `wheeled-odometry` on your robot. +Because of this method of estimation, you don't have to have a specific piece of movement sensor hardware to implement `wheeled-odometry` on your robot. This model uses [encoders](/components/encoder/) from [position reporting motors](/components/motor/) to get an odometry estimate of a wheeled base as it moves. With a configured `wheeled-odometry` movement sensor, your robot calculates an estimation of the position, orientation, linear velocity, and angular velocity of the wheeled base each time `time_interval_msec` elapses during a [session](/program/apis/sessions/).