Skip to content

Commit

Permalink
3D robot
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanming-hu committed Sep 25, 2019
1 parent 5206e60 commit 3429ddf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions examples/diffmpm3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
# TODO: update
mu = E
la = E
max_steps = 1024
steps = 1024
gravity = 3.8
max_steps = 512
steps = 512
gravity = 2
target = [0.8, 0.2, 0.2]
use_apic = False

Expand Down Expand Up @@ -393,7 +393,7 @@ def add_leg(x, y, z):
for i in range(4):
add_leg(i // 2 * block_size * 2, 0.0, i % 2 * block_size * 2)
for i in range(3):
scene.add_rect(block_size * i, 0, block_size, block_size, block_size, block_size, -1, 1)
scene.add_rect(block_size * i, 0, block_size, block_size * 0.7, block_size, block_size, -1, 1)
scene.set_offset(0.1, 0.03, 0.3)
# scene.add_rect(0.0, 0.0, 0.0, 0.6, 0.04, 0.6, -1, 0)
# scene.
Expand Down Expand Up @@ -430,7 +430,7 @@ def main():
loss.grad[None] = 1
backward()
print('i=', iter, 'loss=', l)
learning_rate = 3
learning_rate = 10

for i in range(n_actuators):
for j in range(n_sin_waves):
Expand Down
2 changes: 1 addition & 1 deletion examples/render_diffmpm3d.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os

for i in range(7, 1024, 8):
for i in range(7, 512, 8):
os.system('python3 diffmpm_renderer.py snow 0090 {}'.format(i))

0 comments on commit 3429ddf

Please sign in to comment.