Puma 560 simulation using pumakins

More
11 years 6 months ago #57670 by jstoquica
Good Day,

I think you have to read a Hal & Integrator manual, the key is in the Signal's HAL. I am currently working with a real Robotic Arm, and I got link 1 DOF of my Robotic Arm with Vismach simulation (PUMA 560). It's easy, but you must read a properly documentation. Regards.

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

More
11 years 6 months ago #57970 by robottom
Hi jstoquica,

sorry for my late reply. Thanks for your comments. Can you please give me some more hints where you would expect the issue or mismatch? To my best knowledge the Signal's HAL is basically caring about the definition of the signals and how they are wired up.
This part of the configuartion is the same for both kinematics modules I'm using. I just reuse all parts of the working configuration with the working kinematics (genserkins). I only exchanged the kinematics module to the simpler one (pumakins). Currently I don't see where the HAL signals could have an influence on this. The input/output for the kinematics is just the joint angles and the coordinates (depending on the direction of the kinematics: direct or inverse).
Maybe there is a mismatch with the home coordinates and home joint angles for the different modules - what do you think?

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

More
11 years 1 month ago - 11 years 1 month ago #62482 by jstoquica
Hi,

I dont klnow if you still need help about this topic. Anyway, this is like I did the link with vismach and one servomotor(with enconder and gecko drive). Only remember that the acis scale chages with the gear relation between motor and joint.
Code:
# core HAL config file for simulation - 6 axis # load RT modules loadrt genserkins loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]TRAJ_PERIOD num_joints=[TRAJ]AXES loadrt probe_parport loadrt hal_parport cfg="0x378 out " setp parport.0.reset-time 1000 loadrt stepgen step_type=0,0,0 addf parport.0.read base-thread addf stepgen.make-pulses base-thread addf parport.0.write base-thread addf parport.0.reset base-thread addf stepgen.capture-position servo-thread #addf motion-command-handler servo-thread #addf motion-controller servo-thread addf stepgen.update-freq servo-thread net spindle-cmd <= motion.spindle-speed-out net estop-out => parport.0.pin-01-out #sent the value in estop-out to pin-01 net xdir => parport.0.pin-02-out #sent the value in xdir to pin-02 net xstep => parport.0.pin-03-out #sent the value in xstep to pin-03 setp parport.0.pin-03-out-reset 1 net ydir => parport.0.pin-04-out #sent the value in ydir to pin-04 net ystep => parport.0.pin-05-out #sent the value in ystep to pin-05 setp parport.0.pin-05-out-reset 1 net zdir => parport.0.pin-06-out #sent the value in zdir to pin-06 net zstep => parport.0.pin-07-out #sent the value in zstep to pin-07 setp parport.0.pin-07-out-reset 1 setp stepgen.0.position-scale [AXIS_0]SCALE setp stepgen.0.steplen 1 setp stepgen.0.stepspace 0 setp stepgen.0.dirhold 15200 setp stepgen.0.dirsetup 15200 setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb net xstep <= stepgen.0.step net xdir <= stepgen.0.dir net xenable axis.0.amp-enable-out => stepgen.0.enable net estop-out <= iocontrol.0.user-enable-out net estop-out => iocontrol.0.emc-enable-in loadusr -W hal_manualtoolchange net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared # add motion controller functions to servo thread addf motion-command-handler servo-thread addf motion-controller servo-thread # create HAL signals for position commands from motion module net xpos-cmd <= axis.0.motor-pos-cmd net J1pos <= axis.1.motor-pos-cmd net J2pos <= axis.2.motor-pos-cmd net J3pos <= axis.3.motor-pos-cmd net J4pos <= axis.4.motor-pos-cmd net J5pos <= axis.5.motor-pos-cmd # loop position commands back to motion module feedback net xpos-fb => axis.0.motor-pos-fb net J1pos => axis.1.motor-pos-fb net J2pos => axis.2.motor-pos-fb net J3pos => axis.3.motor-pos-fb net J4pos => axis.4.motor-pos-fb net J5pos => axis.5.motor-pos-fb # estop loopback net estop-out iocontrol.0.user-enable-out iocontrol.0.emc-enable-in # create signals for tool loading loopback #net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared #net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed net tool-change iocontrol.0.tool-change net tool-changed iocontrol.0.tool-changed loadusr -W puma560gui setp genserkins.A-0 0 setp genserkins.A-1 0 setp genserkins.A-2 17 setp genserkins.A-3 0 setp genserkins.A-4 0 setp genserkins.A-5 0 setp genserkins.ALPHA-0 0 setp genserkins.ALPHA-1 1.570796326 setp genserkins.ALPHA-2 0 setp genserkins.ALPHA-3 1.570796326 setp genserkins.ALPHA-4 -1.570796326 setp genserkins.ALPHA-5 1.570796326 setp genserkins.D-0 26.45 setp genserkins.D-1 -5.5 setp genserkins.D-2 0 setp genserkins.D-3 17.05 setp genserkins.D-4 0 setp genserkins.D-5 2.2 loadrt scale count=6 addf scale.0 servo-thread addf scale.1 servo-thread addf scale.2 servo-thread addf scale.3 servo-thread addf scale.4 servo-thread addf scale.5 servo-thread #net J0pos scale.0.in net xpos-fb scale.0.in net J1pos scale.1.in net J2pos scale.2.in net J3pos scale.3.in net J4pos scale.4.in net J5pos scale.5.in setp scale.0.gain 1 setp scale.1.gain 1 setp scale.2.gain 1 setp scale.3.gain 1 setp scale.4.gain 1 setp scale.5.gain 1 net J0scaled scale.0.out puma560gui.joint1 net J1scaled scale.1.out puma560gui.joint2 net J2scaled scale.2.out puma560gui.joint3 net J3scaled scale.3.out puma560gui.joint4 net J4scaled scale.4.out puma560gui.joint5 net J5scaled scale.5.out puma560gui.joint6

