CHOMP Gradient derivation
05 March 2020
[ robotics , math ]

Cost map in a pillar like environment given a forward sensor scan.
Cost map in a pillar like environment given a forward sensor scan.
ESDF map with path generated by CHOMP. Solid purple path points shows the final path generated by CHOMP after convergence.
ESDF map with path generated by CHOMP. Solid purple path points shows the final path generated by CHOMP after convergence.
Cost map with path generated by CHOMP. Solid purple path points shows the final path generated by CHOMP after convergence.
Cost map with path generated by CHOMP. Solid purple path points shows the final path generated by CHOMP after convergence.

In the CHOMP[1] paper, the obstacle cost is defined in Eq. 23 of the paper:

Fobs[ξ]=01uBc(x(ξ(t),u))ddtx(ξ(t),u)dudt(1)\tag{1} \mathcal{F}_\text{obs} [\xi] = \int_0^1 \int_{u \in \mathcal{B}} c(x(\xi(t), u)) \left\lVert\frac{d}{dt} x(\xi(t), u)\right\rVert \,du \,dt

The functional gradient is given in Eq. 24 as:

ˉFobs[ξ]=vξddtvξ(2)\tag{2} \bar \nabla \mathcal{F}_\text{obs} [\xi] = \frac{\partial v}{\partial \xi} - \frac{d}{dt}\frac{\partial v}{\partial \xi'}

where vv is the everything inside the time integral of Eq. 23 of the paper, i.e.,

v=uBc(x(ξ(t),u))ddtx(ξ(t),u)du(3)\tag{3} v = \int_{u \in \mathcal{B}} c(x(\xi(t), u)) \left\lVert\frac{d}{dt} x(\xi(t), u)\right\rVert \,du

The paper gives the functional gradient of Eq. 1 in Eq. 25 as:

ˉFobs[ξ]=uBJ(x((Ix^x^)ccκ))du(4)\tag{4} \bar \nabla \mathcal{F}_\text{obs} [\xi] = \int_{u \in \mathcal{B}}J^\top\left( \left\lVert x'\right\rVert \left( \left(I - \hat{x'}\hat{x'}^\top\right) \nabla c - c\kappa \right)\right) \,du

where

κ=1x2(Ix^x^)x\kappa = \frac{1}{\left\lVert x'\right\rVert^2} \left(I - \hat{x'}\hat{x'}^\top\right)x''

We will derive ˉFobs[ξ]\bar \nabla \mathcal{F}_\text{obs} [\xi].


Preliminaries

Notation

  • x(q,u):RwBx(q, u) : \mathbb{R}^w \rightarrow \mathcal{B} is the forward kinematic function of the robot, given a point on the body uBu \in \mathcal{B} and its configuration qq.

  • ξ(q1,q2,...,qn)\xi \approx (q_1^\top, q_2^\top, ..., q_n^\top)^\top is the trajectory, which is basically a matrix of the joint angles.

  • ()(\cdot)' is the first derivative with respect to a line integral. In this case, the line integral is defined with respect to time tt, therefore it can also be seen as d()dt\frac{d (\cdot)}{d t}, i.e., the velocity, and ()(\cdot)'' the acceleration, etc.

  • x^=xx\hat{x} = \frac{x}{\left\lVert x\right\rVert} is the normalized vector of x.

  • J=xξJ = \frac{\partial x}{\partial \xi} is the kinematic Jacobian that relates changes in state to joint angles.

  • Partial gradient notation: c=cx\nabla c = \frac{\partial c}{\partial x}

Simplifying equations

We will use these simplfying equations in the derivation.

x(z)z=z(xx)12=12(xx)12(xx)z=121(xx)122xxz=1xxxz=x^xz(5)\tag{5} \frac{\partial \left\lVert x(z)\right\rVert}{\partial z} = \frac{\partial}{\partial z}(x^\top x)^{\frac{1}{2}} = \frac{1}{2}(x^\top x)^{-\frac{1}{2}} \frac{\partial (x^\top x)}{\partial z} = \frac{1}{2}\frac{1}{(x^\top x)^{\frac{1}{2}}} 2x^\top\frac{\partial x}{\partial z} = \frac{1}{\left\lVert x\right\rVert} x^\top\frac{\partial x}{\partial z} = \hat x^\top\frac{\partial x}{\partial z} tx^=txx=xxxxxx3=xxxxxxxx=xxx^x^xx=(Ix^x^)xx(6)\tag{6} \frac{\partial}{\partial t}{\hat x} = \frac{\partial}{\partial t} \frac{x}{\left\lVert x\right\rVert} = \frac{x'}{\left\lVert x\right\rVert} - \frac{x x^\top x'}{\left\lVert x\right\rVert^3} = \frac{x'}{\left\lVert x\right\rVert} - \frac{x}{\left\lVert x\right\rVert}\frac{x^\top}{\left\lVert x\right\rVert}\frac{x'}{\left\lVert x\right\rVert} = \frac{x'}{\left\lVert x\right\rVert} - \hat x \hat x^\top\frac{x'}{\left\lVert x\right\rVert} = (I - \hat x \hat x^\top) \frac{x'}{\left\lVert x\right\rVert}

Derivation

Dropping dependencies of cc, xx on ξ,u\xi, u, we have

v=uB(cx)duv = \int_{u \in \mathcal{B}} \left( c \left\lVert x'\right\rVert \right) \,du

Then

ˉFobs[ξ]=vξddtvξ=ξuB(cx)duddtξuB(cx)du=uB(ξ(cx)ddtξ(cx))duexchange the integral and derivatives\begin{aligned} \bar \nabla \mathcal{F}_\text{obs} [\xi] &= \frac{\partial v}{\partial \xi} - \frac{d}{dt}\frac{\partial v}{\partial \xi'}\\ &=\frac{\partial}{\partial \xi} \int_{u \in \mathcal{B}} \left( c \left\lVert x'\right\rVert \right) \,du - \frac{d}{dt}\frac{\partial}{\partial \xi'} \int_{u \in \mathcal{B}} \left( c \left\lVert x'\right\rVert \right)\,du \\ &= \int_{u \in \mathcal{B}} \left( \frac{\partial}{\partial \xi} \left( c \left\lVert x'\right\rVert \right) - \frac{d}{dt}\frac{\partial}{\partial \xi'} \left( c \left\lVert x'\right\rVert \right) \right) \,du && \text{\footnotesize exchange the integral and derivatives}\end{aligned}

We can compute the above integral in parts:

ˉFobs[ξ]=uB(ξcxPart 1ddtξcxPart 2)du(7)\tag{7} \begin{aligned} \bar \nabla \mathcal{F}_\text{obs} [\xi] &= \int_{u \in \mathcal{B}} \biggl( \underbrace{ \frac{\partial}{\partial \xi} c \left\lVert x'\right\rVert}_{\text{Part 1}} - \underbrace{\frac{d}{dt}\frac{\partial}{\partial \xi'} c \left\lVert x'\right\rVert }_{\text{Part 2}} \biggr) \,du\end{aligned}

Now we will compute Part 1 and Part 2 separately.

Part 1

Using the chain rule,

ξ(cx)=cxcxξJx+cxξx^xξusing Eq. 5=cJx+cx^xξ(8)\begin{aligned} \frac{\partial}{\partial \xi} \left(c \left\lVert x'\right\rVert \right) &= \underbrace{\frac{\partial c}{\partial x}}_{\mathclap{\nabla c}} \underbrace{\frac{\partial x}{\partial \xi}}_{\mathclap{J}} \left\lVert x'\right\rVert + c \underbrace{\frac{\partial \left\lVert x'\right\rVert}{\partial \xi}}_{\hat{x'}^\top\, \frac{\partial x'}{\partial \xi} \mathrlap{\text{\footnotesize using Eq. 5}}} \\ &= \nabla c J \left\lVert x'\right\rVert + c\,\hat{x'}^\top\, \frac{\partial x'}{\partial \xi} \tag{8}\end{aligned}

Part 2

ddtξcx=ddt(cxcxξx+cxξ)ddtξcx=ddt(cxξx+cxξ)(8)\begin{aligned} \frac{d}{dt}\frac{\partial}{\partial \xi'} c \left\lVert x'\right\rVert &= \frac{d}{dt}\biggl( \underbrace{\frac{\partial c}{\partial x}}_{\mathclap{\nabla c}} \frac{\partial x}{\partial \xi'} \left\lVert x'\right\rVert + c \frac{\partial \left\lVert x'\right\rVert}{\partial \xi'}\biggr)\\ \frac{d}{dt}\frac{\partial}{\partial \xi'} c \left\lVert x'\right\rVert &= \frac{d}{dt}\biggl( \nabla c \frac{\partial x}{\partial \xi'} \left\lVert x'\right\rVert + c \underbrace{\frac{\partial \left\lVert x'\right\rVert}{\partial \xi'}}\biggr) \tag{8}\end{aligned}

Let us deal with the rightmost term first:

xξ=xxξ(x)using Eq.5=xxξ(dxdt)=xxξ(xξξt)=xxξ(xξξ)Now if we take the derivative of this second term, we have=xxxξ=x^J\begin{aligned} \frac{\partial \left\lVert x'\right\rVert}{\partial \xi'} &=\frac{x'^\top}{\left\lVert x'\right\rVert} \cdot \frac{\partial}{\partial \xi'}(x') && \text{\footnotesize using Eq.5}\\ &=\frac{x'^\top}{\left\lVert x'\right\rVert} \cdot \frac{\partial}{\partial \xi'}\biggl(\frac{d x}{d t}\biggr)\\ &=\frac{x'^\top}{\left\lVert x'\right\rVert} \cdot \frac{\partial}{\partial \xi'}\biggl(\frac{\partial x}{\partial \xi} \frac{\partial \xi}{\partial t}\biggr)\\ &=\frac{x'^\top}{\left\lVert x'\right\rVert} \cdot \underbrace{\frac{\partial}{\partial \xi'}\biggl(\frac{\partial x}{\partial \xi} \xi'} \biggr) && \text{\footnotesize Now if we take the derivative of this second term, we have}\\ &=\frac{x'^\top}{\left\lVert x'\right\rVert} \cdot \frac{\partial x}{\partial \xi} \\ & = \hat{x'}^\top J\end{aligned}

Substituting back in Eq. 8, we have

ddtξcx=ddt(cxξx+cx^J)\begin{aligned} \frac{d}{dt}\frac{\partial}{\partial \xi'} c \left\lVert x'\right\rVert &= \frac{d}{dt}\biggl( \nabla c \frac{\partial x}{\partial \xi'} \left\lVert x'\right\rVert + c \, \hat{x'}^\top J \biggr)\end{aligned}

Applying the chain rule to the derivative with respect to time, we have:

ddtξcx=ddt(cxξx)A+ddt(cx^J)B\begin{aligned} \frac{d}{dt}\frac{\partial}{\partial \xi'} c \left\lVert x'\right\rVert &= \underbrace{\frac{d}{dt}\biggl( \nabla c \frac{\partial x}{\partial \xi'} \left\lVert x'\right\rVert\biggr)}_{\textbf{A}} + \underbrace{\frac{d}{dt}\biggl( c \, \hat{x'}^\top J \biggr)}_{\textbf{B}}\end{aligned}

We deal with and separately. Applying the chain rule to :

Addt(cxξx)=d(c)dtxξx+cddt(xξ)x+cxξdxdt=d(c)dtxξx+cddt(xξ)x+cxξdxdt=d(c)dtxξx+cddt(xξ)x+cxξx^xt=d(c)dtxξx+cddt(xξ)x+cxξ(x^x)\begin{aligned} \textbf{A} \quad \frac{d}{dt}\biggl( \nabla c \frac{\partial x}{\partial \xi'} \left\lVert x'\right\rVert\biggr) & = \frac{d (\nabla c)}{d t} \frac{\partial x}{\partial \xi'} \left\lVert x'\right\rVert + \nabla c \frac{d}{dt}\biggl(\frac{\partial x}{\partial \xi'}\biggr)\left\lVert x'\right\rVert + \nabla c \frac{\partial x}{\partial \xi'} \frac{d \left\lVert x'\right\rVert}{d t}\\ & = \frac{d (\nabla c)}{d t} \frac{\partial x}{\partial \xi'} \left\lVert x'\right\rVert + \nabla c \frac{d}{dt}\biggl(\frac{\partial x}{\partial \xi'}\biggr)\left\lVert x'\right\rVert + \nabla c \frac{\partial x}{\partial \xi'} \underbrace{\frac{d \left\lVert x'\right\rVert}{d t}}\\ & = \frac{d (\nabla c)}{d t} \frac{\partial x}{\partial \xi'} \left\lVert x'\right\rVert + \nabla c \frac{d}{dt}\biggl(\frac{\partial x}{\partial \xi'}\biggr)\left\lVert x'\right\rVert + \nabla c \frac{\partial x}{\partial \xi'} \underbrace{\hat{x'}^\top\frac{\partial x'}{\partial t}}\\ & = \frac{d (\nabla c)}{d t} \frac{\partial x}{\partial \xi'} \left\lVert x'\right\rVert + \nabla c \frac{d}{dt}\biggl(\frac{\partial x}{\partial \xi'}\biggr)\left\lVert x'\right\rVert + \nabla c \frac{\partial x}{\partial \xi'} \biggl(\hat{x'}^\top x'' \biggr)\end{aligned}

Now, we apply the chain rule to :

Bddt(cx^J)=dcdtx^J+cddt(x^)J+cx^dJdt=dcdtx^J+cddt(x^)J+cx^dJdt=cxxtx^J+c(Ix^x^)xxusing Eq.6J+cx^dJdt=cxx^J+c(Ix^x^)xxJ+cx^dJdt\begin{aligned} \textbf{B} \qquad \frac{d}{dt}\biggl( c \, \hat{x'}^\top J \biggr) &= \frac{d c}{d t} \, \hat{x'}^\top J + c \, \frac{d}{dt}\biggl( \hat{x'}^\top\biggr) J + c \, \hat{x'}^\top\frac{d J}{d t}\\ &= \underbrace{\frac{d c}{d t}} \, \hat{x'}^\top J + c \, \underbrace{\frac{d}{dt}\biggl( \hat{x'}^\top\biggr)} J + c \, \hat{x'}^\top\frac{d J}{d t}\\ &= \underbrace{\frac{\partial c}{\partial x}\frac{\partial x}{\partial t}} \, \hat{x'}^\top J + c \, \underbrace{(I - \hat{x'}\hat{x'}^\top) \frac{x''}{\left\lVert x'\right\rVert}}_{\text{\footnotesize using Eq.6}} J + c \, \hat{x'}^\top\frac{d J}{d t}\\ &= \nabla c \, x' \, \hat{x'}^\top J + c \, (I - \hat{x'}\hat{x'}^\top) \frac{x''}{\left\lVert x'\right\rVert} J + c \, \hat{x'}^\top\frac{d J}{d t}\end{aligned}

Putting A\textbf{A} and B\textbf{B} together:

ddtξcx=A+B=(d(c)dtxξx+cddt(xξ)x+cxξ(x^x))+(cxx^J+c(Ix^x^)xxJ+cx^dJdt)(9)\begin{aligned} \frac{d}{dt}\frac{\partial}{\partial \xi'} c \left\lVert x'\right\rVert &= \textbf{A} + \textbf{B}\\ &= \biggl( \frac{d (\nabla c)}{d t} \frac{\partial x}{\partial \xi'} \left\lVert x'\right\rVert + \nabla c \frac{d}{dt}\biggl(\frac{\partial x}{\partial \xi'}\biggr)\left\lVert x'\right\rVert + \nabla c \frac{\partial x}{\partial \xi'} \biggl(\hat{x'}^\top x'' \biggr)\biggr)\\ & + \biggl( \nabla c \, x' \, \hat{x'}^\top J + c \, (I - \hat{x'}\hat{x'}^\top) \frac{x''}{\left\lVert x'\right\rVert} J + c \, \hat{x'}^\top\frac{d J}{d t} \biggr) \tag{9}\end{aligned}

Together

Now, let us put Part 1 (Eq. 8) and Part 2 (Eq. 9) together:

(ξcxPart 1ddtξcxPart 2)=cJx+cx^xξPart 1(d(c)dtxξx+cddt(xξ)x+cxξ(x^x)A+cxx^J+c(Ix^x^)xxJ+cx^dJdtB)\begin{aligned} \biggl( \underbrace{ \frac{\partial}{\partial \xi} c \left\lVert x'\right\rVert}_{\text{Part 1}}& - \underbrace{\frac{d}{dt}\frac{\partial}{\partial \xi'} c \left\lVert x'\right\rVert }_{\text{Part 2}} \biggr) \\ &= \underbrace{\nabla c \, J \left\lVert x'\right\rVert + c\,\hat{x'}^\top\, \frac{\partial x'}{\partial \xi}}_{\text{Part 1}} -\biggl( \underbrace{ \frac{d (\nabla c)}{d t} \frac{\partial x}{\partial \xi'} \left\lVert x'\right\rVert + \nabla c \frac{d}{dt}\biggl(\frac{\partial x}{\partial \xi'}\biggr)\left\lVert x'\right\rVert + \nabla c \frac{\partial x}{\partial \xi'} \biggl(\hat{x'}^\top x'' \biggr)}_{\textbf{A}}\\ & + \underbrace{\nabla c \, x' \, \hat{x'}^\top J + c \, (I - \hat{x'}\hat{x'}^\top) \frac{x''}{\left\lVert x'\right\rVert} J + c \, \hat{x'}^\top\frac{d J}{d t}}_{\textbf{B}} \biggr)\end{aligned}

If we assume xξ=0\frac{\partial x'}{\partial \xi} = 0, xξ=0\frac{\partial x}{\partial \xi'} = 0, ddtJ=0\frac{d}{dt}J = 0, (and consequently ddtxξ=0\frac{d}{dt}\frac{\partial x}{\partial \xi'} = 0), then we can greatly simplify this expression:

cJx+cx^xξd(c)dtxξxcddt(xξ)xcxξ(x^x)cxx^Jc(Ix^x^)xxJcx^dJdt=cJxcxx^Jc(Ix^x^)xxJ(10)\begin{aligned} & \nabla c J \left\lVert x'\right\rVert + \cancel{c\,\hat{x'}^\top\, \frac{\partial x'}{\partial \xi}} - \cancel{\frac{d (\nabla c)}{d t} \frac{\partial x}{\partial \xi'} \left\lVert x'\right\rVert} - \cancel{\nabla c \frac{d}{dt}\biggl(\frac{\partial x}{\partial \xi'}\biggr)\left\lVert x'\right\rVert} - \cancel{\nabla c \frac{\partial x}{\partial \xi'} \biggl(\hat{x'}^\top x'' \biggr)} \\ & - \nabla c \, x' \, \hat{x'}^\top J - c \, (I - \hat{x'}\hat{x'}^\top) \frac{x''}{\left\lVert x'\right\rVert} J - \cancel{c \, \hat{x'}^\top\frac{d J}{d t}}\\ &\qquad \qquad \qquad = \nabla c J \left\lVert x'\right\rVert - \nabla c \, x' \, \hat{x'}^\top J - c \, (I - \hat{x'}\hat{x'}^\top) \frac{x''}{\left\lVert x'\right\rVert} J \tag{10}\end{aligned}

Now, we rearrange the last equation (Eq. 10):

cJxcxx^Jc(Ix^x^)xxJ=J((xxx^)cc(Ix^x^)xx)=J((xxx^xxmultiply the numerator and denominator by the same thing)cc(Ix^x^)xx)=J((xxxxx^)cc(Ix^x^)xx)=J((xxx^x^)cc(Ix^x^)xx)=J(x(Ix^x^)cc(Ix^x^)xxxxsame trick)=J(x(Ix^x^)cc(Ix^x^)xx2x)=J(x((Ix^x^)cc(Ix^x^)xx2κ))this gives us:(ξcxddtξcx)=J(x((Ix^x^)ccκ))(11)\begin{aligned} \nabla c J \left\lVert x'\right\rVert - \nabla c \, &x' \, \hat{x'}^\top J - c \, (I - \hat{x'}\hat{x'}^\top) \frac{x''}{\left\lVert x'\right\rVert} J\\ &= J^\top\biggl( \biggl(\left\lVert x'\right\rVert - x' \, \hat{x'}^\top\biggr)\nabla c - c (I - \hat{x'}\hat{x'}^\top) \frac{x''}{\left\lVert x'\right\rVert}\biggr)\\ &= J^\top\biggl( \biggl(\left\lVert x'\right\rVert - x' \, \hat{x'}^\top\underbrace{\frac{\left\lVert x'\right\rVert}{\left\lVert x'\right\rVert}}_{\mathclap{\text{\footnotesize multiply the numerator and denominator by the same thing}}} \biggr)\nabla c - c (I - \hat{x'}\hat{x'}^\top) \frac{x''}{\left\lVert x'\right\rVert}\biggr)\\ &= J^\top\biggl( \biggl(\left\lVert x'\right\rVert - \left\lVert x'\right\rVert\frac{x'}{\left\lVert x'\right\rVert} \, \hat{x'}^\top\biggr)\nabla c - c (I - \hat{x'}\hat{x'}^\top) \frac{x''}{\left\lVert x'\right\rVert}\biggr)\\ &= J^\top\biggl( \biggl(\left\lVert x'\right\rVert - \left\lVert x'\right\rVert \hat{x'} \hat{x'}^\top\biggr)\nabla c - c (I - \hat{x'}\hat{x'}^\top) \frac{x''}{\left\lVert x'\right\rVert}\biggr)\\ &= J^\top\biggl( \left\lVert x'\right\rVert(I - \hat{x'} \hat{x'}^\top)\nabla c - c (I - \hat{x'}\hat{x'}^\top) \frac{x''}{\left\lVert x'\right\rVert}\underbrace{\frac{\left\lVert x'\right\rVert}{\left\lVert x'\right\rVert}}_{\mathclap{\text{\footnotesize same trick}}}\biggr)\\ &= J^\top\biggl( \left\lVert x'\right\rVert(I - \hat{x'} \hat{x'}^\top)\nabla c - c (I - \hat{x'}\hat{x'}^\top) \frac{x''}{\left\lVert x'\right\rVert^2}\left\lVert x'\right\rVert\biggr)\\ &= J^\top\biggl( \left\lVert x'\right\rVert\biggl((I - \hat{x'} \hat{x'}^\top)\nabla c - c \underbrace{(I - \hat{x'}\hat{x'}^\top) \frac{x''}{\left\lVert x'\right\rVert^2}}_{\kappa} \biggr) \biggr)\\ \text{this gives us:} & \\ \biggl( \frac{\partial}{\partial \xi} c \left\lVert x'\right\rVert -\frac{d}{dt}\frac{\partial}{\partial \xi'} c \left\lVert x'\right\rVert\biggr) & = J^\top\biggl( \left\lVert x'\right\rVert\biggl((I - \hat{x'} \hat{x'}^\top)\nabla c - c \kappa \biggr) \biggr) \tag{11}\end{aligned}

Now put Eq. 10 into Eq. 7} to get the final form:

ˉFobs[ξ]=uB(ξcxddtξcx)du=uBJ(x((Ix^x^)ccκ))du\begin{aligned} \bar \nabla \mathcal{F}_\text{obs} [\xi] &= \int_{u \in \mathcal{B}} \biggl( \frac{\partial}{\partial \xi} c \left\lVert x'\right\rVert -\frac{d}{dt}\frac{\partial}{\partial \xi'} c \left\lVert x'\right\rVert \biggr) \,du\\ &= \int_{u \in \mathcal{B}}J^\top\biggl( \left\lVert x'\right\rVert\biggl((I - \hat{x'} \hat{x'}^\top)\nabla c - c \kappa \biggr) \biggr) \,du\end{aligned}

where

κ=1x2(Ix^x^)x\kappa = \frac{1}{\left\lVert x'\right\rVert^2} \left(I - \hat{x'}\hat{x'}^\top\right)x''

Compare this solution with Eq.4, which is Eq. 25 in the paper.

Notes

The form of Eq. 1 is similar to a form of the Elastic Band model which was first introduced by Sean Quinlan. Quinlan’s thesis introduces a elastic bands using a constant elastic tension force, which is used to model deforming a collision-free path. In Section 3.7 of his thesis, a simplified objective function is introduced as

vint=kcv_{int} = k \left\lVert\mathbf{c}'\right\rVert

which is the internal density function. The corresponding contraction force,

fint(s)=ˉvint=ddsvintc(12)\tag{12} \mathbf{f}_{int}(s) = - \bar \nabla v_{int} = \frac{d }{d s} \frac{\partial v_{int}}{\partial \mathbf{c}'}

is similar to the gradient equation (Eq. 2). Note that the spring constant kk in vintv_{int} is constant, whereas the vv in the CHOMP formulation (Eq. 3) the cost cc is dependent on the state xx. The solution to Eq.12 is:

fint(s)=kc2(cccc2c)\mathbf{f}_{int}(s) = \frac{k}{\left\lVert\mathbf{c}'\right\rVert^2} \biggl( \mathbf{c}'' - \frac{\mathbf{c}'' \cdot \mathbf{c}'}{\left\lVert\mathbf{c}'\right\rVert^2}\mathbf{c}'\biggr)

For the exact derivation, please see Section 3 of Quinlan’s thesis[2].


References

  1. M. Zucker, N. Ratliff, A. D. Dragan, M. Pivtoraiko, M. Klingensmith, C. M. Dellin, J. A. Bagnell, and S. S. Srinivasa, “Chomp: Covariant hamiltonian optimization for motion planning,” The International Journal of Robotics Research, vol. 32, no. 9-10, pp. 1164–1193, 2013.

  2. S. Quinlan, Real-time modification of collision-free paths. Page 5 of 5 Stanford University, 1994, no. 1537

Note about the figures: Notice that a forward sensor scan does not capture the interior of an obstacle. This is a problem for another blog post…