You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+16-4
Original file line number
Diff line number
Diff line change
@@ -19,13 +19,25 @@ We envision our model as a platform for fruit fly biophysics simulations and for
19
19
20
20
The fruit fly body model lives in [this directory][fly-home]. To visualize it, you can drag-and-drop `fruitfly.xml` or `floor.xml` to MuJoCo's `simulate` viewer.
21
21
22
-
Beginning interacting with the model via Python is as simple as:
22
+
Interacting with the fly via Python is as simple as:
# Run environment loop with random actions for a bit.
34
+
for _ inrange(100):
35
+
action = np.random.normal(size=59) # 59 is the walking action dimension.
36
+
timestep = env.step(action)
37
+
38
+
# Generate a pretty image.
39
+
pixels = env.physics.render(camera_id=1)
40
+
mediapy.show_image(pixels)
29
41
```
30
42
31
43
The quickest way to get started with `flybody` is to take a look at a [tutorial notebook][tutorial] or [][tutorial-colab].
0 commit comments