Alert button
Picture for Patrick M. Wensing

Patrick M. Wensing

Alert button

Recursive Rigid-Body Dynamics Algorithms for Systems with Kinematic Loops

Nov 22, 2023
Matthew Chignoli, Nicholas Adrian, Sangbae Kim, Patrick M. Wensing

We propose a novel approach for generalizing the following rigid-body dynamics algorithms: Recursive Newton-Euler Algorithm, Articulated-Body Algorithm, and Extended-Force-Propagator Algorithm. The classic versions of these recursive algorithms require systems to have an open chain structure. Dealing with closed-chains has, conventionally, required different algorithms. In this paper, we demonstrate that the classic recursive algorithms can be modified to work for closed-chain mechanisms. The critical insight of our generalized algorithms is the clustering of bodies involved in local loop constraints. Clustering bodies enables loop constraints to be resolved locally, i.e., only when that group of bodies is encountered during a forward or backward pass. This local treatment avoids the need for large-scale matrix factorization. We provide self-contained derivations of the algorithms using familiar, physically meaningful concepts. Overall, our approach provides a foundation for simulating robotic systems with traditionally difficult-to-simulate designs, such as geared motors, differential drives, and four-bar mechanisms. The performance of our library of algorithms is validated numerically in C++ on various modern legged robots: the MIT Mini Cheetah, the MIT Humanoid, the UIUC Tello Humanoid, and a modified version of the JVRC-1 Humanoid. Our algorithms are shown to outperform state-of-the-art algorithms for computing constrained rigid-body dynamics.

* Submitted to IEEE Transactions on Robotics 
Viaarxiv icon

A Unified Perspective on Multiple Shooting In Differential Dynamic Programming

Sep 28, 2023
He Li, Wenhao Yu, Tingnan Zhang, Patrick M. Wensing

Figure 1 for A Unified Perspective on Multiple Shooting In Differential Dynamic Programming
Figure 2 for A Unified Perspective on Multiple Shooting In Differential Dynamic Programming
Figure 3 for A Unified Perspective on Multiple Shooting In Differential Dynamic Programming
Figure 4 for A Unified Perspective on Multiple Shooting In Differential Dynamic Programming

Differential Dynamic Programming (DDP) is an efficient computational tool for solving nonlinear optimal control problems. It was originally designed as a single shooting method and thus is sensitive to the initial guess supplied. This work considers the extension of DDP to multiple shooting (MS), improving its robustness to initial guesses. A novel derivation is proposed that accounts for the defect between shooting segments during the DDP backward pass, while still maintaining quadratic convergence locally. The derivation enables unifying multiple previous MS algorithms, and opens the door to many smaller algorithmic improvements. A penalty method is introduced to strategically control the step size, further improving the convergence performance. An adaptive merit function and a more reliable acceptance condition are employed for globalization. The effects of these improvements are benchmarked for trajectory optimization with a quadrotor, an acrobot, and a manipulator. MS-DDP is also demonstrated for use in Model Predictive Control (MPC) for dynamic jumping with a quadruped robot, showing its benefits over a single shooting approach.

Viaarxiv icon

Hybrid Volitional Control of a Robotic Transtibial Prosthesis using a Phase Variable Impedance Controller

Sep 27, 2023
Ryan R. Posh, Jonathan A. Tittle, David J. Kelly, James P. Schmiedeler, Patrick M. Wensing

For robotic transtibial prosthesis control, the global kinematics of the tibia can be used to monitor the progression of the gait cycle and command smooth and continuous actuation. In this work, these global tibia kinematics are used to define a phase variable impedance controller (PVIC), which is then implemented as the nonvolitional base controller within a hybrid volitional control framework (PVI-HVC). The gait progression estimation and biomechanic performance of one able-bodied individual walking on a robotic ankle prosthesis via a bypass adapter are compared for three control schemes: a passive benchmark controller, PVIC, and PVI-HVC. The different actuation of each controller had a direct effect on the global tibia kinematics, but the average deviation between the estimated and ground truth gait percentage were 1.6%, 1.8%, and 2.1%, respectively, for each controller. Both PVIC and PVI-HVC produced good agreement with able-bodied kinematic and kinetic references. As designed, PVI-HVC results were similar to those of PVIC when the user used low volitional intent, but yielded higher peak plantarflexion, peak torque, and peak power when the user commanded high volitional input in late stance. This additional torque and power also allowed the user to volitionally and continuously achieve activities beyond level walking, such as ascending ramps, avoiding obstacles, standing on tip-toes, and tapping the foot. In this way, PVI-HVC offers the kinetic and kinematic performance of the PVIC during level ground walking, along with the freedom to volitionally pursue alternative activities.

* 7 pages, 7 figures, submitted to ICRA 2024 
Viaarxiv icon

Multi-Shooting Differential Dynamic Programming for Hybrid Systems using Analytical Derivatives

Jul 24, 2023
Shubham Singh, Ryan P. Russell, Patrick M. Wensing

Figure 1 for Multi-Shooting Differential Dynamic Programming for Hybrid Systems using Analytical Derivatives
Figure 2 for Multi-Shooting Differential Dynamic Programming for Hybrid Systems using Analytical Derivatives
Figure 3 for Multi-Shooting Differential Dynamic Programming for Hybrid Systems using Analytical Derivatives
Figure 4 for Multi-Shooting Differential Dynamic Programming for Hybrid Systems using Analytical Derivatives

Differential Dynamic Programming (DDP) is a popular technique used to generate motion for dynamic-legged robots in the recent past. However, in most cases, only the first-order partial derivatives of the underlying dynamics are used, resulting in the iLQR approach. Neglecting the second-order terms often slows down the convergence rate compared to full DDP. Multi-Shooting is another popular technique to improve robustness, especially if the dynamics are highly non-linear. In this work, we consider Multi-Shooting DDP for trajectory optimization of a bounding gait for a simplified quadruped model. As the main contribution, we develop Second-Order analytical partial derivatives of the rigid-body contact dynamics, extending our previous results for fixed/floating base models with multi-DoF joints. Finally, we show the benefits of a novel Quasi-Newton method for approximating second-order derivatives of the dynamics, leading to order-of-magnitude speedups in the convergence compared to the full DDP method.

* https://www.youtube.com/watch?v=C0h6mEpcnAE 
Viaarxiv icon

On Second-Order Derivatives of Rigid-Body Dynamics: Theory & Implementation

Feb 12, 2023
Shubham Singh, Ryan P. Russell, Patrick M. Wensing

Figure 1 for On Second-Order Derivatives of Rigid-Body Dynamics: Theory & Implementation
Figure 2 for On Second-Order Derivatives of Rigid-Body Dynamics: Theory & Implementation
Figure 3 for On Second-Order Derivatives of Rigid-Body Dynamics: Theory & Implementation
Figure 4 for On Second-Order Derivatives of Rigid-Body Dynamics: Theory & Implementation

Model-based control for robots has increasingly been dependent on optimization-based methods like Differential Dynamic Programming and iterative LQR (iLQR). These methods can form the basis of Model-Predictive Control (MPC), which is commonly used for controlling legged robots. Computing the partial derivatives of the dynamics is often the most expensive part of these algorithms, regardless of whether analytical methods, Finite Difference, Automatic Differentiation (AD), or Chain-Rule accumulation is used. Since the second-order derivatives of dynamics result in tensor computations, they are often ignored, leading to the use of iLQR, instead of the full second-order DDP method. In this paper, we present analytical methods to compute the second-order derivatives of inverse and forward dynamics for open-chain rigid-body systems with multi-DoF joints and fixed/floating bases. An extensive comparison of accuracy and run-time performance with AD and other methods is provided, including the consideration of code-generation techniques in C/C++ to speed up the computations. For the 36 DoF ATLAS humanoid, the second-order Inverse, and the Forward dynamics derivatives take approx 200 mu s, and approx 2.1 ms respectively, resulting in a 3x speedup over the AD approach.

* Evolved work from https://ieeexplore.ieee.org/document/9981356. arXiv admin note: text overlap with arXiv:2203.01497 
Viaarxiv icon

Optimization-Based Control for Dynamic Legged Robots

Nov 21, 2022
Patrick M. Wensing, Michael Posa, Yue Hu, Adrien Escande, Nicolas Mansard, Andrea Del Prete

Figure 1 for Optimization-Based Control for Dynamic Legged Robots
Figure 2 for Optimization-Based Control for Dynamic Legged Robots
Figure 3 for Optimization-Based Control for Dynamic Legged Robots
Figure 4 for Optimization-Based Control for Dynamic Legged Robots

In a world designed for legs, quadrupeds, bipeds, and humanoids have the opportunity to impact emerging robotics applications from logistics, to agriculture, to home assistance. The goal of this survey is to cover the recent progress toward these applications that has been driven by model-based optimization for the real-time generation and control of movement. The majority of the research community has converged on the idea of generating locomotion control laws by solving an optimal control problem (OCP) in either a model-based or data-driven manner. However, solving the most general of these problems online remains intractable due to complexities from intermittent unidirectional contacts with the environment, and from the many degrees of freedom of legged robots. This survey covers methods that have been pursued to make these OCPs computationally tractable, with specific focus on how environmental contacts are treated, how the model can be simplified, and how these choices affect the numerical solution methods employed. The survey focuses on model-based optimization, covering its recent use in a stand alone fashion, and suggesting avenues for combination with learning-based formulations to further accelerate progress in this growing field.

* submitted for initial review; comments welcome 
Viaarxiv icon

CACTO: Continuous Actor-Critic with Trajectory Optimization -- Towards global optimality

Nov 12, 2022
Gianluigi Grandesso, Gastone P. Rosati Papini, Patrick M. Wensing, Andrea Del Prete

