Control Module

Capability overview

  • Chassis Control Interface: Supports chassis control mode switching, global position movement, relative position movement, and forward/backward velocity control, and provides virtual zero point setting, pose, odometry, and real-time motion status feedback.

  • Head control interface: Supports head pitch and yaw attitude control and attitude reset, and provides head attitude, joint state, and motor status feedback.

  • Robotic arm control interface: Supports dual-arm control mode configuration, joint position control and end-effector pose control for left and right robotic arms, and provides joint state and end-effector pose feedback.

  • Master arm control interface: When the robot is configured with master arm hardware and related services, it supports left and right master arm control mode configuration, joint position and end-effector pose control, and provides joint state, end-effector pose, and trigger input feedback.

  • Gripper control interface: Supports opening/closing position control for left and right grippers, and provides gripper position and joint state feedback.

  • Torso Lift Control Interface: Supports torso lift position control, and provides lift position and joint state feedback.

Robot Control Interface

set_manipulator_control_mode interface reference
FieldDetails
Functionset_manipulator_control_mode()
Signaturedef set_manipulator_control_mode(manipulator_control_mode_param: ManipulatorControlModeParam, timeout) -> ExecutionResult
DescriptionSet the robot-arm control mode
ParameterManipulatorControlModeParam.mode: Robot-arm control mode. MANIPULATOR_END_POSE: End-effector pose control mode; this is the default when SDK mode is enabled. MANIPULATOR_JOINT_POSITIONS: Joint-position control mode.
Return ValueExecutionResult
NotesSetting the control mode separately for the left or right arm is not currently supported. Call this interface through robot_control. Do not switch control modes while the robot arms are moving, because doing so can cause an impact on the motors.

Example:

robot.system.set_work_mode(
    RobotModeParam(mode=RobotWorkMode.SDK)
)
robot.robot_control.set_manipulator_control_mode(
    ManipulatorControlModeParam(
        mode=ManipulatorControlMode.MANIPULATOR_END_POSE
    )
)
get_manipulator_control_mode interface reference
FieldDetails
Functionget_manipulator_control_mode()
Signaturedef get_manipulator_control_mode(timeout) -> ManipulatorControlModeParam
DescriptionGet the robot-arm control mode
ParameterNone
Return ValueManipulatorControlModeParam
NotesNone

Example:

mode = robot.robot_control.get_manipulator_control_mode()
print(mode)
emergency_stop interface reference
FieldDetails
Functionemergency_stop()
SignatureNone
DescriptionStop robot motion in an emergency
ParameterNone
Return ValueExecutionResult
Notes

Example:

result = robot.robot_control.emergency_stop()
print(result.is_success)
recover_emergency_stop interface reference
FieldDetails
Functionrecover_emergency_stop()
SignatureNone
DescriptionRecover from the emergency-stop state
ParameterNone
Return ValueExecutionResult
Notes

Example:

# Recovery
result = robot.robot_control.recover_emergency_stop()
print(result.is_success)
homing interface reference
FieldDetails
Functionhoming()
SignatureNone
DescriptionHome the joints
ParameterNone
Return ValueExecutionResult
Notes

Example:

# Homing
result = robot.robot_control.homing()
print(result.is_success)

Chassis Control Interface

Note: Please control the chassis in a relatively open area; otherwise, collisions may occur.

set_control_mode interface reference
FieldDetails
Functionset_control_mode()
Signaturedef set_control_mode(manipulator_control_mode_param: ChassisControlModeParam, timeout) -> ExecutionResult
DescriptionSet the chassis control mode
ParameterChassisControlModeParam.mode: ChassisControlMode - Control mode
Return ValueExecutionResult
NotesControl modes: GLOBAL: Global absolute-position control relative to the map frame. RELATIVE: Relative-position control relative to the virtual zero point; recommended. VELOCITY: Direct velocity control.

Example (refer to chassis_control.py in examples):

# Set to relative position control mode
robot.chassis.set_control_mode(
    ChassisControlModeParam(mode=ChassisControlMode.RELATIVE)
)
robot.chassis.move_to_relative_position(
    ChassisPosition(x=0.25, y=0.0, yaw=0.0)
)

