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

# WidowX250s

## WidowX250s

Inherits from: [`Arm`](/robot-api/reference/base/robot/arm/Arm)

*No class docstring.*

### Inherited methods

* From [`Arm`](/robot-api/reference/base/robot/arm/Arm): `setNamedPose`, `removeNamedPose`, `getNamedPose`
* From [`Robot`](/robot-api/reference/base/robot/robot/Robot): `addSensor`, `cleanup`

### **init**

```python theme={null}
WidowX250s.__init__()
```

Initialize the WidowX robot arm.

Note that the ROS node must already be running:
`ros2 launch interbotix_xsarm_control xsarm_control.launch.py robot_model:=wx250s`

### goToHomePose

```python theme={null}
WidowX250s.goToHomePose()
```

*No docstring provided.*

### moveToHome

```python theme={null}
WidowX250s.moveToHome(moving_time: float = 2.0, accel_time: float = 0.75)
```

*No docstring provided.*

<ResponseField name="Arguments">
  <ParamField query="moving_time (float)" type="float">
    *No description provided.*
  </ParamField>

  <ParamField query="accel_time (float)" type="float">
    *No description provided.*
  </ParamField>
</ResponseField>

### torqueEnable

```python theme={null}
WidowX250s.torqueEnable(enable: bool = True)
```

Enable or disable torque for the robot arm. (useful if you want free-drive mode)

<ResponseField name="Arguments">
  <ParamField query="enable (bool)" type="bool">
    Whether to enable torque. Defaults to True.
  </ParamField>
</ResponseField>

### moveToDeltaPose

```python theme={null}
WidowX250s.moveToDeltaPose(delta_pose: Pose, blocking: bool = True, moving_time: float = 0.5, accel_time: float = 0.2) -> bool
```

Move the robot end effector by a relative pose offset from its current pose.

<ResponseField name="Arguments">
  <ParamField query="delta_pose (Pose)" type="Pose" required>
    *No description provided.*
  </ParamField>

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

  <ParamField query="moving_time (float)" type="float">
    Time to complete the movement. Defaults to 0.5.
  </ParamField>

  <ParamField query="accel_time (float)" type="float">
    Time to accelerate/decelerate. Defaults to 0.2.
  </ParamField>
</ResponseField>

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

### moveToPose

```python theme={null}
WidowX250s.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 with respect to the base frame.

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

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

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

  <ParamField query="moving_time (float)" type="float">
    Time to complete the movement (seconds). Defaults to 2.0s.
  </ParamField>

  <ParamField query="accel_time (float)" type="float">
    Time to spend accelerating and decelerating (seconds). Defaults to 0.5s.
  </ParamField>
</ResponseField>

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

<ResponseField name="Raises">
  <ParamField query="ValueError" type="">
    If moving\_time or accel\_time are not positive floats or integers
  </ParamField>
</ResponseField>

### moveToNamedPose

```python theme={null}
WidowX250s.moveToNamedPose(pose_name: str, blocking: bool = True, moving_time: float = 2.0, accel_time: float = 0.75)
```

Move the robot to the joint angles of a named pose.

<ResponseField name="Arguments">
  <ParamField query="pose_name (str)" type="str" required>
    Name of the pose to move to. Options are "home", "sleep".
  </ParamField>

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

  <ParamField query="moving_time (float)" type="float">
    Time to complete the movement. Defaults to 2.0.
  </ParamField>

  <ParamField query="accel_time (float)" type="float">
    Time to accelerate/decelerate. Defaults to 0.75.
  </ParamField>
</ResponseField>

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

### moveByVelocity

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

Move the robot end effector with specified velocities.

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

  <ParamField query="angular_velocity (Velocity)" type="Velocity" required>
    Angular velocity components
  </ParamField>

  <ParamField query="frame (str)" type="str">
    *No description provided.*
  </ParamField>
</ResponseField>

### grasp

```python theme={null}
WidowX250s.grasp()
```

Close the gripper to grasp an object (blocking).

### release

```python theme={null}
WidowX250s.release()
```

Open the gripper to release an object (blocking).

### setGripperPosition

```python theme={null}
WidowX250s.setGripperPosition(position: float)
```

Set the gripper position in the range from 0 (closed) to 1 (open) (blocking).

<ResponseField name="Arguments">
  <ParamField query="position (float)" type="float" required>
    *No description provided.*
  </ParamField>
</ResponseField>

### goToSleepPose

```python theme={null}
WidowX250s.goToSleepPose()
```

Move arm to sleep pose.

### shutdown

```python theme={null}
WidowX250s.shutdown()
```

Shutdown the robot safely

Moves arm to sleep pose then destroys the ROS node.

### getEndEffectorPose

```python theme={null}
WidowX250s.getEndEffectorPose()
```

Get the current end effector pose with respect to the base frame.

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

### getPosition

```python theme={null}
WidowX250s.getPosition()
```

Get the current end effector position with respect to the robot base (meters)

<ResponseField name="Returns">
  <ResponseField name="Position" type="">
    Current end effector position with respect to the robot base
  </ResponseField>
</ResponseField>

### getState

```python theme={null}
WidowX250s.getState()
```

Get the complete state of the robot as one large dictionary.

<ResponseField name="Returns">
  <ResponseField name="dict" type="">
    Current state of the robot containing: - joint\_positions: 6-element list, Current joint positions (radians) - end\_effector\_pose: homogenous matrix, Current end effector pose with respect to the robot base
  </ResponseField>
</ResponseField>

### stop

```python theme={null}
WidowX250s.stop()
```

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

Commands the robot to maintain its current position.

### getOrientation

```python theme={null}
WidowX250s.getOrientation()
```

Get the current end effector orientation with respect to the robot base.

<ResponseField name="Returns">
  <ResponseField name="Orientation" type="">
    Current end effector orientation with respect to the robot base
  </ResponseField>
</ResponseField>

### getJointAngles

```python theme={null}
WidowX250s.getJointAngles()
```

Get current joint angles.

<ResponseField name="Returns">
  <ResponseField name="list" type="">
    List of current joint angles in radians
  </ResponseField>
</ResponseField>

### setJointAngles

```python theme={null}
WidowX250s.setJointAngles(angles: list, blocking: bool = True, moving_time: float = 2.0, accel_time: float = 0.5) -> bool
```

Set joint angles directly.

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

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

  <ParamField query="moving_time (float)" type="float">
    Time to complete the movement. Defaults to None.
  </ParamField>

  <ParamField query="accel_time (float)" type="float">
    Time to accelerate/decelerate. Defaults to None.
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  <ResponseField name="bool" type="bool">
    True if position was commanded; False if it wasn't due to being outside limits
  </ResponseField>
</ResponseField>

### getImage

```python theme={null}
WidowX250s.getImage(camera_name: str, image_type: str) -> Image
```

*No docstring provided.*

<ResponseField name="Arguments">
  <ParamField query="camera_name (str)" type="str" required>
    *No description provided.*
  </ParamField>

  <ParamField query="image_type (str)" type="str" required>
    *No description provided.*
  </ParamField>
</ResponseField>

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