Figure 1 for CACTO: Continuous Actor-Critic with Trajectory Optimization -- Towards global optimality
Figure 2 for CACTO: Continuous Actor-Critic with Trajectory Optimization -- Towards global optimality
Figure 3 for CACTO: Continuous Actor-Critic with Trajectory Optimization -- Towards global optimality
Figure 4 for CACTO: Continuous Actor-Critic with Trajectory Optimization -- Towards global optimality

This paper presents a novel algorithm for the continuous control of dynamical systems that combines Trajectory Optimization (TO) and Reinforcement Learning (RL) in a single framework. The motivations behind this algorithm are the two main limitations of TO and RL when applied to continuous nonlinear systems to minimize a non-convex cost function. Specifically, TO can get stuck in poor local minima when the search is not initialized close to a ``good'' minimum. On the other hand, when dealing with continuous state and control spaces, the RL training process may be excessively long and strongly dependent on the exploration strategy. Thus, our algorithm learns a ``good'' control policy via TO-guided RL policy search that, when used as initial guess provider for TO, makes the trajectory optimization process less prone to converge to poor local optima. Our method is validated on several reaching problems featuring non-convex obstacle avoidance with different dynamical systems, including a car model with 6d state, and a 3-joint planar manipulator. Our results show the great capabilities of CACTO in escaping local minima, while being more computationally efficient than the DDPG RL algorithm.

* 8 pages, 8 figures. Submitted to IEEE RA-L 
Viaarxiv icon

Versatile Real-Time Motion Synthesis via Kino-Dynamic MPC with Hybrid-Systems DDP

Sep 28, 2022
He Li, Tingnan Zhang, Wenhao Yu, Patrick M. Wensing

Figure 1 for Versatile Real-Time Motion Synthesis via Kino-Dynamic MPC with Hybrid-Systems DDP
Figure 2 for Versatile Real-Time Motion Synthesis via Kino-Dynamic MPC with Hybrid-Systems DDP
Figure 3 for Versatile Real-Time Motion Synthesis via Kino-Dynamic MPC with Hybrid-Systems DDP
Figure 4 for Versatile Real-Time Motion Synthesis via Kino-Dynamic MPC with Hybrid-Systems DDP

Specialized motions such as jumping are often achieved on quadruped robots by solving a trajectory optimization problem once and executing the trajectory using a tracking controller. This approach is in parallel with Model Predictive Control (MPC) strategies that commonly control regular gaits via online re-planning. In this work, we present a nonlinear MPC (NMPC) technique that unlocks on-the-fly re-planning of specialized motion skills and regular locomotion within a unified framework. The NMPC reasons about a hybrid kinodynamic model, and is solved using a variant of a constrained Differential Dynamic Programming (DDP) solver. The proposed NMPC enables the robot to perform a variety of agile skills like jumping, bounding, and trotting, and the rapid transition between these skills. We evaluated the proposed algorithm with three challenging motion sequences that combine multiple agile skills, on two quadruped platforms, Unitree A1, and MIT Mini Cheetah, showing its effectiveness and generality.

* 7 pages, 7 figures, submitted to 2023 IEEE International Conference on Robotics and Automation (ICRA) 
Viaarxiv icon

Zero-Shot Retargeting of Learned Quadruped Locomotion Policies Using Hybrid Kinodynamic Model Predictive Control

Sep 28, 2022
He Li, Tingnan Zhang, Wenhao Yu, Patrick M. Wensing

Figure 1 for Zero-Shot Retargeting of Learned Quadruped Locomotion Policies Using Hybrid Kinodynamic Model Predictive Control
Figure 2 for Zero-Shot Retargeting of Learned Quadruped Locomotion Policies Using Hybrid Kinodynamic Model Predictive Control
Figure 3 for Zero-Shot Retargeting of Learned Quadruped Locomotion Policies Using Hybrid Kinodynamic Model Predictive Control
Figure 4 for Zero-Shot Retargeting of Learned Quadruped Locomotion Policies Using Hybrid Kinodynamic Model Predictive Control

Reinforcement Learning (RL) has witnessed great strides for quadruped locomotion, with continued progress in the reliable sim-to-real transfer of policies. However, it remains a challenge to reuse a policy on another robot, which could save time for retraining. In this work, we present a framework for zero-shot policy retargeting wherein diverse motor skills can be transferred between robots of different shapes and sizes. The new framework centers on a planning-and-control pipeline that systematically integrates RL and Model Predictive Control (MPC). The planning stage employs RL to generate a dynamically plausible trajectory as well as the contact schedule, avoiding the combinatorial complexity of contact sequence optimization. This information is then used to seed the MPC to stabilize and robustify the policy roll-out via a new Hybrid Kinodynamic (HKD) model that implicitly optimizes the foothold locations. Hardware results show an ability to transfer policies from both the A1 and Laikago robots to the MIT Mini Cheetah robot without requiring any policy re-tuning.

* This paper is accepted by IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS) 2022. We would like to make this paper visible on arxiv to the general public in case some research groups are interested 
Viaarxiv icon