Literature
Display
← All papers

RMP²: A Structured Composable Policy Class for Robot Learning

Li, Anqi · Cheng, Ching-An · Rana, M. Asif · Xie, Man · Van Wyk, Karl · Ratliff, Nathan · Boots, Byron

· Robotics: Science and Systems 2021 ↗

Robotics6 min text · CondensedOriginal paper ↗
Contents

At a glance

RMP² evaluates the same structured motion policies as RMPflow through automatic differentiation instead of a separately implemented message-passing tree. It supports general acyclic task graphs, differentiable policy learning, and lower memory use under the stated complexity assumptions. Simulated reaching experiments show how learned residual task policies can improve performance while retaining useful collision-avoidance structure. The contribution is an implementation and learning interface, not a new policy class or unconditional safety guarantee.

I Introduction

Analytic controllers provide structure and conditional guarantees but can be difficult to tune; unrestricted learned policies can require extensive interaction and fail outside their training conditions. RMPflow combines task-specific acceleration policies through geometric maps and state-dependent importance matrices. RMP² makes this composition easier to differentiate and optimize, allowing hand-designed collision avoidance or joint-limit policies to coexist with learned components. The resulting policy is mathematically the same as the corresponding RMPflow policy. [6] [30]

Algorithm Time Space Req. Tree Req. Auto.Diff.
RMP2 (Algorithm 3) O⁡(N​b​d3)O(Nbd^{3}) O⁡(L​d2+N​d)O(Ld^{2}+Nd) ✗ ✓
Naïve Implementation (Algorithm 4) O⁡(N​b​d3​L)O(Nbd^{3}L) O⁡(N​L​d2)O(NLd^{2}) ✗ ✓
RMPflow (Algorithm 1) [6] O⁡(N​b​d3)O(Nbd^{3}) O⁡(L​d2+N​d2)O(Ld^{2}+Nd^{2}) ✓ ✗aafootnotemark: a
TABLE I: Comparison between different implementations of the RMPflow policy for a graph/tree with NN nodes of dimension in O⁡(d)O(d), where L≤NL\leq N nodes are leaf nodes and the branching factor is in O⁡(b)O(b). Computing the task map is assumed to have time complexity of O⁡(N​b​d2)O(Nbd^{2}) and memory complexity of O⁡(1)O(1). We assume the automatic differentiation library is based on reverse-mode automatic differentiation, for which calling the Gradient Oracle to compute the derivative of a scalar function with respect to a variable in O⁡(d)O(d) requires time complexity in O⁡(N​b​d2)O(Nbd^{2}) and space complexity O⁡(N​d)O(Nd). See Section III for details.

II Background

II-A Acceleration-based Motion Control

The robot’s state consists of configuration and velocity; its policy outputs acceleration, which a low-level controller tracks. Different objectives are naturally expressed in different coordinates, such as end-effector position or distance to an obstacle. Because these coordinates share the same robot configuration, independently designed task policies cannot generally be combined by simply averaging their actions.

II-B RMPflow: A Framework for Multi-Task Problems

Each Riemannian motion policy specifies a desired task acceleration and a positive-semidefinite importance matrix. RMPflow propagates states down a task tree, then combines forces and metrics back toward the configuration space. Its result solves a weighted least-squares problem subject to kinematic consistency. Stability follows only when the task policies and metrics satisfy the framework’s required conditions; arbitrary learned components do not inherit it automatically.

