Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCS-906: Document wheeled-odometry model of movement sensor #1734

Merged
merged 35 commits into from
Sep 6, 2023

Conversation

sguequierre
Copy link
Collaborator

  • Documents this model of movement sensor, which aggregates encoders from an encoded wheeled based together and performs an odometry assessment. Tried to make this clear and include some info about what odometry is for newer users, needs SME review for-sure

@sguequierre sguequierre requested a review from randhid September 1, 2023 16:28
@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label Sep 1, 2023
Copy link
Member

@randhid randhid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs a lot more context for why it's useful. It's a pretty flexible driver, it can will be used as a movement sensor for first-pass controls using the base's hardware or as an input to slam or sensor fusion algorithms.

docs/components/movement-sensor/_index.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeledodometry.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeledodometry.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeledodometry.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeledodometry.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeledodometry.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeledodometry.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeledodometry.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeledodometry.md Outdated Show resolved Hide resolved
@sguequierre sguequierre requested a review from randhid September 1, 2023 18:01
Copy link
Member

@randhid randhid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd like a bit more explanation as to what this is and why it's useful in the preamble. BUt getting there with the mechanics.

docs/components/movement-sensor/wheeledodometry.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeledodometry.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeledodometry.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeledodometry.md Outdated Show resolved Hide resolved

## 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This instruction is specific to the gpio motor model only - I would say "pick out a motor that can report it's position through encoders"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put this on line 25-- lmk if you want me to move to be in that first sentence! I also moved a lot of the info
i had on the bottom of the page before so that people scanning can see the info about why it's useful more easily-- lmk what you think

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happy to add a few more sentences like this is why this is useful if you want!

@sguequierre sguequierre requested a review from randhid September 1, 2023 20:23
Copy link
Contributor

@andf-viam andf-viam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some small language suggestions. Thanks!

type: "docs"
description: "Configure a wheeled-odometry movement sensor."
images: ["/icons/components/imu.svg"]
tags: ["movement sensor", "components", "movement sensor"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra movement sensor

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha removed! MAking better tags

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does This model refer to? wheeled-odometry is introduced as a movement sensor.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added clarification that it is movement sensor

docs/components/movement-sensor/wheeled-odometry.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeled-odometry.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeled-odometry.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeled-odometry.md Outdated Show resolved Hide resolved
docs/components/movement-sensor/wheeled-odometry.md Outdated Show resolved Hide resolved
"right_motors" : ["<your-base-right-motor-name-1", "your-base-right-motor-name-2>"],
"time-interval-msec": <number>
}
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure: Does this require depends_on like other things that function as other components? (Like the visual odometry sensor depends_on a camera.) I think ... no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the validation function of most built-in models appends all dependencies, they are implicit and don't need to be explicitly configured.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but they will show up in your config once added as dependencies, you just don't have to configure them as a user - we use the helper functions to do that for you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks @randhid !

| `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. <br> Default: `500.0` </br> |

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.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

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/).
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@sguequierre sguequierre changed the title DOCS-906: Document wheeledodometry model of movement sensor DOCS-906: Document wheeled-odometry model of movement sensor Sep 6, 2023
@viambot
Copy link
Member

viambot commented Sep 6, 2023

You can view a rendered version of the docs from this PR at https://docs-test.viam.dev/e07588d22bc05fea44171501ae07d4021a323370/public

@sguequierre sguequierre merged commit 145476b into viamrobotics:main Sep 6, 2023
5 checks passed
@sguequierre sguequierre deleted the DOCS-906/wheeled-encoder branch September 6, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to build This pull request is marked safe to build from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants