Giter Club home page Giter Club logo

Comments (4)

takahiko-hasegawa-hdjp avatar takahiko-hasegawa-hdjp commented on May 24, 2024 1

That makes perfect sense. thanks for your answer!

from rtabmap.

matlabbe avatar matlabbe commented on May 24, 2024

By default, most actions would call rtabmap.close() with databaseSaved=true, even in localization mode

void Rtabmap::close(bool databaseSaved, const std::string & ouputDatabasePath)
{
UINFO("databaseSaved=%d", databaseSaved?1:0);

In localization mode, if you are not using memory management, here would be at least that line that would modify the database every time it is closed:

_memory->saveOptimizedPoses(_optimizedPoses, _lastLocalizationPose);

Under ROS, we also save the current optimized occupancy grid:
https://github.com/introlab/rtabmap_ros/blob/d7d2c3f122af955ea500d3cc49a4e718edc84a83/rtabmap_slam/src/CoreWrapper.cpp#L879-L893

If you are not on ROS, you may just add this inside Rtabmap::close() function:

databaseSaved = databaseSaved && _memory->isIncremental();

I think then the database won't be modified, unless I forget another place.

from rtabmap.

takahiko-hasegawa-hdjp avatar takahiko-hasegawa-hdjp commented on May 24, 2024

Ok Just to clarify a few things;

I can modify the code like you said in order for the database to not be modified after running rtabmap. Im using ros2 rtabmap.

If i modify the code like you said, would that make any differece to the actual localization mode like it wont localize as good? or the performance?

Also, the odometry correction of the robot would be the position of the robot from the previous session.
So run the rtabmap node -> mode the robot -> stop the robot->map-to-odom would be the same as the previous map to odom.
If I disable the database save function as mentioned above, would I still be able use the "re-loading" of the previous map-to-odom feature?

I do want to change the code so that the database will not be modified, but I do not want to make any difference to the actual system performance at all.

Thanks!

from rtabmap.

matlabbe avatar matlabbe commented on May 24, 2024

If we don't save the last location position in the database, on restart, the robot won't have a any a priori knowledge where it is restarting to help first localization. It will behave like of if the robot is shutdown, moved to another place and booted up again. The first localization guess will be wrong, thus it would rely only on global localization. In most cases, it won't change anything, as global localization could work on the first frame or two if the robot is seeing enough discriminating visual features.

The map->odom correction is always adjusted on start depending on the new odometry origin and where the robot thinks it is in the map on start.

Not saving the back the last position in the database is similar to use RGBD/StartAtOrigin:
Param: RGBD/StartAtOrigin = "false" [If true, rtabmap will assume the robot is starting from origin of the map. If false, rtabmap will assume the robot is restarting from the last saved localization pose from previous session (the place where it shut down previously). Used only in localization mode (Mem/IncrementalMemory=false).]

This won't change localization performance, just where the robot thinks it is on start.

from rtabmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.