From: Paul K. <pki...@in...> - 2005-09-19 23:39:48
|
I got AMotor limits working in Euler Mode. To do so, I added the following definitions to the pyx file.... ParamLoStop3 = 512+0 ParamHiStop3 = 512+1 Then the following code successfully adds limits to a balljoint.... am = ode.AMotor(self.world) am.attach (body1, body2) am.setMode(ode.AMotorEuler) am.setAxis(0, 1, [1, 0, 0]) # Second parameter must be 1 am.setAxis(2, 2, [0, 0, 1]) # Second parameter must be 2 am.setParam(ode.ParamLoStop, xLo) am.setParam(ode.ParamHiStop, xHi) am.setParam(ode.ParamLoStop2, yLo) am.setParam(ode.ParamHiStop2, yHi) am.setParam(ode.ParamLoStop3, zLo) am.setParam(ode.ParamHiStop3, zHi) Converting this to UserMode resulted in the limits not working at all. I was unable to find the problem. My guess is that there is an issue with PyODE's AMotor.setNumAxes or setAngle, but I couldn't track it down. Using EulerMode rather than UserMode has 2 issues for me. 1) The joint must be creating with the bodies "unbent" (ie. No rotation), since you can't use setAngle, and 2) you can't create a limit between a body and the environment (well I couldn't work out how to do it anyway) since am.setAxis(2, 2, [0, 0, 1]) fails if the second body is the ode.environment. So if anyone works out how to get this working with EulerMode, I'd love to know how they did it. Paul -----Original Message----- From: pyo...@li... [mailto:pyo...@li...] On Behalf Of Chris Bainbridge Sent: Tuesday, 20 September 2005 2:27 AM To: pyo...@li... Subject: [Pyode-user] amotor with ball joint? Hi, Has anyone successfully got AMotors to work with universal or ball joints? According to the 2nd pyode tutorial, they won't work. But according to the ode manual, it should work, and some users of the ode mailing list have claimed to have it working. I notice that the ParamX3 definitions are missing from the pyode wrappers - is this deliberate? From my own tests, in User Mode I can't get the AMotor to do anything. In Euler mode only the 2nd axis control (ParamVel, ParamFMax2) seems to have any effect, the other axis controls don't do anything. Any ideas? Thanks, Chris ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Pyode-user mailing list Pyo...@li... https://lists.sourceforge.net/lists/listinfo/pyode-user |