# Set to absolute position control mode
robot.chassis.set_control_mode(
    ChassisControlModeParam(mode=ChassisControlMode.GLOBAL)
)
robot.chassis.move_to_global_position(
    ChassisPosition(
        x=current_position.x + 0.25,
        y=current_position.y,
        yaw=current_position.yaw,
    )
)
get_control_mode interface reference
FieldDetails
Functionget_control_mode()
Signaturedef get_control_mode(timeout) -> ChassisControlModeParam
DescriptionGet the current chassis control mode
ParameterNone
Return ValueChassisControlModeParam
Notes

Example:

mode = robot.chassis.get_control_mode()
move_to_global_position interface reference
FieldDetails
Functionmove_to_global_position()
Signaturedef move_to_global_position(chassis_position: ChassisPosition, timeout) -> ExecutionResult
DescriptionMove to a global position after setting GLOBAL mode
Parameterposition: ChassisPosition - Target position (x, y, yaw)
Return ValueExecutionResult
NotesThis interface uses the robot's built-in navigation mode. Before the first call, create and save a map.

Example:

position = ChassisPosition(x=1.0, y=0.5, yaw=0.0)
result = robot.chassis.move_to_global_position(position)
move_to_relative_position interface reference
FieldDetails
Functionmove_to_relative_position()
Signaturedef move_to_relative_position(chassis_position: ChassisPosition, timeout) -> ExecutionResult
DescriptionMove to a relative position after setting RELATIVE mode and a virtual zero point
Parameterposition: ChassisPosition - Target position (x, y, yaw)
Return ValueExecutionResult
NotesThis interface uses the robot's built-in navigation mode. Before the first call, create and save a map.

Example:

current_position = robot.chassis.get_global_position()
print(
    f"Global position: x={current_position.x}, "
    f"y={current_position.y}, yaw={current_position.yaw}"
)

robot.chassis.set_virtual_zero_point(current_position)
robot.chassis.set_control_mode(
    ChassisControlModeParam(mode=ChassisControlMode.RELATIVE)
)
robot.chassis.move_to_relative_position(
    ChassisPosition(x=0.25, y=0.0, yaw=0.0)
)
set_velocity interface reference
FieldDetails
Functionset_velocity()
Signaturedef set_velocity(chassis_velocity: ChassisVelocity, timeout) -> ExecutionResult
DescriptionSet velocity control after selecting VELOCITY mode. The Quanta One chassis supports linear velocity control only along the x-axis, for forward and backward motion.
Parametervelocity: ChassisVelocity - Velocity (vel_x, vel_y, vel_yaw), in m/s and rad/s
Return ValueExecutionResult
NotesParameter range: [-2.0, 2.0]. For safety, chassis velocity commands must be sent at a frequency greater than 10 Hz for the robot to respond. The caller must control the transmission frequency. This interface cannot move the chassis while the robot is charging.

Example:

# Set velocity: 0.25 m/s in the x direction, lasting for 2 seconds
for i in range(40):
    cur_velocity = ChassisVelocity(
        vel_x=0.25,
        vel_y=0.0,
        vel_yaw=0.0,
    )
    robot.chassis.set_velocity(cur_velocity)
    time.sleep(0.05)

time.sleep(0.5)
set_virtual_zero_point interface reference
FieldDetails
Functionset_virtual_zero_point()
Signaturedef set_virtual_zero_point(chassis_position: ChassisPosition, timeout) -> ExecutionResult
DescriptionSet the virtual zero point used as the origin for relative motion
Parameterposition: ChassisPosition - Target position (x, y, yaw)
Return ValueExecutionResult
NotesNone

Example:

current_position = robot.chassis.get_global_position()
print(
    f"Global position: x={current_position.x}, "
    f"y={current_position.y}, yaw={current_position.yaw}"
)
robot.chassis.set_virtual_zero_point(current_position)
get_virtual_zero_point interface reference
FieldDetails
Functionget_virtual_zero_point()
Signaturedef get_virtual_zero_point(timeout) -> ChassisPosition
DescriptionGet the virtual zero point
ParameterNone
Return ValueChassisPosition
NotesNone

Example:

position = robot.chassis.get_virtual_zero_point()
get_global_position interface reference
FieldDetails
Functionget_global_position()
Signaturedef get_global_position(timeout) -> ChassisPosition
DescriptionGet the global position
ParameterNone
Return ValueChassisPosition
NotesLocalization must be running before this interface is called

Example:

current_position = robot.chassis.get_global_position()
print(
    f"Global position: x={current_position.x}, "
    f"y={current_position.y}, yaw={current_position.yaw}"
)
get_relative_position interface reference
FieldDetails
Functionget_relative_position()
Signaturedef get_relative_position(timeout) -> ChassisPosition
DescriptionGet the relative position
ParameterNone
Return ValueChassisPosition
Notes

Examples (organized by interface name):

current_position = robot.chassis.get_relative_position()
print(
    f"Relative position: x={current_position.x}, "
    f"y={current_position.y}, yaw={current_position.yaw}"
)
get_odometry interface reference
FieldDetails
Functionget_odometry()
Signaturedef get_odometry(timeout) -> nav_msgs_.Odometry
DescriptionGet odometry
ParameterNone
Return ValueOdometry
NotesNone

Example:

current_odometry = robot.chassis.get_odometry()
print(current_odometry)
get_odometry_stream interface reference
FieldDetails
Functionget_odometry_stream()
Signaturedef get_odometry_stream(timeout) -> Iterator[nav_msgs_.Odometry]
DescriptionGet an odometry data stream
ParameterNone
Return ValueOdometry iterator
NotesNone

Example:

stream = robot.chassis.get_odometry_stream()
for msg in stream:
    print(msg)
get_pose_stream interface reference
FieldDetails
Functionget_pose_stream()
Signaturedef get_pose_stream(timeout) -> Iterator[geometry_msgs_.PoseStamped]
DescriptionGet a pose data stream
ParameterNone
Return ValuePoseStamped iterator
NotesNone

Example:

stream = robot.chassis.get_pose_stream()
for msg in stream:
    print(msg)

Head control interface

set_pose interface reference
FieldDetails
Functionset_pose()
Signaturedef set_pose(head_pose: HeadPose, timeout) -> ExecutionResult
DescriptionSet the head pose
Parameterpose: HeadPose - Head pose (pitch, yaw)
Return ValueExecutionResult
NotesParameter ranges: pitch: [-0.06, 0.9]; yaw: [-1.20, 1.20]

Example:

robot.head.set_pose(HeadPose(yaw=0.0, pitch=0.0))
get_pose interface reference
FieldDetails
Functionget_pose()
Signaturedef get_pose(timeout) -> HeadPose
DescriptionGet the head pose
ParameterNone
Return ValueHeadPose
NotesNone

Example:

head_state = robot.head.get_pose()
print(head_state)
reset interface reference
FieldDetails
Functionreset()
Signaturedef reset(timeout) -> ExecutionResult
DescriptionReset the head pose to pitch=0.0 and yaw=0.0
ParameterNone
Return ValueExecutionResult
NotesNone

Example:

robot.head.reset()
get_joint_states_stream interface reference
FieldDetails
Functionget_joint_states_stream()
Signaturedef get_joint_states_stream(timeout) -> Iterator[sensor_msgs_.JointState]
DescriptionGet a head joint-state data stream
ParameterNone
Return ValueJointState iterator
NotesNone

Example:

stream = robot.head.get_joint_states_stream()
for msg in stream:
    print(msg)

Robotic arm control interface

set_joint_positions interface reference
FieldDetails
Functionset_joint_positions()
Signaturedef set_joint_positions(joint_positions: JointPositions, timeout) -> ExecutionResult
DescriptionControl robot-arm joint positions. First set SDK work mode and MANIPULATOR_JOINT_POSITIONS control mode.
Parameterpositions: JointPositions - Six joint positions in radians
Return ValueExecutionResult
NotesParameter limits: Joints are ordered from shoulder to wrist. For the left arm: left_arm_joint1: [-2.792, 2.792]; left_arm_joint2: [0.0, 3.44]; left_arm_joint3: [-3.14, 0.0]; left_arm_joint4: [-1.57, 1.57]; left_arm_joint5: [-1.4, 1.4]; left_arm_joint6: [-1.745, 1.745]. A large difference between the target and current positions may cause substantial vibration. Increment gradually from the current position to the target.

