move method

Future<bool> move(
  1. PoseInFrame destination,
  2. String componentName, {
  3. WorldState? worldState,
  4. Constraints? constraints,
  5. Map<String, dynamic>? extra,
})

Move the component named componentName to the destination, which can be a pose in the reference frame of any frame in the robot's frame system. Obstacles can be avoided by describing their geometries in worldState, and the path taken can be restricted with constraints. Returns whether the move succeeded.

// Example:
final destination = PoseInFrame(referenceFrame: 'world', pose: Pose(x: 100, y: 0, z: 100, oZ: 1));
final success = await myMotionService.move(destination, 'myArm');

For more information, see the motion service docs.

Implementation

Future<bool> move(
  common_pb.PoseInFrame destination,
  String componentName, {
  common_pb.WorldState? worldState,
  Constraints? constraints,
  Map<String, dynamic>? extra,
}) async {
  final request = MoveRequest(
    name: name,
    destination: destination,
    componentName: componentName,
    worldState: worldState,
    constraints: constraints,
    extra: extra?.toStruct(),
  );
  final response = await client.move(request, options: callOptions);
  return response.success;
}