Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: correct topic and type for vehicle component doorstatus #632

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat(ad-api): add method to list page (#630)
* feat(ad-api): add method column to list page

Signed-off-by: Takagi, Isamu <[email protected]>

* update api list page

Signed-off-by: Takagi, Isamu <[email protected]>

---------

Signed-off-by: Takagi, Isamu <[email protected]>
Signed-off-by: Sang <[email protected]>
isamu-takagi authored and tranvansang committed Dec 9, 2024
commit e32da1b58127dd508705d56de8bcd601ab456291
74 changes: 37 additions & 37 deletions docs/design/autoware-interfaces/ad-api/list/index.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
# List of Autoware AD API

| API | Release |
| ------------------------------------------------------------------------------------------------ | ------------ |
| [/api/fail_safe/mrm_state](./api/fail_safe/mrm_state.md) | v1.1.0 |
| [/api/interface/version](./api/interface/version.md) | v1.0.0 |
| [/api/localization/initialization_state](./api/localization/initialization_state.md) | v1.0.0 |
| [/api/localization/initialize](./api/localization/initialize.md) | v1.0.0 |
| [/api/motion/accept_start](./api/motion/accept_start.md) | not released |
| [/api/motion/state](./api/motion/state.md) | not released |
| [/api/operation_mode/change_to_autonomous](./api/operation_mode/change_to_autonomous.md) | v1.0.0 |
| [/api/operation_mode/change_to_local](./api/operation_mode/change_to_local.md) | v1.0.0 |
| [/api/operation_mode/change_to_remote](./api/operation_mode/change_to_remote.md) | v1.0.0 |
| [/api/operation_mode/change_to_stop](./api/operation_mode/change_to_stop.md) | v1.0.0 |
| [/api/operation_mode/disable_autoware_control](./api/operation_mode/disable_autoware_control.md) | v1.0.0 |
| [/api/operation_mode/enable_autoware_control](./api/operation_mode/enable_autoware_control.md) | v1.0.0 |
| [/api/operation_mode/state](./api/operation_mode/state.md) | v1.0.0 |
| [/api/perception/objects](./api/perception/objects.md) | not released |
| [/api/planning/cooperation/get_policies](./api/planning/cooperation/get_policies.md) | not released |
| [/api/planning/cooperation/set_commands](./api/planning/cooperation/set_commands.md) | not released |
| [/api/planning/cooperation/set_policies](./api/planning/cooperation/set_policies.md) | not released |
| [/api/planning/steering_factors](./api/planning/steering_factors.md) | not released |
| [/api/planning/velocity_factors](./api/planning/velocity_factors.md) | not released |
| [/api/routing/change_route](./api/routing/change_route.md) | v1.5.0 |
| [/api/routing/change_route_points](./api/routing/change_route_points.md) | v1.5.0 |
| [/api/routing/clear_route](./api/routing/clear_route.md) | v1.0.0 |
| [/api/routing/route](./api/routing/route.md) | v1.0.0 |
| [/api/routing/set_route](./api/routing/set_route.md) | v1.0.0 |
| [/api/routing/set_route_points](./api/routing/set_route_points.md) | v1.0.0 |
| [/api/routing/state](./api/routing/state.md) | v1.0.0 |
| [/api/system/diagnostics/status](./api/system/diagnostics/status.md) | v1.3.0 |
| [/api/system/diagnostics/struct](./api/system/diagnostics/struct.md) | v1.3.0 |
| [/api/system/heartbeat](./api/system/heartbeat.md) | v1.3.0 |
| [/api/vehicle/dimensions](./api/vehicle/dimensions.md) | v1.1.0 |
| [/api/vehicle/doors/command](./api/vehicle/doors/command.md) | v1.2.0 |
| [/api/vehicle/doors/layout](./api/vehicle/doors/layout.md) | v1.2.0 |
| [/api/vehicle/doors/status](./api/vehicle/doors/status.md) | v1.2.0 |
| [/api/vehicle/kinematics](./api/vehicle/kinematics.md) | v1.1.0 |
| [/api/vehicle/status](./api/vehicle/status.md) | v1.4.0 |
| API | Release | Method |
| ------------------------------------------------------------------------------------------------ | ------------ | --------------- |
| [/api/fail_safe/mrm_state](./api/fail_safe/mrm_state.md) | v1.1.0 | notification |
| [/api/interface/version](./api/interface/version.md) | v1.0.0 | function call |
| [/api/localization/initialization_state](./api/localization/initialization_state.md) | v1.0.0 | notification |
| [/api/localization/initialize](./api/localization/initialize.md) | v1.0.0 | function call |
| [/api/motion/accept_start](./api/motion/accept_start.md) | not released | function call |
| [/api/motion/state](./api/motion/state.md) | not released | notification |
| [/api/operation_mode/change_to_autonomous](./api/operation_mode/change_to_autonomous.md) | v1.0.0 | function call |
| [/api/operation_mode/change_to_local](./api/operation_mode/change_to_local.md) | v1.0.0 | function call |
| [/api/operation_mode/change_to_remote](./api/operation_mode/change_to_remote.md) | v1.0.0 | function call |
| [/api/operation_mode/change_to_stop](./api/operation_mode/change_to_stop.md) | v1.0.0 | function call |
| [/api/operation_mode/disable_autoware_control](./api/operation_mode/disable_autoware_control.md) | v1.0.0 | function call |
| [/api/operation_mode/enable_autoware_control](./api/operation_mode/enable_autoware_control.md) | v1.0.0 | function call |
| [/api/operation_mode/state](./api/operation_mode/state.md) | v1.0.0 | notification |
| [/api/perception/objects](./api/perception/objects.md) | not released | realtime stream |
| [/api/planning/cooperation/get_policies](./api/planning/cooperation/get_policies.md) | not released | function call |
| [/api/planning/cooperation/set_commands](./api/planning/cooperation/set_commands.md) | not released | function call |
| [/api/planning/cooperation/set_policies](./api/planning/cooperation/set_policies.md) | not released | function call |
| [/api/planning/steering_factors](./api/planning/steering_factors.md) | not released | realtime stream |
| [/api/planning/velocity_factors](./api/planning/velocity_factors.md) | not released | realtime stream |
| [/api/routing/change_route](./api/routing/change_route.md) | v1.5.0 | function call |
| [/api/routing/change_route_points](./api/routing/change_route_points.md) | v1.5.0 | function call |
| [/api/routing/clear_route](./api/routing/clear_route.md) | v1.0.0 | function call |
| [/api/routing/route](./api/routing/route.md) | v1.0.0 | notification |
| [/api/routing/set_route](./api/routing/set_route.md) | v1.0.0 | function call |
| [/api/routing/set_route_points](./api/routing/set_route_points.md) | v1.0.0 | function call |
| [/api/routing/state](./api/routing/state.md) | v1.0.0 | notification |
| [/api/system/diagnostics/status](./api/system/diagnostics/status.md) | v1.3.0 | realtime stream |
| [/api/system/diagnostics/struct](./api/system/diagnostics/struct.md) | v1.3.0 | notification |
| [/api/system/heartbeat](./api/system/heartbeat.md) | v1.3.0 | realtime stream |
| [/api/vehicle/dimensions](./api/vehicle/dimensions.md) | v1.1.0 | function call |
| [/api/vehicle/doors/command](./api/vehicle/doors/command.md) | v1.2.0 | function call |
| [/api/vehicle/doors/layout](./api/vehicle/doors/layout.md) | v1.2.0 | function call |
| [/api/vehicle/doors/status](./api/vehicle/doors/status.md) | v1.2.0 | notification |
| [/api/vehicle/kinematics](./api/vehicle/kinematics.md) | v1.1.0 | realtime stream |
| [/api/vehicle/status](./api/vehicle/status.md) | v1.4.0 | realtime stream |
35 changes: 22 additions & 13 deletions tools/autoware-interfaces/generate.py
Original file line number Diff line number Diff line change
@@ -102,12 +102,7 @@ def tabulate(data, header):
return "\n".join(format.format(*line) for line in [header, border, *data])


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"))
pages = [page for page in pages if page]

def update_type_page(pages):
# Create a field list for each data type.
names = (page["type"]["name"] for page in pages)
specs = {}
@@ -158,18 +153,32 @@ def main():
path.parent.mkdir(parents=True, exist_ok=True)
path.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)


def update_list_page(pages):
## Generate api list page.
data = []
for page in sorted(pages, key=lambda page: page["title"]):
title = page["title"]
data.append([f"[{title}](.{title}.md)", page['status']])
text = "# List of Autoware AD API\n\n" + tabulate(data, ["API", "Release"]) + "\n"
data.append([f"[{title}](.{title}.md)", page["status"], page["method"]])
text = "# List of Autoware AD API\n\n" + tabulate(data, ["API", "Release", "Method"]) + "\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)

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"))
pages = [page for page in pages if page]

update_list_page(pages)
update_type_page(pages)



main()