{'fraction_non_alphanumeric': 0.030075674277213634, 'fraction_numerical': 0.006354698919862881, 'mean_word_length': 4.794528248852244, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Long Horizon Planning Framework for Manipulating Rigid Pointcloud Objects

We present a framework for solving long-horizon planning problems involving manipulation of rigid objects that operates directly from a point-cloud observation, i.e. without prior object models. Our method plans in the space of object subgoals and frees the planner from reasoning about robot-object interaction dynamics by relying on a set of generalizable manipulation primitives. We show that for rigid bodies, this abstraction can be realized using low-level manipulation skills that maintain sticking contact with the object and represent subgoals as 3D transformations. To enable generalization to unseen objects and improve planning performance, we propose a novel way of representing subgoals for rigid-body manipulation and a graph-attention based neural network architecture for processing point-cloud inputs. We experimentally validate these choices using simulated and real-world experiments on the YuMi robot. Results demonstrate that our method can successfully manipulate new objects into target configurations requiring long-term planning. Overall, our framework realizes the best of the worlds of task-and-motion planning (TAMP) and learning-based approaches. Project website: https://anthonysimeonov.github.io/rpo-planning-framework/.


Introduction
Consider the bi-manual robot in Figure 1 tasked with moving a block (red) into a target pose on the far side of the table (green). The robot has a library of manipulation skills: pull, push and grasp-reorient (flips the block so it rests on a different face). To complete the task, the robot must first pull the object near the center of the table, where it can be grasped with both palms to reorient it. After reorientation, the robot cannot directly place the block at the target position due to its limited reach. Instead, the block must first be placed within reach of both manipulators and then pulled to the target by the left hand. We aim to develop a robotic system that addresses the perceptual and planning challenges of such long-term tasks requiring coordinated and sequential execution of multiple skills on a variety of objects of different shapes and sizes. Two key observations guide the approach we propose: • The challenge of planning for long-term tasks arises from a large search space. Instead of reasoning in the space of low-level robot actions, the search space can be substantially reduced by planning in the more abstract space of key object configurations (or, subgoals) -an idea well studied in Task-and-Motion planning (TAMP) [1,2,3,4]. However, the challenge is that some subgoals may be unachievable either due to kinematic/dynamic constraints of the robot or because the low-level skill-set may be incapable of achieving a particular subgoal. Because all subgoals are not feasible, it is not effective to decouple high-level planning of what the subgoals are and the low-level control of how the robot reaches these subgoals. Decoupling necessitates many explicit feasibility checks and leads to severe computational inefficiencies from searching through many infeasible plans. We mitigate this inefficiency by simultaneously biasing search toward subgoals that are reachable and predicting both subgoals and how to achieve them. • The challenge of perceiving unknown objects of diverse shapes and sizes arises due to the unavailability of 3D models of novel objects and errors in reconstructing an object's full geome- Figure 1: Left: Our framework uses learned samplers and a family of primitive manipulation skills to imagine and execute multi-step plans that manipulate objects between stable poses, using only a segmented object point-cloud. First (top right), our learned model for the pull skill samples a palm pose (dark green) and a subgoal (blue), when provided with an input point-cloud (red). The pull subgoal becomes the input at step two for grasp-reorient. Sampling repeats iteratively toward the goal (green). Right: Examples executions of the manipulation skills from [10] we use in our setup.
try/state from noisy sensor observations. We adopt the alternative approach of building perception models that directly predict skill parameters from raw sensory observations. This idea has been successfully used by affordance-prediction approaches to manipulation [5,6,7,8,9]. In our case, for every skill, we learn a separate skill parameter sampler that predicts a distribution over subgoals and contact locations that encode how to achieve the subgoals directly from an object point-cloud.
Conventional TAMP methods construct long-term plans, but they often rely on hand-designed heuristics for sampling subgoals. These heuristics are typically based on a priori information about the object's shape, limiting their utility when attempting to manipulate novel objects. Alternatively, prior works performing object manipulation directly from sensory observations have shown generalization to new objects [11,12,13], but face difficulty in long-horizon tasks because they operate in the space of low-level actions. We can overcome this short-sightedness while maintaining a similar ability to generalize by predicting subgoals from sensory observations. However, for efficient planning it is crucial to constrain the predicted subgoals to be feasible and also find actions for achieving them.
Herein lies our central problem: to perform efficient long-horizon manipulation planning with a variety of unknown objects directly from sensory observations. In this paper, we present a framework that addresses this problem for quasi-static rigid body manipulation. Planning in the space of subgoals would be efficient if the low-level controller can easily achieve them. For rigid bodies, SE(3) transformations describe the space of all possible subgoals. Now, if we further assume that the relative transformation between the object and the robot remains fixed during manipulation (i.e., the commonly made sticking-contact assumption [14,10]), the desired transformation of the object is the same as the transformation that the manipulator must execute after it makes contact with the object. This means that the problem of predicting an action sequence to achieve the subgoal can be reduced to simply predicting the initial contact configuration with the object.
Given an object subgoal and the contact information, inverse kinematics can be used to construct the low-level controller. The challenge comes from maintaining sticking contact during manipulation, a problem that was recently solved by Hogan et al. [10] to produce a library of manipulation skills for pulling, pushing and re-orienting cuboidal objects. However, their approach requires the object's 3D model. To generalize these skills to work directly from point-clouds, we use self-supervised learning wherein the robot first uses privileged information to manipulate cuboidal objects using these skills. This provides training data that maps a point-cloud observation of the object to a feasible set of transformations that can be applied (i.e., subgoals expressed as rigid object transformations) and the contact configuration (i.e., cartesian poses of the end effector) required to achieve the subgoal. Using this data, we learn a deep "sampler" that maps an object point-cloud to compatible distributions of both feasible subgoals and contact locations, which enables long-term planning.
Overall, our framework generalizes traditional TAMP approaches to work with perceptual representations and previously unseen objects while still enabling long-term planning, which remains challenging for end-to-end learning-based systems. Our technical contributions are: (i) a planning and perception framework for sequential manipulation of rigid bodies using point-cloud observations; (ii) specific architectural choices that significantly improve planning performance and efficiency. These choices include: (a) an object/environment geometry-grounded representation of reorientation subgoals for neural networks to predict; (b) a novel graph-attention based model to encode pointclouds into a latent feature space; (c) and joint modeling of what subgoals to achieve and how to achieve them, instead of modeling them independently.
We validate our approach using simulated and real-world experiments on a bi-manual ABB YuMi robot that manipulates objects of previously unseen geometries into target configurations by sequencing multiple skills. We show our method outperforms meticulously designed baselines that utilize privileged knowledge about object geometry and task in terms of planning efficiency. We present detailed ablation studies to quantify the performance benefits of our specific system design choices.

Problem Setup and Multi-step Planning
Assumptions Our work makes three key assumptions: 1) Objects are rigid and are represented as a segment of a point-cloud, which we refer to as Rigid Pointcloud Objects; 2) Subgoals are represented as sequences of SE(3) transformations of the object point-cloud; and 3) The object maintains a fixed configuration with respect to the robot during interaction due to an assumed sticking contact. We also assume quasi-static interactions, segmentation of the entire point-cloud to obtain the object point-cloud, and a plan skeleton [15] that specifies the sequence of skill types for solving the task. Note that assuming the plan skeleton is not restrictive, as a variety of techniques have been proposed to obtain it [16,17], and recent work demonstrated it can be predicted from sensory observations [18].
Task Setup Given a segmented point-cloud observation of a rigid object, X ∈ R N ×3 , the task is to transform the object by an SE(3) transformation denoted by T o des . It is assumed that the target configuration can be reached in T steps. The planner must determine a sequence of object transformations, T o 1:T ∈ SE(3) and a sequence of poses of the left and right manipulator when they make contact with the object denoted as T pc (3), where T pc Li,Ri denotes the pose of the left and right manipulator respectively at the i th step of the plan. If the plan is successful, then Under the sticking contact assumption, planning in the space of (T pc , T o ) is sufficient for rigid body manipulation. Sticking contact ensures that desired object transformation T o i can be achieved by moving the manipulators by the same transformation (T o i ) after they make contact with the object. We denote T pc as a contact pose and T o as a subgoal.
Manipulation Skills From the work of [10], we re-use a set of six (K=6) manipulation skills {π 1 , ..., π K } that transform the object while maintaining sticking contact. The skills are pulling (R/L), pushing (R/L), pick-and-place, and re-orientation [10] (Figure 1 Right). Given (T pc , T o ) determined by the planner, each skill operates as a low-level controller, q R,L = π(T pc , T o ) (1) that outputs a sequence of joint configurations of the right (q R ) and left (q L ) manipulators required to transform the object by T o . The combined joint sequence is denoted by q R,L = {q 0 , ..., q F }. The sequence length (F ) is variable and depends on the skill-type and the inputs to π. The skill is feasible if q R,L is collision-free, respects joint limits, and avoids singularities.
Planning We assume that the robot is given a plan skeleton P S = {S t } T t=1 , where S t ∈ π 1:K denotes the skill-type. Given this skeleton, the planning problem is to determine for every skill the: (a) object subgoal transformation (T o t ) and (b) contact poses (T pc t ). We use a sampling-based planner to search for sequences of object transformations and contact points {T o 1:T , T pc 1:T }. Each skill (S t ) in the plan skeleton (P S) can be thought of as a node and the goal of planning is to connect these nodes. Application of skill S t at node t transforms the input point-cloud X t into the next point-cloud X t+1 = T o t X t . To efficiently sample plausible plans, it is necessary to only sample T o t that can be achieved by the S t from the current object configuration X t . For this, we learn a sampler for the subgoal transformations and contacts, (T o t , T pc t ), using a neural network (NN), denoted p πt (·|X t ; θ), where θ are weights of the NN. Because the sampler is imperfect, we may still encounter infeasible (T o t , T pc t ), which are discarded. For the final step in P S, T o T can be analytically solved as  Figure 2: Left: CVAE encoder-decoder. The encoder maps the data to a latent distribution which is constrained to match a prior. The decoder takes as input a latent sample z and point-cloud X, and outputs the contact pose, object subgoal, and a binary mask, denoted X mask , that indicates which part of the object must contact the resting surface. Middle: Decoder architecture. Point-cloud coordinates are concatenated with a latent code, and encoded with multiple layers of self-attention into per-point output features and an average-pooled global feature, which are used to predict the contact poses, binary mask, and subgoal transformation. Right: Samples of T pc (top) and T o (bottom) for pull skill

Learning the Skill Sampler
We represent skill samplers {p π i (·|X; θ)} K i=1 using a conditional variational autoencoder (CVAE; [19]) that predicts a distribution over skill parameter (T pc , T o ) from a point-cloud observation (see Appendix A.1.3 for details). The CVAE is trained using a dataset D π i of successful single-step skill executions, , which ensures that the predicted samples are very likely to be feasible. This makes high-level planning by sampling from p π i very efficient, while maintaining the ability to generalize that comes from operating directly from sensory observations. We now describe the specific modeling choices that were critical for performance.

Learning Pointcloud Features for Predicting Contact Poses
Predicting the end-effector pose at which the robot contacts the object T pc and the subgoal T o requires a feature representation that accurately models the object geometry. Prior work used models such as PointNet++ [20] for successfully predicting end-effector poses [21,22,23,24]. However, PointNet++ style architectures only coarsely model the object geometry, which results in poor performance when accurate geometryaware predictions must be made. E.g., in our setup, accurate alignment of left and right grippers is necessary to manipulate the object. To capture rich geometric shape information, we hypothesized that it was necessary to explicitly model pairwise relationships between points in the point-cloud. For this, we made use of Graph Attention (GAT) [25] in the decoder architecture, shown in Figure 2 (Middle), that outputs contact end-effector poses and the object subgoal. Each point is treated as a node in a fully-connected graph and represented by a concatenated feature vector: (p j ⊕ z); j ∈ [1, N ], where z is a sample from the learned latent distribution and p j is the 3D coordinate of the j th point. After processing the inputs with multiple rounds of self-attention, two separate branches of fully-connected layers predict T pc and T o , respectively. While average pooling of node features sufficed to predict T o , separately predicting T pc for each node improved learning performance. Accurate predictions from single node features is only possible if the features capture global geometric information. Forcing each node to individually predict T pc therefore leads to learning of superior geometry-aware features. At test time, the average of the T pc predictions is used.

Subgoal Mask Pointcloud Registration
Maximize Subgoal Mask - Table Alignment Table Pointcloud Figure 3: Illustration of reorientation subgoal prediction. A segmentation mask X mask (green) of points on the object pointcloud that should contact the table after executing the skill is predicted by the neural network. A object transformation T o is obtained through point-cloud registration of X mask onto the table surface.
Obtaining Accurate Subgoal Prediction In our setup, some skills such as pull move objects in SE (2) and other skills such as grasp-reorient move the object in SE(3). We found that while our model made accurate predictions of SE(2) transformations, directly predicting SE(3) transformations represented as translations and rotations (expressed using quaternions) led to inaccurate predictions. The inaccuracies in T o predictions can easily accumulate over a long planning horizon and result in either poor planning performance or termination of planning due to predictions of physically unrealizable configurations, such as the object floating in the air, penetrating the table, etc. (Figure 5c shows such examples). We resolve this problem by leveraging the insight that predicting the reorientation subgoal (i.e., SE(3) transformation) can be recast as the problem of selecting which points on the object should end in contact with the support surface. To implement this, we compute the rotation component of T o by first predicting for every point in the object point-cloud, the probability of the point resting on the table after T o is applied. The per-point probabilities are then thresholded to obtain a binary segmentation mask {X mask : {m j ∈ {0, 1}∀j ∈ [1, N ]}}. Next, we use Iterative Closest Point (ICP) [26] to perform registration of the table point-cloud X table and X mask to solve for the orientation (see Figure 3). This inferred orientation is combined with the predicted translation to obtain T o . This pipeline enables a more accurate subgoal prediction because the transformation that is obtained is grounded to represent an explicit spatial relationship between points on the object and points on the table.
Modeling the joint distribution of Subgoals and Contact Points Independent modeling of subgoals and contact poses (T o , T pc ) can lead to incompatible predictions. E.g., a sampled T pc can result in a robust sticking contact, but the motion required to achieve an independently sampled subgoal T o can result in the robot colliding with the table. We mitigate this issue by modeling the joint distribution of (T o , T pc ) by training the CVAE encoder to learn a single shared latent distribution. The decoder uses this latent representation to predict T o , T pc and X mask using a shared set of self-attention layers and separate output heads. By training the model to predict the skill parameters jointly using weights and latent samples which are shared, we can more reliably obtain subgoals and contact poses that are compatible with each other.

Training Data
The training data D is generated by manipulating cuboids of different sizes using one primitive skill at a time. For data collection, we sample cuboids so that they are in a stable configuration on the table. We then randomly sample subgoals (T o (i) ) and contact poses (T pc (i) ) on the object mesh. Assuming knowledge of the 3D models of the cuboids, we execute a single primitive skill [10]. If the skill successfully moves the object to the subgoal, we add the tuple of (object point-cloud, contact pose, subgoal, and X mask ) to the dataset. We used manipulation data from 50-200 different cuboids for each skill, and our overall dataset contained 24K samples. We trained separate CVAEs with the same architecture for each skill. See Appendix A.1.4 for more information on data generation, training, and network architecture.

Experiments and Results
We perform experiments on a dual-arm ABB YuMi robot with palm end-effectors. We simulate the robot in a table-top environment using the PyBullet [27] simulator and the AIRobot library [28]. We place 4 RGB-D cameras with a shared focal point at the table corners, and we use ground truth segmentation masks to obtain segmented point-clouds from simulated depth images.

Performance Evaluation on Single-Step Manipulation Tasks
We first evaluate the efficacy of various design choices used to construct the subgoal and contact pose sampler on the task of single-step manipulation on 19 novel cuboids of different sizes. To generate evaluation data, we initialized each cuboid in 6 uniformly and randomly sampled poses while ensuring that the cuboid rests on the table. Given the point-cloud observation of the object, X, we predicted T o , T pc from the learned sampler. If the sampler was accurate, then execution of π(T o , T pc ) (see Equation 1) should transform the object by T o . After execution, we use the simulator state to evaluate the error between the desired (T o ) and actual object transformation. We define the success rate as the percentage of trials where the model finds feasible samples within 15 attempts and the executed object transformation is within a threshold of (3 cm/20 • ) of the desired subgoal. Figure 4 compare the performance of PointNet++ [20] against the proposed GAT architecture (see Section 3) used for constructing the CVAE. It can be seen that GAT (blue) outperforms PointNet++ (orange) on the tasks of grasping and pushing. The performance of both architectures is similar for pulling because it is a much easier manipulation to perform. To gain further insights into differences between the performance of GAT and PointNet++, we visualized the contact poses predicted by both the models in Figure 5a and 5b respectively. It can be seen that predictions from PointNet++ are more likely to result in the robot's palms not aligning with the object (see Figure 5b). Figure 4: Success rates for single step grasping, pushing, and pulling. Joint Mask refers to using X mask and predicting T o and T pc together, Indep Mask refers to using X mask but predicting T o and T pc separately, and Joint Trans refers to not using X mask and predicting T o and T pc together.

Results in
The overall results indicate a large value provided by using our point-cloud encoder, mask subgoal prediction, and joint prediction scheme. See Appendix A.1.7 for more detailed results breakdown.  Our proposed approach using a mask-based sub-goal representation overcomes this issue.
This misalignment results in less stable point contacts at edges instead of patch contacts on faces, which results in inaccurate or infeasible manipulation. Contact with edges also leads to object motion while the robot is trying to grasp, which breaks the sticking-contact assumption and leads to inaccurate prediction of the transformation of the object.
Next, for the grasp-reorient skill, we evaluate if predicting the mask-based subgoal (see Section 3) indeed achieves better performance than directly predicting T o . Results in Figure 4a justify this choice. Qualitative examples of the type of errors made by directly predicting T o are visualized in Figure 5c. It can be seen that these examples correspond to physically infeasible transformations, an error-mode which is fixed by using analytical computation of T o using the mask-based representation.
In contrast to grasp-reorient, primitives pull and push only operate in SE(2) and therefore do not suffer from this error mode. For these skills, directly predicting T o suffices for good performance.
Finally, we also contrast the performance of our method of jointly modeling subgoals and contacts against a baseline that models them independently. Results in Figure 4 shows that joint modeling leads to significant performance gains.