1:  Input: root state (𝐪,𝐪˙)(\mathbf{q},{\dot{\mathbf{q}}}), RMP-tree T, RMPs rmp_eval
2:  Return: motion policy π⁡(𝐪,𝐪˙)\pi(\mathbf{q},{\dot{\mathbf{q}}})
3:  nodes←\texttt{nodes}\leftarrow T.topologically_sorted_nodes()// forward pass
4:  For node in nodes: // from root to leaves
5:    For child in node.children\texttt{node}.\texttt{children}:
6:      child.state←pushforward(node.state)\texttt{child}.\texttt{state}\leftarrow\texttt{pushforward}(\texttt{node}.\texttt{state})// evaluate leaf RMPs
7:  For node in T.leaves:
8:    node.rmp←rmp_eval(node.state)\texttt{node}.\texttt{rmp}\leftarrow\texttt{rmp\_eval(}\texttt{node}.\texttt{state}\texttt{)} // backward pass
9:  For node in reversed(nodes): // from leaves to root
10:    node.rmp ←\leftarrow pullback (node.child.rmps)// resolve for the motion policy
11:  π⁡(𝐪,𝐪˙)←\pi(\mathbf{q},{\dot{\mathbf{q}}})\leftarrow resolve (T.root.rmp)
Algorithm 1 The RMPflow Algorithm (Message Passing) [6]
Equations 1–2
min{𝐚𝚟:𝚟∈𝒱}\displaystyle\min_{\{\mathbf{a}_{\mathtt{v}}:\mathtt{v}\in\mathcal{V}\}} ∑k=1K12​‖𝐚𝚕k−𝐚kd‖𝐌k2,\displaystyle\quad\sum_{k=1}^{K}\,\frac{1}{2}\,\|\mathbf{a}_{\mathtt{l}_{k}}-\mathbf{a}_{k}^{d}\|_{\mathbf{M}_{k}}^{2}, (1)
s.t. 𝐚𝚟=𝐉𝚟;𝚞​𝐚𝚞+𝐉˙𝚟;𝚞​𝐱˙𝚞,\displaystyle\quad\hskip 2.84526pt\mathbf{a}_{\mathtt{v}}=\mathbf{J}_{\mathtt{v};\mathtt{u}}\mathbf{a}_{\mathtt{u}}+{\dot{\mathbf{J}}}_{\mathtt{v};\mathtt{u}}\,{\dot{\mathbf{x}}}_{\mathtt{u}}, (2)
∀𝚟∈𝒱∖𝚛,𝚞=parent​(𝚟)\displaystyle\qquad\forall\,\mathtt{v}\in\mathcal{V}\setminus\mathtt{r},\quad\mathtt{u}=\texttt{parent}(\mathtt{v})

III RMP 2 based on Automatic Differentiation

RMP² computes the configuration-space solution using standard differentiation operators on the task-map computation graph. The retained pseudocode gives both the original message-passing method and its automatic-differentiation replacement.

III-A Key Idea

Eliminating intermediate kinematic constraints converts the tree problem into an unconstrained weighted least-squares problem in root acceleration. Its closed-form solution aggregates leaf Jacobians, metrics, desired accelerations, and curvature corrections. Efficiently evaluating this expression is the central computational challenge.

Equations 3–4
min𝐚𝚛′∈ℝd∑k=1K12​‖𝐉𝚕k;𝚛​𝐚𝚛′+𝐉˙𝚕k;𝚛​𝐪˙−𝐚kd‖𝐌k2,\min_{\mathbf{a}_{\mathtt{r}}^{\prime}\in\mathbb{R}^{d}}\quad\sum_{k=1}^{K}\,\frac{1}{2}\,\|\mathbf{J}_{\mathtt{l}_{k};\mathtt{r}}\mathbf{a}_{\mathtt{r}}^{\prime}+{\dot{\mathbf{J}}}_{\mathtt{l}_{k};\mathtt{r}}{\dot{\mathbf{q}}}-\mathbf{a}_{k}^{d}\|_{\mathbf{M}_{k}}^{2}, (3)
𝐚𝚛=(∑k=1K𝐉𝚕k;𝚛⊤​𝐌k​𝐉𝚕k;𝚛)†⏟𝐌𝚛†​(∑k=1K𝐉𝚕k;𝚛⊤​𝐌k​(𝐚kd−𝐉˙𝚕k;𝚛​𝐪˙))⏟𝐟𝚛.\displaystyle\mathbf{a}_{\mathtt{r}}=\underbrace{\left(\sum_{k=1}^{K}\mathbf{J}_{\mathtt{l}_{k};\mathtt{r}}^{\top}\mathbf{M}_{k}\mathbf{J}_{\mathtt{l}_{k};\mathtt{r}}\right)^{\dagger}}_{\mathbf{M}_{\mathtt{r}}^{\dagger}}\underbrace{\left(\sum_{k=1}^{K}\mathbf{J}_{\mathtt{l}_{k};\mathtt{r}}^{\top}\mathbf{M}_{k}(\mathbf{a}_{k}^{d}-\dot{\mathbf{J}}_{\mathtt{l}_{k};\mathtt{r}}{\dot{\mathbf{q}}})\right)}_{\mathbf{f}_{\mathtt{r}}}. (4)

