You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -129,6 +131,48 @@ Interface function to return the manifold point type of an InferenceVariable, ex
129
131
function getPointType end
130
132
getPointType(::T) where {T <:InferenceVariable} =getPointType(T)
131
133
134
+
"""
135
+
$SIGNATURES
136
+
Interface function to return the user provided identity point for this InferenceVariable manifold, extend this function for all Types<:InferenceVariable.
137
+
"""
138
+
function getPointIdentity end
139
+
getPointIdentity(::T) where {T <:InferenceVariable} =getPointIdentity(T)
140
+
141
+
142
+
"""
143
+
$SIGNATURES
144
+
145
+
Default escalzation from coordinates to a group representation point. Override if defaults are not correct.
146
+
E.g. coords -> se(2) -> SE(2).
147
+
148
+
Related
149
+
150
+
[`getCoordinates`](@ref)
151
+
"""
152
+
functiongetPoint(::Type{T}, v::AbstractVector) where {T <:InferenceVariable}
153
+
M =getManifold(T)
154
+
p0 =getPointIdentity(T)
155
+
X =get_vector(M, p0, v, DefaultOrthonormalBasis())
156
+
exp(M, p0, X)
157
+
end
158
+
159
+
"""
160
+
$SIGNATURES
161
+
162
+
Default reduction of a variable point value (a group element) into coordinates as `Vector`. Override if defaults are not correct.
163
+
164
+
Related
165
+
166
+
[`getPoint`](@ref)
167
+
"""
168
+
functiongetCoordinates(::Type{T}, p) where {T <:InferenceVariable}
@@ -219,25 +233,28 @@ function packVariableNodeData(dfg::G, d::VariableNodeData)::PackedVariableNodeDa
219
233
d.solveKey)
220
234
end
221
235
222
-
functionunpackVariableNodeData(dfg::G, d::PackedVariableNodeData)::VariableNodeDatawhere G <:AbstractDFG
223
-
r3 = d.dimval
224
-
c3 = r3 >0?floor(Int,length(d.vecval)/r3) :0
225
-
M3 =reshape(d.vecval,r3,c3)
226
-
227
-
r4 = d.dimbw
228
-
c4 = r4 >0?floor(Int,length(d.vecbw)/r4) :0
229
-
M4 =reshape(d.vecbw,r4,c4)
230
-
231
-
@debug"Dispatching conversion packed variable -> variable for type $(string(d.variableType))"
232
-
# Figuring out the variableType
233
-
#TODO deprecated remove in v0.11 - for backward compatibility for saved variableTypes.
234
-
ststring =string(split(d.variableType, "(")[1])
235
-
st =getTypeFromSerializationModule(ststring)
236
-
isnothing(st) &&error("The variable doesn't seem to have a variableType. It needs to set up with an InferenceVariable from IIF. This will happen if you use DFG to add serialized variables directly and try use them. Please use IncrementalInference.addVariable().")
functionunpackVariableNodeData(dfg::G, d::PackedVariableNodeData) where G <:AbstractDFG
237
+
@debug"Dispatching conversion packed variable -> variable for type $(string(d.variableType))"
238
+
# Figuring out the variableType
239
+
#TODO deprecated remove in v0.11 - for backward compatibility for saved variableTypes.
240
+
ststring =string(split(d.variableType, "(")[1])
241
+
T =getTypeFromSerializationModule(ststring)
242
+
isnothing(T) &&error("The variable doesn't seem to have a variableType. It needs to set up with an InferenceVariable from IIF. This will happen if you use DFG to add serialized variables directly and try use them. Please use IncrementalInference.addVariable().")
0 commit comments