From deb5a8e7fa926170d83ef4c29fd4d6da6fd826b5 Mon Sep 17 00:00:00 2001 From: JessamyT Date: Tue, 7 Jan 2025 15:23:46 -0800 Subject: [PATCH] few more --- docs/dev/_index.md | 2 +- docs/dev/reference/changelog.md | 2 +- docs/dev/tools/cli.md | 6 +++--- docs/operate/reference/architecture/_index.md | 2 +- docs/tutorials/services/constrain-motion.md | 4 ++-- .../include/services/apis/generated/motion.md | 17 ++++++++++------- .../methods/go.motion.Move.constraints.md | 2 +- .../methods/python.motion.move.constraints.md | 2 +- 8 files changed, 20 insertions(+), 17 deletions(-) diff --git a/docs/dev/_index.md b/docs/dev/_index.md index 502f12ff26..f42669a0b3 100644 --- a/docs/dev/_index.md +++ b/docs/dev/_index.md @@ -48,7 +48,7 @@ aliases:
-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" %}} diff --git a/docs/dev/reference/changelog.md b/docs/dev/reference/changelog.md index b25020b687..f9135fa6bf 100644 --- a/docs/dev/reference/changelog.md +++ b/docs/dev/reference/changelog.md @@ -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. diff --git a/docs/dev/tools/cli.md b/docs/dev/tools/cli.md index 8357d13602..76a972cee7 100644 --- a/docs/dev/tools/cli.md +++ b/docs/dev/tools/cli.md @@ -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. @@ -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. @@ -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. diff --git a/docs/operate/reference/architecture/_index.md b/docs/operate/reference/architecture/_index.md index 3d03d613f5..1fb5908312 100644 --- a/docs/operate/reference/architecture/_index.md +++ b/docs/operate/reference/architecture/_index.md @@ -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) diff --git a/docs/tutorials/services/constrain-motion.md b/docs/tutorials/services/constrain-motion.md index 58c586456d..1aeaa71c85 100644 --- a/docs/tutorials/services/constrain-motion.md +++ b/docs/tutorials/services/constrain-motion.md @@ -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: diff --git a/static/include/services/apis/generated/motion.md b/static/include/services/apis/generated/motion.md index 799f658474..4a220be5c3 100644 --- a/static/include/services/apis/generated/motion.md +++ b/static/include/services/apis/generated/motion.md @@ -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. @@ -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. @@ -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. @@ -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`. - `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. - `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. @@ -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)_. @@ -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. @@ -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: @@ -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:** diff --git a/static/include/services/apis/overrides/methods/go.motion.Move.constraints.md b/static/include/services/apis/overrides/methods/go.motion.Move.constraints.md index d8910dd197..3ab0e93692 100644 --- a/static/include/services/apis/overrides/methods/go.motion.Move.constraints.md +++ b/static/include/services/apis/overrides/methods/go.motion.Move.constraints.md @@ -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. diff --git a/static/include/services/apis/overrides/methods/python.motion.move.constraints.md b/static/include/services/apis/overrides/methods/python.motion.move.constraints.md index 105fc8dd45..6dc85ebe2c 100644 --- a/static/include/services/apis/overrides/methods/python.motion.move.constraints.md +++ b/static/include/services/apis/overrides/methods/python.motion.move.constraints.md @@ -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.