Performance Evaluation on Multi-step Manipulation Tasks
We now evaluate the performance of our planning algorithm (Section 2) when coupled with either our learned skill samplers or with a set of manually designed samplers. The experiment is designed to test the hypothesis that our learned samplers enable efficient multi-step planning with unseen objects for a variety of reconfiguration tasks. The baseline samplers use a combination of heuristics (plane segmentation, antipodal point sampling, and palm alignment with estimated point-cloud normals) based on the privileged knowledge that the objects are cuboids (see Appendix A.1.6 for details).
We created the testing set using 20 novel cuboidal objects. First a plan skeleton is chosen from {pg, gp, pgp}, where p and g denote pull and grasp-reorient, respectively. For each skeleton, we construct 200 instances of planning problems. We evaluate the agent's performance using following   Table 1 indicate that our learned models provide a large benefit in planning efficiency over the baseline that was hand-designed for cuboidal objects. The baseline's lower performance is primarily due to the sampling of many infeasible sequences. In contrast, our model learns to bias samples toward parameters that are likely to be feasible and lead to successful execution (see Appendix A.1.9 for more detailed failure mode analysis and comparison). The similar pose errors indicate feasible plans obtained by both samplers are of similar quality.

Qualitative Results and Capabilities
Multiple Placement Surfaces In general, enabling a system to generalize to environments with multiple support surfaces (i.e., a table and a shelf) may be difficult if the system has only been trained using a single support surface. However, our mask-based subgoal representation directly enables sampling subgoals on different surfaces. This is because arbitrary target point-clouds, obtained using plane segmentation, can be used during registration. We demonstrate this capability in Figure 6, where a book is moved from the table to a vertical pose on an elevated shelf with a 5-step plan.
Generalization to Novel Geometry Classes Figure 7a shows grasp-reorient predictions trained only on cuboids, and tested on a cylindrical object and on an object in the shape of a bottle. Predictions for both T o and T pc are quite sensible and were executed successfully in the simulator. Figure 7b shows a 3-step plan found with our planning algorithm on the bottle-shaped object. Appendix A.1.7 and A.1.9 contains additional results and discussions related to generalization to novel geometry.

Real Robot Experiments
In light of COVID-19, access to robots in our lab has been limited and we focus only on qualitatively demonstrating the capabilities of our framework on a real ABB YuMi robot. Figure 8a shows snapshots from skills being executed on a variety of objects after training only in simulation. Figure 8b shows a 2-step plan obtained by the full framework being executed with a bottle. We used calibrated Intel RealSense D415 RGB-D cameras at the table corners to obtain point-clouds, AR tags to specify T o des for multi-step planning, and a pre-trained neural network [29,30] combined with point-cloud cropping heuristics for segmentation (details in Appendix A.1.8). Finally, to quantitatively evaluate performance on realistic perceptual inputs, we conducted additional simulated experiments (as in Section 4.2) using noise-corrupted point-clouds.
The results showed a negligible performance change, further validating real-world applicability of our system (see Appendix A.1.7 for details).

Related Work
Perception-based Multi-step Manipulation Most similar to this work is Fang et al. [24], which decouples subgoals and robot actions and learns samplers to enable multistep planning from segmented object point-clouds. In contrast to us, they learn neural network samplers for forward simulation both in the subgoal and the action space. We bypass the problem of learning low-level dynamics in the action space and use SE (3) transformations to forward propagate subgoals. Moreover, they only considered planar tasks with a straight-line push primitive. In [31], a pixel-wise Q-function represents high quality contact locations, and reinforcement learning is used to obtain sequencing behavior between pushing and grasping.
Task-Oriented Contact-Affordances In [32], a DexNet [5] grasp detector is extended to use a task-specific reward to select grasps that are useful for a downstream task. In [8], keypoint affordances are used for task specification, grasping, and planning motions to manipulate categories of objects. [23] extends this approach by learning the keypoints based on the task rather than manually specifying them. [9] combines learned push affordances with a mechanics model to rank push locations based on predicted outcomes and the task at hand. We approach predicting task-oriented contacts by modeling the joint distribution over reachable subgoals and corresponding contacts for a set of primitive skills.
In [34], the authors propose a scene dynamics model trained to predict SE(3) transformations of point-clouds, but their model operates over low-level actions rather than high-level skills, limiting the object manipulation demonstrations to short-horizon interactions.
Learning to guide TAMP Several algorithms exist for learning to guide TAMP planners [35,36,37,38,39]. In [35], the authors consider a similar problem setup as ours in which the plan skeleton is given, and the goal is to find the continuous parameters of the skeleton. Instead of learning samplers for each manipulation skill, they learn to predict the parameters for the entire skeleton. [36,37,38], like us, consider learning a sampler for each manipulation skill to improve planning efficiency. Unlike our setup, however, these methods assume that the poses and shapes of objects are perfectly estimated. Our framework can be seen as extending these works to problems in which the robot must reason about objects with unknown shapes and poses by directly learning to map a sensory observation to a distribution over promising parameters of manipulation skills.

Conclusion
This paper presents a method to enable multistep sampling-based planning using primitive manipulation skills when provided with segmented object point-clouds. Our approach uses deep conditional generative modeling to map point-cloud observations to a distribution over likely contact poses and subgoals, which are used as inputs to the skills. Novel technical aspects of our approach enable the ability to use the skills effectively, and our learned samplers provide planning efficiency gains over a manually designed baseline sampler. Our qualitative results validate that the approach transfers to real point-clouds, scales toward manipulating more complex object geometry, and enables solving more sophisticated multistep tasks.

A.1.1 Point-cloud Registration
For the mask-based representation, we use Iterative Closest Point (ICP) [26] to solve for the registration and obtain the subgoal transformation. The segmented table point-cloud is used as the target. The initial transformation is combined from two sources: (1) the planar translational component of the neural network's direct subgoal prediction, and (2) a pure forward π 2 pitch about the object body frame. We use the Open3D [40] implementation of point-to-point ICP, which we find to work effectively. Note that other registration techniques and methods for obtaining an initial transformation could equivalently be used in our framework.
Subgoal predictions for the pull and push skills, which only operate in SE (2), do not suffer from the same physical inaccuracy issues as grasp-reorient. Therefore, subgoals for these skills are sampled by projecting T o predicted from the model to SE(2).

A.1.2 Sampling-based Planning Algorithm
Algorithm 1 describes our sampling-based planning algorithm in detail. Nodes in a search tree are initialized with InitPointCloudNode. Assuming some initial point-cloud and samples for the skill subgoal and contact pose, a node is specified based on the subgoal and contact pose, the resulting point-cloud after being transformed by the subgoal transformation, and the parent node whose point-cloud was used to sample the corresponding parameters.
Buffers for each step in the plan skeleton are used to store nodes containing parameters that are found to be feasible. When sampling at each step, a node is randomly popped from the buffer for the corresponding step t, and the point-cloud from that node is used as input for the skill sampler. Parent nodes are specified based on their index in their respective buffer.
The SatisfiesPreconditions procedure operates on the point-cloud from the popped node to determine if further subgoal/contact sampling will proceed. These precondition checks improve efficiency by avoiding sampling many point-cloud configurations that are likely or guaranteed to fail by leveraging reachability constraints that are easy to check and specify with respect to the point-cloud. For instance, for grasp-reorient, we only accept point-clouds whose average planar positional coordinates are within a valid rectangular region near the front-center of the table. A similar precondition for pull and push checks if the average planar point-cloud position is within the boundaries of the table. We use the same preconditions sampler variants.
The FeasibleMotion procedure checks if the motion corresponding to the sampled parameters is feasible. This process includes two subprocedures: (1) checking for collisions between the robot and the environment at the initial and final configurations of the skill, (2) checking for collisions and kinematic feasibility of the motion computed by the low-level primitive planners. Both subprocedures must pass for the skill to be feasible. We only run subprocedure (2) if subprocedure (1) passes, as (1) is computationally cheaper and helps filter out infeasible motions more efficiently. At each step in P S, the skill samplers have a maximum number of samples, K max , to obtain a set of feasible parameters. If they fail to do so within this limit, sampling moves on to the next step in the skeleton. On the final step T , the required transformation is directly computed based on the sequence of subgoal transformations that leads to the node that has been popped, starting from the root node. If the final subgoal transformation is not feasible, sampling begins all over again at the first step in P S, so that new start point-clouds continue to be added to the buffers. In our experiments we used K max = 10.
When a feasible set of parameters is found on the final step, the ReturnPlan procedure is used to backtrack from the final node to the root node along the parents (similarly as in RRT [41]) and return the plan to be executed. If a feasible plan is not found within 5 minutes, the planner returns a failure.

A.1.3 Conditional Variational Auto-encoder Skill Samplers
The CVAE is trained to maximize the evidence lower bound (ELBO) of the conditional log-likelihood of the data in D π . We present a brief description of using the CVAE framework in our setup (for detailed derivation, please see [33,19]). for skill step t in 1,...,T do 8: If feasible parameters not found after K max samples, move to next step 9: while k < K max do 10: node ∼ B t (·) Sample start state from corresponding buffer 11: X ← node.pointcloud 12: if PreconditionsSatisfied(X) then Check if point-cloud is valid for sampling 13: T o , T pc ∼ p πt (·|X) Use point-cloud to sample from skill model 14: if t equals T then 15: T o ← GetFinalTransformation(node) 16: if FeasibleMotion(π T , T o , T pc ) then 17: Following [19], we denote inputs x, outputs y, and latent variables z. We wish to model the distribution p θ (y|x) (this is what is used as the skill sampler during planning). We can do so by considering a latent variable model, p θ (y|x) = p θ (y|x, z)p θ (z)dz. In doing so we assume our data is generated via the following generative process: given observation x, latent variable z is drawn from prior distribution p θ (z|x) and output y is generated from the conditional distribution p θ (y|x, z). The training procedure for the CVAE uses neural networks to approximate the generative distribution p θ (y|x, z) along with a recognition model q φ (z|x, y). q φ (z|x, y) and p θ (y|x, z) can be interpreted as a probabilistic encoder and decoder, respectively. The ELBO of the conditional log-likelihood, (2) is used as a surrogate objective function to optimize with respect to parameters θ and φ. In our setup we assume p θ (z) = p θ (z|x).
To optimize the ELBO, the encoder q φ (z|x, y) is trained to map the data to a latent conditional distribution, which is constrained by a KL-divergence loss to resemble a prior p θ (z) (in our case, a unit Gaussian), while the decoder p θ (y|x, z) is trained to use samples from the latent space to reconstruct the data. An estimator of the ELBO is used as the loss to optimize when training the neural networks. The estimator enables taking gradients with respect to the network parameters, and it is obtained using the reparameterization trick, We can use the closed-form expression for the KL divergence between the prior p θ (z) and the approximate posterior q φ (z|x, y) when both distributions are assumed to be Gaussian [33]. The expression uses the mean µ and standard deviation σ of the approximate posterior, where µ and σ are outputs predicted by the encoder network.
Joint Skill Sampler Models: In our joint models, observations x are the point-cloud observation X, and output variables y include T o , T pc , and point-cloud segmentation mask X mask . The latent variable model in this setup is p(T o , T pc , X mask |X) = p(T o , T pc , X mask |X, z)p(z)dz Independent Skill Sampler Models: In the baselines that use independent models, output variables y are separated into two independent sets, with corresponding independent latent variables. y 1 includes T o and X mask , while y 2 includes T pc . We represent these as two separate CVAEs: p(T pc |X) = p(T pc |X, z 2 )p(z 2 )dz 2 (7)

