-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
map save/load #19
Comments
Hey, check the Pull Request "Add getter for map in System. #14". Seems like its exactly what you are asking about! |
Hi, |
@dannyway03: I am working on load/save. I don't know if/when i will have it finished. |
Request for comments: In order to achieve this result, I have had to butcher ORBSLAM2's code quite a bit and before releasing a patch, I would like to gain a better understanding and refactor quite a bit too, hence that first request for comments (for now i shoved most everything in Map.cc and added accessors in other classes where needed). In my understanding, at the moment, the camera calibration is parsed by Tracking. The calibration, and computed by-products, are then stored in Frames and KeyFrames, partly as class variables and partly as instance variables. Tracking has a ChangeCalibration methods which triggers the update of the Frames class variables but leaves existing instances as is. My question is about the use case of ChangeCalibration. How is this functionality intended? I would like to avoid having to store a calibration along each KeyFrame. I could store the different calibrations and have each Keyframe linked to its own one but that also sounds a bit complicated. Oh... and once again, thank you so much Raul for your awesome work and your code. I learned so much by reading it, you are my hero! |
@poine thats great news and great work, can you give an estimate on when you can release a patch? |
Depends on what kind of patch you want. As I said, I butchered orbslam2
|
Any kind of patch will work for me. However I do not know why your first patch did not get accepted, I see that 2016-03-02 23:38 GMT+02:00 poine notifications@github.com:
|
@poine i tried serializing and deserializing the ORB map and i have a couple of questions to ask you. In this way , I found there are non corresponding KF and Mappoint ids during crossreferencing. I can circumvent by checking for nonexistant KFs / Map points at multiple locations during run time.I am able to run in localization or mapping mode with the loaded map but fails during the instance of a loop closure. |
@denny On Fri, Mar 25, 2016 at 5:04 AM, Denny notifications@github.com wrote:
|
@poine To answer your request for comments: |
@michael: i am not comfortable with git and a bit short in time at the The code for loading/saving maps is in Map.cc .It's kind of ugly at the If you (or someone else) is willing to use that code, I am willing to take hth Poine On Wed, Apr 6, 2016 at 10:56 PM, Michael Shomin notifications@github.com
|
@poine I'll look over the code and give it a try. Your link appears to be broken though. |
@michael: sorry for the broken link. Should be fixed now On Thu, Apr 7, 2016 at 7:29 PM, Michael Shomin notifications@github.com
|
@poine Looking forward to see this feature been published, but maybe the link is still broken. |
@poine I hope that you can push your code on github soon. Would be very helpful. |
@poine I'm glad your code released, but the link may broken...anyway, thanks for your efforts |
@zsy372901 I'll try to free some time and look again at git oddities next week On Fri, Apr 8, 2016 at 10:16 AM, zsy372901 notifications@github.com wrote:
|
@poine aha, it is worked:D thanks a lot! |
@poine Wow, I just gave myself a headache... There seems to be a bug in your PublishCurrentCamera function used in rgbd. I added the save subscriber from ros_mono and was trying it on a bag, but I was getting an exception after about 20 seconds of running. Very strange. I'll look into it later, but for now, the save functionality seems to be working. I'll add the loading to System.cc and try it through ros. |
@poine Would you like me to package up the save/load functionality into commits and make a pull request, or do you plan to? Also, nice work! |
@michael: Sure, whatever... i'm not fluent with git, so it would take me a On Tue, Apr 12, 2016 at 4:39 AM, Michael Shomin notifications@github.com
|
@poine Thanks for your great work! I have downloaded your codes and see that in Map.cc, you implemented a function called _ReadKeyFrame. And there is a comment 'mono only for now'. I have been running ORB-SLAM2 with a bumblebee2 stereo camera, that is, I need to save map in stereo mode. So could you tell me whether I can reuse your codes on my stereo camera. Thanks again. |
Thanks @poine for the great job. But I still have an issue: It crashes on this line:
because mlRelativeFramePoses is empty. |
@skylook: the code i use to restart orbslam2 after loading a map is On Tue, Apr 26, 2016 at 11:32 AM, skylook notifications@github.com wrote:
|
Thanks for your reply @poine , I already tried what you did in restart_slam_on_images.cc, it still crashes on the following line in Tracking.cc:
This line is touched when it is failed tracking on the first frame (mCurrentFrame.mTcw.empty()). When it runs without an initial map, it always has a mlRelativeFramePoses, but when it runs with a initial map, it is empty. I go through your code but I haven't catch the point on how to fix this. Any idea? Thanks so much :) |
@dannyway03 Have you realized your goal of reusing the slam map? |
I have found a problem of map load function. Because mspMapPoints is stored in std::set which means when using |
@poine Thanks for your great job! Could I ask about the modification of your package comparing with the original ORB-SLAM? For example, the map save/load in map.cc and the example codes. So nice of you to help me learn more about SLAM. |
@highlightz not so much time for this lately...anyway, i have been trying with serialization, somehow inspired by @MathewDenny.. |
@poine
I'm also currently writing my code to save and load the map and it works fine, but still got problems with this 2 issues. |
@stevenyslin |
Dear @Alkaid-Benetnash , So if I want to save map, it can modify System.h, and set is_save_map_ as true, Really thank you for your help, and have a great day. |
Hi all, I was playing around with @MathewDenny 's code for map save/load. (Thanks for such an amazing work, it mostly worked out of the box). However, apart from missing MPs and KFs, I also noticed a bug which later resultant in a crash when relocalization tried to access the Parent KF of a reference KF which was non-null and pointing to garbage (this is only valid for the 1st KF ever added as it won't have a parent) Solution would be to set mpParent to NULL (in the KF's default constructor). I don't know if anybody else faced this problem, but just putting it out there in case it helps somebody. |
Hello, i was using the save function and i have an issue when the algorithm detects a loop. In first place when a loop is detected and then the execution is stopped to create the text files, it takes quite a long time to the program to end, and then save the files. when a second loop is detected the program never ends therefore there is no text file saved. I think that the problem is that the second LoopClosing process never ends, that is why the execution is not finished and the files not saved. If someone could help me with this issue it would be great. Many thanks in advance. |
How to publish a string to the topic ORB_SLAM2/save_map for saving the map. I am new to ROS, Should I have to write a separate publisher node for publishing string in this topic????? |
Hi, @poine ,thanks for your work. But I met some problems when run make in the /ORB_SLAM2/build, but when I change the "inlier void Frame::InitializeScaleLevels() " to " void Frame::InitializeScaleLevels()"in the file "Frame.cc", it can make well, I don't know why it works and what problems it can bring? |
Hi, Is there anyone know how to run in the ROS-kinetic? This ROS version supports OpenCV3, so when I rosrun the mono, it can't work . |
Hi, @Alkaid-Benetnash ,thanks for your code. It works fine, except missing MPs and KFs. In my case, the map I saved has 56 KFs and 2600+ MPs, but when I load map, there are only 29 KFs and 1600+ MPs. I tried other datasets, and seems to be the same result. Wonder where is the problem? |
Hi @ADDDDD |
Hi @Alkaid-Benetnash |
@ADDDDD |
@Alkaid-Benetnash |
@Alkaid-Benetnash |
Hello world, I have used Ubuntu 14.4, ROS indigo and OpenCV 2.4.13. |
Hi Hesamira,
Could you try the repo @MathewDenny <https://github.com/mathewdenny> 's now.
I was missing a folder. Let me know if that fixes the issue.
Thanks
…On Sat, Feb 24, 2018 at 7:30 AM, hesamira ***@***.***> wrote:
Hello world,
@MathewDenny <https://github.com/mathewdenny> , thanks for your code.
I have used @MathewDenny <https://github.com/mathewdenny> 's code.I have
faced this error:
***@***.***:~/MathewDenn/src/ORB_SLAM2$ ./build.sh
CMake Error at CMakeLists.txt:105 (add_executable):
Cannot find source file:
tools/bin_vocabulary.cc
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
-- Build files have been written to: /home/sami/MathewDenn/src/ORB_
SLAM2/build
make: *** No targets specified and no makefile found. Stop.
Converting vocabulary to binary
./build.sh: line 35: ./tools/bin_vocabulary: No such file or directory
I have used Ubuntu 14.4, ROS indigo and OpenCV 2.4.13.
Please guide me.
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQxMwFqp-aayEL2bRlCwZGiTVQPL0eenks5tYADNgaJpZM4HVJUE>
.
|
Dear @stevenyslin, |
Hi everyone ! I have downloaded the @poine ORBSLAM2 version with the possibility of save and load a map theoretically but I can execute ./build.sh . Indeed I have this problem : martinorgiazzi@martinorgiazzi-ThinkPad-T540p:~/Documents/stereoCameraNavigation/orbslam2v2trial/ORB_SLAM2$ ./build.sh Someone had the same building issue or has an idea to solve it ? Thank you in advance ! |
Hi @Alkaid-Benetnash
In this way I have been able to load maps up to roughly 550MB successfully, but if I create a larger map of >600MB, I get the aforementioned error. Any idea how to fix this? EDIT: It seems like this error occurs when the video is very large even if the map created is small. I was able to load a map once I shortened the video (even though its size was 610MB). Thanks |
@amitfishy Can you confirm everything works fine when saving the map? Besides, finphin encountered problems when saving large maps, you can take a look at his comment. |
I think there might be a problem with the original repo itself, seeing as how I sometimes get Seg faults with it. Some people have suggested using a different version of Pangolin which helps to some extent but you still get occasional Seg faults. Possibly the repo does not scale too well with larger maps or I might be using a newer version of a dependency that the original repo was built on. I'll try out what was mentioned in the other post. Thank you! |
@amitfishy Did you have any luck in solving this issue? I tried the solution in the other post by increasing stack size but I am still getting a malloc(): memory corruption error with larger maps. |
@ksivakumar |
Tank you for you suggestion. I am a newbie in ORB-SLAM2. I have map.bin file. Can you please guide me little more elaborately how to get pointcloud from map.bin file? |
@poine @MathewDenny I was able to save and load map using serialisation. I tried to relocalise on a pre-loaded map and was able to do it successfully. Now if I want the re-localised position with respect to the Global Map. Can you suggest any methods. My aim is to to travel from a point A to point B inside the map using SLAM. Thus I need to establish global position of A,B |
Hey guys, If you are still looking for a way to save maps, I have this project working fine: It uses Google's protocol buffers, so the protocol used in serialization is well documented, and you can modify it without losing compatibility. Plus an example code show you how to access keyframes, mappoints and so directly in the map files, without the need of compiling all ORB-SLAM2. |
@poine Hi, I found some bugs in your code
into this
Your work is really awesome !! |
I have two questions about 'How to bundle with ORB-SLAM2'
|
Answers: 1- Osmap.h is into include folder. Osmap.cc is into src folder. Let me know if it works! |
Hi Raul!
first of all thank you for sharing such a great piece of software!
I was thinking it would be nice to have some map save/load functionality.
This could enable some interesting functionalities, like the reconstruction of large scale environments in an incremental fashion (i.e., create and save and initial map, which is loaded and extended iteratively).
Do you plan to deliver such functionality?
(i saw there are some commented functions in system.h)
If not, do you have any advice to enable it?
thanks,
danny
The text was updated successfully, but these errors were encountered: