Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/viam/services/motion/motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading