poses method
override
Get the current common_pb.PoseInFrame of each body tracked by this PoseTracker, keyed by body name.
If bodyNames is empty, the poses of all tracked bodies are returned.
// Get the poses of specific bodies
var poses = await myPoseTracker.poses(['left_hand', 'right_hand']);
var leftHand = poses['left_hand'];
// Get the poses of every tracked body
var allPoses = await myPoseTracker.poses([]);
Implementation
@override
Future<Map<String, common_pb.PoseInFrame>> poses(List<String> bodyNames, {Map<String, dynamic>? extra}) async {
final request = GetPosesRequest()
..name = name
..bodyNames.addAll(bodyNames)
..extra = extra?.toStruct() ?? Struct();
final response = await client.getPoses(request, options: callOptions);
return response.bodyPoses;
}