A.1.4 Neural Network Architecture Details
Inputs and Outputs Subgoals T o and contact poses T pc are represented as 7-dimensional vectors, made up of a 3D position for the translational component and a unit quaternion for the rotational component. Unit quaternions are directly regressed as an unnormalized 4-dimensional vector, which is normalized after prediction.
During our experiments, we found overall training and evaluation performance is improved when the decoder is trained to predict X mask and T o together (i.e., as complementary auxiliary tasks), even if T o is not used for executing the skill. Based on this observation and to simplify implementation, all decoder models that are used to predict subgoals were set up in this way to predict T o and X mask jointly.  Figure A1: Network architectures based on Graph Attention Networks [25] for joint (a,d) and independent (b-c,e-f) CVAE decoder and encoder. The pre-processing block for all architectures is identical to the one shown in (a). GATConv layers perform self-attention over nodes in a neighborhood to propagate node features (see [25] for details). We represent the input point-cloud as a fully connected graph.
Before being input to any of the neural networks, the point-cloud X, .. x N , y N , z N is pre-processed with the following steps: X is converted intoX, by computing the mean over all the points X c = N i=1 p i = [x c , y c , z c ], subtracting X c from all the points in X, and concatenating X c as an additional feature to all the zero-mean points to obtain We uniformly downsample the observed point-cloud to a fixed number of points before converting tō X and computing the network forward pass. We use N = 100 points in all experiments with learned models. For the baseline samplers, we use the full dense point-cloud, which can have a variable number of points. Figure A1 shows the GAT-based architectures for the CVAE encoder and decoder. The encoder is a Graph Attention Network, which is trained to represent the approximate posterior q φ (z|x, y). To combine the input variables x (X), and the output variables y, we concatenate all the variables in y as extra point-wise features toX. T o and T pc are repeated and concatenated with all the points inX, and the point-wise binary features in X mask ∈ R N are directly concatenated with the corresponding points inX.

Model Architecture based on Graph Attention Networks
Output point features are computed using the graph-attention layers in the encoder. A mean is taken across all the points to obtain a global feature encoding, which is then provided to separate  Figure A2: Network architectures based on PointNet++ [20] for joint (a,d) and independent (b-c,e-f) CVAE decoder and encoder. SAModules perform the hierarchical set abstraction operation in the PointNet++ (for details see [20]). The only difference between the initial SAModules in the various models is the input dimension.
fully-connected output heads that compute µ and σ. µ and σ are reparameterized to compute z, and are used to compute the KL divergence loss [33] in L CVAE .
The decoder receives as inputX and z.X is projected to a higher dimensional space with a learnable weight matrix W . z is repeated and concatenated with each point in WX as an additional per-point feature. This representation is then provided to another Graph Attention Network to obtain output point features.
The point features are used by different output heads to reconstruct the data. Each point feature is independently used by a fully-connected output head to predict the contact pose and another fully-connected output head followed by a sigmoid to predict the binary mask. In parallel, the point features are averaged and passed to a third fully-connected head that predicts T o .
Model Architecture based on PointNet++ The encoder and decoder have a PointNet++ architecture [20], shown in Figure A2. X is converted toX and concatenated with all the y variables before being passed to the encoder, in the same way as described above . The PointNet++ encoder computes a global point-cloud feature, and fully-connected output heads predict µ and σ which are reparameterized as z.
During decoding, X converted toX, z is concatenated as a per-point feature withX, and a global point-cloud feature is computed with a PointNet++ decoder. Separate fully-connected heads use the global feature to make a single contact pose prediction for T pc and transformation T o . The global feature is concatenated to all the original points inX and passed to a third fully-connected output that predicts binary point labels for X mask .
CVAE Inference During testing, a latent vector z is sampled from the prior p θ (z) and the trained decoder follows the same respective processes as described above with the trained [GAT or Point-Net++] layers and output heads. We find it worked well to randomly sample one of the per-point T pc predictions for use in the executed skill when using the GAT-based model. In our experiments,  we used latent vectors of dimension 256 for the joint models and 128 for independent contact and subgoal models.

A.1.5 Training Data Generation and Training Details
We generate training data by simulating the primitive skills with the known 3D models of the cuboids, sampling transitions between stable object poses for subgoals, and sampling the object mesh for contact poses. If the skill is feasible and successfully moves the object to the subgoal, the parameters are added to the dataset. We also record the points in the point-cloud that end within Euclidean distance thresholded from the table as ground truth labels for X mask .
The number of objects and dataset size used for training each skill sampler are shown in Table  2. Because the data generation process has a high degree of stochasticity and the amount of time required to obtain a large number of successful samples varies between skills, the number of data points/objects used for each skill was not consistent.
During training, we use the Adam optimizer [42] with learning rate 0.001 to minimize the L CVAE loss function with respect to the parameters of the CVAE encoder and decoder. The reconstruction term in the loss is broken up into separate components: We use an MSE loss for the positional components of T o and T pc , and the below geodesic orientation loss [43,44], L orientation = 1 − q predicted , q ground-truth 2 (8) for the orientation components in T o and T pc , where q denotes the 4-dimensional quaternion components of the subgoal transformation/contact pose and , denotes an inner product. We use a binary-cross entropy loss for X mask . For the GAT-based models that make N separate predictions of T pc , the reconstruction loss is computed separately for all of the predictions with respect to the single ground truth training example.

A.1.6 Evaluation Details
Global Success Rate Breakdown The global success rate used in our single-step skill ablations is designed to aggregate multiple performance factors into a single metric. Here we break these results down to examine the components that lead to the overall trends shown in Figure 4. This section focuses on the grasp-reorient skill, as it is most influenced by our particular design choices (similar trends were observed for push, while each ablated variation technique worked similarly well for learning the pull skill).

