A Feasibility Study of a Robotic Approach for the Gluing Process in the Footwear Industry

Manufacturing processes in the shoe industry are still characterized to a large extent by human labour, especially in small and medium craft enterprises. Even when machinery is adopted to support manufacturing operations, in most cases an operator has to supervise or carry out the task. On the other hand, craft footwear industries are called to respond to continuous challenges to face the globalization effects, so that a rapid adaptability to customer needs is required. The industry 4.0 paradigms, which are taking place in the industrial environments, represent an excellent opportunity to improve the efficiency and quality of production, and a way to face international competitors. This paper analyses and proposes a robotic cell to automatize the process of glue deposition on shoe upper, which exploits a new means of depositing the glue compared to State-of-Art applications. While the latter mainly adopt glue gun spraying systems or pneumatic syringes, the proposed robotic cell is based on an extrusion system for the deposition of molten material originally in the form of a filament, similar to all extent to those adopted for Fused Deposition Modeling (FDM). Two cell solutions are designed and tested. In the former the extruder is the robot end effector and the shoe upper is grounded to the cell frame. In the second, being the reciprocal, the shoe last is clamped to the robot wrist and the extruder is fixed to the cell frame. The peculiarities of the two solutions are pointed out and compared in terms of cell layout, hardware, programming software and possibility to develop collaborative applications. A self developed slicing software allows designing the trajectories for glue deposition based on the CAD model of the shoe upper, also allowing driving the inclination of the extruder nozzle with respect to the vectors normal to the upper surface. Both the proposed cell layouts permit to achieve good quality and production times. The solution with the mobile extruder is able to deposit glue at highest end-effector speed (up to 200 mm/s). On the other hand, the solution with the mobile shoe upper and fixed extruder seems to be more appropriate to enhance collaborative applications.


Introduction
The shoe industry is characterized by both functional and fashion goals, the main functions a shoe must perform being protection, comfort, and style. A large variety of materials can be used to satisfy both the requirements: despite leather being the primary raw material in earlier styles, it has remained at present a standard mainly for expensive dress shoes, whereas many other types of materials can be exploited to enhance any shoe's specific aim.
To cover a large variety of types and styles, while offering a desired-by-the-market product, a growing number of big brands and startups rely on the potential of footwear mass customization strategies [1]. This means that the flexibility of the production has to be guaranteed, usually with the side effect of rising the complexity and the cost of the production plants. To allow the manufacturing and assembling process to be modified and adapted quickly and in an easy way to any modifications to the shoe design, it is necessary to adopt re-configurable machines which can be reprogrammed without major changes. However, most of shoe production processes currently require the intervention of manpower to be executed [2], with strong implications on production times and safety. The introduction of automation would imply a reduction of the number of human operators required, thus reducing production costs [2].
In the last two decades, many authors introduced solutions for the automation of parts of the entire process of shoe manufacturing. Some example can be found in [3] for lasting operation, in [4] for grinding, in [3,5,6] for roughing, in [7][8][9] for sole bonding, in [10] for sole grasping, in [11] for finishing operations. In [12] the authors propose an automated production plant for mass customized production, and in [2] the advantages of using a new integrated design and production process are outlined.
The coupling between the shoe upper and the sole is one of the latest operations to be performed, and it is often identified as the bottleneck of the production [13]. The lower and upper parts are united using different techniques, which depend on the type of shoe to be produced, as well as on the machinery and technology available to carry out the job. There are three major assembling techniques that are used in the shoe industry [14]: • cementing: the upper body and the lower part are assembled together using adhesives; • injection: the sole is injected into a mold, in direct contact with the upper part; • stitching: the two parts are assembled using threads.
Among the above mentioned procedures, the cementing process offers several advantages of a more flexible and homogeneous joint, better aesthetic properties and the feasibility of the automation process [15]. However, the cementing activity is recognized as one of the most critical operations in the shoe manufacturing [15]. It includes the preparations of the materials, the cleaning and treating of the surfaces to be assembled, and the preparation of the chosen adhesive solutions. The upper is usually stretched over a last (i.e., a fixture representing the shape of the foot) and attached to the bottom through an assembling process [16].
Most of the state-of-art papers dealing with the issue of automation of glue deposition exploit a non-contact deposition system based on a spraying gun moved by robot, with the workpiece placed on a worktop [7,8,17]. On the other hand, in fields of application other than the footwear industry, gluing systems with a fixed syringe and the workpiece moved by the robot were proposed too [18].
The most recent and advanced solutions in shoe manufacturing [7,8] consist of depositing glue on the sole, so that the problem can often be assimilated to a 2D problem. In case of soles for shoes with heels a 3D analysis is required, and the third dimension is only exploited to keep the glue gun at a constant distance from the sole surface.
A very relevant enhancement of this research also consists of the possibility to define automatically the robot path based on the outcome of visual techniques [7,8,17,19], also able to identify the sole shape and position.
This paper focuses on the design of a robotic cell for the automation of the process of glue deposition on the shoe upper, which exploits a new means for glue deposition, based on an extrusion system to melt and deposit the adhesive material on the shoe upper through a nozzle. The extruded glue, initially in the form of a solid wire, is a prototype product produced by a third-party company. This technology allows a more localized deposition of material, compared to standard methods. It is derived from the field of additive manufacturing [20], where advanced robotic solutions were proposed to overcome the limits of traditional cartesian robot. The proposed system is therefore completely representative and assimilable to an Additive Manufacturing application, carried out by exploiting a 6 d.o.f. robot [21].
During the glue deposition process, a proper contact force must be maintained between the extruder nozzle and the upper surface to get proper glue deposition, so that the proposed robotic cell exploits a force feedback control in parallel to the position control. Compared to previous robotic solutions for the shoe industry [6], this paper also presents an enhancement for the tool path generation: in the proposed application the orientation of the extruder nozzle can be indeed continuously oriented with respect to the vector normal to the shoe upper surface, as an outcome of a dedicated slicing software based on the digital model of the shoe upper.
Two cell solutions are discussed in the paper: • Mobile extruder cell type: the last is anchored to the ground and the robot holds a mobile extruder for glue deposition; • Fixed extruder cell type: the extruder for glue deposition is grounded to a fixed frame, and the shoe last is anchored to the robot and moved to reach the desired poses with respect to the fixed glue extruder.
Both the solutions are investigated and compared, with the aim of assessing the most feasible one. The first discriminant factor is the feasibility to realize the related robotic cell layout, which involves the issue of manipulating the hot-extruder through a robot in the former case, or using the robot to grip the shoe last in the second case. The two layouts involve two different ways of using the robotic resources: in case of mobile extruder the robot is necessarily dedicated to a single process and must be retooled to execute different operations. On the other hand, when the robot holds the shoe last, several processes can be executed with different fixed tools (e.g., cementing, roughing, power pressing) without the need to dismount the shoe last from the robot wrist.
The paper is organized as follows: Section 2 describes and compares the layouts of the two proposed solutions for the robotic cell, focusing on the extrusion system, on the exploitation of the force control to guarantee a proper contact between the extruder nozzle and the deposition surface, and on the electronic control system for synchronizing the robot movements and the glue flow from the extruder. Section 3 describes the slicing software developed to define the path for glue deposition on the upper surfaces and discusses the main differences in the software required for the two alternative solutions, with moving and fixed extruders. Section 4 reports the experiments carried out and the achieved results. Finally, conclusions are drawn in Section 5, outlining the pros and cons of the two proposed layouts.

Robotic Cell Layouts
The robotic cells proposed for the automated deposition process are composed of two main subsystems:

•
A system for deposition of molten material, consisting of an extrusion system to be commanded synchronously with the robot's movement, so as to provide the exact quantity of adhesive. • A 6 d.o.f. manipulator, which fulfills the task of positioning the system for material deposition relatively to the shoe upper. Figure 1 represents the two alternative configurations proposed for the usage of the robot manipulator, both of them aimed at governing the relative position and orientation between the glue supply system and the 3D-shaped surface of the shoe. A former configuration (Figure 1a) relies on a mobile extruder, and consequently on an orientable nozzle, directly connected to the robot wrist, with the shoe being steadily grounded into the operational space. Conversely, the second configuration is based on a fixed nozzle, grounded into the operational space, with the robot wrist holding and handling the last and the shoe upper worn onto it. This layout is represented in Figure 1b. The extruder is held by a supporting structure, whereas the last is clamped by a fastener linked to the robot wrist. During the adhesive deposition the tool supplies a suitable flow of glue at a chosen rate, in order to deposit the required adhesive film over the curved surface. The material has to be deposited on both the bottom and the side part of the shoe upper. Figure 1 represents the cell layouts exploiting the collaborative Techman Robot TM5-700, even if also the industrial robot Mitsubishi RV-2F-Q has been considered in the present analysis. The extrusion system, specifically designed to facilitate the filament provision, can be exploited in both the configurations proposed, being either mounted on the wrist of the robot or on a fixed frame which would keep it in a set location. It was specifically designed and assembled with customized components, to enable the possibility to interchange any item, code and robot during the tuning and the experimental phases. It is composed of a stepper motor (NEMA 17, 400 Steps per Revolution, 0.34 Nm stall torque) to control the filament feeding to an hot-end, at the desired flow rate. The adhesive adopted is a prototype product produced by an third-party Company. It is in the form of a filament with diameter equal to 3 mm, and has to wet the shoe upper surface in order to guarantee a stable and durable bond. The extruder motor is coupled with a speed reducer (ratio 1/3) that directly drives the filament to the hot-end at a feeding speed of around 2 mm/s. The hot end is able to guarantee the temperatures required by the specific glue adopted, in the range 285-295 • C. The nozzle diameter is equal to 0.8 mm.
The control of the extrusion system is achieved by an Arduino Mega-based board combined with a shield featuring as stepper driver (DRV8825 up to 1/32 microstepping), with a MOSFET transistor commanding a heat cartridge (12 V, 40 W) and with a temperature sensor (PT1000) placed in proximity of the extrusion nozzle. Based on this measure and on the reference temperature, the specifically Arduino firmware closes a PID feed-back loop to command the MOSFET and the heat cartridge.
The extrusion system can be set to act as a server or client in a LAN, to which the robot is connected too. While the connection is on, the Arduino firmware awaits incoming messages to operate the extruder. The possible commands are related to the step speed, the temperature set and read, fan speed and software reset.
The value of material flow rate as a function of the robot speed was preliminary defined based on the standard equation governing the deposition process in Additive Manufacturing processes, i.e., the continuity equation between the mass of filament pushed forward by the stepper motor and the mass deposited on the substrate.
Equation (1) represents the relationship between the flow rates at the printing bed (i.e., shoe upper surface), at the nozzle output, and at the feeding gear respectively, under the assumption that the material density ρ is not significantly affected by the extrusion process. The cross sections at the nozzle outlet and at the feeding gear can be considered circular in shape, with diameters d n and d f respectively, which allows a straightforward computation of the corresponding areas. In standard additive manufacturing applications a gap h is kept between the nozzle and the deposition surface during the deposition process. In such a case, when the extruded material hits the deposition surface, the resulting geometry can be expected to resemble a rectangle with rounded sides, providing that the width w of such rectangle is minor than the outer diameter of the nozzle D n [22].
The area of the strand on the substrate can be therefore written as [23]: The selection of the parameters w and h allows evaluating the area A wire in Equation (1). The value of the deposition speed V robot (i.e., relative speed between the nozzle and the shoe upper surface along the deposition path) allows evaluating the actual speed of the extruded filament V f eed .
The above described formulas can be applied in the case of an actual additive manufacturing process. However, when the deposited material is an adhesive in the form of a filament, which was the case considered in the present paper, the nozzle has to get in contact with a proper force with the deposition surface, as to enable the adhesion of the molten material. In such a case, the suitable relationship between the material flow rate and the robot speed has to be calibrated experimentally.
The design of the path that the manipulator has to follow to generate the needed trajectories between the nozzle and the upper surfaces is one of the most relevant issues of the proposed application. The trajectories are firstly evaluated based on a CAD model of the shoe upper, and on a slicing software specifically developed for this purpose. The software outputs a six dimensional path (i.e., positions and angular orientations) to be followed during glue deposition on both the bottom and side part of the shoe upper. Once this trajectories are defined off-line with respect to the upper geometry, the robot motion has to be designed. Two different procedures can be followed according to the setup being either with mobile extruder or mobile last.
For the former case, the extruder can be considered as the end-effector of the robot, once its dimensions are fully defined, and the robot can consequently be easily programmed to make the nozzle get in contact with the upper surface with the desired poses. On the other hand, an alternative algorithm is adopted in the case of the movable last. In this latter case, the surfaces of the shoe upper, on which the fixed nozzle has to draw the path, are moved in three dimensions together with the last. The poses output by the slicing software are firstly referred to a single point of the last, whose distance with respect to the clamp, and consequently to the robot wrist, is known. The details of the slicing software, and the way it is used to generate the end-effector path, are described in the next paragraph Section 3.
During the glue deposition process, a proper contact force must be maintained between the extruder nozzle and the upper surface. Inaccuracies in the shoe upper CAD model or misalignment in the last clamp can lead to detachments or sudden increase of the contact force, the latter resulting in a nozzle closure. For these reasons, a mere geometrical approach might require a calibration after each change of setup, which would definitely be rather time consuming and unsuitable for customized mass production. On the contrary, an effective solution would require all the production phases to be prepared in advance, during the design phase of the specific shoe model. For this reason, the propose robotic cell exploits a force feedback control, in parallel to the control position: the tentative trajectories previously defined off-line are adjusted online through a force control with constant reference force along the direction of the nozzle axis. An external load cell is attached between the robot wrist and the extruder in the setup with movable extruder (see Figure 1a), and between the robot wrist and the shoe upper in the setup with fixed extruder (Figure 1b). The target maximum linear speed for glue deposition is 200 mm/s, which should be reached guaranteeing a proper contact force between the extruder tool and the shoe upper to be glued, as discussed in Section 4.

