> This page is for version 4.3.
> For other versions, use one of these documentation indexes:
> - 4.6 (Latest) (default): https://docs.nvidia.com/holoscan/sdk-user-guide/4-6-latest/llms.txt
> - ltsb-2.0: https://docs.nvidia.com/holoscan/sdk-user-guide/ltsb-2-0/llms.txt
> - 4.5: https://docs.nvidia.com/holoscan/sdk-user-guide/4-5/llms.txt
> - 4.4: https://docs.nvidia.com/holoscan/sdk-user-guide/4-4/llms.txt
> - 4.3: https://docs.nvidia.com/holoscan/sdk-user-guide/4-3/llms.txt
> - Archives: https://docs.nvidia.com/holoscan/sdk-user-guide/archives/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sdk-user-guide/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sdk-user-guide/_mcp/server.

# holoscan::Pose2

> Class representing 2D transformations (rigid body motion in 2D).

```cpp showLineNumbers={false}
template <typename K>
struct Pose2
```

Class representing 2D transformations (rigid body motion in 2D).

This class represents elements of the SE(2) group, which combines 2D rotations and translations. Each pose consists of a rotation component ([SO2](../classes/so2)) and a translation vector in 2D space.

```cpp showLineNumbers={false}
#include <holoscan/pose2.hpp>
```

**Template parameters**

**`K`** `typename`

Scalar type (typically float or double).

---

---

## Methods

### inverse \[#inverse]

```cpp showLineNumbers={false}
Pose2 holoscan::Pose2<K>::inverse() const
```

Get the inverse transformation.

**Returns:** Inverse transformation.

### matrix \[#matrix]

```cpp showLineNumbers={false}
Matrix3<K> holoscan::Pose2<K>::matrix() const
```

Get the 3×3 homogeneous transformation matrix representation.

**Returns:** 3×3 transformation matrix.

### cast \[#cast]

#### Const (1)

```cpp showLineNumbers={false}
template <typename S>
Pose2<S> holoscan::Pose2<K>::cast() const
```

Cast to a different scalar type.

**Returns:** Pose cast to the target type.

**Template parameters**

**`S`** `typename`

Target scalar type.

---

#### Const (2)

```cpp showLineNumbers={false}
template <typename S>
const Pose2 & holoscan::Pose2<K>::cast() const
```

Cast to the same scalar type (no-op).

**Returns:** Reference to this pose.

**Template parameters**

**`S`** `typename`

Target scalar type (same as K).

---

### pow \[#pow]

```cpp showLineNumbers={false}
Pose2 holoscan::Pose2<K>::pow(
    K exponent
) const
```

Compute the power of the transformation.

This computes the transformation raised to the given exponent using exponential coordinates and matrix exponentiation.

**Returns:** Transformation raised to the given power.

**Parameters**

**`exponent`** `K`

Power to raise the transformation to.

---

---

## Static methods

### identity \[#identity]

```cpp showLineNumbers={false}
static Pose2 holoscan::Pose2<K>::identity()
```

Create the identity transformation.

**Returns:** Identity transformation (no rotation or translation).

### from_translation \[#fromtranslation]

#### Create a pure translation transformation

```cpp showLineNumbers={false}
static Pose2 holoscan::Pose2<K>::from_translation(
    const Vector2<K> &translation
)
```

Create a pure translation transformation.

**Returns:** Translation-only transformation.

**Parameters**

**`translation`** `const Vector2<K> &`

Translation vector.

---

#### Overload 2

```cpp showLineNumbers={false}
static Pose2 holoscan::Pose2<K>::from_translation(
    K x,
    K y
)
```

Create a pure translation transformation from components.

**Returns:** Translation-only transformation.

**Parameters**

**`x`** `K`

X component of translation.

---

**`y`** `K`

Y component of translation.

---

### from_rotation \[#fromrotation]

```cpp showLineNumbers={false}
static Pose2 holoscan::Pose2<K>::from_rotation(
    const K angle
)
```

Create a pure rotation transformation.

**Returns:** Rotation-only transformation.

**Parameters**

**`angle`** `const K`

Rotation angle in radians.

---

### from_xy_a \[#fromxya]

```cpp showLineNumbers={false}
static Pose2 holoscan::Pose2<K>::from_xy_a(
    K px,
    K py,
    K angle
)
```

Create a pose from position and angle components.

**Returns:** Pose with specified translation and rotation.

**Parameters**

**`px`** `K`

X component of translation.

---

**`py`** `K`

Y component of translation.

---

**`angle`** `K`

Rotation angle in radians.

---

### from_matrix \[#frommatrix]

```cpp showLineNumbers={false}
static Pose2 holoscan::Pose2<K>::from_matrix(
    const Matrix3<K> &matrix
)
```

Create a pose from a 3×3 transformation matrix.

**Returns:** Pose represented by the matrix.

**Parameters**

**`matrix`** `const Matrix3<K> &`

3×3 Homogeneous transformation matrix.

---

---

## Types

### Typedefs

| Name     | Definition |
| -------- | ---------- |
| `Scalar` | `K`        |

---

## Member variables

| Name                          | Type           | Description            |
| ----------------------------- | -------------- | ---------------------- |
| `kDimension` static constexpr | `int`          |                        |
| `rotation`                    | `SO2< K >`     | Rotation component.    |
| `translation`                 | `Vector2< K >` | Translation component. |