Regards.
Last edit: 11 years 1 month ago by jstoquica.

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

More
11 years 1 month ago #62516 by robottom
Hi jstoquica,

thanks a lot for your reply. Still I need some help. In the meanwhile I have connected all the 6 axis of my Puma robot arm to the linuxcnc and this is basically working fine (my real robot arm and the simulation is running simultaneously). So I don't think that there is any issue with the HAL connections. I can control the robot with G-code commands. But my current issue is very similar to the original one:
When I do straight moves in the x- or y- direction the Puma in the simulation is doing a straight move and my Puma is slightly deviating from a straight line. Also the length of the move is not the same as indicated in the G1 command (e.g. a 800mm move is on the real Puma a 900mm move). Only a move in the z-directions seems to be correct (straight line and correct length - roughly measured).
I also checked the single joint controls in LinuxCNC and it seems that the settings for axis seems to be correct (gear relation, resolution of the encoder). There a 90 degree move is also a 90 degree on the puma.
I assume that there is either an issue with the genserkins calculation or the parameter set is no fitting with my Puma. I'm owning 3 Puma arms from different productions (an old brown one (I guess before 1985), a white one when the company was just taken over by Stäubli (end of 80th - I guess 1988) and a newer one that is slightly different in the construction (from 1992 - I guess one of the last models). From the dimensions they all seems to be the same (or very similar - hard to measure with normal measurement possibilities).
Since the x,y having issues while the z seems to work as intended it looks like the parameters for joint 1 might cause trouble. But I can't find the issue there. I took the same parameters as in your hal file (same as you can find nearly everwhere in the net).
Any hints you can give to find the root cause.

Many thanks, Thomas

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

More
11 years 1 month ago #62570 by andypugh

robottom wrote: When I do straight moves in the x- or y- direction the Puma in the simulation is doing a straight move and my Puma is slightly deviating from a straight line.


This probably indicates that the arm lengths of your robot are not _exactly_ the same as those in the kinematics and in the Vismach model.

Have you actually set the arm lengths in the HAL file? You set these as D2 and D4.
www.linuxcnc.org/docs/2.7/html/man/man9/kins.9.html

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

More
11 years 1 month ago #62633 by jstoquica
Hi,

I had similar error, with the X and Y axis, but my kinematics parameters are different, the homogeneous equations too. My solution was set "home" values for some axis and the vismach simulation was done.

In your case, I think that the values of DH parameters are different that original PUMA 560, because are different models. Look at the hal file and compare the values. The original parameters for PUMA 560 used at simulation are in the next site:

www.electronicsam.com/images/puma/pumaarm.jpg

Regards.

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

Time to create page: 0.136 seconds
Powered by Kunena Forum