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

# Force

> A class to represent 3D force

```python theme={null}
from grid_types import Force
```

A class to represent 3D force.

Represents force in 3D space with x, y, and z components.
Supports mathematical operations and conversions to/from various formats.

## Fields

<ResponseField name="x" type="float">
  x-component of force (N)
</ResponseField>

<ResponseField name="y" type="float">
  y-component of force (N)
</ResponseField>

<ResponseField name="z" type="float">
  z-component of force (N)
</ResponseField>

## Constructor

```python Signature theme={null}
Force(x: float, y: float, z: float)
```

## Methods

### `from_dict()`

```python Signature theme={null}
from_dict(data: dict) -> Force
```

Deserialize from dictionary.

<ParamField body="data" required>
  Dictionary containing force data
</ParamField>

**Returns:**

Force: Reconstructed force object

### `to_dict()`

```python Signature theme={null}
to_dict() -> dict
```

Serialize to dictionary for JSON transfer.

**Returns:**

dict: Dictionary representation of the force


## Related topics

- [Customizing RL Training](/simulation/isaac/reinforcement-learning/customizing-training.md)
- [MDP Config](/simulation/isaac/session_configuration/mdp.md)
- [ROS2 Communication](/simulation/isaac/comms.md)
