Skip to content

Commit

Permalink
Simple LiDAR velocity distortion (#168)
Browse files Browse the repository at this point in the history
* Add time offsets feature

* fix copypaste error

* move lasers offset from library to calculating

* add velocity distortion first approach

* add rotation to distortion

* small fixes

* back to laserArrayOffsets data

* add data for velodyne 16 and 32

* add PandarQT data

* add Pandar40 data

* add placeholders for velodyne 128 and ouster

* add velodyne vls-128 configuration

* PR fixes v1

* fix minor bug

* catch bug with units

* update lidars prefabs

* movetransform assigment on tick

* fix bug with radians

* move transforming do distord method

* Delete usless member

* Update RGL binary after rebase

* Fix RGL velocity distortion v1 (#188)

* Adjust plugin to fixed native RGL version

* Calculate velocities in sensor-local coordinate frame

* Fix offsets calculation

* Add time offsets to Hesai AT128

* Update VLS128 time offsets

* Update lidar prefabs

* Update RGL binary

* Disable velocity distortion by default

* Add sample scene for tests

---------

Co-authored-by: Mateusz Szczygielski <[email protected]>
Co-authored-by: Mateusz Szczygielski <[email protected]>
  • Loading branch information
3 people committed Sep 23, 2023
1 parent 0b07449 commit 58e028c
Show file tree
Hide file tree
Showing 18 changed files with 2,138 additions and 573 deletions.
130 changes: 130 additions & 0 deletions Assets/AWSIM/Prefabs/Sensors/RobotecGPULidars/HesaiAT128E2X.prefab

Large diffs are not rendered by default.

242 changes: 142 additions & 100 deletions Assets/AWSIM/Prefabs/Sensors/RobotecGPULidars/HesaiPandar40P.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -506,257 +506,299 @@ MonoBehaviour:
modelPreset: 6
applyDistanceGaussianNoise: 1
applyAngularGaussianNoise: 1
applyVelocityDistortion: 0
configuration:
rayGenerateMethod: 0
laserArray:
centerOfMeasurementLinearOffsetMm: {x: 0, y: 47.7, z: 0}
focalDistanceMm: 0
lasers:
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 25
verticalLinearOffsetMm: 0
ringId: 1
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 19
verticalAngularOffsetDeg: -15
verticalLinearOffsetMm: 0
ringId: 2
ringId: 40
timeOffset: 0.01334
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 14
verticalAngularOffsetDeg: -11
verticalLinearOffsetMm: 0
ringId: 3
ringId: 39
timeOffset: 0.02709
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 13
verticalAngularOffsetDeg: -8
verticalLinearOffsetMm: 0
ringId: 4
ringId: 38
timeOffset: 0.03952
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 12
verticalAngularOffsetDeg: -5
verticalLinearOffsetMm: 0
ringId: 5
ringId: 37
timeOffset: 0.05194
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 11
verticalAngularOffsetDeg: -3
verticalLinearOffsetMm: 0
ringId: 6
ringId: 36
timeOffset: 0.01007
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 10
verticalAngularOffsetDeg: -2
verticalLinearOffsetMm: 0
ringId: 7
ringId: 35
timeOffset: 0.02382
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 9
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: -1.67
verticalLinearOffsetMm: 0
ringId: 8
ringId: 34
timeOffset: 0.0081
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 8
- horizontalAngularOffsetDeg: -5.208
verticalAngularOffsetDeg: -1.33
verticalLinearOffsetMm: 0
ringId: 9
ringId: 33
timeOffset: 0.00089
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 7
verticalAngularOffsetDeg: -1
verticalLinearOffsetMm: 0
ringId: 10
ringId: 32
timeOffset: 0.03494
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 6
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: -0.67
verticalLinearOffsetMm: 0
ringId: 11
ringId: 31
timeOffset: 0.02185
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -5.208
verticalAngularOffsetDeg: 5.67
verticalAngularOffsetDeg: -0.33
verticalLinearOffsetMm: 0
ringId: 12
ringId: 30
timeOffset: 0.01465
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: 5.33
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: -0
verticalLinearOffsetMm: 0
ringId: 13
ringId: 29
timeOffset: 0.04737
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 5
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: 0.33
verticalLinearOffsetMm: 0
ringId: 14
ringId: 28
timeOffset: 0.03494
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -5.208
verticalAngularOffsetDeg: 4.67
verticalAngularOffsetDeg: 0.67
verticalLinearOffsetMm: 0
ringId: 15
ringId: 27
timeOffset: 0.0284
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: 4.33
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 1
verticalLinearOffsetMm: 0
ringId: 16
ringId: 26
timeOffset: 0.00483
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 4
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: 1.33
verticalLinearOffsetMm: 0
ringId: 17
ringId: 25
timeOffset: 0.04737
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -5.208
verticalAngularOffsetDeg: 3.67
verticalAngularOffsetDeg: 1.67
verticalLinearOffsetMm: 0
ringId: 18
ringId: 24
timeOffset: 0.04082
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: 3.33
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 2
verticalLinearOffsetMm: 0
ringId: 19
ringId: 23
timeOffset: 0.01858
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 3
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: 2.33
verticalLinearOffsetMm: 0
ringId: 20
ringId: 22
timeOffset: 0.01007
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -5.208
verticalAngularOffsetDeg: 2.67
verticalLinearOffsetMm: 0
ringId: 21
timeOffset: 0.00286
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: 2.33
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 3
verticalLinearOffsetMm: 0
ringId: 22
ringId: 20
timeOffset: 0.03167
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 2
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: 3.33
verticalLinearOffsetMm: 0
ringId: 23
ringId: 19
timeOffset: 0.02382
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -5.208
verticalAngularOffsetDeg: 1.67
verticalAngularOffsetDeg: 3.67
verticalLinearOffsetMm: 0
ringId: 24
ringId: 18
timeOffset: 0.01661
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: 1.33
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 4
verticalLinearOffsetMm: 0
ringId: 25
ringId: 17
timeOffset: 0.04409
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 1
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: 4.33
verticalLinearOffsetMm: 0
ringId: 26
ringId: 16
timeOffset: 0.03691
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -5.208
verticalAngularOffsetDeg: 0.67
verticalAngularOffsetDeg: 4.67
verticalLinearOffsetMm: 0
ringId: 27
ringId: 15
timeOffset: 0.03037
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: 0.33
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 5
verticalLinearOffsetMm: 0
ringId: 28
ringId: 14
timeOffset: 0.0068
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: -0
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: 5.33
verticalLinearOffsetMm: 0
ringId: 29
ringId: 13
timeOffset: 0.0493
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -5.208
verticalAngularOffsetDeg: -0.33
verticalAngularOffsetDeg: 5.67
verticalLinearOffsetMm: 0
ringId: 30
ringId: 12
timeOffset: 0.04279
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: -0.67
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 6
verticalLinearOffsetMm: 0
ringId: 31
ringId: 11
timeOffset: 0.02055
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: -1
verticalAngularOffsetDeg: 7
verticalLinearOffsetMm: 0
ringId: 32
ringId: 10
timeOffset: 0.03364
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -5.208
verticalAngularOffsetDeg: -1.33
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 8
verticalLinearOffsetMm: 0
ringId: 33
ringId: 9
timeOffset: 0.04606
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: 3.125
verticalAngularOffsetDeg: -1.67
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 9
verticalLinearOffsetMm: 0
ringId: 34
ringId: 8
timeOffset: 0.01204
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: -2
verticalAngularOffsetDeg: 10
verticalLinearOffsetMm: 0
ringId: 35
ringId: 7
timeOffset: 0.02579
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: -3
verticalAngularOffsetDeg: 11
verticalLinearOffsetMm: 0
ringId: 36
ringId: 6
timeOffset: 0.03821
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: -5
verticalAngularOffsetDeg: 12
verticalLinearOffsetMm: 0
ringId: 37
ringId: 5
timeOffset: 0.05064
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: -8
verticalAngularOffsetDeg: 13
verticalLinearOffsetMm: 0
ringId: 38
ringId: 4
timeOffset: 0.01334
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: -11
verticalAngularOffsetDeg: 14
verticalLinearOffsetMm: 0
ringId: 39
ringId: 3
timeOffset: 0.02709
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: -15
verticalAngularOffsetDeg: 19
verticalLinearOffsetMm: 0
ringId: 40
ringId: 2
timeOffset: 0.03952
minRange: 0
maxRange: 0
- horizontalAngularOffsetDeg: -1.042
verticalAngularOffsetDeg: 25
verticalLinearOffsetMm: 0
ringId: 1
timeOffset: 0.05194
minRange: 0
maxRange: 0
horizontalResolution: 0.2
minHAngle: 0
maxHAngle: 360
minRange: 0
maxRange: 200
laserArrayCycleTime: 0.05556
noiseParams:
angularNoiseType: 0
angularNoiseStDev: 0.057295784
Expand Down
Loading

0 comments on commit 58e028c

Please sign in to comment.