Skip to content

Commonisation of serializers and publishers.#148

Merged
RyodoTanaka merged 64 commits intodevelopfrom
feature/commonPublisher
Jul 3, 2024
Merged

Commonisation of serializers and publishers.#148
RyodoTanaka merged 64 commits intodevelopfrom
feature/commonPublisher

Conversation

@Autumn60
Copy link
Contributor

@Autumn60 Autumn60 commented Feb 18, 2024

Notice: This PR is less backward compatible.

Before merging, [master_2.x.x] branch must be created from the current [master] branch.

en

Commonisation of serializers and publishers

All "Sensor" classes, except a few such as TF, now have interface to the data provided by each sensor.
"Serializer" classes and "Publisher" classes are now dependent on the interface of the corresponding data, not the "Sensor" classes.

This change allows "Sensor"s that provide common data to send data with a common "Serializer" and "Publisher" scripts.
Also, scripts that are not "Sensor" can now be used as data sources from Serializer and Publisher if they have a corresponding interface.

PointCloud2 data serialisation method change

Change from a method using JobSystem to a method using memory copy.

RGBDCamera

RGBD camera with PointXYZRGB point cloud output implemented.

jp

SerializerPublisherの共通化

TFなどの一部を除くすべての "Sensor "クラスは、各センサーが提供するデータへのインターフェイスを持つようになりました。
「Serializer "クラスと "Publisher "クラスは、"Sensor "クラスではなく、対応するデータのインターフェースに依存するようになりました。

この変更により、共通のデータを提供する "Sensor "は、共通の "Serializer "と "Publisher "スクリプトでデータを送信できるようになりました。
また、"Sensor "ではないスクリプトでも、対応するインターフェイスがあれば、"Serializer "や "Publisher "のデータソースとして使用できるようになりました。

PointCloud2データのmsg化方法の変更

JobSystemを用いる方法から、メモリコピーを用いる方法に変更しました。
ROS->Unityの座標変換は、PointCloud2のPointFieldの順番を入れ替えることと、JobSystemを用いてx軸(ROSではy軸)を入れ替えることで実現しました。
可読性が酷いことになっていますが、
各点の4 byte 目に128を足す = 各点の1つ目の4 byte型(float)の1 bit 目を反転させる = 各点のxの値を反転させる
処理をしています。

RGBDカメラ復活

実装を見直したことで、RGBDカメラが再び実装されました。

@Autumn60 Autumn60 added the enhancement New feature or request label Feb 18, 2024
@Autumn60 Autumn60 changed the title Feature/common publisher Common serializers and publishers Feb 20, 2024
@Autumn60 Autumn60 changed the title Common serializers and publishers Commonisation of serializers and publishers. Feb 20, 2024
@Autumn60 Autumn60 marked this pull request as ready for review February 20, 2024 05:57
@Autumn60 Autumn60 marked this pull request as draft February 20, 2024 08:28
@Autumn60 Autumn60 marked this pull request as ready for review February 20, 2024 12:23
@RyodoTanaka
Copy link
Member

@Autumn60
Thank you for your PR.
To check this PR merge, please tell us the list of confirmation for normal works.

@Autumn60
Copy link
Contributor Author

@RyodoTanaka
I will create an integrated demo scene to provide confirmation.

@RyodoTanaka
Copy link
Member

@Autumn60
I think this PR should be merged without the examples.
Otherwise, this PR will be bigger and bigger.

Thus, I will merge this PR.

@RyodoTanaka RyodoTanaka merged commit c06ac4e into develop Jul 3, 2024
@RyodoTanaka RyodoTanaka deleted the feature/commonPublisher branch July 3, 2024 13:50
@RyodoTanaka RyodoTanaka mentioned this pull request Jul 3, 2024
9 tasks
Autumn60 added a commit that referenced this pull request Oct 6, 2024
* Change ROSClock location

* Change GroundTruthEditor location

* Delete TFEditor from UnitySensor

* Separate Data namespace to DataType and Interface

* Create UnitySensorsROSEditor.asmdef

* Move TF from UnitySensors to UnitySensorsROS

* Update GeoCoordinateConverter

* Create TFLinkEditor

* Delete custom ros msgs

* Delete TFMsgSerializer and Publisher

* Update Serializer.cs

* Update RosMsgPublisher.cs

* Update Visualizer.cs

* Update UnitySensor.cs

* Update GNSS scripts

* Update GroundTruth.cs

* Update IMUSensor.cs

* Update HeaderMsgSerializer

* Create PointUtilitites

* Delete NMEA serializer and publisher

* Update tf scripts

* Delete PointCloud2Msg serializer and publisher

* Delete PoseStampedMsg serializer and publisher

* Delete IMUMsg serializer and Publisher

* Delete VelodyneMsg serializer

* Delete CameraInfoMsg serializer and publisher

* Create IMUMsg serializer and publisher

* Delete ImageMsg serializer and publisher

* Create camera sensor scripts

* Create CameraInfoMsg serializer and publisher

* Create CompressedImageMsg serializer and publisher

* Delete PointCloud visualizer

* Delete CameraTextureVisualizer

* Delete old ScanPattern

* Create PoseStampedMsg serializer and publisher

* Delete NavSatFixMsg serializer and publisher

* Delete lidar PointCloud2Msg publisher

* Delete ImageMsgPublisher

* Create NavSatFixMsg serializer and publisher

* Create PointCloud2Msg serializer and publisher

* Delete old Livox sensor scripts

* Update lidar sensor scripts

* Update visualizer scripts

* Update IMU prefabs

* Update GNSS_ros.prefab

* Update camera sensor prefabs

* Create RGBDCamera sensor prefabs

* Update GroundTruth_ros.prefab

* Update lidar prefabs

* Delete TF demo scene

* Create Interface attribute

* Update visualizers

* Update serializers and publishers

* Update prefabs

* Delete clip plane settings from rgb camera

* Fix PointCloud visualizers

* Fix intensity pointfield name

* Fix RGBDCamera color map

* Fix MsgSerializer

---------

Co-authored-by: A-Harada <37181352+Autumn60@users.noreply.github.com>
Co-authored-by: TaroABEJido <abet.jido.kenki@gmail.com>
Co-authored-by: Autumn60 <harada.akiro@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants