Skip to content

Commit 87c6650

Browse files
Apply jessamy suggestions from code review rearrange order
Co-authored-by: JessamyT <[email protected]>
1 parent 6d7b767 commit 87c6650

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

docs/services/navigation/_index.md

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -585,10 +585,11 @@ An example of a `Compass Heading` reading:
585585
heading, err := gps.CompassHeading(context.Background, nil)
586586
```
587587

588-
If you want to read compass headings, [configure a capable movement sensor](/components/movement-sensor/#configuration) on your robot.
589-
The movement sensor API's [`GetCompassHeading()`](/components/movement-sensor/#getcompassheading) takes compass heading readings.
590588
Use compass heading readings to determine the *bearing* of your robot, or, the [cardinal direction](https://en.wikipedia.org/wiki/Cardinal_direction) that your robot is facing.
591589

590+
To read compass headings, [configure a capable movement sensor](/components/movement-sensor/#configuration) on your robot.
591+
Then use the movement sensor API's [`GetCompassHeading()`](/components/movement-sensor/#getcompassheading) method to get readings from the sensor.
592+
592593
### Orientation
593594

594595
The following {{< glossary_tooltip term_id="model" text="models" >}} of [movement sensor](/components/movement-sensor/) take orientation measurements:
@@ -603,10 +604,14 @@ An example of an `Orientation` reading:
603604
orientation, err := imuwit.Orientation(context.Background, nil)
604605
```
605606

606-
If you want to read orientation, [configure a capable movement sensor](/components/movement-sensor/#configuration) on your robot.
607-
The movement sensor API's [`GetOrientation()`](/components/movement-sensor/#getorientation) takes orientation readings.
607+
Use orientation readings to determine the orientation of an object in 3D space as an [*orientation vector*](/internals/orientation-vector/).
608+
An orientation vector indicates how it is rotated relative to an origin coordinate system around the x, y, and z axes.
609+
You can choose the origin reference frame by configuring it using Viam's [frame system](/services/frame-system/).
610+
The `GetOrientation` readings will report orientations relative to that initial frame.
611+
612+
To read orientation, first [configure a capable movement sensor](/components/movement-sensor/#configuration) on your robot.
608613
Additionally, follow [these instructions](/services/frame-system/#configuration) to configure the geometries of each component of your robot within the [frame system](/services/frame-system/).
609-
Use orientation readings to determine the orientation of an object in 3D space as an "orientation vector", or, its position within the [cartesian coordinate system](https://en.wikipedia.org/wiki/Cartesian_coordinate_system) relative to some specific `origin` point that you, the user, need to choose and configure for your robot in Viam's [frame system](/services/frame-system/).
614+
Then use the movement sensor API's [`GetOrientation()`](/components/movement-sensor/#getorientation) method to get orientation readings.
610615

611616
### Angular Velocity
612617

@@ -624,10 +629,11 @@ An example of an `AngularVelocity` reading:
624629
angularVelocity, err := imu.AngularVelocity(context.Background, nil)
625630
```
626631

627-
If you want to get an angular velocity reading, first [configure a capable movement sensor](/components/movement-sensor/#configuration) on your robot.
628-
The movement sensor API's [`GetAngularVelocity()`](/components/movement-sensor/#getangularvelocity) takes angular velocity readings.
629632
Use angular velocity readings to determine the speed and direction at which your robot is rotating.
630633

634+
To get an angular velocity reading, first [configure a capable movement sensor](/components/movement-sensor/#configuration) on your robot.
635+
Then use the movement sensor API's [`GetAngularVelocity()`](/components/movement-sensor/#getangularvelocity) method to get angular velocity readings from the sensor.
636+
631637
### Position
632638

633639
The following {{< glossary_tooltip term_id="model" text="models" >}} of the [movement sensor](/components/movement-sensor/) component take position measurements:
@@ -643,10 +649,11 @@ An example of a `Position` reading:
643649
position, altitude, err:= imu.Position(context.Background, nil)
644650
```
645651

646-
If you want to get a position, [configure a capable movement sensor](/components/movement-sensor/#configuration) on your robot.
647-
The movement sensor API's [`GetPosition()`](/components/movement-sensor/#getposition) takes position readings.
648-
The suggested components allow you to get the *absolute* position of components through their Positions readings for use in the [motion service](/services/motion/) and [navigation service](/services/navigation/).
649652
Use position readings to determine the GPS coordinates of an object in 3D space or its position in the geographic coordinate system [(GCS)](https://en.wikipedia.org/wiki/Geographic_coordinate_system).
653+
These position readings reflect the *absolute* position of components.
654+
655+
To get a position, [configure a capable movement sensor](/components/movement-sensor/#configuration) on your robot.
656+
Then use the movement sensor API's [`GetPosition()`](/components/movement-sensor/#getposition) method to get position readings from the sensor.
650657

651658
### Linear Velocity
652659

@@ -664,10 +671,10 @@ An example of a `Linear Velocity` reading:
664671
linearVelocity, err := imu.LinearVelocity(context.Background, nil)
665672
```
666673

667-
If you want to get linear velocity, [configure a capable movement sensor](/components/movement-sensor/#configuration) on your robot.
668-
The movement sensor API's [`GetLinearVelocity()`](/components/movement-sensor/#getlinearvelocity) takes linear velocity readings.
669674
Use linear velocity readings to determine the speed at which your robot is moving through space.
670-
Use [linear acceleration](/services/navigation/#linear-acceleration) readings from another movement sensor to determine the rate of change of this speed.
675+
676+
To get linear velocity, [configure a capable movement sensor](/components/movement-sensor/#configuration) on your robot.
677+
Then use the movement sensor API's [`GetLinearVelocity()`](/components/movement-sensor/#getlinearvelocity) method to get linear velocity readings from the sensor.
671678

672679
### Linear Acceleration
673680

@@ -685,6 +692,7 @@ An example of a `Linear Acceleration` reading:
685692
linearAcceleration, err := imu.LinearAcceleration(context.Background, nil)
686693
```
687694

688-
If you want to get linear acceleration, [configure a capable movement sensor](/components/movement-sensor/#configuration) on your robot.
689-
The movement sensor API's [`GetLinearAcceleration()`](/components/movement-sensor/#getlinearacceleration) takes linear acceleration readings.
690-
Use linear acceleration readings to determine the rate of change of the [linear velocity](/services/navigation/#linear-velocity) of your robot, or, the speed at which your robot is moving through space.
695+
You can use linear acceleration readings to determine the rate of change of the [linear velocity](/services/navigation/#linear-velocity) of your robot, or, the speed at which your robot is moving through space.
696+
697+
To get linear acceleration, [configure a capable movement sensor](/components/movement-sensor/#configuration) on your robot.
698+
Then use the movement sensor API's [`GetLinearAcceleration()`](/components/movement-sensor/#getlinearacceleration) method to get linear acceleration readings from the sensor.

0 commit comments

Comments
 (0)