Planning Through Contact with Trajectory Optimization and GCS
Robot Locomotion Group, MIT
Long Talk, Spring 2023
Bernhard Paus Græsdal

Why do we care about planning through contact?
-
Current systems are task-specific
-
We want a general planning framework for novel manipulation tasks
-
Combinatorial blowup and non-convexity makes motion planning a big challenge
Relevant Work
How is the problem solved today?
Typical tools of choice
1. Sampling-Based Planning

2. Trajectory Optimization

Russ Tedrake. Underactuated Robotics: Algorithms for Walking, Running, Swimming, Flying, and Manipulation (Course Notes for MIT 6.832)
Figures borrowed from:
1. Sampling-Based Manipulation Planning

Advantages
- Takes robot kinematics into account
- Doesn't explicitly reason about contact modes

Mode Sampling and projection onto contact manifold + RRT
Smooth dynamics + Reachability metric + RRT
Drawbacks
- Suffers the curse of dimensionality
- The "RRT"-dance
2. Contact-Rich Trajectory Optimization

Nonlinear optimization + Implicit contact modes (complimentarity condition)


Mixed-Integer Convex Problem + Pre-specified trajectories + McCormick Relaxations
Advantages
- Works well with pre-defined mode schedules
(used a lot for locomotion) - (Local) optimality
Disadvantages
- Very hard when you also search over contact modes
- Non-convex in the general case with rotations
- For non-convex trajopt: reliant on initial guess and tuning
Sampling-Based Manipulation Planning

- Takes robot kinematics into account
- Doesn't explicitly reason about contact modes
- Suffers the curse of dimensionality
Smooth dynamics + Reachability metric + RRT
Sampling-Based Manipulation Planning

Mode Sampling and projection onto contact manifold + RRT

- TODO
Contact-Rich Trajectory Optimization

Nonlinear optimization + Implicit contact modes (complimentarity condition)


- Non-convex
- ??
- ??
Contact-Rich Trajectory Optimization
- Works well with pre-defined mode schedules
(used a lot for locomotion) - Hard when you search over contact modes

Nonlinear optimization + Implicit contact modes (complimentarity condition)


Contact-Rich Trajectory Optimization


Mixed-Integer Convex Problem + McCormick Relaxations
- Exponential in the number of contact modes
- Scales poorly
- TODO add videos?
Our Approach
Plan Through Contact Modes using GCS

How to flip up and push the object?
To plan this motion, we need to simultaneously decide:
- Contact mode sequence
- Continuous motion within each contact mode

Motivational Example
[1] N. Doshi, O. Taylor, and A. Rodriguez, “Manipulation of unknown objects via contact configuration regulation.” arXiv, Jun. 01, 2022. doi: 10.48550/arXiv.2203.01203.
Figure taken from [1]
The task at hand

We want to...
- Flip up the object
- Push the object
- Reposition the end-effector
... in no particular order
While minimizing some quantity:
- Kinetic energy
- Exerted work
- ...

Let's build a graph

- Each contact mode is a set!
- Initial and target configurations are singletons
Let's build a graph

- More abstractly, we get a graph like this:
Let's build a graph
If we can solve the SPP, we have our plan!


Our Approach



Plan through contact using GCS
- Sets are contact modes
There's a problem with this picture...
Can we plan through contact modes with GCS?
Generally, no!

- Contact modes are non-convex
- However, the sets are basic semi-algebraic!
We need to find a convex formulation (relaxation) for the contact modes
Preliminary Results
Planning within one contact mode
Object Flip-Ups & Pushing
Object Flip-Ups
Planar Pushing
Planning Through Contact Modes with GCS
(In the convex, non-rotational case)

Problem Formulation
Problem Formulation
Making the contact modes convex
Contact Modelling


Modelling Choices
Modelling decisions (1/2):
- Assume quasi-static dynamics:
- Low velocities, low inertial forces and no impacts
- Low velocities, low inertial forces and no impacts
- (Quasi-dynamic: Allows brief periods of dynamic motion, but assumes accelerations do not integrate into significant velocities)
Modelling Choices
Modelling decisions (2/2)
- Use relative quantities in frames of objects in contact
- Minimize kinetic energy
Defining Decision Variables
- Relative positions
- Relative rotation
- Contact positions (in local frames)
- Contact forces
For each active contact pair


For each knot point \( k = 0, \ldots , N \)
Consistency across frames
- Contact points equal
- Relative positions consistent
- Newton's third law for contact forces
- where \(W\) is some common frame
For each active contact pair


Contact modes
- Sticking contact


2. Sliding contact
All constraints
(for planning within one contact mode)
Non-convex
(quadratic equality constraints)
(knot point indices omitted for notational simplicity)
Cost
- We assume low velocities
- \( \implies \) Minimize kinetic energy over the trajectory
- \( v(t) = \dot p(t) \)
- In general \( [\omega]^\times = \dot R R ^ \intercal \). We obtain \( \lVert \omega \rVert ^2 \) as
(Proof on next slide)
Cost
(Proof):
Cost
- Use forward-differences to obtain derivatives
- Use Riemann-sums to approximate the integral
- We thus minimize the following cost:
Cost Summary
Minimizing kinetic energy of the trajectory
\( \Updownarrow \)
Minimizing squared Euclidean distances directly in the coordinates of the position and rotation
Full Optimization Problem
(for planning within one contact mode)
Non-convex
(quadratic equality constraints)
(knot point indices omitted for notational simplicity)
Full Optimization Problem
- The feasible set is a basic semi-algebraic set
$$\left\{ f_i(x) = 0, \, g_i(x) \geq 0 \right\}$$ i.e. described by finitely many polynomial constraints.
-
Moreover, it is described by second order polynomials
-
Cost is also quadratic
(for planning within one contact mode)
Full Optimization Problem
- The problem is naturally a (non-convex) QCQP
Solving it: SDP Relaxation
- We solve it with the standard SDP relaxation
\( \longrightarrow \)
- Exact when \( \text{rank}(X) = 1 \iff X = x x^\intercal \)
- (This includes the McCormick envelope/outer-approximation of bilinear constraints)
- Now we have a convex set!
\( X := xx^\intercal \)
Minimizing kinetic energy makes the SO(2) relaxation tight
- Formulate the following minimal problem
- Solving the relaxed problem gives the true solution!
- We expect this to also hold for SO(3)
- (A formal tightness proof using the dual of the relaxation is in the works)
Minimizing kinetic energy makes the SO(2) relaxation tight
- Naive SOCP relaxation
\( c_\theta^2 + s_\theta^2 \leq 1 \)

- SDP relaxation

(Points 1 and 4 are fixed from boundary conditions)
Results
Making the contact modes convex
Object Flip-Ups & Pushing
Tightness Results

Pentagon

Mass: 1kg
COM to vertex: 0.2 m
"Reference force" = \( mg \approx 10 N \)
Object Flip-Ups & Pushing
Tightness Results

Box

Mass: 1kg
COM to vertex: 0.2 m
"Reference force" = \( mg \approx 10 N \)
Object Flip-Ups & Pushing
Tightness Results

Worst case: Triangle

Mass: 1kg
COM to vertex: 0.2 m
"Reference force" = \( mg \approx 10 N \)
Object Flip-Ups & Pushing
Tightness Results
Preliminary Conclusions
- SO(2) relaxation is tight
\( \implies \) Force balance is tight - Sometimes (small) violation of torque balance
- For certain initial conditions, Newton's third law gets violated
(we suspect this is for infeasible initial conditions)
Planar Pushing
Tightness Results
For triangle:

- Similar for all shapes
- Preliminary analysis: Seems to be tight
Future/planned work
- Use GCS to plan through contact modes
- Stabilize trajectories in simulation
- Extend to the 3D case
- Longer-term: Work on dealing with contact mode explosion
Planning Through Contact Using Trajectory Optimization and GCS
By Bernhard Paus Græsdal
Planning Through Contact Using Trajectory Optimization and GCS
- 265