From 9ae7e2b2b7692ad33595ed586c09dd16558cc601 Mon Sep 17 00:00:00 2001 From: Fabian Schramm <55981657+fabinsch@users.noreply.github.com> Date: Fri, 2 Feb 2024 11:04:57 +0100 Subject: [PATCH] review: remove aba and just use v --- examples/floating-base-velocity-viewer.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/examples/floating-base-velocity-viewer.py b/examples/floating-base-velocity-viewer.py index c1c8da9510..fac49a5ecb 100644 --- a/examples/floating-base-velocity-viewer.py +++ b/examples/floating-base-velocity-viewer.py @@ -43,9 +43,6 @@ def pin_step(model, vizer, v_index_increment, dt = 0.1, enable_gravity=True): if not enable_gravity: model.gravity.setZero() - data = model.createData() - - tau = np.zeros(model.nv) q = pin.neutral(model) v = np.zeros(model.nv) v[v_index_increment] += 1. @@ -55,12 +52,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__": @@ -86,7 +81,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)