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

アップデート #28

Merged
merged 76 commits into from
Jul 11, 2023
Merged

Conversation

Autumn60
Copy link
Contributor

@Autumn60 Autumn60 commented Jun 11, 2023

UnitySensorsArchive(旧UnitySensors)とUnitySensorsROSArchive(旧UnitySensorsROS)のリポジトリ統合

旧UnitySensorsと旧UnitySensorsROSの内容を旧UnitySensorsAssetsに移植するためのパッケージ構成を作成した。
また、RobotSensors-Unity3Dで実装を行った内容を一部移植し、今後のセンサ実装の参考となるようにした。

関連するor含むPR・Issue

目的:

変更内容

  • パッケージの分離

  • 以下のセンサのスクリプトを追加
    DepthCamera, RGBCamera, GPS, GroundTruth, IMU, Livox LiDAR, Velodyne LiDAR
    各センサについての細かな変更内容は以下の通り

  • DepthCameraの仕様を変更
    シェーダーを用いてCameraのRenderTextureが持つRGB値とDepth値のチャンネルを入れ替え、そのテクスチャを非同期で取得することによって実装。
    従来よりもGPUへの依存少

  • GroundTruthを追加
    Added a new sensor ground truth. arav-jp/UnitySensors#15
    Added a new sensor GroundTruth. arav-jp/UnitySensorsROS#6
    での実装を新仕様に合わせ書き直したものを追加

  • RGBCameraの仕様を変更
    CameraのRenderTextureを非同期で取得することによって実装。
    従来のRenerTexture->Textureのコピーに比べ高速

  • GPSのシリアライザの仕様を変更
    シリアライザにScriptableObjectを用いることで、NMEAFormatをオブジェクトとして管理できるように変更。
    従来に比べ余計なインスペクタの設定項目が減

  • Livox LiDARの仕様を変更
    DepthCameraに実装した仕様を応用し実装。従来のRaycastでの点群取得とは異なり、当たり判定ではなく見た目と一致する点群が取得される。
    また、各種センサのスキャンパターンをScriptableObjectで予めロードしておくことによりCSVのロード時間が不要となったため、従来に比べゲーム開始の動作が軽量化。またこれによりAddressablesへの依存が無くなり、プロジェクト設定への依存問題が解決。
    Livoxのトピック名とフレームIDが実機と違うかも? #27 も同時に修正

  • Velodyne LiDARの仕様を変更
    Livox LiDARと同様にScanPatternをパラメータとしてアタッチすることでモデルを変更。
    RaycastCommandsの更新も並列化することで従来に比べ高速化
    現時点ではPointCloud2のPubのみ実装

追記:DepthBufferを用いるVelodyneSensorDepthBufferを追加。動作不安定。

未実装内容・既知の問題点

  • LICENSE, READMEが未記載未更新
  • Color2Depth.shaderのLinuxOS対応
    恐らく、デプスバッファの正負軸が反転しているため、要修正
  • GPSのシリアライザがシーン変更時に保持されない
    OCS2 で修正済みの問題のため、修正方法は既知

->修正完了

  • PointCloud2以外の点群Serializer, Publisher
  • Velodyne LiDARのTransformAccessArrayをDisposeすると30秒ほどの硬直が発生する
    パラメータのsafeDisposalをFalseにすることで、その硬直は解消可能(ただしメモリリークエラーは発生する)。
    -> 修正完了
  • RGBDCamera
  • DepthCamera Publisher
    -> 追加
  • 各種センサのノイズ
    -> Velodyneのみ追加
  • 各種センサの3Dモデル
    -> Velodyneのみ追加
  • Clock
    -> 追加
  • camera_infoのpublish UnitySensorsROSArchive#13
  • 距離限界の点群の削除

@Autumn60 Autumn60 marked this pull request as ready for review June 12, 2023 16:05
@Autumn60
Copy link
Contributor Author

点群の表示はGizmosから
https://qiita.com/moru-san/items/8bef5d4947e0e6a4a123
の方式に切り替える予定

@Autumn60
Copy link
Contributor Author

Livoxのレーザー原点と点群原点の違いは未修正

RyodoTanaka added a commit that referenced this pull request Jul 11, 2023
@RyodoTanaka RyodoTanaka merged commit 30bec3d into Field-Robotics-Japan:master Jul 11, 2023
1 of 2 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.

None yet

2 participants