Commit b81d5baa authored by David A.. Werner's avatar David A.. Werner
Browse files

Bugfix! First leg couldn't pull back

parent b15c0195
......@@ -253,7 +253,7 @@ class Manduca(object):
M_forwards = spring_forwards = damp_forwards = 0
# Compute the backward forces
if prev_idx > 0: # all but the first leg
if prev_idx >= 0: # all but the first leg
M_backwards = current_muscles[prev_idx]
spring_backwards = k*(pos[curr_idx] - pos[prev_idx] - L0)
damp_backwards = c*(vel[curr_idx] - vel[prev_idx])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment