> ## 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.

# ScaFoArm

## ScaFoArm

Inherits from: [`Arm`](/robot-api/reference/base/robot/arm/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`](/robot-api/reference/base/robot/arm/Arm): `setNamedPose`, `removeNamedPose`, `getNamedPose`
* From [`Robot`](/robot-api/reference/base/robot/robot/Robot): `addSensor`, `getImage`

### **init**

```python theme={null}
ScaFoArm.__init__(cameras: Optional[Dict[str, Camera]] = None, enable_websocket: bool = False, client_timeout: float = 30.0)
```

Initialize the ScaFoArm robotic arm.

<ResponseField name="Arguments">
  <ParamField query="cameras (Optional[Dict[str, Camera]])" type="Optional[Dict[str, Camera]]">
    Named camera interfaces. Defaults to None.
  </ParamField>

  <ParamField query="enable_websocket (bool)" type="bool">
    Whether to start the WebSocket server. Defaults to False.
  </ParamField>

  <ParamField query="client_timeout (float)" type="float">
    Client timeout in seconds. Defaults to 30.0.
  </ParamField>
</ResponseField>

### getState

```python theme={null}
ScaFoArm.getState() -> dict
```

Get the complete state of the robot.

<ResponseField name="Returns">
  <ResponseField name="dict" type="dict">
    Current state including pose and gripper state
  </ResponseField>
</ResponseField>

### getPosition

```python theme={null}
ScaFoArm.getPosition() -> Optional[Position]
```

Get the current end effector position.

<ResponseField name="Returns">
  <ResponseField name="Optional[Position]" type="Optional[Position]">
    Current end effector position in meters (copy)
  </ResponseField>
</ResponseField>

### getOrientation

```python theme={null}
ScaFoArm.getOrientation() -> Optional[Orientation]
```

Get the current end effector orientation.

<ResponseField name="Returns">
  <ResponseField name="Optional[Orientation]" type="Optional[Orientation]">
    Current end effector orientation as quaternion
  </ResponseField>
</ResponseField>

### moveByVelocity

```python theme={null}
ScaFoArm.moveByVelocity(linear_velocity: Velocity, angular_velocity: Velocity, frame: str = 'body') -> None
```

Move the robot end effector with specified velocities (currently not implemented).

<ResponseField name="Arguments">
  <ParamField query="linear_velocity (Velocity)" type="Velocity" required>
    Linear velocity in m/s
  </ParamField>

  <ParamField query="angular_velocity (Velocity)" type="Velocity" required>
    Angular velocity in rad/s
  </ParamField>

  <ParamField query="frame (str)" type="str">
    Reference frame ("body" or "world")
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### stop

```python theme={null}
ScaFoArm.stop() -> None
```

Stop any movement of the robot (soft emergency-stop).

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### cleanup

```python theme={null}
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.

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### getJointAngles

```python theme={null}
ScaFoArm.getJointAngles() -> list[float]
```

Get current joint angles in radians (currently not implemented).

<ResponseField name="Returns">
  <ResponseField name="list[float]" type="list[float]">
    Current joint angles (to be implemented)
  </ResponseField>
</ResponseField>

### setJointAngles

```python theme={null}
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).

<ResponseField name="Arguments">
  <ParamField query="angles (list)" type="list" required>
    Target joint angles in radians
  </ParamField>

  <ParamField query="blocking (bool)" type="bool">
    Wait for movement to complete
  </ParamField>

  <ParamField query="moving_time (Optional[float])" type="Optional[float]">
    Time to complete movement in seconds
  </ParamField>

  <ParamField query="accel_time (Optional[float])" type="Optional[float]">
    Time to accelerate/decelerate in seconds
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### grasp

```python theme={null}
ScaFoArm.grasp() -> None
```

Close the gripper to grasp an object.

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### release

```python theme={null}
ScaFoArm.release() -> None
```

Open the gripper to release an object.

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### getEndEffectorPose

```python theme={null}
ScaFoArm.getEndEffectorPose() -> Pose
```

Get the current end effector pose.

<ResponseField name="Returns">
  <ResponseField name="Pose" type="Pose">
    Current end effector position and orientation
  </ResponseField>
</ResponseField>

### moveToPose

```python theme={null}
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.

<ResponseField name="Arguments">
  <ParamField query="position (Position)" type="Position" required>
    Target position in meters
  </ParamField>

  <ParamField query="orientation (Orientation)" type="Orientation" required>
    Target orientation as quaternion
  </ParamField>

  <ParamField query="blocking (bool)" type="bool">
    Wait for movement to complete
  </ParamField>

  <ParamField query="moving_time (float)" type="float">
    Time to complete the movement in seconds
  </ParamField>

  <ParamField query="accel_time (float)" type="float">
    Time to accelerate/decelerate in seconds
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  <ResponseField name="bool" type="bool">
    True if the movement command was successful
  </ResponseField>
</ResponseField>

### moveToDeltaPose

```python theme={null}
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.

<ResponseField name="Arguments">
  <ParamField query="delta_position (Position)" type="Position" required>
    Position offset in meters (in end-effector frame)
  </ParamField>

  <ParamField query="delta_orientation (Orientation)" type="Orientation">
    Orientation offset as quaternion (relative rotation)
  </ParamField>

  <ParamField query="blocking (bool)" type="bool">
    Wait for movement to complete
  </ParamField>

  <ParamField query="moving_time (float)" type="float">
    Time to complete the movement in seconds
  </ParamField>

  <ParamField query="accel_time (float)" type="float">
    Time to accelerate/decelerate in seconds
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  <ResponseField name="bool" type="bool">
    True if the movement command was successful
  </ResponseField>
</ResponseField>
