> ## Documentation Index
> Fetch the complete documentation index at: https://scaledfoundations-rebrand.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# UR5e

## UR5e

Inherits from: [Robot](/robot-api/grid/robot/robot#robot)

A class to control the Universal Robots UR5e robotic arm.

This class provides methods to control the UR5e robot arm using the RTDE interface.
It supports basic movement controls, gripper operations, and status queries.

<ResponseField name="Attributes">
  <ParamField query="rtde_c" type="">
    RTDE Control interface object
  </ParamField>

  <ParamField query="rtde_r" type="">
    RTDE Receive interface object
  </ParamField>

  <ParamField query="end_effector" type="">
    Gripper/end effector object if attached
  </ParamField>
</ResponseField>

### UR5e

```python
UR5e(robot_ip: str, end_effector, velocity: float, acceleration: float)
```

Initialize the UR5e robot arm.

<ResponseField name="Arguments">
  <ParamField query="robot_ip (str)" type="" required>
    defaults to "192.168.1.102".
    IP address of the robot. Defaults to "192.168.1.102".
  </ParamField>

  <ParamField query="end_effector (optional)" type="" required>
    defaults to None.
    End effector class to use. Defaults to None.
  </ParamField>

  <ParamField query="velocity (float)" type="" required>
    defaults to 0.1.
    Default velocity scaling (0-1). Defaults to 0.1.
  </ParamField>

  <ParamField query="acceleration (float)" type="" required>
    defaults to 0.1.
    Default acceleration scaling (0-1). Defaults to 0.1.
  </ParamField>
</ResponseField>

### getImage

```python
UR5e.getImage(camera_name: str, image_type: str)
```

Get an image from the robot's camera.

<Note>
  The UR5e does not have a camera, so this method always raises an exception.
</Note>

<ResponseField name="Arguments">
  <ParamField query="camera_name (str)" type="" required>
    Unused
  </ParamField>

  <ParamField query="image_type (str)" type="" required>
    Unused
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  [Image](/robot-api/grid/utils/types#image)

  Never returns as exception is raised
</ResponseField>

### cleanup

```python
UR5e.cleanup()
```

### moveToDeltaPose

```python
UR5e.moveToDeltaPose(delta_pose: Pose, blocking: bool, moving_time: float, accel_time: float)
```

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

<ResponseField name="Arguments">
  <ParamField query="delta_pose (Pose)" type="" required>
    [Pose](/robot-api/grid/utils/types#pose)

    Relative pose offset to move by, containing position and orientation deltas
  </ParamField>

  <ParamField query="blocking (bool), optional" type="">
    defaults to False.
    Wait for movement to complete. Defaults to False.
  </ParamField>

  <ParamField query="moving_time (float), optional" type="">
    defaults to 0.3.
    Time to complete the movement. Defaults to 0.3.
  </ParamField>

  <ParamField query="accel_time (float), optional" type="">
    defaults to 0.15.
    Time to accelerate/decelerate. Defaults to 0.15.
  </ParamField>
</ResponseField>

### moveToPose

```python
UR5e.moveToPose(position: Position, orientation: Orientation, blocking: bool, moving_time: float, accel_time: float, name: str)
```

Move the robot end effector to a specified pose.

<ResponseField name="Arguments">
  <ParamField query="position (Position)" type="" required>
    [Position](/robot-api/grid/utils/types#position)

    Target position coordinates
  </ParamField>

  <ParamField query="orientation (Orientation)" type="" required>
    [Orientation](/robot-api/grid/utils/types#orientation)

    Target orientation
  </ParamField>

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

  <ParamField query="moving_time (float), optional" type="">
    defaults to 0.3.
    Time to complete the movement. Defaults to 0.3.
  </ParamField>

  <ParamField query="accel_time (float), optional" type="">
    defaults to 0.15.
    Time to accelerate/decelerate. Defaults to 0.15.
  </ParamField>

  <ParamField query="name (str), optional" type="">
    Unused
  </ParamField>
</ResponseField>

### moveByVelocity

```python
UR5e.moveByVelocity(linear_velocity: Velocity, angular_velocity: Velocity, name: str)
```

Move the robot end effector with specified velocities.

<ResponseField name="Arguments">
  <ParamField query="linear_velocity (Velocity)" type="" required>
    [Velocity](/robot-api/grid/utils/types#velocity)

    Linear velocity components
  </ParamField>

  <ParamField query="angular_velocity (Velocity)" type="" required>
    [Velocity](/robot-api/grid/utils/types#velocity)

    Angular velocity components
  </ParamField>

  <ParamField query="name (str), optional" type="">
    Unused
  </ParamField>
</ResponseField>

### stop

```python
UR5e.stop(immediate)
```

Stop any movement of the robot.

<ResponseField name="Arguments">
  <ParamField query="immediate (bool), optional" type="">
    If True, stops immediately by killing script.
    If False, performs controlled stop. Defaults to False.
  </ParamField>
</ResponseField>

### grasp

```python
UR5e.grasp()
```

### release

```python
UR5e.release()
```

### shutdown

```python
UR5e.shutdown()
```

### getEndEffectorPose

```python
UR5e.getEndEffectorPose()
```

Get the current end effector pose.

<ResponseField name="Returns">
  [Pose](/robot-api/grid/utils/types#pose)

  Current end effector position and orientation
</ResponseField>

### getPosition

```python
UR5e.getPosition(name: str)
```

Get the current end effector position.

<ResponseField name="Returns">
  [Position](/robot-api/grid/utils/types#position)

  Current end effector position
  name (str, optional): Unused
</ResponseField>

### getOrientation

```python
UR5e.getOrientation(name: str)
```

Get the current end effector orientation.

<ResponseField name="Returns">
  [Orientation](/robot-api/grid/utils/types#orientation)

  Current end effector orientation
  name (str, optional): Unused
</ResponseField>

### getJointAngles

```python
UR5e.getJointAngles()
```

Get current joint angles.

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

### getJointVelocities

```python
UR5e.getJointVelocities()
```

Get current joint velocities.

<ResponseField name="Returns">
  List of current joint velocities in radians/second
</ResponseField>

### setJointAngles

```python
UR5e.setJointAngles(angles: list, blocking: bool, moving_time: float | None, accel_time: float | None)
```

Set joint angles directly.

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

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

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

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

### moveToHome

```python
UR5e.moveToHome()
```
