moveToPosition method

  1. @override
Future<void> moveToPosition(
  1. Pose pose, {
  2. Map<String, dynamic>? extra,
})
override

Move the end of the arm to the Pose specified.

// Create a pose for the arm to move to
final targetPose = Pose.fromBuffer([12, 0, 400, 0, 0, 1, 90]);

// Move the arm to the pose
await myArm.moveToPosition(targetPose);

For more information, see Arm component.

Implementation

@override
Future<void> moveToPosition(Pose pose, {Map<String, dynamic>? extra}) async {
  final request = MoveToPositionRequest()
    ..name = name
    ..to = pose
    ..extra = extra?.toStruct() ?? Struct();
  await client.moveToPosition(request);
}