III-B RMP 2 based on Reverse Accumulation

Reverse accumulation computes Jacobian–vector products without explicitly storing every full Jacobian. Forward evaluation supplies task positions, velocities, and curvature terms; leaf policies supply local forces and metrics. Auxiliary copies of the root coordinates then let gradient and Jacobian operations recover the combined root metric and force. A pseudoinverse resolves the final acceleration. Algorithms 2 and 3 preserve the precise differentiation construction.

1:  Input: 𝐮\mathbf{u}, 𝐯\mathbf{v}, 𝐰\mathbf{w}
2:  Return: (∂𝐮𝐯)​𝐰\left(\partial_{\mathbf{u}}\mathbf{v}\right)\mathbf{w}
3:  𝝀←𝟏\bm{\lambda}\leftarrow\mathbf{1} // dummy variable for reverse accumulation
4:  𝐠←gradient(​𝝀⊤​𝐯​,​𝐮​)\mathbf{g}\leftarrow\texttt{gradient(}\bm{\lambda}^{\top}\mathbf{v}\texttt{,}\mathbf{u}\texttt{)} // sum of partial derivatives
5:  compute Jacobian-vector product
Equation
(∂𝐮𝐯)​𝐰←gradient(​𝐠⊤​𝐯​,​𝝀​)\left(\partial_{\mathbf{u}}\mathbf{v}\right)\mathbf{w}\leftarrow\texttt{gradient(}\mathbf{g}^{\top}\mathbf{v}\texttt{,}\bm{\lambda}\texttt{)}
Algorithm 2 Jacobian-vector product [10] jvp(​𝐯​,​𝐮​,​𝐰​)\texttt{jvp(}\mathbf{v}\texttt{,}\mathbf{u}\texttt{,}\mathbf{w}\texttt{)}
1:  Input: root state (𝐪,𝐪˙)(\mathbf{q},{\dot{\mathbf{q}}}), task_map, rmp_eval
2:  Return: motion policy π⁡(𝐪,𝐪˙)\pi(\mathbf{q},{\dot{\mathbf{q}}}) // forward pass
3:  {𝐱k}k=1K←task_map(​𝐪​)\{\mathbf{x}_{k}\}_{k=1}^{K}\leftarrow\texttt{task\_map(}\mathbf{q}\texttt{)}
4:  {𝐱˙k}k=1K←jvp(​{𝐱k}k=1K​,​𝐪​,​𝐪˙​)\{{\dot{\mathbf{x}}}_{k}\}_{k=1}^{K}\leftarrow\texttt{jvp(}\{\mathbf{x}_{k}\}_{k=1}^{K}\texttt{,}\mathbf{q}\texttt{,}{\dot{\mathbf{q}}}\texttt{)} // leaf node velocity
5:  {𝐜k}k=1K←jvp(​{𝐱˙k}k=1K​,​𝐪​,​𝐪˙​)\{\mathbf{c}_{k}\}_{k=1}^{K}\leftarrow\texttt{jvp(}\{{\dot{\mathbf{x}}}_{k}\}_{k=1}^{K}\texttt{,}\mathbf{q}\texttt{,}{\dot{\mathbf{q}}}\texttt{)} // curvature terms // evaluate leaf RMPs
6:  {(𝐌k,𝐚kd)}k=1K←rmp_eval(​{(𝐱k,𝐱˙k)}k=1K​)\{(\mathbf{M}_{k},\mathbf{a}_{k}^{d})\}_{k=1}^{K}\leftarrow\texttt{rmp\_eval(}\{(\mathbf{x}_{k},{\dot{\mathbf{x}}}_{k})\}_{k=1}^{K}\texttt{)}// backward pass
7:  𝐪′=copy(​𝐪​)\mathbf{q}^{\prime}=\texttt{copy(}\mathbf{q}\texttt{)}, 𝐪′′=copy(​𝐪​)\mathbf{q}^{\prime\prime}=\texttt{copy(}\mathbf{q}\texttt{)} // copies without gradient
8:  {𝐱k′}k=1K←task_map(​𝐪′​)\{\mathbf{x}^{\prime}_{k}\}_{k=1}^{K}\leftarrow\texttt{task\_map(}\mathbf{q}^{\prime}\texttt{)}, {𝐱k′′}k=1K←task_map(​𝐪′′​)\{\mathbf{x}^{\prime\prime}_{k}\}_{k=1}^{K}\leftarrow\texttt{task\_map(}\mathbf{q}^{\prime\prime}\texttt{)} // mirrored images
9:  r←∑k=1K(𝐱k′)⊤​𝐌k​𝐱k′′r\leftarrow\sum_{k=1}^{K}(\mathbf{x}_{k}^{\prime})^{\top}\mathbf{M}_{k}\mathbf{x}^{\prime\prime}_{k}, s←∑k=1K(𝐱k′)⊤​𝐌k​(𝐚kd−𝐜k)s\leftarrow\sum_{k=1}^{K}(\mathbf{x}^{\prime}_{k})^{\top}\mathbf{M}_{k}(\mathbf{a}_{k}^{d}-\mathbf{c}_{k}) // auxiliary variables
10:  𝐌𝚛←jacobian(gradient(​r​,​𝐪​),​𝐪′​)\mathbf{M}_{\mathtt{r}}\leftarrow\texttt{jacobian(}\texttt{gradient(}r\texttt{,}\mathbf{q}\texttt{)}\texttt{,}\mathbf{q}^{\prime}\texttt{)}, // root matrix
11:  𝐟𝚛←gradient(​s​,​𝐪​)\mathbf{f}_{\mathtt{r}}\leftarrow\texttt{gradient(}s\texttt{,}\mathbf{q}\texttt{)} // root force// resolve for the motion policy
12:  π⁡(𝐪,𝐪˙)←𝐌𝚛†​𝐟𝚛\pi(\mathbf{q},{\dot{\mathbf{q}}})\leftarrow\mathbf{M}_{\mathtt{r}}^{\dagger}\,\mathbf{f}_{\mathtt{r}}
Algorithm 3 RMP2
Equations 5–6
𝐱˙k=jvp(​𝐱k​,​𝐪​,​𝐪˙​),and𝐜k=jvp(​𝐱˙k​,​𝐪​,​𝐪˙​).{\dot{\mathbf{x}}}_{k}=\texttt{jvp(}\mathbf{x}_{k}\texttt{,}\mathbf{q}\texttt{,}{\dot{\mathbf{q}}}\texttt{)},\quad\text{and}\quad\mathbf{c}_{k}=\texttt{jvp(}{\dot{\mathbf{x}}}_{k}\texttt{,}\mathbf{q}\texttt{,}{\dot{\mathbf{q}}}\texttt{)}. (5)
𝐟𝚛=gradient​(∑k=1K(𝐱k′)⊤​𝐌k​(𝐚kd−𝐜k)​,​𝐪′),𝐌𝚛=jacobian​(gradient​(∑k=1K(𝐱k′)⊤​𝐌k​𝐱k′′​,​𝐪′)​,​𝐪′′),\small\begin{split}\mathbf{f}_{\mathtt{r}}&=\texttt{gradient}\Big(\sum_{k=1}^{K}(\mathbf{x}^{\prime}_{k})^{\top}\mathbf{M}_{k}(\mathbf{a}_{k}^{d}-\mathbf{c}_{k})\texttt{,}\mathbf{q}^{\prime}\Big),\\ \mathbf{M}_{\mathtt{r}}&=\texttt{jacobian}\Big(\texttt{gradient}\big(\sum_{k=1}^{K}(\mathbf{x}_{k}^{\prime})^{\top}\mathbf{M}_{k}\mathbf{x}_{k}^{\prime\prime}\texttt{,}\mathbf{q}^{\prime}\big)\texttt{,}\mathbf{q}^{\prime\prime}\Big),\\ \end{split} (6)

