{'fraction_non_alphanumeric': 0.032177353659955776, 'fraction_numerical': 0.008728034446642616, 'mean_word_length': 4.533483580167418, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
MoboTSP: Solving the Task Sequencing Problem for Mobile Manipulators

We introduce a new approach to tackle the mobile manipulator task sequencing problem. We leverage computational geometry, graph theory and combinatorial optimization to yield a principled method to segment the task-space targets into clusters, analytically determine reachable base pose for each cluster, and find task sequences that minimize the number of base movements and robot execution time. By clustering targets first and by doing so from first principles, our solution is more general and computationally efficient when compared to existing methods.


I. INTRODUCTION
A mobile manipulator consists of a manipulator (e.g. a robotic arm) mounted unto a mobile base. The combined system extends the workspace of a fixed-based manipulator [1] [2] [3].
A frequent task for a mobile manipulator is to visit a set of ordered or unordered targets scattered around the workspace: think for example of drilling multiple holes on aircraft fuselages or on curved housing walls (Fig. 1). Another example is motivated by mobile 3D-printing of large workpieces [4].
For fixed-based manipulators, finding the optimal sequence of targets and the corresponding Inverse Kinematics (IK) solutions is known as the Robotic Task Sequencing Problem (RTSP) see [5] for a recent review. Compared to fixed-base manipulators, solving RTSP for mobile manipulators comes with extra complexities due to the distribution of task space targets that spans beyond the reachable workspace of a fixed-base manipulator.
One solution may consist of segmenting a priori the targets into what we call workspace clusters. Each workspace cluster would contain workspace targets that can be reached by a corresponding workspace base pose. However, when there is no evident of a priori spatial clusters, this hierarchical approach will likely result in suboptimal solutions.
Here we introduce a new approach to tackle mobile manipulator task sequencing problem. We leverage computational geometry, graph theory and combinatorial optimization to yield a principled method to segment the task point targets into clusters, analytically determine reachable base pose for each cluster, and find task sequences that minimize the number of base movements and robot execution time.
Note that the minimization of the number of base movements has a high priority, as such movements are the largest source of localization errors (as compared to the kinematic errors of a fixed-base manipulator).
The authors are with the HP-NTU Digital Manufacturing Corporate Lab and School of Mechanical and Aerospace Engineering, Nanyang Technological University, Singapore. Email: nicholasadr@ntu.edu.sg Fig. 1: Example of a mobile manipulator consisting of a Denso VS60 robot arm mounted on a a Clearpath Ridgeback mobile base. The task is to perform drilling on a set of targets on a curved surface. There is no a priori constraint on the target cluster or sequence.
Our contributions are as follows: • A method to select a volume (represented as set of balls) in the manipulator's reachable workspace which will be sufficient to reach all the targets; • A method to cluster unordered targets into workspace clusters consisting of workspace targets and reachable workspace base pose in each cluster; • A task sequencing algorithm for mobile manipulator, minimizing the number of base movements and the manipulator trajectory time within and between workspace clusters. The remainder of the paper is organized as follows. In Section II, we review related works in mobile manipulator task sequencing. In Section III, we introduce the overall pipeline. In Section IV, we present the detailed calculations of the set of balls. In Section V, we introduce our method to cluster the targets into separate workspaces, followed by task sequencing algorithm in Section VII. We present the simulation results in Section VIII. Finally, in Section IX, we conclude and sketch directions for future work.

II. LITERATURE REVIEW
To start with, we look at some works related to finding robot base placement. In [6], reachability map is introduced as a 3D workspace representation that represents the reachability probability of points in task space. The reachability map is used in [7] to find robot placement for a constrained linear trajectory. The work is extended in [8] to 3D trajectory. In [9], extended manipulability measure as quality index is used as precomputed workspace representation instead of reachability. Robot placement can also be found using Inverse Reachability Distribution [10].
Several works on RTSP have been attempted but they are mostly limited to fixed-base manipulator. In [11], Genetic Algorithm (GA) is employed on 3-DOF and 6-DOF robots with multiple IK solutions per target. They reported 1800 seconds CPU time for 50 task points. This work was extended in [12] to include base placement of the robot. No computational details were provided for varying number of task points or base permutations per task point. In [13], the author considered 50 targets with five configurations each and the solution was found in 9621.64 seconds. The fastest solution for fixed-based manipulator RTSP, to our best understanding, is found in [5]. A fast near-optimal solution was found using a three-step algorithm exploiting both task and configuration space. In their experiment, they visited 245 targets with an average of 28.5 configurations per target and the solution was found in 10 seconds with 60 seconds execution time. For the case of mobile manipulator, a search on 10-DOF configuration space is done as part of Genetic Algorithm-based optimization to minimize overall configurations displacement in [1].
In [2], a relatively similar problem of part-supply pick and place is presented where the robot had to pick parts from multiple tray locations. Given m number of trays containing n number of objects with o number of possible grasping poses each, m × n × o IK queries would be required. Objects are also pre-clustered into trays which reduce the number of base regions to consider. However, such target clustering might not be available or easily defined in other cases such as when continuous target distribution is involved.
In [3], the mobile manipulator's end-effector has to follow a continuous path trajectory. To deal with inaccurate base locomotion, the author used manipulability performance function to find minimum base stopping positions that will allow the robot to follow discretized points on the path trajectory. However this method requires the discretized target points to be pre-sequenced.
Compared to other methods, our approach exploits the often overlooked strategy of clustering targets first. This allows us to have a fast and computationally efficient solution. In Section VIII, we show that we segmented 183 targets into clusters, while also finding the respective base poses, in just 0.104 seconds. To our best understanding, there is no other systematic solution available to the mobile manipulator task sequencing problem which can deal with indeterminate target segmentation and has fast computation time.

III. PIPELINE
We assume that the targets' positions X = [x 1 , ..., x n ] ∈ R n×3 and their respective drilling direction vectors R ∈ R n×3 are provided for all n targets.
1) Find a set of balls B, each with diameter d, within the robot's reachable workspace. The volume covered by the set of reachable balls encloses all possible endeffector positions relative to the robot's base which might be used for visiting targets. In other words, the robot base will always be positioned such that the immediate target will always be strictly located within these set of balls. The details on how B is obtained is included in Section IV. Refer to Figure  2b for illustration of B. 2) Segment targets into workspace clusters. X is seg- in task-space between X i . 5) Calculate manipulator tour that respects the base tour. 6) Calculate collision-free trajectory based on obtained base and manipulator tour.

