From 7e3134337e0e3251bda90b38d8f15efce6f97a01 Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Tue, 7 Oct 2025 13:11:24 +0200 Subject: [PATCH] Update motion.py --- src/viam/services/motion/motion.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/viam/services/motion/motion.py b/src/viam/services/motion/motion.py index 0f2f52d4e..4ea5fc465 100644 --- a/src/viam/services/motion/motion.py +++ b/src/viam/services/motion/motion.py @@ -356,18 +356,15 @@ async def get_pose( # Note that the example uses the ``Gripper`` class, but any component class that inherits from ``ComponentBase`` will work # (``Arm``, ``Base``, etc). - # Create a `component_name`: - component_name = "my_gripper" - from viam.components.gripper import Gripper from viam.services.motion import MotionClient # Assume that the connect function is written and will return a valid machine. - robot = await connect() + machine = await connect() motion = MotionClient.from_robot(robot=machine, name="builtin") gripperPoseInWorld = await motion.get_pose(component_name="my_gripper", - destination_frame="world") + destination_frame="world") Args: component_name (str): Name of a component on a robot.