-
Notifications
You must be signed in to change notification settings - Fork 103
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a large upper bound to the time limit so if the test fails, it does so gracefully?
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.
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.txt
file 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
pytest
and/or other meansAdditional Notes