Example:

robot.system.set_work_mode(
    RobotModeParam(mode=RobotWorkMode.SDK)
)

robot.robot_control.set_manipulator_control_mode(
    ManipulatorControlModeParam(
        mode=ManipulatorControlMode.MANIPULATOR_JOINT_POSITIONS
    )
)

joint_state = robot.right_arm.get_joint_states()
target_positions = list(joint_state.position)
target_positions[5] += 0.01

result = robot.right_arm.set_joint_positions(
    JointPositions(positions=target_positions)
)
print(result)
set_end_pose interface reference
FieldDetails
Functionset_end_pose()
Signaturedef set_end_pose(pose: geometry_msgs_.Pose, timeout) -> ExecutionResult
DescriptionControl the robot-arm end-effector pose. First set SDK work mode and MANIPULATOR_END_POSE control mode.
Parameterpose: Pose - Target pose, including position and orientation
Return ValueExecutionResult
NotesParameter limits: position.x: [-5.0, 5.0]; position.y: [-5.0, 5.0]; position.z: [-5.0, 5.0]; orientation.x: [-1, 1]; orientation.y: [-1, 1]; orientation.z: [-1, 1]; orientation.w: [-1, 1]. A large difference between the target and current poses may cause substantial vibration. Increment gradually from the current pose to the target.

Example:

robot.system.set_work_mode(
    RobotModeParam(mode=RobotWorkMode.SDK)
)

robot.robot_control.set_manipulator_control_mode(
    ManipulatorControlModeParam(
        mode=ManipulatorControlMode.MANIPULATOR_END_POSE
    )
)

pose = Pose()
pose.position = Point(x=0.0, y=0.0, z=0.0)
pose.orientation = Quaternion(x=0.0, y=0.0, z=0.0, w=1.0)

pose.position.z += 0.03
robot.right_arm.set_end_pose(pose)
time.sleep(0.2)
get_joint_states interface reference
FieldDetails
Functionget_joint_states()
Signaturedef get_joint_states(timeout) -> sensor_msgs_.JointState
DescriptionGet robot-arm joint-state information
ParameterNone
Return ValueJointState
NotesNone

Example:

joint_state = robot.left_arm.get_joint_states()
print(f"Joint name: {joint_state.name}")
print(f"Joint position: {joint_state.position}")
print(f"Joint velocity: {joint_state.velocity}")
print(f"Joint effort: {joint_state.effort}")
get_end_pose interface reference
FieldDetails
Functionget_end_pose()
Signaturedef get_end_pose(timeout) -> geometry_msgs_.PoseStamped
DescriptionGet the robot-arm end-effector pose
ParameterNone
Return ValuePoseStamped
NotesThe last line of the original example was missing a closing parenthesis; it has been added in the example below.

Example:

cur_pose = robot.left_arm.get_end_pose()
print(f"current_position: {cur_pose}")
get_joint_states_stream interface reference
FieldDetails
Functionget_joint_states_stream()
Signaturedef get_joint_states_stream(timeout) -> Iterator[sensor_msgs_.JointState]
DescriptionGet a robot-arm joint-state stream
ParameterNone
Return ValueJointState iterator
NotesNone

Example:

stream = robot.left_arm.get_joint_states_stream()
for msg in stream:
    print(msg)
get_end_pose_stream interface reference
FieldDetails
Functionget_end_pose_stream()
Signaturedef get_end_pose_stream(timeout) -> Iterator[geometry_msgs_.PoseStamped]
DescriptionGet a robot-arm end-effector pose stream
ParameterNone
Return ValuePoseStamped iterator
NotesNone

Example:

stream = robot.left_arm.get_end_pose_stream()
for msg in stream:
    print(msg)

Master arm control interface

