Providing a template class for Simulations #620
Replies: 3 comments 1 reply
-
I have also recently started using Warp, and I found your idea very helpful. It was a struggle for me in the first 2-3 weeks getting used to the syntaxes as a freshman. Having a template class with some explaination would definitely help ones avoid spending so much time figuring out how to write a proper simulation class. |
Beta Was this translation helpful? Give feedback.
-
I can share this version for now -- not sure if it works out of the box as I had to copy-past a couple of dependencies. Let me know if anything's missing:
|
Beta Was this translation helpful? Give feedback.
-
For future reference: The rewarped environment could also be a great starting point. Looks amazing at first sight Code: https://github.com/rewarped/rewarped/blob/main/rewarped/environment.py |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I have started working with warp a couple months ago, and I remember that in the beginning, setting up just the framework of a simulation has already been a significant hurdle. I believe this effort can be reduced by providing a template class for simulations.
What do I mean by that? A lot of simulations share a similar pattern:
While some simulations may deviate from this pattern, I noticed that I was writing a lot of duplicate code in the beginning. I ended up writing a
WarpSimulation
template class for rigid body simulations that formalizes steps 2-9 from the above structure and a bit more.I would be happy to share that code if there's interest in adding something like that to the warp codebase, but I could not spend a significant amount of time on extending or maintaining it for a longer time. Do you see the benefit of such a template class, or is this intentionally not provided?
Beta Was this translation helpful? Give feedback.
All reactions