MuJoCo 學習筆記:簡介 Overview

wghou09發表於2024-08-30

MuJoCo 官方文件給出了詳細介紹 MuJoCo Overview 。下面擷取部分相對重要的內容翻譯記錄。

參考:Mujoco官方文件中文翻譯1-概述


1. Key Feature

廣義座標 + 現代接觸動力學 Generalized coordinates combined with modern contact dynamics

物理引擎傳統上分為兩類。1. 機器人學和生物力學引擎在廣義座標關節座標中使用高效準確的遞迴演算法。然而,它們要麼省略了接觸動力學,要麼依賴於早期的彈簧-阻尼器方法(這在模擬中需要非常小的時間步長)。2. 遊戲引擎則使用一種更現代的方法,透過解決最佳化問題來模擬接觸力。然而,它們通常採用笛卡爾座標(注:over-specified Cartesian represenation,大概是說,模擬場景中物體的自由度大於真實世界中的自由度,再透過約束來限定關節/減小自由度),其中關節約束是數值施加的,當涉及複雜的運動學結構時,會導致模擬結果不準確、不穩定。MuJoCo 是結合了上述兩類中各自優點的通用引擎:廣義座標中的模擬基於最佳化的接觸動力學。最近幾年,其他引擎也加入了類似MuJoCo的方法(可能就是在點名PhysX),但也不太容易與它們原有的功能很好的相容,因為這與他們最初的設計不一致(注:大概是說,其他引擎最開始是採用笛卡爾座標的,雖然最近也支援了廣義座標下的模擬,但很難與原有的功能很好的相容)。習慣了遊戲引擎的使用者,最初可能會覺得廣義座標不符合直覺(我也是這樣的>_<)。

Physics engines have traditionally separated in two categories. Robotics and biomechanics engines use efficient and accurate recursive algorithms in generalized or joint coordinates. However they either leave out contact dynamics, or rely on the earlier spring-damper approach which requires very small time-steps. Gaming engines use a more modern approach where contact forces are found by solving an optimization problem. However, they often resort to the over-specified Cartesian representation where joint constraints are imposed numerically, causing inaccuracies and instabilities when elaborate kinematic structures are involved. MuJoCo was the first general-purpose engine to combine the best of both worlds: simulation in generalized coordinates and optimization-based contact dynamics. Other simulators have more recently been adapted to use MuJoCo’s approach, but that is not usually compatible with all of their functionality because they were not designed to do this from the start. Users accustomed to gaming engines may find the generalized coordinates counterintuitive at first; see Clarifications section below.

相關文章