I’m trying to retrieve each individual joint angle from a jointtarget data, which is off the form:
jpos:=[[-10, 80,-30, 20, 0, 0] , [9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
How do I address these values to a variable? For instance I want to assign each of the joint angle data to different variables like;
q1=-10;
q2=80;
q3=-30;
q4=20;
q5=0;
q6=0.
Hi Gianluigi,
To retrieve the elements from the jointtarget is not hard at all.
We know the structure of a jointtarget is of the form;
< dataobject of jointtarget >
< robax of robjoint >
<rax_1 of num >
<rax_2 of num >
<rax_3 of num >
<rax_4 of num >
<rax_5 of num >
<rax_6 of num >
< extax of extjoint >
< eax_a of num >
< eax_b of num >
< eax_c of num >
< eax_d of num >
< eax_e of num >
< eax_f of num >
Thus, to get the angles of robot axes from jPosCurrent…
PERS jointtarget jPosCurrent;
PERS num J1;
PERS num J2;
PERS num J3;
PERS num J4;
PERS num J5;
PERS num J6;