@@ -102,61 +102,61 @@ using RoME
102102@assert RoME.PriorPose2 == DFG._getPriorType(Pose2)
103103```
104104"""
105- function _getPriorType (_type:: Type{<:InferenceVariable } )
105+ function _getPriorType (_type:: Type{<:VariableStateType } )
106106 return getfield (_type. name. module, Symbol (:Prior , _type. name. name))
107107end
108108
109109# #==============================================================================
110110# # Default Factors Function Macro
111111# #==============================================================================
112- export PackedSamplableBelief
112+ export PackedBelief
113113
114114function pack end
115115function unpack end
116116function packDistribution end
117117function unpackDistribution end
118118
119- abstract type PackedSamplableBelief end
120- StructTypes. StructType (:: Type{<:PackedSamplableBelief } ) = StructTypes. UnorderedStruct ()
119+ abstract type PackedBelief end
120+ StructTypes. StructType (:: Type{<:PackedBelief } ) = StructTypes. UnorderedStruct ()
121121
122122# TODO remove, rather use StructTypes.jl properly
123- function Base. convert (:: Type{<:PackedSamplableBelief } , nt:: Union{NamedTuple, JSON3.Object} )
123+ function Base. convert (:: Type{<:PackedBelief } , nt:: Union{NamedTuple, JSON3.Object} )
124124 distrType = getTypeFromSerializationModule (nt. _type)
125125 return distrType (; nt... )
126126end
127127
128128"""
129- @defFactorType StructName factortype<:AbstractFactorObservation manifolds<:AbstractManifold
129+ @defObservationType StructName factortype<:AbstractFactorObservation manifolds<:AbstractManifold
130130
131131A macro to create a new factor function with name `StructName` and manifold. Note that
132132the `manifold` is an object and *must* be a subtype of `ManifoldsBase.AbstractManifold`.
133133See documentation in [Manifolds.jl on making your own](https://juliamanifolds.github.io/Manifolds.jl/stable/examples/manifold.html).
134134
135135Example:
136136```
137- DFG.@defFactorType Pose2Pose2 AbstractManifoldMinimize SpecialEuclidean(2)
137+ DFG.@defObservationType Pose2Pose2 RelativeObservation SpecialEuclidean(2)
138138```
139139"""
140- macro defFactorType (structname, factortype, manifold)
140+ macro defObservationType (structname, factortype, manifold)
141141 packedstructname = Symbol (" Packed" , structname)
142142 return esc (
143143 quote
144144 # user manifold must be a <:Manifold
145- @assert ($ manifold isa AbstractManifold) " @defFactorType manifold (" *
145+ @assert ($ manifold isa AbstractManifold) " @defObservationType manifold (" *
146146 string ($ manifold) *
147147 " ) is not an `AbstractManifold`"
148148
149- @assert ($ factortype <: AbstractFactorObservation ) " @defFactorType factortype (" *
149+ @assert ($ factortype <: AbstractFactorObservation ) " @defObservationType factortype (" *
150150 string ($ factortype) *
151151 " ) is not an `AbstractFactorObservation`"
152152
153153 Base. @__doc__ struct $ structname{T} <: $factortype
154154 Z:: T
155155 end
156156
157- # TODO should this be $packedstructname{T <: PackedSamplableBelief }
157+ # TODO should this be $packedstructname{T <: PackedBelief }
158158 Base. @__doc__ struct $ packedstructname <: AbstractPackedFactorObservation
159- Z:: PackedSamplableBelief
159+ Z:: PackedBelief
160160 end
161161
162162 # $structname(; Z) = $structname(Z)
@@ -275,11 +275,11 @@ function isPrior(dfg::AbstractDFG, fc::Symbol)
275275 return isPrior (getFactorType (fco))
276276end
277277
278- function isPrior (:: AbstractPrior )
278+ function isPrior (:: PriorObservation )
279279 return true
280280end
281281
282- function isPrior (:: AbstractRelative )
282+ function isPrior (:: RelativeObservation )
283283 return false
284284end
285285
0 commit comments