-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ad360b
commit a5f12fc
Showing
4 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -434,6 +434,55 @@ waypoints, err := myNav.Waypoints(context.Background(), nil) | |
{{% /tab %}} | ||
{{< /tabs >}} | ||
|
||
### GetProperties | ||
|
||
Get information regarding the current navigation service. | ||
|
||
{{< tabs >}} | ||
{{% tab name="Python" %}} | ||
|
||
**Parameters:** | ||
|
||
- `timeout` [(Optional\[float\])](https://docs.python.org/library/typing.html#typing.Optional): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call. | ||
|
||
**Returns:** | ||
|
||
- [`MapType.ValueType`](https://python.viam.dev/autoapi/viam/proto/service/navigation/index.html#viam.proto.service.navigation.GetPropertiesResponse): Property information for the named navigation service. | ||
|
||
```python {class="line-numbers linkable-line-numbers"} | ||
my_nav = NavigationClient.from_robot(robot=robot, name="my_nav_service") | ||
|
||
# Get the properties of the current navigation service. | ||
nav_properties = await my_nav.get_properties() | ||
``` | ||
|
||
For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/services/navigation/client/index.html#viam.services.navigation.client.NavigationClient.get_properties). | ||
{{% /tab %}} | ||
{{% tab name="Go" %}} | ||
|
||
**Parameters:** | ||
|
||
- `ctx` [(Context)](https://pkg.go.dev/context): A Context carries a deadline, a cancellation signal, and other values across API boundaries. | ||
|
||
**Returns:** | ||
|
||
- [Properties](https://pkg.go.dev/go.viam.com/[email protected]/services/navigation#Properties): Information regarding the current navigation service. | ||
This includes the map type being ingested and used by the navigation service. | ||
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred. | ||
|
||
For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/services/navigation#Service). | ||
|
||
```go {class="line-numbers linkable-line-numbers"} | ||
ctx := context.Background() | ||
myNav, err := navigation.FromRobot(robot, "my_nav_service") | ||
|
||
// Get the properties of your current service | ||
navProperties, err := myNav.Properties(ctx) | ||
``` | ||
|
||
{{% /tab %}} | ||
{{< /tabs >}} | ||
|
||
### AddWaypoint | ||
|
||
Add a waypoint to the service's data storage. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters