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

feat: add autoware_version package #11

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
60b1473
Add autoware version node (#394)
isamu-takagi Mar 3, 2021
c07d33d
Modify autoware_version not to use transient_local (workaround) (#403)
isamu-takagi Mar 4, 2021
ef8cde2
Revert "Modify autoware_version not to use transient_local (workaroun…
isamu-takagi Mar 12, 2021
b9fa5f8
Fix -Wunused-parameter (#1836)
kenji-miyake Aug 14, 2021
2deeb00
Add package version API (#2150)
isamu-takagi Oct 20, 2021
3c66148
Change formatter to clang-format and black (#2332)
kenji-miyake Nov 2, 2021
009df1c
Add COLCON_IGNORE (#500)
kenji-miyake Nov 4, 2021
d285eba
remove COLCON_IGNORE in autoware_version (#530)
1222-takeshi Nov 8, 2021
6bf1e23
Add readme of autoware_version (#612)
isamu-takagi Nov 12, 2021
8673463
change type
tkimura4 Nov 30, 2021
d7e9cf6
add readme
tkimura4 Nov 30, 2021
c1472f2
Merge branch 'tier4/proposal' into 1-add-autoware-version
1222-takeshi Dec 2, 2021
cace74d
ci(pre-commit): autofix
pre-commit-ci[bot] Dec 2, 2021
27dff61
Merge branch 'tier4/proposal' into 1-add-autoware-version
1222-takeshi Dec 3, 2021
a4f1ba0
Merge branch 'tier4/proposal' into 1-add-autoware-version
tkimura4 Dec 3, 2021
5432cea
Merge branch 'tier4/proposal' into 1-add-autoware-version
tkimura4 Dec 3, 2021
84f59e0
Merge branch 'tier4/proposal' into 1-add-autoware-version
tkimura4 Dec 3, 2021
1d4ade9
Merge branch 'tier4/proposal' into 1-add-autoware-version
tkimura4 Dec 3, 2021
f699e1e
Merge branch 'tier4/proposal' into 1-add-autoware-version
tkimura4 Dec 3, 2021
b73660d
Merge branch 'tier4/proposal' into 1-add-autoware-version
tkimura4 Dec 3, 2021
aa8e08b
Merge branch 'tier4/proposal' into 1-add-autoware-version
tkimura4 Dec 3, 2021
115a7b3
Merge branch 'tier4/proposal' into 1-add-autoware-version
tkimura4 Dec 3, 2021
41bb169
Merge branch 'tier4/proposal' into 1-add-autoware-version
tkimura4 Dec 3, 2021
27e65e5
Merge branch 'tier4/proposal' into 1-add-autoware-version
1222-takeshi Dec 4, 2021
b7f0e9f
Update system/autoware_version/README.md
1222-takeshi Dec 5, 2021
b9a4a98
ci(pre-commit): autofix
pre-commit-ci[bot] Dec 5, 2021
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
17 changes: 17 additions & 0 deletions system/autoware_version/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.5)
project(autoware_version)

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

install(PROGRAMS
script/print
DESTINATION lib/${PROJECT_NAME}
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package()
9 changes: 9 additions & 0 deletions system/autoware_version/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# autoware_version

This package provides a command line tool to know the architecture version. This feature is temporary and will be removed when the interface is unified in the future.

## How to use

```sh
ros2 run autoware_version print arch {full,type,version}
```
20 changes: 20 additions & 0 deletions system/autoware_version/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">

<name>autoware_version</name>
<version>0.0.0</version>
<description>The autoware_version package</description>
<maintainer email="isamu.takagi@tier4.jp">Takagi, Isamu</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>

</package>
14 changes: 14 additions & 0 deletions system/autoware_version/script/print
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env python3
# TODO(Takagi, Isamu): this is a temporary script and may change in the future
import argparse

parser = argparse.ArgumentParser()
parser.add_argument("target", choices=["arch"])
parser.add_argument("format", choices=["full", "type", "version"], default="full", nargs="?")
args = parser.parse_args()
data = {"arch": {"type": "universe", "version": "1.0.0"}}

if args.format == "full":
print("{type} {version}".format(**data[args.target]))
else:
print(data[args.target][args.format])