How to control robot directly in joint space while using G code or other?

More
03 Oct 2017 06:12 #99802 by Zazakas
I mean there is increasing people using linuxcnc to control robot,
but according to my knowledge there is no programming interface
to control robot in joint space. Instrucions like
MOVJ ( VEL JOINT1_DES_POS JOINT2_DES_POS ....)。
Now in emccanon.cc I added one rather awful instruction :
void MOVJ(int line_number,
    double vel,
    double j0, double j1, double j2, 
    double j3, double j4, double j5,
    double u, double v)
{

EMC_JOG_ABS absjogj0;
//EMC_JOG_CONT cont;
absjogj0.joint_or_axis = 0;
absjogj0.vel = vel;
absjogj0.jjogmode = 1;
absjogj0.pos = j0;

EMC_JOG_ABS absjogj1;
//EMC_JOG_CONT cont;
absjogj1.joint_or_axis = 1;
absjogj1.vel = vel;
absjogj1.jjogmode = 1;
absjogj1.pos = j1;

EMC_JOG_ABS absjogj2;
//EMC_JOG_CONT cont;
absjogj2.joint_or_axis = 2;
absjogj2.vel = vel;
absjogj2.jjogmode = 1;
absjogj2.pos = j2;

EMC_JOG_ABS absjogj3;
//EMC_JOG_CONT cont;
absjogj3.joint_or_axis = 3;
absjogj3.vel = vel;
absjogj3.jjogmode = 1;
absjogj3.pos = j3;

EMC_JOG_ABS absjogj4;
//EMC_JOG_CONT cont;
absjogj4.joint_or_axis = 4;
absjogj4.vel = vel;
absjogj4.jjogmode = 1;
absjogj4.pos = j4;

EMC_JOG_ABS absjogj5;
//EMC_JOG_CONT cont;
absjogj5.joint_or_axis = 5;
absjogj5.vel = vel;
absjogj5.jjogmode = 1;
absjogj5.pos = j5;

EMC_TRAJ_SET_TELEOP_ENABLE jogenable;
jogenable.enable=0;

flush_segments();
interp_list.append(jogenable);
interp_list.append(absjogj0);
interp_list.append(absjogj1);
interp_list.append(absjogj2);
interp_list.append(absjogj3);
interp_list.append(absjogj4);
interp_list.append(absjogj5);
EMC_TRAJ_SET_TELEOP_ENABLE jogdisable;
jogdisable.enable=1;
interp_list.append(jogdisable);


}

it works badlly, because the jogdisable msg will disrupt the jog process. However if not added the jogdisable msg, the next line gcode will not proceed because we are in jog mode now.

Please Log in or Create an account to join the conversation.

More
03 Oct 2017 22:55 #99877 by andypugh
A more elegant way might be to use the inverse kins to send a new _world_ position.
(or do I mean forwards kins :-)

Please Log in or Create an account to join the conversation.

More
04 Oct 2017 01:00 #99883 by Zazakas
Yes, it's forward kins. This need some adittional computation, and I am kind of wanna make it more nature.

Please Log in or Create an account to join the conversation.

More
05 Oct 2017 11:55 #99954 by andypugh
You probably need to discuss this on the developers mailing list.
This forum is more biased towards user support.

Please Log in or Create an account to join the conversation.

More
06 Oct 2017 11:40 #99992 by bkt

I mean there is increasing people using linuxcnc to control robot,

MOVJ ( VEL JOINT1_DES_POS JOINT2_DES_POS ....)。
.


although I was interested in robots, unfortunately I could not make great experiences with those. So I'm not able to understand your request scope. Could you explain the reasons for your request?
JOINT1_DES_POS in degree/rad? .... and in case of robot with 8 joint these is useful? insert in kins some switch with Joint condition for execute world coord isn't better? Why these? for a sort of position self-learning? Or only for to have pure joint position command in g-code? I really curious about these things.

regards
Giorgio

Please Log in or Create an account to join the conversation.

More
06 Oct 2017 12:13 - 06 Oct 2017 12:17 #99996 by Zazakas
1 Degree and rad are both okay
2 8 joints robot is very rare . Most industrial robots have 6 joints.

3 " insert in kins some switch with Joint condition for execute world coord isn't better? " I do not fully understand this.
Now in linuxcnc we have :
mode space
freemode joint space
teleop Cartesian
Coodr Cartesian

but free mode the joints are move independently. In ideal "MOVJ" mode the joints movement may have a same time constraint.

4 Why need this ? Actually I haven't think about it throughly. However most robot manufacures like Fanuc ABB Kuka and so on provide this kind of function.
I think the reasons could be:
1 move in joint space is easier, no need of kinematics. It can avoid some singularity problems.
2 When using robot, the user cares about efficiency , movj maybe easier faster and more firendly , Robot don't always need to move a line or a circle . Take the "pick and place" task for example , user only care about the final pos.
3 Most robot programming using method like " teach and replay" .This is basicly MOVJ command.

regards
Last edit: 06 Oct 2017 12:17 by Zazakas.

Please Log in or Create an account to join the conversation.

More
09 Oct 2017 19:36 #100126 by bkt
I undestand your ideas I think is good.

Any how, delta pik & place demonstrative projec can use only final pos in their task .... but in real application is very rare that you can use these way to do the things. Using video targhet capture also.

But for insert some piece and leave it from a late with 6 axis robot, MOVJ approach is more simple for approx positioning ... after these you need more precision teleop/world coord Gcode. SO I think the best was a mixed MOVJ and world coord driving system.

i try to implement your code for my scara.

giorgio

Please Log in or Create an account to join the conversation.

Time to create page: 0.114 seconds
Powered by Kunena Forum