Adding objects that can replay completed scenarios#54
Open
ameesh-shah wants to merge 15 commits intomainfrom
Open
Adding objects that can replay completed scenarios#54ameesh-shah wants to merge 15 commits intomainfrom
ameesh-shah wants to merge 15 commits intomainfrom
Conversation
Author
|
Note that the added test case is not final and will need adjustments to be pytest runnable. |
dfremont
reviewed
Jun 24, 2022
src/scenic/core/simulators.py
Outdated
| The default implementation a list of objects with their properties. | ||
| """ | ||
| return tuple(obj.position for obj in self.objects) | ||
| return [self.getProperties(obj, obj.properties) for obj in self.objects] |
Collaborator
There was a problem hiding this comment.
We don't want to call getProperties again since it may be slow (e.g. actually talking to the simulator). I would just return {prop: getattr(obj, prop) for prop in obj._dynamicProperties}. Also the docstring should clarify that it's only dynamic properties that are saved (you can link to the glossary by writing ":term:`dynamic properties`").
Author
|
The PR is ready for review:
|
…Verify/Scenic into replay_simulations merging from cleanup fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a working PR that is not to be immediately merged. Feedback will be gathered and used in future commits.
The intention of this PR is to add the capability to "reconstitute" completed Scenarios, and be able to replay through the completed scenarios in a pythonic object. Additionally, new behaviors can be added to a ReplaySimulation object, and compared against the actions taken in the completed simulation.
This PR does not yet support the transitioning from a ReplaySimulation object to a Simulation object, for the purposes of "picking up where you left off" and resuming an in-progress simulation.
Additional questions:
Added fixes and changes to come.
@dfremont @ek65 let me know your feedback. Thanks!