Figures A3a and A3b
show the average position and orientation errors over all the single-step trials for variants of the learned samplers. Figures A3c and A3d shows success rate based on whether contact was maintained during skill execution (c) and whether a feasible motion was found within 15 samples from the neural network (d).
From the larger position and orientation errors and reduced sticking success rate, we can see the significant benefit provided by the mask-based subgoal representation (Joint/Indep Mask) over directly using the transformation predicted by the model (Joint Trans). The large position and orientation errors for Joint Trans are typically due to the predicted transformation moving the object to a position vertically above the table. In these cases, the robot moves the object above the table, breaks contact, and the object passively falls onto the table. The large errors in Figure A3a and A3b reflect the difference between the object's "in-air" pose and wherever it ends up on the table after the robot breaks contact. Directly predicting T o with the Joint Trans architecture also leads to point-cloud configurations that penetrate the table. This penetration frequently causes the robot to lose contact when trying to reach these subgoals because an unexpected contact between the table and the object occurs before skill execution is complete.
The performance between the PointNet++-based and the GAT-based models are supported by the large difference in orientation error, shown in Figure A3b. This is due to the end-effector/object alignment issues depicted in Figure 5a-b, which cause an unexpected object rotation during the initial grasp. We also observe the PointNet++ encoder reduces success rates for sticking and feasibility in Figures A3c and A3d. This lower success rate is because many contact poses predicted by the PointNet++ model lead to a collision with the environment and are more likely to lose contact with the object.
Finally, we see in Figure A3d that predicting the contact and subgoal parameters jointly (Joint Mask/Trans) instead of independently (Indep Mask) leads to improved Feasibility Success Rate. This is because the Indep models require many more samples to find contact poses and subgoals that work well together. In contrast, the shared representation learned by the Joint models better captures this dependence and helps to more efficiently find a set of parameters that are compatible with each other.
Baseline Uniform Sampler Heuristics The baselines we compare our learned samplers to in the multi-step evaluation are based on a uniform sampler that uses the point-cloud to sample potential T o and T pc values for the grasp-reorient and pull skills. The samplers are based on the following heuristics: (1) During a pull, the palm should contact the object face down at a point that lies on top of the object, (2) During a grasp-reorient the palms should face each other and contact antipodal points that are on the side of the object, (3) During a grasp-reorient the subgoal T o should encode a rigid transformation between two stable configurations of the object, that each have different faces contacting the table, (4) the robot should not contact the face of the object that will contact the table in the subgoal configuration.
For the grasp-reorient sampler, we first estimate the point-cloud normals and segment all the planes using the Point Cloud Library (PCL) [45]. This process is done once to avoid recomputation in each new sampled configuration; the normals and planes are all transformed together with the overall point-cloud during planning. A plane is sampled and used to solve for T o using the same registration process described in Section ??. Before sampling contact poses, we then filter out points in the point-cloud that are likely to cause infeasibility if contacts were to occur at their location. Specifically, we remove the plane that is used for subgoal registration and the plane opposite to it, since contacting the object on these planes is sure to cause a collision with the table in the subgoal configuration. We also remove points below a z threshold so that the palms are less likely to contact the table in the start configuration. T pc values are determined from the points that remain after filtering. We sample antipodal points in the remaining object point-cloud for the positional component. For the orientation component, we align the palm-plane normal with the estimated normal at the sampled point and then sample a random angle within the plane by which to rotate the pam. We only consider a range of within-plane palm angles that will not lead the wrist to collide with the table (i.e., the direction of the front of the palm must have a negative z component).
For the pull sampler, we first estimate the point-cloud normals using PCL and then search for a point that has an estimated normal that is close to being aligned with the positive z-axis. This point is used as the position component in T pc . The orientation component is determined by aligning the palm-plane with the positive z-axis in the world frame and then sampling a random angle within the plane by which to rotate the palm.  Multi-step Planning Evaluation with Noisy Point-clouds To further understand the generalization capabilities of the system, we conducted single-step experiments on 10 novel cylindrical objects with 10 start poses each, using both our learned model and the hand-designed baseline sampler. For the baseline, we approximate the cylinder with an oriented bounding box. We report the global success rate from Figure 4, and the average position/orientation errors as in Figure A3, with corresponding reference values from the best performing model, tested on cuboids. Figure A4 shows the results. As expected, we see a drop in performance (larger pose errors and lower success rate) due to the significant distributional shift in the point-cloud observations. However, many of the skill executions are still successful, and performance is still higher than using the baseline sampler with cylinders approximated as cuboids. We hypothesize that the performance gap can be made up by training on a more diverse set of objects.
Single-step Evaluation with Novel Geometric Classes To understand how performance differs under more realistic sensor noise, we evaluate our learned models in the multi-step setting described in Section 4.2 with noisy point-clouds. We use a depth camera noise model taken from [46] to simulate depth image noise, which shows up as noise in the point-cloud that is provided to the samplers. Results shown in Table 3 demonstrate that our system is quite robust to moderate levels of input noise.

A.1.8 System Implementation Details
Model Implementation We used PyTorch [47] for training and deploying the neural network components of the framework, and we used the PyTorch Geometric library [48] for implementing the Graph Attention Network and PointNet++ layers in our samplers.

Feasibility Checks
We use the compute cartesian path capability in the MoveIt! [49] motion planning package for the FeasibleMotion procedure in Algorithm 1. This procedure simultaneously converts the cartesian end-effector path computed by the skills into a sequence of joint configurations using RRTConnect [50] and checks to ensure the path does not cause singularities or collisions.

