# Manual control

## Related API

- [/api/manual/remote/control\_mode/list](<../../list/api/manual/remote/control_mode/list/index.md>)
- [/api/manual/remote/control\_mode/select](<../../list/api/manual/remote/control_mode/select/index.md>)
- [/api/manual/remote/control\_mode/status](<../../list/api/manual/remote/control_mode/status/index.md>)
- [/api/manual/remote/operator/heartbeat](<../../list/api/manual/remote/operator/heartbeat/index.md>)
- [/api/manual/remote/command/pedals](<../../list/api/manual/remote/command/pedals/index.md>)
- [/api/manual/remote/command/acceleration](<../../list/api/manual/remote/command/acceleration/index.md>)
- [/api/manual/remote/command/velocity](<../../list/api/manual/remote/command/velocity/index.md>)
- [/api/manual/remote/command/steering](<../../list/api/manual/remote/command/steering/index.md>)
- [/api/manual/remote/command/gear](<../../list/api/manual/remote/command/gear/index.md>)
- [/api/manual/remote/command/turn\_indicators](<../../list/api/manual/remote/command/turn_indicators/index.md>)
- [/api/manual/remote/command/hazard\_lights](<../../list/api/manual/remote/command/hazard_lights/index.md>)
- [/api/manual/local/control\_mode/list](<../../list/api/manual/local/control_mode/list/index.md>)
- [/api/manual/local/control\_mode/select](<../../list/api/manual/local/control_mode/select/index.md>)
- [/api/manual/local/control\_mode/status](<../../list/api/manual/local/control_mode/status/index.md>)
- [/api/manual/local/operator/heartbeat](<../../list/api/manual/local/operator/heartbeat/index.md>)
- [/api/manual/local/command/pedals](<../../list/api/manual/local/command/pedals/index.md>)
- [/api/manual/local/command/acceleration](<../../list/api/manual/local/command/acceleration/index.md>)
- [/api/manual/local/command/velocity](<../../list/api/manual/local/command/velocity/index.md>)
- [/api/manual/local/command/steering](<../../list/api/manual/local/command/steering/index.md>)
- [/api/manual/local/command/gear](<../../list/api/manual/local/command/gear/index.md>)
- [/api/manual/local/command/turn\_indicators](<../../list/api/manual/local/command/turn_indicators/index.md>)
- [/api/manual/local/command/hazard\_lights](<../../list/api/manual/local/command/hazard_lights/index.md>)

## Description

This API is used to manually control the vehicle, and provides the same interface for different operators: remote and local. For example, the local operator controls a vehicle without a driver's seat using a joystick, while the remote operator provides remote support when problems occur with autonomous driving. The command sent will be used when [operation mode](<../operation_mode/index.md>) is remote or local.

## Operator status

The application needs to determine whether the operator is able to drive and send that information via the operator heartbeat API (`/api/manual/*/operator/heartbeat`). If the operator is unable to continue driving during manual operation, Autoware will perform MRM to bring the vehicle to a safe state. For level 3 and below, the operator status is referenced even during autonomous driving.

The default implementation reports a diagnostic warning if no heartbeat arrives for 1.0 second, and a diagnostic error after 2.0 seconds.

## Control mode

Since there are multiple ways to control a vehicle, such as pedals or acceleration, the application must first select a control mode.

| Mode | Description |
| --- | --- |
| disabled | This is the initial mode. When selected, all command APIs are unavailable. |
| pedals | This mode provides longitudinal control using the pedals. |
| acceleration | This mode provides longitudinal control using the target acceleration. |
| velocity | This mode provides longitudinal control using the target velocity. |

The default implementation (the `manual/local` and `manual/remote` nodes of `autoware_default_adapi_universe`) supports only the pedals mode. The list API returns only `PEDALS`, and a request to select the acceleration or velocity mode fails. A request to select a mode also fails while the operation mode is the target mode of the API, for example remote for the remote API.

## Commands

The commands available in each mode are as follows.

| Command | disabled | pedals | acceleration | velocity |
| --- | :---: | :---: | :---: | :---: |
| pedals | \- | ✓ | \- | \- |
| acceleration | \- | \- | ✓ | \- |
| velocity | \- | \- | \- | ✓ |
| steering | \- | ✓ | ✓ | ✓ |
| gear | \- | ✓ | ✓ | ✓ |
| turn\_indicators | \- | ✓ | ✓ | ✓ |
| hazard\_lights | \- | ✓ | ✓ | ✓ |
