lukasvst / dm-vio

Source code for the paper DM-VIO: Delayed Marginalization Visual-Inertial Odometry
GNU General Public License v3.0
1.07k stars 187 forks source link

Changing setting_desiredPointDensity has no effect on CPU usage. #27

Open bot-lin opened 2 years ago

bot-lin commented 2 years ago

I have played around the setting_desiredPointDensity variable and seen that changing the value of setting_desiredPointDensity has no effect on CPU usage. I did it by adding the point density option into the function MainSettings::parseArgument in the MainSetting.cpp file .

    if(1 == sscanf(arg, "pointdensity=%d", &option))
    {

        setting_desiredPointDensity = option;
        printf("POINT DENSITY: %d.\n", option);

        return;
    }

When set setting_desiredPointDensity to 1000 (GUI has been disabled)

Screenshot 2022-09-19 at 20 07 01

When set setting_desiredPointDensity to 100

Screenshot 2022-09-19 at 20 09 11
lukasvst commented 2 years ago

Are you sure that the variable is not overwritten when you set the prefix (argument prefix=0), see https://github.com/lukasvst/dm-vio/blob/master/src/util/MainSettings.cpp#L221 ? This might depend on the the order of the commandline arguments. You can also set the point density in the Pangolin GUI with the slider during runtime.

Otherwise, are you using realtime execution (preset=1) or non-realtime (preset=0)? In the latter case DM-VIO will process the sequence as quickly as possible so you should see a difference in execution time, not in CPU usage.