-
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
saving and loading maps #526
Comments
What do you mean when you say "I could not save a map"? Does your code abort with errors? Does MapPointsSave.txt generates properly? |
Dear @AlejandroSilvestri , |
How do you call SLAM.SaveMapPoints("MapPointsSave.txt")? Are you sure this method is invoked at all? |
@AlejandroSilvestri , |
There are many ways around to save maps in orb.slam2, but any of them well implemented and documented, perhaps with the exception of poine's. Make sure you call your savemap in some point of orb.slam2's code. Maybe at the end, near SaveKeyFrameTrajectoryTUM, for example. Put a console mark (cout << "Saving!" << endl;) as a way to verify your function has been invoked. |
@AlejandroSilvestri , sami@sami: Usage: rosrun ORB_SLAM2 Mono path_to_vocabulary path_to_settings I have checked my ROS master. I have checked my path. There are no errors. based on : #43 Please offer help. |
Hi @hesamira , |
Hi @rahulsharma11 , did you miss a link? What did you check? @hesamira , sorry I missed your post. I can't help you though. I'm not familiar with ROS nor have experience with MathewDenny's map save. |
Hi @AlejandroSilvestri , Also further this link might be useful, as i got the map.bin file generated and also used that in localization purpose. |
Hello,
I want to save map and load the data in ORB_SLAM2. I have performed the changes in ORBSLAM2 (I have made some changes to System.cc, System.h, and ros_mono.cc.). based on : raulmur/ORB_SLAM#5
For System.cc, I added the following code:
void System::SaveMapPoints(const string &filename) {
cout << endl << "Saving map points to " << filename << " ..." << endl;
}
For System.h, I added the following code:
void SaveMapPoints(const string &filename);
For ros_mono.cc, I added the following code:
SLAM.SaveMapPoints("MapPointsSave.txt");
The MapPointsSave.txt contains all the map points in terms of global locations, i.e., xyz coordinate. But I could not save a map and load the data. I also have created a package for pcd (http://pointclouds.org/documentation/tutorials/writing_pcd.php) which I can convert the saved map points in .txt file into .pcd file. I could not run it. I have tested it by:
$ ./pcd_write
I have used Ubuntu 14.04, ROS indigo and OpenCV 2.4.13.
Please offer help.
Thanks.
The text was updated successfully, but these errors were encountered: