# Control

This page describes the interface of the Control component. See the [Control component design](<../../../components/control/index.md>) for the concepts.

The Control component follows the trajectory from Planning. It sends the commands to the vehicle interface. The default implementation is in [`autoware_launch`](<https://github.com/autowarefoundation/autoware_launch/tree/main/autoware_universe_launch/autoware_control_launch>).

The main nodes and topics of the Control component.

## Inputs

| Name | Topic | Type | Description |
| --- | --- | --- | --- |
| Trajectory | `/planning/trajectory` | [autoware\_planning\_msgs/msg/Trajectory](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_planning_msgs/msg/Trajectory.msg>) | The trajectory to follow. See the outputs of [Planning](<../planning/#to-control>). |
| Turn indicators command | `/planning/turn_indicators_cmd` | [autoware\_vehicle\_msgs/msg/TurnIndicatorsCommand](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_vehicle_msgs/msg/TurnIndicatorsCommand.msg>) | The turn indicators that Planning requests. |
| Hazard lights command | `/planning/hazard_lights_cmd` | [autoware\_vehicle\_msgs/msg/HazardLightsCommand](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_vehicle_msgs/msg/HazardLightsCommand.msg>) | The hazard lights that Planning requests. |
| Vehicle kinematic state | `/localization/kinematic_state` | [nav\_msgs/msg/Odometry](<https://github.com/ros2/common_interfaces/blob/rolling/nav_msgs/msg/Odometry.msg>) | The current pose and velocity of the vehicle. See the outputs of [Localization](<../localization/index.md>). |
| Vehicle acceleration | `/localization/acceleration` | [geometry\_msgs/msg/AccelWithCovarianceStamped](<https://github.com/ros2/common_interfaces/blob/rolling/geometry_msgs/msg/AccelWithCovarianceStamped.msg>) | The current acceleration of the vehicle. |
| Steering status | `/vehicle/status/steering_status` | [autoware\_vehicle\_msgs/msg/SteeringReport](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_vehicle_msgs/msg/SteeringReport.msg>) | The current steering tire angle. See the outputs of the [vehicle interface](<../vehicle-interface/#outputs-to-autoware>). |
| Gear status | `/vehicle/status/gear_status` | [autoware\_vehicle\_msgs/msg/GearReport](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_vehicle_msgs/msg/GearReport.msg>) | The current gear. The shift decider uses it. |
| Control mode | `/vehicle/status/control_mode` | [autoware\_vehicle\_msgs/msg/ControlModeReport](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_vehicle_msgs/msg/ControlModeReport.msg>) | The current control mode of the vehicle, for example manual or autonomous. |
| Operation mode change | `/system/operation_mode/change_operation_mode` (service) | [autoware\_system\_msgs/srv/ChangeOperationMode](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_system_msgs/srv/ChangeOperationMode.srv>) | A request from the AD API to change the operation mode. |

The control checkers, for example the autonomous emergency braking, also use `/perception/object_recognition/objects` and `/perception/obstacle_segmentation/pointcloud`. The lane departure checker uses `/map/vector_map` and `/planning/mission_planning/route`.

## Outputs

| Name | Topic | Type | Description |
| --- | --- | --- | --- |
| Control command | `/control/command/control_cmd` | [autoware\_control\_msgs/msg/Control](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_control_msgs/msg/Control.msg>) | The target lateral and longitudinal motion. See [the specification](<../list/control-command-control-cmd/index.md>). |
| Gear command | `/control/command/gear_cmd` | [autoware\_vehicle\_msgs/msg/GearCommand](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_vehicle_msgs/msg/GearCommand.msg>) | The target gear. See [the specification](<../list/control-command-gear-cmd/index.md>). |
| Turn indicators command | `/control/command/turn_indicators_cmd` | [autoware\_vehicle\_msgs/msg/TurnIndicatorsCommand](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_vehicle_msgs/msg/TurnIndicatorsCommand.msg>) | The target turn indicators. See [the specification](<../list/control-command-turn-indicators-cmd/index.md>). |
| Hazard lights command | `/control/command/hazard_lights_cmd` | [autoware\_vehicle\_msgs/msg/HazardLightsCommand](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_vehicle_msgs/msg/HazardLightsCommand.msg>) | The target hazard lights. See [the specification](<../list/control-command-hazard-lights-cmd/index.md>). |
| Control mode request | `/control/control_mode_request` (service) | [autoware\_vehicle\_msgs/srv/ControlModeCommand](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_vehicle_msgs/srv/ControlModeCommand.srv>) | A request to the vehicle to change the control mode. See [the specification](<../list/control-control-mode-request/index.md>). |
| Operation mode state | `/system/operation_mode/state` | [autoware\_adapi\_v1\_msgs/msg/OperationModeState](<https://github.com/autowarefoundation/autoware_adapi_msgs/blob/main/autoware_adapi_v1_msgs/operation_mode/msg/OperationModeState.msg>) | The current operation mode. In the default setup, the operation mode transition manager publishes it. |
| Predicted trajectory | `/control/trajectory_follower/lateral/predicted_trajectory` | [autoware\_planning\_msgs/msg/Trajectory](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_planning_msgs/msg/Trajectory.msg>) | The path that the lateral controller predicts for the vehicle. |

## Control command message

The [autoware\_control\_msgs/msg/Control](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_control_msgs/msg/Control.msg>) message has these fields. See the [README of autoware\_control\_msgs](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_control_msgs/README.md>) for their meaning.

- builtin\_interfaces/Time stamp
- builtin\_interfaces/Time control\_time
- [autoware\_control\_msgs/msg/Lateral](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_control_msgs/msg/Lateral.msg>) lateral

  - builtin\_interfaces/Time stamp
  - builtin\_interfaces/Time control\_time
  - float32 steering\_tire\_angle
  - float32 steering\_tire\_rotation\_rate
  - bool is\_defined\_steering\_tire\_rotation\_rate
- [autoware\_control\_msgs/msg/Longitudinal](<https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_control_msgs/msg/Longitudinal.msg>) longitudinal

  - builtin\_interfaces/Time stamp
  - builtin\_interfaces/Time control\_time
  - float32 velocity
  - float32 acceleration
  - float32 jerk
  - bool is\_defined\_acceleration
  - bool is\_defined\_jerk

For a vehicle that takes pedal or torque commands, the [autoware\_raw\_vehicle\_cmd\_converter](<https://github.com/autowarefoundation/autoware_universe/tree/main/vehicle/autoware_raw_vehicle_cmd_converter>) converts this command into actuation commands. If its parameters ask for it, it also uses the actuation status of the vehicle (`/vehicle/status/actuation_status`). See [Vehicle interface](<../vehicle-interface/#vehicle-adapter>).