Important note: The master arm interface is used to read and control devices on the master arm side. The SDK client entry points are robot.master_left_arm and robot.master_right_arm. Do not confuse them with the slave-arm objects robot.left_arm and robot.right_arm. Whether QUANTA X1 Pro can use master-arm write control depends on whether the master-arm hardware, master-arm service, and corresponding control-mode configuration are deployed on the robot. If the robot only supports reading from the master arms or the write-control topic is not configured, calling the write interface will return an error. The master arm control mode is set by the set_control_mode() interface provided by each of the left and right master arm objects. The parameter reuses ManipulatorControlModeParam and is not set via robot.robot_control.set_manipulator_control_mode().

set_control_mode interface reference
FieldDetails
Functionset_control_mode()
Signaturedef set_control_mode(manipulator_control_mode_param: ManipulatorControlModeParam, timeout) -> ExecutionResult
DescriptionSet the master-arm control mode, which determines how subsequent master-arm write commands are interpreted
Parametermode: ManipulatorControlModeParam - Master-arm control mode
Return ValueExecutionResult
NotesControl modes: MANIPULATOR_END_POSE: Master-arm end-effector pose control; subsequent set_end_pose() calls are interpreted as target master-arm end-effector poses. MANIPULATOR_JOINT_POSITIONS: Master-arm joint-position control; subsequent set_joint_positions() calls are interpreted as target positions for the six master-arm joints. MANIPULATOR_GRAVITY_COMPENSATION: Master-arm gravity-compensation mode, which can be used for manual takeover. Do not switch control modes frequently while the master arm is moving. Both the left and right master-arm services provide this interface. Check the current mode before issuing write commands.

Example:

from x2robot.sdk import (
    ManipulatorControlMode,
    ManipulatorControlModeParam,
)

robot.master_left_arm.set_control_mode(
    ManipulatorControlModeParam(
        mode=ManipulatorControlMode.MANIPULATOR_END_POSE
    )
)
get_control_mode interface reference
FieldDetails
Functionget_control_mode()
Signaturedef get_control_mode(timeout) -> ManipulatorControlModeParam
DescriptionGet the current master-arm control mode
ParameterNone
Return ValueManipulatorControlModeParam
NotesIf the robot-side control chain is not in master-arm joint control mode or master-arm end-effector control mode, the interface may return an error. Before issuing master-arm write commands, call set_control_mode() to select the corresponding mode.

Example:

mode = robot.master_left_arm.get_control_mode()
print(mode)
set_joint_positions interface reference
FieldDetails
Functionset_joint_positions()
Signaturedef set_joint_positions(joint_positions: JointPositions, timeout) -> ExecutionResult
DescriptionSet target positions for the master-arm joints. First call set_control_mode() on the master arm to select MANIPULATOR_JOINT_POSITIONS mode.
Parameterpositions: JointPositions - Positions of the six master-arm joints in radians.
The joint order is master_left_arm_joint1 through master_left_arm_joint6 or master_right_arm_joint1 through master_right_arm_joint6. joint1: [-2.7925, 2.7925]; joint2: [0.0, 3.6652]; joint3: [-2.7925, 0.0]; joint4: [-1.5708, 1.5708]; joint5: [-1.5708, 1.5708]; joint6: [-1.9199, 1.9199].
Return ValueExecutionResult
NotesThe SDK checks the number of joints, verifies that all values are finite, and validates the joint limits. result.is_success=True means that the SDK Server accepted the command and published it to the robot-side control chain. It does not mean that the motion has completed or reached the target position.

Example:

from x2robot.sdk import (
    JointPositions,
    ManipulatorControlMode,
    ManipulatorControlModeParam,
)

master_arm = robot.master_left_arm
master_arm.set_control_mode(
    ManipulatorControlModeParam(
        mode=ManipulatorControlMode.MANIPULATOR_JOINT_POSITIONS
    )
)

joint_state = master_arm.get_joint_states()
target = list(joint_state.position)
target[0] += 0.01

