Skip to content

Commit ac4947d

Browse files
authored
Merge pull request #113 from Field-Robotics-Japan/feature/hdl32ScanPattern
Add ScanPattern for Velodyne HDL32-E
2 parents fff9462 + fde6678 commit ac4947d

File tree

7 files changed

+345633
-8
lines changed

7 files changed

+345633
-8
lines changed

Assets/UnitySensors/Editor/LiDAR/ScanPatternGenerator.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,7 @@ private void GenerateFromSpecification()
173173
int index = 0;
174174
for (int azimuth = 0; azimuth < _azimuthAngleResolution; azimuth++)
175175
{
176-
if (_direction == Direction.CCW) azimuth = _azimuthAngleResolution - 1 - azimuth;
177-
float azimuthAngle = Mathf.Lerp(_minAzimuthAngle, _maxAzimuthAngle, (float)azimuth / _azimuthAngleResolution);
176+
float azimuthAngle = Mathf.Lerp(_minAzimuthAngle, _maxAzimuthAngle, (float)(_direction == Direction.CW ? azimuth : _azimuthAngleResolution - 1 - azimuth) / _azimuthAngleResolution);
178177
foreach (float zenithAngle in _zenithAngles)
179178
{
180179
scan.scans[index] = Quaternion.Euler(-zenithAngle, azimuthAngle, 0) * Vector3.forward;

0 commit comments

Comments
 (0)