From 5f9e4621f52b22ae3adea25415e288212c8a964e Mon Sep 17 00:00:00 2001 From: Maxime CLEMENT Date: Tue, 12 Dec 2023 20:44:34 +0900 Subject: [PATCH 1/6] Update vehicle interface document (WIP) Signed-off-by: Maxime CLEMENT --- .../components/vehicle-interface.md | 77 ++++++++----------- 1 file changed, 34 insertions(+), 43 deletions(-) diff --git a/docs/design/autoware-interfaces/components/vehicle-interface.md b/docs/design/autoware-interfaces/components/vehicle-interface.md index 61798f60bb4..0a17a21b5d5 100644 --- a/docs/design/autoware-interfaces/components/vehicle-interface.md +++ b/docs/design/autoware-interfaces/components/vehicle-interface.md @@ -1,70 +1,61 @@ # Vehicle Interface -![Node diagram](images/Vehicle-Interface-Bus-ODD-Architecture.drawio.svg) +This page provides specific specifications about the interface of the Vehicle Interface Component. Please refer to the [Vehicle Interface design document](../../autoware-architecture/vehicle/) for high-level concepts and data flow. + +**TODO: The detailed definitions (meanings of elements included in each topic) are not described yet, need to be updated.** The `Vehicle Interface` receives the `Vehicle Signal Commands` and `Vehicle Control Commands` and publishes the vehicle status. It also communicates with vehicle by the vehicle-specific protocol. -The `Gate` switches multiple `Vehicle Control Commands`. These signals include autonomous diving command, joystick, remote control, and emergency operation, etc. The `Adapter` converts generalized control command (target steering, steering rate, velocity, acceleration, jerk) into vehicle-specific control values (steering-torque, wheel-torque, voltage, pressure, accel pedal position, etc). ## Inputs -### Error status - -(See Inputs of Planning.) +### From Planning Component +### From Control Component -### Vehicle Control Command +| Name | Topic | Type | Description | +| ----------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | +| Control command | `/control/command/control_cmd` | autoware_auto_control_msgs/msg/AckermannControlCommand | Target control of the vehicle (steering, velocity, ...) | +| Emergency command | `/control/command/emergency_cmd` | tier4_vehicle_msgs/msg/VehicleEmergencyStamped | TODO | +| Gear command | `/control/command/gear_cmd` | autoware_auto_vehicle_msgs/msg/GearCommand | Target gear of the vehicle | +| Hazard lights command | `/control/command/hazard_lights_cmd` | autoware_auto_vehicle_msgs/msg/HazardLightsCommand | Control of hazard lights | +| Turn indicator command | `/control/command/turn_indicators_cmd` | autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand | Control of turn signals | -(See Output of Control.) -### Vehicle Signals Commands - -Commands for various elements of the vehicle unrelated to motion. Published by the Planning module. +### From API ## Outputs -### Vehicle Signal Reports - -Reports for various elements of the vehicle unrelated to motion. Published by the Vehicle Interface. - -### Vehicle Odometry - -Odometry of the vehicle. Used by the Localization module to update the pose of the vehicle in the map. - -- [geometry_msgs/TwistWithCovarianceStamped](https://docs.ros.org/en/melodic/api/geometry_msgs/html/msg/TwistWithCovarianceStamped.html) odometry - -### Steering Status +### To Autoware -Steering of the ego vehicle. Published by the Vehicle Interface. +| Name | Topic | Type | Description | +| ----------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | +| | `/vehicle/status/actuation_status` | tier4_vehicle_msgs/msg/ActuationStatusStamped | TODO | +| | `/vehicle/status/control_mode` | autoware_auto_vehicle_msgs/msg/ControlModeReport | TODO | +| | `/vehicle/status/door_status` | tier4_api_msgs/msg/DoorStatus | TODO | +| | `/vehicle/status/gear_status` | autoware_auto_vehicle_msgs/msg/GearReport | TODO | +| | `/vehicle/status/hazard_lights_status` | autoware_auto_vehicle_msgs/msg/HazardLightsReport | TODO | +| | `/vehicle/status/steering_status` | autoware_auto_vehicle_msgs/msg/SteeringReport | TODO | +| | `/vehicle/status/steering_wheel_status` | tier4_vehicle_msgs/msg/SteeringWheelStatusStamped | TODO | +| | `/vehicle/status/turn_indicators_status` | autoware_auto_vehicle_msgs/msg/TurnIndicatorsReport | TODO | +| | `/vehicle/status/velocity_status` | autoware_auto_vehicle_msgs/msg/VelocityReport | TODO | -- Steering message ([github discussion](https://github.com/autowarefoundation/autoware/discussions/2462)). - - builtin_interfaces::msg::Time stamp - - float32 steering_angle +### To the vehicle -### Actuation Status +Vehicle specific messages protocol like CAN (Controller Area Network). -Actuation status of the ego vehicle for acceleration, steering, and brake. This represents the reported physical efforts exerted by the vehicle actuators. Published by the Vehicle Interface. -- ActuationStatus ([github discussion](https://github.com/autowarefoundation/autoware/discussions/2462)). - - builtin_interfaces::msg::Time stamp - - float32 acceleration - - float32 steering - - float32 brake +### To Control Component -**The message definition is under discussion.** +### To Localization Component -### Actuation Command +Odometry of the vehicle. Used by the Localization module to update the pose of the vehicle in the map. -Actuation command sent to the ego vehicle. This represents the requested physical efforts to be exerted by the vehicle actuators. Published by the Vehicle Interface as generated by the adapter. +- [geometry_msgs/TwistWithCovarianceStamped](https://docs.ros.org/en/melodic/api/geometry_msgs/html/msg/TwistWithCovarianceStamped.html) odometry -- ActuationCommand ([github discussion](https://github.com/autowarefoundation/autoware/discussions/2462).) - - builtin_interfaces::msg::Time stamp - - float32 acceleration - - float32 steering - - float32 brake -**The message definition is under discussion.** +## Vehicle Communication -### Vehicle Communication +## Internal interface -Vehicle specific messages protocol like CAN (Controller Area Network). +| Actuation command | /control/command/actuation_cmd | tier4_vehicle_msgs/msg/ActuationCommandStamped | Target TODO | \ No newline at end of file From 284bd3941fd15dff0faf116a699d55fce6ed49c2 Mon Sep 17 00:00:00 2001 From: Maxime CLEMENT Date: Wed, 13 Dec 2023 16:11:14 +0900 Subject: [PATCH 2/6] update message descriptions Signed-off-by: Maxime CLEMENT --- .../components/vehicle-interface.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/design/autoware-interfaces/components/vehicle-interface.md b/docs/design/autoware-interfaces/components/vehicle-interface.md index 0a17a21b5d5..276dd38b4d2 100644 --- a/docs/design/autoware-interfaces/components/vehicle-interface.md +++ b/docs/design/autoware-interfaces/components/vehicle-interface.md @@ -15,11 +15,11 @@ The `Adapter` converts generalized control command (target steering, steering ra | Name | Topic | Type | Description | | ----------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | -| Control command | `/control/command/control_cmd` | autoware_auto_control_msgs/msg/AckermannControlCommand | Target control of the vehicle (steering, velocity, ...) | -| Emergency command | `/control/command/emergency_cmd` | tier4_vehicle_msgs/msg/VehicleEmergencyStamped | TODO | -| Gear command | `/control/command/gear_cmd` | autoware_auto_vehicle_msgs/msg/GearCommand | Target gear of the vehicle | -| Hazard lights command | `/control/command/hazard_lights_cmd` | autoware_auto_vehicle_msgs/msg/HazardLightsCommand | Control of hazard lights | -| Turn indicator command | `/control/command/turn_indicators_cmd` | autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand | Control of turn signals | +| Control command | `/control/command/control_cmd` | [autoware_auto_control_msgs/msg/AckermannControlCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_control_msgs/msg/AckermannControlCommand.idl) | Target controls of the vehicle (steering angle, velocity, ...) | +| Emergency command | `/control/command/emergency_cmd` | [tier4_vehicle_msgs/msg/VehicleEmergencyStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/VehicleEmergencyStamped.msg) | Whether the vehicle should enter its emergency mode | +| Gear command | `/control/command/gear_cmd` | [autoware_auto_vehicle_msgs/msg/GearCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/GearCommand.idl) | Target gear of the vehicle | +| Hazard lights command | `/control/command/hazard_lights_cmd` | [autoware_auto_vehicle_msgs/msg/HazardLightsCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/HazardLightsCommand.idl) | Target values of the hazard lights | +| Turn indicator command | `/control/command/turn_indicators_cmd` | [autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand.idl) | Target values of the turn signals | ### From API @@ -30,15 +30,15 @@ The `Adapter` converts generalized control command (target steering, steering ra | Name | Topic | Type | Description | | ----------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | -| | `/vehicle/status/actuation_status` | tier4_vehicle_msgs/msg/ActuationStatusStamped | TODO | -| | `/vehicle/status/control_mode` | autoware_auto_vehicle_msgs/msg/ControlModeReport | TODO | -| | `/vehicle/status/door_status` | tier4_api_msgs/msg/DoorStatus | TODO | -| | `/vehicle/status/gear_status` | autoware_auto_vehicle_msgs/msg/GearReport | TODO | -| | `/vehicle/status/hazard_lights_status` | autoware_auto_vehicle_msgs/msg/HazardLightsReport | TODO | -| | `/vehicle/status/steering_status` | autoware_auto_vehicle_msgs/msg/SteeringReport | TODO | -| | `/vehicle/status/steering_wheel_status` | tier4_vehicle_msgs/msg/SteeringWheelStatusStamped | TODO | -| | `/vehicle/status/turn_indicators_status` | autoware_auto_vehicle_msgs/msg/TurnIndicatorsReport | TODO | -| | `/vehicle/status/velocity_status` | autoware_auto_vehicle_msgs/msg/VelocityReport | TODO | +| Actuation status | `/vehicle/status/actuation_status` | [tier4_vehicle_msgs/msg/ActuationStatusStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/ActuationStatusStamped.msg) | Currentr acceleration, brake, and steer values reported by the vehicle | +| Control mode | `/vehicle/status/control_mode` | [autoware_auto_vehicle_msgs/msg/ControlModeReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/ControlModeReport.idl) | Current control mode (manual, autonomous, ...) | +| Door status | `/vehicle/status/door_status` | [tier4_api_msgs/msg/DoorStatus](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_api_msgs/msg/DoorStatus.msg) | Current door status | +| Gear report | `/vehicle/status/gear_status` | [autoware_auto_vehicle_msgs/msg/GearReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/GearReport.idl) | Current gear of the vehicle | +| Hazard light status | `/vehicle/status/hazard_lights_status` | [autoware_auto_vehicle_msgs/msg/HazardLightsReport]() | Current hazard lights status | +| Steering status | `/vehicle/status/steering_status` | [autoware_auto_vehicle_msgs/msg/SteeringReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/SteeringReport.idl) | Current steering angle of the steering tire | +| Steering wheel status | `/vehicle/status/steering_wheel_status` | [tier4_vehicle_msgs/msg/SteeringWheelStatusStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/SteeringWheelStatusStamped.msg) | Current steering wheel angle | +| Turn indicators status | `/vehicle/status/turn_indicators_status` | [autoware_auto_vehicle_msgs/msg/TurnIndicatorsReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/TurnIndicatorsReport.idl) | Current state of the left and right turn indicators | +| Velocity status | `/vehicle/status/velocity_status` | [autoware_auto_vehicle_msgs/msg/VelocityReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/VelocityReport.idl) | Current velocities of the vehicle (longitudinal, lateral, heading rate) | ### To the vehicle From 73e61c973f00ddbdbfaacd27760aff8a4ad7ae03 Mon Sep 17 00:00:00 2001 From: Maxime CLEMENT Date: Thu, 14 Dec 2023 17:07:49 +0900 Subject: [PATCH 3/6] Improve descriptions of interfaces Signed-off-by: Maxime CLEMENT --- .../components/vehicle-interface.md | 91 ++++++++----------- 1 file changed, 38 insertions(+), 53 deletions(-) diff --git a/docs/design/autoware-interfaces/components/vehicle-interface.md b/docs/design/autoware-interfaces/components/vehicle-interface.md index 276dd38b4d2..353538ddd7c 100644 --- a/docs/design/autoware-interfaces/components/vehicle-interface.md +++ b/docs/design/autoware-interfaces/components/vehicle-interface.md @@ -1,61 +1,46 @@ # Vehicle Interface -This page provides specific specifications about the interface of the Vehicle Interface Component. Please refer to the [Vehicle Interface design document](../../autoware-architecture/vehicle/) for high-level concepts and data flow. +This page describes the Vehicle Interface Component. Please refer to the [Vehicle Interface design document](../../autoware-architecture/vehicle/) for high-level concepts and data flow. -**TODO: The detailed definitions (meanings of elements included in each topic) are not described yet, need to be updated.** +![Vehicle Interface overview](../../autoware-architecture/vehicle/image/vehicle_interface_overview.png) The `Vehicle Interface` receives the `Vehicle Signal Commands` and `Vehicle Control Commands` and publishes the vehicle status. It also communicates with vehicle by the vehicle-specific protocol. The `Adapter` converts generalized control command (target steering, steering rate, velocity, acceleration, jerk) into vehicle-specific control values (steering-torque, wheel-torque, voltage, pressure, accel pedal position, etc). -## Inputs - -### From Planning Component -### From Control Component - -| Name | Topic | Type | Description | -| ----------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | -| Control command | `/control/command/control_cmd` | [autoware_auto_control_msgs/msg/AckermannControlCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_control_msgs/msg/AckermannControlCommand.idl) | Target controls of the vehicle (steering angle, velocity, ...) | -| Emergency command | `/control/command/emergency_cmd` | [tier4_vehicle_msgs/msg/VehicleEmergencyStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/VehicleEmergencyStamped.msg) | Whether the vehicle should enter its emergency mode | -| Gear command | `/control/command/gear_cmd` | [autoware_auto_vehicle_msgs/msg/GearCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/GearCommand.idl) | Target gear of the vehicle | -| Hazard lights command | `/control/command/hazard_lights_cmd` | [autoware_auto_vehicle_msgs/msg/HazardLightsCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/HazardLightsCommand.idl) | Target values of the hazard lights | -| Turn indicator command | `/control/command/turn_indicators_cmd` | [autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand.idl) | Target values of the turn signals | - - -### From API - -## Outputs - -### To Autoware - -| Name | Topic | Type | Description | -| ----------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | -| Actuation status | `/vehicle/status/actuation_status` | [tier4_vehicle_msgs/msg/ActuationStatusStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/ActuationStatusStamped.msg) | Currentr acceleration, brake, and steer values reported by the vehicle | -| Control mode | `/vehicle/status/control_mode` | [autoware_auto_vehicle_msgs/msg/ControlModeReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/ControlModeReport.idl) | Current control mode (manual, autonomous, ...) | -| Door status | `/vehicle/status/door_status` | [tier4_api_msgs/msg/DoorStatus](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_api_msgs/msg/DoorStatus.msg) | Current door status | -| Gear report | `/vehicle/status/gear_status` | [autoware_auto_vehicle_msgs/msg/GearReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/GearReport.idl) | Current gear of the vehicle | -| Hazard light status | `/vehicle/status/hazard_lights_status` | [autoware_auto_vehicle_msgs/msg/HazardLightsReport]() | Current hazard lights status | -| Steering status | `/vehicle/status/steering_status` | [autoware_auto_vehicle_msgs/msg/SteeringReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/SteeringReport.idl) | Current steering angle of the steering tire | -| Steering wheel status | `/vehicle/status/steering_wheel_status` | [tier4_vehicle_msgs/msg/SteeringWheelStatusStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/SteeringWheelStatusStamped.msg) | Current steering wheel angle | -| Turn indicators status | `/vehicle/status/turn_indicators_status` | [autoware_auto_vehicle_msgs/msg/TurnIndicatorsReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/TurnIndicatorsReport.idl) | Current state of the left and right turn indicators | -| Velocity status | `/vehicle/status/velocity_status` | [autoware_auto_vehicle_msgs/msg/VelocityReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/VelocityReport.idl) | Current velocities of the vehicle (longitudinal, lateral, heading rate) | - -### To the vehicle - -Vehicle specific messages protocol like CAN (Controller Area Network). - - -### To Control Component - -### To Localization Component - -Odometry of the vehicle. Used by the Localization module to update the pose of the vehicle in the map. - -- [geometry_msgs/TwistWithCovarianceStamped](https://docs.ros.org/en/melodic/api/geometry_msgs/html/msg/TwistWithCovarianceStamped.html) odometry - - -## Vehicle Communication - -## Internal interface - -| Actuation command | /control/command/actuation_cmd | tier4_vehicle_msgs/msg/ActuationCommandStamped | Target TODO | \ No newline at end of file +## Inputs from Autoware + +| Name | Topic | Type | Description | +| ---------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | +| Control command | `/control/command/control_cmd` | [autoware_auto_control_msgs/msg/AckermannControlCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_control_msgs/msg/AckermannControlCommand.idl) | Target controls of the vehicle (steering angle, velocity, ...) | +| Emergency command | `/control/command/emergency_cmd` | [tier4_vehicle_msgs/msg/VehicleEmergencyStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/VehicleEmergencyStamped.msg) | Whether the vehicle should enter its emergency mode | +| Gear command | `/control/command/gear_cmd` | [autoware_auto_vehicle_msgs/msg/GearCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/GearCommand.idl) | Target gear of the vehicle | +| Hazard lights command | `/control/command/hazard_lights_cmd` | [autoware_auto_vehicle_msgs/msg/HazardLightsCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/HazardLightsCommand.idl) | Target values of the hazard lights | +| Turn indicator command | `/control/command/turn_indicators_cmd` | [autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand.idl) | Target values of the turn signals | + +## Outputs to Autoware + +| Name | Topic | Type | Description | +| ---------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| Actuation status | `/vehicle/status/actuation_status` | [tier4_vehicle_msgs/msg/ActuationStatusStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/ActuationStatusStamped.msg) | Current acceleration, brake, and steer values reported by the vehicle | +| Control mode | `/vehicle/status/control_mode` | [autoware_auto_vehicle_msgs/msg/ControlModeReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/ControlModeReport.idl) | Current control mode (manual, autonomous, ...) | +| Door status | `/vehicle/status/door_status` | [tier4_api_msgs/msg/DoorStatus](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_api_msgs/msg/DoorStatus.msg) | Current door status | +| Gear report | `/vehicle/status/gear_status` | [autoware_auto_vehicle_msgs/msg/GearReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/GearReport.idl) | Current gear of the vehicle | +| Hazard light status | `/vehicle/status/hazard_lights_status` | [autoware_auto_vehicle_msgs/msg/HazardLightsReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/HazardLightsReport.idl) | Current hazard lights status | +| Steering status | `/vehicle/status/steering_status` | [autoware_auto_vehicle_msgs/msg/SteeringReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/SteeringReport.idl) | Current steering angle of the steering tire | +| Steering wheel status | `/vehicle/status/steering_wheel_status` | [tier4_vehicle_msgs/msg/SteeringWheelStatusStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/SteeringWheelStatusStamped.msg) | Current steering wheel angle | +| Turn indicators status | `/vehicle/status/turn_indicators_status` | [autoware_auto_vehicle_msgs/msg/TurnIndicatorsReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/TurnIndicatorsReport.idl) | Current state of the left and right turn indicators | +| Velocity status | `/vehicle/status/velocity_status` | [autoware_auto_vehicle_msgs/msg/VelocityReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/VelocityReport.idl) | Current velocities of the vehicle (longitudinal, lateral, heading rate) | + +## Communication with the vehicle + +The interface to communicate with the vehicle varies between brands and models. +For example a vehicle specific message protocol like CAN (Controller Area Network) with a ROS2 interface (e.g., [pacmod](https://github.com/astuff/pacmod3)). +In addition, an Autoware specific interface is often necessary (e.g., [pacmod_interface](https://github.com/tier4/pacmod_interface/tree/main/pacmod_interface)). + +### Custom control commands + +Autoware's basic control command (speed, acceleration, steering angle, steering rate) may not be suitable for all vehicles. +For example, some vehicles expects values for voltage, motor torque, pedal pressure, etc. +In such case, the Autoware control command must be converted. +For an example, see the [raw_vehicle_cmd_converter](https://autowarefoundation.github.io/autoware.universe/main/vehicle/raw_vehicle_cmd_converter/). From b48d71df8b0c7cf5e52bacd6af1c9dd3c98c199d Mon Sep 17 00:00:00 2001 From: Maxime CLEMENT Date: Thu, 14 Dec 2023 17:20:21 +0900 Subject: [PATCH 4/6] ROS2 -> ROS 2 Signed-off-by: Maxime CLEMENT --- docs/design/autoware-interfaces/components/vehicle-interface.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/design/autoware-interfaces/components/vehicle-interface.md b/docs/design/autoware-interfaces/components/vehicle-interface.md index 353538ddd7c..dfebd7c477c 100644 --- a/docs/design/autoware-interfaces/components/vehicle-interface.md +++ b/docs/design/autoware-interfaces/components/vehicle-interface.md @@ -35,7 +35,7 @@ The `Adapter` converts generalized control command (target steering, steering ra ## Communication with the vehicle The interface to communicate with the vehicle varies between brands and models. -For example a vehicle specific message protocol like CAN (Controller Area Network) with a ROS2 interface (e.g., [pacmod](https://github.com/astuff/pacmod3)). +For example a vehicle specific message protocol like CAN (Controller Area Network) with a ROS 2 interface (e.g., [pacmod](https://github.com/astuff/pacmod3)). In addition, an Autoware specific interface is often necessary (e.g., [pacmod_interface](https://github.com/tier4/pacmod_interface/tree/main/pacmod_interface)). ### Custom control commands From 76068244dcf2785a912673265fdf08df9fcf2c58 Mon Sep 17 00:00:00 2001 From: Maxime CLEMENT Date: Thu, 14 Dec 2023 21:06:57 +0900 Subject: [PATCH 5/6] Add GateMode message description Signed-off-by: Maxime CLEMENT --- .../components/vehicle-interface.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/design/autoware-interfaces/components/vehicle-interface.md b/docs/design/autoware-interfaces/components/vehicle-interface.md index dfebd7c477c..2984272b1d1 100644 --- a/docs/design/autoware-interfaces/components/vehicle-interface.md +++ b/docs/design/autoware-interfaces/components/vehicle-interface.md @@ -10,13 +10,14 @@ The `Adapter` converts generalized control command (target steering, steering ra ## Inputs from Autoware -| Name | Topic | Type | Description | -| ---------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | -| Control command | `/control/command/control_cmd` | [autoware_auto_control_msgs/msg/AckermannControlCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_control_msgs/msg/AckermannControlCommand.idl) | Target controls of the vehicle (steering angle, velocity, ...) | -| Emergency command | `/control/command/emergency_cmd` | [tier4_vehicle_msgs/msg/VehicleEmergencyStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/VehicleEmergencyStamped.msg) | Whether the vehicle should enter its emergency mode | -| Gear command | `/control/command/gear_cmd` | [autoware_auto_vehicle_msgs/msg/GearCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/GearCommand.idl) | Target gear of the vehicle | -| Hazard lights command | `/control/command/hazard_lights_cmd` | [autoware_auto_vehicle_msgs/msg/HazardLightsCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/HazardLightsCommand.idl) | Target values of the hazard lights | -| Turn indicator command | `/control/command/turn_indicators_cmd` | [autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand.idl) | Target values of the turn signals | +| Name | Topic | Type | Description | +| ---------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| Control command | `/control/command/control_cmd` | [autoware_auto_control_msgs/msg/AckermannControlCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_control_msgs/msg/AckermannControlCommand.idl) | Target controls of the vehicle (steering angle, velocity, ...) | +| Emergency command | `/control/command/emergency_cmd` | [tier4_vehicle_msgs/msg/VehicleEmergencyStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/VehicleEmergencyStamped.msg) | Whether the vehicle should enter its emergency mode | +| Gear command | `/control/command/gear_cmd` | [autoware_auto_vehicle_msgs/msg/GearCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/GearCommand.idl) | Target gear of the vehicle | +| Hazard lights command | `/control/command/hazard_lights_cmd` | [autoware_auto_vehicle_msgs/msg/HazardLightsCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/HazardLightsCommand.idl) | Target values of the hazard lights | +| Turn indicator command | `/control/command/turn_indicators_cmd` | [autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand.idl) | Target values of the turn signals | +| Gate mode | `/control/current_gate_mode` | [tier4_control_msgs::msg::GateMode](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_control_msgs/msg/GateMode.msg) | Indicate the origin of the control command (Autoware or some external source) | ## Outputs to Autoware From 1debbbc43ea89b669d5291a808740880df3efefa Mon Sep 17 00:00:00 2001 From: Maxime CLEMENT Date: Fri, 15 Dec 2023 18:21:55 +0900 Subject: [PATCH 6/6] Update figure, messages, adapter description Signed-off-by: Maxime CLEMENT --- .../images/vehicle-interface.drawio.svg | 4 ++ .../components/vehicle-interface.md | 72 ++++++++++--------- 2 files changed, 43 insertions(+), 33 deletions(-) create mode 100644 docs/design/autoware-interfaces/components/images/vehicle-interface.drawio.svg diff --git a/docs/design/autoware-interfaces/components/images/vehicle-interface.drawio.svg b/docs/design/autoware-interfaces/components/images/vehicle-interface.drawio.svg new file mode 100644 index 00000000000..08cc94ba502 --- /dev/null +++ b/docs/design/autoware-interfaces/components/images/vehicle-interface.drawio.svg @@ -0,0 +1,4 @@ + + + +
Vehicle Interface Component
Vehicle Interface Component
Vehicle statuses
(vehicle format and protocol)
Vehicle statuses...
Vehicle commands
Vehicle commands
Vehicle statuses
Vehicle statuses
Control Component
Control Component
Vehicle command adapter
Vehicle command adapter
Vehicle
Vehicle
Vehicle interface
Vehicle interface
Vehicle commands
(vehicle format)
Vehicle commands...
Vehicle statuses
(vehicle format)
Vehicle statuses...
Vehicle commands
(vehicle format and protocol)
Vehicle commands...
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/design/autoware-interfaces/components/vehicle-interface.md b/docs/design/autoware-interfaces/components/vehicle-interface.md index 2984272b1d1..4074f3a0897 100644 --- a/docs/design/autoware-interfaces/components/vehicle-interface.md +++ b/docs/design/autoware-interfaces/components/vehicle-interface.md @@ -2,36 +2,12 @@ This page describes the Vehicle Interface Component. Please refer to the [Vehicle Interface design document](../../autoware-architecture/vehicle/) for high-level concepts and data flow. -![Vehicle Interface overview](../../autoware-architecture/vehicle/image/vehicle_interface_overview.png) +![Vehicle interface diagram](images/vehicle-interface.drawio.svg) -The `Vehicle Interface` receives the `Vehicle Signal Commands` and `Vehicle Control Commands` and publishes the vehicle status. It also communicates with vehicle by the vehicle-specific protocol. +The `Vehicle Interface Component` receives `Vehicle commands` and publishes `Vehicle statuses`. +It communicates with the vehicle by the vehicle-specific protocol. -The `Adapter` converts generalized control command (target steering, steering rate, velocity, acceleration, jerk) into vehicle-specific control values (steering-torque, wheel-torque, voltage, pressure, accel pedal position, etc). - -## Inputs from Autoware - -| Name | Topic | Type | Description | -| ---------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| Control command | `/control/command/control_cmd` | [autoware_auto_control_msgs/msg/AckermannControlCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_control_msgs/msg/AckermannControlCommand.idl) | Target controls of the vehicle (steering angle, velocity, ...) | -| Emergency command | `/control/command/emergency_cmd` | [tier4_vehicle_msgs/msg/VehicleEmergencyStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/VehicleEmergencyStamped.msg) | Whether the vehicle should enter its emergency mode | -| Gear command | `/control/command/gear_cmd` | [autoware_auto_vehicle_msgs/msg/GearCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/GearCommand.idl) | Target gear of the vehicle | -| Hazard lights command | `/control/command/hazard_lights_cmd` | [autoware_auto_vehicle_msgs/msg/HazardLightsCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/HazardLightsCommand.idl) | Target values of the hazard lights | -| Turn indicator command | `/control/command/turn_indicators_cmd` | [autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand.idl) | Target values of the turn signals | -| Gate mode | `/control/current_gate_mode` | [tier4_control_msgs::msg::GateMode](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_control_msgs/msg/GateMode.msg) | Indicate the origin of the control command (Autoware or some external source) | - -## Outputs to Autoware - -| Name | Topic | Type | Description | -| ---------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| Actuation status | `/vehicle/status/actuation_status` | [tier4_vehicle_msgs/msg/ActuationStatusStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/ActuationStatusStamped.msg) | Current acceleration, brake, and steer values reported by the vehicle | -| Control mode | `/vehicle/status/control_mode` | [autoware_auto_vehicle_msgs/msg/ControlModeReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/ControlModeReport.idl) | Current control mode (manual, autonomous, ...) | -| Door status | `/vehicle/status/door_status` | [tier4_api_msgs/msg/DoorStatus](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_api_msgs/msg/DoorStatus.msg) | Current door status | -| Gear report | `/vehicle/status/gear_status` | [autoware_auto_vehicle_msgs/msg/GearReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/GearReport.idl) | Current gear of the vehicle | -| Hazard light status | `/vehicle/status/hazard_lights_status` | [autoware_auto_vehicle_msgs/msg/HazardLightsReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/HazardLightsReport.idl) | Current hazard lights status | -| Steering status | `/vehicle/status/steering_status` | [autoware_auto_vehicle_msgs/msg/SteeringReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/SteeringReport.idl) | Current steering angle of the steering tire | -| Steering wheel status | `/vehicle/status/steering_wheel_status` | [tier4_vehicle_msgs/msg/SteeringWheelStatusStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/SteeringWheelStatusStamped.msg) | Current steering wheel angle | -| Turn indicators status | `/vehicle/status/turn_indicators_status` | [autoware_auto_vehicle_msgs/msg/TurnIndicatorsReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/TurnIndicatorsReport.idl) | Current state of the left and right turn indicators | -| Velocity status | `/vehicle/status/velocity_status` | [autoware_auto_vehicle_msgs/msg/VelocityReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/VelocityReport.idl) | Current velocities of the vehicle (longitudinal, lateral, heading rate) | +The optional `Vehicle command adapter` converts generalized control command (target steering, steering rate, velocity, acceleration) into vehicle-specific control values (steering-torque, wheel-torque, voltage, pressure, acceleration pedal position, etc). ## Communication with the vehicle @@ -39,9 +15,39 @@ The interface to communicate with the vehicle varies between brands and models. For example a vehicle specific message protocol like CAN (Controller Area Network) with a ROS 2 interface (e.g., [pacmod](https://github.com/astuff/pacmod3)). In addition, an Autoware specific interface is often necessary (e.g., [pacmod_interface](https://github.com/tier4/pacmod_interface/tree/main/pacmod_interface)). -### Custom control commands +## Vehicle adapter + +Autoware's basic control command express the target motion of the vehicle in terms of speed, acceleration, steering angle, and steering rate. +This may not be suitable for all vehicles and we thus distinguish between two types of vehicles. + +- Type 1: vehicle that is directly controlled by a subset of speed, acceleration, steering angle, and steering rate. +- Type 2: vehicle that uses custom commands (motor torque, voltage, pedal pressure, etc). + +For vehicles of type 2, +a vehicle adapter is necessary to convert the Autoware control command into the vehicle specific commands. +For an example, see the [raw_vehicle_cmd_converter](https://autowarefoundation.github.io/autoware.universe/main/vehicle/raw_vehicle_cmd_converter/) +which converts the target speed and steering angle to acceleration, steering, and brake mechanical inputs. + +## Inputs from Autoware + +| Name | Topic | Type | Description | +| ---------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | +| Control command | `/control/command/control_cmd` | [autoware_auto_control_msgs/msg/AckermannControlCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_control_msgs/msg/AckermannControlCommand.idl) | Target controls of the vehicle (steering angle, velocity, ...) | +| Control mode command | `/control/control_mode_request` | [ControlModeCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/srv/ControlModeCommand.srv) | Request to switch between manual and autonomous driving | +| Gear command | `/control/command/gear_cmd` | [autoware_auto_vehicle_msgs/msg/GearCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/GearCommand.idl) | Target gear of the vehicle | +| Hazard lights command | `/control/command/hazard_lights_cmd` | [autoware_auto_vehicle_msgs/msg/HazardLightsCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/HazardLightsCommand.idl) | Target values of the hazard lights | +| Turn indicator command | `/control/command/turn_indicators_cmd` | [autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand.idl) | Target values of the turn signals | + +## Outputs to Autoware -Autoware's basic control command (speed, acceleration, steering angle, steering rate) may not be suitable for all vehicles. -For example, some vehicles expects values for voltage, motor torque, pedal pressure, etc. -In such case, the Autoware control command must be converted. -For an example, see the [raw_vehicle_cmd_converter](https://autowarefoundation.github.io/autoware.universe/main/vehicle/raw_vehicle_cmd_converter/). +| Name | Topic | Type | Optional ? | Description | +| ---------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ----------------------------------------------------------------------- | +| Actuation status | `/vehicle/status/actuation_status` | [tier4_vehicle_msgs/msg/ActuationStatusStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/ActuationStatusStamped.msg) | Yes (vehicle with mechanical inputs) | Current acceleration, brake, and steer values reported by the vehicle | +| Control mode | `/vehicle/status/control_mode` | [autoware_auto_vehicle_msgs/msg/ControlModeReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/ControlModeReport.idl) | | Current control mode (manual, autonomous, ...) | +| Door status | `/vehicle/status/door_status` | [tier4_api_msgs/msg/DoorStatus](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_api_msgs/msg/DoorStatus.msg) | Yes | Current door status | +| Gear report | `/vehicle/status/gear_status` | [autoware_auto_vehicle_msgs/msg/GearReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/GearReport.idl) | | Current gear of the vehicle | +| Hazard light status | `/vehicle/status/hazard_lights_status` | [autoware_auto_vehicle_msgs/msg/HazardLightsReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/HazardLightsReport.idl) | | Current hazard lights status | +| Steering status | `/vehicle/status/steering_status` | [autoware_auto_vehicle_msgs/msg/SteeringReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/SteeringReport.idl) | | Current steering angle of the steering tire | +| Steering wheel status | `/vehicle/status/steering_wheel_status` | [tier4_vehicle_msgs/msg/SteeringWheelStatusStamped](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_vehicle_msgs/msg/SteeringWheelStatusStamped.msg) | Yes | Current steering wheel angle | +| Turn indicators status | `/vehicle/status/turn_indicators_status` | [autoware_auto_vehicle_msgs/msg/TurnIndicatorsReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/TurnIndicatorsReport.idl) | | Current state of the left and right turn indicators | +| Velocity status | `/vehicle/status/velocity_status` | [autoware_auto_vehicle_msgs/msg/VelocityReport](https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/VelocityReport.idl) | | Current velocities of the vehicle (longitudinal, lateral, heading rate) |