III-C Complexity of RMP 2

With N graph nodes, L leaves, maximum branching factor b, and node dimension bounded by d, the analysis gives time O(Nbd³) and memory O(Nd + Ld²). The original RMPflow implementation has the same asymptotic time but O(Nd² + Ld²) memory under the paper’s assumptions. These bounds depend on the costs assumed for maps, leaf policies, and differentiation.

III-D Discussion: A Naïve Alternative Algorithm

The direct alternative explicitly constructs each root-to-leaf Jacobian, introducing an additional factor of L in time and large intermediate differentiation graphs. Replacing its curvature computation with Jacobian–vector products reduces memory to the RMP² bound but leaves the extra time factor. Algorithm 4 retains this comparison implementation.

1:  Input: root state (𝐪,𝐪˙)(\mathbf{q},{\dot{\mathbf{q}}}), task_map, rmp_eval
2:  Return: motion policy π⁡(𝐪,𝐪˙)\pi(\mathbf{q},{\dot{\mathbf{q}}}) // forward pass
3:  {𝐱k}k=1K←task_map(​𝐪​)\{\mathbf{x}_{k}\}_{k=1}^{K}\leftarrow\texttt{task\_map(}\mathbf{q}\texttt{)}
4:  {𝐉k}k=1K←jacobian(​{𝐱k}k=1K​,​𝐪​)\{\mathbf{J}_{k}\}_{k=1}^{K}\leftarrow\texttt{jacobian(}\{\mathbf{x}_{k}\}_{k=1}^{K}\texttt{,}\mathbf{q}\texttt{)}
5:  {𝐱˙k}k=1K←{𝐉k​𝐪˙k}k=1K\{{\dot{\mathbf{x}}}_{k}\}_{k=1}^{K}\leftarrow\{\mathbf{J}_{k}{\dot{\mathbf{q}}}_{k}\}_{k=1}^{K} // leaf space velocity
6:  {𝐜k}k=1K←jvp(​{𝐱˙k}k=1K​,​𝐪​,​𝐪˙​)\{\mathbf{c}_{k}\}_{k=1}^{K}\leftarrow\texttt{jvp(}\{{\dot{\mathbf{x}}}_{k}\}_{k=1}^{K}\texttt{,}\mathbf{q}\texttt{,}{\dot{\mathbf{q}}}\texttt{)}// curvature terms // evaluate leaf RMPs
7:  compute leaf RMPs
Equation
{(𝐌k,𝐚kd)}k=1K←rmp_eval(​{(𝐱k,𝐱˙k)}k=1K​)\{(\mathbf{M}_{k},\mathbf{a}_{k}^{d})\}_{k=1}^{K}\leftarrow\texttt{rmp\_eval(}\{(\mathbf{x}_{k},{\dot{\mathbf{x}}}_{k})\}_{k=1}^{K}\texttt{)}
// backward pass
8:  compute root RMP
Equation
𝐌𝚛←∑k=1K𝐉k⊤​𝐌k​𝐉k,𝐟𝚛←∑k=1K𝐉k⊤​𝐌k​(𝐚kd−𝐜k)\textstyle\mathbf{M}_{\mathtt{r}}\leftarrow\sum_{k=1}^{K}\mathbf{J}_{k}^{\top}\mathbf{M}_{k}\mathbf{J}_{k},\hskip 9.24994pt\mathbf{f}_{\mathtt{r}}\leftarrow\sum_{k=1}^{K}\mathbf{J}_{k}^{\top}\mathbf{M}_{k}(\mathbf{a}_{k}^{d}-\mathbf{c}_{k})
// resolve for the motion policy
9:  π⁡(𝐪,𝐪˙)←𝐌𝚛†​𝐟𝚛\pi(\mathbf{q},{\dot{\mathbf{q}}})\leftarrow\mathbf{M}_{\mathtt{r}}^{\dagger}\,\mathbf{f}_{\mathtt{r}}
Algorithm 4 A Naïve Implementation

