erwincoumans / tiny-differentiable-simulator

Tiny Differentiable Simulator is a header-only C++ and CUDA physics library for reinforcement learning and robotics with zero dependencies.
Apache License 2.0
1.24k stars 130 forks source link

added OpenGl viewer example in python #173

Closed vittorione94 closed 2 years ago

vittorione94 commented 3 years ago

Python example that uses OpenGL visualizer. The example loads the Laikago model, simulate physics with gravity and collides with the floor.

google-cla[bot] commented 3 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

vittorione94 commented 3 years ago

@googlebot I signed it!

erwincoumans commented 3 years ago

Thanks for the contribution. What do the changes to C++, get_sim_state and pause/reset sim etc do? If they just store state, can it be done in Python? Did we expose keyboard events in Python?

vittorione94 commented 3 years ago

Thanks for the reply :) you're totally right get_sim_state is just storing a state. I think it would be much neater done in Python, like checking if the key has been pressed instead of querying the window for the current state. However, I don't think keyboard events have been exposed in Python and I'm not sure what would be the best way of exposing them.

erwincoumans commented 2 years ago

closing for now, will consider exposing better UI capabilities in a different way.