Readonly
nameThe name of the resource.
Add a waypoint to the service's data storage.
A waypoint described by latitude and longitude values.
const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
const location = { latitude: 40.7128, longitude: -74.006 };
await navigation.addWayPoint(location);
For more information, see Navigation API.
Get the current location of the robot.
const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
const location = await navigation.getLocation();
For more information, see Navigation API.
Get the mode the robot is operating in.
const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
const mode = await navigation.getMode();
For more information, see Navigation API.
Get a list of obstacles.
const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
const obstacles = await navigation.getObstacles();
For more information, see Navigation API.
Gets the list of paths known to the navigation service.
const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
const paths = await navigation.getPaths();
For more information, see Navigation API.
Gets information on the properties of the current navigation service.
const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
const properties = await navigation.getProperties();
For more information, see Navigation API.
Get an array of waypoints currently in the service's data storage.
const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
const waypoints = await navigation.getWayPoints();
For more information, see Navigation API.
Remove a waypoint from the service's data storage.
The MongoDB ObjectID of the waypoint to remove from the service's data storage.
const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
// Remove the first waypoint
if (waypoints.length > 0) {
await navigation.removeWayPoint(waypoints[0].id);
}
For more information, see Navigation API.
Set the mode the robot is operating in.
The mode for the service to operate in.
const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
// Set the mode to 2 which corresponds to WAYPOINT
await navigation.setMode(2);
For more information, see Navigation API.
A gRPC-web client for a Navigation service.