**METHOD AND DEVICE FOR CONTROLLING THE MOTION OF ONE OR MORE COLLABORATIVE ROBOTS**

ROCCO, Paolo (Via Quadronno 24, Milan, 20122, IT)

**B25J9/16**CLAIMS 1. Method for controlling the motion of one or more collaborative robots, each one of said one or more collaborative robots being mounted on a fixed or movable base and being equipped with one or more terminal members and with a motion controller, characterized in that it comprises the following iterative steps: - determining the position coordinates of each one of said one or more collaborative robots and the position coordinates of one or more human operators collaborating with said one or more collaborative robots; - determining a set of productivity indices associated with respective directions of motion of said one or more terminal members of said one or more collaborative robots, said productivity indices being indicative of the speed at which said one or more collaborative robots can move in each one of said directions without having to slow down or stop because of the presence of said one or more human operators; - supplying to said motion controller the data of said set of productivity indices associated with said respective directions of motion of said one or more terminal members, so that said controller can determine the directions of motion of said one or more terminal members on the basis of the higher values of said productivity indices. 2. Method for controlling the motion of one or more collaborative robots according to claim 1, wherein said steps of determining the position coordinates of each one of said one or more collaborative robots and the position coordinates of one or more collaborative human operators and determining a set of productivity indices associated with respective directions of motion of the terminal member comprise the steps of: - cyclically reading the robot configuration by determining said position coordinates of the robots, i.e. the linear/angular positions of each axis of motion, collected in a vector q, and the speeds (time derivatives) thereof q ; - cyclically reading the position values of a number η of points detected by the sensor on the operator, and collecting the coordinates thereof in a vector p; - calculating the expression: E(p, q)q≤ f(p, q) , i.e. calculating the matrix E(p, q) and the vector f(p, q), where : E is a matrix of (2*n*η x n) size, where n is the number of joints of the robot and η is the number of points of said operator position; /is a vector of 2*n*η components; q is a vector with n components that defines the robot configuration, and contains the n angular positions of the joints; q is a vector with n components that contains, at any instant, the time derivatives of the components of the vector < , i.e. the speeds of the coordinates of the joints; p is a vector with 3*η components that contains, for each one of the η points of the operator position, the three position coordinates; - determining said productivity indices based on said expression: i.e. based on the matrix E (/>, < ) and the vector f(p, q). 3. Method for controlling the motion of one or more collaborative robots according to claim 2, wherein said step of determining said productivity indices comprises the steps of: - calculating the Jacobian matrix J(q) of said terminal member (TCP) of the robot; - calculating the singular value decomposition E = USV of the matrix E, thus obtaining the matrices U, S and V, where: U is an orthogonal square matrix of (2*n*η x 2*n*η) size, S is a matrix of (2*n*η, n) size containing the singular values of the matrix E, Vis an orthogonal square matrix of (n x n) size, V is the transposed matrix of V; - building a matrix V containing the columns of the matrices Kand - V; - for each column i of V, calculating the corresponding value where: such that: where is a vector of the maximum speeds that the single coordinates of a joint of the robot can reach; for each one of the directions v in space of the robot joints, the maximum intensity of the speed φ safety constraint and will be, element by element, lower than the maximum allowable speed; the value of the index / is such that the corresponding value is the highest one and corresponds to the best direction (of the joints in space) in which the robot can keep moving without having to significantly slow down because of the presence of said operator; - for each column / of V , calculating the direction of motion of said terminal member (TCP) and the correspondin productivity indices according to the expressions: 4. Method for controlling the motion of one or more collaborative robots according to any one of the preceding claims, comprising a step in which said motion controller, on the basis of said data of the set of productivity indices associated with said respective directions of motion of said one or more terminal members, decides to take one of the following actions: - executing a direction of motion or path which is alternative to a pre-programmed direction; - executing a new path with an alternative final position, possibly not known a priori, which is different from a pre-programmed final position; - slowing down the motion of the robot; - stopping the motion of the robot. 5. Method for controlling the motion of one or more collaborative robots according to claim 4, wherein said controller for controlling the motion of one or more robots decides to take said actions on the basis of a priority mechanism that depends on the type of activity that the robot must carry out and/or the type of movement that said terminal member must make and/or a criterion of profitability of the task to be carried out. 6. Device for controlling the motion of one or more collaborative robots, characterized in that it comprises means for implementing the method according to any one of the preceding claims, said means comprising: - at least one vision system adapted to cyclically determine said data about the position p of the operator(s) over time. - means for determining said position coordinates of the robots and said position coordinates of one or more human operators, - means for determining said set of productivity indices associated with respective directions of motion of the terminal member of the robot. |

DESCRIPTION

Field of application of the invention

The present invention refers to the field of robotics and more precisely to collaborative robotics, and concerns a method and device for controlling the motion of one or more collaborative robots.

State of the art

The invention applies in the framework of industrial collaborative robotics. As known, the term collaborative robot means an industrial manipulator that can be put in operation without the use of protective barriers (physical, optical, etc.) to protect the human operator who could potentially come into contact with the robot.

Until the recent past, industrial robotics provided for the rigid segregation of robots in protected environments by means of physical infrastructures (railings or optical barriers). Today there is increasing awareness of the advantages that can be obtained by direct collaboration between man and robot, obtained through so-called collaborative robotics, by means of which it is possible to share the spaces between man and robot, and to a certain extent also to make them collaborate in performing sequences of operations.

The robot thus becomes a "workmate" of man.

Thus, problems arise in terms of ergonomics, but particularly physical safety for the people who could potentially come into contact with said robot, due to the possibility of absence of protective barriers, so that the operator and the various elements of the robot and of its terminal member can be very close to one another, sometimes even coming into direct contact.

For safety reasons, so-called "collaborative" robots must satisfy a certain number of standards and technical specifications. For example, standard UNI EN ISO 10218 (July 2011), in its two parts, defines the safety requirements for collaborative robots and the corresponding terminal members. Specifically, four man-robot collaboration modes are defined: hand-over window, interface window, inspection and collaborative workspace. Whereas the first suggest the presence of areas dedicated to interaction and their clear definition, in the others there is the possibility of operating collaboratively and continuously and not simply sporadically. The safety requirement that they share provides for the speed of the robot being controlled and reduced as a function of the minimum safety distance with respect to the operator. This situation creates clear problems of limitation of productivity. Recently a technical specification ISO TS/15066 has been issued that provides for the possibility for the robot to continue carrying out the processing, even in situations of extreme closeness to the operator, provided that the forces involved and the possible energy transferred during an accidental collision are kept below certain thresholds, still under debate, but certainly less than the pain threshold.

However, there is a reduction of the operativity of robots, including stopping, to ensure human safety, which causes significant industrial problems in terms of productivity and efficiency of the robots.

An example of a system for controlling a collaborative robot that suffers from the problems outlined above is described in patent application WO2014048444 Al, in which said control system operates in a context oriented towards the safety and comfort of the operator rather than the productivity of the robot or of the system consisting of the robot and the human operator.

Summary of the invention

The object of the present invention is a method and device for controlling the motion of one or more collaborative robots adapted for overcoming the aforementioned drawbacks.

The idea forming the basis of the present invention concerns the definition and the corresponding calculation of directions of motion for the terminal member (end-effector) of one or more industrial robots such as to optimize productivity, based on predetermined safety conditions.

Once this information on the directions of motion of optimal productivity is known, it is possible for the robot, in the case of the presence of obstacles to its pre-programmed motion, to choose alternative directions to the pre-programmed one along which to continue its motion, thus maintaining its productivity, and subordinately, slowing down or even stopping when none of the possible alternatives is such as to allow the robot to continue its task.

The present invention allows the optimization of any one of the following productivity factors of the robot, including their combination: speed or execution time of the tasks (they are dual: optimizing the speed also means optimizing the time and vice-versa), industrial profitability of the tasks (priority is given to the most profitable tasks among those that can be performed), energy efficiency. Hereinafter, only as an example, reference will be made to the optimization of speed as a productivity factor.

An object of the present invention is a method for controlling the motion of one or more collaborative robots, said one or more collaborative robots being mounted on a fixed or movable base, equipped with one or more terminal members, and with a controller of said motion, characterized in that it comprises the following iterative steps:

- determining the position coordinates of each one of said one or more collaborative robots and the position coordinates of one or more human operators collaborating with said one or more collaborative robots;

- determining a set of productivity indices associated with relative directions of motion of said one or more terminal members of said one or more collaborative robots, said productivity indices being indicative of the speed at which said one or more collaborative robots can move in each one of said directions without having to slow down or stop because of the presence di said one or more human operators;

- supplying to said motion controller the data of said set of productivity indices associated with said respective directions of motion of said one or more terminal members, so that said controller can determine the directions of motion of said one or more terminal members based on the higher values of said productivity indices.

Preferably said method for controlling the motion of one or more collaborative robots comprises a step in which said motion controller, based on said data of set of productivity indices associated with said relative directions of motion of said one or more terminal members, decides to take one of the following actions:

- executing a direction of motion or path which is alternative to a pre-programmed direction;

- executing a new path with an alternative final position, possibly not known a priori, which is different from a pre-programmed final position;

- slowing down the motion of the robot.

- stopping the motion of the robot. Another object of the present invention is a device for carrying out the method.

A particular object of the present invention is a method and device for controlling the motion of one or more collaborative robots, as better described in the claims, which form an integral part of the present description.

Brief description of the figures

Further purposes and advantages of the present invention will become clearer from the following detailed description of an embodiment thereof (and of variants thereof), and with reference to the attached drawings given purely for explaining and not limiting purposes, in which:

- Figure 1 shows a rigid rod to represent the generic link (see paragraph 3.6 in standard ISO 8373 :2012) of the robot and a pointed obstacle;

- Figure 2 extends what is shown in Figure 1 in the case of a generic, not pointed obstacle;

- Figure 3 indicates a flow diagram of the program that implements a part of the method object of the present invention;

- Figure 4 shows, as an example, a possible application scenario consisting of a robot, an operator, and a device that monitors the relative position of the robot and of the operator that carries out all of the instructions necessary to implement the method object of the present invention;

- Figures 5 and 6 show two possible modes of use of the result of the method object of the present patent;

- Figure 7 shows a flow diagram of the program that the controller of the robot can execute based on the results calculated by the device according to Figure 4 based on the present invention, in the case of execution of an alternative path to the pre-programmed one;

- Figure 8 shows a flow diagram of the program that the controller of the robot can execute based on the results calculated by the device according to Figure 4 based on the present invention, in the case of execution of a new path with alternative final position, possibly not known a priori, which is different from the pre-programmed final position.

The same reference numerals and letters in the figures identify the same elements or components.

Detailed description of embodiments

The system object of the invention applies to a collaborative robotics station that is made up of one or more industrial collaborative robots with series kinematics (i.e. a robot the links of which do not form closed kinematic chains), including the relative control system(s), which human operators are permitted to approach, so as to satisfy the aforementioned current safety standards.

Hereinafter, consideration will be given to the text of standard ISO 8373 :2012 integrated entirely for reference in the present description.

The system is able to determine the presence and the position of one or more human operators, to estimate the time evolution of the position of the operator, and to interface with the control system of the robot(s), so as to:

- define directions of motion for the terminal member of said one or more collaborative robots such as to maximize productivity, preserving safety conditions;

- offer the possibility of said one or more collaborative robots selecting alternative directions along which to continue its movement, thus maintaining its productivity, and subordinately, slow down till stopping when none of the aforementioned directions is such as to allow the robot to continue its task.

The method object of the invention is based on the following main characteristics:

(1) based on the position of the robot(s), mounted on fixed or mobile bases, and of the operator(s) and possibly of the prediction of their future position, it is capable, for each robot, of associating a determined direction of motion of the terminal member with a productivity index that indicates how quickly (or effectively if the productivity is not associated with the speed, but rather with the profitability or the efficiency of the tasks) the robot can proceed in a given direction without having to slow down or stop because of the presence of an operator;

(2) it determines the main directions of motion of each manipulator, organized in a decreasing manner as a function of a productivity index;

(3) it allows interfacing with the controller of the robot(s) for the purpose of the implementation of said functionality;

(4) it gives the robot(s) with which it communicates the possibility of modifying its path along the directions defined, without the need for these modifications to already be present and/or known a priori by the controller of the same robot(s);

(5) it allows wireless interfacing with WiFi interface network for communication with other devices (for example tablets, smartphones, etc.) for the configuration and/or the remote monitoring of the activity of the device itself and of the robot(s).

Therefore, the method for controlling the motion of one or more collaborative robots of the present invention substantially provides for the following iterative steps:

- determining the position coordinates of each collaborative robot, and the position coordinates of one or more human operators collaborating with the collaborative robots;

- determining a set of productivity indices associated with relative directions of motion of the terminal members of the collaborative robots: the productivity indices are values proportional to the maximum speed at which the collaborative robots can move in each one of the directions without having to slow down or stop because of the presence of the human operators;

- supplying to the motion controller the data of the set of productivity indices associated with the relative directions of motion of the terminal members, so that the controller can determine the directions of motion of the terminal members based on the higher values of the productivity indices.

Hereinafter, a brief summary of the closest prior art to the object of the present invention is given, as described in the publication: M. Ragaglia, A.M. Zanchettin, P. Rocco, "Safety- aware trajectory scaling for human-robot collaboration with prediction of human occupancy", International Conference on Advanced Robotics (ICAR), 2015, pages 85-90. Said publication is considered integrated entirely in the present description.

The safety standards in man-robot interaction impose that at all times it is necessary to satisfy a relationship that can be genetically expressed as:

where V is the speed of the robot, T _{s } is the stop time (i.e. the time necessary for the motion of the robot to come to a complete stop), S is the relative distance between robot and man, Δ is a safety parameter.

Let us consider a generic element (link) of the kinematic chain that constitutes the industrial robot, and on such a link, a generic point of coordinates r _{s } with respect to a spatial reference system (see Figure 1).

Using v _{s } to represent the speed of the aforementioned point and r _{obst } to represent the position of an obstacle measured in the same reference system in which the position r^is measured, the inequality (1) relative to the single point can be expressed as:

where is the transposed matrix of the vector v _{s }, whereas is the Euclidean

norm of the vector

The formula (2) can equivalently be expressed as:

Position r _{s } and speed v _{s } of the generic point on the link can be expressed as a function of the positions and of the speeds of the extreme points (r _{a } and r _{b }, v _{a } and v _{b } respectively) as follows:

with s [0, 1]. Processing the previous relationships, gives: where:

The left member of the relationship (5) is a linear function in s: this means that sufficient safety conditions are obtained by evaluating (5) at the ends of the rod:

where exchanging the operations of min and max at the right member, gives:

The term min represents, if positive, the distance between a sphere of radius

Δ centered in the point r _{obst } and the rod ends r _{a } and r _{b }.

Combining (6) and (7) gives:

Let us now introduce the vector that represents the joint speeds of the manipulator: these

are the time derivatives of the joint coordinates q, angular positions or linear displacements (depending on whether the joint is rotoidal or prismatic) that express the relative position of one link with respect to the previous one. Using n to indicate the number of links (and joints) of the robotic manipulator, q and are both vectors of dimensions n.

It is possible to link the linear speed v _{a } of the first end of the link to the joint speeds by means of a matrix, called Jacobian matrix, dependent on the joint coordinates q. Analogously for the speed v _{b } of the second end:

The Jacobian matrices J _{a } and J _{b } both have dimension (3 ^{χ } ri).

Numbering the n links of the robotic manipulator with the index i (/ ^{' } = and combining the relationships (9) and (10), the criterion of minimum distance of the obstacle in position r _{obst } relative to the link / can be expressed in the following form: where:

where r _{ai } and r _{bi } are the coordinates of the end points of the link / ^{' }, J _{ai } and J _{bi } are the Jacobian matrices of the speeds of the aforementioned points, whereas:

r _{si } is the vector of the coordinates of the generic point along the link / ^{' }.

The matrix E _{t } has dimensions (2 x ri) whereas the vector f _{t } has two components. The dependence of both magnitudes on the position r _{obst } of the obstacle is a direct consequence of their definition, whereas the dependence on the vector of the joint coordinates q derives from the fact that the positions of the ends r _{ai } and r _{bi } and of the generic point r _{si } depend on such joint coordinates.

Let us now consider an obstacle consisting of a generic object represented by a convex (polytopic) solid, like in Fig. 2.

In this case the condition (1 1) should be conceptually expressed for all of the infinite points belonging to the object. A sufficient condition so that the relationship is valid for every point is that the following relationship is satisfied:

where is the minimum distance from the link i to the obstacle able to be

calculated with one of the algorithms available in the literature (for example the GJK algorithm).

The relationship (15) can then be calculated (by linearity given the convexity of the object) only in the vertices of the obstacle:

Summarizing, for every link i of the robot and for all of the η points at the vertices of all of the obstacles it is necessary for relationship (16) to be satisfied.

Let us thus introduce the vector p that encompasses the coordinates p _{j } of all of the points at the vertices of the obstacles: p will thus have a number of components equal to 3*η.

Let us then define the matrix, of dimensions (2*n*η x n) :

And the vector of dimensions 2*n*η :

With these positions, the safety constraint can be expressed by the inequality:

At a certain moment in time, the current state of the robot is safe if the condition in the previous relationship is verified.

In relationship (20), E is a matrix of dimensions (2*n*η x n), where n is the number of joints of the robot and η is the number of points detected by the device that monitors the position of the operator. / is a vector of 2*n*η components, q is a vector with n components that identifies the configuration of the robot (like in the definition 3.5 of standard ISO 8373 :2012), and thus contains the n angular positions of the joints, q is a vector with n components that at each moment contains the time derivatives of the components of the vector q and thus the speeds of the joint coordinates, p is a vector of 3*η components that contains, for each of the η points detected on the operator, the 3 position coordinates. Such a vector can also contain the positions of such points, predicted at future moments.

If the obstacle is an operator, p contains the coordinates of some points detected on the body (for example: shoulders, head, elbow, hands).

The calculation of the matrix E and of the vector / thus requires knowledge of the coordinates q of the joints of the robot: they are available at all times by interrogating the controller of the robot. The calculation also requires knowledge of the coordinates p of the points detected on the operator. The ways in which the coordinates of such points are obtained is not relevant for the invention. On the market there are devices (depth cameras) that are able to return the information requested. The way in which the position of the points of the person is inserted in the calculation of the matrix E and the way in which it is possible to take into account the position taken up by such points in the following moments are described in detail in the aforementioned article [ICAR 2015].

The object of the invention concerns the use of some indices derived from such matrices to determine the best direction of motion for the robot.

In particular, the invention exploits the geometric structure of the aforementioned matrices, obtained from the Singular Value Decomposition (SVD):

As known from the theory of singular value decomposition, U is an orthogonal square matrix of dimensions (2*n*η x 2*n*η), S is a matrix of dimensions (2*n*η, n) containing the so-called singular values of the matrix E, V is an orthogonal square matrix of dimensions (n x n), V is the transposed matrix of V. The matrix V contains an organized set of directions (orthonormal vectors) in the space of the joints (see the definition 4.7.4 of standard ISO 8373 :2012) in which the robot is potentially more or less productive. Indeed, using v* to indicate the i-th column of the matrix V or of the matrix -V, a variable that can be easily determined is the maximum speed able to be obtained in such a direction, such as not to violate the safety requirement (20). For this reason, for each of the directions v it is necessar to set up the optimization problem:

such that:

where is the vector of the maximum speeds that the single joint coordinates can assume and the second of the conditions (22) is taken element by element of the vectors involved.

For each of the directions v in the space of the joints of the manipulator, it thus concerns determining the maximum intensity of the speed φν _{; }, so that such a speed respects the

safety constraint and is element for element lower than the maximum allowed.

The value of the index i such that the corresponding value is higher corresponds to

the best direction (in the space of the joints) in which the robot can move, without having to slow down significantly its speed due to the presence of the human operator.

However, it is of greater interest to relate the productivity to the base coordinates system (see the definition 4.7.2 of standard ISO 8373 :2012), rather than to the space of the joints. For this reason the Jacobian matrix J(q), of dimensions (3 x ti), is used, which links the linear speed of the characteristic point of the terminal member TCP (Tool Centre Point, definition 4.9 of standard ISO 8373 :2012) to the speeds in the space of the joints, according to the relationship:

The speed in the space of the joints will thus result in the following speed of the TCP: For each value of the index i, the Euclidean norm of the vector given in (24):

represents the productivity index of the direction in the base coordinates system, identified by the unitary vector:

Expressions (25) and (26) jointly represent a method for determining the direction in the base coordinates system in which the robot can move without danger of having to decrease its speed due to the presence of the human operator, maximizing productivity.

As an example, two possible ways of use of the directions of motion and of the productivity indices associated with them are given.

Figure 5 shows a first way of use in which the robot 42, with a terminal member TCP, exploits one of the directions calculated to modify its original path, adding a fly-by point (definition 5.7 of standard ISO 8373 :2012) before reaching its target 51 (Destination Station) starting from a starting station 52. In figure 5 it is possible to see the solid curved line, as a deviation with respect to the dashed straight line that intercepts an operator 41. Of particular relevance is the description of the way in which the result of the operations shown in the flow diagram of Fig. 3, described hereinafter, can be used to determine the initiation point.

Using x to indicate the current position of the characteristic point of the terminal member TCP in the base coordinates calculated through forward kinematics (see the definition 4.1 of standard ISO 8373 :2012), the initiation oint can be calculated as:

In (27) δ is a generic number comprised between 0 and 1, i.e. 0 < δ < 1, whereas T _{s } is the stop time, already introduced in (1). For its definition reference should be made to standard EN 60204-1 and in particular to the stop of category 1. The parameter δ can be used to determine how much the trajectory of the robot can depart from the predefined path. It is advantageous to select a high value (close to one) for such a value if the terminal member of the robot is sufficiently far from its target, and a lower value (close to zero, but still positive) when the robot is already close to the work station that it must reach. As an example, such a parameter can be selected as the cosine of the angle between the vector joining the current position of the robot and the corresponding target and the vector corresponding to the direction of productivity (26), multiplied by the corresponding productivity index (25) and by the stop time.

For the selection of the best fly-by point, the following is carried out:

(1) determine the optimal productivity directions that do not take the robot away from its target;

(2) among these directions select the one associated with the maximum value of the productivity index in (25), in the case of more than one optimal direction, the first it taken arbitrarily.

(3) determine the value δ, for example as described earlier;

(4) temporarily interrupt the motion of the robot

(5) add a fly-by point calculated like in (27)

(6) update the journey towards the target point

(7) reset the motion of the robot.

A second example of use is given in Figure 6. In particular, in this case it is possible for the terminal member TCP of the robot 42 to totally abandon the execution of the current task, which, starting from station 61, would involve approaching destination station #1, to carry out a certain operation, in favour of a new task to be carried out at the destination station #2. In this case, the directions determined in the method object of the present invention, together with the productivity indices defined previously, can be used to determine which station is easier to reach as a function of the safety constraints and from the current position of the operator detected with the points p. The directions of optimal productivity (26) and the relative indices (25) are used to determine the easiest target to reach among all of the possible alternatives. In particular calling the possible alternative targets xj;

(1) the direction of productivity (26) most similar to the direction that joins the current position of the robot x to the target xj is determined;

(2) the estimated time to reach each target is determined as the ratio between the distance between the current position x and the target xj and the corresponding productivity index;

(3) the target that minimizes such a value is selected.

With reference to Figure 3 the operative flow diagram of the method object of the invention is now described.

After the operative start step, there is the setup of the algorithm and of the data structures (block 300). In particular, in the initialization step, the algorithm that implements the method object of the present invention reads from a suitable configuration file all the information relative to the kinematic structure of the robot (lengths of the links, see point 3.6 of standard ISO 8373 :2012, and other kinematic parameters) and of the detection device of the points on the obstacle, hereinafter defined "sensor" (position and absolute orientation of the sensor with respect to the global coordinates reference system, etc.). Other relevant information concerns the mode of communication between the device that implements the method described here and the robot (protocol, TCP/IP port, IP address of the robot(s), etc.).

Then the configuration of the robot(s) (block 301) is read cyclically, with a suitable frequency, i.e. the linear/angular positions of each axis of motion, collected in the vector q, and their speeds (time derivatives of the above) q are determined.

Then the position values of a (configurable) number η of points detected by the sensor on the operator are read, collecting their coordinates in the vector p. (block 302).

Then comes the calculation of the formula (20) expressed above, in other words the calculation of the matrix E(p, q) and of the vector f(p, q). (block 303).

Then the productivity indices are determined based on the matrix E(p, q) and on the vector f(p, q). (block 304).

In detail, this point is articulated in the following passages:

^{■ } The Jacobian matrix J(q) of the terminal member TCP of the robot (block 305) is calculated;

^{■ } The singular value decomposition (SVD) of the matrix E is calculated, obtaining the matrices U, S and V, like in (21) (block 306);

^{■ } The matrix V containing the columns of the matrices V and -V (block 307) is constructed;

^{■ } For every column i of V the corresponding is calculated solving the problem

(21)-(22) (block 308);

■ For every column i of Ϋ the directions of motion of the TCP and the corresponding productivity indices are calculated according to (25) and (26) (block 309).

Finally, the directions of motion and the productivity indices thus calculated are sent to the controller of the robot (block 310).

The operations of blocks 301-310 are carried out cyclically with a certain time period.

With reference to Figure 4, a block diagram of the system in which the device object of the invention operates is shown in an operative condition.

As an example, the case is shown of a single operator 41 and of a single planar robot 42, comprising a terminal member TCP, for which four possible directions are highlighted, organized as a function of the corresponding productivity index. Four values #1 - #4 are given, as a function of the direction of theoretical movement of the terminal member of the robot. It should be noted that the index of greatest value is the one that faces in the opposite direction to that of presence of the operator.

The device 44 object of the invention, which communicates bidirectionally with the controller 45 of the robot, comprises at least one vision system, for example depth cameras defined above, of the per se known type, adapted for cyclically determining the position data p (shoulders, elbow, hands, etc.) over time of the operator(s).

The device 44 also receives from the controller 45 the current position data of the robot q and calculates the speed thereof (comparing the current position with that at the immediately preceding moment). These data are updated cyclically.

These two pieces of information (current position and speed), together with the kinematic structure of the robot (which is supplied to the device in the installation/configuration step) are sufficient for the application of the method object of the invention described above. As far as the use by the robot of the productivity indices, calculated in accordance with the present invention, is concerned, the controller of the robot can perform selection based on the following alternatives, highlighted with reference to figures 7 and 8.

Figure 7 shows a flow diagram of the program that the controller of the robot can execute based on the results calculated by the device object of the invention, in the case of execution of an alternative path to the pre-programmed one.

After the START step, it updates the robot configuration q (block 70).

Then, the reception of directions, productivity indices and path recalculation request take place (block 71). Then the controller verifies whether an alternative path is possible (block 72).

If it is not possible, it controls the reduction of the speed of the robot, possibly to the point of completely stopping the motion thereof (block 73).

On the other hand, if it is possible, it passes to the execution of the alternative path (block 74).

More in particular it calculates all of the possible initiation points using directions and productivity indices received by the device of the invention (block 75). Then it selects the best initiation point coherently with the position to be reached (block 76). Then it interrupts the execution of the current path (block 77). Then it adds the coordinates of the initiation point to the current path (block 78). Then it reactivates the execution of the updated path (block 79).

The operations of blocks 70-79 are carried out cyclically.

Figure 8 shows a flow diagram of the program that the controller of the robot can execute based on the results calculated by the device object of the invention, in the case of execution of a new path with alternative final position, possibly not known a priori, which is different from the pre-programmed path.

After the START step, the robot configuration q is updated (block 80).

Then the reception of directions, productivity indices and path recalculation request takes place (block 81).

Then the controller verifies whether an alternative final position, possibly not known a priori, is possible (block 82).

If it is not possible, it controls the reduction of the speed of the robot, possibly to the point of completely stopping the motion thereof (block 83).

On the other hand, if it is possible, it goes to the execution of the new path with alternative final position (block 84).

More in particular, it selects the best direction of productivity coherently with all of the possible final positions able to be reached (block 85). In other words it selects the productivity index proportional to the maximum speed at which the collaborative robot can proceed in that direction without having to slow down or stop.

Then it interrupts the execution of the current task (block 86). Then it executes the new movement towards the identified position (block 87). The operations of blocks 80-87 are carried out cyclically.

Moreover, the controller can establish that no alternative path is possible, and it thus decides to slow down the robot to the point of stopping if necessary.

In the embodiments described above reference has been made to simplified variants of presence of a collaborative robot and a human operator. However, it is clear that the method and the device object of the invention are applicable to the more general case of presence of many collaborative robots and many operators.

The case of many human operators does not actually involve any modification to the method object of the invention, in the sense that in the set p of points belonging to the operator all of the points will be included belonging to all of the operators that the device will be able to detect in the work area of the robot, since all of the operators present in the area monitored by the device, together with the prediction of the motion of each one, will be considered as obstacles for each robot.

As far as the case of presence of many collaborative robots is concerned, every robot, taking into account all of the operators presents, will apply the method in object calculating its own productivity directions/indices, such as to give each robot, in an independent manner, the possibility to modify its own path.

Summarizing, the method object of the invention makes it possible to supply the controller(s) of the robot with a series of productivity indices and relative directions.

On the controller side of the robot it makes it possible to select among the following possibilities, which also depends on the type of activity that the robot must carry out, for example what type of movement its terminal member must carry out, and/or based on a criterion of profitability of the task to be carried out:

1) change task/target of the robot, with execution of a new path with alternative final position, possibly not known a priori, which is different from a pre-programmed final position;

2) avoiding the obstacle/operator by the terminal member, with execution of an alternative direction of motion or path to a pre-programmed direction;

3) slowing down and possibly stopping.

The choice among these possibilities, as described above, can be made through a priority mechanism. Whereas alternative 3) is always possible, 1) and 2) may not be usable in certain applications or at certain moments. For example, if for a certain task of the robot there is not an alternative target, only options 2) and 3) are applicable.

As priority mechanism, it is also possible to use profitability criteria of the task: if a task for the robot has a high added value for the production context in which it is inserted, then it is better to take it to its conclusion avoiding the obstacle like in point 2). If there is the possibility of interrupting the current task to undertake a more profitable one then 1) is better. The priority mechanism can be preset in the robot.

The method object of the present invention can be advantageously carried out at least in part through a computer program that comprises encoding means for performing one or more steps of the method, when this program is executed on a computer. Therefore, the scope of protection is meant to extend to said computer program and also to computer- readable means that comprise a recorded message, said computer-readable means comprising program encoding means for performing one or more steps of the method, when said program is executed on a computer.

Said computer program, described by the flow diagram of Figure 3, can be written with any programming language. The programs executed by the controller of the robot, exemplified by the flow diagrams of Figures 7 and 8, can be written with a programming language known to those skilled in the art, for example RAPID, KRL, URscript, VAL, Karel.

Variant embodiments of the non-limiting example described are possible, without moreover departing from the scope of protection of the present invention, all comprising the equivalent embodiments for those skilled in the art.

The elements and the characteristics illustrated in the different preferred embodiments can be combined with each other without moreover departing from the scope of protection of the present invention.

The advantages deriving from the application of the present invention are clear.

The optimization of performance in terms of productivity of a collaborative robot, the decrease of the cycle time also in the presence of one or more human operators, greater (cognitive) decisional capability for the robot and the increase in safety perceived by the human operator are obtained.

By means of the present invention it is possible to interpret the intentions of the human operator, and to a certain extent predict the behaviour thereof, so as to prevent the robot from stopping. For this purpose, alternative strategies for executing the operations of the robot are provided that take into account information coming, for example, from vision sensors so as to ensure, at all times, optimal levels of productivity, not only for the robot(s), but for the entire work station (operators and robot).

From the description given above those skilled in the art can achieve the object of the invention without introducing further constructive details. In particular, by applying their knowledge, they will be able to make the programs that implement the functions of the method from only reading what has been described above.