IV. REACHABLE SET OF BALLS
We calculate a set of balls B, each with diameter d, in the robot's reachable workspace. The centers of the balls form a continuous straight line in 3D and hence the set can be identified by the two balls at the extreme ends.
There is another requirement that B has to fulfill: any point within B must be reachable by the end-effector from any directions in R. Since it is impossible to check every point in the continuous space covered by B, we apply an approximation condition: Every point in the discretized B must be reachable from the direction bounding R. The reason behind this will be made clear in Section VI.
To achieve that, we construct a focused kinematic reachability (fkr) database which involves discretizing the Cartesian workspace into 3D voxels. For each voxel position, we perform Inverse Kinematics (IK) to obtain a set of IK solutions for each direction in R ext ⊆ R where R ext contains the bounding directions for R. All voxels containing IK solutions for all directions in R ext are then marked and saved as V fkr .
Given that V fkr represents the discretized volume that is reachable from the directions bounding R, we can now proceed to find the set of balls B within V fkr . To make the problem tractable, we can solve this with simple linear programming if we can obtain a maximal convex representation of V fkr . Finding the largest convex subset is often known as finding the Maximal Area/Surface Convex Subset (MACS), potato-peeling or convex skull problem. More specifically, we are dealing with the digital [14] [15] variation given V fkr is in integer coordinates. In this paper, we implemented a heuristic for 3D digital potato-peeling from [14] to obtain a MACS approximation M fkr . Refer to Figure 3 for an example of our MACS finding algorithm implementation. Finally, we find the largest set B that can be contained inside M fkr via linear programming [16]. Since M fkr is convex, we can formulate the problem as simply finding the largest ball diameter d for two balls on extreme ends of B subject to following constraints as visualized in Figure 4: where e T = [0, 0, 0, 0, 0, 0, −1] In this section we explain how the targets X are segmented into clusters X i which can be enclosed within a ball of center c i and diameter d. We refer to X i and the hypothetical enclosing ball interchangeably.
The problem is related to covering of 3D points with balls, which can be formulated as partitioning graph by cliques or clique covering. Firstly, we form the undirected graph G by connecting two nodes (targets) if the Euclidean distance between them is less or equal to δ. Secondly, we run clique clustering algorithm on the undirected graph. Clustering by clique in G is similar to covering by independent set in the complement graphḠ which is often referred to as the graphcoloring problem. Graph-coloring problem is NP-complete but several heuristics exist [17] [18] [19]. In this paper we implemented greedy coloring of connected sequential breadth-first search variant [17] as it results in minimum average number of clusters based on our experiment.
The value of δ can be calculated such that the resulting clique can be covered by ball of diameter d and is presented here. Let e be the center of a circle with radius δ and f is a point on the circle's circumference as illustrated in Figure  5. Points e and f are of distance δ and hence would be connected by an edge if they are nodes in the Graph G. Point g is the intersection point between two circles centered at e and f of similar radius δ and the three points form a clique. Circle O is smallest circle that circumscribes points e,f , and g. It is clear that any maximal clique that contains the three points will be contained inside O with diameter d. The relationship between the ball diameter d and the maximum edge length δ is then obtained by solving for the circumdiameter of the equilateral triangle ef g:

