Calculate robot configuration data
newform
✭
Dear All,
We have a sequence of "robtarget". But only translation and rotation are specified for these data. Is there any way to obtain optimal robot configuration for these data programatically?
Thank you very much.
We have a sequence of "robtarget". But only translation and rotation are specified for these data. Is there any way to obtain optimal robot configuration for these data programatically?
Thank you very much.
0
Comments
-
If it is indeed the "optimal" that you want then you should use a RobotStudio simulation so that you can see the exact motion behaviour.
But since you asked this question in the RAB forum I'm guessing that you are collecting data from somewhere and sending it to RAPID. If so there is no good way to calculate the robot configuration just from position and rotation, this since that there are so many parameters involved that any such calculation would be extremely complex.Instead you might want to do like when does with conveyor tracking or similar applications. You create via targets with proper configuration above the work area, then use Configuration on/off for those targets that get the data. When the robot then moves from the target with configuration to targets without, it will try to use the same configuration and you will have a rough idea of the motion.If neither solution works for you then you should explain your application in more detail.John
Developer Center0 -
Dear John,
You are right. We created the data without robot configuration. We need send them to Rapid.
In order to get the configuration data before sending them, we develop a RAB application and a Rapid. The RAB sends point to this Rapid one by one and the Raplid compute the robot configuration. The Rapid iterate all possible robot configuration and compute corresponding joint angles. These joint angles will be compared to those corresponding to previous point. In this way, we can find a robot configuration that the robot rotates less as compared to previous point. The problem is that the iteration take too long time. Therefore, we are wondering if there is other convenient approach.
When developing RobotStudo Addin, we find that there is one API function "GetAllConfigurations(RsTarget, RsToolData". It can provide all available robot configurations given a robot target and tool data. We want to know if there is similar API function in RAB or Rapid.
Thanks a lot for your advice
newform2009-09-28 16:55:290 -
Hi,This function is only available in the Virtual Controller (not in the real Controller). This is why it is exposed only by RobotStudioCarlos Martinez
ABB0 -
You can either do it by using ConFlOff (I am sure you know) and that turns configurations off. This creates a situation where the robot may sometimes move unexpectedly. If you need to use config, I use one configurations most of the time, and at times, when the angle
on axis 6 gets to steep I need to change one number in the confdata, it
just changes between -2, -1, 0 or 1.
To avoid "crazy" moves, I have now started using configurations. For any given job, there is just a few configurations you would want to use. I am reading coordinates from an external file and I am calculating orientation based on point position in space. I have a range of "allowed" configurations that I can use.
For each new point am trying to reach, I calculate a jointtarget from the new point, the current orientation and confinguration. If this new jointtarget has small movement compared to the current axes, I use the same configuration and move on. If there is large movements, or the conversion fails, I try with a new configuration until one of my configurations work and yields a valid jointtarget. A valid jointtarget will give me a condfata i can extract.
I then apply this condfata to the robtarget and exceute the moveL command, and use the calculated condfata as the current confdta for the next point.
As a final note, You are saying that you are looking for the optimal configuration. Optimal can mean a lot of things depending on what you want to do. You also say that you want to let RAPID iterate through ALL possible configurations.
But if it is optimal in the sense of "least amount of movement" on the axes, you are better of doing it the lazy way . By testing each point in space against a selection of "nice" configurations that you have put inside an array, and then take the first nice configuration that floats your boat.
(If you are going to code this, your controller might move slowly. If
that happens, stop using WriteTP as debugging code, it slows everything
down1).
---------------------
Best regards
Jens T
-------------------------0 -
Hi, Jens,
Appreciate your suggestions. This is pretty helpful.
I develop a simple Rapid program to let it iterate all possible configurations (see below)
---------------------------------------------------------
FOR c1 FROM -2 TO 1 STEP 1 DO
FOR c2 FROM -3 TO 2 STEP 1 DO
FOR c3 FROM -5 TO 4 STEP 1 DO
rtg.robconf := [c1, c2, c3, 0];
IF(GetJntTarget(rtg, jtg)) THEN
bFound := TRUE;
diff := GetSumDiff(jtg.robax, oldAng);
IF(diff < total) THEN
total := diff;
cfgData := [c1, c2, c3, 0];
ENDIF
ENDIF
ENDFOR
ENDFOR
ENDFOR
---------------------------------------------------------
Theoretically. if there is available configuration data for a point. This point should be reacheable by the robot. Actually, it works for most of the cases. But sometimes, when I send the point with grabbed configuration data to the robot. I got message showing that the position is not compatable. Is there anyting wrong with the iteration process?
Many thanks
newform2010-01-25 20:26:261 -
Hmm. I dont know. But if you find no suitable configuration, your script will not return anything, and the resulting configuration will be wrong if you try to reach it, as it will have no confData. (Or it will inherit confdata from som earlier process)-
As for my previous post, I have abandoned the "nice" configurations setup entirely, and I am now relying on programatically generating orients, by interpolating between key-orientations. This speeds up the movement dramatically and takes care of "crazy moves". This means I will have very small movement between each programmed point, and it becomes unproblematic to use ConfL/offm because any 90+ degree movement on any axis is so unlikely that it basically never happens.
---------------------
Best regards
Jens T
-------------------------0 -
By the way, I loved your script. Its clean and it turned out that
"since that there are so many parameters involved that any such calculation would be extremely complex."
was not on the money.
---------------------
Best regards
Jens T
-------------------------0 -
Hi, Jens,
Thank you very much for your post. This is what I thought too. I have no idea right now.
This non-compatible case seldom happened. But I just want to make sure that the script can 100% work. I am doing test and will update if I could find anything.
Thanks a lot
newform2010-01-25 20:26:070
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings