getPose method

Future<PoseInFrame> getPose(
  1. String componentName,
  2. String destinationFrame, {
  3. List<Transform>? supplementalTransforms,
  4. Map<String, dynamic>? extra,
})

Get the current location and orientation of the component named componentName as a common_pb.PoseInFrame relative to destinationFrame. The robot's frame system can be augmented for the duration of the call with supplementalTransforms.

// Example:
final pose = await myMotionService.getPose('myArm', 'world');

For more information, see the motion service docs.

Implementation

Future<common_pb.PoseInFrame> getPose(
  String componentName,
  String destinationFrame, {
  List<common_pb.Transform>? supplementalTransforms,
  Map<String, dynamic>? extra,
}) async {
  final request = GetPoseRequest(
    name: name,
    componentName: componentName,
    destinationFrame: destinationFrame,
    supplementalTransforms: supplementalTransforms,
    extra: extra?.toStruct(),
  );
  final response = await client.getPose(request, options: callOptions);
  return response.pose;
}