Towards Optimized Distributed Multi-Robot Printing: An Algorithmic Approach
Kedar Karpe, Avinash Sinha, Shreyas Raorane, Ayon Chatterjee, Pranav Srinivas, Lorenzo Sabattini
TTowards Optimized Distributed Multi-RobotPrinting: An Algorithmic Approach
Kedar Karpe , Avinash Sinha , Shreyas Raorane , Ayon Chatterjee , PranavSrinivas , and Lorenzo Sabattini Department of Electronics and Communication Engineering,SRM Institute of Science and Technology, India kedarprasad [email protected] Department of Sciences and Methods for Engineering (DISMI),University of Modena and Reggio Emilia, Italy
Abstract.
This paper presents a distributed multi-robot printing methodwhich utilizes an optimization approach to decompose and allocate aprinting task to a group of mobile robots. The motivation for this prob-lem is to minimize the printing time of the robots by using an appropriatetask decomposition algorithm. We present one such algorithm which de-composes an image into rasterized geodesic cells before allocating themto the robots for printing. In addition to this, we also present the designof a numerically controlled holonomic robot capable of spraying ink onsmooth surfaces. Further, we use this robot to experimentally verify theresults of this paper.
Keywords: multi-robot coordination, distributed printing
Multi-robot systems have presented themselves as a systematic means of per-forming large and complex tasks by leveraging coordination among compara-tively simpler robots. Based on the team composition, such systems are gener-ally classified in two ways: homogenous and heterogeneous multi-robot teams.Homogenous teams comprise identical robots from both a hardware and controlperspective. Whereas, heterogeneous teams can comprise of two or more typesof robots. While both kinds of systems have their own set of advantages in re-spective applications, we are particularly interested in homogenous multi-robotsystems.In our work, we consider the problem of large-format printing using a groupof homogenous mobile robots. Since distributed printing is not a widely ad-dressed topic in the literature, we pivot our study mainly to task decompo-sition and coverage control algorithms for multi-robot systems [6, 7, 9, 13]. [9]discusses a distributed coverage control algorithm based on Boustrophedon de-composition. The work aims at achieving coverage of virtually bounded areasfor applications such as lawn mowing, chemical spill clean-up, and humanitar-ian de-mining. Looking at a different perspective, [13] considers the problem of a r X i v : . [ c s . R O ] F e b Kedar Karpe et al. coordinating AGVs inside a warehouse. The work presents a way to partition amap into smaller sectors such that the problem of coordination between AGVsis localized only to the intersection of such sectors, thus reducing interactionsbetween the vehicles.In this paper, we present an optimized distributed multi-robot printing sys-tem for printing large images on smooth surfaces. Additionally, we present thedesign of a holonomic mobile robot to perform such printing experiments. Someof the preliminary results of our work are also presented in [8]. However, the ma-jor contribution of this paper is the task decomposition, which divides an imageinto geodesic cells, similar to [4, 13], before allocating them to each robot. Thealgorithm builds upon the classical clustering problems studied vastly in the fieldof data science. Our work assumes the rasterization of images to be an optimalprinting method over any other toolpath planning schemes and hence, the algo-rithm presents itself as a scalable means of decomposing images for allocatingthem to a group of robots.K.H Lee and J.H. Kim have addressed a similar distributed printing prob-lem in [11]. They present a mobile printing system (MPS), which uses a geneticalgorithm to distribute printing data to the robots. However, the algorithm pre-sented in their paper has two major drawbacks: (1) The task allocation methodresults in heavily overlapping trajectories. Since this method relies on an ex-ternal arbitration controller for collision avoidance, the increase in the possiblenumber of collisions directly affects the total printing time; (2) The authors as-sume the print graphic to be a set of spline curves. While this assumption mightsignificantly reduce a priori computational cost, the method is not scalable forprinting intricate 2-dimensional graphics. In this paper, we try to address thesedrawbacks by making use of non-overlapping geodesic cells for task allocation,and by assuming graphic images to be a set of pixels rather than spline curves.
Consider the problem of coordinating N SPRINTER robots to print a rasterimage of size u × v pixels. Let x i ∈ R be the position of each i − th robot withan associated single integrator kinematic model:˙x i = u i (1)where, u i is the control input to the robot. For simplicity, let us considereach i − th robot to be a cirlce with an associated radius r i and a random initialposition x i (0) = ( x i (0) , y i (0)).Let T i be the time contributed by each i − th robot to complete its printingtask. The total printing cost (TPC) of the process is seemingly the maximumof the set of all times T i taken by the robot to individually complete their task.Our aim is to minimize this cost, which leads us to the formulation:minimize T P C = minimize max( T , T , T , ..., T N ) (2) ptimized Distributed Multi-Robot Printing: An Algorithmic Approach 3 Since the printing mechanisms use rasterized images, for simplicity, let usconsider an image as a set of pixels P = { p k : k = 1 , , , ..., u × v } . Each pixel p k has an associated position x k ∈ R and an associated binary value δ k . Aunity value of δ k corresponds to an ink spray at the pixel’s position, and is zerootherwise . Hence, we define the set of ’printable’ pixels as P = { p k : δ k = 1 } and a set of ’non-printable’ pixels as P = { p k : δ k = 0 } .The individual cost function T i of each robot can be computed as a linearfunction of the number of pixels or alternatively, the total distance traveled bythe robot. We define the robot velocity as a piecewise linear function: V ( p k ) = (cid:40) V travel p k ∈ P V print p k ∈ P (3)Fig. 1: Velocity profile of the robot at various instances of path traversal.Figure 1 depicts the robot velocities graphically. We define our individualcost function of each robot as: T i = (cid:80) ρ V print + (cid:80) ρ + (cid:80) ρ break V travel (4)where, ρ is the distance along ‘printable’ pixels, ρ is the distance along‘non-printable pixels’ and ρ break is the distance traveled between consecutiverows.Finally, since the sum of individual costs is constant for a given image, weformulate our objective function as a maximization problem of the product ofall individual costs:max N (cid:89) i =1 T i = max( T × T × T × ... × T N ) (5)In the forthcoming sections, we discuss a geodesic cellularization method forclustering the pixels of an image such that the objective function in Equation 5is satisfied. In this paper, we consider only binary raster images due to hardware limitation ofthe robot. But this work can be easily extended to higher dimensional images simplyby considering all pixels which have a value greater than 0. Kedar Karpe et al.
As outlined in the previous sections, we cluster our image into geodesic cellsbefore allocating them to the robots. The objective of our pixel clustering methodis to allocate printing data to the robot in such a manner that requirements ofthe formulation in Equation 5 are met.Since the primary goal of this paper is to present a distributed printingsystem, we believe that having an optimal solution for Equation 5 is trivial.Moreover, since the pixel distribution in images can be invariably stochastic,modeling a clustering problem that satisfies Equation 4 is quite complex. Hence,we resort to using a suboptimal method, and empirically provide performanceguarantees for the system.Our geodesic cellularization approach is based on the well known k-meansclustering algorithm [5]. By minimizing the within-cluster variances of ‘printable’pixels, we minimize the magnitude of quantity affected by V travel in Equation 4.In addition to the general k-means problem, we impose an additional constraintthat ensures each geodesic cell has an equal number of ‘printable’ pixels, therebymaintaining the cost function in Equation 5.Since we have N robots available, our aim is to obtain N geodesic cells froma given image. Consider x m as the position of m − th pixel p m ∈ P of the imageand µ n as the mean of the n − th cluster, and let M be the cardinality of theset P . Using Lemma 2.1 in [2], we reformulate the k-means clustering problemas a bilinear program:minimize µ,W M (cid:88) m =1 N (cid:88) n =1 W mn ( 12 (cid:107) x m − µ n (cid:107) ) (6)subject to N (cid:88) n =1 W mn = 1 , m = 1 , ..., M (7) W mn ≥ , m = 1 , ..., M ; n = 1 , ..., N (8) M (cid:88) m =1 W mn ≥ (cid:22) MN (cid:23) , n = 1 , ..., N (9)In Equation 6, W mn is the selection variable whose binary value representsif the m − th pixel belongs to the n − th cell. The constraint in Equation 9imposes bounds on the number of pixels in a cell thereby equalizing the numberof ’printable’ pixels in each geodesic cell.We solve the formulation in Equation 6 using an iterative refinement tech-nique given by Lloyd’s algorithm. Since the solution of the k-means clusteringproblem is known to be highly sensitive to its initial conditions, we initializethe cluster means using k-means++ seeding algorithm [1]. Thus, the solution ofEquation 6 can be obtained iteratively in 3 steps: ptimized Distributed Multi-Robot Printing: An Algorithmic Approach 5 Cluster Initialization:
Initialize the cluster means µ n ( t = 0), where t isthe number of iterations, using k-means++ algorithm.2. Cluster Assignment:
With W mn ( t ) as the solution to the linear program-ming problem at the t − th iteration, evaluate Equation 6.3. Cluster Update:
Update cluster means µ n ( t + 1): µ n ( t + 1) = (cid:40) (cid:80) M m =1 W mn ( t )x m (cid:80) M m =1 W mn ( t ) if (cid:80) M m =1 W mn ( t ) > µ n ( t ) otherwise (10)After the initialization in Step 1, iterate over Step 2 and Step 3 until thecluster means stabilize. Figure 2 shows results from a clustering experiment ona sample image. The solution of the experiment is shown as geodesic cells andtheir respective means in Figure 2(a). Figure 2(b) shows the stabilization inthe cost function for up to 10 iterations. Figure 2(c) represents the number of‘printable’ pixels in each cell while Figure 2(d) shows the cluster means over the10 iterations.In Section 5, we present detailed empirical proofs which suggest this methodto be a suboptimal solution for the formulation in Equation 5.Fig. 2: This figure represents the results of an geodesic cellularization experimentwhich uses constrained k-means clustering. The goal of performing cell assignment is primarily to obtain a collision-free pathbetween the robots’ initial positions and their respective cells, whilst minimizingthe sum of the travel costs of the robot. Additionally, we also ensure that thesepaths are collision-free. Such assignment problems have been generally solved inthe literature as a linear assignment problem of minimizing the sum of distancestraveled by robots [14]. These linear problems can be easily solved in polynomialtime, but they do not guarantee collision-free paths. [15] presents a variationof the centralized assignment problem which minimizes the sum of integral of
Kedar Karpe et al. squared velocities instead of the sum of distances, and additionally guaranteescollision-free paths if a bound on the initial positions of the robots is satisfied.In this work, we consider minimizing the sum of integral of robots’ squaredvelocities, which is similar to minimizing the sum of squared distances betweenthe initial and goal positions, for two main reasons:1. Minimizing the sum of squared velocities ensures collision-free paths as pre-sented in [15].2. Additionally, since this cost function is strictly convex, it leads to a lowersum of squared distances compared to the linear assignment problem, thusreducing the perturbation caused to the printing cost.Even though this method leads to a quadratic assignment problem which isNP-hard, suboptimal algorithms can be used to obtain a solution in polynomialtim for a small nuember of robots.The solution to task allocation problem seeks an
N × N assignment matrix φ such that: φ i,j ∈ { , } , ∀ i, j ∈ { , , , ..., N } (11)We define an extended assignment matrix Φ = φ ⊗ I n , where I n is an identitymatrix in n dimensions and ⊗ is the Kronecker product. Let x i ( t ) be the positionof the i − th robot at time t, and µ j be the position of the j − th goal, whichis also the centroid of the j − th geodesic cell. We define the stacked positionvectors as X ( t ) = [x ( t ) (cid:124) , x ( t ) (cid:124) , ..., x N ( t ) (cid:124) ] (cid:124) and C = [ µ (cid:124) , µ (cid:124) , ..., µ N (cid:124) ] (cid:124) , where X ( t ) ∈ R N × n and C ∈ R N × respectively. Our aim is to find N finite timetrajectories for the robots γ ( t ) : [ t , t f ] → X ( t ), where, t and t f are the initialand final times respectively. We define additional boundary conditions on theinitial and final positions of the robots and also ensure each robot is mappedonly to one cell: γ ( t ) = X ( t ) Φγ ( t f ) = C (12) φ (cid:124) φ = I N (13)In this solution to the assignment problem given by [15], clearance require-ments for the trajectories are ignored. Rather, the authors set a bound on theseparation between the initial positions which guarantee that the generated tra-jectories are always collision free. Under the assumption that clearance require-ments do not exist, we formulate the assignment problem as:minimize φ,γ ( t ) (cid:90) t f t ˙ X ( t ) (cid:124) ˙ X ( t ) dtsubject to (11) , (12) , (13) (14)Equation 14 can be reformulated as a linear assignment problem in Φ andsolved using Hungarian algorithm [10]. We then obtain the trajectories for the ptimized Distributed Multi-Robot Printing: An Algorithmic Approach 7 robots using: γ ( t ) = (cid:18) − t − t t − t f (cid:19) X ( t ) + (cid:18) t − t t − t f (cid:19) ( ΦC + ( I Nn − ΦΦ (cid:124) ) X ( t )) (15) Given r i as the radius of the i − th robot, collision free trajectories can beguaranteed if: (cid:107) x i ( t ) − x j ( t ) (cid:107) > √ r i where, i, j ∈ { , , , ..., N } (16)For a detailed analytical proof of performance, refer to Lemma 1 in [15].
In this section, we present the outcomes of simulations of the proposed multi-robot printing method.
With the objective of comparing the evolutionary distributed printing algorithmin [11] to the algorithm presented in this paper, we performed simulations on afixed set of sample images. To keep the comparison fair, we make the followingassumptions:1. Both methods use an equal number of robots.2. The robots in both methods have the same printing resolution.3. Velocities of both robots are identical.Figure 3(a) shows the cost of the genetic algorithm converges to its minimawith consecutive iterations. The trajectories of all the robots for the entire dura-tion of the printing process are shown in Figure 3(c). Note how the trajectoriesoverlap, thus increasing the probability of collision arbitrations.
Using the results of the cellularization algorithm in Section 3, we developed visualsimulations to verify the distributed printing method presented in this paper.Each robot rasterizes its respective cell and moves in discrete steps using theBresenham’s Algorithm. The simulation stops when all the robots have reachedthe last row of the rasterized image. The printing progress at different timeintervals is shown in Figure 4.Figure 3(d) represents a set of robot trajectories using geodesic clusteringfor the same image sample used in simulating the evolutionary algorithm. Forthe comparison between the two methods to be unbiased, we used identicalsimulation parameters to generate the trajectories. The primary takeaway fromFigure 3(d) is that the collision arbitrations occur only at the boundary of eachcell. Thus, they do not contribute to the total printing costs as much as theoverlapping trajectories in Figure 3(b).
Kedar Karpe et al. (a) (b)(c) (d)
Fig. 3: (a) Cost function of the genetic algorithm, (b) Individual printing costof each robot in the simulation, (c) Robot trajectories of distributed printingusing evolutionary algorithm, (d) Robot trajectories of distributed printing usinggeodesic cellularization.
Since finding a solution to the optimization problem in Equation 5 by using theproperties in Equation 3 is quite complex, thus we leverage the clustering algo-rithm in Section 3 to compute a suboptimal solution to the optimization problem.In this section, we empirically prove that the geodesic cellularization algorithmis indeed an affordable suboptimal solution to the formulation in Equation 5with respect to distributed multi-robot printing.Since the total rasterized length over an image is a linear sum of the lengthsof each robot’s trajectories, intuitively we can say that the objective function inEquation 5 will be maximized when the printing times taken by all robots areequal. In Figure 5, we have presented the printing times of 5 robots for 8 distinctimage samples. We can say that the optimality of these solutions obtained fromthe geodesic cellularization algorithm can be deduced by the ‘flatness’ of theprinting cost curves. That is, if the empirical printing times of all robots areequal, then the solution is considered optimal.Additionally, the best case and worst case solutions are also presented in thefigure. The best-case scenario would be the case where the symmetrical rotationorder of the image equals the number of robots used for printing. Whereas, theworst-case scenario would be that of an image with a checkerboard pattern.We can note that even the worst-case solution presents itself to be an feasiblesolution for multi-robot distributed printing. ptimized Distributed Multi-Robot Printing: An Algorithmic Approach 9(a) Progress: 0% (b) Progress: 50% (c) Progress: 100%
Fig. 4: Trajectories of robots at various durations of the simulation.Fig. 5: Printing time of each of the 5 robots for 8 distinct printing experiments.
We built the SPRINTER robot to perform experiments on the distributed print-ing algorithm presented in this paper. The robot’s design brings together inkjetprinting and discrete linear actuation capabilities in order to perform the printingexperiments. The robot is designed to be a 4-wheeled quasi-holonomic platformwhich accepts numerical control commands to deposit ink in a 2-dimensionalcartesian plane. The motivation behind the design of the SPRINTER robot was to experimen-tally verify the algorithms presented in this paper. Hence, most of the robotparts are constructed out of 3D printed materials (ABS+PLA). The robot’schassis comprises three distinct layers: a top layer, an intermediate, and a bot-tom layer respectively. The design of the chassis is modular, and more layers can The platform is a 4-wheel holonomic robot, but rotation around the axis passingthrough the centre of the robot is restricted through software.0 Kedar Karpe et al. be easily added to accommodate any additional components. Figure 6(a) showsan exploded view of the SPRINTER robot’s design.The top layer houses the AprilTag [12] fiducial marker for global positioning.The intermediate layer holds the controller ciruit board of the robot. And thebottom layer houses the four stepper motors and a lithium-ion battery whichpowers the robot. The inkjet cartridge is also placed on this layer.Fig. 6: (a) Exploded view of the SPRINTER robot designed for printing experi-ments. (b) Electronics architecture of robot. (c) Custom controller circuit boardof the SPRINTER robot.
We developed a custom controller circuit for the SPRINTER robot to accom-modate all the electronics in its small footprint. The circuit was fabricated ona 2-layer printed circuit board. It mainly consists of a primary microcontroller,an auxiliary microcontroller, a motor driver circuit, and an inkjet driver. Thearchitecture of the controller board is shown in Figure 6(b). All the electronicsdraw current from an on-board lithium polymer battery which also drives theinkjet cartridge and the stepper motors. ptimized Distributed Multi-Robot Printing: An Algorithmic Approach 11
Modified Bresenham’sAlgorithm for integral coordinates
Given ( x , y ) and ( x , y ) ∆x = x − x and ∆y = y − y j = y ¯ (cid:15) = ∆x − ∆y for i = x to x − do Go to ( i, j ) if ¯ (cid:15) ≥ then j + = 1¯ (cid:15) − = ∆x end if ¯ (cid:15) + = ∆y end for We use a modified version of Bre-senham’s Algorithm [3] to discretizethe locomotion of the robot. Bresen-ham’s Algorithm defines a method toobtain nearly continuous trajectoriesusing discrete motion. The modifiedversion of this algorithm assumes thestart and end coordinates to be in-tegral multiples of the step size ofthe motor. Consider an initial point( x , y ) and destination point ( x , y )in the coordinate space represented asa grid having cell dimensions equal tothat of the step size and the variables ∆x = x − x , and ∆y = y − y .We define the driving axis DA as theaxis being tracked and passive axis P A as the axis which evolves auto-matically. x -axis is chosen as the driv-ing axis if | ∆x | ≥ | ∆y | , and y -axis if | ∆x | < | ∆y | . Next, we define error (cid:15) as the negative distance, from any pointon the line joining initial and goal locations to the top edge of the grid cell atthat point and ¯ (cid:15) = ∆P A(cid:15) . The Bresenham’s Algorithm keeps a track of (cid:15) andincrements along the passive axis as (cid:15) becomes greater than zero. This way, we’reable to achieve a discrete positional control of the SPRINTER robot. In this paper, we propose a task decomposition strategy for distributed printingusing a group of mobile robots. We have considered image decomposition as aclustering problem and presented an algorithm to divide an image to geodesiccells of constituent pixels. Moving further, we have discussed a method to allocatethese cells to the mobile robot team. Another key takeaway of this paper is thephysical design and the control strategy of the SPRINTER robot which was usedfor the distributed printing experiments.We also present several simulations results to validate the theoretical asser-tions made in this paper. Using some of these results, we contrast our distributedprinting approach with another multi-robot printing system that uses evolution-ary techniques to distribute the printing task among the robots.While we believe the results presented in this paper are a propitious steptowards replacing traditional large-format printing systems with more robustdistributed printers, there is definitely a scope for extending this work in thefuture.
Although the geodesic cellularization method is a priori step for printing, thismethod is very computationally heavy. In the future, we would like to considera decentralized methodm, which can be solved in realtime, on-board the robots.Additionally, we would also like to accommodate collision avoidance into thecost function since the present cost formulation is sensitive to collisions causedby the type of image and the distribution of its constituent pixels.
References
1. Arthur, D., Vassilvitskii, S.: k-means++: The advantages of careful seeding. Tech.rep., Stanford (2006)2. Bradley, P.S., Mangasarian, O.L., Street, W.N.: Clustering via concave minimiza-tion. In: Advances in neural information processing systems, pp. 368–374 (1997)3. Bresenham, J.E.: Algorithm for computer control of a digital plotter. IBM Systemsjournal (1), 25–30 (1965)4. Digani, V., Hsieh, M.A., Sabattini, L., Secchi, C.: Coordination of multiple agvs:a quadratic optimization method. Autonomous Robots (3), 539–555 (2019)5. Duda, R.O., Hart, P.E., Stork, D.G.: Pattern classification and scene analysis,vol. 3. Wiley New York (1973)6. Gerkey, B.P., Mataric, M.J.: Multi-robot task allocation: Analyzing the complexityand optimality of key architectures. In: 2003 IEEE International Conference onRobotics and Automation (Cat. No. 03CH37422), vol. 3, pp. 3862–3868. IEEE(2003)7. Gerkey, B.P., Matari´c, M.J.: A formal analysis and taxonomy of task allocation inmulti-robot systems. The International journal of robotics research (9), 939–954(2004)8. Karpe, K., Chatterjee, A., Srinivas, P., Samiappan, D., Ramamoorthy, K., Sabat-tini, L.: Sprinter: A discrete locomotion robot for precision swarm printing. In:2019 19th International Conference on Advanced Robotics (ICAR), pp. 733–738.IEEE (2019)9. Kong, C.S., Peng, N.A., Rekleitis, I.: Distributed coverage with multi-robot system.In: Proceedings 2006 IEEE International Conference on Robotics and Automation,2006. ICRA 2006., pp. 2423–2429. IEEE (2006)10. Kuhn, H.W.: The hungarian method for the assignment problem. Naval researchlogistics quarterly (1-2), 83–97 (1955)11. Lee, K.H., Kim, J.H.: Multi-robot cooperation-based mobile printer system.Robotics and Autonomous Systems54