VI. REACHABLE BASE POSE
The reachable base pose T i base to visit each cluster X i can be analytically determined by matching X i with one of the reachable balls in B.
X i centered at c i is assigned to one of the reachable balls B(c i ) by height where B(c i ) ⊆ B. That is, c i and B(c i ) share the same z-coordinate.
We can then calculate T i base by enforcing c i and B(c i ) to be physically coincident: With that we can obtain reachable T i base : where w is the world's frame.

VII. TASK SEQUENCING
Let seq(g(k)) be a sequence of k configurations in the coordinate space spanned by g. The length of the sequence is defined by length(seq(g(k))) = k−1 n=1 g(k) n+1 −g(k) n . When g(k) 1 = g(k) k , seq(g(k)) forms a tour.
In Step 1, the tour seq(t(c+2)) is calculated which starts at predetermined t start , covers all t i for all c clusters and ends at t end where t start = t end . The base station tour is found through finding the approximated solution to the Travelling Salesman Problem (TSP) using the 2-Opt algorithm [20].
In Step 2, the tour seq(x(n + 2)) is obtained which starts at predetermined x start , covers all n number of x i and ends at x end . Unlike in previous step, the target tour finding is formulated as a minimum-length Hamiltonian Path problem instead. This is achieved through virtually translating x start , x 1 , ..., x n , x end along an axis with distance h between them to form a stack-of-clusters as seen in Figure 6. We denote x for the translated x. In our implementation, we define h to be: The minimum-length Hamiltonian Path is calculated on all targets on the stack-of-clusters starting from x start and ending at x end . The resulting seq(x (n + 2)) is translated back to obtain seq(x(n + 2)), which is a target tour sequence that respects the base tour sequence seq(t(c + 2)) and minimizes manipulator trajectory distance between base movement.
Similar to [5], in Step 3 we firstly construct an undirected graph of n + 2 layers following the order in seq(x(n + 2)). Each layer i, where i ∈ [1, n+2] contains v i nodes representing the number of IK solutions of the 6-DOF manipulator for target i, resulting in a total of n+2 i=1 v i nodes. Note that the first and last nodes are "Start" and "Goal" nodes respectively such that v 1 = v n+2 = 1. Next for i ∈ [1, n + 1], we add an edge between each nodes of layer i and layer i + 1, resulting in a total of n+1 i=1 v i v i+1 edges. Lastly, we find the shortest path between the "Start" and "Goal" nodes using a graph search algorithm to find the optimal sequence of IK solutions.
VIII. EXPERIMENT For our experiment we generated the fkr dataset for the top-front quarter grid of the robot's workspace similar to Fig. 6: An illustration of stack-of-clusters. The clustered targets (top) are "translated" and stacked back-to-back between a Start and End end-effector position to form x start , x 1 , x 2 , x 3 , x 4 , x 5 and x end (bottom). Minimum-length Hamiltonian Path is calculated on the "translated" clusters to obtain seq(x (7)), a target tour that respects the base tour sequence seq(t (7)) and minimizes manipulator trajectory distance between base movement.
in Figure 3. The distance between two workspace voxels is set at 0.04 m. For R ext , we consider four direction vectors resembling a pyramid that makes θ = 10 degree from the axis that runs along the pyramid's height. The four direction vectors are: The drill target directions in simulation are then programmed such that they cover the vector range bounded by values in R ext .
Below we provides tables that list the time breakdown of our proposed method. In Table I, we show the time required to perform sampling for V fkr and subsequently obtaining the maximal digital convex subset M fkr . We consider these as offline processes as they can be pre-generated and reused on other target distributions with similar robot and target directions requirement. Following that, in Table II and Table  III we provide the time breakdown for different number of targets for target clustering and target sequencing respectively.

IX. CONCLUSION
The problem of visiting multiple task points with a mobile manipulator has always been challenging. Compared to its fixed-base counterpart, there are more complexities to deal with when the task space targets span beyond the reachable immediate workspace. Most approaches rely on computationally expensive base poses sampling. To make the problem tractable, they often require the targets to be arbitrarily pre-clustered or pre-sequenced which might not always be possible such as in drilling operations.
In this paper, we introduced a novel approach based on clustering the task point targets first. We presented a a fast and principled way to segment the task point targets into reachable clusters, analytically determine base pose for each cluster and find task sequence to minimize robot's trajectory.
The method here can be easily extended to the continuous case, such as in 3D-printing. However, one needs to enforce the continuity of the manipulator motion, which excludes IKswitching. Integrating such a constraint into MoboTSP is the objective of our current research.