III-E Key Benefits of RMP 2

The practical gains are a simpler task-map interface, support for directed acyclic graphs, ordinary differentiation through learnable maps and policies, and reduced memory use. A tree can represent the same relationships, but constructing it may introduce larger intermediate states or repeated calculations.

IV RMP 2 for Learning

Structured learning can optimize either individual task policies or their coordinate maps. The framework also permits fixed controllers to supply prior behavior while learned residuals improve a selected objective.

IV-A Parameterizing RMP 2 Policies

Leaf accelerations and importance matrices can be parameterized by neural networks; suitable parameterizations preserve properties such as positive semidefiniteness. Task maps can also be learned so that control becomes simpler in a latent space. The choices determine which theoretical properties remain available.

IV-B Learning Setups

Behavior cloning differentiates the complete policy to match expert actions. In reinforcement learning, RMP² can be part of the differentiable policy or treated as an environment-side transformation of a learned leaf action. The latter avoids differentiating the composition and is convenient for a small learned task space; learning many leaves may favor the former.

IV-C Learning with Residuals

An unrestricted residual can be added directly to the final robot acceleration, or a residual task policy can be inserted before composition. The second choice preserves the controller’s task structure and allows fixed obstacle-avoidance policies to mediate the learned change. Initialization near a useful hand-designed policy improves early behavior in the reported experiments.

