Hi,<br>I would like to develop a bit the ODE plugin, especially in relation to torque and rotation methods. But I need a bit of help.<br>Everything related to movement use "PID" parameters. I really would like to know what are they, how they works and how the default values have been chosen.<br>
I tried to imagine how gain and derivative properties (PID_G and PID_D parameters) work, but there's really something I can't understand.<br>First: from what's written in ODEPrim.cs at lines 1626-1628 we can say <img title="%5Cnormalsize%5C%21%5Cvec%7Bv%7D_%7Btarget%7D%20%3D%20%5Cvec%7Bx%7D%20%5Ccdot%20%28G_%7BPID%7D%20-%20%5Ctau_%7BPID%7D%29%20%5Ccdot%20timestep.gif" alt="%5Cnormalsize%5C%21%5Cvec%7Bv%7D_%7Btarget%7D%20%3D%20%5Cvec%7Bx%7D%20%5Ccdot%20%28G_%7BPID%7D%20-%20%5Ctau_%7BPID%7D%29%20%5Ccdot%20timestep.gif" src="http://www.texify.com/img/%5Cnormalsize%5C%21%5Cvec%7Bv%7D_%7Btarget%7D%20%3D%20%5Cvec%7Bx%7D%20%5Ccdot%20%28G_%7BPID%7D%20-%20%5Ctau_%7BPID%7D%29%20%5Ccdot%20timestep.gif">.<br>
But in physics <img title="%5Cnormalsize%5C%21%5CDelta%20%5Cvec%7Bv%7D%20%3D%20%7B%20%5CDelta%20%5Cvec%7Bx%7D%20%5Cover%20%7B%5CDelta%20t%7D%20%7D.gif" alt="%5Cnormalsize%5C%21%5CDelta%20%5Cvec%7Bv%7D%20%3D%20%7B%20%5CDelta%20%5Cvec%7Bx%7D%20%5Cover%20%7B%5CDelta%20t%7D%20%7D.gif" src="http://www.texify.com/img/%5Cnormalsize%5C%21%5CDelta%20%5Cvec%7Bv%7D%20%3D%20%7B%20%5CDelta%20%5Cvec%7Bx%7D%20%5Cover%20%7B%5CDelta%20t%7D%20%7D.gif">... If timestep is a time variable it would be true that <img title="%5Cnormalsize%5C%21%5BG_%7BPID%7D%5D%20%3D%20%5B%5Ctau_%7BPID%7D%5D%20%3D%20%5Bs%5D%5E%7B-2%7D%20%3D%20%5BHz%5D%5E2.gif" alt="%5Cnormalsize%5C%21%5BG_%7BPID%7D%5D%20%3D%20%5B%5Ctau_%7BPID%7D%5D%20%3D%20%5Bs%5D%5E%7B-2%7D%20%3D%20%5BHz%5D%5E2.gif" src="http://www.texify.com/img/%5Cnormalsize%5C%21%5BG_%7BPID%7D%5D%20%3D%20%5B%5Ctau_%7BPID%7D%5D%20%3D%20%5Bs%5D%5E%7B-2%7D%20%3D%20%5BHz%5D%5E2.gif">.. and that would be quite strange. That's because I need some help understanding this code.<br>
In the same file at lines 1656-1661 we will find that <img title="%5Cnormalsize%5C%21%5Cvec%7BF%7D%20%3D%20%28%20%5Cvec%7Bv%7D_%7Btarget%7D%20-%20%5Cvec%7Bv%7D%20%29%20%5Ccdot%20D_%7BPID%7D.gif" alt="%5Cnormalsize%5C%21%5Cvec%7BF%7D%20%3D%20%28%20%5Cvec%7Bv%7D_%7Btarget%7D%20-%20%5Cvec%7Bv%7D%20%29%20%5Ccdot%20D_%7BPID%7D.gif" src="http://www.texify.com/img/%5Cnormalsize%5C%21%5Cvec%7BF%7D%20%3D%20%28%20%5Cvec%7Bv%7D_%7Btarget%7D%20-%20%5Cvec%7Bv%7D%20%29%20%5Ccdot%20D_%7BPID%7D.gif">. The value will be changed again at lines 1748-1754, becoming <img title="%5Cnormalsize%5C%21%5Cvec%7BF%7D%20%3D%20%5Cvec%7BF%7D_0%20%2B%20%28%20%5Cvec%7Bv%7D_%7Btarget%7D%20-%20%5Cvec%7Bv%7D%20%29%20%5Ccdot%20D_%7BPID%7D%20%5Ccdot%20m.gif" alt="%5Cnormalsize%5C%21%5Cvec%7BF%7D%20%3D%20%5Cvec%7BF%7D_0%20%2B%20%28%20%5Cvec%7Bv%7D_%7Btarget%7D%20-%20%5Cvec%7Bv%7D%20%29%20%5Ccdot%20D_%7BPID%7D%20%5Ccdot%20m.gif" src="http://www.texify.com/img/%5Cnormalsize%5C%21%5Cvec%7BF%7D%20%3D%20%5Cvec%7BF%7D_0%20%2B%20%28%20%5Cvec%7Bv%7D_%7Btarget%7D%20-%20%5Cvec%7Bv%7D%20%29%20%5Ccdot%20D_%7BPID%7D%20%5Ccdot%20m.gif">.<br>
Again, we know that <img title="%5Cnormalsize%5C%21%5Cvec%7BF%7D%20%3D%20m%20%5Ccdot%20%5Cvec%7Ba%7D%20%3D%20%20m%20%5Ccdot%20%7B%20%7B%20%5CDelta%20%5Cvec%7Bv%7D%20%7D%20%5Cover%20%7B%20%5CDelta%20t%20%7D%20%7D.gif" alt="%5Cnormalsize%5C%21%5Cvec%7BF%7D%20%3D%20m%20%5Ccdot%20%5Cvec%7Ba%7D%20%3D%20%20m%20%5Ccdot%20%7B%20%7B%20%5CDelta%20%5Cvec%7Bv%7D%20%7D%20%5Cover%20%7B%20%5CDelta%20t%20%7D%20%7D.gif" src="http://www.texify.com/img/%5Cnormalsize%5C%21%5Cvec%7BF%7D%20%3D%20m%20%5Ccdot%20%5Cvec%7Ba%7D%20%3D%20%20m%20%5Ccdot%20%7B%20%7B%20%5CDelta%20%5Cvec%7Bv%7D%20%7D%20%5Cover%20%7B%20%5CDelta%20t%20%7D%20%7D.gif">, so it would bring to the dimensional equation <img title="%5Cnormalsize%5C%21%5BD_%7BPID%7D%5D%20%3D%20%5Bs%5D%5E%7B-1%7D%20%3D%20%5BHz%5D.gif" alt="%5Cnormalsize%5C%21%5BD_%7BPID%7D%5D%20%3D%20%5Bs%5D%5E%7B-1%7D%20%3D%20%5BHz%5D.gif" src="http://www.texify.com/img/%5Cnormalsize%5C%21%5BD_%7BPID%7D%5D%20%3D%20%5Bs%5D%5E%7B-1%7D%20%3D%20%5BHz%5D.gif">.<br>
I'm not saying that's wrong... try taking a cube and push it inside opensim... it works!<br>The problem is that I can't implement anything related to rotations since I can't understand what's behind these parameters...<br>
<br>Thanks for you support.<br>-- dodomorandi<br>