hi all,
i have read the source in the get_pos_cmds() function in control.c,and i think
the solution in EMCMOT_MOTION_FREE should be
vel_req = -max_dv + sqrt(2.0 * joint->acc_limit * pos_err +2.0* max_dv *
max_dv);
other than the original
vel_req = -max_dv + sqrt(2.0 * joint->acc_limit * pos_err + max_dv * max_dv);
let current vel be vk,next vel be vreq, the velocity increment be max_dv;T be
sample period,
so vk=vreq-maxdv,the distance between the two samples should be:
s1=(vk+vreq)/2*T
assume the acc_limit is fulfills,then
vk+max_dv=vreq ,then vk=vreq-max_dv
and from "max_dv=acc_limit*T" gets,
T=max_dv/acc_limit
so s1 can be calculated with
s1=(vreq-maxdv+vreq)/2*T=(vreq-maxdv+vreq)/2*max_dv/acc_limit.
the another distance when from vreq to decelerate to zero with acc_limit :
s2=vreq^2/(2*acc_limit) ;
the 2 distance sum together should be pos_err:
s1+s2=poserr
=>
(vreq-maxdv+vreq)/2*max_dv/acc_limit+vreq^2/(2*acc_limit)=pos_err,
solve above eqution to get the vel_req.
vel_req = -max_dv + sqrt(2.0 * joint->acc_limit * pos_err +2.0* max_dv *
max_dv);
it is right?
zhangj73
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers