-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix errors in rotation function in OSMPDummySensor #95
Conversation
…tation to ego orientation Signed-off-by: ClemensLinnhoff <clemens.linnhoff@persival.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this occured during unit testing and is now solved, it should be merged asap.
Signed-off-by: Thomas Sedlmayer <tsedlmayer@pmsfit.de>
- Change transformation matrix to XYZ rotation order acc. to OSI3 def. - Consider center rear axle for transformation - Consider virt. sensor mounting position/orientation for transformation - Copy/translate object orientations from SensorView to SensorData - Copy virtual sensor mounting position from SensorView to SensorData Signed-off-by: Thomas Sedlmayer <tsedlmayer@pmsfit.de>
Thanks for noticing/fixing the bug! The fix works with our tools. Though, I thought we would maybe want to use the actual roll-pitch-yaw rotation matrix instead of using the yaw-pitch-roll matrix and then transpose? I made a proposal in my commit. What do you think? I also added the transformation to vehicle coordinate system (center rear axle) and virtual sensor coordinate system as this was missing anyways. And I removed the rotatePoint function from the DummySource as this probably was a copy/paste mistake. @ClemensLinnhoff Could you check if this works for you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the individual comments in the code, I would acutally prefer to use the inverse of the rotation matrix instead of reversing the rotation order and the angles, because it would then be alligned with the mathematical definitions in the documentation.
As I said above, for me it is easier to understand the coordinate transformtion by having only one rotation matrix and using the inverse depending on the transformation direction. But I can understand, that people might also find it easier doing it by reversing the rotation direction and the angle directions. So it would be fine for me to use your approach @thomassedlmayer I tested the current implementation with some unit tests and could not find an error, so the transformation (incl. translation and rotation) to vehicle and to the sensor seem to work. |
After removing the transpose function as noted above, the PR can be merged from my point of view. |
Signed-off-by: Thomas Sedlmayer <tsedlmayer@pmsfit.de>
CCB 2023-05-22: Merge as-is. |
Reference to a related issue in the repository
Fixes #94
Add a description
Check the checklist