Documentation Index
Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
Use this file to discover all available pages before exploring further.
Arm
Inherits from: Robot
Abstract base class defining the interface for robotic arms.
This class extends the base Robot class with additional methods specific to
robotic arm manipulation and control including joint control and gripper operations.
Inherited methods
- From
Robot: addSensor, getImage, getState, getPosition, getOrientation, moveByVelocity, stop, cleanup
init
Arm.__init__(server_port: int = 4774, enable_websocket: bool = True, client_timeout: float = 30.0) -> None
Initialize robotic arm.
Port for WebSocket server (default 4774)
Whether to start the WebSocket server (default True)
Client timeout in seconds (default 30.0)
getJointAngles
Arm.getJointAngles() -> list[float]
Get current joint angles in radians.
Current joint angles in radians, ordered by joint index
Must be implemented by subclasses
setJointAngles
Arm.setJointAngles(angles: list, blocking: bool = True, moving_time: Optional[float] = None, accel_time: Optional[float] = None) -> None
Set joint angles in radians.
Commands the arm to move joints to the specified target angles.
Can be blocking or non-blocking depending on the blocking parameter.
List of target joint angles in radians
Wait for movement to complete (default True)
moving_time (Optional[float])
Time to complete the movement in seconds
accel_time (Optional[float])
Time to accelerate/decelerate in seconds
Must be implemented by subclasses
grasp
Close the gripper to grasp an object.
Closes the gripper to securely hold an object. The gripper will
apply appropriate force based on the object detected.
Must be implemented by subclasses
release
Open the gripper to release an object.
Opens the gripper to release any held object. The gripper will
return to its fully open position.
Must be implemented by subclasses
setNamedPose
Arm.setNamedPose(pose_name: str, joint_angles: list[float]) -> None
Define a pose_name:joint_angles pair in the dictionary of named poses (overriding any existing pair).
Name of the pose to define
joint_angles (list[float])
List of joint angles in radians
If the length of joint_angles list does match the length of other named poses
removeNamedPose
Arm.removeNamedPose(pose_name: str) -> Optional[list[float]]
Remove a named pose from the dictionary of pose_name:joint_angles pairs.
Name of the pose to remove (case-insensitive)
Joint angles (radians) of the named pose that was removed, or None if the named pose did not exist
getNamedPose
Arm.getNamedPose(pose_name: str) -> Optional[list[float]]
Get the list of joint angles corresponding to a named pose.
Name of the pose to get (case-insensitive)
Joint angles (radians) of the named pose, or None if the named pose does not exist