Difference between revisions of "Element Coordination/Absolute Movements During Conveyor Tracking"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "= Absolute movements during Conveyor Tracking =   Let's define the  term "'''total robot position'''" to denote Cartesian position of the robot which when translated…")
 
 
(40 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Languages|Element_Coordination}}
 
= Absolute movements during Conveyor Tracking  =
 
= Absolute movements during Conveyor Tracking  =
 
 
  
Let's define the  term "'''total robot position'''" to denote Cartesian position of the robot which when translated into joint values represents the position coordinates that are actually sent to drives over SERCOS. So the total position during Conveyor Tracking is composed from two things: robot motion and conveyor motion. Where robot motion is the coordinate change introduced by user issuing different motion commands (MOVE/MOVES/...) and conveyor motion is the motion of conveyor in different phases (syncing, tracking, de-syncing). Written in formulas:  
+
== Introduction ==
 +
Let's define the  term "'''total robot position'''" to denote Cartesian position of the robot which when translated into joint values represents the position coordinates that are actually sent to drives over motion bus (e.g. SERCOS). So the total position during Conveyor Tracking is composed from two things: robot motion and conveyor motion. Where robot motion is the coordinate change introduced by user issuing different motion commands (MOVE/MOVES/...) and conveyor motion is the motion of conveyor in different phases (syncing, tracking, de-syncing).  
 +
 
 +
=== Case of Axis-Moving Frame: ===
 +
 
 +
Written in formulas:  
 +
 
 +
<center>
 +
'''Total = Robot&nbsp; +&nbsp; Conveyor'''
 +
</center>
  
&nbsp;
+
{{Note/Important|Note the difference between '''":"''' (compound) operator and the '''"+"''' operator in the formula above. In the same way as in MOVES when the movement is relative (<nowiki>abs=0</nowiki>),here also,  locations will be added one to the other by separating position from orientation, i.e.:<br>
 +
'''<nowiki>c = a+b</nowiki>''' means:<br>
 +
'''<nowiki>c.position = a.position + b.position</nowiki>''' <br>
 +
'''<nowiki>c.orientation = a.orientation * b.orientation</nowiki> ''' <br>
  
<center>'''Total = Robot + Conveyor''' </center>
+
where:<br>
 +
'''<nowiki> +</nowiki>''' - is regular 3 dimensional vector addition of (x,y,z) vectors <br>
 +
'''<nowiki> *</nowiki>''' - is quaternion multiplication.
 +
}}
  
<center>&nbsp; </center>
 
  
 
The Conveyor coordinates are:  
 
The Conveyor coordinates are:  
  
'''Conveyor(t) = CNV(t) - CNV(t0)''' where t0 is the moment of issuing "slave=5"  
+
'''Conveyor(t) = AMV(t) - AMV(t0)''' where t0 is the moment of issuing "slave=5"  
  
&nbsp;
+
And the AMVis:
  
And the CNV is:
+
'''AMV(t) = (DownStream - UpStream)*(MasterAxis(t) - Trigger)/(DownMaster-UpMaster) '''
  
'''CNV(t) = (DownStream - UpStream)*(Master(t) - Trigger)/(DownMaster-UpMaster) '''
+
'''MasterAxis(t)''' - position of conveyor master axis at moment t.
  
Master(t) - position of conveyor master axis at moment t.  
+
'''Trigger''' - trigger value currently used.
  
 
DownStream, Upstream, DownMaster, UpMaster - parameters of conveyor.  
 
DownStream, Upstream, DownMaster, UpMaster - parameters of conveyor.  
  
&nbsp;  
+
The relation to MC-Basic language variables is obvious:
 +
 
 +
<nowiki><mf>.</nowiki>'''here''' = AMV(t)
 +
 
 +
<nowiki><mf>.</nowiki>'''zero''' = AMV(0) ''(See [[MC-Basic:movingFrame.ZERO|MovingFrame.ZERO]])''
 +
 
 +
<div style="background-color:#C0C0C0;">
  
The relation to MC-BASIC language variables is obvious:  
+
=== Case of Robot-Moving Frame: ===
  
&nbsp;  
+
The same main formula also holds here:
 +
<center>
 +
'''Total = Robot&nbsp; +&nbsp; Master'''
 +
</center>
  
<nowiki><mf>.</nowiki>'''here''' = CNV(t)
+
But the master coordinates are:
  
<nowiki><mf>.</nowiki>'''zero''' = CNV(0)
+
'''Master(t) = RMV(t) - RMV(t0)''' where t0 is the moment of issuing "slave=5"
  
&nbsp;
+
And the RMV is:
  
What is general idea behind that? Simple, the total robot motion of robot that began to track (slave=5, synced or not) is the SAME as position of free robot (slave=0) IF the conveyor did not move. In other words, if you want to teach some points on conveyor just stop the conveyor and move the robot to it's destination on the belt.
+
'''RMV(t) = MS2MF( MF.base<sup>-1</sup> : <master>.setpoint(t):MF.ObjectLoc )'''&nbsp;&nbsp;&nbsp;&nbsp; ''(Or instead setpoint - here)''<br>
 +
''(See [[Element Coordination#Moving_Frame_Base_Offset|Moving_Frame_Base_Offset]])''
  
&nbsp;
+
The relation to MC-Basic language variables is obvious:
  
&nbsp;
+
<nowiki><mf>.</nowiki>'''here''' = RMV(t)
  
&nbsp;
+
<nowiki><mf>.</nowiki>'''zero''' = RMV(0) ''(See [[MC-Basic:movingFrame.ZERO|MovingFrame.ZERO]])''
  
The robot motion, i.e. the "Robot" variable in the main formula is the robot absolute position during conveyor tracking, and it equals to the position entered as a target point of the motion commands (MOVES/CIRCLE/...)
+
</div>
  
&nbsp;
 
  
== Case of One Conveyor  ==
+
What is the general idea behind that? Simple, the total robot motion of robot that began to track (slave=5, synced or not) is the <u>SAME</u> as position of free robot (slave=0) <u>AS IF</u> the conveyor did not move. In other words, if you want to teach some points on conveyor just stop the conveyor and move the robot to its destination on the belt.
So having General formula Total&nbsp;= Robot + Conveyor, it is interesting to see what happens in different motion types. First the Total is a Cartesian point of the robot it's correspondent joint point is:
 
  
&nbsp;
+
The robot motion, i.e. the "Robot" variable in the main formula is the robot absolute position during conveyor tracking, and it equals to the position entered as a target point of the motion commands (MOVES/CIRCLE/...)
  
<center>'''Total = InverseKinemaitcs(Total,cfg)''' </center>
+
== Case of One Moving Frame  ==
  
&nbsp;  
+
So having General formula Total&nbsp;= Robot + Conveyor, it is interesting to see what happens in different motion types. First the Total is a Cartesian point of the robot its correspondent joint point is:
  
where '''cfg''' is the current commanded set of configuration flags depending on robot model ('''arm, elbow, wrist''', ...).
 
  
&nbsp;
+
<center>'''Total = InverseKinematics(Total,cfg)''' </center>
  
&nbsp;
+
where '''cfg''' is the current commanded set of configuration flags depending on robot model ('''arm, elbow, wrist''', ...).
  
&nbsp;
 
  
 
=== General description of motion commands  ===
 
=== General description of motion commands  ===
&nbsp;
 
  
Every motion command (MOVE, MOVES, CIRCLE, DELAY, ...) consist of two&nbsp;pair of parameters: Cartesian & joint target and initial position. Target position is the position user enters ans an argument of motion command and the initial point is the position from where the given motion starts. We denote these variables as:
 
  
&nbsp;  
+
Every motion command (MOVE, MOVES, CIRCLE, DELAY, ...) consist of two&nbsp;pair of parameters: Cartesian & joint target and initial position. Target position is the position user enters and an argument of motion command and the initial point is the position from where the given motion starts. We denote these variables as:
 +
 
  
 
'''Target = DirectKinemaitcs(target)'''  
 
'''Target = DirectKinemaitcs(target)'''  
  
'''Start&nbsp;&nbsp; = DirectKinemaitcs(start)'''  
+
'''Start = DirectKinemaitcs(start)'''  
  
&nbsp;
 
  
 
It is clear that the target position of previous motion command (previous motion package) is the initial(start) position of the current motion, i.e.:  
 
It is clear that the target position of previous motion command (previous motion package) is the initial(start) position of the current motion, i.e.:  
  
&nbsp;
+
'''start<sup>i</sup> = target<sup>i-1</sup>'''  
 
 
'''starti = targeti-1'''
 
 
 
'''Starti = DirectKinemaitcs(starti) = DirectKinemaitcs(targeti-1)'''  
 
  
&nbsp;
+
'''Start<sup>i</sup> = DirectKinemaitcs(start<sup>i</sup>) = DirectKinemaitcs(target<sup>i-1</sup>)'''
  
&nbsp;
 
  
 
The above formulas are true for any kind of motion, both in cases when robot is tracking conveyor or not. There is only slight differences if the target point is given as Cartesian or as joint point. Means if we are using direct or inverse kinematics transformation.  
 
The above formulas are true for any kind of motion, both in cases when robot is tracking conveyor or not. There is only slight differences if the target point is given as Cartesian or as joint point. Means if we are using direct or inverse kinematics transformation.  
  
&nbsp;
 
 
&nbsp;
 
  
 
Because of different tool-frame settings (tool, base, workpiece, machinetable, ...) we always get the Cartesian initial position of the movement (Start) from the joint target coordinates of previous motion:  
 
Because of different tool-frame settings (tool, base, workpiece, machinetable, ...) we always get the Cartesian initial position of the movement (Start) from the joint target coordinates of previous motion:  
  
'''Starti =&nbsp; DirectKinemaitcs(targeti-1)'''  
+
'''Start<sup>i</sup> = DirectKinemaitcs(target<sup>i-1</sup>)'''
  
&nbsp;&nbsp;
+
=== Motion commands during MF tracking  ===
  
&nbsp;
+
The above formulas describing general motion command define actually how the '''Robot''' point in (main conveyor tracking formula ) is computed. For different motion type it differs:  
 
 
=== Motion commands during conveyor tracking  ===
 
The above formulas describing general motion command define actually how the '''Robot''' point in ([http://docs.google.com/View?docid=dd69pq2k_3cfdwnk#main conveyor tracking formula main conveyor tracking formula]) is computed. For different motion type it differs:  
 
 
 
&nbsp;
 
  
  
Line 131: Line 136:
  
 
|}
 
|}
&nbsp;
 
 
&nbsp;
 
  
 
where ''l'' is the profiler path variable, running always from 0 to the path's total length ''L''.  
 
where ''l'' is the profiler path variable, running always from 0 to the path's total length ''L''.  
Line 139: Line 141:
 
In case of free robot (means robot that is not tracking any conveyor) we have: '''Total = Robot''' and therefore:  
 
In case of free robot (means robot that is not tracking any conveyor) we have: '''Total = Robot''' and therefore:  
  
&nbsp;
 
  
 
<center>'''Total = InverseKineamitcs(Robot,cfg)''' </center>
 
<center>'''Total = InverseKineamitcs(Robot,cfg)''' </center>
  
<center>&nbsp; </center>
 
  
 
this implicitly means that Cartesian point Robot must be within robot's working envelope, i.e., there must exist at least one solution of Inverse Kinematics Problem for that point.  
 
this implicitly means that Cartesian point Robot must be within robot's working envelope, i.e., there must exist at least one solution of Inverse Kinematics Problem for that point.  
  
&nbsp;
 
  
When robot is tracking a conveyor, this does not have to be true, in this case we do the inverse kinematics transformation of the sum: '''Robot+Conveyor''', which implies that the Cartesian point "'''Robot"''' does not have to be reachable! This further means that formulas of&nbsp;&nbsp;[http://docs.google.com/View?docid=dd69pq2k_3cfdwnk#internal motion package relations internal motion package relations] are not true anymore. In this case we have two new motion package variables, called '''Offset_start''' and '''Offset_base'''&nbsp;which compensate (offset)&nbsp; conveyor motion:  
+
When robot is tracking a conveyor, this does not have to be true, in this case we do the inverse kinematics transformation of the sum: '''Robot+Conveyor''', which implies that the Cartesian point "'''Robot"''' does not have to be reachable! This further means that formulas of (internal motion package relations) are not true anymore. In this case we have two new motion package variables, called '''Offset_start''' and '''Offset_base'''&nbsp;which compensate (offset)&nbsp; conveyor motion:  
  
&nbsp;
 
  
'''starti = targeti-1'''  
+
'''start<sup>i</sup> = target<sup>i-1</sup>'''  
  
'''Starti = DirectKinemaitcs(starti) + Offset_basei - Offset_starti'''  
+
'''Start<sup>i</sup> = DirectKinemaitcs(start<sup>i</sup>) + Offset_base<sup>i</sup> - Offset_start<sup>i</sup>'''  
  
&nbsp;and the target point of the movement is,&nbsp;if given by the user as Cartesian point:  
+
and the target point of the movement is, if given by the user as Cartesian point:  
  
 
'''Target = TargetU + Offet_base'''  
 
'''Target = TargetU + Offet_base'''  
Line 163: Line 161:
 
'''target = InverseKineamitcs(Target)'''  
 
'''target = InverseKineamitcs(Target)'''  
  
&nbsp;
+
where '''Target<sup>U</sup>''' is the Cartesian target point given by the user.  
 
 
where '''TargetU''' is the Cartesian target point given by the user.  
 
 
 
&nbsp;
 
  
 
In case when target point is given by the user in joint coordinates we have:  
 
In case when target point is given by the user in joint coordinates we have:  
  
&nbsp;
+
'''Target =DirectKineamatics(target)'''  
 
 
'''Target&nbsp;&nbsp; =DirectKineamatics(target)'''  
 
  
'''TargetU&nbsp;=DirectKineamatics(target)'''&nbsp;'''&nbsp; -&nbsp;Offet_base'''  
+
'''Target<sup>U</sup>=DirectKineamatics(target) - Offet_base'''  
  
 
As with target point the start point has also user presentation and the internal value. Although here the term "user presentation" is not accurate as the value is not given by the user but just defined as:  
 
As with target point the start point has also user presentation and the internal value. Although here the term "user presentation" is not accurate as the value is not given by the user but just defined as:  
  
'''StartU = Start - Offset_base '''
+
'''Start<sup>U</sup> = Start - Offset_base '''
  
 
or:  
 
or:  
  
'''StartU =''' '''DirectKinemaitcs(start)&nbsp;- Offset_start'''&nbsp;
+
'''Start<sup>U</sup> =''' '''DirectKinemaitcs(start)- Offset_start'''  
  
&nbsp;
 
  
&nbsp;
 
  
 
To summarize all this would be that user-given target point is offset-ed in order to get kinematically reachable Cartesian point (one that has solvable inverse kinematics). The Offset_base used is obtained as the current offset introduced by conveyor motion at the moment of issuing of the motion command, while the other offset variable, the Offset_start is just previous value of the Offset_base:  
 
To summarize all this would be that user-given target point is offset-ed in order to get kinematically reachable Cartesian point (one that has solvable inverse kinematics). The Offset_base used is obtained as the current offset introduced by conveyor motion at the moment of issuing of the motion command, while the other offset variable, the Offset_start is just previous value of the Offset_base:  
  
&nbsp;
 
  
&nbsp;
 
  
For ''MOVES & CIRCLE'':  
+
===For ''MOVES & CIRCLE'': ===
  
'''Offset_basei = Conveyor(t)'''  
+
'''Offset_base<sup>i</sup> = Conveyor(t)'''  
  
 
where '''t''' is the moment when the movement is issued  
 
where '''t''' is the moment when the movement is issued  
  
'''Offset_starti = Offset_basei-1'''  
+
'''Offset_start<sup>i</sup> = Offset_base<sup>i-1</sup>'''  
 +
 
 +
===For ''MOVE & DWELL'': ===
  
For ''MOVE & DWELL'':
 
  
&nbsp;
 
  
'''Offset_basei = Offset_basei-1'''  
+
'''Offset_base<sup>i</sup> = Offset_base<sup>i-1</sup>'''  
  
'''Offset_starti = Offset_basei-1'''&nbsp;&nbsp;
+
'''Offset_start<sup>i</sup> = Offset_base<sup>i-1</sup>'''  
  
 
here we just forward the Offset_base of the previous motion to then next!
 
here we just forward the Offset_base of the previous motion to then next!
  
&nbsp;
 
  
&nbsp;
 
  
&nbsp;Interpolation of different motion types now looks like:  
+
Interpolation of different motion types now looks like:  
  
&nbsp;
 
  
  
Line 247: Line 232:
 
Let's Check the above settings using zero-motions (motions where target equals start point):  
 
Let's Check the above settings using zero-motions (motions where target equals start point):  
  
&nbsp;
 
  
For MOVES:  
+
===For MOVES: ===
  
&nbsp;
 
  
Robot = Start - Offset_base = StartU = '''DirectKinemaitcs(start)&nbsp;- Offset_start'''&nbsp;  
+
Robot = Start - Offset_base = StartU = '''DirectKinemaitcs(start)- Offset_start'''&nbsp;  
  
 
if this is the first motion after engaging conveyor the Offset_start is zero and therefore:  
 
if this is the first motion after engaging conveyor the Offset_start is zero and therefore:  
Line 265: Line 248:
 
means,&nbsp; the&nbsp;"Robot"&nbsp;Cartesian point gets the target value user entered.&nbsp;  
 
means,&nbsp; the&nbsp;"Robot"&nbsp;Cartesian point gets the target value user entered.&nbsp;  
  
&nbsp;
 
  
A second MOVES motion smoothly continues:  
+
===A second MOVES motion smoothly continues: ===
  
Robot = Start - Offset_base = StartU = '''DirectKinemaitcs(start)&nbsp;- Offset_start'''&nbsp; = '''DirectKinemaitcs(targetprev)&nbsp;- Offset_baseprev'''&nbsp;  
+
Robot = Start - Offset_base = Start<sup>U</sup> = '''DirectKinemaitcs(start)&nbsp;- Offset_start'''&nbsp; = '''DirectKinemaitcs(targetprev)&nbsp;- Offset_baseprev'''&nbsp;  
  
 
because:  
 
because:  
Line 281: Line 263:
 
&nbsp;  
 
&nbsp;  
  
Switching into joint-interpolated move is little bit trickier:  
+
===Switching into joint-interpolated move is little bit trickier: ===
  
 
'''Robot =&nbsp;&nbsp;DirectKinemaitcs(start)&nbsp;- Offset_start'''&nbsp; = '''DirectKinemaitcs(targetprev)&nbsp;- Offset_baseprev'''&nbsp;  
 
'''Robot =&nbsp;&nbsp;DirectKinemaitcs(start)&nbsp;- Offset_start'''&nbsp; = '''DirectKinemaitcs(targetprev)&nbsp;- Offset_baseprev'''&nbsp;  
Line 291: Line 273:
 
according&nbsp;&nbsp;the interpolation formulas during tracking (using Offset_start instead Offset_base). Therefore:  
 
according&nbsp;&nbsp;the interpolation formulas during tracking (using Offset_start instead Offset_base). Therefore:  
  
'''Robot = TargetU&nbsp;=DirectKineamatics(target)'''&nbsp;'''&nbsp; -&nbsp;Offet_base'''  
+
'''Robot = TargetU&nbsp;=DirectKineamatics(target)'''&nbsp;'''&nbsp; -&nbsp;Offet_base'''
  
 
== Desyncing of a conveyor (Virtual stop)  ==
 
== Desyncing of a conveyor (Virtual stop)  ==
Line 305: Line 287:
 
What happens during switching to another conveyor? Then, we have one conveyor de-syncing and the other syncing at same time:  
 
What happens during switching to another conveyor? Then, we have one conveyor de-syncing and the other syncing at same time:  
  
'''Total = Robot + Conveyor1 + Conveyor2 '''
+
'''Total = Robot + Conveyor<sub>1</sub> + Conveyor<sub>2</sub> '''
  
 
Where:  
 
Where:  
  
'''Conveyor1(t) = CNV1(t) - CNV1(t01)'''  
+
'''Conveyor<sub>1</sub>(t) = AMV1(t) - AMV1(t<sub>01</sub>)'''  
  
 
And  
 
And  
  
'''Conveyor2(t) = CNV2(t) - CNV2(t02)'''  
+
'''Conveyor<sub>2</sub>(t) = AMV2(t) - AMV2(t<sub>02</sub>)'''  
 +
 
 +
Where t<sub>02</sub> is the moment of issuing "''masterframe = cnv2''" and t<sub>01</sub> is the moment of engaging the first conveyor either by issuing "''slave=5''" or by&nbsp;setting "''masterframe = cnv1''<nowiki>" while <robot>.slave was at "5".</nowiki>
  
Where t02 is the moment of issuing "''masterframe = cnv2''" and&nbsp;t01 is the moment of engaging the first conveyor either by issuing "''slave=5''" or by&nbsp;setting "''masterframe = cnv1''<nowiki>" while <robot>.slave was at "5".</nowiki>
 
  
&nbsp;&nbsp;
 
  
<nowiki>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This situation can be detected when <robot>.IMFS flag&nbsp;equals -2. The IMFS flag is zero when the robot is not engaged with any conveyor or when it is syncing to one, it equals to 1 when the robot is synced to a conveyor and equals to -1 when it is desyncing from a conveyor without being engaged with any other conveyor. </nowiki>
+
<nowiki>This situation can be detected when <robot>.IMFS flag&nbsp;equals -2. The IMFS flag is zero when the robot is not engaged with any conveyor or when it is syncing to one, it equals to 1 when the robot is synced to a conveyor and equals to -1 when it is desyncing from a conveyor without being engaged with any other conveyor. </nowiki>
  
&nbsp;
 
  
It is clear that at some moment of time "ts1" the first conveyor will complete it's virtual deceleration and we will switch to one-conveyor situation back:  
+
It is clear that at some moment of time "ts<sub>1</sub>" the first conveyor will complete its virtual deceleration and we will switch to one-conveyor situation back:  
  
<center>'''Total = Robot + Conveyor2''' </center>
+
<center>'''Total = Robot + Conveyor<sub>2</sub>''' </center>
  
 
To assure continuity of robot motion we must assure no jumps, i.e.:  
 
To assure continuity of robot motion we must assure no jumps, i.e.:  
  
&nbsp;
 
  
'''Total<nowiki>*(</nowiki>ts1) = Total(ts1)=> Robot<nowiki>*</nowiki>(ts1) + Conveyer2(ts1) = Robot(ts1) + Conveyor1(ts1) + Conveyor2(ts1) '''
+
'''Total<nowiki>*(</nowiki>ts<sub>1</sub>) = Total(ts<sub>1</sub>)=> Robot<nowiki>*</nowiki>(ts<sub>1</sub>) + Conveyer<sub>2</sub>(ts<sub>1</sub>) = Robot(ts<sub>1</sub>) + Conveyor<sub>1</sub>(ts<sub>1</sub>) + Conveyor<sub>2</sub>(ts<sub>1</sub>) '''
  
 
From there:  
 
From there:  
  
'''Robot<nowiki>*</nowiki>(ts1) = Robot(ts1) + Conveyor1(ts1)'''  
+
'''Robot<nowiki>*</nowiki>(ts<sub>1</sub>) = Robot(ts<sub>1</sub>) + Conveyor<sub>1</sub>(ts<sub>1</sub>)'''  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This means that at the moment of switching between two conveyors (more exactly at the moment when robot tuns to be engaged only with the second one) we have a correction of robot's current packages positions according&nbsp;to:  
+
This means that at the moment of switching between two conveyors (more exactly at the moment when robot tuns to be engaged only with the second one) we have a correction of robot's current packages positions according&nbsp;to:  
  
&nbsp;
 
  
'''start = start - Offset_base + Conveyor1(ts1)'''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''<nowiki>= start</nowiki>U&nbsp;&nbsp; + Conveyor1(ts1)'''  
+
'''start = start - Offset_base + Conveyor<sub>1</sub>(ts1)''' = start<sup>U</sup> + Conveyor<sub>1</sub>(ts<sub>1</sub>)'''  
  
'''target = target - Offset_base + Conveyor1(ts1)&nbsp; = targetU + Conveyor1(ts1)'''  
+
'''target = target - Offset_base + Conveyor<sub>1</sub>(ts<sub>1</sub>)''' = target<sup>U</sup> + Conveyor<sub>1</sub>(ts<sub>1</sub>)'''  
  
 
'''Offset_base = 0'''  
 
'''Offset_base = 0'''  
Line 349: Line 328:
 
'''Offset_start = 0'''  
 
'''Offset_start = 0'''  
  
where&nbsp;''' Conveyor1(ts1)&nbsp; = CNV1(ts1) - CNV1(t01)'''&nbsp; (actually first conveyor virtual stopping position)  
+
where''' Conveyor<sub>1</sub>(ts<sub>1</sub>) = CNV1(ts<sub>1</sub>) - CNV1(t<sub>01</sub>)''' (actually first conveyor virtual stopping position)  
  
Same transformation happens when the robot is disengaged from conveyor without engaging to another.  
+
Same transformation happens when the robot is disengaged from conveyor without engaging to another.
  
 
==  Conclusion  ==
 
==  Conclusion  ==
<nowiki>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;During conveyor tracking total robot Cartesian position consists of two parts, the first part is the robot absolute position and the second part is the current conveyor relative position from it's zero (<cnv>.zero). The two parts are superimposed. When a conveyor disengages from a robot, its relative stopping position is added to the absolute robot position and becomes new total robot position. </nowiki>
+
During conveyor tracking total robot Cartesian position consists of two parts, the first part is the robot absolute position and the second part is the current conveyor relative position from it's zero (<cnv>.zero). The two parts are superimposed. When a conveyor disengages from a robot, its relative stopping position is added to the absolute robot position and becomes new total robot position.  
  
