Skip to content
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

Implement isInitialized function in SDK.jl #89

Open
dehann opened this issue Mar 30, 2022 · 4 comments
Open

Implement isInitialized function in SDK.jl #89

dehann opened this issue Mar 30, 2022 · 4 comments
Milestone

Comments

@dehann
Copy link
Member

dehann commented Mar 30, 2022

We should add the function isInitialized to the SDK
The CJL call is as follows:

isInitialized(fg, :x0)

and returns true or false.

Implementation here:
https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/blob/16b82a4c814ce913ac3dc849f2fcb198ddc9abfa/src/services/DFGVariable.jl#L240-L261

@dehann dehann changed the title add function isInitialized Implement isInitialized function in SDK.jl Mar 30, 2022
@jim-hill-r
Copy link
Contributor

for tut 1? To what end?

@dehann
Copy link
Member Author

dehann commented Mar 30, 2022

The graphinit process is described in Tutorial 1, however, I just moved it to Above and Beyond path since this is easier to do in the CJL version. So SDKs versions of Tut1 will have to be a little different for the sake of MVP on SDK versions.

To what end

This is a developer function often used. A part of Tut1 is based on explaining how graphinit works. I'm going to modify the SDK versions to instead just do a solve instead, and thereby get numerical values in the nodes rather than reckon on init values.

Will circle back in Above and Beyond list.

@dehann
Copy link
Member Author

dehann commented Mar 30, 2022

to be clear, this function will have to be built at some point, it would have been good to have for Tut1, but can work around it for SDK versions easy enough, so does not qualify for MVP. Hence why I moved it out.

@Affie
Copy link
Member

Affie commented Apr 19, 2023

why not use solver data eg.
getVariableSolverData(fgclient, :x0).initialized

or we can add this to DFG:

function isInitialized(dfg::AbstractDFG, label::Symbol, key::Symbol=:default)
    return getVariableSolverData(dfg, label, key).initialized
end

@Affie Affie added this to the v0.0.x milestone Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants