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
| Parameter | Type | Default | Description |
|---|---|---|---|
side | "left" | "right" | required | Left arm or right arm |
interface_name | str | required | CAN interface name, such as "can0" |
interface_type | str | "socketcan" | CAN interface type |
tcp_offset | list[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
pipon Windows. Useconda install pinocchio -c conda-forge.
Exceptions:
ImportError: The optionalkinetixdependency (Pinocchio) is not installedValueError: Invalidsideorworld_frameargumentStateError: Motors did not respond on the CAN bus / initial data read failed
URDF paths:
src/realhand/arm/kinetix/urdf/a7__left.urdfanda7__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:
- 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:
- Origin translation: Moves the world origin from the base center to the center of Joint 2 (the second shoulder joint)
- 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
Posevalues used bymove_pandmove_l. They do not affectmove_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:
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)
| Index | Joint name | Physical meaning | Rotation axis (URDF) | Angle range (rad) |
|---|---|---|---|---|
| 0 | Left_Shoulder_Pitch_Joint | Shoulder pitch | Positive Y (0 1 0) | [-2.97, 1.05] |
| 1 | Left_Shoulder_Roll_Joint | Shoulder roll | Positive X (1 0 0) | [-0.35, 3.49] |
| 2 | Left_Shoulder_Yaw_Joint | Shoulder yaw (upper-arm twist) | Negative Z (0 0 -1) | [-2.79, 2.79] |
| 3 | Left_Elbow_Pitch_Joint | Elbow pitch | Negative Y (0 -1 0) | [-0.21, 2.355] |
| 4 | Left_Wrist_Yaw_Joint | Wrist yaw (forearm twist) | Negative Z (0 0 -1) | [-2.79, 2.79] |
| 5 | Left_Wrist_Pitch_Joint | Wrist pitch | Negative Y (0 -1 0) | [-1.57, 1.57] |
| 6 | Left_Wrist_Roll_Joint | Wrist roll | Positive X (1 0 0) | [-1.57, 1.57] |
A7 Right Arm Joint List (URDF frame)
| Index | Joint name | Physical meaning | Rotation axis (URDF) | Angle range (rad) |
|---|---|---|---|---|
| 0 | Right_Shoulder_Pitch_Joint | Shoulder pitch | Negative Y (0 -1 0) | [-1.05, 2.97] |
| 1 | Right_Shoulder_Roll_Joint | Shoulder roll | Positive X (1 0 0) | [-3.49, 0.35] |
| 2 | Right_Shoulder_Yaw_Joint | Shoulder yaw (upper-arm twist) | Negative Z (0 0 -1) | [-2.79, 2.79] |
| 3 | Right_Elbow_Pitch_Joint | Elbow pitch | Negative Y (0 -1 0) | [-0.21, 2.355] |
| 4 | Right_Wrist_Yaw_Joint | Wrist yaw (forearm twist) | Negative Z (0 0 -1) | [-2.79, 2.79] |
| 5 | Right_Wrist_Pitch_Joint | Wrist pitch | Positive Y (0 1 0) | [-1.57, 1.57] |
| 6 | Right_Wrist_Roll_Joint | Wrist roll | Positive 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)
| Field | Meaning | Unit |
|---|---|---|
x, y, z | Cartesian position | meters (m) |
rx | Rotation about X (roll), range [-π, π] | radians (rad) |
ry | Rotation about Y (pitch), range [-π/2, π/2] | radians (rad) |
rz | Rotation 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 byry, and finally the world X axis byrx.
Lifecycle Management
API Reference
| Method | Description |
|---|---|
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
- Calling
arm.enable()causes a brief disable/enable cycle. - 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
| Module | Docs |
|---|---|
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 |