&nbsp;
+
[[Category:Motion:MovingFrame]]

Latest revision as of 02:00, 31 May 2017

Language: English  • 中文(简体)‎

Absolute movements during Conveyor Tracking

Introduction

Let's define the  term "total robot position" to denote Cartesian position of the robot which when translated into joint values represents the position coordinates that are actually sent to drives over motion bus (e.g. SERCOS). So the total position during Conveyor Tracking is composed from two things: robot motion and conveyor motion. Where robot motion is the coordinate change introduced by user issuing different motion commands (MOVE/MOVES/...) and conveyor motion is the motion of conveyor in different phases (syncing, tracking, de-syncing).

Case of Axis-Moving Frame:

Written in formulas:

Total = Robot  +  Conveyor

IMPORTANT.svgIMPORTANT
Note the difference between ":" (compound) operator and the "+" operator in the formula above. In the same way as in MOVES when the movement is relative (abs=0),here also, locations will be added one to the other by separating position from orientation, i.e.:

c = a+b means:
c.position = a.position + b.position
c.orientation = a.orientation * b.orientation

where:
+ - is regular 3 dimensional vector addition of (x,y,z) vectors
* - is quaternion multiplication.


The Conveyor coordinates are:

Conveyor(t) = AMV(t) - AMV(t0) where t0 is the moment of issuing "slave=5"

