Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 57 additions & 2 deletions src/Deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ end

function getTypeFromSerializationModule(::AbstractString)
return error(
"getTypeFromSerializationModule is obsolete, use DFG.parseVariableType or IIF.getTypeFromSerializationModule.",
"getTypeFromSerializationModule is obsolete, use DFG.parseStateKind or IIF.getTypeFromSerializationModule.",
)
end

Expand Down Expand Up @@ -129,7 +129,7 @@ end

function getVariableTypeName(v::VariableSummary)
Base.depwarn("getVariableTypeName is deprecated.", :getVariableTypeName)
return v.statetype
return v.statekind
end

function getMetadata(dfg::AbstractDFG, label::Symbol, key::Symbol)
Expand Down Expand Up @@ -369,3 +369,58 @@ function getVariable(dfg::AbstractDFG, label::Symbol, stateLabel::Symbol)
return getVariable(dfg, label)
# return getVariable(dfg, label; stateLabelFilter = ==(stateLabel))
end

# Deprecated with new State serialization.
# """
# $SIGNATURES

# Default escalzation from coordinates to a group representation point. Override if defaults are not correct.
# E.g. coords -> se(2) -> SE(2).

# DevNotes
# - TODO Likely remove as part of serialization updates, see #590
# - Used in transition period for Serialization. This function will likely be changed or deprecated entirely.

# Related

# [`getCoordinates`](@ref)
# """
function getPoint(
::Type{T},
v::AbstractVector,
basis = ManifoldsBase.DefaultOrthogonalBasis(),
) where {T <: StateType}
Base.depwarn("getPoint is deprecated. Use get_vector and exp directly.", :getPoint)
M = getManifold(T)
p0 = getPointIdentity(T)
X = ManifoldsBase.get_vector(M, p0, v, basis)
return ManifoldsBase.exp(M, p0, X)
end

# """
# $SIGNATURES

# Default reduction of a variable point value (a group element) into coordinates as `Vector`. Override if defaults are not correct.

# DevNotes
# - TODO Likely remove as part of serialization updates, see #590
# - Used in transition period for Serialization. This function will likely be changed or deprecated entirely.

# Related

# [`getPoint`](@ref)
# """
function getCoordinates(
::Type{T},
p,
basis = ManifoldsBase.DefaultOrthogonalBasis(),
) where {T <: StateType}
Base.depwarn(
"getCoordinates is deprecated. Use log and get_coordinates directly.",
:getCoordinates,
)
M = getManifold(T)
p0 = getPointIdentity(T)
X = ManifoldsBase.log(M, p0, p)
return ManifoldsBase.get_coordinates(M, p0, X, basis)
end
2 changes: 0 additions & 2 deletions src/DistributedFactorGraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,8 @@ const unstable_functions::Vector{Symbol} = [
:printNode,
:plotDFG,
:packBlob,
:packState,
:hasTags,
:unpackBlob,
:unpackState,
:emptyTags!,
:ls,
:lsf,
Expand Down
Loading
Loading