Skip to content

Commit d7e92b1

Browse files
authored
DATA-940 add supplemental_transforms to get_pose (#196)
1 parent 5a77f98 commit d7e92b1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/viam/services/motion.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from typing import Any, Mapping, Optional
1+
from typing import Any, List, Mapping, Optional
22

33
from grpclib.client import Channel
44

5-
from viam.proto.common import PoseInFrame, ResourceName, WorldState
5+
from viam.proto.common import PoseInFrame, ResourceName, WorldState, Transform
66
from viam.proto.service.motion import (
77
GetPoseRequest,
88
GetPoseResponse,
@@ -109,6 +109,7 @@ async def get_pose(
109109
self,
110110
component_name: ResourceName,
111111
destination_frame: str,
112+
supplemental_transforms: Optional[List[Transform]] = [],
112113
*,
113114
extra: Optional[Mapping[str, Any]] = None,
114115
timeout: Optional[float] = None,
@@ -119,6 +120,7 @@ async def get_pose(
119120
Args:
120121
component_name (ResourceName): Name of a component on a robot.
121122
destination_frame (str): Name of the desired reference frame.
123+
supplemental_transforms (Optional[List[Transforms]]): Transforms used to augment the robot's frame while calculating pose.
122124

123125
Returns:
124126
``Pose`` (PoseInFrame): Pose of the given component and the frame in which it was observed.
@@ -129,6 +131,7 @@ async def get_pose(
129131
name=self.name,
130132
component_name=component_name,
131133
destination_frame=destination_frame,
134+
supplemental_transforms=supplemental_transforms,
132135
extra=dict_to_struct(extra),
133136
)
134137
response: GetPoseResponse = await self.client.GetPose(request, timeout=timeout)

0 commit comments

Comments
 (0)