diff --git a/docs/design/autoware-interfaces/ad-api/.pages b/docs/design/autoware-interfaces/ad-api/.pages index bba6450af8c..5e2a85e21fc 100644 --- a/docs/design/autoware-interfaces/ad-api/.pages +++ b/docs/design/autoware-interfaces/ad-api/.pages @@ -1,4 +1,5 @@ nav: - index.md - - use-cases + - features - list + - types diff --git a/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/index.md b/docs/design/autoware-interfaces/ad-api/features/fail-safe.md similarity index 91% rename from docs/design/autoware-interfaces/ad-api/list/api/fail_safe/index.md rename to docs/design/autoware-interfaces/ad-api/features/fail-safe.md index 58b14a9c060..355c402bac8 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/index.md +++ b/docs/design/autoware-interfaces/ad-api/features/fail-safe.md @@ -1,4 +1,6 @@ -# Fail-safe API +# Fail-safe + +## Related API - {{ link_ad_api('/api/fail_safe/mrm_state') }} @@ -11,14 +13,14 @@ For safety, Autoware switches the operation to MRM when an abnormality is detect Since the required behavior differs depending on the situation, MRM is implemented in various places as a specific mode in a normal module or as an independent module. The fail-safe module selects the behavior of MRM according to the abnormality and switches the gate output to that command. -![fail-safe-architecture](./architecture.drawio.svg) +![fail-safe-architecture](./fail-safe/architecture.drawio.svg) ## States The MRM state indicates whether MRM is operating. This state also provides success or failure. Generally, MRM will switch to another behavior if it fails. -![mrm-state](./mrm-state.drawio.svg) +![mrm-state](./fail-safe/mrm-state.drawio.svg) | State | Description | | --------- | ---------------------------------------------------------- | @@ -32,7 +34,7 @@ Generally, MRM will switch to another behavior if it fails. There is a dependency between MRM behaviors. For example, it switches from a comfortable stop to a emergency stop, but not the other way around. This is service dependent. Autoware supports the following transitions by default. -![mrm-behavior](./mrm-behavior.drawio.svg) +![mrm-behavior](./fail-safe/mrm-behavior.drawio.svg) | State | Description | | ---------------- | ------------------------------------------------------------------------- | diff --git a/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/architecture.drawio.svg b/docs/design/autoware-interfaces/ad-api/features/fail-safe/architecture.drawio.svg similarity index 100% rename from docs/design/autoware-interfaces/ad-api/list/api/fail_safe/architecture.drawio.svg rename to docs/design/autoware-interfaces/ad-api/features/fail-safe/architecture.drawio.svg diff --git a/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm-behavior.drawio.svg b/docs/design/autoware-interfaces/ad-api/features/fail-safe/mrm-behavior.drawio.svg similarity index 100% rename from docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm-behavior.drawio.svg rename to docs/design/autoware-interfaces/ad-api/features/fail-safe/mrm-behavior.drawio.svg diff --git a/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm-state.drawio.svg b/docs/design/autoware-interfaces/ad-api/features/fail-safe/mrm-state.drawio.svg similarity index 100% rename from docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm-state.drawio.svg rename to docs/design/autoware-interfaces/ad-api/features/fail-safe/mrm-state.drawio.svg diff --git a/docs/design/autoware-interfaces/ad-api/list/api/interface/index.md b/docs/design/autoware-interfaces/ad-api/features/interface.md similarity index 91% rename from docs/design/autoware-interfaces/ad-api/list/api/interface/index.md rename to docs/design/autoware-interfaces/ad-api/features/interface.md index 186fa2bf3f2..c472bdd3737 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/interface/index.md +++ b/docs/design/autoware-interfaces/ad-api/features/interface.md @@ -1,4 +1,6 @@ -# Interface API +# Interface + +## Related API - {{ link_ad_api('/api/interface/version') }} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/localization/index.md b/docs/design/autoware-interfaces/ad-api/features/localization.md similarity index 88% rename from docs/design/autoware-interfaces/ad-api/list/api/localization/index.md rename to docs/design/autoware-interfaces/ad-api/features/localization.md index 6caa6952b5c..dab03f6c843 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/localization/index.md +++ b/docs/design/autoware-interfaces/ad-api/features/localization.md @@ -1,4 +1,6 @@ -# Localization API +# Localization + +## Related API - {{ link_ad_api('/api/localization/initialization_state') }} - {{ link_ad_api('/api/localization/initialize') }} @@ -9,7 +11,7 @@ This API manages the initialization of localization. Autoware requires a global ## States -![localization-initialization_state-state](./state.drawio.svg) +![localization-initialization-state](./localization/state.drawio.svg) | State | Description | | ------------- | -------------------------------------------------------------------------------- | diff --git a/docs/design/autoware-interfaces/ad-api/list/api/localization/state.drawio.svg b/docs/design/autoware-interfaces/ad-api/features/localization/state.drawio.svg similarity index 100% rename from docs/design/autoware-interfaces/ad-api/list/api/localization/state.drawio.svg rename to docs/design/autoware-interfaces/ad-api/features/localization/state.drawio.svg diff --git a/docs/design/autoware-interfaces/ad-api/list/api/motion/index.md b/docs/design/autoware-interfaces/ad-api/features/motion.md similarity index 94% rename from docs/design/autoware-interfaces/ad-api/list/api/motion/index.md rename to docs/design/autoware-interfaces/ad-api/features/motion.md index 999ff244a4d..5edf6631df5 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/motion/index.md +++ b/docs/design/autoware-interfaces/ad-api/features/motion.md @@ -1,4 +1,6 @@ -# Motion API +# Motion + +## Related API - {{ link_ad_api('/api/motion/state') }} - {{ link_ad_api('/api/motion/accept_start') }} @@ -17,7 +19,7 @@ In this state, calling the start API changes the state to MOVING and the vehicle This mechanism can add processing such as announcements before the vehicle starts. Depending on the configuration, the state may transition directly from STOPPED to MOVING. -![motion-state](./docs/state.drawio.svg) +![motion-state](./motion/state.drawio.svg) | State | Description | | ---------------- | ----------------------------------------------- | diff --git a/docs/design/autoware-interfaces/ad-api/list/api/motion/docs/state.drawio.svg b/docs/design/autoware-interfaces/ad-api/features/motion/state.drawio.svg similarity index 100% rename from docs/design/autoware-interfaces/ad-api/list/api/motion/docs/state.drawio.svg rename to docs/design/autoware-interfaces/ad-api/features/motion/state.drawio.svg diff --git a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/index.md b/docs/design/autoware-interfaces/ad-api/features/operation_mode.md similarity index 95% rename from docs/design/autoware-interfaces/ad-api/list/api/operation_mode/index.md rename to docs/design/autoware-interfaces/ad-api/features/operation_mode.md index 47c9eb31f84..d8337692be8 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/index.md +++ b/docs/design/autoware-interfaces/ad-api/features/operation_mode.md @@ -1,4 +1,6 @@ -# Operation Mode API +# Operation mode + +## Related API - {{ link_ad_api('/api/operation_mode/state') }} - {{ link_ad_api('/api/operation_mode/change_to_autonomous') }} @@ -22,7 +24,7 @@ Autoware control mode has four operation modes. | Local | Manually control the vehicle from nearby with some device such as a joystick. | | Remote | Manually control the vehicle from a web application on the cloud. | -![operation-mode-architecture](./architecture.drawio.svg) +![operation-mode-architecture](./operation_mode/architecture.drawio.svg) ## States diff --git a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/architecture.drawio.svg b/docs/design/autoware-interfaces/ad-api/features/operation_mode/architecture.drawio.svg similarity index 100% rename from docs/design/autoware-interfaces/ad-api/list/api/operation_mode/architecture.drawio.svg rename to docs/design/autoware-interfaces/ad-api/features/operation_mode/architecture.drawio.svg diff --git a/docs/design/autoware-interfaces/ad-api/features/planning-factors.md b/docs/design/autoware-interfaces/ad-api/features/planning-factors.md index 8e5300f2329..eff614ae230 100644 --- a/docs/design/autoware-interfaces/ad-api/features/planning-factors.md +++ b/docs/design/autoware-interfaces/ad-api/features/planning-factors.md @@ -1,5 +1,70 @@ # Planning factors -!!! warning +## Related API - Under Construction +- {{ link_ad_api('/api/planning/velocity_factors') }} +- {{ link_ad_api('/api/planning/steering_factors') }} + +## Description + +This API manages the planned behavior of the vehicle. +Applications can notify the vehicle behavior to the people around and visualize it for operator and passengers. + +## Velocity factors + +The velocity factors is an array of information on the behavior that the vehicle stops (or slows down). +Each factor has a type shown below, pose in the base link, distance, status, and detailed data depending on its type. +As the vehicle approaches the stop position, this factor appears with a status of APPROACHING. +And when the vehicle reaches that position and stops, the status will be STOPPED. +The pose indicates the stop position or the base link if the stop position cannot be calculated. + +![velocity-factors](./planning-factors/velocity-factors.drawio.svg) + +| Factor Type | Description | +| --------------------------- | ------------------------------------------------------------------------ | +| SURROUNDING_OBSTACLE | There are obstacles immediately around the vehicle. | +| ROUTE_OBSTACLE | There are obstacles along the route ahead. | +| INTERSECTION | There are obstacles in other lanes in the path. | +| CROSSWALK | There are obstacles on the crosswalk. | +| REAR_CHECK | There are obstacles behind that would be in a human driver's blind spot. | +| USER_DEFINED_DETECTION_AREA | There are obstacles in the predefined detection area. | +| NO_STOPPING_AREA | There is not enough space beyond the no stopping area. | +| STOP_SIGN | A stop by a stop sign. | +| TRAFFIC_SIGNAL | A stop by a traffic signal. | +| V2I_GATE_CONTROL_ENTER | A stop by a V2I gate entering. | +| V2I_GATE_CONTROL_LEAVE | A stop by a V2I gate leaving. | +| MERGE | A stop before merging lanes. | +| SIDEWALK | A stop before crossing the sidewalk. | +| LANE_CHANGE | A lane change. | +| AVOIDANCE | A path change to avoid an obstacle in the current lane. | +| EMERGENCY_OPERATION | A stop by emergency instruction from the operator. | + +## Steering factors + +The steering factors is an array of information on the maneuver that requires use of turn indicators, such as turning left or right. +Each factor has a type shown below, pose in the base link, distance, status, and detailed data depending on its type. +As the vehicle approaches the position to start steering, this factor appears with a status of APPROACHING. +And when the vehicle reaches that position, the status will be TURNING. +The pose indicates the start position when APPROACHING and the end position when TURNING. + +![steering-factors-1](./planning-factors/steering-factors-1.drawio.svg) + +In cases such as lane change and avoidance, the vehicle will start steering at any position in the range depending on the situation. +As the vehicle approaches the start position of the range, this factor appears with a status of APPROACHING. +And when the vehicle reaches that position, the status will be TRYING. +Then, when it is possible, the vehicle will start steering and the status will be TURNING. +The pose indicates the start of the range (A) when APPROACHING and the end of the range (B) when TRYING. +The position to end steering (C to D) for TURNING depends on the position to start steering. + +![steering-factors-2](./planning-factors/steering-factors-2.drawio.svg) + +| Factor Type | Description | +| --------------------- | ------------------------------------------------------------------------ | +| INTERSECTION | A turning left or right at an intersection. | +| LANE_CHANGE | A lane change. | +| AVOIDANCE_PATH_CHANGE | A path change to avoid an obstacle in the current lane. | +| AVOIDANCE_PATH_RETURN | A path change to return to the original lane after avoiding an obstacle. | +| STATION | T.B.D. (bus stop) | +| PULL_OUT | T.B.D. | +| PULL_OVER | T.B.D. | +| EMERGENCY_OPERATION | A path change by emergency instruction from the operator. | diff --git a/docs/design/autoware-interfaces/ad-api/list/api/planning/docs/steering-factors-1.drawio.svg b/docs/design/autoware-interfaces/ad-api/features/planning-factors/steering-factors-1.drawio.svg similarity index 100% rename from docs/design/autoware-interfaces/ad-api/list/api/planning/docs/steering-factors-1.drawio.svg rename to docs/design/autoware-interfaces/ad-api/features/planning-factors/steering-factors-1.drawio.svg diff --git a/docs/design/autoware-interfaces/ad-api/list/api/planning/docs/steering-factors-2.drawio.svg b/docs/design/autoware-interfaces/ad-api/features/planning-factors/steering-factors-2.drawio.svg similarity index 100% rename from docs/design/autoware-interfaces/ad-api/list/api/planning/docs/steering-factors-2.drawio.svg rename to docs/design/autoware-interfaces/ad-api/features/planning-factors/steering-factors-2.drawio.svg diff --git a/docs/design/autoware-interfaces/ad-api/list/api/planning/docs/velocity-factors.drawio.svg b/docs/design/autoware-interfaces/ad-api/features/planning-factors/velocity-factors.drawio.svg similarity index 100% rename from docs/design/autoware-interfaces/ad-api/list/api/planning/docs/velocity-factors.drawio.svg rename to docs/design/autoware-interfaces/ad-api/features/planning-factors/velocity-factors.drawio.svg diff --git a/docs/design/autoware-interfaces/ad-api/list/api/routing/index.md b/docs/design/autoware-interfaces/ad-api/features/routing.md similarity index 95% rename from docs/design/autoware-interfaces/ad-api/list/api/routing/index.md rename to docs/design/autoware-interfaces/ad-api/features/routing.md index 9e5a6953ba0..bc13a4dabd6 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/routing/index.md +++ b/docs/design/autoware-interfaces/ad-api/features/routing.md @@ -1,4 +1,6 @@ -# Route API +# Routing + +## Related API - {{ link_ad_api('/api/routing/state') }} - {{ link_ad_api('/api/routing/route') }} @@ -14,7 +16,7 @@ There are two ways to set the route. The one is a generic method that uses pose, ## States -![route-state](./state.drawio.svg) +![route-state](./routing/state.drawio.svg) | State | Description | | -------- | -------------------------------------------------- | diff --git a/docs/design/autoware-interfaces/ad-api/list/api/routing/state.drawio.svg b/docs/design/autoware-interfaces/ad-api/features/routing/state.drawio.svg similarity index 100% rename from docs/design/autoware-interfaces/ad-api/list/api/routing/state.drawio.svg rename to docs/design/autoware-interfaces/ad-api/features/routing/state.drawio.svg diff --git a/docs/design/autoware-interfaces/ad-api/index.md b/docs/design/autoware-interfaces/ad-api/index.md index 69247ea8a3d..1ff4e4148cd 100644 --- a/docs/design/autoware-interfaces/ad-api/index.md +++ b/docs/design/autoware-interfaces/ad-api/index.md @@ -1,7 +1,39 @@ -# AD API +# Autoware AD API -!!! warning +## Overview - Under Construction +Autoware AD API is the interface for operating the vehicle from outside the autonomous driving system. +[See here for the overall interface design of Autoware.](../index.md) -See [here](../index.md) for an overview. +## User stories + +The user stories are service scenarios that AD API assumes. AD API is designed based on these scenarios. +Each scenario is realized by a combination of use cases described later. +If there are scenarios that cannot be covered, please discuss adding a user story. + +- [Bus service](./stories/bus-service.md) +- [Taxi service](./stories/taxi-service.md) + +## Use cases + +Use cases are partial scenarios derived from the user story and generically designed. +Service providers can combine these use cases to define user stories and check if AD API can be applied to their own scenarios. + +- [Launch and terminate](./use-cases/launch-terminate.md) +- [Initialize the pose](./use-cases/initialize-pose.md) +- [Change the operation mode](./use-cases/change-operation-mode.md) +- [Drive to the designated position](./use-cases/drive-designated-position.md) +- [Get on and get off](./use-cases/get-on-off.md) +- [Vehicle monitoring](./use-cases/vehicle-monitoring.md) +- [Request to cooperate](./use-cases/request-to-cooperate.md) + +## Features + +- [Interface](./features/interface.md) +- [Operation Mode](./features/operation_mode.md) +- [Routing](./features/routing.md) +- [Localization](./features/localization.md) +- [Motion](./features/motion.md) +- [Planning](./features/planning-factors.md) +- [Fail-safe](./features/fail-safe.md) +- [Vehicle status](./features/vehicle-status.md) diff --git a/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_state.md b/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_state.md index 54e7ffdf95f..0de5fbf4d47 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_state.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/fail_safe/mrm_state.md @@ -12,5 +12,6 @@ type: {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} -Get the MRM state. For details, see the [fail-safe](./index.md). +Get the MRM state. +For details, see the [fail-safe](../../../features/fail-safe.md). {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/localization/initialization_state.md b/docs/design/autoware-interfaces/ad-api/list/api/localization/initialization_state.md index 781be074681..b3d08b7f2d3 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/localization/initialization_state.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/localization/initialization_state.md @@ -5,10 +5,11 @@ type: name: autoware_adapi_v1_msgs/msg/LocalizationInitializationState msg: - name: state - text: A value of the [localization initialization state](./index.md). + text: A value of the localization initialization state. --- {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} -Get the initialization state of localization. For details, see the [localization initialization state](./index.md). +Get the initialization state of localization. +For details, see the [localization](../../../features/localization.md). {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/localization/initialize.md b/docs/design/autoware-interfaces/ad-api/list/api/localization/initialize.md index e7d6e71cd29..848b806f71e 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/localization/initialize.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/localization/initialize.md @@ -13,5 +13,6 @@ type: {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} -Request to initialize localization. For details, see the [pose state](./index.md). +Request to initialize localization. +For details, see the [localization](../../../features/localization.md). {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/motion/accept_start.md b/docs/design/autoware-interfaces/ad-api/list/api/motion/accept_start.md index 57cfd6066a1..881f661a4f8 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/motion/accept_start.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/motion/accept_start.md @@ -10,5 +10,5 @@ type: {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} -Accept the vehicle to start. This API can be used when the [motion state](./index.md) is STARTING. +Accept the vehicle to start. This API can be used when the [motion state](../../../features/motion.md) is STARTING. {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/motion/state.md b/docs/design/autoware-interfaces/ad-api/list/api/motion/state.md index dacbc92086c..33d563ec1fa 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/motion/state.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/motion/state.md @@ -10,5 +10,6 @@ type: {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} -Get the motion state. For details, see the [motion state](./index.md). +Get the motion state. +For details, see the [motion state](../../../features/motion.md). {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_autonomous.md b/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_autonomous.md index b64e6aa9500..51fa1c09388 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_autonomous.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_autonomous.md @@ -10,5 +10,6 @@ type: {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} -Change the operation mode to autonomous. For details, see the [operation mode](./index.md). +Change the operation mode to autonomous. +For details, see the [operation mode](../../../features/operation_mode.md). {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_local.md b/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_local.md index e1ca84473ca..2f058b1f219 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_local.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_local.md @@ -10,5 +10,6 @@ type: {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} -Change the operation mode to local. For details, see the [operation mode](./index.md). +Change the operation mode to local. +For details, see the [operation mode](../../../features/operation_mode.md). {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_remote.md b/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_remote.md index 17c830e6ddb..de6b660aa4f 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_remote.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_remote.md @@ -10,5 +10,6 @@ type: {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} -Change the operation mode to remote. For details, see the [operation mode](./index.md). +Change the operation mode to remote. +For details, see the [operation mode](../../../features/operation_mode.md). {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_stop.md b/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_stop.md index 509cb7b2c8e..0decc623bf2 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_stop.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/change_to_stop.md @@ -10,5 +10,6 @@ type: {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} -Change the operation mode to stop. For details, see the [operation mode](./index.md). +Change the operation mode to stop. +For details, see the [operation mode](../../../features/operation_mode.md). {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/disable_autoware_control.md b/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/disable_autoware_control.md index 96be075d08d..ebc7bee5811 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/disable_autoware_control.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/disable_autoware_control.md @@ -10,6 +10,7 @@ type: {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} -Disable vehicle control by Autoware. For details, see the [operation mode](./index.md). +Disable vehicle control by Autoware. +For details, see the [operation mode](../../../features/operation_mode.md). This API fails if the vehicle does not support mode change by software. {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/enable_autoware_control.md b/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/enable_autoware_control.md index 49752fcdd84..4168f51dd78 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/enable_autoware_control.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/enable_autoware_control.md @@ -10,6 +10,7 @@ type: {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} -Enable vehicle control by Autoware. For details, see the [operation mode](./index.md). +Enable vehicle control by Autoware. +For details, see the [operation mode](../../../features/operation_mode.md). This API fails if the vehicle does not support mode change by software. {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/state.md b/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/state.md index 7ff8385963a..7446b9e4a60 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/state.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/operation_mode/state.md @@ -22,5 +22,6 @@ type: {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} -Get the operation mode state. For details, see the [operation mode](./index.md). +Get the operation mode state. +For details, see the [operation mode](../../../features/operation_mode.md). {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/planning/index.md b/docs/design/autoware-interfaces/ad-api/list/api/planning/index.md deleted file mode 100644 index fc7632cbb63..00000000000 --- a/docs/design/autoware-interfaces/ad-api/list/api/planning/index.md +++ /dev/null @@ -1,68 +0,0 @@ -# Planning API - -- {{ link_ad_api('/api/planning/velocity_factors') }} -- {{ link_ad_api('/api/planning/steering_factors') }} - -## Description - -This API manages the planned behavior of the vehicle. -Applications can notify the vehicle behavior to the people around and visualize it for operator and passengers. - -## Velocity factors - -The velocity factors is an array of information on the behavior that the vehicle stops (or slows down). -Each factor has a type shown below, pose in the base link, distance, status, and detailed data depending on its type. -As the vehicle approaches the stop position, this factor appears with a status of APPROACHING. -And when the vehicle reaches that position and stops, the status will be STOPPED. -The pose indicates the stop position or the base link if the stop position cannot be calculated. - -![velocity-factors](./docs/velocity-factors.drawio.svg) - -| Factor Type | Description | -| --------------------------- | ------------------------------------------------------------------------ | -| SURROUNDING_OBSTACLE | There are obstacles immediately around the vehicle. | -| ROUTE_OBSTACLE | There are obstacles along the route ahead. | -| INTERSECTION | There are obstacles in other lanes in the path. | -| CROSSWALK | There are obstacles on the crosswalk. | -| REAR_CHECK | There are obstacles behind that would be in a human driver's blind spot. | -| USER_DEFINED_DETECTION_AREA | There are obstacles in the predefined detection area. | -| NO_STOPPING_AREA | There is not enough space beyond the no stopping area. | -| STOP_SIGN | A stop by a stop sign. | -| TRAFFIC_SIGNAL | A stop by a traffic signal. | -| V2I_GATE_CONTROL_ENTER | A stop by a V2I gate entering. | -| V2I_GATE_CONTROL_LEAVE | A stop by a V2I gate leaving. | -| MERGE | A stop before merging lanes. | -| SIDEWALK | A stop before crossing the sidewalk. | -| LANE_CHANGE | A lane change. | -| AVOIDANCE | A path change to avoid an obstacle in the current lane. | -| EMERGENCY_OPERATION | A stop by emergency instruction from the operator. | - -## Steering factors - -The steering factors is an array of information on the maneuver that requires use of turn indicators, such as turning left or right. -Each factor has a type shown below, pose in the base link, distance, status, and detailed data depending on its type. -As the vehicle approaches the position to start steering, this factor appears with a status of APPROACHING. -And when the vehicle reaches that position, the status will be TURNING. -The pose indicates the start position when APPROACHING and the end position when TURNING. - -![steering-factors-1](./docs/steering-factors-1.drawio.svg) - -In cases such as lane change and avoidance, the vehicle will start steering at any position in the range depending on the situation. -As the vehicle approaches the start position of the range, this factor appears with a status of APPROACHING. -And when the vehicle reaches that position, the status will be TRYING. -Then, when it is possible, the vehicle will start steering and the status will be TURNING. -The pose indicates the start of the range (A) when APPROACHING and the end of the range (B) when TRYING. -The position to end steering (C to D) for TURNING depends on the position to start steering. - -![steering-factors-2](./docs/steering-factors-2.drawio.svg) - -| Factor Type | Description | -| --------------------- | ------------------------------------------------------------------------ | -| INTERSECTION | A turning left or right at an intersection. | -| LANE_CHANGE | A lane change. | -| AVOIDANCE_PATH_CHANGE | A path change to avoid an obstacle in the current lane. | -| AVOIDANCE_PATH_RETURN | A path change to return to the original lane after avoiding an obstacle. | -| STATION | T.B.D. (bus stop) | -| PULL_OUT | T.B.D. | -| PULL_OVER | T.B.D. | -| EMERGENCY_OPERATION | A path change by emergency instruction from the operator. | diff --git a/docs/design/autoware-interfaces/ad-api/list/api/planning/steering_factors.md b/docs/design/autoware-interfaces/ad-api/list/api/planning/steering_factors.md index e0c91b44bd5..c9e5ee74745 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/planning/steering_factors.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/planning/steering_factors.md @@ -21,5 +21,5 @@ type: {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} Get the steering factors, sorted in ascending order of distance. -For details, see the [planning](./index.md). +For details, see the [planning factors](../../../features/planning-factors.md). {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/planning/velocity_factors.md b/docs/design/autoware-interfaces/ad-api/list/api/planning/velocity_factors.md index 5339a0a4297..52aa110203c 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/planning/velocity_factors.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/planning/velocity_factors.md @@ -19,5 +19,5 @@ type: {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} Get the velocity factors, sorted in ascending order of distance. -For details, see the [planning](./index.md). +For details, see the [planning factors](../../../features/planning-factors.md). {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/api/routing/state.md b/docs/design/autoware-interfaces/ad-api/list/api/routing/state.md index 3698a68c18b..3a5d663f86a 100644 --- a/docs/design/autoware-interfaces/ad-api/list/api/routing/state.md +++ b/docs/design/autoware-interfaces/ad-api/list/api/routing/state.md @@ -5,10 +5,11 @@ type: name: autoware_adapi_v1_msgs/msg/RouteState msg: - name: state - text: A value of the [route state](./index.md). + text: A value of the route state. --- {% extends 'design/autoware-interfaces/templates/autoware-interface.jinja2' %} {% block description %} -Get the route state. For details, see the [route state](./index.md). +Get the route state. +For details, see the [routing](../../../features/routing.md). {% endblock %} diff --git a/docs/design/autoware-interfaces/ad-api/list/index.md b/docs/design/autoware-interfaces/ad-api/list/index.md index 65ee7e0efd7..56622573d0f 100644 --- a/docs/design/autoware-interfaces/ad-api/list/index.md +++ b/docs/design/autoware-interfaces/ad-api/list/index.md @@ -1,9 +1,27 @@ # List of Autoware AD API -- [Interface](./api/interface/index.md) -- [Operation Mode](./api/operation_mode/index.md) -- [Routing](./api/routing/index.md) -- [Localization](./api/localization/index.md) -- [Motion](./api/motion/index.md) -- [Planning](./api/planning/index.md) -- [Fail-safe](./api/fail_safe/index.md) +- [/api/fail_safe/mrm_state](./api/fail_safe/mrm_state.md) +- [/api/interface/version](./api/interface/version.md) +- [/api/localization/initialization_state](./api/localization/initialization_state.md) +- [/api/localization/initialize](./api/localization/initialize.md) +- [/api/motion/accept_start](./api/motion/accept_start.md) +- [/api/motion/state](./api/motion/state.md) +- [/api/operation_mode/change_to_autonomous](./api/operation_mode/change_to_autonomous.md) +- [/api/operation_mode/change_to_local](./api/operation_mode/change_to_local.md) +- [/api/operation_mode/change_to_remote](./api/operation_mode/change_to_remote.md) +- [/api/operation_mode/change_to_stop](./api/operation_mode/change_to_stop.md) +- [/api/operation_mode/disable_autoware_control](./api/operation_mode/disable_autoware_control.md) +- [/api/operation_mode/enable_autoware_control](./api/operation_mode/enable_autoware_control.md) +- [/api/operation_mode/state](./api/operation_mode/state.md) +- [/api/planning/steering_factors](./api/planning/steering_factors.md) +- [/api/planning/velocity_factors](./api/planning/velocity_factors.md) +- [/api/routing/clear_route](./api/routing/clear_route.md) +- [/api/routing/route](./api/routing/route.md) +- [/api/routing/set_route](./api/routing/set_route.md) +- [/api/routing/set_route_points](./api/routing/set_route_points.md) +- [/api/routing/state](./api/routing/state.md) +- [/api/vehicle/dimensions](./api/vehicle/dimensions.md) +- [/api/vehicle/doors/layout](./api/vehicle/doors/layout.md) +- [/api/vehicle/doors/status](./api/vehicle/doors/status.md) +- [/api/vehicle/kinematics](./api/vehicle/kinematics.md) +- [/api/vehicle/status](./api/vehicle/status.md) diff --git a/docs/design/autoware-interfaces/ad-api/use-cases/bus-service.md b/docs/design/autoware-interfaces/ad-api/stories/bus-service.md similarity index 57% rename from docs/design/autoware-interfaces/ad-api/use-cases/bus-service.md rename to docs/design/autoware-interfaces/ad-api/stories/bus-service.md index a222a2335bb..77e091befaa 100644 --- a/docs/design/autoware-interfaces/ad-api/use-cases/bus-service.md +++ b/docs/design/autoware-interfaces/ad-api/stories/bus-service.md @@ -6,14 +6,14 @@ This user story is a bus service that goes around the designated stops. ## Scenario -| Step | Operation | Use Case | -| ---- | ---------------------------------------------------------- | ---------------------------------------------------------------- | -| 1 | Startup the autonomous driving system. | [Launch and terminate](launch-terminate.md) | -| 2 | Drive the vehicle from the garage to the waiting position. | [Change the operation mode](change-operation-mode.md) | -| 3 | Enable autonomous control. | [Change the operation mode](change-operation-mode.md) | -| 4 | Drive the vehicle to the next bus stop. | [Drive to the designated position](drive-designated-position.md) | -| 5 | Get on and off the vehicle. | [Get on and get off](get-on-off.md) | -| 6 | Return to step 4 unless it's the last bus stop. | | -| 7 | Drive the vehicle to the waiting position. | [Drive to the designated position](drive-designated-position.md) | -| 8 | Drive the vehicle from the waiting position to the garage. | [Change the operation mode](change-operation-mode.md) | -| 9 | Shutdown the autonomous driving system. | [Launch and terminate](launch-terminate.md) | +| Step | Operation | Use Case | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------------- | +| 1 | Startup the autonomous driving system. | [Launch and terminate](../use-cases/launch-terminate.md) | +| 2 | Drive the vehicle from the garage to the waiting position. | [Change the operation mode](../use-cases/change-operation-mode.md) | +| 3 | Enable autonomous control. | [Change the operation mode](../use-cases/change-operation-mode.md) | +| 4 | Drive the vehicle to the next bus stop. | [Drive to the designated position](../use-cases/drive-designated-position.md) | +| 5 | Get on and off the vehicle. | [Get on and get off](../use-cases/get-on-off.md) | +| 6 | Return to step 4 unless it's the last bus stop. | | +| 7 | Drive the vehicle to the waiting position. | [Drive to the designated position](../use-cases/drive-designated-position.md) | +| 8 | Drive the vehicle from the waiting position to the garage. | [Change the operation mode](../use-cases/change-operation-mode.md) | +| 9 | Shutdown the autonomous driving system. | [Launch and terminate](../use-cases/launch-terminate.md) | diff --git a/docs/design/autoware-interfaces/ad-api/use-cases/taxi-service.md b/docs/design/autoware-interfaces/ad-api/stories/taxi-service.md similarity index 55% rename from docs/design/autoware-interfaces/ad-api/use-cases/taxi-service.md rename to docs/design/autoware-interfaces/ad-api/stories/taxi-service.md index b1d1a543eb1..4ce34d63866 100644 --- a/docs/design/autoware-interfaces/ad-api/use-cases/taxi-service.md +++ b/docs/design/autoware-interfaces/ad-api/stories/taxi-service.md @@ -6,16 +6,16 @@ This user story is a taxi service that picks up passengers and drives them to th ## Scenario -| Step | Operation | Use Case | -| ---- | ---------------------------------------------------------- | ---------------------------------------------------------------- | -| 1 | Startup the autonomous driving system. | [Launch and terminate](launch-terminate.md) | -| 2 | Drive the vehicle from the garage to the waiting position. | [Change the operation mode](change-operation-mode.md) | -| 3 | Enable autonomous control. | [Change the operation mode](change-operation-mode.md) | -| 4 | Drive the vehicle to the position to pick up. | [Drive to the designated position](drive-designated-position.md) | -| 5 | Get on the vehicle. | [Get on and get off](get-on-off.md) | -| 6 | Drive the vehicle to the destination. | [Drive to the designated position](drive-designated-position.md) | -| 7 | Get off the vehicle. | [Get on and get off](get-on-off.md) | -| 8 | Drive the vehicle to the waiting position. | [Drive to the designated position](drive-designated-position.md) | -| 9 | Return to step 4 if there is another request. | | -| 10 | Drive the vehicle from the waiting position to the garage. | [Change the operation mode](change-operation-mode.md) | -| 11 | Shutdown the autonomous driving system. | [Launch and terminate](launch-terminate.md) | +| Step | Operation | Use Case | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------------- | +| 1 | Startup the autonomous driving system. | [Launch and terminate](../use-cases/launch-terminate.md) | +| 2 | Drive the vehicle from the garage to the waiting position. | [Change the operation mode](../use-cases/change-operation-mode.md) | +| 3 | Enable autonomous control. | [Change the operation mode](../use-cases/change-operation-mode.md) | +| 4 | Drive the vehicle to the position to pick up. | [Drive to the designated position](../use-cases/drive-designated-position.md) | +| 5 | Get on the vehicle. | [Get on and get off](../use-cases/get-on-off.md) | +| 6 | Drive the vehicle to the destination. | [Drive to the designated position](../use-cases/drive-designated-position.md) | +| 7 | Get off the vehicle. | [Get on and get off](../use-cases/get-on-off.md) | +| 8 | Drive the vehicle to the waiting position. | [Drive to the designated position](../use-cases/drive-designated-position.md) | +| 9 | Return to step 4 if there is another request. | | +| 10 | Drive the vehicle from the waiting position to the garage. | [Change the operation mode](../use-cases/change-operation-mode.md) | +| 11 | Shutdown the autonomous driving system. | [Launch and terminate](../use-cases/launch-terminate.md) | diff --git a/docs/design/autoware-interfaces/ad-api/use-cases/.pages b/docs/design/autoware-interfaces/ad-api/types/.pages similarity index 100% rename from docs/design/autoware-interfaces/ad-api/use-cases/.pages rename to docs/design/autoware-interfaces/ad-api/types/.pages diff --git a/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/SteeringFactor.md b/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/SteeringFactor.md index 066285646d6..1b35ddeb8a3 100644 --- a/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/SteeringFactor.md +++ b/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/SteeringFactor.md @@ -18,7 +18,8 @@ uint16 LANE_CHANGE = 2 uint16 AVOIDANCE_PATH_CHANGE = 3 uint16 AVOIDANCE_PATH_RETURN = 4 uint16 STATION = 5 -uint16 PULL_OUT = 6 +uint16 PULL_OUT = 6 # Deprecated. Use START_PLANNER. +uint16 START_PLANNER = 6 uint16 PULL_OVER = 7 # Deprecated. Use GOAL_PLANNER. uint16 GOAL_PLANNER = 7 uint16 EMERGENCY_OPERATION = 8 diff --git a/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/VehicleKinematics.md b/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/VehicleKinematics.md index 83afb48d8de..b82e24735bc 100644 --- a/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/VehicleKinematics.md +++ b/docs/design/autoware-interfaces/ad-api/types/autoware_adapi_v1_msgs/msg/VehicleKinematics.md @@ -8,8 +8,7 @@ title: autoware_adapi_v1_msgs/msg/VehicleKinematics ```txt # Geographic point, using the WGS 84 reference ellipsoid. -# Currently only support conversion from single MGRS Grid code or UTM -# If the vector map do not contain correct MGRS Grid code or UTM, this data will be not valid +# This data will be invalid If Autoware does not provide projection information between geographic coordinates and local coordinates. geographic_msgs/GeoPointStamped geographic_pose # Local coordinate from the autoware diff --git a/docs/design/autoware-interfaces/ad-api/types/index.md b/docs/design/autoware-interfaces/ad-api/types/index.md new file mode 100644 index 00000000000..e4dd953c36a --- /dev/null +++ b/docs/design/autoware-interfaces/ad-api/types/index.md @@ -0,0 +1,35 @@ +# Types of Autoware AD API + +- [autoware_adapi_v1_msgs/msg/DoorLayout](./autoware_adapi_v1_msgs/msg/DoorLayout.md) +- [autoware_adapi_v1_msgs/msg/DoorStatus](./autoware_adapi_v1_msgs/msg/DoorStatus.md) +- [autoware_adapi_v1_msgs/msg/DoorStatusArray](./autoware_adapi_v1_msgs/msg/DoorStatusArray.md) +- [autoware_adapi_v1_msgs/msg/Gear](./autoware_adapi_v1_msgs/msg/Gear.md) +- [autoware_adapi_v1_msgs/msg/HazardLights](./autoware_adapi_v1_msgs/msg/HazardLights.md) +- [autoware_adapi_v1_msgs/msg/LocalizationInitializationState](./autoware_adapi_v1_msgs/msg/LocalizationInitializationState.md) +- [autoware_adapi_v1_msgs/msg/MotionState](./autoware_adapi_v1_msgs/msg/MotionState.md) +- [autoware_adapi_v1_msgs/msg/MrmState](./autoware_adapi_v1_msgs/msg/MrmState.md) +- [autoware_adapi_v1_msgs/msg/OperationModeState](./autoware_adapi_v1_msgs/msg/OperationModeState.md) +- [autoware_adapi_v1_msgs/msg/ResponseStatus](./autoware_adapi_v1_msgs/msg/ResponseStatus.md) +- [autoware_adapi_v1_msgs/msg/Route](./autoware_adapi_v1_msgs/msg/Route.md) +- [autoware_adapi_v1_msgs/msg/RouteData](./autoware_adapi_v1_msgs/msg/RouteData.md) +- [autoware_adapi_v1_msgs/msg/RouteOption](./autoware_adapi_v1_msgs/msg/RouteOption.md) +- [autoware_adapi_v1_msgs/msg/RoutePrimitive](./autoware_adapi_v1_msgs/msg/RoutePrimitive.md) +- [autoware_adapi_v1_msgs/msg/RouteSegment](./autoware_adapi_v1_msgs/msg/RouteSegment.md) +- [autoware_adapi_v1_msgs/msg/RouteState](./autoware_adapi_v1_msgs/msg/RouteState.md) +- [autoware_adapi_v1_msgs/msg/SteeringFactor](./autoware_adapi_v1_msgs/msg/SteeringFactor.md) +- [autoware_adapi_v1_msgs/msg/SteeringFactorArray](./autoware_adapi_v1_msgs/msg/SteeringFactorArray.md) +- [autoware_adapi_v1_msgs/msg/TurnIndicators](./autoware_adapi_v1_msgs/msg/TurnIndicators.md) +- [autoware_adapi_v1_msgs/msg/VehicleDimensions](./autoware_adapi_v1_msgs/msg/VehicleDimensions.md) +- [autoware_adapi_v1_msgs/msg/VehicleKinematics](./autoware_adapi_v1_msgs/msg/VehicleKinematics.md) +- [autoware_adapi_v1_msgs/msg/VehicleStatus](./autoware_adapi_v1_msgs/msg/VehicleStatus.md) +- [autoware_adapi_v1_msgs/msg/VelocityFactor](./autoware_adapi_v1_msgs/msg/VelocityFactor.md) +- [autoware_adapi_v1_msgs/msg/VelocityFactorArray](./autoware_adapi_v1_msgs/msg/VelocityFactorArray.md) +- [autoware_adapi_v1_msgs/srv/AcceptStart](./autoware_adapi_v1_msgs/srv/AcceptStart.md) +- [autoware_adapi_v1_msgs/srv/ChangeOperationMode](./autoware_adapi_v1_msgs/srv/ChangeOperationMode.md) +- [autoware_adapi_v1_msgs/srv/ClearRoute](./autoware_adapi_v1_msgs/srv/ClearRoute.md) +- [autoware_adapi_v1_msgs/srv/GetDoorLayout](./autoware_adapi_v1_msgs/srv/GetDoorLayout.md) +- [autoware_adapi_v1_msgs/srv/GetVehicleDimensions](./autoware_adapi_v1_msgs/srv/GetVehicleDimensions.md) +- [autoware_adapi_v1_msgs/srv/InitializeLocalization](./autoware_adapi_v1_msgs/srv/InitializeLocalization.md) +- [autoware_adapi_v1_msgs/srv/SetRoute](./autoware_adapi_v1_msgs/srv/SetRoute.md) +- [autoware_adapi_v1_msgs/srv/SetRoutePoints](./autoware_adapi_v1_msgs/srv/SetRoutePoints.md) +- [autoware_adapi_version_msgs/srv/InterfaceVersion](./autoware_adapi_version_msgs/srv/InterfaceVersion.md) diff --git a/docs/design/autoware-interfaces/ad-api/use-cases/index.md b/docs/design/autoware-interfaces/ad-api/use-cases/index.md deleted file mode 100644 index a37c26a0713..00000000000 --- a/docs/design/autoware-interfaces/ad-api/use-cases/index.md +++ /dev/null @@ -1,27 +0,0 @@ -# Use cases of Autoware AD API - -## User stories - -The user stories are service scenarios that AD API assumes. AD API is designed based on these scenarios. -Each scenario is realized by a combination of use cases described later. -If there are scenarios that cannot be covered, please discuss adding a user story. - -- [Bus service](bus-service.md) -- [Taxi service](taxi-service.md) - -## Use cases - -Use cases are partial scenarios derived from the user story and generically designed. -Service providers can combine these use cases to define user stories and check if AD API can be applied to their own scenarios. - -- [Launch and terminate](launch-terminate.md) -- [Initialize the pose](initialize-pose.md) -- [Change the operation mode](change-operation-mode.md) -- [Drive to the designated position](drive-designated-position.md) -- [Get on and get off](get-on-off.md) -- [Vehicle monitoring](./vehicle-monitoring.md) -- [Request to cooperate](./request-to-cooperate.md) - -## Features - -- [Vehicle status](../features/vehicle-status.md) diff --git a/tools/autoware-interfaces/generate.py b/tools/autoware-interfaces/generate.py index 4d098df20bf..cda6c97b1de 100755 --- a/tools/autoware-interfaces/generate.py +++ b/tools/autoware-interfaces/generate.py @@ -88,7 +88,8 @@ def main(): # Create a list of data types used in adapi. adapi = Path("docs/design/autoware-interfaces/ad-api/list/api") pages = (load_markdown_metadata(path) for path in adapi.glob("**/*.md")) - names = (yaml["type"]["name"] for yaml in pages if yaml) + pages = [page for page in pages if page] + names = (page["type"]["name"] for page in pages) # Create a field list for each data type. visited = set() @@ -137,4 +138,16 @@ def main(): path.parent.mkdir(parents=True, exist_ok=True) path.write_text(text) + ## Generate api list page. + text = "# List of Autoware AD API\n\n" + for title in sorted(page["title"] for page in pages): + text += f"- [{title}](.{title}.md)\n" + Path("docs/design/autoware-interfaces/ad-api/list/index.md").write_text(text) + + ## Generate api type page. + text = "# Types of Autoware AD API\n\n" + for spec in sorted(specs): + text += f"- [{spec}](./{spec}.md)\n" + Path("docs/design/autoware-interfaces/ad-api/types/index.md").write_text(text) + main()