Contact Pose Refinement
After T pc is determined by either the learned or uniform samplers, it is refined based on the dense point-cloud of the object so that the robot is more likely to exactly instead of missing contact or causing significant penetration. The refinement is performed by densely searching along the 3D rays aligned with the palm-plane normal, beginning at the position component of T pc , and computing the distance to the closest point in the point-cloud at each point along this line. The point in the point-cloud with the minimum distance is then used to update the positional component of T pc (the orientation component is unchanged). This process provides a large practical improvement, and we use it for all the skills and all variants of the samplers we evaluated. Real Robot Experiments To obtain the real-robot demonstrations of the framework shown in Figure 8, we implemented a real-world version of each of the framework's required components. Four Intel RealSense D415 RGB-D cameras were set up in the environment and extrinsically calibrated with respect to the robot's world coordinate system. To obtain the overall desired relative transformation, T o des , we attached an AR tag to the object, moved the object to a start and goal pose in the environment, and calculated the relative transformation between the detected start/goal poses. After obtaining T o des , the AR tag was removed. To segment the object from the overall point-cloud, we first passed the RGB images from each camera to a pre-trained Mask R-CNN [29] neural network (using the Detectron2 API [30]), applied this mask to the depth-images before obtaining the 3D point-cloud, and finally cropping the point-cloud to a known region near the table to remove outliers in the segmentation mask. After these steps, the planning algorithm was run as described in Appendix A.1.2, and the motions returned by the planner were executed by the robot.

A.1.9 Additional Discussion
Skill Capabilities and Geometry Generalization Implications In addition to the explicit assumptions we make in designing our framework, the system also implicitly inherits any additional assumptions made by the underlying skills that are utilized. For the skills from [10] used in this work, this includes the additional assumption of a limited set of possible types of contact interaction that can occur between the object and the robot/environment. For instance, the contact models used by the skills are not built to plan through rolling, as might occur when pulling a cylindrical object in certain ways. They also do not consider certain 3D interactions, such as toppling, which can happen when contacting a tall thin object during a push skill.
This interplay of assumptions made by the primitive skills and the higher-level components provided by our framework limited our ability to demonstrate more sophisticated generalization to novel geometries. For instance, multi-step planning and execution on more diverse geometries may require primitive skills that account for more types of contact interactions. Designing such primitives was out of the current scope and is an important direction for future work, but the current framework could be similarly applied if such primitives were available.
Point-cloud Occlusion and Observability While we used point-cloud obtained from simulated depth cameras in the scene, these point-clouds are relatively complete and unoccluded since we utilize multiple cameras placed at the corners of the table in the scene and do not deal with environments with clutter. Enabling long-horizon manipulation planning in more realistic scenarios where occlusions are significant and less sensors can be used is an important challenge that was beyond the scope of this work.
Furthermore, the issue of object observability raises the question of whether to deal with planning directly with a heavily occluded observation of the object or to augment the perception system with a shape completion module that predicts the geometry in the occluded regions, as is done in other manipulation systems that deal with limited observability [51]. Directly working with the partial point-cloud would present numerous challenges for our system (and any manipulation planning framework). This is because our manipulation action parameters are represented explicitly with respect to points on the point-cloud since these denote locations where contact on the object can confidently be made with the robot or with the environment. Therefore, we hypothesize shape completion techniques to be more suitable and of great importance for extending the ideas presented in this work to scenarios where objects are more occluded than in this paper.
Failure Modes To understand the performance gap between our learned samplers and the baselines, we tracked the frequency of different types of failures during planning (Table 4) and the average Table 5: Average number of sampling iterations performed during multi-step planning on a P G P skeleton over 50 trials, using the learned samplers and the hand-designed baseline. Total denotes the overall average over both successful and failed planning attempted, while Successes and Failures divides the average number of sampling iterations performed based on whether a feasible plan was found or not, respectively. Results highlight that both methods require similar computation (as indicated by the similar number of samples on failed attempts) and that the learned samplers are biased toward finding feasible parameters (as indicated by the lower number of samples required on successful attempts). number of sampling iterations performed by both methods (Table 5). We found that the main issue with the baseline is that it spends more time checking the feasibility of infeasible motions due to sampling many contact/subgoals that are infeasible either for the robot, or with each other, or both.
In this way, we can interpret part of the value provided by our samplers as having learned the helpful biases that guide sampling toward regions that are likely to be feasible, similar to as in other works that learn biased samplers for motion planning and TAMP [39,36]. We found that computation efficiency between both methods is similar (see Table 5).
Failure modes that lead to poor execution of the skills after parameters are sampled or multi-step plans are found are primarily related to small errors in predicted palm poses or subgoal transforms that can lead to unintended outcomes. This includes predicting contact that is too soft so that the object slips or predicting contact that penetrates the object too much, which causes large internal forces and robot joint torques along with highly unrealistic physical behavior in the simulator. Additionally, as is usual with multi-step scenarios, errors can accumulate between iterative predictions during planning. A common example is a small error in a subgoal prediction that leads the transformed point-cloud to be in a slightly unstable configuration that is not reflective of the configuration the object settles into when the skill is executed. This instability can lead the following skill to be executed poorly due to the nominal plan expecting the object to be in a different configuration than what it actually reached.
Finally, many failure modes we observe are generally related to the realities of running the obtained plans and low-level motions purely open-loop. Ideally, high-level replanning/plan refinement based on updated point-cloud locations at each step can be used to mitigate cascading error issues described above, and controllers developed in conjunction with the primitive skill planners [10] could be used to make local adjustments based on feedback from the contact interface to better enforce the sticking contact assumption to be true when a skill is executed.
Real-world/Real-robot Implementation Considerations Implementing the primitive skills and the framework proposed in this work on a real robotic platform requires certain considerations. Practical difficulties can arise when implementing the plans on a stiff position-controlled platform without any sensing to guide the skill execution. Stiff position control creates difficulties because skills like pulling and grasping are fundamentally designed to apply compressive forces on the object during execution, which can be problematic when dealing with near-rigid object and large position gains.
We found a large practical benefit introducing a passively compliant element at the wrist of the robot that deforms to take up forces encountered when commanding contact pose positions that slightly penetrate the object (this compliance was also modeled in the PyBullet YuMi simulation). Other ways of introducing non-stiff behavior can be similarly applied to realize the behaviors that are planned by the manipulation skills, such as hybrid position/force control or cartesian impedance control. Small errors in commanded positions can also lead the skill to miss making contact entirely. Guarded movements using aggregated wrist force/torque sensing or local contact sensing can help alleviate execution errors of this type (i.e., by moving to a nominal pose predicted by the sampler and slowly approaching the object in the direction of the palm normal until a certain force threshold is reached).