goToPoint method
- NavigationPosition destination, {
- bool? wait,
- double? linearMPerSec,
- Map<
String, dynamic> ? extra,
Drive directly to destination with a closed-loop controller, without full path planning. Intended for short
hops and docking. wait defaults to true; with false, this returns immediately while navigating.
// Example:
final status = await myNavigationService.goToPoint(NavigationPosition(pose: Pose(x: 500, y: 0, z: 0)));
For more information, see the navigation service docs.
Implementation
Future<NavigationStatus> goToPoint(
NavigationPosition destination, {
bool? wait,
double? linearMPerSec,
Map<String, dynamic>? extra,
}) async {
final request = GoToPointRequest(
name: name,
destination: destination,
wait: wait,
linearMPerSec: linearMPerSec,
extra: extra?.toStruct(),
);
final response = await client.goToPoint(request, options: callOptions);
return response.status;
}