Skip to content

Commit

Permalink
DOCS-1278: Add clearer requirements for movement sensor stack with na…
Browse files Browse the repository at this point in the history
…vigation (#2047)

Co-authored-by: Naomi Pentrel <[email protected]>
  • Loading branch information
sguequierre and npentrel authored Oct 17, 2023
1 parent f23ebf2 commit d2c680e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
17 changes: 9 additions & 8 deletions docs/services/navigation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,20 @@ The Navigation service is the stateful definition of Viam's [motion service](/se
It uses GPS to autonomously navigate a rover [base](/components/base/) to user defined endpoints called waypoints.
Configure your base with a navigation service, add waypoints, and set the mode of the service to [**Waypoint**](#setmode) to move your rover along a defined path at your desired motion configuration.

## Configuration
## Requirements

You must configure a [base](/components/base/) with a [movement sensor](/components/movement-sensor/) as part of your robot to configure a Navigation service.
You must configure a [base](/components/base/) with [movement sensors](/components/movement-sensor/) as part of your robot to configure a Navigation service.

{{% alert title="Important" color="note" %}}
To use the navigation service, configure a stack of movement sensors that implement the following methods in their {{< glossary_tooltip term_id="model" text="models'" >}} implementations of the [movement sensor API](/components/movement-sensor/#api):

Make sure the [movement sensor](/components/movement-sensor/) you use supports [`GetPosition()`](/components/movement-sensor/#getposition) and at least one of [`GetCompassHeading()`](/components/movement-sensor/#getcompassheading) or [`GetOrientation()`](/components/movement-sensor/#getorientation) in its {{< glossary_tooltip term_id="model" text="model's" >}} implementation of the [Movement Sensor API](/components/movement-sensor/#api).
- [`GetPosition()`](/components/movement-sensor/#getposition)
- [`GetAngularVelocity()`](/components/movement-sensor/#getangularvelocity)
- [`GetLinearVelocity()`](/components/movement-sensor/#getlinearvelocity)
- [`GetCompassHeading()`](/components/movement-sensor/#getcompassheading)

- It must support `GetPosition()` to report the robot's current GPS location.
- It must also support either `GetCompassHeading()` or `GetOrientation()` to report which way the robot is facing.
- If your movement sensor provides multiple methods, your robot will default to using the values returned by `GetCompassHeading()`.
See [navigation concepts](#navigation-concepts) for more info on how to implement and use movement sensors taking these measurements.

{{% /alert %}}
## Configuration

{{< tabs >}}
{{% tab name="Config Builder" %}}
Expand Down
7 changes: 5 additions & 2 deletions docs/tutorials/services/navigate-with-rover-base.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,17 @@ Follow this tutorial to get started using Viam's Navigation service to help your

{{<imgproc src="/tutorials/navigate-with-rover-base/leo-in-office.png" resize="500x" declaredimensions=true alt="Leo rover that is navigating using the navigation service in a robotics lab.">}}

2. **A movement sensor with GPS position and angular and linear velocity readings**
2. **A movement sensor with GPS position, compass heading, and angular and linear velocity readings**

We used three movement sensors to satisfy these requirements:

1. A [SparkFun GPS-RTK-SMA Breakout](https://www.sparkfun.com/products/16481) [movement sensor](/components/movement-sensor/) configured as a [`gps-nmea-rtk-serial`](/components/movement-sensor/gps/gps-nmea-rtk-serial/) model, providing GPS position measurements.
1. A [SparkFun GPS-RTK-SMA Breakout](https://www.sparkfun.com/products/16481) [movement sensor](/components/movement-sensor/) configured as a [`gps-nmea-rtk-serial`](/components/movement-sensor/gps/gps-nmea-rtk-serial/) model, providing GPS position and compass heading measurements.
2. A [`wheeled-odometry`](/components/movement-sensor/wheeled-odometry/) model gathering angular and linear velocity information from the [encoders](/components/encoder/) wired to our base's [motors](/components/motor/).
3. A [`merged`](/components/movement-sensor/merged/) model aggregating the readings together for the navigation service to consume.

You can use any combo of movement sensors you want as long as you are getting all the types of measurements required.
See [the navigation service](/services/navigation/#requirements) for more info on movement sensor requirements.

{{% alert title="Tip" color="tip" %}}

If you are using different hardware, the navigation setup process will be mostly the same, but you will need to substitute your robot's components.
Expand Down

0 comments on commit d2c680e

Please sign in to comment.