Skip to main content

ScaFoArm

Inherits from: Arm A software-based robotic arm implementation. This class implements all required abstract methods from the Arm base class, tracking internal state and logging actions. Suitable for development, validation, and scenarios where physical hardware is not available. Attributes: _ee_pose (Pose): Current end effector pose (position + orientation) _ee_state (int): Current gripper state (OPEN or CLOSED)

Inherited methods

  • From Arm: setNamedPose, removeNamedPose, getNamedPose
  • From Robot: addSensor, getImage

init

ScaFoArm.__init__(cameras: Optional[Dict[str, Camera]] = None, enable_websocket: bool = False, client_timeout: float = 30.0)
Initialize the ScaFoArm robotic arm.
Arguments
cameras (Optional[Dict[str, Camera]])
Optional[Dict[str, Camera]]
Named camera interfaces. Defaults to None.
enable_websocket (bool)
bool
Whether to start the WebSocket server. Defaults to False.
client_timeout (float)
float
Client timeout in seconds. Defaults to 30.0.

getState

ScaFoArm.getState() -> dict
Get the complete state of the robot.
Returns
dict
dict
Current state including pose and gripper state

getPosition

ScaFoArm.getPosition() -> Optional[Position]
Get the current end effector position.
Returns
Optional[Position]
Optional[Position]
Current end effector position in meters (copy)

getOrientation

ScaFoArm.getOrientation() -> Optional[Orientation]
Get the current end effector orientation.
Returns
Optional[Orientation]
Optional[Orientation]
Current end effector orientation as quaternion

moveByVelocity

ScaFoArm.moveByVelocity(linear_velocity: Velocity, angular_velocity: Velocity, frame: str = 'body') -> None
Move the robot end effector with specified velocities (currently not implemented).
Arguments
linear_velocity (Velocity)
Velocity
required
Linear velocity in m/s
angular_velocity (Velocity)
Velocity
required
Angular velocity in rad/s
frame (str)
str
Reference frame (“body” or “world”)
Returns
returns
None

stop

ScaFoArm.stop() -> None
Stop any movement of the robot (soft emergency-stop).
Returns
returns
None

cleanup

ScaFoArm.cleanup() -> None
Cleanup the robot resources and log final state. Called automatically during robot shutdown. Logs final end-effector position and gripper state before cleanup.
Returns
returns
None

getJointAngles

ScaFoArm.getJointAngles() -> list[float]
Get current joint angles in radians (currently not implemented).
Returns
list[float]
list[float]
Current joint angles (to be implemented)

setJointAngles

ScaFoArm.setJointAngles(angles: list, blocking: bool = True, moving_time: Optional[float] = None, accel_time: Optional[float] = None) -> None
Set joint angles in radians (currently not implemented).
Arguments
angles (list)
list
required
Target joint angles in radians
blocking (bool)
bool
Wait for movement to complete
moving_time (Optional[float])
Optional[float]
Time to complete movement in seconds
accel_time (Optional[float])
Optional[float]
Time to accelerate/decelerate in seconds
Returns
returns
None

grasp

ScaFoArm.grasp() -> None
Close the gripper to grasp an object.
Returns
returns
None

release

ScaFoArm.release() -> None
Open the gripper to release an object.
Returns
returns
None

getEndEffectorPose

ScaFoArm.getEndEffectorPose() -> Pose
Get the current end effector pose.
Returns
Pose
Pose
Current end effector position and orientation

moveToPose

ScaFoArm.moveToPose(position: Position, orientation: Orientation, blocking: bool = True, moving_time: float = 2.0, accel_time: float = 0.5) -> bool
Move the robot end effector to a specified pose.
Arguments
position (Position)
Position
required
Target position in meters
orientation (Orientation)
Orientation
required
Target orientation as quaternion
blocking (bool)
bool
Wait for movement to complete
moving_time (float)
float
Time to complete the movement in seconds
accel_time (float)
float
Time to accelerate/decelerate in seconds
Returns
bool
bool
True if the movement command was successful

moveToDeltaPose

ScaFoArm.moveToDeltaPose(delta_position: Position, delta_orientation: Orientation = Orientation(0, 0, 0, 1.0), blocking: bool = True, moving_time: float = 0.5, accel_time: float = 0.2) -> bool
Move the robot end effector by a relative pose offset in the end-effector frame. The delta_position is expressed in the end-effector’s local coordinate frame, where z-axis points down (out of the gripper). This delta is rotated by the current end-effector orientation and then added to the current position.
Arguments
delta_position (Position)
Position
required
Position offset in meters (in end-effector frame)
delta_orientation (Orientation)
Orientation
Orientation offset as quaternion (relative rotation)
blocking (bool)
bool
Wait for movement to complete
moving_time (float)
float
Time to complete the movement in seconds
accel_time (float)
float
Time to accelerate/decelerate in seconds
Returns
bool
bool
True if the movement command was successful