Grey Sarmiento
Ph.D. Qualifying Exam
Making contact with the environment is critical for many robotic tasks.
Contact planning and control decides how and when the robot should contact the world.
Example tasks:
Ask the questions:
Problem: Contact causes discontinuous dynamics and nonconvex constraints.
Problem: Contact causes discontinuous dynamics and nonconvex constraints.
Problem: Contact causes discontinuous dynamics and nonconvex constraints.
Problem: Contact causes discontinuous dynamics and nonconvex constraints.
Problem: Contact causes discontinuous dynamics and nonconvex constraints.
Contact dynamics are discontinuous at contact boundaries.
Task success is brittle to error or misestimation of force, friction, position, distance, and velocity
Deciding when to make and break contact is difficult if dynamics are used in the contact planner
Many important tasks require navigating many options for contact and contact mode in order to be successful, which can be computationally expensive
The full contact planning problem becomes very hard to solve.
To handle this, contact planners and controllers make different approximations of the true problem.
Our challenge: Compare these different methods and understand when each method works, and when/why they fail
Presentation Outline
1
Low-level methods for contact uncertainty
Methods for planning over contact
Explicit and Hierarchical Contact Sequences
Idea: Solve for the optimal trajectory in each contact mode and use a pre-specified schedule or higher-level planner for contact sequence
W. Yan, Y. Pan, J. Che, J. Yu, and Z. Han, “Whole-body kinematic and dynamic modeling for quadruped robot under different gaits and mechanism topologies,” PeerJ Computer Science, vol. 7, p. e821, 2021
N. Doshi, O. Taylor, and A. Rodriguez, “Manipulation of unknown objects via contact configuration regulation,” in 2022 International Conference on Robotics and Automation (ICRA). IEEE, 2022, pp. 2693–2699.
Methods for planning over contact
Offline Contact-Implicit Planning
Idea: Include contact as a decision variable and handle nonconvexity by solving the problem offline.
Methods for planning over contact
Learning-Based Methods
Idea: Do not model contact, learn a model-free reinforcement learning policy to accomplish the task.
L. Smith, I. Kostrikov, and S. Levine, “A walk in the park: Learning to walk in 20 minutes with model-free reinforcement learning,” arXiv preprint arXiv:2208.07860, 2022.
T. Chen, J. Xu, and P. Agrawal, “A system for general in-hand object re-orientation,” in Conference on Robot Learning. PMLR, 2022, pp. 297–307.
Methods for planning over contact
Contact-Implicit MPC
Idea: Include contact as a decision variable in an online MPC policy
Problem: Need to reformulate contact dynamics to solve optimal control online
2
2. Preliminaries
Optimal Control: Problem Formulation
Task: What we want the robot to achieve
Objective: An expression of how close we are to task success
State: Values that define where the robot is in space
Input: Torques and forces sent to the robot actuators
Dynamics: How state changes over time, given inputs
Optimal Control Problem Formulation
Concept: Find the optimal input (and state) trajectory that minimizes cost over time (achieves task success), subject to the dynamics of the system.
optimal trajectory
system dynamics
cost over time
Discrete time problem:
Model Predictive Control
Re-solve the optimal control problem at every timestep to use it as an online policy.
controller
plant
Linearized Trajectory Optimization
Goal: Solve the optimal control problem using fast linear and convex solvers.
Use a quadratic cost term:
Linearize the system dynamics:
Linearize equality constraints:
Robot Dynamics: The Manipulator Equation
The manipulator equation expresses force balance in a robotic system.
inertial force
Coriolis and gravity terms
contact forces
generalized torques
generalized position vector
Contact Complementarity
distance to surface
sliding velocity
contact force
for 0 sliding velocity
Contact Complementarity
distance to surface
sliding velocity
contact force
Contact Dynamics and Impact
velocity
time
contact force
time
At the limit of instantaneous impact (a rigid body system) the contact force over time can be represented with the Dirac delta function:
Formulate contact force in discrete time:
Timestepping schemes avoid Dirac-deltas in dynamics constraints. Originally:
Linear Complementarity System (LCS)
Attempt: Mixed Integer Quadratic Program (MIQP)
Minimize the cost over all contact modes separately to search for the optimal sequence and trajectory
Define binary contact decision variable for n contact pairs:
nonconvex constraint:
convex constraints:
nonconvex constraint:
becomes
Attempt: Mixed Integer Quadratic Program (MIQP)
Problem: Worst case solve cost is exponential with time horizon and number of contacts
For one contact and binary contact modes:
1 (contact)
0 (free)
worst case computation
Contact-Implicit MPC Problem
Challenge: Complementarity constraint is nonconvex, so problem cannot be solved as-is with available convex and linear solvers.
We must modify the optimal control problem in some way to make this problem work with MPC.
3
3. Contact-implicit literature review
Literature Review
There are many ways to reformulate contact dynamics for MPC. Many fall under three categories:
Literature Review
Different papers emphasize different qualities of their controller solutions. Some qualities that were commonly highlighted were:
Literature Review
Literature Review
There is difference across authors about which solver qualities are important to achieve.
Goal: Evaluate multiple controllers on the exact same tasks to achieve a true comparison.
What makes a good benchmark?
Benchmark tasks should:
Goal of this project: Provide an apples-to-apples comparison of different contact-implicit controllers on a set of tasks.
4
4. Overview of methods analyzed
Methods Evaluated
Sampling: MuJoCo MPC (MJPC)
The MuJoCo simulator is able to resolve contact force realistically and stably in continuous time.
With access to fast realistic contact modeling, MuJoCo MPC uses the MuJoCo simulation to evaluate randomized inputs to choose the best one for the task.
This approach does not solve for the optimal control, but rather emphasizes solutions close enough to optimal sent at a faster control rate.
Algorithm:
MuJoCo MPC (MJPC)
cubic spline in input space
Differentiable Contact: Fast Contact-Implicit MPC (FCIMPC)
Rigid contact: No gradient for contact constraint
Soft contact: Gradient for contact constraint allows planner to make and break new contacts
Differentiable Contact: Fast Contact-Implicit MPC (FCIMPC)
Idea: Create a soft-contact LCP, solve trajectory quickly with pre-factorized solver components
To achieve success, many examples need a reference contact trajectory computed offline. For this evaluation, a reference is not provided.
Force-Dynamics Disparity: Consensus Complementarity Control (C3)
Idea: Allow contact force to conflict with feasible dynamics, and iteratively resolve this conflict with ADMM consensus
Consensus Complementarity Control (C3)
Alternate solving for best positions given desired contact force, and best desired contact force given objective and agreement with position
Consensus Complementarity Control (C3)
Key Differences
Controller has contact model? | Controller uses rigid contact? | Only uses local contact pairs? | Solution minimizes objective analytically? | Decision variables | Solver hyperparameters | |
---|---|---|---|---|---|---|
MJPC |
|
sample variance | ||||
FCIMPC |
|
complementarity relaxation | ||||
C3 |
|
consensus parameters |
5
5. Experiments and Discussion
Setup
Tasks
Pushbot
2D Waiter
Task Insights
Pushbot:
2D Waiter:
Solution Quality: Time to Success
Solution Quality: Trajectory Jerk
Solution Quality: Average Contact Force
Solution Quality Takeaways
Solver Sensitivity: Cost Weight Variance
MJPC was significantly more robust to variances in cost weight terms Q and R than C3 (and FCIMPC). Unlike the other two methods, MJPC does not use the cost terms analytically to find a solution.
For trajectory optimization methods like C3 and FCIMPC, Q and R appear in the cost gradient and therefore affects the numerical conditioning of the solver:
Current Challenges
The waiter task currently faces some challenges to reasonable task success.
Ongoing and Future Work
Things that are being explored via the waiter task and a third circle corralling task:
I.
Optimal Control Problem Formulation
Concept: Find the optimal input (and state) trajectory that minimizes cost over time (achieves task success), subject to the dynamics of the system.
optimal trajectory
system dynamics
cost over time
Continuous time problem:
Contact Dynamics and Impact
For soft contact events, contact force imparts an impulse across the time of contact:
velocity
time
contact period
time
contact force