Skip to content

/control/command/gear_cmd#

Specifications#

Item Value
Last Updated 2026-01-21
Interface Type topic
Interface Name /control/command/gear_cmd
Data Type autoware_vehicle_msgs/msg/GearCommand
Rate [Hz] 10 or N/A
QoS Reliability reliable
QoS Durability volatile or transient_local

Description#

Send the gear change command to the vehicle. The commands are listed in the table below. It is recommended to set QoS to transient_local and publish only when the command changes, but currently many implementations publish the command periodically. Therefore, ensure consistency across the entire system.

Value Description
PARKING The engine or motor is disconnected from the tires and the stopping mechanism is activated.
NEUTRAL The engine or motor is disconnected from the tires.
DRIVE The engine or motor is connected to the tires in the forward direction.
REVERSE The engine or motor is connected to the tires in the backward direction.

Message#

The stamp field is the command sent time. In the case of periodic publication, use the latest time, not the last command change.

For the command field, use the valid values listed above. The NONE value can be used internally by programs, but will never be sent as a topic. Values ​​such as LOW and DRIVE_2 ​​can be used if the vehicle has its own special gear types, but a dedicated implementation is required to handle this.

Errors#

Safety guard: The command is ignored if the vehicle cannot change gear safely, for example, because the vehicle is not stopped.

Invalid command: If the vehicle interface receives an undefined command, it is ignored and a diagnostic error is reported.

Support#

This interface is required. If the vehicle does not have gears, simulate the gear behavior.

Limitations#

Response time: Mechanical gear shifting takes time (typically 0.5s - 2.0s). The gear_status will not change immediately after sending gear_cmd.

Simulated gear: For vehicles without physical gears (e.g., direct drive EVs), for example, the NEUTRAL state might be simulated logic and not a mechanical disconnection.

Use Cases#

  • Control the vehicle for autonomous driving.
  • Relay commands from the operator.

Requirement#

  • Support sending the gear command to the vehicle.
  • Support vehicle-specific gear status if necessary.
  • Report the error as diagnostics if an unsupported or unknown command is sent.

Design#

  • Support four typical gear types: PARKING, NEUTRAL, DRIVE, and REVERSE.
  • Unused values ​​can be used for special gear types.
  • Simulate gear if necessary to increase reusability.
  • To prevent gear shifting chattering, reject a new gear command during several seconds after the last successful gear command.

History#

Date Description
2026-01-21 First release in the new format.