Skip to content

Commit 7134287

Browse files
committed
stash on par_tree
1 parent 60731c2 commit 7134287

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

IncrementalInference/src/Factors/GenericFunctions.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,15 @@ function Ad(::typeof(SpecialEuclidean(2)), p)
123123
)
124124
end
125125

126+
function Ad(::Motion(2), p)
127+
t = p.x[1]
128+
R = p.x[2]
129+
vcat(
130+
hcat(R, -SA[0 -1; 1 0]*t),
131+
SA[0 0 1]
132+
)
133+
end
134+
126135
struct AdFactor{F <: AbstractManifoldMinimize} <: AbstractManifoldMinimize
127136
factor::F
128137
end

IncrementalInference/src/services/FactorGradients.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function factorJacobian(
3131
M_codom = Euclidean(manifold_dimension(getManifold(fac)))
3232
# Jx(M, p) = ManifoldDiff.jacobian(M, M_codom, calcfac, p, backend)
3333

34-
return ManifoldDiff.jacobian(M_dom, M_codom, costf, p0, backend)
34+
return ManifoldDiff.jacobian(M_dom, M_codom, costf, p0, backend), costf(p0)
3535
end
3636

3737

0 commit comments

Comments
 (0)