Skip to content

Commit

Permalink
Apply suggestions from rand/martha inline code review
Browse files Browse the repository at this point in the history
Co-authored-by: randhid <[email protected]>
  • Loading branch information
sguequierre and randhid authored Sep 5, 2023
1 parent 0d485e5 commit eef4f19
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions docs/components/movement-sensor/wheeled-odometry.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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" %}}

Expand Down Expand Up @@ -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. <br> Default: `500.0` </br> |

0 comments on commit eef4f19

Please sign in to comment.