Robot Programming languages

Hey Guys,

I have some projects that I would like to make a reality that some of you may see as far-fetched, but I would love some input. I am currently designing a 6 axis robotic arm that is 3d printable on any 3d printer and as -simple- as possible. There are tons of 3d printable robotic arms all over the internet but they seem either flimsy as hell, too expensive/complicated, or incomplete. There is a video online of a really nice looking robot that -appears- to be 6 axis, but in reality is only three axis. Here is the link. These guys also claim to give the 3d files for this robot but once you actually give them your email address and jump through a couple other hoops the files you get are clearly not for the robot shown in the video, and still only 3 axis. The documentation is also inaccurate and incomplete.

I would like the robot I am designing to have a reach of at least a couple of feet. It will probably be pretty slow, and will be driven by nema 17 stepper motors. I would like to be able to set up a garage style assembly line and have it be able to do useful work. Anyway, once I get this robot designed I need a way to control it and integrate it with my other stuff like a DIY CNC, conveyor belt, and all that other jazz. I just finished a masters' thesis that involved the development of a control method that lets you control a robot using a 7 dollar knock off arduino due with 5th order polynomials, which results in the prevention of infinite jerk spikes. I don't know if I will use this or a more simple 3rd order polynomial or trapezoidal velocity profile control method, but all of this aside I need a method of integrating everything.

I had the opportunity to work at Honda as a robotics engineer this past summer and saw how they do things. I worked with Fanuc robotic arms and learned how their programming language allows you to write a program for a robot to execute. This program integrates everything from taught points and inputs and outputs to vision systems. Obviously Fanuc has spent tons of money developing and perfecting all of this. My project is to be able to accomplish this with hobbyist hardware. Arduinos, maybe a cheap PLC, and stepper motor drivers instead of a $20,000+ giant control box. I want to be able to teach a robot program with timers, I/O, counters, logical statements, and the works. Does something like this already exist?

If not, does anyone have any suggestions as to how I should proceed? Any input is appreciated!

I'm not clear about how the system is expected to work. GCode would be a simple and commonplace way to define the movements. Programs like GRBL and Marlin take GCode and drive CNC systems.

What is different about what you want to do?

Do you want an alternative to GCode or do you want a very sophisticated system for translating GCode into smooth robot movements?

...R

Robin2:
I'm not clear about how the system is expected to work. GCode would be a simple and commonplace way to define the movements. Programs like GRBL and Marlin take GCode and drive CNC systems.

What is different about what you want to do?

Do you want an alternative to GCode or do you want a very sophisticated system for translating GCode into smooth robot movements?

...R

What would be ideal is a g code interpreter that (instead of just executing the list of moves and stopping) can incorporate logical statements and inputs/outputs. Along with being able to teach the points, instead of generating them from a slicing/CAM software.

Soronemus:
What would be ideal is a g code interpreter that (instead of just executing the list of moves and stopping) can incorporate logical statements and inputs/outputs.

Explain further.
No doubt you know what is in your head, but we don't.
Note that there was no mention of GCode in your Original Post even though there were lots of other words. Don't expect me to make more successful guesses.

Along with being able to teach the points, instead of generating them from a slicing/CAM software.

Explain further.

...R

Full Gcode has got conditional statements and loops in it. It is the cut down versions that do not.

Robin2:
Explain further.
No doubt you know what is in your head, but we don't.
Note that there was no mention of GCode in your Original Post even though there were lots of other words. Don't expect me to make more successful guesses.

Explain further.

...R

When working with industrial robotic arms, you come up with programs that it repeats over and over again like an arduino script. There are conditional statements, if, while, and the ability to jump around. As functions in this program you can create movements for the robot to execute. For example one line of code might tell the robot to move linearly from point A to point B at 100mm/s. You have to 'teach' the robot where these points are by jogging it to the points, and hitting a button that causes the robot to remember those locations.

You can also have the program use counters and other registers similar to an arduino script, say stacking boxes on a pallet 4x4x4 would have 3 registers that increment every time a box is palletized (1-4 for length, width, and height). You can check digital or analog inputs, or turn on/off digital/analog outputs connected to the robot through lines in this code as well.

Grbl does a great job of interpreting g code meant for 3d printing. It turns the g code commands into stepper motor motion that follows trapezoidal velocity profile trajectories. What I would like is a g code interpreter (or some other software?) that allows me to control a small robotic arm the same way Fanuc's programs do. Teach it points, write it a program to loop through, and do its job like industrial robots do, while not getting its motion commands from a CAM software, but through points that are 'taught' to the robot and specifications on how to execute the move (linear move, joint move, circular move).

I was hoping to find out if anything like this exists already, no need to re-invent the wheel. If it does not exist, suggestions on how to move forward or any other general advice. I think maybe an arduino library could be created that could do this. What do you guys think?

I am by no means an expert on GCode - I only have use for a small part of it. From what @Grumpy_Mike says it may have all the capability you need.

If not, it would not be difficult to figure out your own simple instruction set.

Whether you use GCode or something else it should be possible to use the robot to produce the instructions.

However I would do all of the complex programming on a PC and keep the code on the Arduino to the absolute minimum.

the same way Fanuc’s programs do

You seem to assume I know what that means. I don’t have a clue what Fanuc’s programs do. I may, once or twice, have seen photos of Fanuc machines.

My guess is that you are thinking about the project as a single entity when, in fact, it is maybe one hundred small pieces working together. Break your requirement down into small pieces and figure each one out separately. Later it will be time to join them together.

…R

Robin2:
I am by no means an expert on GCode - I only have use for a small part of it. From what @Grumpy_Mike says it may have all the capability you need.

If not, it would not be difficult to figure out your own simple instruction set.

Whether you use GCode or something else it should be possible to use the robot to produce the instructions.

However I would do all of the complex programming on a PC and keep the code on the Arduino to the absolute minimum.
You seem to assume I know what that means. I don't have a clue what Fanuc's programs do. I may, once or twice, have seen photos of Fanuc machines.

My guess is that you are thinking about the project as a single entity when, in fact, it is maybe one hundred small pieces working together. Break your requirement down into small pieces and figure each one out separately. Later it will be time to join them together.

...R

Sorry, by 'the same way Fanuc's programs so' I meant the same way most industrial robots do like I described. Repeating a code with taught movements, logic, and I/O.

The Arduino has a limited amount of memory for storing instructions. You can add a SD card to get more space.
BUT proper Gcode ( full implementation ) involves looping and storage.

I think the Arduino is not suited to your application.

Grumpy_Mike:
The Arduino has a limited amount of memory for storing instructions. You can add a SD card to get more space.
BUT proper Gcode ( full implementation ) involves looping and storage.

I think the Arduino is not suited to your application.

Would you suggest something else? If memory is the only issue I think it might not be as bad as you are saying. I am not wanting to store giant lists of g-code commands like the route for every single string of filament on a 3d printing job. I am wanting to remember a hand full of points for the robot to carry out its task. These robots would be for the purpose of constructing a very small scale manufacturing assembly line. The robot would be responsible for pick and place pretty much.

Also, I recently finished a thesis involving some pretty complex robot control exclusively through an arduino due. They are much faster and have tons of memory so I will probably stick with those. Although maybe not. Thank you for your advice by the way!

The Raspberry Pi has more memory than you will ever need, but Linux is not a real time operating system.
The Uno has only 2K of SRAM and 1K of EEPROM. If the points are known at compile time you can also put them in program memory.

I would stick with the Due.

Soronemus:
Would you suggest something else?

Yes.

A PC - perhaps a cheap laptop.

When you have it working it will be time to wonder about downsizing.

...R