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

# Torque

## Torque

Inherits from: `object`

A class to represent 3D torque.

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

Attributes:
x (float): x-component of torque (N⋅m)
y (float): y-component of torque (N⋅m)
z (float): z-component of torque (N⋅m)

### **init**

```python theme={null}
Torque.__init__(x: float, y: float, z: float) -> None
```

Initialize a Torque object.

<ResponseField name="Arguments">
  <ParamField query="x (float)" type="float" required>
    x-component of torque in Newton-meters
  </ParamField>

  <ParamField query="y (float)" type="float" required>
    y-component of torque in Newton-meters
  </ParamField>

  <ParamField query="z (float)" type="float" required>
    z-component of torque in Newton-meters
  </ParamField>
</ResponseField>

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

### to\_dict

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

Serialize to dictionary for JSON transfer.

<ResponseField name="Returns">
  <ResponseField name="dict" type="dict">
    Dictionary representation of the torque
  </ResponseField>
</ResponseField>

### from\_dict

```python theme={null}
Torque.from_dict(data: dict) -> 'Torque'
```

Deserialize from dictionary.

<ResponseField name="Arguments">
  <ParamField query="data (dict)" type="dict" required>
    Dictionary containing torque data
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  <ResponseField name="Torque" type="'Torque'">
    Reconstructed torque object
  </ResponseField>
</ResponseField>
