Next step (excerpt from an email with mentor):
"The next step is to make stable "running" happen, and the way to do that involves a subtle change to the way you are computing the spring deflection. The most important change is that once the spring hits the ground, its tip never slides. At this point the spring's vector angle and length should be considered separately: the spring will apply a force along the direction it currently happens to be pointing, but this direction is ultimately determined by the COM's motion. You may also want to update the landing condition, because the bounce might begin and end at a different spring angle, and thus a different ball height. With those changes in place, the secret to SLIP running is to tune the initial velocity in x and y, as well as the free spring angle (after the spring leaves the ground, it magically returns to this "free spring angle" in preparation for the next landing). It's a delicate process, but tuning it by hand will give you an intuition about each of those critical parameters."
I worked on the code to change some things:
-make an "initialaxis" that is the initial position, in terms of r0 (relaxed length) and theta0 (the free angle)
I'm having issues with the stance phase condition, like what do I check? I've tried:
ball.pos.y < spring.axis.y
spring.pos.y < 0.1
Which seem to work sometimes.
Issues with spring force:
- spring displacement
Should I calculate this as a vector or as a scalar? Should it be always positive?
-spring force
k * spring.displacement [if spring displacement is a vector]
k * spring.displacement * norm(spring.axis) [if spring displacement is a scalar, norm(spring.axis) is a unit vector in the direction of the spring]
Some problems:
-if spring constant is not high enough weird stuff happens
-spring foot sometimes gets "stuck" at floor
-sometimes ball and spring shoot off in one direction
I was getting a lot of wonky stuff so I went back to the 1D bouncing that worked and managed to get rid of some of the "shooting" behavior.
Maybe it doesn't matter that my model only works sometimes?
No comments:
Post a Comment