planToPoint method

Future<Plan> planToPoint(
  1. NavigationPosition destination, {
  2. NavigationPosition? start,
  3. Map<String, dynamic>? extra,
})

Compute a Plan from the robot, or from start, to destination without moving. Pass the result to executePlan to drive it. Throws if no path exists.

// Example:
final plan = await myNavigationService.planToPoint(NavigationPosition(pose: Pose(x: 1000, y: 0, z: 0)));

For more information, see the navigation service docs.

Implementation

Future<Plan> planToPoint(NavigationPosition destination, {NavigationPosition? start, Map<String, dynamic>? extra}) async {
  final request = PlanToPointRequest(name: name, destination: destination, start: start, extra: extra?.toStruct());
  final response = await client.planToPoint(request, options: callOptions);
  return response.plan;
}