<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Guided Policy Search for Stabilizing Contact-rich Motion Plans</title></titleStmt>
			<publicationStmt>
				<publisher>Elsevier</publisher>
				<date>01/01/2024</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10595917</idno>
					<idno type="doi">10.1016/j.ifacol.2025.01.130</idno>
					<title level='j'>IFAC-PapersOnLine</title>
<idno>2405-8963</idno>
<biblScope unit="volume">58</biblScope>
<biblScope unit="issue">28</biblScope>					

					<author>Christopher Dagher</author><author>Chandika Silva</author><author>Aykut C Satici</author><author>Hasan A Poonawala</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Learning policies for contact-rich manipulation is a challenging problem due to the presence of multiple contact modes with different dynamics, which complicates state and action exploration. Contact-rich motion planning uses simplified dynamics to reduce the search space dimension, but the found plans are then difficult to execute under the true object-manipulator dynamics. This paper presents an algorithm for learning controllers based on guided policy search, where motion plans based on simplified dynamics define rewards and sampling distributions for policy gradient-based learning. We demonstrate that our guided policy search method improves the ability to learn manipulation controllers, through a task involving pushing a box over a step.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">INTRODUCTION</head><p>Many human manipulation tasks that we would like robots to perform involve moving objects that are too large to grasp in the robot's gripper. For example, moving objects whose every dimension is larger than the gripper's width, like a large box. Such manipulation tasks are referred to as non-prehensile motion tasks that are not within the hand, from the taxonomy in <ref type="bibr">Bullock and Dollar (2011)</ref>.</p><p>Successful task execution under nonprehensile manipulation requires complex reasoning about how forces applied on the object interact with its natural dynamics and the forces applied by the environment at contact locations. This reasoning is challenging to carry out due to the multiplicity of possible contact modes and the uncertain contact dynamics governing each mode. Recent advances automate this reasoning over multiple modes, like the work by <ref type="bibr">Cheng et al. (2022)</ref>, resulting in high-quality plans for achieving a task using a sequence of contact modes. However, to achieve computational tractability, these methods simplify the robot-object dynamics by assuming that the robotand-object are either always in equilibrium (quasi-static), or moving with constant velocity (quasi-dynamic), which constrain the versatility of nonprehensile manipulation. Moreover, the execution of this sequence typically relies on applying low-level position controllers. As pointed out in <ref type="bibr">Cheng et al. (2022)</ref>, this mismatch between the dynamics used for planning and the true dynamics during execution leads to task failure. However, designing robust feedback controllers with the full system state as input is &#8902; This work was supported by NSF IIS award #2330794.</p><p>too challenging using manual methods, due to the size of the state space and the complexity of the dynamics.</p><p>The complexity of the dynamics underlying contact-rich manipulation scenarios has led to an increase in computational approaches for synthesizing controllers for these scenarios <ref type="bibr">Hogan and Rodriguez (2020)</ref>; <ref type="bibr">Tian et al. (2019)</ref>. One example in this domain is reinforcement learning (RL) (see <ref type="bibr">Sutton and Barto (2018)</ref>). The resulting statebased policies act as feedback controllers, providing some robustness to uncertainty during task execution. While RL methods evidently offer more applicability to a wide range of dynamical systems, such as in <ref type="bibr">Heess et al. (2017)</ref>; <ref type="bibr">Andrychowicz et al. (2020)</ref>; <ref type="bibr">Lillicrap et al. (2015)</ref>, many of them discard any potential geometric or physics structures that may be useful in control synthesis. This prohibitively increases the sample complexity of the learning process while risking suboptimal solutions, as pointed out in <ref type="bibr">Levine and Koltun (2013)</ref>.</p><p>In this work, we combine learning-based controller synthesis with contact-aware motion-planning to construct feedback control laws for contact-rich manipulation. The contact-aware motion planning algorithm, namely Contact-Mode Guided Motion Planning (CMGMP) proposed in <ref type="bibr">Cheng et al. (2022)</ref>, identifies contact mode sequences that are valuable for completing the task, despite the actual plan being dynamically infeasible. This identification reduces the challenge of exploration faced by RL algorithms, and is a key insight of our approach. The learning-based algorithm, namely policy search, addresses the challenge of learning controllers for complex highdimensional dynamics.</p><p>Keywords: Robotics, machine learning, artificial intelligence, motion planning, robust control.</p><p>Abstract: Learning policies for contact-rich manipulation is a challenging problem due to the presence of multiple contact modes with different dynamics, which complicates state and action exploration. Contact-rich motion planning uses simplified dynamics to reduce the search space dimension, but the found plans are then difficult to execute under the true objectmanipulator dynamics. This paper presents an algorithm for learning controllers based on guided policy search, where motion plans based on simplified dynamics define rewards and sampling distributions for policy gradient-based learning. We demonstrate that our guided policy search method improves the ability to learn manipulation controllers, through a task involving pushing a box over a step. Contributions. The first contribution is to define a mechanism for guiding policy search algorithms using motion plans for contact rich manipulation. This work involves defining appropriate loss functions and sampling mechanisms relevant to contact-rich manipulation. The second contribution is demonstrate that our proposed guided policy search algorithm makes the training converge faster wile simultaneously improving task performance. This demonstration uses the task of manipulating a box with a robotic finger in contact with the box, over a step.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">PROBLEM FORMULATION</head><p>This paper addresses the problem of learning a robust controller at the force/torque level for a robotic endeffector that is capable of moving a box from an initial pose q o 0 to a desired final pose q o d , where q o 0 , q o d &#8712; SE(2), the 2-dimensional special Euclidean group. The object and end-effector are confined to a vertical plane, where gravity affects the dynamics, in contrast to work in <ref type="bibr">Hogan and Rodriguez (2020)</ref> where contact-rich manipulation focuses on pushing an object on horizontal surfaces. The nontrivial nature of this problem is due to the facts that (i) the end-effector is assumed to make a point contact with the object only, and (ii) the goal pose q o d is located on top of a step fixture, which is elevated from the table on which the box initially rests (see Figures <ref type="figure">1 or 2</ref>). In other words, the manipulator cannot perform a force-closure grasp (see <ref type="bibr">Murray et al. (2017)</ref>) of the box; requiring the manipulation plan be informed and take advantage of the natural contact-rich dynamics of the system. Due to use of a single contact, we model the end-effector as an actuated sphere.</p><p>Figure <ref type="figure">1</ref> sketches the system setup with the relevant configuration variables. The system comprises the manipulator finger and the box, henceforth denoted M, and B, respectively. The configuration space of the system is the product space Q = SE(2) &#215; SE(2), the set of box and manipulator configurations, q = (q o , q m ). The system's state space X is the tangent bundle of its configuration space X = T Q. Please see Table <ref type="table">1</ref> for the definition of all state variables. We assign a frame to the goal state and denote it by G. This controller must map the state of the system to the forces or torques to be produced by the manipulator's actuators. In this work, we parametrize the controller P = P &#966; as a multilayer perceptron.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">BACKGROUND</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">Contact-Mode Guided Motion Planning (CMGMP)</head><p>The CMGMP algorithm proposed by Cheng et al. ( <ref type="formula">2022</ref>) is a variant of the widely used RRT planning algorithm Table <ref type="table">1</ref>. Nomenclature for state variables.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>State Configuration Velocity</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Rigid Body Position Orientation</head><p>Manipulator</p><p>proposed by <ref type="bibr">Karaman and Frazzoli (2011)</ref> that accounts for the differences in dynamics corresponding to different contact modes between the object, manipulator, and environment. The existence of multiple contact modes makes the robot-object-environment a hybrid system instead of a continuous dynamical system, and the CMGMP algorithm modifies the standard steps of the RRT algorithm to account for this difference. An important innovation by <ref type="bibr">Huang et al. (2020)</ref> is to be able to enumerate all possible contact modes in a state efficiently, enabling appropriate sampling of the hybrid state space. However, to reduce the complexity of the search, CMGMP uses a Quasidynamic model for the extend operation in the standard RRT algorithm, instead of the full nonlinear object-manipulator dynamics. This practical modification results in planned trajectories that may not be dynamically feasible, and for which standard position-based controllers will often fail, as Cheng et al. ( <ref type="formula">2022</ref>) reports.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">MJX Physics Engine</head><p>We use the MJX physics engine which is an implementation of MuJoCo <ref type="bibr">(Todorov et al. (2012)</ref>), written in JAX <ref type="bibr">(Bradbury et al. (2018)</ref>). This physics engine is differentiable through contact, and can be combined with machine learning techniques in order to develop controllers through analytical, data-driven gradient-based methods.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3">Policy Gradient Algorithms</head><p>Policy gradients, a form of policy search proposed in <ref type="bibr">Sutton et al. (1999)</ref>, involve training controllers by performing gradient descent (or ascent) over the parameters of the controller, in this case &#966;, with respect to the expected rewards. A controller synthesis methodology that utilizes policy gradients for updating controller parameters and DAgger (Ross ( <ref type="formula">2011</ref>)) for state-space sampling was used in <ref type="bibr">Deits et al. (2019)</ref>. In this paper, we use a similar approach for state-space sampling. Our main improvement is to use the plan from CMGMP to define a loss function that guides parameter updates, which enables tackling the potentially exponentially many "modes" of the system dynamics.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">METHODOLOGY</head><p>Our proposed algorithm modifies the guided policy search algorithm in <ref type="bibr">Deits et al. (2019)</ref>, described in Section 3.3, by defining rewards using an expert trajectory found using the CMGMP algorithm.</p><p>We design two loss functions, one for unguided (no expert) training, and another for guided policy training, which makes use of the trajectory provided by CMGMP. These loss functions are then differentiated and the gradient backpropagated to update the controller parameters for improved closed-loop performance.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Neural Network Policy</head><p>The neural-network policy, denoted by P is the mapping that takes the system state to the wrenches (forces and torques) exerted on the manipulator finger by the robotic manipulator, i.e., P : X &#8594; U &#8838; se * (2), x &#8594; P (x; &#966;) = (f (x; &#966;), &#964;(x; &#966;)), where f : X &#8594; R 2 and &#964; : X &#8594; so * (2) are functions, parametrized by &#966;. These wrenches are then assumed to be generated by the joint torques of the robot using the Jacobian mapping J; for example, if robot manipulator is fully actuated then its joint torques are assigned according to &#964; joint = J &#8868; P . The function P = P (x; &#966;) is parametrized by using a multilayer perceptron in this work.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Loss Function</head><p>The loss function for a sampled state x has the following form:</p><p>(1) where the first term penalizes distance of object (o) to the goal (g), the second term penalizes error in position of the object as defined by the planned path, the third term does the same for the manipulator, the fourth and fifth terms penalize velocities, and the last term penalizes loss of contact between object and manipulator through the gap function g(x). When the learning is not guided by the planned motion, the second and third terms are not included.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3">Generating Training Data</head><p>Similar to <ref type="bibr">Deits et al. (2019)</ref>, we use DAgger <ref type="bibr">(Ross et al. (2011)</ref>) to generate samples for training the policy neural network &#960; &#966; using the loss function in (1). To use DAgger, we must specify a method to sample initial conditions for the trajectories.</p><p>Sampling A State: Uniformly sampling over the objectmanipulator state space (with configuration in SE(2) &#215; SE(2)) would be inefficient, since states that exhibit contact between the robot, object, and environment correspond to a thin (measure-zero) subset of the objectmanipulator configuration space. Similar to <ref type="bibr">Cheng et al. (2022)</ref>, we use a sequential procedure to generate a sample by sampling an object configuration first and then using contact to guide sampling of the manipulator configuration. This procedure is given in Algorithm 1, where U (S) corresponds to a uniform distribution over the set S, and described below.</p><p>The CMGMP algorithm returns a finite sequence of states {x k } 1,...,N at times t k . Let q o k be the object configuration at these times, and consider a projection of the object configuration onto the ground plane:</p><p>Algorithm 1. Sampling a state x. Point xc &#8712; R 3 is the contact point between object and manipulator.</p><p>Input: Maximum contact gap &#949; &#8805; 0 Input: Sampling region G Input: Floor height function h Input: Set of admissible contact locations C &#8706;O (q o ) Input: Set of admissible velocities V (q o , q m ) Input: Set of preferred object orientations R(p o ) Input:</p><p>We define G to be the convex hull of the points P z (q o k ) for times t k , where k &#8712; {1, . . . , N}. To generate a position for the object, we sample uniformly from G, and then perturb the object along the positive z direction from the ground, through a random distance sampled from U ([0, &#1013;]). The 'ground' at the sample from G need not be at zero height. The orientation is sampled from a restricted set R(p o ), where all elements are such that the bottom of the object is tangent to the ground surface beneath it, but without incurring collision with the surface. We then sample a point p c on a subset C &#8706;O (q o ) of the boundary &#8706;O of the object. This subset typically excludes inaccessible points on the object boundary, and therefore depends on the object configuration. The manipulator configuration is chosen to ensure contact occurs at p c within some distance of the object, where this distance is given by a gap function g:</p><p>Once the configurations of the manipulator and object are obtained, velocities of the manipulator and object are sampled uniformly from the set of allowable velocities V (q o , q m ) based on the contact conditions for the manipulator-object configuration, where the set is bounded. Note that the contact conditions are determined by the unperturbed configuration of the object. The fact that the object may not be in actual contact with the environment at the sampled configuration is intentional, and we believe it drives learning of contact stabilization.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Defining a Target State:</head><p>In the guided case, we determine the distance from each configuration along the CMGMP trajectory to the configuration in the sampled state. Then, we find the state which minimizes these distances to use as the start of q o d . In the unguided case, q o d is set to the goal position of the box. This definition can also be thought of as labeling the state.</p><p>Generating Data D for a Training Epoch: Within a training epoch, we first generate a mini-batch B of data, of size |B|, using one of two methods:</p><p>(1) Sample using Algorithm 1 |B| times.</p><p>(2) Sample once using Algorithm 1, and then use a modified DAgger algorithm <ref type="bibr">(Sirichotiyakul and Satici (2023)</ref>) to obtain |B| states, discarding the initial state.</p><p>The training loop, detailed in Algorithm 2, then simulates the object-manipulator system using the current policy for N time steps. The data D comprises these |B| trajectories, so that it has size |D|= |B|&#215;N .</p><p>In a training epoch, we randomly choose between the two methods of generating B, using a Bernoulli distribution with parameter &#1013;.</p><p>Sampling Using DAgger Throughout the learning process, we utilize the modified DAgger sampling strategy proposed by <ref type="bibr">Sirichotiyakul and Satici (2023)</ref> to obtain a batch B of initial states from the state-space X . DAgger is used to sample states along a trajectory from a random initial state given the current control policy. In order to prevent B from being "poisoned," which we define to be B being either partially or entirely consistent of states outside of G, a trimming function is used before including states from the observed trajectory in the dataset D. The trimming function, explicitly provided in Algorithm 3, excludes all samples from a trajectory after the first time at which the projection of the trajectory under P z in (2) exits G. This trimming function effectively mitigates the risk of dataset poisoning, and allows the learning process to converge more reliably.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.4">Training Algorithm</head><p>We combine the steps above into Algorithm 2 which describes a single update step (training epoch). Full training involves executing a selected number of epochs.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">CASE STUDY/RESULTS</head><p>We model a simplified manipulation scenario where a manipulator must push a box up a step, as depicted in Figure <ref type="figure">1</ref>. The simplification consists of restricting the motion to remain in a vertical plane. The motion of the box and manipulator are both restricted to translation and rotation in the plane.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>CMGMP Modifications. We use a modified version of the CMGMP algorithm presented in Cheng et al. (2022).</head><p>There are three differences from the available implementation of CMGMP. First, we define costs based only on position error of the manipulated object; arbitrary orientations incur no cost. The reason is that reaching a desired orientation can be achieved in the controller synthesis stage instead, and removing it from the planning stage reduces the number of samples that CMGMP needs to collect to find a trajectory. Second, the time resolution between points on the CMGMP trajectory was increased to facilitate training of the controller in Section 4.4.</p><p>Simulator Modifications. The MJX environment inherently supports 3D environments, but allows for applying these motion constraints by adding degrees of freedom to bodies; if a degree of freedom is not added, motion along that degree of freedom is not allowed. We use this mechanism to achieve constrained motion. Instead of creating a custom CMGMP implementation to match the planar scenario modeled here, we add costs that penalize </p><p>i=1 G i deviation from a vertical plane, namely a cost of the form wy 2 o where w is a large weight.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.1">Algorithmic Details</head><p>State. We parametrize the configuration space projected onto the inertial x-z-axis by q = (x o , z o , &#952; o , x m , z m , &#952; m ) &#8712; SE(2) 2 , which stand for the xz-coordinates of the manipulator and the box with respect to the inertial coordinate system W and their rotation angles about the inertial y-axis.</p><p>Neural Network. The neural network has the architecture described in Table <ref type="table">2</ref>. The neural network was initialized with random weights and biases, which are then scaled by some user-settable parameter. This was motivated by the need for the network to output relatively large forces in order to move the manipulator and box, and was treated as a hyperparameter for training.</p><p>Loss Function. The loss function is also specialized to manipulation in the plane and the weights in equation ( <ref type="formula">1</ref>) are selected as w og = 30, w ov = 1 /2, w mv = 1 /2, and w mo = 1 for unguided training and w oo * = 25, w mm * = 2, w ov = 1 /8, w mv = 0, and w mo = 0 for the guided training.</p><p>Partitioning G. We seed the training using two discrete subsets of G, G 1 and G 2 . We partition G such that G 1 is the region on the ground before the step fixture and G 2 is the region on the step fixture. This method samples the state space near the target, and near the start of the step. This enables the training of the controller to more quickly converge to a desirable solution than using DAgger alone. These two sampling areas were chosen for the following reasons:</p><p>(1) Near the goal position: This was chosen so that the controller learns to control the manipulator such that the box slows down due to friction, as the manipulator cannot slow down the box through means such as grasping or pushing to oppose motion beyond the goal.</p><p>(2) Near the start of the ramp or step: This was chosen so that the controller would learn to push with enough force to start moving the box in order to reach the step.</p><p>DAgger sampling is performed for 62.5% of epochs as described in section 4.3.4. For the remaining 37.5% of epochs, we equally split sampling between G 1 and G 2 such that B consists only of states from one set in a given epoch. Training vs. Validation. For training, we consider states in both G 1 and G 2 as valid initial states in B. For validation, only G 1 is considered for initial states.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.2">Results</head><p>Figure <ref type="figure">2</ref> graphically depicts typical final box positions achieved by trained policies under the guided (orange boxes) and unguided trainings (blue boxes). It also depicts the final position of the box when using position control for the end-effector with desired states from the CMGMP motion plan. The guided training is able to achieve the task, manipulating the box to its desired state (green wireframe) from the initial state (red wireframe). On the other hand, the unguided training almost always gets stuck in local minima, preventing convergence to the desired state. This behavior is observed to be independent of learning rate. Table <ref type="table">3</ref> provides the average error in position under the three different strategies. The CMGMP trajectory assumes that the manipulator instantaneously resets its contact location when needed; without manual relocation of the end-effector, this approach fails to achieve the task.      Fig. 4. Depiction of multiple states from the resulting trajectory using a controller trained with guidance.</p><p>The end-effector was removed for clarity.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.">CONCLUSION</head><p>This paper presents a guided policy search algorithm for learning manipulation controllers. The main idea is to learn a controller based on trying to stabilize a contactrich manipulation plan found using simplified dynamics assumptions.</p><p>Through a non-prehensile manipulation task involving pushing a box over a step, we show our guided policy search algorithm outperforms basic policy search. One interpretation is that the motion plan helps solve the issue of state exploration that plagues typical policy gradient algorithms, an issue that is exacerbated by the presence of multiple contact modes.</p><p>This work presented a proof-of-concept data-driven manipulation strategy that robustly stabilizes a specific manipulation task. Extending the algorithm to more general classes of manipulation will be the subject of future work.</p></div></body>
		</text>
</TEI>