result = master_arm.set_joint_positions(
    JointPositions(positions=target)
)
print(result.is_success, result.error_message)
set_end_pose interface reference
FieldDetails
Functionset_end_pose()
Signaturedef set_end_pose(pose: geometry_msgs_.Pose, timeout) -> ExecutionResult
DescriptionSet the target master-arm end-effector pose. First call set_control_mode() on the master arm to select MANIPULATOR_END_POSE mode.
Parameterpose: Pose - Target master-arm end-effector pose
Return ValueExecutionResult
Notesset_end_pose() sends an absolute master-arm end-effector pose command. The pose is interpreted according to the controller's internal convention for absolute master-arm poses. The SDK verifies that the position and quaternion contain valid values and that the quaternion norm is close to 1. result.is_success=True means only that the SDK Server accepted and published the command; it does not indicate that inverse kinematics succeeded, the controller reached the target, or the motion completed.

Example:

from x2robot.geometry_msgs import Pose, Point, Quaternion
from x2robot.sdk import (
    ManipulatorControlMode,
    ManipulatorControlModeParam,
)

master_arm = robot.master_left_arm
master_arm.set_control_mode(
    ManipulatorControlModeParam(
        mode=ManipulatorControlMode.MANIPULATOR_END_POSE
    )
)

current = master_arm.get_end_pose()
pose = Pose()
pose.position = Point(
    x=current.pose.position.x,
    y=current.pose.position.y,
    z=current.pose.position.z + 0.002,
)
pose.orientation = Quaternion(
    x=current.pose.orientation.x,
    y=current.pose.orientation.y,
    z=current.pose.orientation.z,
    w=current.pose.orientation.w,
)

result = master_arm.set_end_pose(pose)
print(result.is_success, result.error_message)
get_joint_states interface reference
FieldDetails
Functionget_joint_states()
Signaturedef get_joint_states(timeout) -> sensor_msgs_.JointState
DescriptionGet master-arm joint-state information
ParameterNone
Return ValueJointState
NotesNone

Example:

joint_state = robot.master_left_arm.get_joint_states()
print(f"Joint name: {joint_state.name}")
print(f"Joint position: {joint_state.position}")
print(f"Joint velocity: {joint_state.velocity}")
print(f"Joint effort: {joint_state.effort}")
get_end_pose interface reference
FieldDetails
Functionget_end_pose()
Signaturedef get_end_pose(timeout) -> geometry_msgs_.PoseStamped
DescriptionGet the master-arm end-effector pose
ParameterNone
Return ValuePoseStamped
NotesNone

Example:

cur_pose = robot.master_left_arm.get_end_pose()
print(f"current_position: {cur_pose}")
get_gripper_position interface reference
FieldDetails
Functionget_gripper_position()
Signaturedef get_gripper_position(timeout) -> GripperPosition
DescriptionGet the master-arm trigger input value. On the master-arm side, this value represents the grasp input and not the actual physical position of the slave-arm gripper.
ParameterNone
Return ValueGripperPosition
NotesThe master-arm trigger input is normally in the range [0, 1]. The trigger is currently read-only; its position cannot be set through the SDK.

Example:

trigger = robot.master_left_arm.get_gripper_position()
print(trigger.position)
get_joint_states_stream interface reference
FieldDetails
Functionget_joint_states_stream()
Signaturedef get_joint_states_stream(timeout) -> Iterator[sensor_msgs_.JointState]
DescriptionGet a master-arm joint-state stream
ParameterNone
Return ValueJointState iterator
NotesNone

Example:

stream = robot.master_left_arm.get_joint_states_stream()
for msg in stream:
    print(msg)
get_end_pose_stream interface reference
FieldDetails
Functionget_end_pose_stream()
Signaturedef get_end_pose_stream(timeout) -> Iterator[geometry_msgs_.PoseStamped]
DescriptionGet a master-arm end-effector pose stream
ParameterNone
Return ValuePoseStamped iterator
NotesNone

Example:

stream = robot.master_left_arm.get_end_pose_stream()
for msg in stream:
    print(msg)
get_gripper_state_stream interface reference
FieldDetails
Functionget_gripper_state_stream()
Signaturedef get_gripper_state_stream(timeout) -> Iterator[GripperPosition]
DescriptionGet a master-arm trigger input stream
ParameterNone
Return ValueGripperPosition iterator
NotesThe master arm also retains the compatibility interface get_gripper_joint_states_stream() for reading joint-state streams associated with the master-arm gripper or trigger. For new development, use get_gripper_state_stream() to read trigger input values.

Example:

stream = robot.master_left_arm.get_gripper_state_stream()
for msg in stream:
    print(msg.position)

Gripper control interface

set_position interface reference
FieldDetails
Functionset_position()
Signaturedef set_position(gripper_position: GripperPosition, timeout) -> ExecutionResult
DescriptionSet the gripper position as a motor rotation value in radians. First select SDK work mode.
Parameterposition: GripperPosition
Return ValueExecutionResult
Notesposition ranges in radians: H gripper [0.0, 4.5]; G gripper [0.0, 1.89].

Example:

robot.system.set_work_mode(
    RobotModeParam(mode=RobotWorkMode.SDK)
)

robot.right_gripper.set_position(
    GripperPosition(position=0.5)
)
sleep(0.05)

position = robot.right_gripper.get_position()
print(position)
get_position interface reference
FieldDetails
Functionget_position()
Signaturedef get_position(timeout) -> GripperPosition
DescriptionGet the gripper position
ParameterNone
Return ValueGripperPosition
NotesNone

Example:

position = robot.left_gripper.get_position()
print(position)
get_joint_states_stream interface reference
FieldDetails
Functionget_joint_states_stream()
Signaturedef get_joint_states_stream(timeout) -> Iterator[sensor_msgs_.JointState]
DescriptionGet a gripper joint-state stream
ParameterNone
Return ValueJointState
NotesNone

Example:

stream = robot.left_gripper.get_joint_states_stream()
for msg in stream:
    print(msg)

Torso Control Interface

set_lift_position interface reference
FieldDetails
Functionset_lift_position()
Signaturedef set_lift_position(lift_position: LiftPosition, timeout) -> ExecutionResult
DescriptionSet the torso lift position. First select SDK work mode.
Parameterposition: LiftPosition
Return ValueExecutionResult
Notesposition range: [0.0, 0.78]

Example:

cur_position = robot.lift.get_lift_position()
print(f"current_position: {cur_position}")

lift_position = LiftPosition(
    position=cur_position.position + 0.2
)
robot.lift.set_lift_position(lift_position)
get_lift_position interface reference
FieldDetails
Functionget_lift_position()
Signaturedef get_lift_position(timeout) -> LiftPosition
DescriptionGet the torso lift position
ParameterNone
Return ValueLiftPosition
NotesNone

Example:

position = robot.lift.get_lift_position()
get_joint_states_stream interface reference
FieldDetails
Functionget_joint_states_stream()
Signaturedef get_joint_states_stream(timeout) -> Iterator[sensor_msgs_.JointState]
DescriptionGet a torso joint-state stream
ParameterNone
Return ValueJointState
NotesNone

Example:

stream = robot.lift.get_joint_states_stream()
for msg in stream:
    print(msg)

On this page

Capability overviewRobot Control Interfaceset_manipulator_control_mode interface referenceget_manipulator_control_mode interface referenceemergency_stop interface referencerecover_emergency_stop interface referencehoming interface referenceChassis Control Interfaceset_control_mode interface referenceget_control_mode interface referencemove_to_global_position interface referencemove_to_relative_position interface referenceset_velocity interface referenceset_virtual_zero_point interface referenceget_virtual_zero_point interface referenceget_global_position interface referenceget_relative_position interface referenceget_odometry interface referenceget_odometry_stream interface referenceget_pose_stream interface referenceHead control interfaceset_pose interface referenceget_pose interface referencereset interface referenceget_joint_states_stream interface referenceRobotic arm control interfaceset_joint_positions interface referenceset_end_pose interface referenceget_joint_states interface referenceget_end_pose interface referenceget_joint_states_stream interface referenceget_end_pose_stream interface referenceMaster arm control interfaceset_control_mode interface referenceget_control_mode interface referenceset_joint_positions interface referenceset_end_pose interface referenceget_joint_states interface referenceget_end_pose interface referenceget_gripper_position interface referenceget_joint_states_stream interface referenceget_end_pose_stream interface referenceget_gripper_state_stream interface referenceGripper control interfaceset_position interface referenceget_position interface referenceget_joint_states_stream interface referenceTorso Control Interfaceset_lift_position interface referenceget_lift_position interface referenceget_joint_states_stream interface reference