KDL - Calculation of Dynamics - how to integrate frame taking Torque into account
Submitted by niebieski222 on Sat, 2013-10-12 21:00 |
In KDL package there is a nice example how to use KDL - namely -
kukaLWRtestDHnew.cpp
Most of this example seems clear:
Chain kLWR=KukaLWR_DHnew();
JntArray q(kLWR.getNrOfJoints());
JntArray qdot(kLWR.getNrOfJoints());
JntArray qdotdot(kLWR.getNrOfJoints());
JntArray tau(kLWR.getNrOfJoints());
Wrenches f(kLWR.getNrOfSegments());
Frame T;
int errorInputs = getInputs(q, qdot,qdotdot,linenum);
ChainIdSolver_RNE idsolver(kLWR,Vector(0.0,0.0,-9.81));
idsolver.CartToJnt(q,qdot,qdotdot,f,tau);
The *idsolver* object (*ChainIdSolver_RNE* class) should calculate Torques
originating from gravity force acting on segments.
How to incorporate these Tau Torques to the chain and integrate whole chain
by new deltaTime?
At http://www.orocos.org/kdl/usermanual/geometric-primitives#toc39 - I've
found that next time frame can be calculated by command:
F_w_B = F_w_A.addDelta(t,timestep)//integration
Where the F_w_a, F_w_B are frames, t is an array of twists (angular
and linear velocities of segments) and timestep is delaTime [s].
But this integration looks like it is purely kinematic - it would not
take Torques Tau acting upon segments into account.
How to do it ? How to calculate new positions of segments/chain in
deltaTime seconds later taking Torques into account?
Really requiring a helping hand
Conrad