V Experiments

Original figure
Original figure
Original figure
Fig. 1: Mean episode reward over training iterations for the three-link robot reaching task. See text for details.
Original figure
Original figure
Original figure
Fig. 2: Percentage of safe episodes over training iterations for the Franka robot reaching task. See text for details.
Refer to caption
Refer to caption
Original figure
Original figure
Fig. 3: (Left) PyBullet simulation for the three-link robot reaching task and the Franka robot reachng task. (Right) Mean episode reward and safe episode percentage over training iterations for the Franka reaching task.

V-A Three-Link Robot Reaching

A planar three-link arm reaches random goals while avoiding one or three cylindrical obstacles. Three progressively harder settings compare a neural policy from scratch, a residual on the final acceleration, and a residual end-effector RMP. All use PPO; the plots summarize four random seeds over 500 training iterations. The RMP residual parameterizes its metric through a matrix factor so it remains positive-semidefinite. [34]

All methods learn the easiest task, but the unrestricted neural policy collides frequently during training. With more obstacles, high reward can coexist with unsafe behavior. In the hardest goal distribution, the structured residual learns more effectively than either neural alternative. These results demonstrate an empirical benefit from the retained controller structure, rather than proving collision freedom for arbitrary tasks, dynamics, or learned policies.

V-B Franka Robot Reaching

The second experiment uses a simulated seven-degree-of-freedom Franka arm, three spherical obstacles, and goals at least 0.5 m from the initial end effector. Both residual methods outperform learning from scratch. The unrestricted residual obtains slightly higher reward, while the RMP residual records no collisions during these training runs. The evaluation is simulation-only, and zero observed collisions is not a universal safety certificate.

Appendix A The RMPflow Algorithm

RMPflow stores state and a force–metric pair at each tree node. Pushforward applies task maps and Jacobians to positions and velocities; pullback combines child metrics and curvature-corrected forces; resolve applies the metric pseudoinverse at the root. The retained equations give the exact transformations used by Algorithm 1.

Equation 7
𝐟𝚞=∑m=1M𝐉𝚟m;𝚞⊤​(𝐟𝚟m−𝐌𝚟m​𝐉˙𝚟m;𝚞​𝐱˙),𝐌𝚞=∑m=1M𝐉𝚟m;𝚞⊤​𝐌𝚟m​𝐉𝚟m;𝚞.\begin{split}\mathbf{f}_{\mathtt{u}}&=\sum_{m=1}^{M}\mathbf{J}_{\mathtt{v}_{m};\mathtt{u}}^{\top}(\mathbf{f}_{\mathtt{v}_{m}}-\mathbf{M}_{\mathtt{v}_{m}}{\dot{\mathbf{J}}}_{\mathtt{v}_{m};\mathtt{u}}{\dot{\mathbf{x}}}),\\ \mathbf{M}_{\mathtt{u}}&=\sum_{m=1}^{M}\mathbf{J}_{\mathtt{v}_{m};\mathtt{u}}^{\top}\mathbf{M}_{\mathtt{v}_{m}}\mathbf{J}_{\mathtt{v}_{m};\mathtt{u}}.\end{split} (7)
Original figure
(a) task map structure
Original figure
(b) Policy structure
Refer to caption
(c) Computation time
Fig. 4: (a) task map and (b) policy structure for benchmarking the complexity of the algorithms. (c) The computation time of RMP2 and the naïve implementation (direct) on chain-structured graphs with varying lengths. The results show that RMP2 has a linear time complexity whereas the naïve implementation (direct) has a super-linearly time complexity.

Appendix B Complexity Analysis of RMP 2

The complexity proof accounts separately for task-map evaluation, double-backward Jacobian–vector products, leaf evaluation, root differentiation, and the final solve. Reverse-mode differentiation retains O(Nd) node values, while leaf matrices require O(Ld²) storage. Repeated scalar gradient calls dominate the O(Nbd³) time bound; intermediate graphs need not all remain stored once further derivatives are unnecessary.

Appendix C Complexity of RMPflow

For the comparison with RMPflow, graph parents are grouped into tree nodes and duplicated values can share memory. Pushforward and leaf evaluation have comparable costs, but pullback stores matrix-valued quantities throughout the tree. This produces the additional O(Nd²) memory term while retaining O(Nbd³) time.

Refer to caption
(a) The computational graph used by RMP2
Refer to caption
(b) An example RMP-tree which can be used by RMPflow
Fig. 5: (a) The computation graph automatically built by automatic differentiation libraries when computing control point positions. RMP2 directly operates on this graph. (b) An example RMP-tree constructed for the same problem under similar strategy as [6, Appendix D]. It introduces intermediate high-dimensional nodes as well as redundant computation. In both figures, qiq_{i} is the joint angle of the ii-th joint, xix_{i} is the pose (position and orientation) of the ii-th link, and x0x_{0} is the base pose.

Appendix D Experimental Validation of Time Complexity

A synthetic chain graph varies in length from four to 36 while node dimension and branching factor stay at three. Timing averages 1,000 evaluations of a TensorFlow static graph and excludes compilation. RMP² scales approximately linearly with graph size; explicitly constructing Jacobians grows superlinearly. The test supports the stated scaling comparison, not a hardware-independent runtime guarantee.

Appendix E RMP 2 versus RMPflow: A Case Study

A three-link arm with nine collision-control points illustrates the interface difference. RMP² uses the natural computation graph of joint angles, link poses, and interpolated points. An explicit RMP tree must package sufficient parent information and can repeat upstream kinematics. Adding pairwise self-collision relationships is straightforward in the graph representation but can require redesigning the tree. Careful tree implementations can reduce redundant work; the comparison emphasizes programming and representation costs.

Concept demonstration

Open image ↗