Commonisation of serializers and publishers.#148
Merged
RyodoTanaka merged 64 commits intodevelopfrom Jul 3, 2024
Merged
Conversation
Feature/common publisher
Feature/common publisher
Member
|
@Autumn60 |
Contributor
Author
|
@RyodoTanaka |
Member
|
@Autumn60 Thus, I will merge this PR. |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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カメラが再び実装されました。