Path Generation Algorithm
The algorithm to generate the robot poses can be divided into three parts: a first one defining the path to be followed on the shoe upper surfaces during the glue deposition process; a second one exploiting this path to effectively command the robot in the joint space; a third part for singularity and collision checks.
As for the first step, there are, in the literature, several methods exploitable to extract the path from the CAD model of a shoe, mainly based on the computation of the intersection between the object and a reference surface. As an example, in case of a STEP model the intersection can be found analytically as in [24,25]. In case of a STL model, some examples of the slicing process are [26], which exploits a method based on neighbouring points to get the surface variation, and [27], tailored to spherical cutting surfaces.
The method proposed for the present application is instead based on an algorithm normally used to evaluate overlapping objects in collision detection theory [28]. The slicing procedure is carried out as a procedure for identification of collisions between the shoe object and a selected surface, then identifying the locus of the intersecting points. This method allows exploiting the same algorithm libraries for both the path planning and collision checks, thus reducing the time required to update the software in case of any modifications to the robotic cell required to accomplish with a change of production. The solution proposed offers to the end users a series of libraries and combinable functions to ease the path extraction from the CAD model, by queuing perimeters and infills.
The software, described in Section 3.1, is able to output a 6 dimensional path characterized by the position coordinates (x, y, z) and by the components (cos(ξ), cos(ψ), cos(φ)) of the unit vector normal to the surface in each point, defined in an absolute reference frame. When generating the deposition path, therefore, the software allows considering not only the positions where the shoe upper and the extruder nozzle have to get in contact, but also the orientation of the nozzle axis with respect to the surface normal direction.
The second part of the algorithm consists of the programming of the robot poses and of joint positions to generate the desired trajectories on the shoe upper. As already mentioned, this step is rather straightforward in the case of the mobile extruder solution, whereas some additional geometrical transformation must be applied in the case with fixed extruder and mobile shoe upper. In the former case, indeed, the extruder can be defined as a tool in the robot controller, by specifying its constant dimensions and the constant distances between the tool center point and the robot wrist. Once the position of the shoe upper, clamped and grounded to the frame of the robotic cell is set, and once the deposition path with respect to the shoe upper is fully defined as an output of the slicing software, the robot can be easily programmed. An example of such an application is presented in [29], where a standard six DOF anthropomorphic manipulator (ABB IRB2400/16) is equipped with a force controlled head to accomplish roughing task on the side and bottom surface of a shoe upper.
On the other hand, in the case of mobile shoe with the last clamped to the robot wrist, the path output by the slicing software must be referenced to a unique frame belonging to the shoe last, whose origin's position and angular position with respect to the robot wrist are known. The mathematical steps of this transformation are described in Section 3.2.
The singularity and collision check algorithms adopted in this work are carried out with the self-implemented code described in Section 3.3, allowing firstly to solve the inverse kinematic and to identify the presence of any singularity in the solutions, and then to check for self-collisions between the robot arm and the tools, or collision between the robot arms and any other object in the robotic cell.

Slicing Software
The slicing software performs its calculation on an input CAD model of the shoe upper geometry, in the format of an STL file, which must be available from the shoe manufacturer. Both ASCII or binary STL files can be directly loaded in a Matlab procedure (stlread function), or Python procedure (numpy-stl library, PyPi repository), which return the mesh in terms of connectivity list and vertices. Normal vectors can be also obtained from the built-in functions, or directly computed from the definition of each triangle of the mesh. The loaded data then undergo a pre-processing routine to repair possible defects in the model (e.g., gaps, mixed normal, overlaps), and to reduce the size of the stored variables by eliminating repetitions of the same points (i.e., shared ordinates) defining the mesh.
As an example, for a starting geometry of 104,338 triangles defining a mesh of a shoe upper (corresponding to 313,014 points), only 52,169 points unequivocally describe the related geometry. As a rule of thumb, the point to describe the desired geometry are reduced by one sixth.
A further viable mean to reduce the computational costs of the path generation consists of cutting the geometry under analysis. In the case of the shoe upper, only the portion of the upper where the glue is to be deposited can be selected. This region is identified as the area of interaction between the upper and the sole in the final shoe.
A graphical representation of the input and output of this step can be observed in Figure 2, representing the original picture, the model of the shoe upper and the selected portion where the glue has to be placed. The figure also represent the position of the seam. The slicing algorithm uses the position of the seam as reference contour for the evaluation of the trajectories where the glue has to be deposited, the seam position being directly computed from the STL file in the slicing software.
As it can be observed in the upper shape reported in Figure 2, the seam correspond to an abrupt variation in the vector normal to the surface. Its points can be therefore found by identifying the mesh triangles where a sudden variation of normal vector n i direction occurs.
For each triangle, the angular distance between the normal vector n i and the unit vector defining the vertical reference direction n ideal can then be computed using the inner product θ i = arccos(n i · n ideal ) Figure 3a represents the trend of the θ angle obtained for the shoe upper considered in the present work. Two groups of angles can be identified, one in the range from 50 • to 100 • degree, corresponding to the mesh of the side surface of the upper, and a second one in the range from 0 to 20 degree, corresponding to the mesh triangles belonging to the top surface of the shoe upper. A threshold value to discern the two groups of points can be defined (e.g., 35 • ) to separate the mesh triangles belonging to the top surface (red normal vectors in Figure 3b) from those belonging to the side surface (green normal vectors in Figure 3b). The actual points defining the seam contour can then be identified by intersecting the model of the shoe upper with a suitable cutting surface (defined by a list of points and relative connectivity list). The generation of this cutting surface starts with the projection of the triangles belonging to the top surface cluster (characterized by the red arrows in Figure 3b) onto a plane parallel to the X-Y plane (whose normal vector coincides with n ideal ). This plane corresponds to the lower base of the cutting surface and it is defined at a height Z lower equal to: Z lower = min(P z ) − having indicated with P z the vector of the Z coordinates of all the points belonging to the shoe upper and being a safety margin used to guarantee the intersection.
Then an alpha-shapes based algorithm [30] is exploited to get only the boundary points (i.e., the seam) that functionally serves as base for the cutting surface. To characterize the cutting mesh, the base is extruded along the n ideal direction by creating a duplicate of these points on a plane at Z equal to: The connectivity list is reconstructed using a counter j belonging to [1,Np), where Np is the number of points constituting the lower contour. For each j, two triangles are demarcated: where the Lower and Top labels indicate the points belonging to the lower and upper base respectively.
By intersecting the shoe model with the cutting surface just generated, the actual profile of the seam is computed. The final seam line is represented in Figure 3c, together with the corresponding unit vectors normal to the surface.
Once the seam line has been identified, the desired path for glue deposition is computed in a similar manner, by exploiting the intersection between suitably defined surfaces and the STL mesh of the shoe upper. The seam contour is scaled inward to generate multiple concentric perimeters on the top surface of the shoe upper (using algorithms derived from computer aided machining, such as [31]). Each scaled contour is projected on the X-Y plane, and a new surface is extruded in the n ideal direction to identify the actual intersection with the top surface of the upper. This operation is repeated for the desired number of perimeters. The final path is composed of different lines, perimeters and infills defined as the coordinates of points on the shoe upper surface and the corresponding unit vectors normal to the surface. An example is reported in Figure 4a. Figure 4a also report the presence of infills, visible in the toe area. Infills are generated by identifying the intersection between additional surfaces, generated by using userdefined primitives with a selected patterns (e.g., lines generating parallel planes), and the shoe upper surface. For instance, parallel lines can be used to define the path for glue deposition in the correspondence of the tip and heal of the top surface, as represented in Figure 4b. The generation of the path on the lateral surface of the shoe upper still relies on the seam contour, but this time the slicing surface changes. The cutting plane is obtained by lowering the seam along the n ideal direction by the requested quantity and by generating two child curves inward and outward, so that the surface between these two boundaries intersect the portion of the upper.

