micander / atrias

Automatically exported from code.google.com/p/atrias
0 stars 0 forks source link

"disable" doesn't stop hip motor #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sometimes, after running leg-position controller, the hip actuator continues to 
move.

E-Stop stops it.  Still scary.

Original issue reported on code.google.com by Christia...@gmail.com on 12 Feb 2012 at 10:51

GoogleCodeExporter commented 9 years ago
I think I might have found the source of this problem, I've corrected it, but 
as we don't have a way of reproducing the problem, so I can't be sure it's gone.

I think the cause of the problem is that the controller output data does not 
get cleared before calling the controller function. The controller output is 
stored in a large circular buffer in the shared memory. Because shared memory 
is managed by the rt_shm kernel module, the buffer is only reallocated when the 
computer is restarted. Once the buffer position wraps around, the old commanded 
torques will still be in the output buffer. If the controller is disabled, the 
old torques would not get reset to zero so it would start commanding the old 
torques of the motor.

I fixed this problem by resetting the output torques before calling the 
controller update function. This way when it ensures that if no controller is 
running, torques of zero will always be commanded. I think this should fix the 
problem, but I have no way of testing it. So will just have to run the robot 
and see if the problem comes back.

Original comment by kit...@gmail.com on 2 Mar 2012 at 9:49

GoogleCodeExporter commented 9 years ago

Original comment by kit...@gmail.com on 2 Apr 2012 at 9:43