Move an arm
Viam exposes multiple ways to command an arm. Three questions sort them:
- What do you know about the destination? A Cartesian target (a pose in space), a region of acceptable poses, an ordered list of goals, or a specific joint configuration each point to a different call.
- Does the path matter, or only the endpoint? If you need a straight line, a fixed orientation, or any other rule about the path itself, you need constraints.
- Do you want obstacle avoidance and inverse kinematics (IK) picked for you, or fine manual control? The motion service picks the IK solution and plans around obstacles for you; direct joint commands execute exactly the angles you send.
| Pattern | Input | Obstacle avoidance | Path-shape control | When to pick |
|---|---|---|---|---|
| Move to a pose | Cartesian target | Yes | No | You know where the end effector needs to go and want the planner to choose the path. |
| Move with constraints | Cartesian target + rules | Yes | Yes | The shape of the motion matters (straight-line tool path, level end effector). |
| Relax a goal with a pose cloud | Cartesian target + tolerances | Yes | No | Any pose in a region will do, or an exact goal plans slowly or keeps failing. |
| Move through waypoints | Ordered list of Cartesian and/or joint goals | Yes | Partial | The arm must pass through specific intermediate goals in one continuous trajectory. |
| Move by joint positions | Joint angles | No | Direct | You know the joint angles, need predictable motion between known configurations, or want to avoid the planner picking an unexpected IK solution. |
| Stream joint positions | Joint waypoints with times, sent while the arm moves | No | Direct | You are computing the trajectory as the motion runs, from a teleoperation feed or a control loop. |
| Arm-level Cartesian move | Cartesian target | No | No | You have a pose and deliberately want the arm’s own IK, with no planner, frame system, or obstacle checking. |
For the four constraint types the planner enforces, see Configure motion constraints.
Pick and place
Pick-and-place is the point where motion planning, vision, and gripper control meet. Each service works on its own, but the failure modes that matter most (the gripper closing on air, a depth estimate that crashes the arm into the table) only appear when all three run together.
The workflow splits into two stages so each can be developed and debugged independently:
- Pick covers detection, approach, and grasp. The arm moves to a pre-grasp pose above the object, descends, closes the gripper on the object, and lifts.
- Place covers transport and release. The arm moves the grasped object to a target location, descends, opens the gripper, and retreats.
Both stages reuse the obstacle definitions and geometry-attachment patterns from Obstacles and the arm-motion patterns from the table above.
How-tos
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!