Skip to content

Commit

Permalink
review: remove aba and just use v
Browse files Browse the repository at this point in the history
  • Loading branch information
fabinsch committed Feb 2, 2024
1 parent b8cf42f commit 1807fb2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions examples/floating-base-velocity-viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,10 @@ def pin_step(model, vizer, v_index_increment, dt = 0.1, enable_gravity=True):

sleep(1)

a = pin.aba(model, data, q, v, tau)
v_next = v + a * dt
q_next = pin.integrate(model, q, v_next * dt)
q_next = pin.integrate(model, q, v * dt)

print(f"{a=}, {q_next=}, {v_next=}")
return q_next, v_next
print(f"{q_next=}")
return q_next


if __name__ == "__main__":
Expand All @@ -86,7 +84,7 @@ def pin_step(model, vizer, v_index_increment, dt = 0.1, enable_gravity=True):

for i in range(model.nv):
print(f"v[{i}] += 1")
q_next, v_next = pin_step(model, vizer, i, dt=0.2, enable_gravity=False)
q_next = pin_step(model, vizer, i, dt=0.2, enable_gravity=False)
vizer.display(q_next)
sleep(2)

0 comments on commit 1807fb2

Please sign in to comment.