-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing radar factor to use a correct serialization strategy #611
Conversation
end | ||
|
||
function string2image(stringdata::String)::Array{Float64, 2} | ||
io = IOBuffer(base64decode(stringdata)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to help string together all the different image encoding methods -- here is a binary store via png (ImageMagick.jl):
https://juliarobotics.org/Caesar.jl/latest/concepts/interacting_fgs/#Adding-Data-Blobs
I also created this in Caesar.jl
Caesar.jl/src/images/imagedata.jl
Line 26 in 7ec2d11
function fetchDataImage(dfg::AbstractDFG, |
This should be much easier to do now the the new |
Now that residual functions use |
I'd like to update this to use data blobs and the new approach, we just overload for the factor: # for overloading
import IncrementalInference: preambleCache
function IIF.preambleCache(dfg::AbstractDFG, vars::AbstractVector{<:DFGVariable}, fct::ScatterAlignPose2)
# load image from blog store
# see https://juliarobotics.org/Caesar.jl/latest/concepts/entry_data/#Retrieving-a-Data-Blob
img1 = fetchData(dfg, getLabel(vars[1]), :image_store, :radar_sweep)
# lazy approach is just to have `typeof(CalcFactor{<:ScatterAlignPose2})` be `NamedTuple{(:img1,:img2),Tuple{Matrix{Gray{...}}, Matrix{Gray{...}}}`
return (;img1, img2)
end So then in the samping and residual functions, you can just do: function (sap::CalcFactor{<:ScatterAlignPose2})(wPi, wPj)
img1 = sap.cache.img1
img2 = sap.cache.img2
# ...
end |
Replaced by much improved ScatterAlignPose2, and standardized serialization in: Closing this for now, but will keep the branch in case we revive AlignRadarPose2 in the future |
1 similar comment
Replaced by much improved ScatterAlignPose2, and standardized serialization in: Closing this for now, but will keep the branch in case we revive AlignRadarPose2 in the future |
No description provided.