Robot Programming
This subsection describes the further mathematical steps needed to program the robot, for both the two considered cell types, with mobile and fixed extruder respectively.
The path generated after the slicing procedure consists of a series of points (position coordinates (x, y, z)), to be reached by the tip of the extruder nozzle for glue deposition, and of the direction cosines (cos(ξ), cos(ψ), cos(φ)) of the vector normal to the shoe upper surface in each point. Starting from these path coordinates, the poses of the End Effector (EE) throughout the entire glue deposition process have to be defined. In the cell layout with the mobile extruder the EE consists of the extruder itself, whereas for the cell layout with fixed extruder the EE consists of the gripping system for the shoe upper.
The EE reference frame is conventionally defined with the Z axis exiting the tool (Denavit and Hartenberg's conventions). In the cell layout with mobile extrusion system the EE frame is therefore defined with Z axis parallel to the extruder nozzle and entering the shoe surface. On the other hand, in the layout with mobile shoe and fixed extruder, the EE frame is defined with Z axis perpendicular to the robot wrist flange, oriented outwards of the shoe gripper and exiting the shoe surface.
In both the cases, during the deposition process, the EE has to be oriented so that the vectors normal to the shoe upper surface identified by the slicing procedure lay in the same direction as the extruder, or even inclined at will with respect to it.
The former solution (i.e., mobile extruder) is more straightforward from the programming point of view: when the extruder is mounted on the robot wrist, it can be defined as the robot tool, as its geometry is known. Once the shoe upper is positioned and grounded to the cell frame, the path obtained as an output by the slicing software can be referred to the absolute reference frame of the robot base, and be adopted as the starting point to define the poses of the end effector: based on the geometry of the extruder the position coordinates are set, so that the extruder nozzle gets in contact with the workpiece surface along the deposition path; the vectors of the path normal to the shoe upper surface are then used as a reference direction to orientate the extruder axis.
The second cell layout with fixed extruder and mobile shoe upper requires some further mathematical steps, but also in this second case the sequence of EE poses can be completely generated offline in advance, based on the output of the slicing procedure. The main issue in this case consists of the fact that the path for the glue deposition is traced onto the shoe upper driven by the robot, which makes the relative positioning and orientation of this curve with respect to the glue supply system a bit more tricky. The procedure to define the EE poses requires an intermediate step in which the path generated by the slicing software is referred to a single reference frame belonging to the shoe last, clamped by the gripper mounted on the robot wrist, whose positions and orientation with respect to the reference frame of the robot wrist is therefore known. This intermediate step allows defining the deposition path coordinates with respect to the reference frame of the robot wrist. The vectors normal to the shoe upper surface can then be oriented with respect the axis of the fixed extruder.
For both the considered cell layout, once the orientation of the EE z axis is defined, either the X or Y axis orientation has still to be defined to fully define the EE pose. For a given path generated by the slicing procedure, indeed, an infinite number of EE poses can guarantee the contact between the upper surface and the extruder nozzle with a given orientation of the extruder with respect to the normal direction to the shoe upper surface. Among this infinite number of solutions, the feasible subset is shall accomplish to several constraints, the main ones being: • Collision: no collision are admitted between the bodies in the cell, particularly in this application in which hot surfaces might damage the robot and the electrical wires. • Range of motion: in addition to the need that a waypoint has to be reachable, rotation around the tool axis might be limited in range for a given machines. Therefore, paths that leads to continuous rotation of the wrist joint J6 through consecutive points have to be checked. • Tool cabling: tool wires can limit the range of motion of the robot either due to their pulling action (thus increasing the payload and reducing the accuracy) or due to the need of avoiding excessive twist.
Different approaches were adopted in the present work to define a tentative orientation of the EE for each point of the shoe path, later tested for collision or infringement of the range of motion. The techniques exploited to define a full orientation for the EE are: tangential vector, world direction cosine alignment and Rodrigues' rotation formula.
The tangential vector alignment uses the points in the shoe path to approximate the vector tangent to the curve, and to build a right-handed reference system for each point of the deposition path in which the x axis is oriented as the tangent to the path, and the z axis as the normal to the shoe upper. By imposing the direction of the x unit vector of the extruder reference frame (both in the case of movable or fixed extruder) to be aligned with the x direction of the path local frame, the rotation matrix can be fully defined.
In the World direction cosine alignment case, the right-handed local reference frames along the deposition path are defined to have the z axis oriented as the normal to the shoe upper, and the x axis as close as possible to a constant direction defined with respect to the shoe geometry. To this aim, the y unit vector is defined through the vector product between the normal to the upper surface and the reference direction. The x direction of the local reference frame is then determined to complete the right-handed reference frame. The EE poses are then defined by orienting each x unit vector of the path local frame along the x unit vector unit vector of the extruder reference frame (both in the case of movable or fixed extruder).
A third solution uses Rodrigues' rotation formula to compute the rotation matrix to align the upper surface normal vector to the Z axis of the tool. This also maps the entire EE frame to the path as required, even if in this latter cases the actual direction of the X or Y axis of the EE frame is not directly controlled.
In the following, for the sake of conciseness, only the mathematical steps related to the Rodrigues' rotation formula in the case of the cell layout with mobile shoe upper are addressed.
The schematic cell layout is reported in Figure 5: the absolute reference frame adopted is reported in red at the robot base frame; the vector p k represents the position vector of the tip of the extruder nozzle, p ee the position of the EE reference frame and p tool the position of each point of the shoe path relative to the tool reference frame. The steps adopted for the evaluation of the rotation matrix to define the EE poses can be defined with reference to Figure 6, represented in 2D instead of 3D for ease of reading. The left side Figure 6a represents an initial position of the system, in which the vector v, normal to the shoe surface, is not yet oriented as the extruder axis V target . The robot wrist reference frame is colored in blue. The vector p describes the relative positions of the deposition path points with respect to the robot wrist relative frame.
When considering an initial vector v in 3 and a unit vector w defining the rotation axis around which v rotates by an angle θ r (Figure 6), the rotation matrix can be computed as: so that the new rotated vector is Both the rotation axis w and the rotation angle θ r are the unknown to be evaluated in the presented application, v being the initial vector normal to the shoe upper surface and v rot the final vector oriented as the extruder axis (or at will with respect to it). The term sin(θ r )K of Equation (3) can be determined as: where the elements of the matrix are the components of the k vector, computed as: and oriented as the unit vector oriented w.
The remaining term to be computed in Equation (3) is cos(θ r ), which can be obtained through the dot product between the normalized vectors v and vrot.
The rotation matrix bringing v into vrot is then computed substituting the calculated terms in Equation (3). Please note that a dedicated rotation matrix must be calculated for each one of the points defining the deposition path along the shoe upper surface, but all these step can be defined at the design stage of the cell layout, provided that the CAD model of the shoe upper is available. After the EE poses generating the desired toolpath are fully defined, they can be forwarded to the robot controller (physical or virtual for offline simulation), to compute the joint positions and check their feasibility.
The above-described procedure is rather flexible: in case of any modification to the geometry of shoe upper, to the last, to the holding support or to the nozzle, which might be needed to adapt the robotic cell to the production of a new shoe model, only the algorithm input data (i.e., geometrical data) have to be uploaded, without the need of advanced programming skills, and therefore suitably for the application in craft small and medium size enterprises. The generality of the solution keeps holding for different shoe models, which is a remarkable result to enable flexibility of the proposed automatic cell.

Collision and Process Checks
The proposed solutionswere developed and tested with a collaborative robot (Techman TM5-700), and with an industrial robot (Mitsubishi RV-2F-Q), for which different approaches were adopted in defining the robot instructions, to better comply with the built-in functionalities.
All the possible control strategies were simulated before being tested in the realized test bench. A dedicated simulator environment for the solution of the inverse kinematic (IK) problem, able to simulate any of the above mentioned robot types, is developed according to references [32,33] and integrated at the end of the slicing software. The solutions obtained as EE poses after the slicing procedure can then be automatically checked and selected on the basis of their feasibility. Among the total number of solutions obtained in the joint-space coordinates (i.e., 8 in case of the 6 d.o.f. manipulators exploited in the present work), some might present indeed singularities or unreachable points (i.e., path coordinates presenting no kinematic solution).
Particular care must also be paid to select a solution in which the orientation of the robot wrist does not generate hazardous twisting of the cables directed to the extruder, to the load cell, and to the glue filament under extrusion. Under this perspective, the cell layout with fixed extruder is definitely preferable.
After discarding the solutions not feasible from a kinematic point of view, the ones remaining need to undergo a collision and self-collision check, before being validated: no contact has to occur between the bodies in the cell, especially in this application in which hot surfaces might damage the robot and electrical wires. Also the software for collision check is self-developed and integrated within the slicing software, since the algorithm for checking the contact between surfaces is the same exploited in the slicing software described in Section 3.1 to identify the intersection between the workpiece model (i.e., stl file) and the auxiliary surfaces. To the aim of collision check, the subroutine of Section 3.1 can be simplified, since there is not the need to evaluate the exact intersection path between the two surfaces, but only to update a Boolean variable that specifies the presence or absence of contact. The procedure developed in the code allows selecting the desired degree of accuracy in modelling the geometries of the involved bodies, which can be even reduced to rectangle-parallelepiped-shaped blocks, to reduce the computational cost to the maximum extent. When a collision between the bodies is identified, the code returns a Boolean value and the indexes of the bodies that collided.
In the case of a single machine cell such as the one analysed in the present paper, collision is most likely to occur between the tool and the robot arms (i.e., self-collision), or between robot parts and other fixed objects in the robotic cell. These types of collisions are not dependent on the simulation time, but only on the joint positions. They can only be avoided by changing the tool-path engineered, so that the first decision the algorithm takes is to discard these configurations. Should all of them be eliminated, the algorithm secondly checks for the presence of any external object interfering with the robot, and report it for removal. If on the other hand the detected collisions are self-collisions, the corresponding toolpath points have to be redesigned. It can be done by joining two different kinematic solutions, or partially redesigning the pose path.

Experiments and Results
The objective of the experimental phase is the assessment of the capability of the developed system to guarantee a regular glue deposition over the shoe upper surface, along the designed trajectory. Based on glue producer's specifications and preliminary tests, a target contact force is set at 5 N. In any case, a good quality of glue deposition is expected provided that the contact force is within the range 2-10 N [34], so that the experimental tests are just aimed at verifying the absence of severe contact losses ore force peaks.
According to the manufacturer involved in the present activity, a deposition speed around 100 mm/s could guarantee satisfying cycle times, being a good compromise between the need of getting the lowest as possible cycle time, and the capability of the robot built-in control to actually keep a proper contact force on the shoe 3D surface. The latter gets more challenging as the Tool Contact Point (TCP) speed increases. For these reasons, experimental tests investigated the resulting contact force with TCP linear speed ranging between 50 mm/s and 200 mm/s. The highest limit shall accomplish the maximum speed prescribed by ISO 10218 [35] standard for any robot operating in the proximity of a person (i.e., 250 mm/s), whereas the lower limit is selected to get a low-speed case to be used as a reference for comparison with higher speeds. In the entire speed range considered, the regularity of glue flow (see Equation (1)) shall be guaranteed by the designed hardware.
The control parameters are firstly set up on a linear trajectory going from the shoe heel to the tip, and then exploited for the complete tool-path following the shape of the shoe upper.
For the process of glue deposition in the footwear industry, a positional error up to few millimeters can be accepted [7,36], so that the performance of the robotic cell can only be evaluated by measuring the contact force between the nozzle and the upper surface and by eye inspection. The Industrial robot Mitsubishi RV-2F-Q and the collaborative robot TM5-700 exploited in the tests feature indeed a repeatability equal to +/− 0.02 mm and +/− 0.05 respectively. No visual system to check the geometry of the glue strip was developed at this stage of the research activity, even if some methods to inspect the glue dispenser route have already been proposed in the literature for applications requiring higher accuracy in other fields [37,38].

Mobile Extruder
In the case of the cell layout with mobile extruder, the force measured is affected by the inertia of the extruder (around 0.3 kg), which should therefore be compensated to get the actual contact force between the extruder and the shoe upper surface. The efficacy of the control for different linear speeds was assessed by adopting a low weight feeler (i.e., 0.05 [kg] ) built with ABS through FDM process, so that the contact force can be directly assimilated to the force measured by the load cell.
In the case of Mitsubishi industrial robot the final parameters adopted are Gain = 20 [µm/N] and Damping coefficient = 0.1 [N/(mm/s)] [34]. Figure 7 reports the results of the measured contact force for linear speeds of the end effector equal to 50 mm/s ( Figure 7a) and 100 mm/s (Figure 7b), and the 3D trajectory followed by the extruder tip on the shoe upper surface (Figure 7c). During the experimental tests the robot is firstly controlled with the position control mode to reach a starting point close to the shoe's surface. The force control mode is then activated (Figure 7c), while the tool keeps on following the predefined trajectory.
As a comparison, Figure 8 reports the contact force results achieved with the mobile extruder in the case of the collaborative TM robot, at the speeds of 100 mm/s (Figure 8a) and 200 mm/s ( Figure 8b). When comparing the force results at the speed 100 mm/s in Figures 7b and 8a, no relevant differences are detected for the purposes of the application, so that the suitability of exploiting a collaborative robot in the cell for glue deposition is also confirmed.
The experimental results showed a full capability of the system (no matter which is the kind of robot adopted) to get the linear speed of 200 mm/s, whereas, when dealing with the capability of maintaining the proper contact force, the results show an increase of the standard deviation of the contact force starting from the speed of 100 mm/s. Figure 9 shows, as an example, the trend of the standard deviation of the contact force and the corresponding contact losses obtained with the Mitsubishi robot in the speed range from 50 mm/s to 200 mm/s. The contact loss is defined as the percentage of samples in which the contact force gets lower than 10% of the average target force (i.e., F < 0.5 N), over the total number of samples.
Despite the fact that the standard deviation of the contact force increases for increasing speed, a low percentage of contact loss (0.2%) is detected, only for the speed of 200 mm/s. As recalled in [34], the presence of short detachment does not affect the possibility of depositing the melted glue on the shoe upper surface.

Fixed Extruder and Mobile Shoe Upper
In the case of the test cell with mobile shoe upper and fixed extruder, in which the shoe last is directly attached to the robot wrist, the control performance are expected to be intrinsically worse, due to the higher inertia attached to the robot wrist and to the fact that the moments applied to the robot wrist rapidly vary as a consequence of the relative position between the extruder tip and the shoe upper surface: with reference to the setup represented in Figure 1b, indeed, for a given contact force between the extruder and the shoe upper surface, lower moments are generated when the extruder is in contact on the heel rather than when the contact is on the tip. Figure 10a,b report as an example the results achieved with TM robot at the speed of 50 mm/s and 100 mm/s respectively. In Figure 10b two detachment are observed around 3 s, corresponding to the zone of the sharp curve of the shoe upper toe.
It can be therefore concluded that the application with the mobile shoe should run at lower speed compared to the case with mobile extruder, which would imply longer glue deposition time for each shoe. However, this drawback would not make the overall cycle time achievable with this cell layout necessarily longer, thanks to other pros this cell configuration leads to. When the shoe upper is directly hold by the robot, indeed, right after the glue deposition phase it could be directly driven to the press for sole fastening, without the need to re-grip the workpiece.
Moreover, when the shoe upper is moved by the robot and the hot extruder is fixed, the robotic cell could more easily be upgraded to become a collaborative robotic cell [39,40], thanks to the fact that this solution shows no hot-mobile parts in the operational space, thus enabling a higher degree of security for the operators.
The use of a collaborative robots would open to relevant advantages in terms of improvement of the organization of manufacturing industries, allowing the introduction of robot in craft enterprises without the need of major changes in the layout of the production floor. This would be particularly relevant in an environment such as the one typical of small and medium-sized shoe manufacturing enterprises, where the shoe production process still involves human labor to a large extent.

Conclusions
This paper presented all the hardware and software steps developed to study the feasibility of an automatic cell for glue deposition on a shoe upper. A robotic approach is considered, rather than a dedicated automated machine, to increase flexibility in case of relevant variations of the product, and the possibility of the robotic cell to be adapted to a vast variety of processes.
Shoe manufacturing is normally characterized by small and medium-sized craft enterprises, where the shoe production process still involves human labour to a large extent. The possibility of a safe interaction of the operator in the collaborative working area of the machine, and the development of an easy-to-program robotic cell, would therefore pave the way to the introduction of automation in such an environment.
Two robotic cell are developed and compared, the former with the extruder hold by the robot wrist and fixed shoe upper, and the reciprocal with fixed extruder and the shoe upper hold by the robot wrist. A dedicated extruder for the deposition of melted glue on the shoe upper is built and syncronized with the robot movements, and a self-developed slicing software was suitably used to automatically generate the deposition trajectory, starting from the digital model of the shoe upper.
Thanks to the measure of the force exerted between the extrusion tool and the shoe upper, and to the exploitation of the force control mode of the robot, the possibility to maintain a proper contact force between the extruder and the shoe upper is investigated for two different cell layouts, in the speed range from 50 mm/s to 200 mm/s. In the former case it is possible to get to maximum deposition speed of 200 mm/s, with positive force or limited contact loss percentage. On the other hand, the performance of the second cell layout are a bit worse (i.e., relevant detachments at the speed of 100 mm/s), thus requiring lower speeds. However, this second cell layout shows relevant pros, such as the possibility to reduce the number of grips, thus reducing the overall cycle time, and its intrinsically safer applicability in collaborative applications. In the latter case, indeed, the fixed extruder could be placed in a restricted area out of the collaborative zone.
We believe that the proposed system can be used as a safe and flexible tool in small and medium manufacturing enterprises and artisan, for the automation of their production processes and to satisfy market demand.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.