BerkeleyLearnVerify / Scenic

A compiler and scenario generator for the Scenic scenario description language.
https://scenic-lang.org/
Other
256 stars 91 forks source link

Fix orientation conversion for CARLA #245

Closed dfremont closed 2 months ago

dfremont commented 2 months ago

Description

Fixes the conversions between Scenic orientations and CARLA rotations so that they work for arbitrary 3D orientations.

Issue Link

176 was probably a combination of this bug and the broader Scenic bug fixed in #241; this PR fixes the scenario provided in #176.

Checklist

Additional Notes

Once the CARLA CI is set up we can add tests for this conversion; there isn't really anything we can add to the main test suite, unfortunately.

For future reference, the discussion of CARLA's conventions for rotations in #176 was wrong (CARLA's documentation is absolutely unhelpful here): in the course of fixing this issue I determined by experiment that CARLA uses the same ZXY intrinsic rotation sequence as Scenic, except that the Z rotation (yaw) is left-handed and the global orientation points East. I've added a comment to this effect in the code.

abanuelo commented 2 months ago

@dfremont regarding:

Once the CARLA CI is set up we can add tests for this conversion; there isn't really anything we can add to the main test suite, unfortunately.

What tests did you have in mind for the CI?

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 86.15%. Comparing base (1c49d80) to head (e8bdeb1). Report is 1 commits behind head on main.

Files Patch % Lines
src/scenic/simulators/carla/utils/utils.py 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #245 +/- ## ========================================== + Coverage 86.13% 86.15% +0.01% ========================================== Files 144 144 Lines 24976 24991 +15 ========================================== + Hits 21514 21530 +16 + Misses 3462 3461 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.