It is currently May 19th, 2013, 5:27 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Rotating IDynamicActor to a specific angle
PostPosted: July 29th, 2010, 10:59 pm 
Offline
3D Simulation Rookie
3D Simulation Rookie

Joined: June 8th, 2010, 2:52 pm
Posts: 7
I've created a robot in the engine by piecing it together in the engine and connecting the parts via HingeJointDescriptors.

I want to get a smooth joint trajectory using the LSPB method. I have to apply a torque to the axis of rotation to actually get the joint to move. I multiply by an arbitrary offset value to increase the velocity enough to move the joint. To get it to stop I find the current angular velocity then apply a torque equal to the joint mass * the negative of the angular velocity vector. This somewhat works, but there is a degree of error involved.

is there an easier way to move and stop the joint? Ideally, I want to say "move to this angle" [angle here].


Top
 Profile  
 
 Post subject: Re: Rotating IDynamicActor to a specific angle
PostPosted: July 30th, 2010, 8:46 am 
Offline
SimplySim Team
SimplySim Team
User avatar

Joined: December 11th, 2008, 7:39 pm
Posts: 118
Hello,

A classic way to perform this task in robotics is a PID controller
http://en.wikipedia.org/wiki/PID_controller
Basically, the power commands sent to a motor is proportional to the angle error.

In the beta, we have provided a "DriveJoint" that simulates a motor (a HingeJoint with a TargetVelocity field).
Unfortunately, you can't read the current "angle" value on this joint.

In the release, we have removed the DriveJoint and added a MotorizedHingeJoint and a MotorizedSliderJoint where you can both set a target velocity and read the current joint position.

You can still use PID controllers with the beta but you have to write some code to calculate the angle between the two actors moved by the joint (by using their world matrix).

Regards,
Vincent

_________________
Vincent Maurin
CTO
SimplySim


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group. Color scheme by ColorizeIt!