And the AMVis:

AMV(t) = (DownStream - UpStream)*(MasterAxis(t) - Trigger)/(DownMaster-UpMaster)

MasterAxis(t) - position of conveyor master axis at moment t.

Trigger - trigger value currently used.

DownStream, Upstream, DownMaster, UpMaster - parameters of conveyor.

The relation to MC-Basic language variables is obvious:

<mf>.here = AMV(t)

<mf>.zero = AMV(0) (See MovingFrame.ZERO)

Case of Robot-Moving Frame:

The same main formula also holds here:

Total = Robot  +  Master

But the master coordinates are:

Master(t) = RMV(t) - RMV(t0) where t0 is the moment of issuing "slave=5"

And the RMV is:

RMV(t) = MS2MF( MF.base-1 : <master>.setpoint(t):MF.ObjectLoc )     (Or instead setpoint - here)
(See Moving_Frame_Base_Offset)

The relation to MC-Basic language variables is obvious:

<mf>.here = RMV(t)

<mf>.zero = RMV(0) (See MovingFrame.ZERO)


What is the general idea behind that? Simple, the total robot motion of robot that began to track (slave=5, synced or not) is the SAME as position of free robot (slave=0) AS IF the conveyor did not move. In other words, if you want to teach some points on conveyor just stop the conveyor and move the robot to its destination on the belt.

