How To add robot arm model into linuxCNC

More
04 May 2018 16:35 #110214 by AnjaBird.AKB
Please any one can tell me how to add a robot arm model in to linuxCNC workspace and how to simulate it and how to control it using linuxcnc,is there any robot arm model available in anywhere in Internet with working code??

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

More
09 May 2018 21:23 #110454 by andypugh
You already have one on your LinuxCNC machine.

Open the config-picker and go to:
sim->axis->vismach->puma

Screenshot (Puma560)

Attachments:

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

More
10 May 2018 08:07 #110496 by AnjaBird.AKB
thank you so much,but my arm is a 6axis one,i think this is a 4 or 5 axis one,how can i get a code for this robot,??

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

More
10 May 2018 08:54 #110497 by andypugh
It's a 6-axis. There are joints 0 to 5.

There are other robot models in the same section of the config picker.

Once you open the config from the config picker all the files will be copied into your LinuxCNC configs folder (I think).

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

More
10 May 2018 15:37 - 10 May 2018 15:38 #110522 by Wireline
Hi AnjaBird.AKB

If you can get the CAD models of your robot and work out (or find) the denavit hartenberg parameters, then it is possible to get a 6dof arm running in the simulator. Most robot manufacturers seem to have links to CAD for their current robots. You can use the genserkins kinematics module to compute the inverse kinematics thereafter. You may or may not need to recompile the genserkins modules after editing the parameters, but Andy said its possible to just manage this from within the HAL file. I need to experiment with that!

If you go and look in the advanced configuration sub-forum, you will see some of the work I have been doing. Bearing in mind I am in the process of learning too, feel free to ask any questions you might have.

Things to bear in mind:
  1. Check out some basic videos and guides online to understand some of the linuxcnc basics, such as HAL files, ini files and vismach gui files.
  2. Learning Denavit Hartenberg parameters can be difficult, but if you already know how to do this that will be easier. I can point you to some online books if you need any literature.
  3. Use the PUMA560 files as a basis for your bot, a lot of work is already done for you.

It is quite a time consuming process and a lot of trial and error, so if you just want to play with a bot in sim then I would advise to just experiment with the PUMA as Andy mentioned.
Last edit: 10 May 2018 15:38 by Wireline.

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

More
10 May 2018 15:58 #110523 by andypugh
The Vismach model will work without the DH parameters, as it just accepts the joint angles.
Motion in cartesian space will not be straight lines if the parameters are wrong, which is what makes it a good test environment.

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

More
10 May 2018 17:18 #110525 by Wireline
Cheers Andy, that's good to know.

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

More
10 May 2018 20:34 #110542 by AnjaBird.AKB
Thank you so much,i will try with those instructions.

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

More
12 May 2018 20:25 - 12 May 2018 22:08 #110618 by Wireline
Hi AnjaBird.AKB

I received your email. I thought it would be better to reply in the forum so that others can make use of it and contribute too.

To get the robot model into vismach and linuxcnc isn't a trivial task and involved quite a bit of trial and error. The basic steps are:

1. You need to convert your CAD files into ASCII stl. There are free sites available online that will let you upload them and they will convert. This is important for the next step, which utlises this format.

2. You need to create a vismach python script. In a run-in-place build / developer build, If you search in
linuxcnc-dev/bin
you will find a file called puma560gui. Use this as your basis for your new script and then use the instructions here wiki.linuxcnc.org/cgi-bin/wiki.pl?Vismach
or here linuxcnc.org/docs/html/gui/vismach.html .

3. Similarly you will need to create a .hal and ini file. If you look in
linuxcnc-dev/config/sim/axis/vismach/puma
again you can use the puma one as a starting point.

4. Watch this video for an understanding of HAL


5. Observe the file structure and included files for the PUMA bot and try to replicate it for your own bot. Note that .var files seem to autogenerate so you probably don't need to make one of them. For more info, see this topic forum.linuxcnc.org/10-advanced-configura...in-the-config-picker

6. If you do not have Denavit Hartenberg parameters for your robot, and you do not know how to find them, then check out this pdf

www.researchgate.net/.../Spong+-+Robot+modeling+and+Control.pdf

and this video



This is a big undertaking. The DH parameters need to go in the hal file (see the parts labeled A, ALPHA and D in the puma560 hal file). These parameters are needed for the genserkins module to properly find the inverse kinematic solutions. This is effectively saying "ok I want my tool to be at x, y and z - which joint angles will satisfy that?". Genserkins shields you from the heavy matrix maths but you still need the DH parameters, which describe the physical setup of the robot.

The process is very much trial and error, especially when it comes to getting the positions of your CAD models right. In solidworks, make the origin be the underside centre of your robot base. Then If you can export them from solidworks in their correct positions relative to that origin, their starting positions will be correct in vismach. This however is only part of the story because when you use HALRotate to define the rotational axis, it takes the origin as the point to define that axis. You need to cleverly use the *collection* command to offset the axes back to where they need to be. Again observe how its done for the PUMA - you will see comments about moving, and then moving back, certain parts after a "collection" command.

Take it slow and anticipate spending a lot of time and having stuff not work.
Last edit: 12 May 2018 22:08 by Wireline.
The following user(s) said Thank You: thefabricator03

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

More
18 May 2018 06:05 #110833 by AnjaBird.AKB
  • Attachment not found

    Attachment not found


when i press the blue circled button, robot arm goes like that.why is that? how can i fixed this? do i need to change any thing??

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

Time to create page: 0.300 seconds
Powered by Kunena Forum