JuliaSmoothOptimizers / BundleAdjustmentModels.jl

Julia repository of bundle adjustment problems
Mozilla Public License 2.0
9 stars 5 forks source link

Fix README #66

Open dpo opened 2 years ago

dpo commented 2 years ago

The instructions in README.md are no longer accurate. They should be modified as in the documentation.

AntoninKns commented 2 years ago

I am not sure on what you want to change ?

Is it because of fetch_ba_name(name) and fetch_ba_group("ladybug") ? If so, I left them there in case people just want to have the file available but use them for something else. I agreee it might be misleading so we could juste remove them.

I could also add that for this instruction model = BundleAdjustmentModel("problem-49-7776") we can also type BundleAdjustmentModel("problem-49-7776-pre") or BundleAdjustmentModel("problem-49-7776-pre.txt.bz2").

Apart from that I tested everything again and it all seems working so I am not entirely sure where is the problem ?

dpo commented 2 years ago

Here is what happened when I installed this module and tried to follow the README:

julia> path = fetch_ba_name(name)
ERROR: MethodError: no method matching fetch_ba_name(::String)
AntoninKns commented 2 years ago

I tried tro reproduce your error but I can't seem to do it. Here is how I did it :

julia> using BundleAdjustmentModels
julia> df = problems_df()
julia> filter_df = df[ ( df.nequ .≥ 50000 ) .& ( df.nvar .≤ 34000 ), :]
julia> name = filter_df[1, :name]
julia> path = fetch_ba_name(name)

And it worked with the latest version of this repository. The method is still exported in the file BundleAdjustmentArtifactFunctions.jl so I don't see how it does not work.

That being said you are right, the README is misleading because fetch_ba_name and fetch_ba_group are almost useless now and should be given at the end of the README as an additional commmand just in case. In reality if you want to create a BundleAdjustmentModel you can simply do the following :

julia> using BundleAdjustmentModels
julia> df = problems_df()
julia> filter_df = df[ ( df.nequ .≥ 50000 ) .& ( df.nvar .≤ 34000 ), :]
julia> name = filter_df[1, :name]
julia> model = BundleAdjustmentModel(name)
dpo commented 2 years ago

I also did ] add BundleAdjustmentModels in a fresh environment. Does that work for you?

AntoninKns commented 2 years ago

I just did it in a fresh environment and it still worked. It might be an OS related problem because this package launches different code depending on the OS in order to download the artifacts.

In the end it should still work because the fetch_ba_name and fetch_ba_group are tested here for different versions of Julia and on Windows, Linux and Mac.

Do you have BundleAdjustmentModels v0.3.0 ? In v0.2.0 the fetch_ba_name was called like this :

julia> path = fetch_ba_name("problem-49-7776-pre", "ladybug")

It might be the source of the error, otherwise I really don't know what could lead to this.