Skip to content

Commit

Permalink
Merge branch 'feat/#348-use-lanelet2-extension-python' into feat/upda…
Browse files Browse the repository at this point in the history
…te-galactic
  • Loading branch information
hayato-m126 committed Feb 9, 2024
2 parents 1a930ea + cfdd65b commit 579efe1
Show file tree
Hide file tree
Showing 152 changed files with 317,219 additions and 110,343 deletions.
8 changes: 7 additions & 1 deletion .driving_log_replayer.cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
"Koji",
"Minoda",
"pyproject",
"interp"
"interp",
"CENTERDISTANCE",
"nums",
"pydantic",
"Kotaro",
"Uetake",
"conlist"
]
}
12 changes: 6 additions & 6 deletions .github/workflows/colcon-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
workflow_dispatch:

jobs:
test_environment:
build-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -25,7 +25,7 @@ jobs:
image: ${{ matrix.docker_image }}
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -37,17 +37,17 @@ jobs:
- name: Search packages in this repository
id: list_packages
run: |
echo ::set-output name=package_list::$(colcon list --names-only)
echo package_list=$(colcon list --names-only | sed -e ':loop; N; $!b loop; s/\n/ /g') >> $GITHUB_OUTPUT
- name: Setup ROS environment
uses: ros-tooling/[email protected].0
uses: ros-tooling/[email protected].1
with:
required-ros-distributions: ${{ matrix.ros_distribution }}

- name: build and test
uses: ros-tooling/[email protected].3
uses: ros-tooling/[email protected].6
with:
package-name: ${{ steps.list_packages.outputs.package_list }}
target-ros2-distro: ${{ matrix.ros_distribution }}
vcs-repo-file-url: github_action_dependency.repos
vcs-repo-file-url: dependency.repos
import-token: ${{ secrets.GITHUB_TOKEN }}
7 changes: 4 additions & 3 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v3

- name: Run pre-commit
uses: autowarefoundation/autoware-github-actions/pre-commit@v1
with:
pre-commit-config: .pre-commit-config.yaml
uses: pre-commit/[email protected]
19 changes: 0 additions & 19 deletions .github/workflows/sync-release-notes.yaml

This file was deleted.

18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-json
exclude: \.vscode/
Expand All @@ -19,18 +19,18 @@ repos:
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.33.0
rev: v0.39.0
hooks:
- id: markdownlint
args: [-c, .markdownlint.yaml, --fix, -i, CONTRIBUTING.md]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.6
rev: v3.1.0
hooks:
- id: prettier

- repo: https://github.com/adrienverge/yamllint
rev: v1.30.0
rev: v1.34.0
hooks:
- id: yamllint

Expand All @@ -44,30 +44,30 @@ repos:
- id: sort-package-xml

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.2
rev: v0.9.0.6
hooks:
- id: shellcheck

- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.6.0-2
rev: v3.7.0-4
hooks:
- id: shfmt
args: [-w, -s, -i=4]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.284
rev: v0.2.1
hooks:
- id: ruff
args: [--fix]

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.1.1
hooks:
- id: black
args: [--line-length=100]

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.0
rev: v17.0.6
hooks:
- id: clang-format
types_or: [c++, c, cuda]
Expand Down
33 changes: 10 additions & 23 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"console": "integratedTerminal",
"args": [
"-p",
"$HOME/out/perception/latest/sample/f72e1065-7c38-40fe-a4e2-c5bbe6ff6443/result_archive/scene_result.pkl",
"$HOME/out/oss_perception/latest/sample/sample_dataset/result_archive/scene_result.pkl",
"-s",
"$HOME/data/perception/sample/scenario.yaml",
"$HOME/data/oss_perception/sample/scenario.yaml",
"-d",
"$HOME/data/perception/sample/t4_dataset/f72e1065-7c38-40fe-a4e2-c5bbe6ff6443",
"$HOME/data/oss_perception/sample/t4_dataset/sample_dataset",
"-l",
"$HOME/out/perception/latest/sample/f72e1065-7c38-40fe-a4e2-c5bbe6ff6443/perception_eval_log"
"$HOME/out/oss_perception/latest/sample/sample_dataset/perception_eval_log"
]
},
{
Expand All @@ -37,9 +37,9 @@
"console": "integratedTerminal",
"args": [
"-r",
"$HOME/out/perception/latest/sample",
"$HOME/out/oss_perception_database/latest/sample",
"-s",
"$HOME/data/perception/sample/scenario.yaml"
"$HOME/data/oss_perception_database/sample/scenario.yaml"
]
},
{
Expand All @@ -50,26 +50,13 @@
"console": "integratedTerminal",
"args": [
"-p",
"$HOME/out/obstacle_segmentation/latest/sample/63800729-18d2-4383-91e9-fea7bad384f4/frame.pkl",
"$HOME/out/oss_obstacle_segmentation/latest/sample/sample_dataset/result_archive/scene_result.pkl",
"-s",
"$HOME/data/obstacle_segmentation/sample/scenario.yaml",
"$HOME/data/oss_obstacle_segmentation/sample/scenario.yaml",
"-d",
"$HOME/data/obstacle_segmentation/sample/t4_dataset/63800729-18d2-4383-91e9-fea7bad384f4",
"$HOME/data/oss_obstacle_segmentation/sample/t4_dataset/sample_dataset",
"-l",
"$HOME/out/obstacle_segmentation/latest/sample/63800729-18d2-4383-91e9-fea7bad384f4/perception_eval_log"
]
},
{
"name": "obstacle_segementation_analyzer",
"type": "python",
"request": "launch",
"program": "driving_log_replayer/driving_log_replayer/obstacle_segmentation_analyzer.py",
"console": "integratedTerminal",
"args": [
"-i",
"$HOME/out/obstacle_segmentation/latest/sample/63800729-18d2-4383-91e9-fea7bad384f4/result.jsonl",
"-v",
"gsm8"
"$HOME/out/oss_obstacle_segmentation/latest/sample/sample_dataset/perception_eval_log"
]
}
]
Expand Down
8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"/opt/ros/humble/lib/python3.10/site-packages",
"${env:HOME}/ros_ws/awf/install/autoware_auto_perception_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/autoware_auto_vehicle_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/autoware_auto_mapping_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/tier4_planning_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/perception_eval/local/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/ros2_numpy/local/lib/python3.10/dist-packages",
Expand All @@ -37,12 +38,14 @@
"${env:HOME}/ros_ws/awf/install/autoware_adapi_v1_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/tier4_localization_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/tier4_api_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/tier4_perception_msgs/local/lib/python3.10/dist-packages"
"${env:HOME}/ros_ws/awf/install/tier4_perception_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/lanelet2_extension_python/local/lib/python3.10/dist-packages"
],
"python.analysis.extraPaths": [
"/opt/ros/humble/lib/python3.10/site-packages",
"${env:HOME}/ros_ws/awf/install/autoware_auto_perception_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/autoware_auto_vehicle_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/autoware_auto_mapping_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/tier4_planning_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/perception_eval/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/ros2_numpy/local/lib/python3.10/dist-packages",
Expand All @@ -52,7 +55,8 @@
"${env:HOME}/ros_ws/awf/install/autoware_adapi_v1_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/tier4_localization_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/tier4_api_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/tier4_perception_msgs/local/lib/python3.10/dist-packages"
"${env:HOME}/ros_ws/awf/install/tier4_perception_msgs/local/lib/python3.10/dist-packages",
"${env:HOME}/ros_ws/awf/install/lanelet2_extension_python/local/lib/python3.10/dist-packages"
],
"files.associations": {
"cctype": "cpp",
Expand Down
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,52 @@ pipx upgrade driving_log_replayer_cli
pipx uninstall driving_log_replayer_cli
```

### Shell Completion

Execute the following command so that you can complete the command in the shell.

#### bash

```shell
_DLR_COMPLETE=bash_source dlr > $HOME/.dlr-complete.bash
_DLR_COMPLETE=bash_source dlr > $HOME/.dlr-analyzer-complete.bash

echo "source $HOME/.dlr-complete.bash" >> ~/.bashrc
echo "source $HOME/.dlr-analyzer-complete.bash" >> ~/.bashrc
```

#### fish

```shell
_DLR_COMPLETE=fish_source dlr > $HOME/.config/fish/completions/dlr.fish
_DLR_ANALYZER_COMPLETE=fish_source dlr-analyzer > $HOME/.config/fish/completions/dlr-analyzer.fish
```

## Usage

refer [document](https://tier4.github.io/driving_log_replayer/)

## (For Developer) Release Process

This package uses `catkin_pkg` to manage releases.

Refer [this page](https://wiki.ros.org/bloom/Tutorials/ReleaseCatkinPackage)

### Release command

Can only be executed by users with repository maintainer privileges

```shell
# create change log
catkin_generate_changelog
# edit CHANGELOG.rst
# update package version in pyproject.toml
# edit ReleaseNotes.md
# commit and create pull request
# merge pull request
catkin_prepare_release
# When you type the command, it automatically updates CHANGELOG.rst and creates a git tag
git checkout main
git merge develop
git push origin main
```
2 changes: 2 additions & 0 deletions REFACTOR.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

- [] frameをsetしてからwriteするまで更新される可能性がある。コピーを渡すほうがいいかも
- [] frameを渡したら、set_frameを自動でやって書き込みまで自動にしたい。resultにwriterをもたせる。
- [] gtestでobstacle_segmentationのcppノードもテストする
- [] result.jsonlもpydantic.BaseModelでフォーマットガチガチにしてmodel_dump()->dict->json_dump->strの流れのほうがいいかも
Loading

0 comments on commit 579efe1

Please sign in to comment.