Modify path target coordinates from app
Hello everyone!
Situation:
I have path from curve, consisting of targets. As you know - robot will follow that path, but it's constant.
Idea:
I want to send point from app, where robot starts to execute the path. For example if I recorded path from curve on upper left corner of work space, I could tell it to execute same path, but on bottom right corner this time.
Whole idea is to give robot ink pen and tell it to draw. Problem is - I want it to draw letters, so it's very important to be able to tell it what exactly (letters) and in what order.
Is this even possible?
Sisiander2012-04-29 16:53:06
0
Comments
-
Yes it is possible. Difficult, but possible.Regarding starting from the other end, there you have reverse of the path. If a reverse is not enought then you need to modify the curve itself. There are plenty of functions to do that in the RobotStudio SDK. You can cut it, join, splice etc.But first is this robot going to print letters or follow a freehand draw?If letters then I'd create a "font library" of functions corresponding to each letter in use. Then when receiving the input I'd stack those functions and tell the robot to execute each letter in turn.If freehand, then I'd use a drawing frame in VS (don't remember the name right now) like in paint. Get the coordinates in the order the user draws them, recreate those as RobTarget coordinates and then have the robot go through those coordinates in the same order as drawn.Neither solution is simple and they both take a long time to set up correctly, but they will work.John
Developer Center0 -
Hello John,
Thanks for response! It has to "print", not free draw. And hardest part - it has to do it in handwritten style (with lot of curves and practically no straight lines).
I like your idea of stacking functions in order of given string, but won't it just draw over previous letter? I mean... if for example I record path from curve (3D model of a letter), then load another 3D model and record another path. If I will tell it to draw path1 and then path2, it will just draw path1 and over draw path2 on top of path1, right? This is most crucial thing - I need it to be able to modify starting point, so I can give each letter it's own place and form a word.
Can you give me example? Some code snippet or similar help? I am not an experienced programmer, so it's quite a trouble to understand everything from first try.
0 -
Sorry, we have no examples or snippets for this type of thing.
If it's printing then this is what I would do (might not be the best way mind you, just what I would do).
1- Look through free fonts and pick a handwriting font.2- Write all the letters in the alphabet you will use & save as a bitmap3- In RobotStudio put that bitmap as a texture on a box scaled to the robot work envelope and paper you will use4- Create three targets - put them into a path as a MoveJ and a MoveC5- Put the targets on the box, first letter and use free hand move to get the targets and thus the curve to match the curve of the letter6- Copy, paste & repeat until I've done all the curves in the letter etc7- Use as many matches for further copy paste as possible, like d and b being the same but mirrored, or h and n being the same curves etc. To minimize workload.8- Create a path/routine per letter.For the displacement - fonts use this as well, so a font would have thin letters like I, medium like O and wide like M. So look at how the font handles it and copy the behavior, while scaling it to whatever paper/size your robot will use.I'd use a charcount variable, which is then added with a value depending on character width. This could be implemented with a workobject with it's starting point at a corner of the paper.For instance if I is 5mm wide and O is 10mm wide, and blankspace is 8mm wide then writing "IO IO" would beCall routine IAdd +5 to charcountCall routine OAdd +10 to charcountCall routine blank (moves the pen up from paper)Add +8 to charcountCall routine IAdd +5 to charcountCall routine OAdd +10 to charcountWith a similar value for rows, so that when you do an ENTER it increases the row displacement while making the charcount value =0 since its a new line etc.Good luck.John
Developer Center0 -
Wow, thanks! This sounds promising. I will work on this and see how it goes. Thanks again!
0 -
thank you john for the instruction above, i would like to apply this to mine as well and hopefully it would be a hit.
diamondstarlight2012-12-15 18:03:220 -
[QUOTE=Sisiander]Wow, thanks! This sounds promising. I will work on this and see how it goes. Thanks again!
[/QUOTE]
I am also interested in learning about this matter. I am subscribing to
this topic and will follow your post to see your progress. Please keep
updating.
paulcook2012-06-29 11:24:460
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings