Box2D Forums

It is currently Sun May 19, 2013 12:49 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Jul 11, 2012 8:54 am 
Offline

Joined: Tue Apr 03, 2012 12:00 pm
Posts: 14
Hi all,

I have been playing around with revolute Joints for a while to make a simulated walker for a human character and have been running into lot instabilities. Is there a way to limit the joint speed ? ( just like there's a limit to motor speed but I am using ApplyTorque on both the bodies connected to the revolute joint and don't want to use a joint motor since I don't know how to simulate a PD Controller with those ).

Thanks !
zedd4x


Top
 Profile  
 
PostPosted: Wed Jul 11, 2012 4:37 pm 
Offline

Joined: Tue Jun 24, 2008 8:25 pm
Posts: 1515
Location: Tokyo
Tricky. You could have a joint motor purely to apply a limiting torque. The motor would be disabled unless the joint was moving too fast, and then you could enable it with the speed you want and a very strong motor torque. This would have to be checked and adjusted every time step.
eg. if you want to limit it to 1 rad/s in either direction, when the joint speed is:

< -1, enable the joint motor and set the speed to -1
between -1 and 1, disable the joint motor
> 1, enable the motor and set the speed to 1

If you just need to apply a drag/braking kind of effect continuously, you could set the motor speed to zero and use low motor torque. You could also try setting some angular damping for the bodies themselves.


Top
 Profile  
 
PostPosted: Wed Jul 11, 2012 4:56 pm 
Offline

Joined: Tue Apr 03, 2012 12:00 pm
Posts: 14
Thanks man. This is exactly what I was discussing with my buddy just a while ago ! And I am already trying to implement this. Let's see how it goes. I already tried angular damping and that didn't really work out for me. I want pure PD controllers so I guess I wouldn't want to have a drag working all the time. ( well its not pure anymore if I use motors above a threshold speed but well that's the best I can do ). Thanks a lot for your suggestion. I will let you know how it went soon !

Cheers !
zedd4x


Top
 Profile  
 
PostPosted: Thu Jul 19, 2012 5:44 pm 
Offline

Joined: Tue Apr 03, 2012 12:00 pm
Posts: 14
So an update, none of this worked out for me. I ended up using a 4K resolution for the time step and bunch of other internal fixes to get this to work, but I have a little more stable simulation now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group