Skip to content

Commit

Permalink
few more
Browse files Browse the repository at this point in the history
  • Loading branch information
JessamyT committed Jan 7, 2025
1 parent da72ffa commit deb5a8e
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/dev/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ aliases:

<div class="max-page frontpage">

Once you've set up your machine you can control your device and any attached physical hardware with [Viam APIs](/dev/reference/APIs), for example:
Once you've set up your machine you can control your device and any attached physical hardware with [Viam APIs](/dev/reference/apis/), for example:

{{< tabs class="horizontalheaders program" navheader="Examples">}}
{{% tab name="Drive a base" %}}
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/reference/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ Users can now have [access to different fleet management capabilities](/manage/m

{{% changelog date="2023-11-30" color="added" title="Authenticate with location API key" %}}

You can now use [API keys for authentication](/sdks/#authentication).
You can now use [API keys for authentication](/dev/tools/cli/#authenticate).
API keys allow you to assign the minimum required permissions for usage.
Location secrets, the previous method of authentication, is deprecated and will be removed in a future release.

Expand Down
6 changes: 3 additions & 3 deletions docs/dev/tools/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ By default, new organization API keys are created with **Owner** permissions, gi
You can change an API key's permissions from the Viam app on the [organizations page](/manage/reference/organize/) by clicking the **Show details** link next to your API key.
{{% /alert %}}

Once created, you can use the organization API key to authenticate future CLI sessions or to [use the SDKs](/sdks/#authentication).
Once created, you can use the organization API key to authenticate future CLI sessions or to [use the SDKs](/dev/reference/sdks/).
To switch to using an organization API key for authentication right away, [logout](#logout) then log back in using `viam login api-key`.

An organization can have multiple API keys.
Expand Down Expand Up @@ -195,7 +195,7 @@ By default, new location API keys are created with **Owner** permissions, giving
You can change an API key's permissions from the Viam app on the [organizations page](/manage/reference/organize/) by clicking the **Show details** link next to your API key.
{{% /alert %}}

Once created, you can use the location API key to authenticate future CLI sessions or to [connect to machines with the SDK](/sdks/#authentication).
Once created, you can use the location API key to authenticate future CLI sessions or to [connect to machines with the SDK](/dev/reference/sdks/).
To switch to using a location API key for authentication right away, [logout](#logout) then log back in using `viam login api-key`.

A location can have multiple API keys.
Expand Down Expand Up @@ -233,7 +233,7 @@ Keep these key values safe.
Authenticating using a machine part API key gives the authenticated CLI session full read and write access to your machine.
{{% /alert %}}

Once created, you can use the machine part API key to authenticate future CLI sessions or to [connect to your machine with the SDK](/sdks/#authentication).
Once created, you can use the machine part API key to authenticate future CLI sessions or to [connect to your machine with the SDK](/dev/reference/sdks/).
To switch to using a machine part API key for authentication right away, [logout](#logout) then log back in using `viam login api-key`.

A location can have multiple API keys.
Expand Down
2 changes: 1 addition & 1 deletion docs/operate/reference/architecture/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Now imagine you want to run code to turn on a fan when the temperature sensor re
- Configure the fan motor as a motor component and wire the fan motor relay to the same board as the sensor.
- Write your script using one of the Viam [SDKs](/dev/reference/sdks/), for example the Viam Python SDK, using the sensor API and motor API.
- You then run this code either locally on the SBC, or on a separate server.
See [Run code](/sdks/#run-code) for more options.
See [Create a headless app](/operate/control/headless-app/) for more information.
Your code connects to the machine, authenticating with API keys, and uses the [sensor API](/operate/reference/components/sensor/#api) to get readings and the [motor API](/operate/reference/components/motor/#api) to turn the motor on and off.

![A desktop computer (client in this case) sends commands to robot 1 (server) with gRPC over wifi.](/build/program/sdks/robot-client.png)
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/services/constrain-motion.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,10 @@ If we changed it to `theta=90` or `theta=270`, the gripper jaws would open verti

## Add a motion constraint

To keep the cup upright as the arm moves it from one place on the table to another, create a [linear constraint](/services/motion/constraints/#linear-constraint).
To keep the cup upright as the arm moves it from one place on the table to another, create a [linear constraint](/operate/reference/services/motion/constraints/#linear-constraint).
When you tell the robot to move the cup from one upright position to another, the linear constraint forces the gripper to move linearly and to maintain the upright orientation of the cup throughout the planned path.

You could try using an [orientation constraint](/services/motion/constraints/#orientation-constraint) instead, which would also constrain the orientation.
You could try using an [orientation constraint](/operate/reference/services/motion/constraints/#orientation-constraint) instead, which would also constrain the orientation.
However, since this opens up many more options for potential paths, it is much more computationally intensive than the linear constraint.

The code below creates a linear constraint and then uses that constraint to keep the cup upright and move it in a series of linear paths along the predetermined route while avoiding the obstacles we've defined:
Expand Down
17 changes: 10 additions & 7 deletions static/include/services/apis/generated/motion.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ The motion service takes the volumes associated with all configured machine comp
Transforms can be used to account for geometries that are attached to the robot but not configured as robot components.
For example, you could use a transform to represent the volume of a marker held in your machine's gripper.
Transforms are not added to the config or carried into later processes.
- `constraints` ([viam.proto.service.motion.Constraints](https://python.viam.dev/autoapi/viam/proto/service/motion/index.html#viam.proto.service.motion.Constraints)) (optional): Pass in [motion constraints](/services/motion/constraints/). By default, motion is unconstrained with the exception of obstacle avoidance.

- `constraints` ([viam.proto.service.motion.Constraints](https://python.viam.dev/autoapi/viam/proto/service/motion/index.html#viam.proto.service.motion.Constraints)) (optional): Pass in [motion constraints](/operate/reference/services/motion/constraints/). By default, motion is unconstrained with the exception of obstacle avoidance.
- `extra` (Mapping[[str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), Any]) (optional): Extra options to pass to the underlying RPC call.
- `timeout` ([float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (optional): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call.

Expand Down Expand Up @@ -145,7 +146,7 @@ Make sure the [SLAM service](/operate/reference/services/slam/) you use alongsid
- `destination` ([viam.proto.common.Pose](https://python.viam.dev/autoapi/viam/components/arm/index.html#viam.components.arm.Pose)) (required): The destination, which can be any [Pose](https://python.viam.dev/autoapi/viam/proto/common/index.html#viam.proto.common.Pose) with respect to the SLAM map's origin.
- `slam_service_name` ([viam.proto.common.ResourceName](https://python.viam.dev/autoapi/viam/gen/common/v1/common_pb2/index.html#viam.gen.common.v1.common_pb2.ResourceName)) (required): The `ResourceName` of the [SLAM service](/operate/reference/services/slam/) from which the SLAM map is requested.
- `configuration` ([viam.proto.service.motion.MotionConfiguration](https://python.viam.dev/autoapi/viam/gen/service/motion/v1/motion_pb2/index.html#viam.gen.service.motion.v1.motion_pb2.MotionConfiguration)) (optional):
The configuration you want to set across this machine for this motion service. This parameter and each of its fields are optional.
The configuration you want to set across this machine for this motion service. This parameter and each of its fields are optional.

- `obstacle_detectors` [(Iterable[ObstacleDetector])](https://python.viam.dev/autoapi/viam/proto/service/motion/index.html#viam.proto.service.motion.ObstacleDetector): The names of each [vision service](/operate/reference/services/vision/) and [camera](/operate/reference/components/camera/) resource pair you want to use for transient obstacle avoidance.
- `position_polling_frequency_hz` [(float)](https://docs.python.org/3/library/functions.html#float): The frequency in hz to poll the position of the machine.
Expand Down Expand Up @@ -189,7 +190,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `req` [(MoveOnMapReq)](https://pkg.go.dev/go.viam.com/rdk/services/motion#MoveOnMapReq):
A `MoveOnMapReq` which contains the following values:
A `MoveOnMapReq` which contains the following values:

- `ComponentName` [(resource.Name)](https://pkg.go.dev/go.viam.com/rdk/resource#Name): The `resource.Name` of the base to move.
- `Destination` [(spatialmath.Pose)](https://pkg.go.dev/go.viam.com/rdk/spatialmath#Pose): The destination, which can be any [Pose](https://python.viam.dev/autoapi/viam/proto/common/index.html#viam.proto.common.Pose) with respect to the SLAM map's origin.
Expand Down Expand Up @@ -291,7 +292,7 @@ Translation in obstacles is not supported by the [navigation service](/operate/r
- `obstacles` ([Sequence[viam.proto.common.GeoGeometry]](https://python.viam.dev/autoapi/viam/gen/common/v1/common_pb2/index.html#viam.gen.common.v1.common_pb2.GeoGeometry)) (optional): Obstacles to consider when planning the motion of the component, with each represented as a `GeoGeometry`. <ul><li> Default: `None` </li></ul>
- `heading` ([float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (optional): The compass heading, in degrees, that the machine's movement sensor should report at the `destination` point. <ul><li> Range: `[0-360)` `0`: North, `90`: East, `180`: South, `270`: West </li><li>Default: `None`</li></ul>
- `configuration` ([viam.proto.service.motion.MotionConfiguration](https://python.viam.dev/autoapi/viam/gen/service/motion/v1/motion_pb2/index.html#viam.gen.service.motion.v1.motion_pb2.MotionConfiguration)) (optional):
The configuration you want to set across this machine for this motion service. This parameter and each of its fields are optional.
The configuration you want to set across this machine for this motion service. This parameter and each of its fields are optional.

- `obstacle_detectors` [(Iterable[ObstacleDetector])](https://python.viam.dev/autoapi/viam/proto/service/motion/index.html#viam.proto.service.motion.ObstacleDetector): The names of each [vision service](/operate/reference/services/vision/) and [camera](/operate/reference/components/camera/) resource pair you want to use for transient obstacle avoidance.
- `position_polling_frequency_hz` [(float)](https://docs.python.org/3/library/functions.html#float): The frequency in hz to poll the position of the machine.
Expand Down Expand Up @@ -335,7 +336,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `req` [(MoveOnGlobeReq)](https://pkg.go.dev/go.viam.com/rdk/services/motion#MoveOnGlobeReq):
A `MoveOnGlobeReq` which contains the following values:
A `MoveOnGlobeReq` which contains the following values:

- `componentName` [(resource.Name)](https://pkg.go.dev/go.viam.com/rdk/resource#Name): The `resource.Name` of the base to move.
- `destination` [(\*geo.Point)](https://pkg.go.dev/github.com/kellydunn/golang-geo#Point): The location of the component's destination, represented in geographic notation as a [Point](https://pkg.go.dev/github.com/kellydunn/golang-geo#Point) _(lat, lng)_.
Expand Down Expand Up @@ -415,6 +416,7 @@ You can use the `supplemental_transforms` argument to augment the machine's exis
When `supplemental_transforms` are provided, a frame system is created within the context of the `GetPose` function.
This new frame system builds off the machine's frame system and incorporates the `Transform`s provided.
If the result of adding the `Transform`s results in a disconnected frame system, an error is thrown.

- `extra` (Mapping[[str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), Any]) (optional): Extra options to pass to the underlying RPC call.
- `timeout` ([float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (optional): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call.

Expand Down Expand Up @@ -491,7 +493,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/
- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `componentName` [(resource.Name)](https://pkg.go.dev/go.viam.com/rdk/resource#Name): The `resource.Name` of the piece of the machine whose pose is returned.
- `destinationFrame` [(string)](https://pkg.go.dev/builtin#string): The name of the frame with respect to which the component's pose is reported.
- `supplementalTransforms` [([]*referenceframe.LinkInFrame)](https://pkg.go.dev/go.viam.com/rdk/referenceframe#LinkInFrame): An optional list of `LinkInFrame`s.
- `supplementalTransforms` [([]\*referenceframe.LinkInFrame)](https://pkg.go.dev/go.viam.com/rdk/referenceframe#LinkInFrame): An optional list of `LinkInFrame`s.
A `LinkInFrame` represents an additional frame which is added to the machine's frame system.
It consists of:

Expand All @@ -500,11 +502,12 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/
When `supplementalTransforms` are provided, a frame system is created within the context of the `GetPose` function.
This new frame system builds off the machine's frame system and incorporates the `LinkInFrame`s provided.
If the result of adding the `LinkInFrame`s results in a disconnected frame system, an error is thrown.

- `extra` [(map[string]interface{})](https://go.dev/blog/maps): Extra options to pass to the underlying RPC call.

**Returns:**

- [(*referenceframe.PoseInFrame)](https://pkg.go.dev/go.viam.com/rdk/referenceframe#PoseInFrame): The pose of the component.
- [(\*referenceframe.PoseInFrame)](https://pkg.go.dev/go.viam.com/rdk/referenceframe#PoseInFrame): The pose of the component.
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

**Example:**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Pass in optional [motion constraints](/services/motion/constraints/).
Pass in optional [motion constraints](/operate/reference/services/motion/constraints/).
By default, motion is unconstrained with the exception of obstacle avoidance.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Pass in [motion constraints](/services/motion/constraints/).
Pass in [motion constraints](/operate/reference/services/motion/constraints/).
By default, motion is unconstrained with the exception of obstacle avoidance.

0 comments on commit deb5a8e

Please sign in to comment.