Planning and Control for Contact-rich Manipulation
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9862300/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9862301/pasted-from-clipboard.png)
Tao Pang
Oct 2022
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9878345/pasted-from-clipboard.png)
Why contact-rich?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9862317/pasted-from-clipboard.png)
Collision-free Motion Planning
Interact with the world
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9862343/pasted-from-clipboard.png)
Interact with the world
Collision-free Motion Planning
But this is excessively restrictive!
We'd like to enable robots to make contacts with the world like humans do.
Why contact-rich?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9862355/pasted-from-clipboard.png)
Box
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9862361/pasted-from-clipboard.png)
What if we have a larger box...?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9862383/pasted-from-clipboard.png)
We need to use a bigger arm...
Or make more contacts!
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9862391/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9864088/pasted-from-clipboard.png)
- Contact-rich manipulation allows smaller robots to handle bigger objects.
- Smaller robots are safer to easier to work in environments designed for humans.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9874577/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9894063/pasted-from-clipboard.png)
Contact-rich Manipulation at Different Scales
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9862300/pasted-from-clipboard.png)
A few more arms
Smaller
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9758476/pasted-from-clipboard.png)
Contact-rich planning and control can enable both bimanual whole-arm manipulation and dexterous manipulation.
Why is contact-rich planning hard?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9867561/pasted-from-clipboard.png)
Contact dynamics is non-smooth!
Two solutions
Smooth contact-dynamics and use smoothed gradients
Reason explicitly about contact mode transitions
Contact
No Contact
- But descent methods get stuck in local minima.
- Good at escaping local minima,
- But mode enumeration scales poorly (exponentially) with the number of contacts.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9765824/pasted-from-clipboard.png)
smoothed dynamics
original dynamics
\(u = 0\)
Model-based Planning through Contact: a Quick Review
- Trajectory Optimization through Contact
- Mordatch, Igor, Emanuel Todorov, and Zoran Popović. "Discovery of complex behaviors through contact-invariant optimization." ACM Transactions on Graphics (TOG), 2012.
- Hogan, François Robert, and Alberto Rodriguez. "Feedback control of the pusher-slider system: A story of hybrid and underactuated contact dynamics." arXiv preprint arXiv:1611.08268 (2016).
- Posa, Michael, Cecilia Cantu, and Russ Tedrake. "A direct method for trajectory optimization of rigid bodies through contact." The International Journal of Robotics Research, 2014.
- Aydinoglu, Alp, and Michael Posa. "Real-time multi-contact model predictive control via admm." 2022 International Conference on Robotics and Automation (ICRA), 2022.
- Cheng, Xianyi, et al. "Contact mode guided motion planning for quasidynamic dexterous manipulation in 3d." 2022 International Conference on Robotics and Automation (ICRA), 2022.
- Marcucci, Tobia, et al. "Approximate hybrid model predictive control for multi-contact push recovery in complex environments." 2017 IEEE-RAS 17th International Conference on Humanoid Robotics (Humanoids), 2017.
- Enumerate mode switches locally
- Enumerate Mode Switches
- Sampling mode switches
Smoothed Contact Dynamics
Hybrid Contact Dynamics
Local Planning
Global Planning
Smoothed dynamics + Global planning?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9867476/pasted-from-clipboard.png)
[1] Mordatch et al.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9862508/pasted-from-clipboard.png)
[3] Posa et al.
[5] Cheng et al.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9867536/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9041681/pasted-from-clipboard.png)
[6] Marcucci et al.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9949160/pasted-from-clipboard.png)
[4] Aydinoglu and Posa.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9867529/pasted-from-clipboard.png)
[2] Hogan and Rogriguez.
What about RL (reinforcement learning)?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9041997/pasted-from-clipboard.png)
- RL generates robust policies for specific tasks, but...
- RL requires heavy offline computation,
- the learned policy does not generalize (e.g. to opening a door).
- In contrast, planning can solve new tasks with a small amount of online compute.
- We believe a good manipulation pipeline will have both plans and policies.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9867609/pasted-from-clipboard.png)
- Andrychowicz, OpenAI: Marcin, et al. "Learning dexterous in-hand manipulation." The International Journal of Robotics Research, 2020.
- Lee, Joonho, et al. "Learning quadrupedal locomotion over challenging terrain." Science robotics, 2020.
-
H.J. Terry Suh*, Tao Pang*, Russ Tedrake, “Bundled Gradients through Contact via Randomized Smoothing”, RA-L, 2022.
-
Tao Pang*, H.J. Terry Suh*, Lujie Yang, Russ Tedrake, "Global Planning for Contact-Rich Manipulation via Local Smoothing of Quasi-dynamic Contact Models", under review.
[2] Lee et al.
[1] OpenAI.
How does RL power through non-smooth contact dynamics? [3][4]
- RL minimizes a stochastic objective via sampling.
- Sampling has a smoothing effect on the objective's landscape.
Taking a page from RL's book, we smooth contact dynamics, but without using samples (faster).
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9867621/pasted-from-clipboard.png)
Terry Suh
Why is contact-rich planning hard?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9867561/pasted-from-clipboard.png)
Contact dynamics is non-smooth!
Contact
No Contact
Smoothing
Our method: Kino-dynamic RRT through contact
- We leverage the sampling-based nature of RRT to globally explore the state space.
- Instead of thinking about mode transitions, we abstract modes away using smoothed linearization of the contact dynamics.
- We propose an reachability-based distance metric for RRT to efficiently explore the state space.
- Mode abstraction and the distance metric are enabled by a Convex, Quasi-static, Differentiable contact dynamics model.
- Convex: the discrete-time dynamics \(x_+ = f(x, u)\) can be evaluated by solving a convex program.
-
Quasi-static:
- Valid for many manipulation tasks.
- Smaller state space,
- Larger step size,
- The dynamics model can be easily smoothed.
- Differentiable: the smoothed gradients can help RRT by providing an effective distance metric.
Our Method: Sim and Hardware Demos.
- RRT takes less than a minute.
Open-loop execution of contact-rich plans:
What is quasi-static dynamics?
- Quasi-static: velocity is small so that inertial and Coriolis forces are negligible.
- \(x \coloneqq q \coloneqq [q^\mathrm{u}, q^\mathrm{a}]\): system configuration.
- \(q^\mathrm{a}\): actuated, imepdance-controlled robots
- \(q^\mathrm{u}\): un-actuated objects.
- \( u \):
robot velocitiesposition command to the stiffness-controlled robots [1]. - \(\delta q \coloneqq q_+ - q\)
- \(h\): step size in seconds.
\( x_{+} = f(x, u)\)
- \(\lambda_i\): contact forces/impulses
- \(\phi_i \): signed distances
(KKT)
- A convex quadratic program (QP), after linearizing \(\phi_i\).
- "Minimizing potential energy, subject to non-penetration constraints."
Force balance of the robot.
Force balance of the object.
Non-penetration.
"Contact forces cannot pull."
"Contact force needs contact."
-
Tao Pang, Russ Tedrake, "A Convex Quasistatic Time-stepping Scheme for Rigid Multibody Systems with Contact and Friction", ICRA, 2021.
Quasi-static dynamics is good for manipulation planning!
- Many manipulation tasks are quasi-static.
- Spatial benefit: Smaller state space (\([q, v]\) vs. only \(q\)).
-
Temporal benefit: Ignoring transients => looking into the future with fewer steps.
-
Tao Pang, Russ Tedrake, "A Convex Quasistatic Time-stepping Scheme for Rigid Multibody Systems with Contact and Friction", ICRA, 2021.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9950452/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9950482/pasted-from-clipboard.png)
Second-order Dynamics
Quasi-static Dynamics
Quasi-static Dynamics Needs Regularization
Quasi-static Dynamics
- The quadratic cost is positive semi-definite.
- The object can be anywhere between the robot and the wall, similar to having a null space.
Regularized least squares
Regularized Quasi-static Dynamics
- The quadratic cost is now positive definite.
- "Among all possible object motions, give me the one that moves the least."
- Picking \(\epsilon = m^\mathrm{u} / h\) gives Mason's definition of quasi-dynamic dynamics.
What about friction?
- For a frictionless multi-body system with \(n_\mathrm{c}\) contacts, the dynamics can be solved as a QP:
- \(\mathcal{K}^\star_i\) is the dual of the \(i\)-th friction cone.
- Still convex! Convexity is achieved at the expense of "hydroplaning" between relatively-sliding objects.
- But hydroplaning disappears as \(h \rightarrow 0\).
- Anitescu [1] has a nice convex approximation of Coulomb friction constraints, allowing us to write down the dynamics as a Second-Order Cone Program (SOCP):
Tangential displacements
Dynamics of the Toy Problem
- Anitescu, Mihai. "Optimization-based simulation of nonsmooth rigid multibody dynamics." Mathematical Programming 105.1 (2006): 113-143.
Differentiability
Convex, Quasi-Static, Differentiable Dynamics (an SOCP)
- The KKT optimality condition of the dynamics SOCP defines equality constraints (including active contact constraints), from which the derivatives of \(\delta q^\star\) w.r.t. \((\mathbf{Q}, b, \phi_i, \mathbf{J}_{\mathrm{n}_i}, \mathbf{J}_{\mathrm{t}_i})\) can be computed using the Implicit Function Theorem (IFT).
- \(\mathbf{A}, \mathbf{B}\) can then be computed using the gradients from IFT and the chain rule.
- Standard practice for many differentiable simulators, even though many of them do not find the active constraints by solving convex programs.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9765715/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9765717/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9765727/pasted-from-clipboard.png)
Smoothing
- The contact dynamics \(f(q, u) \in C^0\) has discontinuous gradients, which are bad for planning methods that use gradients.
- Smoothing with "force at a distance" is a common method to alleviate this problem.
Optimality Condition
KKT
Original Dynamics
Smoothed Dynamics
Smoothing, the general case.
Put constraints in a generalized log for \(\mathcal{\kappa}_i^\star\)
- An unconstrained convex program.
- Can be solved with Newton's method.
- Also differentiable.
Convex, Quasi-Dynamic, Differentiable Dynamics (an SOCP)
Notation:
Original dynamics
Smoothed dynamics
Smoothed gradients enable trajectory optimization for dexterous hands, but...
Task: Turning the ball by 30 degrees.
What about 180 degrees?
Finding this trajectory requires powering through local minima!
Sampling-based Motion Planing is Great at Global Exploration, but...
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9950838/pasted-from-clipboard.png)
- Rapidly-Exploring Random Tree (RRT): iteratively builds a tree that fills the state space. [1]
- Dynamic reachability is essential for efficient exploration. [2]
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9950933/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9950943/pasted-from-clipboard.png)
- Steven M. LaValle, "Planning Algorithms", Cambridge University Press , 2006.
-
H.J.T. Suh, J. Deacon, Q. Wang, "A Fast PRM Planner for Car-like Vehicles", self-hosted, 2018.
How do we think about reachability under the contact-dynamics constraint?
A distance metric that reflects contact dynamic reachability
Smoothed Contact Dynamics
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9767204/pasted-from-clipboard.png)
\(\varepsilon \) sub-level set
Nominal state
un-actauted(objects)
Smoothed
At state \(\bar{q}\), what doe an \(\varepsilon\)-ball in action space get transformed into under the smoothed dynamics?
RRT through contact
Two modifications to the vanilla RRT are made:
- Nearest node on tree is found using \( d^\mathrm{u}_{\rho}(q; \bar{q}) \).
- Contact sampling: robot configuration is occasionally reset to one that has a good distance metric, which typically corresponds to grasps.
Distance Metric
RRT tree for a simple system with contacts
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9863828/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9863828/pasted-from-clipboard.png)
Ablation study: what trees look like after growing a fixed number of nodes.
The modified RRT works well for contact-rich tasks!
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9767213/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9767214/pasted-from-clipboard.png)
Planning wall-clock time (seconds)
RRT is good at escaping local minima, but...
- Kino-dynamic RRT needs a good distance metric! Think about the bycicle.
- A good metric from a queried state \(q\) to a nominal state \(\bar{q}\) can be derived based on the smoothed linearization at \(\bar{q}\):
Smoothed Contact Dynamics
- \(d^\mathrm{u}_{\rho}(q; \bar{q})\) reflects the reachability of \(q\) from \(\bar{q}\) under the smoothed linearization.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9767204/pasted-from-clipboard.png)
\(\varepsilon \) sub-level set
Preliminary: stabilizing contact-rich plans
Open-loop
Closed-loop
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9876978/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9876980/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9876987/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9876988/pasted-from-clipboard.png)
Naive QP controller based on smoothed linearization:
Presented Works
Collaborators
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9878345/pasted-from-clipboard.png)
-
Tao Pang*, H.J. Terry Suh*, Lujie Yang, Russ Tedrake, "Global Planning for Contact-Rich Manipulation via Local Smoothing of Quasi-dynamic Contact Models", under review.
-
H.J. Terry Suh*, Tao Pang*, Russ Tedrake, “Bundled Gradients through Contact via Randomized Smoothing”, RA-L, 2022.
-
Tao Pang, Russ Tedrake, "A Convex Quasistatic Time-stepping Scheme for Rigid Multibody Systems with Contact and Friction", ICRA, 2021.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9878382/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9878383/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9867621/pasted-from-clipboard.png)
Terry Suh
Lujie Yang
Russ Tedrake
Quasi-static dynamical systems: how to fix it.
A Impedance-controlled 1D robot and an object.
- Pang, Tao, and Russ Tedrake. "A convex quasistatic time-stepping scheme for rigid multibody systems with contact and friction." 2021 IEEE International Conference on Robotics and Automation (ICRA). IEEE, 2021.
- Pang, Tao, and Russ Tedrake. "A robust time-stepping scheme for quasistatic rigid multibody systems." 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE, 2018.
\( x_{+} = f(x, u)\)
- \(x \coloneqq q \coloneqq [q^\mathrm{u}, q^\mathrm{a}]\): system configuration.
- \(q^\mathrm{a}\): actuated, imepdance-controlled robots
- \(q^\mathrm{u}\): un-actuated objects.
- \( u \):
robot velocities.position command to the impedance-controlled robots.
Contact force and \(q_+\) can now be uniquely* determined from \(u\), even for grasping.
Force-acceleration vs. Impulse-Momentum
Force-acceleration
- Stewart, David E. "Rigid-body dynamics with friction and impact." SIAM review 42.1 (2000): 3-39.
Impulse-momentum
is the optimality condition of
But impacts can lead to infinite forces (e.g. Painleve's Paradox) [1].
Time step
Stabilizing contact-rich plans
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9863991/pasted-from-clipboard.png)
Open-loop hardware
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9864028/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9864037/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9864045/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9864012/pasted-from-clipboard.png)
Open-loop Drake
Quasi-static dynamical systems: what it was.
\( x_{+} = f(x, u)\)
- \(x \coloneqq q \coloneqq [q^\mathrm{u}, q^\mathrm{a}]\): system configuration.
- \(q^\mathrm{a}\): actuated, imepdance-controlled robots
- \(q^\mathrm{u}\): un-actuated objects.
- \( u \): robot velocities.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9862225/pasted-from-clipboard.png)
\(\mathrm{v}_p\): applied velocities by the manipulator end effector at the contact point. [1]
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9765589/pasted-from-clipboard.png)
[3]
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9862236/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9862243/pasted-from-clipboard.png)
\(R_P\): "the ray of pushing". [2]
This is a good model for planar pushing:
- Contact force cannot be uniquely determined from \(u\) when there is contact.
- As a result, \(q_+\) cannot be determined from \(u\).
- Defining \(u\) as velocity leads to ill-posed dynamical systems (invalid Bond Graphs).
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9765569/pasted-from-clipboard.png)
But what about grasping?
- Zhou, Jiaji, et al. "A convex polynomial model for planar sliding mechanics: theory, application, and experimental validation." The International Journal of Robotics Research, 2018.
- Mason, Matthew T. "Mechanics and planning of manipulator pushing operations." The International Journal of Robotics Research, 1986.
- Hogan, François Robert, and Alberto Rodriguez. "Feedback control of the pusher-slider system: A story of hybrid and underactuated contact dynamics." Algorithmic Foundations of Robotics XII, 2020.
What does quasi-dynamic mean?
- Quasi-static \(\Longleftrightarrow \Sigma F = 0\)
- Quasi-dynamic:
"Quasi-dynamic analysis is intermediate between quasi-static and dynamic. Suppose that a manipulation task involves occasional brief periods when there is no quasistatic balance. The task is then governed by Newton's laws. But in some instances, these periods are so brief that the accelerations do not integrate to significant velocities. Momentum and kinetic energy are negligible. Restitution in impact is negligible. It is as if a viscous ether is constantly damping all velocities and sucking the kinetic energy out of all moving bodies. We can analyze such a system by assuming it is at rest, calculating the total forces and body accelerations, then moving each body some short distance in the corresponding direction." -- Matt Mason <Dynamics of Robotic Manipulation>
-
But why is it a good idea?
-
Benefits of quasi-static dynamics for planning:
- Smaller state space (\([q, v]\) vs. only \(q\)).
Larger time steps.
Quasi-dynamic is quasi-static with regularization.
-
Second-order
mass matrix
Quasi-static
Coriolis Force
Torque (contact + actuation)
Quasi-dynamic
Before my PhD defense in December 2022...
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9758476/pasted-from-clipboard.png)
- Stabilize this with MPC.
- Already done in Drake.
- Potential problems:
- Robustness.
- Shape variation.
- Coefficient of friction.
- etc.
- Robustness.
- Imperfect actuators.
- Poor tracking.
- Hysteresis.
Turning the ball by 30 degrees: open-loop
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9751602/pasted-from-clipboard.png)
- Simulated in Drake with the same SDF as the quasi-dynamic model used for planning.
Turning the ball by 30 degrees: open-loop with disturbance
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9751611/pasted-from-clipboard.png)
- Initial position of the ball is off by 3mm.
Turning the ball by 30 degrees: closed-loop with disturbance
- Initial position of the ball is off by 3mm.
- Simple controller:
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1354033/images/9751621/pasted-from-clipboard.png)
Smooth linearization
talk
By Pang
talk
- 15