Robots plugin on C Sharp editor in Rhino #97
-
Hi, I have an issue, when trying to create a valid tool-path, I need to rotate manually planes 90 degrees until I reach a good rotation that is reachable. I would like to automate this process, because manually guessing is very slow. Is there any ready-made examples for C Sharp I could use to mimic similar workflow to this? |
Beta Was this translation helpful? Give feedback.
Replies: 22 comments
-
I assume this issue is because you are using some tool that has 5 degrees of freedom (the rotation around the normal of the tool doesn't matter), and you're trying to search for solutions that are reachable given the same normal direction and position. You can do this in a number of ways, depending on how the tool is mounted. Assuming the normal is perpendicular to the flange, rotate the tool around the normal depending on it position so that the 5th is extended (use the arm orientation as a vector guide to align the plane). You could also use iterative approaches, incrementally rotating until you don't get an error. To do this faster, if its only on certain parts, use the kinematics component rather than the full create program component. If you use this be careful not to select solutions as soon as they don't give an error, have some margin, as the real robot might not not be exactly the same. You might want to make some small calibration adjustments without having to create a new program, also things like absolute accuracy will have slightly different joint positions as in the simulation. Regarding the ABB library, you can find it here: |
Beta Was this translation helpful? Give feedback.
-
Yes It is exactly this, because I am just milling and using saw-blade for cutting process. Do you have examples what are explaining considering rotations? I use Robots plugin for simulation, for real movement I need to export .txt file to our ABB robot, because the company installed specific software package considering robot controller. But the simulation is almost the same, and without robots it would be really painful to do anything. I am somehow stuck in this grasshopper interface and seeking for your help to setup iterative approach for plane rotation. |
Beta Was this translation helpful? Give feedback.
-
Not that I can quickly post here, but it's not complicated and you are pretty good and Grasshopper and C#, I'm sure you will figure it out. A really simple variation of option 1 is, assuming the robot base is in the world origin, connect an align plane component after the target planes and use the position of the target as the alignment vector (the X axis), you might have to rotate the tool 90/-90/180 degrees after this. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Right click where it says 'dependencies' then 'add project reference' then 'browse'. |
Beta Was this translation helpful? Give feedback.
-
Did you try removing it and adding it again? |
Beta Was this translation helpful? Give feedback.
-
I am trying to write this iterative solver after painful 2 weeks milling and saw-blading with the robot, I realized that I cannot rotate planes manually... I would like to ask how can I create targets in C# ? I see that input of the program component takes Targets as input list, but then it is somehow casted to toolpath. I am not very familiar with abstract classes.
|
Beta Was this translation helpful? Give feedback.
-
I tried this but also does not work
|
Beta Was this translation helpful? Give feedback.
-
I found one way, but I do not know if it is right why targets have to be casted to a toolpath?
|
Beta Was this translation helpful? Give feedback.
-
See here for a minimal robot program written in C#: The Grasshopper component "Create Program" accepts a list of objects that implement IToolpath. You can connect a list of targets directly to Create Program because the Target class implements IToolpath. Each target returns an IEnumerable with a single target (itself). |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
The plugin is not really optimized for performance, if I ever was to rewrite it I would make it considerably faster. But I don't think that's the issue. If you have many long linear motions, you could increase the 'stepsize' variable to 100 mm or so. |
Beta Was this translation helpful? Give feedback.
-
Thank you, as long as it produces good results it is worth waiting. I would like to ask about axes limitations.
|
Beta Was this translation helpful? Give feedback.
-
The plugin rotation values in radians don't translate directly to degrees. More info here: #8 |
Beta Was this translation helpful? Give feedback.
-
Also see here: #10 |
Beta Was this translation helpful? Give feedback.
-
Sorry to ask too many questions but is this a right conversion? |
Beta Was this translation helpful? Give feedback.
-
No, that component is to convert from degrees to radians and not the other way around. If you want to know if the axis in in the limit, plug the axis limit in degrees into that component to get the limit in radians and compare to the values in radians that you're getting. |
Beta Was this translation helpful? Give feedback.
-
I think I am lost. Would it be possible to give an example to convert axes degrees correctly? |
Beta Was this translation helpful? Give feedback.
-
You almost have it. You mentioned the limit of axis 5 is -180 degrees. You just have to connect a panel with the value -180 to the D input of degrees component from the plugin. This will return a value in radians. This is the value you should compare to the J output of the simulation component. Don't transform the values from the J output to anything. |
Beta Was this translation helpful? Give feedback.
-
Sorry I still do not understand it: |
Beta Was this translation helpful? Give feedback.
-
Which part you don't understand? That grasshopper file seems good. Axis 5 is at an angle of 0 radians, which not close to its limit of -3.14159 radians. |
Beta Was this translation helpful? Give feedback.
I assume this issue is because you are using some tool that has 5 degrees of freedom (the rotation around the normal of the tool doesn't matter), and you're trying to search for solutions that are reachable given the same normal direction and position.
You can do this in a number of ways, depending on how the tool is mounted. Assuming the normal is perpendicular to the flange, rotate the tool around the normal depending on it position so that the 5th is extended (use the arm orientation as a vector guide to align the plane).
You could also use iterative approaches, incrementally rotating until you don't get an error. To do this faster, if its only on certain parts, use the kinematics comp…