Skip to content

Commit

Permalink
fixed signal surface position
Browse files Browse the repository at this point in the history
  • Loading branch information
benediktschwab committed Apr 1, 2024
1 parent d576158 commit 53905a7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ object Surface3DBuilder {
val objectAffine = Affine3D.of(roadObject.referenceLinePointRelativePose)
// needs to be rotated since rectangle is defined with length in x-axis and width in y-axis
val objectRotation = Affine3D.of(Rotation3D.of(0.0, -PI / 2.0, 0.0))
val affineSequence = AffineSequence3D.of(curveAffine, objectAffine, objectRotation)
// needs to be shifted upwards by half the height, as the reference point is defined at the signal's bottom end
val objectTranslation = Affine3D.of(Vector3D(roadObject.height.getOrElse { 0.0 } / 2.0, 0.0, 0.0))
val affineSequence = AffineSequence3D.of(curveAffine, objectAffine, objectRotation, objectTranslation)
return Rectangle3D.of(roadObject.height, roadObject.width, numberTolerance, affineSequence)
}

Expand Down

0 comments on commit 53905a7

Please sign in to comment.