The robot motion, i.e. the "Robot" variable in the main formula is the robot absolute position during conveyor tracking, and it equals to the position entered as a target point of the motion commands (MOVES/CIRCLE/...)

Case of One Moving Frame

So having General formula Total = Robot + Conveyor, it is interesting to see what happens in different motion types. First the Total is a Cartesian point of the robot its correspondent joint point is:


Total = InverseKinematics(Total,cfg)

where cfg is the current commanded set of configuration flags depending on robot model (arm, elbow, wrist, ...).


General description of motion commands

Every motion command (MOVE, MOVES, CIRCLE, DELAY, ...) consist of two pair of parameters: Cartesian & joint target and initial position. Target position is the position user enters and an argument of motion command and the initial point is the position from where the given motion starts. We denote these variables as:


Target = DirectKinemaitcs(target)

Start = DirectKinemaitcs(start)


It is clear that the target position of previous motion command (previous motion package) is the initial(start) position of the current motion, i.e.:

starti = targeti-1

Starti = DirectKinemaitcs(starti) = DirectKinemaitcs(targeti-1)


The above formulas are true for any kind of motion, both in cases when robot is tracking conveyor or not. There is only slight differences if the target point is given as Cartesian or as joint point. Means if we are using direct or inverse kinematics transformation.


Because of different tool-frame settings (tool, base, workpiece, machinetable, ...) we always get the Cartesian initial position of the movement (Start) from the joint target coordinates of previous motion:

Starti = DirectKinemaitcs(targeti-1)

Motion commands during MF tracking

The above formulas describing general motion command define actually how the Robot point in (main conveyor tracking formula ) is computed. For different motion type it differs:


Motion Type Interpolation Formula
MOVES Robot = Start + (Target-Start)*l
MOVE Robot = InverseKinemaitcs(start + (target-start)*l,cfg)
DELAY Robot = Target = Start
CIRCLE ....

where l is the profiler path variable, running always from 0 to the path's total length L.

In case of free robot (means robot that is not tracking any conveyor) we have: Total = Robot and therefore:


Total = InverseKineamitcs(Robot,cfg)


this implicitly means that Cartesian point Robot must be within robot's working envelope, i.e., there must exist at least one solution of Inverse Kinematics Problem for that point.


When robot is tracking a conveyor, this does not have to be true, in this case we do the inverse kinematics transformation of the sum: Robot+Conveyor, which implies that the Cartesian point "Robot" does not have to be reachable! This further means that formulas of (internal motion package relations) are not true anymore. In this case we have two new motion package variables, called Offset_start and Offset_base which compensate (offset)  conveyor motion:


starti = targeti-1

Starti = DirectKinemaitcs(starti) + Offset_basei - Offset_starti

and the target point of the movement is, if given by the user as Cartesian point:

Target = TargetU + Offet_base

target = InverseKineamitcs(Target)

where TargetU is the Cartesian target point given by the user.

In case when target point is given by the user in joint coordinates we have:

Target =DirectKineamatics(target)

TargetU=DirectKineamatics(target) - Offet_base

As with target point the start point has also user presentation and the internal value. Although here the term "user presentation" is not accurate as the value is not given by the user but just defined as:

StartU = Start - Offset_base

or:

StartU = DirectKinemaitcs(start)- Offset_start


To summarize all this would be that user-given target point is offset-ed in order to get kinematically reachable Cartesian point (one that has solvable inverse kinematics). The Offset_base used is obtained as the current offset introduced by conveyor motion at the moment of issuing of the motion command, while the other offset variable, the Offset_start is just previous value of the Offset_base:


For MOVES & CIRCLE:

Offset_basei = Conveyor(t)

where t is the moment when the movement is issued

Offset_starti = Offset_basei-1

For MOVE & DWELL:

Offset_basei = Offset_basei-1

Offset_starti = Offset_basei-1

here we just forward the Offset_base of the previous motion to then next!


Interpolation of different motion types now looks like:


Motion Type Interpolation Formula
MOVES Robot = Start + (Target-Start)*l  - Offset_base
MOVE Robot = InverseKinemaitcs(start + (target-start)*l,cfg)  - Offset_start
DELAY Robot = Target = Start
CIRCLE ....

 

Let's Check the above settings using zero-motions (motions where target equals start point):


For MOVES:

Robot = Start - Offset_base = StartU = DirectKinemaitcs(start)- Offset_start 

if this is the first motion after engaging conveyor the Offset_start is zero and therefore:

Robot = DirectKinemaitcs(start)

The target point is also simple

Robot = Target - Offset_base = TargetU

means,  the "Robot" Cartesian point gets the target value user entered. 


A second MOVES motion smoothly continues:

Robot = Start - Offset_base = StartU = DirectKinemaitcs(start) - Offset_start  = DirectKinemaitcs(targetprev) - Offset_baseprev 

because:

start  = targetprev 

Offset_start  = Offset_baseprev 

as defined.

 

Switching into joint-interpolated move is little bit trickier:

Robot =  DirectKinemaitcs(start) - Offset_start  = DirectKinemaitcs(targetprev) - Offset_baseprev 

that is same is in MOVES, but target is:

Robot =  DirectKinemaitcs(target)  - Offset_start 

according  the interpolation formulas during tracking (using Offset_start instead Offset_base). Therefore:

Robot = TargetU =DirectKineamatics(target)   - Offet_base

Desyncing of a conveyor (Virtual stop)

      When a conveyor is disengaged from robot it performs a virtual stopping profile, according to <robot>.AccelerationDesync and <robot>.JerkDesync parameters. The initial velocity is taken to be the conveyor velocity at the moment of disengagement start. The conveyor performs a profiled commanded motion towards zero velocity, while being disconnected from the real master source from the moment of disengagement start.

 

  

Case of Two Conveyors

 

What happens during switching to another conveyor? Then, we have one conveyor de-syncing and the other syncing at same time:

Total = Robot + Conveyor1 + Conveyor2

Where:

Conveyor1(t) = AMV1(t) - AMV1(t01)

And

Conveyor2(t) = AMV2(t) - AMV2(t02)

Where t02 is the moment of issuing "masterframe = cnv2" and t01 is the moment of engaging the first conveyor either by issuing "slave=5" or by setting "masterframe = cnv1" while <robot>.slave was at "5".


This situation can be detected when <robot>.IMFS flag equals -2. The IMFS flag is zero when the robot is not engaged with any conveyor or when it is syncing to one, it equals to 1 when the robot is synced to a conveyor and equals to -1 when it is desyncing from a conveyor without being engaged with any other conveyor.


It is clear that at some moment of time "ts1" the first conveyor will complete its virtual deceleration and we will switch to one-conveyor situation back:

Total = Robot + Conveyor2

To assure continuity of robot motion we must assure no jumps, i.e.:


Total*(ts1) = Total(ts1)=> Robot*(ts1) + Conveyer2(ts1) = Robot(ts1) + Conveyor1(ts1) + Conveyor2(ts1)

From there:

Robot*(ts1) = Robot(ts1) + Conveyor1(ts1)

This means that at the moment of switching between two conveyors (more exactly at the moment when robot tuns to be engaged only with the second one) we have a correction of robot's current packages positions according to:


start = start - Offset_base + Conveyor1(ts1) = startU + Conveyor1(ts1)

target = target - Offset_base + Conveyor1(ts1) = targetU + Conveyor1(ts1)

Offset_base = 0

Offset_start = 0

where Conveyor1(ts1) = CNV1(ts1) - CNV1(t01) (actually first conveyor virtual stopping position)

Same transformation happens when the robot is disengaged from conveyor without engaging to another.

 Conclusion

During conveyor tracking total robot Cartesian position consists of two parts, the first part is the robot absolute position and the second part is the current conveyor relative position from it's zero (<cnv>.zero). The two parts are superimposed. When a conveyor disengages from a robot, its relative stopping position is added to the absolute robot position and becomes new total robot position.