Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PiotrMrozik committed Jul 25, 2023
1 parent 48ba964 commit 9f7d3d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ public struct LidarConfiguration
[Min(0)] public float maxRange;

/// <summary>
/// The horiontal step time offset in milliseconds.
/// The vertical step time offset in milliseconds. Thisi s the time between two consecutive lasers in the array.
/// </summary>
[Min(0)] public float horizontalStepTimeOffset;
[Min(0)] public float verticalStepTimeOffset;

/// <summary>
/// Time offset between two consecutive firings of the whole array.
/// </summary>
[Min(0)] public float rechargeTimeOffset;

/// <summary>
Expand Down
4 changes: 3 additions & 1 deletion Assets/RGLUnityPlugin/Scripts/LidarSensor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ private void ApplyConfiguration(LidarConfiguration newConfig)
var angularNoiseType = newConfig.noiseParams.angularNoiseType;
rglGraphLidar.SetActive(noiseLidarRayNodeId, applyAngularGaussianNoise && angularNoiseType == AngularNoiseType.RayBased);
rglGraphLidar.SetActive(noiseHitpointNodeId, applyAngularGaussianNoise && angularNoiseType == AngularNoiseType.HitpointBased);
rglGraphLidar.SetActive(lidarVelocityDistortionNodeId, applyVelocityDistortion);
}

public void FixedUpdate()
Expand Down Expand Up @@ -250,7 +251,8 @@ public void Capture()
rglSubgraphToLidarFrame.UpdateNodePointsTransform(toLidarFrameNodeId, lidarPose.inverse);

// Set lidar velocity
rglGraphLidar.UpdateNodeRaysVelocityDistortion(lidarVelocityDistortionNodeId, deltaTranslation, deltaRotation);
if(applyVelocityDistortion)
rglGraphLidar.UpdateNodeRaysVelocityDistortion(lidarVelocityDistortionNodeId, deltaTranslation, deltaRotation);

rglGraphLidar.Run();

Expand Down

0 comments on commit 9f7d3d9

Please sign in to comment.