Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

A7 Arm

A7 is a self-developed 7-DoF robotic arm.

Quick Start

from realhand import A7

with A7(
    side="left",
    interface_name="can0",
) as arm:
    arm.enable()  # Enable all 7 joint motors
    arm.home()  # Move the arm to the zero position
    arm.disable()  # Disable all 7 joint motors

Constructor Parameters

ParameterTypeDefaultDescription
side"left" | "right"requiredLeft arm or right arm
interface_namestrrequiredCAN interface name, such as "can0"
interface_typestr"socketcan"CAN interface type
tcp_offsetlist[float][0.0, 0.0, 0.0]TCP offset
world_frame"urdf" | "maestro""urdf"World frame convention

The constructor automatically checks whether all 7 motors are online.

Dependency requirement: A7 relies on Pinocchio for kinematics. Install the optional kinetix dependency:

pip install "realhand[kinetix] @ git+https://github.com/RealHand-Robotics/realbot-python-sdk.git"

Windows users: Pinocchio does not support installation via pip on Windows. Use conda install pinocchio -c conda-forge.

Exceptions:

  • ImportError: The optional kinetix dependency (Pinocchio) is not installed
  • ValueError: Invalid side or world_frame argument
  • StateError: Motors did not respond on the CAN bus / initial data read failed

URDF paths: src/realhand/arm/kinetix/urdf/a7__left.urdf and a7__right.urdf

Coordinate Frames

A7 supports two world coordinate frames selected by the world_frame parameter.

URDF Frame (default)

This is the coordinate system defined by the URDF model file. Its origin is at the center of the arm base (Base_Link), as shown below:

coordinate

  • X axis: Positive X points from the back of the robot toward the front
  • Y axis: Positive Y points to the robot’s left side from the robot’s perspective (the viewer’s right when facing the robot)
  • Z axis: Positive Z points upward by the right-hand rule
  • Rx, Ry, Rz: Rotations are applied in Z, Y, X order, with counterclockwise as positive

Maestro Frame

The Maestro frame applies two transformations relative to the URDF frame, as shown below:

coordinate

  1. Origin translation: Moves the world origin from the base center to the center of Joint 2 (the second shoulder joint)
  2. Rotate Z by 90°: Rotates the URDF axes counterclockwise by +90° around Z at the new origin

After the transformation:

  • X axis: Positive X points to the robot’s right side from the robot’s perspective (the viewer’s left when facing the robot)
  • Y axis: Positive Y points from the back of the robot toward the front
  • Z axis: Positive Z points upward by the right-hand rule

Note: These coordinate definitions mainly affect the Pose values used by move_p and move_l. They do not affect move_j.

Joint Definition

Zero Position

When all joint angles are [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], the arm should be in a natural hanging pose with joints perpendicular to each other. Call home() to return to the zero position, shown below:

home

Positive Rotation Direction

Positive joint angles follow the right-hand rule: point your right thumb along the positive rotation axis, and the direction in which your fingers curl is the positive direction.

  • Axis 0 1 0 (positive Y): Angle increases rotate counterclockwise when viewed along +Y
  • Axis 1 0 0 (positive X): Angle increases rotate counterclockwise when viewed along +X
  • Axis 0 0 -1 (negative Z): Angle increases rotate clockwise when viewed from above
  • Axis 0 -1 0 (negative Y): Angle increases rotate clockwise when viewed along +Y

A7 Left Arm Joint List (URDF frame)

IndexJoint namePhysical meaningRotation axis (URDF)Angle range (rad)
0Left_Shoulder_Pitch_JointShoulder pitchPositive Y (0 1 0)[-2.97, 1.05]
1Left_Shoulder_Roll_JointShoulder rollPositive X (1 0 0)[-0.35, 3.49]
2Left_Shoulder_Yaw_JointShoulder yaw (upper-arm twist)Negative Z (0 0 -1)[-2.79, 2.79]
3Left_Elbow_Pitch_JointElbow pitchNegative Y (0 -1 0)[-0.21, 2.355]
4Left_Wrist_Yaw_JointWrist yaw (forearm twist)Negative Z (0 0 -1)[-2.79, 2.79]
5Left_Wrist_Pitch_JointWrist pitchNegative Y (0 -1 0)[-1.57, 1.57]
6Left_Wrist_Roll_JointWrist rollPositive X (1 0 0)[-1.57, 1.57]

A7 Right Arm Joint List (URDF frame)

IndexJoint namePhysical meaningRotation axis (URDF)Angle range (rad)
0Right_Shoulder_Pitch_JointShoulder pitchNegative Y (0 -1 0)[-1.05, 2.97]
1Right_Shoulder_Roll_JointShoulder rollPositive X (1 0 0)[-3.49, 0.35]
2Right_Shoulder_Yaw_JointShoulder yaw (upper-arm twist)Negative Z (0 0 -1)[-2.79, 2.79]
3Right_Elbow_Pitch_JointElbow pitchNegative Y (0 -1 0)[-0.21, 2.355]
4Right_Wrist_Yaw_JointWrist yaw (forearm twist)Negative Z (0 0 -1)[-2.79, 2.79]
5Right_Wrist_Pitch_JointWrist pitchPositive Y (0 1 0)[-1.57, 1.57]
6Right_Wrist_Roll_JointWrist rollPositive X (1 0 0)[-1.57, 1.57]

Pose (TCP Pose) Representation

Pose represents the TCP (Tool Center Point) pose. It is a Pydantic model with 6 fields:

from realhand import Pose

pose = Pose(x=0.3, y=0.1, z=0.5, rx=0.0, ry=0.5, rz=0.0)
FieldMeaningUnit
x, y, zCartesian positionmeters (m)
rxRotation about X (roll), range [-π, π]radians (rad)
ryRotation about Y (pitch), range [-π/2, π/2]radians (rad)
rzRotation about Z (yaw), range [-π, π]radians (rad)
  • Orientation uses extrinsic ZYX Euler angles: rotate around the world Z axis by rz, then the world Y axis by ry, and finally the world X axis by rx.

Lifecycle Management

API Reference

MethodDescription
enable()Enables all 7 joint motors. This causes a brief disable/enable cycle.
disable()Disables all 7 joint motors.
emergency_stop()Performs an emergency stop and locks the arm at its current pose.
calibrate_zero()Sets the current position as zero. The arm must be disabled.
reset_error()Resets error states on all joints.
close()Closes the connection: stops polling and stops the CAN scheduler after waiting for motion to finish. Called automatically when using with.
save_params()Saves current PID and other parameters to motor flash so they persist after power loss.

Notes

  1. Calling arm.enable() causes a brief disable/enable cycle.
  2. The arm must be disabled before setting the zero position.

Control Mode

Only PP (Profile Position) mode is currently supported. It is configured automatically when enable() is called.

You can import the ControlMode enum from realhand:

from realhand import ControlMode

CAN Bus

interface_name specifies the CAN interface name (for example "can0"), and interface_type specifies the interface type (default "socketcan").

For more information, including Windows usage, see CAN Bus Configuration.

Functional Modules

ModuleDocs
Motion control (move_j/move_p/move_l)motion.md
Kinematics (FK / IK / joint limits)kinematics.md
State reading (angles / speeds / torques / temperatures)state.md
Parameter configuration (speed / acceleration / PID)config.md