Kinematics¶
Kinematics wraps MoveIt for robot model inspection, live state, trajectory planning/execution, and end-effector control.
Kinematics wrapper over olo.kinematics.v1.Kinematics.
Client interfaces
- class olo.kinematics.Kinematics[source]¶
Bases:
objectSync wrapper for the kinematics gRPC service.
- command_end_effector(position, *, robot_namespace='', planning_group=None, max_effort=None, accept_stall=False, timeout=5.0)[source]¶
Command the gripper end-effector to a position.
- execute_trajectory(trajectory, *, robot_namespace='', execution_timeout=10.0, timeout=None)[source]¶
- Overloads:
self, trajectory (Trajectory), robot_namespace (str), execution_timeout (float), timeout (Optional[float]) → None
self, trajectory (PlanResult), robot_namespace (str), execution_timeout (float), timeout (Optional[float]) → None
- Parameters:
trajectory (Trajectory | PlanResult)
robot_namespace (str)
execution_timeout (float)
timeout (float | None)
- Return type:
None
Execute a pre-planned trajectory (accepts a PlanResult directly).
By default the RPC deadline is derived from the trajectory’s own duration (plus slack) so long trajectories are never cancelled mid-motion; an explicit
timeoutoverrides it.
- get_joints(robot_namespace='', *, timeout=5.0)[source]¶
Fetch current joint states for a robot.
- Return type:
- Parameters:
- get_model(robot_namespace='', *, timeout=10.0)[source]¶
Fetch kinematics model metadata for a robot.
- Return type:
- Parameters:
- get_pose(robot_namespace='', *, planning_group=None, ee_link=None, timeout=10.0)[source]¶
Fetch the end-effector pose for a robot.
The pose is expressed in the group’s planning frame (see
PlanningGroup.planning_frameon the robot model).
- get_state(robot_namespace='', *, timeout=5.0)[source]¶
Fetch the executor-owned kinematics snapshot for a robot.
Activity reflects motion started by any client, not just this one.
- handle(namespace=None)[source]¶
Return a namespace-scoped kinematics handle.
- Return type:
- Parameters:
namespace (str | None)
- move_joints(joint_positions, *, robot_namespace='', planning_group=None, planning_timeout=5.0, execution_timeout=10.0, start_state=None, gripper_position=None, speed_scaling=0.5, timeout=None)[source]¶
Plan and execute a move to target joint positions.
- Return type:
- Parameters:
joint_positions (JointTarget)
robot_namespace (str)
planning_group (str | None)
planning_timeout (float)
execution_timeout (float)
start_state (JointStates | None)
gripper_position (float | None)
speed_scaling (float)
timeout (float | None)
- move_linear(target_pose, *, robot_namespace='', planning_group=None, ee_link=None, planning_timeout=5.0, execution_timeout=10.0, start_state=None, gripper_position=None, speed_scaling=0.5, timeout=None)[source]¶
Plan and execute a linear move to a target pose.
- move_linear_sequence(poses, *, robot_namespace='', planning_group=None, ee_link=None, blend_radius=0.0, planning_timeout=5.0, execution_timeout=10.0, start_state=None, speed_scaling=0.5, timeout=None)[source]¶
Plan and execute a linear sequence through poses.
- move_pose(target_pose, *, robot_namespace='', planning_group=None, ee_link=None, avoid_obstacles=False, planning_timeout=5.0, execution_timeout=10.0, start_state=None, gripper_position=None, speed_scaling=0.5, timeout=None)[source]¶
Plan and execute a move to a target pose (in the planning frame).
- Return type:
- Parameters:
- move_pose_sequence(poses, *, robot_namespace='', planning_group=None, ee_link=None, blend_radius=0.0, planning_timeout=5.0, execution_timeout=10.0, start_state=None, speed_scaling=0.5, timeout=None)[source]¶
Plan and execute a point-to-point sequence through poses.
- plan_joints(joint_positions, *, robot_namespace='', planning_group=None, planning_timeout=5.0, start_state=None, gripper_position=None, speed_scaling=0.5, timeout=None)[source]¶
Plan a trajectory to target joint positions.
- Return type:
- Parameters:
joint_positions (JointTarget)
robot_namespace (str)
planning_group (str | None)
planning_timeout (float)
start_state (JointStates | None)
gripper_position (float | None)
speed_scaling (float)
timeout (float | None)
- plan_linear(target_pose, *, robot_namespace='', planning_group=None, ee_link=None, planning_timeout=5.0, start_state=None, gripper_position=None, speed_scaling=0.5, timeout=None)[source]¶
Plan a linear trajectory to a target pose.
target_posemust be expressed in the group’s planning frame.- Return type:
- Parameters:
- plan_linear_sequence(poses, *, robot_namespace='', planning_group=None, ee_link=None, blend_radius=0.0, planning_timeout=5.0, start_state=None, speed_scaling=0.5, timeout=None)[source]¶
Plan a linear sequence through poses.
Requires at least two poses.
blend_radiusis applied to every non-final item; the final item always uses radius 0.
- plan_pose(target_pose, *, robot_namespace='', planning_group=None, ee_link=None, avoid_obstacles=False, planning_timeout=5.0, start_state=None, gripper_position=None, speed_scaling=0.5, timeout=None)[source]¶
Plan a trajectory to a target pose.
target_posemust be expressed in the group’s planning frame (seePlanningGroup.planning_frameon the robot model).
- plan_pose_sequence(poses, *, robot_namespace='', planning_group=None, ee_link=None, blend_radius=0.0, planning_timeout=5.0, start_state=None, speed_scaling=0.5, timeout=None)[source]¶
Plan a point-to-point sequence through poses.
Requires at least two poses.
blend_radiusis applied to every non-final item; the final item always uses radius 0.
- class olo.kinematics.KinematicsHandle[source]¶
Bases:
objectNamespace-scoped robot handle for common kinematics operations.
Optionally bound to a planning group. Unbound handles resolve the sole manipulator group lazily; multi-arm robots must call
group()first. Model-dependent properties fetch and cache the model on first access and may raise typed availability errors. Failed fetches are not cached.- __init__(client, namespace, *, group=None, model=None, _holder=None)[source]¶
Bind to a client and normalized namespace.
The kinematics model is fetched on first model-dependent use and cached for the handle’s lifetime — including across
group()rebinding. Failed fetches are not cached, so a later call retries. UseKinematics.get_model()for a fresh fetch outside this cache. Accessingmodel,ee,planning_frame, orend_effector_linkmay perform an RPC and raise typed errors such asOloFailedPrecondition.- Parameters:
client (Kinematics)
namespace (str)
group (str | None)
model (RobotModel | None)
_holder (_ModelHolder | None)
- execute_trajectory(trajectory, *, execution_timeout=10.0, timeout=None)[source]¶
- Overloads:
self, trajectory (Trajectory), execution_timeout (float), timeout (Optional[float]) → None
self, trajectory (PlanResult), execution_timeout (float), timeout (Optional[float]) → None
- Parameters:
trajectory (Trajectory | PlanResult)
execution_timeout (float)
timeout (float | None)
- Return type:
None
Execute a trajectory for this robot.
- get_state(*, timeout=5.0)[source]¶
Fetch the executor-owned kinematics snapshot for this robot.
- Return type:
KinematicsState- Parameters:
timeout (float)
- group(name)[source]¶
Return a handle bound to
name, sharing this handle’s model cache.- Return type:
- Parameters:
name (str)
- joints(*, timeout=5.0)[source]¶
Fetch current joint states for this robot.
- Return type:
- Parameters:
timeout (float)
- property model: RobotModel¶
Return the cached kinematics model for this robot.
Fetches the model on first access. Failed fetches are not cached.
- move_joints(joint_positions, *, planning_timeout=5.0, execution_timeout=10.0, start_state=None, gripper_position=None, speed_scaling=0.5, timeout=None)[source]¶
Move to target joint positions for this robot.
- Return type:
- Parameters:
joint_positions (JointTarget)
planning_timeout (float)
execution_timeout (float)
start_state (JointStates | None)
gripper_position (float | None)
speed_scaling (float)
timeout (float | None)
- move_linear(target_pose, *, ee_link=None, planning_timeout=5.0, execution_timeout=10.0, start_state=None, gripper_position=None, speed_scaling=0.5, timeout=None)[source]¶
Move linearly to a target pose for this robot.
- Return type:
- Parameters:
- move_linear_sequence(poses, *, ee_link=None, blend_radius=0.0, planning_timeout=5.0, execution_timeout=10.0, start_state=None, speed_scaling=0.5, timeout=None)[source]¶
Move through a linear sequence for this robot.
- Return type:
- Parameters:
- move_pose(target_pose, *, ee_link=None, avoid_obstacles=False, planning_timeout=5.0, execution_timeout=10.0, start_state=None, gripper_position=None, speed_scaling=0.5, timeout=None)[source]¶
Move to a target pose for this robot.
- Return type:
- Parameters:
- move_pose_sequence(poses, *, ee_link=None, blend_radius=0.0, planning_timeout=5.0, execution_timeout=10.0, start_state=None, speed_scaling=0.5, timeout=None)[source]¶
Move through a point-to-point sequence for this robot.
- Return type:
- Parameters:
- plan_joints(joint_positions, *, planning_timeout=5.0, start_state=None, gripper_position=None, speed_scaling=0.5, timeout=None)[source]¶
Plan to target joint positions for this robot.
- Return type:
- Parameters:
joint_positions (JointTarget)
planning_timeout (float)
start_state (JointStates | None)
gripper_position (float | None)
speed_scaling (float)
timeout (float | None)
- plan_linear(target_pose, *, ee_link=None, planning_timeout=5.0, start_state=None, gripper_position=None, speed_scaling=0.5, timeout=None)[source]¶
Plan a linear move for this robot.
- Return type:
- Parameters:
- plan_linear_sequence(poses, *, ee_link=None, blend_radius=0.0, planning_timeout=5.0, start_state=None, speed_scaling=0.5, timeout=None)[source]¶
Plan a linear sequence for this robot.
- Return type:
- Parameters:
- plan_pose(target_pose, *, ee_link=None, avoid_obstacles=False, planning_timeout=5.0, start_state=None, gripper_position=None, speed_scaling=0.5, timeout=None)[source]¶
Plan to a target pose for this robot.
- Return type:
- Parameters:
- class olo.kinematics.Gripper[source]¶
Bases:
EndEffectorHandleGripper end-effector handle.
- __init__(client, namespace, info, gripper_info)[source]¶
- Parameters:
client (Kinematics)
namespace (str)
info (EndEffector)
gripper_info (GripperInfo)
- Return type:
None
- close(*, max_effort=None, timeout=5.0)[source]¶
Close the gripper to its declared closed target.
Uses the closed position from the robot description and treats a stall as success, since closing onto an object is the expected grasp outcome.
- Return type:
- Parameters:
- goal(position, *, max_effort=None, timeout=5.0)[source]¶
Command the gripper to a raw controller-coordinate target.
positionis passed straight through to the active controller, so its meaning depends on the underlying hardware: it may be a physical aperture distance or an actuator joint value. Useopen()andclose()for portable, direction-independent intent. Treats a stall as success.- Return type:
- Parameters:
Types
- class olo.kinematics.RobotModel[source]¶
Bases:
objectKinematics model metadata for a robot.
- __init__(robot_namespace='', default_group='', groups=(), joints=(), end_effectors=())¶
- Parameters:
robot_namespace (str)
default_group (str)
groups (tuple[PlanningGroup, ...])
end_effectors (tuple[EndEffector, ...])
- Return type:
None
- end_effector_for(group)[source]¶
Return the end effector attached to a planning group, if any.
- Return type:
- Parameters:
group (str)
- class olo.kinematics.PlanningGroup[source]¶
Bases:
objectMoveIt planning group metadata.
- __init__(name, joints=(), end_effector_link='', planning_frame='', group_states=())¶
- class olo.kinematics.GroupState[source]¶
Bases:
objectNamed joint target declared by an SRDF planning group.
- __init__(name, joints)¶
- Parameters:
name (str)
joints (JointTarget)
- Return type:
None
- class olo.kinematics.JointStates[source]¶
Bases:
objectSampled joint states for a robot.
- __init__(names=(), positions=(), velocities=(), efforts=(), sample_time=None)¶
- class olo.kinematics.JointTarget[source]¶
Bases:
objectTarget joint positions (parallel names and positions).
- class olo.kinematics.Trajectory[source]¶
Bases:
objectJoint-space trajectory.
- __init__(joint_names=(), points=(), planning_group='')¶
- Parameters:
points (tuple[TrajectoryPoint, ...])
planning_group (str)
- Return type:
None
- class olo.kinematics.TrajectoryPoint[source]¶
Bases:
objectSingle trajectory sample; time_from_start is in seconds.
- class olo.kinematics.PlanResult[source]¶
Bases:
objectOutcome of a plan or move call; planning_time is in seconds.
- __init__(trajectory, planning_time)¶
- Parameters:
trajectory (Trajectory)
planning_time (float)
- Return type:
None
- class olo.kinematics.GripperInfo[source]¶
Bases:
objectGripper metadata from the robot model.
open_positionandclosed_positionare the semantic targets declared by the robot description (SRDF group states). They are not assumed to equalmax_position/min_positionbecause some grippers open at the lower joint limit.
- class olo.kinematics.EndEffector[source]¶
Bases:
objectEnd-effector metadata from the robot model.
- __init__(parent_group, parent_link, planning_group, gripper)¶
- Parameters:
parent_group (str)
parent_link (str)
planning_group (str)
gripper (GripperInfo)
- Return type:
None
- property type: EndEffectorType¶
Classify the end-effector kind.
Enums
Import from olo/kinematics:
The TypeScript surface mirrors the Python module: method names are
camelCase and keyword arguments become an options object with
millisecond timeouts (timeoutMs, planningTimeoutMs,
executionTimeoutMs) and shared planning options such as
speedScaling (default 0.5, range (0, 1]).
Client interfaces
Kinematics — service wrapper for model/state reads, planning, execution, and end-effector commands.
KinematicsHandle — namespace-scoped robot handle with a lazily cached model (created via
client.kinematics.handle()).Gripper — gripper end-effector handle (
await robot.kinematics.getEndEffector()), withgoal(),open(), andclose().
Types
RobotModel — model metadata plus
group()resolution.PlanningGroup — MoveIt planning group metadata and SRDF group states.
GroupState — named SRDF joint target for a planning group.
groupState — resolve a named group state on a planning group.
JointInfo — joint limits and type.
JointStates — sampled joint states plus
positionByName.JointTarget — parallel joint names and positions.
Trajectory / TrajectoryPoint — joint-space trajectory data (
timeFromStartanddurationin seconds).PlanResult / MoveResult — plan outcome with
planningTimeandduration.GripperInfo / GripperResult — gripper metadata and command outcome.
EndEffector — end-effector metadata from the robot model.
Enums