|
84 | 84 |
|
85 | 85 | function getTypeFromSerializationModule(::AbstractString) |
86 | 86 | return error( |
87 | | - "getTypeFromSerializationModule is obsolete, use DFG.parseVariableType or IIF.getTypeFromSerializationModule.", |
| 87 | + "getTypeFromSerializationModule is obsolete, use DFG.parseStateKind or IIF.getTypeFromSerializationModule.", |
88 | 88 | ) |
89 | 89 | end |
90 | 90 |
|
|
129 | 129 |
|
130 | 130 | function getVariableTypeName(v::VariableSummary) |
131 | 131 | Base.depwarn("getVariableTypeName is deprecated.", :getVariableTypeName) |
132 | | - return v.statetype |
| 132 | + return v.statekind |
133 | 133 | end |
134 | 134 |
|
135 | 135 | function getMetadata(dfg::AbstractDFG, label::Symbol, key::Symbol) |
@@ -369,3 +369,58 @@ function getVariable(dfg::AbstractDFG, label::Symbol, stateLabel::Symbol) |
369 | 369 | return getVariable(dfg, label) |
370 | 370 | # return getVariable(dfg, label; stateLabelFilter = ==(stateLabel)) |
371 | 371 | end |
| 372 | + |
| 373 | +# Deprecated with new State serialization. |
| 374 | +# """ |
| 375 | +# $SIGNATURES |
| 376 | + |
| 377 | +# Default escalzation from coordinates to a group representation point. Override if defaults are not correct. |
| 378 | +# E.g. coords -> se(2) -> SE(2). |
| 379 | + |
| 380 | +# DevNotes |
| 381 | +# - TODO Likely remove as part of serialization updates, see #590 |
| 382 | +# - Used in transition period for Serialization. This function will likely be changed or deprecated entirely. |
| 383 | + |
| 384 | +# Related |
| 385 | + |
| 386 | +# [`getCoordinates`](@ref) |
| 387 | +# """ |
| 388 | +function getPoint( |
| 389 | + ::Type{T}, |
| 390 | + v::AbstractVector, |
| 391 | + basis = ManifoldsBase.DefaultOrthogonalBasis(), |
| 392 | +) where {T <: StateType} |
| 393 | + Base.depwarn("getPoint is deprecated. Use get_vector and exp directly.", :getPoint) |
| 394 | + M = getManifold(T) |
| 395 | + p0 = getPointIdentity(T) |
| 396 | + X = ManifoldsBase.get_vector(M, p0, v, basis) |
| 397 | + return ManifoldsBase.exp(M, p0, X) |
| 398 | +end |
| 399 | + |
| 400 | +# """ |
| 401 | +# $SIGNATURES |
| 402 | + |
| 403 | +# Default reduction of a variable point value (a group element) into coordinates as `Vector`. Override if defaults are not correct. |
| 404 | + |
| 405 | +# DevNotes |
| 406 | +# - TODO Likely remove as part of serialization updates, see #590 |
| 407 | +# - Used in transition period for Serialization. This function will likely be changed or deprecated entirely. |
| 408 | + |
| 409 | +# Related |
| 410 | + |
| 411 | +# [`getPoint`](@ref) |
| 412 | +# """ |
| 413 | +function getCoordinates( |
| 414 | + ::Type{T}, |
| 415 | + p, |
| 416 | + basis = ManifoldsBase.DefaultOrthogonalBasis(), |
| 417 | +) where {T <: StateType} |
| 418 | + Base.depwarn( |
| 419 | + "getCoordinates is deprecated. Use log and get_coordinates directly.", |
| 420 | + :getCoordinates, |
| 421 | + ) |
| 422 | + M = getManifold(T) |
| 423 | + p0 = getPointIdentity(T) |
| 424 | + X = ManifoldsBase.log(M, p0, p) |
| 425 | + return ManifoldsBase.get_coordinates(M, p0, X, basis) |
| 426 | +end |
0 commit comments