Robot model, joints, and poseΒΆ
Resolve the default robot namespace with Client.robot() and
inspect model metadata, joint state, and the current tool pose via
olo.Robot.kinematics.
from olo import Client
with Client() as client:
robot = client.robot()
arm = robot.kinematics
# Inspect robot model metadata loaded from MoveIt.
model = arm.model
print(f"Robot default planning group: {model.default_group}")
# Read the current joint state.
joints = arm.joints()
print(f"Joint count: {len(joints.names)}")
# Read the current end-effector pose.
current_pose = arm.pose()
print(current_pose.position)
import { connect } from "olo/web";
const client = connect();
const robot = await client.robot();
const arm = robot.kinematics;
// Inspect robot model metadata loaded from MoveIt.
const model = await arm.getModel();
console.log(`Robot default planning group: ${model.defaultGroup}`);
// Read the current joint state.
const joints = await arm.joints();
console.log(`Joint count: ${joints.names.length}`);
// Read the current end-effector pose.
const currentPose = await arm.pose();
console.log(`${currentPose.position}`);