# motion_profiles

How robots, people and mechanisms move: speed, acceleration, payload derating and a collaborative speed, named by a MOTION block's `profile`.

In the model file this key holds a list of `motion_profile` entries, each named by its `name`.

A scenario, an experiment or an optimizer can set a field by the path `motion_profiles.<name>.<field>`.

## Typical uses

These sections describe things that move and the floor they move on. `network` is a path network of nodes and segments. `fleets` are pools of vehicles or workers that carry entities on it. `chargers` recharge batteries. `motion_profiles` and `zones` describe robots and their safety areas. Use them when distances and travel times matter.

## Behaviour and rules

Travel time is exact geometry: the shortest path on the network divided by the speed. A segment can limit the speed. The `length_factor` scales straight-line distances for a segment with no length of its own. A node is named by a STATION through its `node`.

A fleet is a resource under its own name. A TRANSPORT block requests one of its vehicles, which drives empty to the entity, loads, drives loaded to the destination and unloads. `dispatch` decides whose request is served when a vehicle frees, and `select` decides which idle vehicle serves it. With `park` set to `home`, an idle vehicle drives back to its `home` node.

A fleet with `kind` set to `worker` supplies people to PROCESS and SEIZE blocks through `worker_fleet`. A fleet with a `battery` drains it at its power draw and recharges at a charger when its job is done. A fleet with `motion` set to `gantry` ignores the network. A motion profile gives a robot its speed, acceleration, payload derating and a collaborative speed. A zone slows a robot to that speed when a worker is inside.

## Fields

| Field | Type | Required | Default | Unit | Description |
|---|---|---|---|---|---|
| `name` | string | yes |  |  | The profile's name, the `profile` of a MOTION block. |
| `description` | string |  |  |  | What the profile stands for; the run does not read it. |
| `kind` | choice |  | `"robot"` |  | What moves: a "robot", a "human" or a "mechanism". One of `robot`, `human`, `mechanism`. |
| `speed` | number | yes | `1.0` | speed (`speed_unit`) | m/s. |
| `speed_unit` | string |  | `"m/s"` |  | Unit `speed` and `collaborative_speed` are in. |
| `accel` | number | yes | `1.0` |  | m/s^2. |
| `payload_max` | number or null |  |  | mass (`payload_unit`) | kg; null or absent = no payload derating. |
| `payload_unit` | choice |  | `"kg"` |  | Unit `payload_max` is in. One of `base`, `g`, `kg`, `t`. |
| `payload_derate` | number or null |  | `1.0` | ratio | Speed fraction at payload_max, linear from 1.0 at 0 kg. |
| `collaborative_speed` | number or null |  |  | speed (`speed_unit`) | m/s; required when a block uses hrc "collaborative" or "separation". |

A field of a nested object is described in the JSON Schema (`naga schema`).

## Example

```json
{"motion_profiles": [{"name": "Arm", "kind": "robot", "speed": 1.0, "accel": 2.0}]}
```

In the Python builder:

```python
from nagasim import build as nb
m = nb.Model()
m.add_motion_profile(name='Arm', kind='robot', speed=1.0, accel=2.0)
```

## Used in

Bundled models: [Robot cell against manual assembly](../../gallery/manufacturing.md), [Automation floor (robot cells, AMR, palletiser)](../../gallery/manufacturing.md).

Guides: [Motion cycles](../../modelling-guide/motion.md), [Mobile cobots: machine tending](../../modelling-guide/tending.md).

## See also

- [All sections](index.md), [Model file keys](../schema.md), [Model file format](../../model-file-format.md)
