2017-03-02 18:01 GMT+02:00 Charles Steinkuehler: > Hmm...I see your point, but commanding an AB orientation in world > space via gcode would then require knowing the position of the first > joint (the base rotation of the whole arm), which is generated from > the commanded position via kinematics. In the simple Puma-like serial > arm I'm working with this might be possible, but in other > arrangements (where more than one axis is rotating around world Z) > there are multiple valid solutions, so you can't really infer exact > joint positions from the gcode. > > This really feels like something that either needs to be handled in > the machine kinematics, or the gcode needs to be directly controlling > the joints (pushing the kinematics off to the CAM system) unless I'm > missing something. >
RIght, this task is not for a CAM. Unless it's a specific CAM for robots (not even sure, I have no experience with any or them). > > Any pointers for how to do this? I haven't gotten very far through > the "gomath" library yet, which is where most of the fun stuff seems > to be happening... > I looked to genserkins, and generally I see how it works. It computes genser_kin_fwd from DH parameters and joint values (using gomath lib) and passes it to kinematics_forward. Kinematics_inverse is more complicated. It builds a forward jacobian in compute_jfwd and then compute_jinv inverts it (oh, I just learned that gomath has go_matrix_inv but genhexkins has its own function for that, should try using gomath there). Then inverse kins is iterated. This is a common approach, pretty simple and reliable... unless the iterations fail, or matrix inverse fails :) (pumakins uses different approach, it calculates forward and inverse kins from equations for that particular robot type). What this means for genserkins: everything is defined in genser_kin_fwd. Tweaking it will tweak both forward and inverse kins. OK, first it uses go_link_joint_set for each joint and then go_link_pose_build to get the robot pose... which uses go_pose_pose_mult to build the pose from the first to the last joint. So from the first look it seems that this method should output world AB coordinates. Or it might output angles between the last pair of links? Well now one just needs to figure it out... I'm not particularly good with quaternions, which is exactly what is used in go_quat_quat_mult to calculate pose.rot. Best regards, Andrew ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users