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: lightNet-TRTのROS2ラッパーの実装 #12

Merged
merged 9 commits into from
Feb 16, 2024

Conversation

chickenta2ta
Copy link

@chickenta2ta chickenta2ta commented Aug 4, 2023

lightNet-TRTのROS2ラッパーです。edge-auto-jetson上で動きます。画像を受け取るとdetection + segmentationされた画像を返すだけで、bounding boxなどは返さないミニマルな実装になっています(元リポジトリではbboxも出すので、今後拡張可能)。

変更が複数リポジトリに及ぶため、各リポジトリにどのような変更を加えたか以下に記載します。

  • 本リポジトリ: ドキュメンテーションのみ
  • edge-auto-jetson: experimental.reposにlightNet-TRTをクローンしてくる記述を追加
  • edge_auto_jetson_launch: 既存のパッケージをros2 launchする際、tensorrt_lightnet_is_installed:=trueの引数を渡すとlightNet-TRTを起動するようにlaunchファイルを修正
  • edge-auto-tensorrt-lightnet: ROSラッパー部分のメインのコードが入っているリポジトリ。新規リポジトリのため、PRはありません

落ちているciについては、今回手を入れた箇所で落ちるようになった訳ではないため未対応

@chickenta2ta chickenta2ta changed the title lightNet-TRTのROS2ラッパーの実装 feat: lightNet-TRTのROS2ラッパーの実装 Aug 4, 2023
@miursh miursh requested review from aohsato and manato August 5, 2023 00:08
@chickenta2ta chickenta2ta marked this pull request as ready for review August 5, 2023 07:09
@chickenta2ta
Copy link
Author

chickenta2ta commented Jan 20, 2024

三浦さんと平林さんのフィードバックをベースに、以下の要領でPR修正しました。

また、lightNet-TRTのCMakeListsを使ってedge-auto上でROSパッケージをビルドするとboost filesystemがリンクできずエラーになるため、find_packageを追記するPRも併せて出しています。


以下の手順で、edge-auto (Jetson-based ECU) 上での動作確認を行いました。

  1. experimental.reposで、https://github.com/chickenta2ta/lightNet-TRT-ROS2feature/add-to-edgeautoブランチをチェックアウト(https://github.com/kminoda/lightNet-TRT-ROS2にPRがマージされる前のため)
  2. lightNet-TRTのROSパッケージをREADMEに従ってビルド、launch
  3. /sensing/camera/camera0/image_rect_colorに画像をpublishして、lightNet-TRTの推論が実行されることを確認

@manato
Copy link
Collaborator

manato commented Jan 29, 2024

@chickenta2ta
Thank you very much for your great contribution. I'm trying to reproduce the procedure of this PR, however, I've not made it work yet, unfortunately.
As far as I checked, the default .weight file (i.e., yolov8x-BDD100K-640x640-T4-lane4cls-scratch-pseudo-finetune_last.weights) looks missing anywhere. Do you download it manually or do you have another branch where it is contained?
If you download it manually, I'd appreciate it if you add your procedure to the document. Or if you have another branch, it would be nice to specify the branch explicitly in the .repos file. Thanks!

@chickenta2ta
Copy link
Author

@manato
Thank you very much for checking the reproducibility of this PR.
As you pointed out, the procedure of downloading the weights file is missing.
I added a step to manually download the file to the README file.
I appreciate if you could check it again.


Since this PR requires another PR (in Minoda-san's repository) to be merged, I'll write down the steps to reproduce this PR before all PRs are merged into main.

  1. In experimental.repos, change url to https://github.com/chickenta2ta/lightNet-TRT-ROS2 and version to feature/add-to-edgeauto-docs. This step will be unnecessary when this PR is merged.
  2. Download the weights file and build the package according to the documentation. When launching the node, please note that lightNet-TRT is for images with 1280x960 resolution.

Also, I'll write down PRs that are relavant to this PR.

Copy link
Collaborator

@manato manato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By following your instructions, I've confirmed the module looks working. Thank you very much for your contribution!
image

@manato manato merged commit 6dec15d into tier4:main Feb 16, 2024
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants