feat: adding webots dynamic scenario tests#231
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #231 +/- ##
==========================================
+ Coverage 91.32% 91.36% +0.03%
==========================================
Files 54 54
Lines 13515 13577 +62
==========================================
+ Hits 12343 12404 +61
- Misses 1172 1173 +1 |
Important!!!!In order to for dynamic webots tests to work you need a physical or virtual display. If you are:
it is VERY important you create a virtual screen prior to running the tests! If not you will generate the following warning which will automatically fail all webots dynamic scenario tests: If you are using the DCV client to run the test (as illustrated in the PR description above), the built in |
…nuelo/add-webots-dynamic-scenario-tests
…om:BerkeleyLearnVerify/Scenic into abanuelo/add-webots-dynamic-scenario-tests
| scenario = scenic.scenarioFromFile(path) | ||
|
|
||
| scene, _ = scenario.generate() | ||
| simulation = simulator.simulate(scene, verbosity=2) |
There was a problem hiding this comment.
Maybe add a large upper bound to the time limit so if the test fails, it does so gracefully?
lola831
left a comment
There was a problem hiding this comment.
I've addressed the comment, added the timeout, and tested the changes locally to ensure everything works as expected.
Description
Adding a webots dynamic scenario test where an object is created above a plane and then drops until it hits the floor. The test checks the expected start and ending z values for the object's position. Note, that webots runs headlessly via a python subprocess. This subprocess then creates a
results.txtfile which contains the starting and ending z positions. Below is an illustration of the test case running on our machine:testing_2.mp4
Issue Link
Checklist
pytestand/or other meansAdditional Notes