-
Notifications
You must be signed in to change notification settings - Fork 5
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
Refactoring Data-tools #21
Conversation
- clear unused imports - adjust formatting - modernise code using auto - tidy up command-line outputs
Based on google styleguide
- usage of auto when creating new objects - usage of empty() when checking string length
- changed name to better convey what the function does - extracted into dataset_utils header
- usage of auto when creating new objects - usage of empty() when checking string length - inline checkRequirements function to allow header only usage - add decimal RegexPattern
- move parameter values into class - usage of auto when creating new objects
- usage of auto when creating new objects - usage of empty() when checking string length - replace plain regex with RegexPattern paramters
Changing `../../dataset-tools/include/...` to just `include/...` for main DatasetReader classes
- usage of auto when creating new objects - tidy plain regex with RegexPattern parameters
- usage of auto when creating new objects - usage of empty() when checking string length - tidy plain regex with RegexPattern parameters - refactor to use checkRequirement util function
Created a generalised function which can be used to make a grey sensor with reasonable default settings. Function allows for additional changes to be made on top of the generalised sensor, reducing the general setup of the sensors.
- nest make functions in slambench::io namespace due to common use of classes within namespace - extract disparity parameters and types into header files of dataset reader classes
Summary
|
One part I am not so happy with is when a CameraSensor doesn't use Distortion the make camera function:
The function can still be used but with
Just think there might be a nicer way to do this without just making an additional function in |
Another thing to discuss is the opinion to combine makeGreySensor and makeRGBSensor into a makeCameraSensor possibly with a colour parameter since the two function are pretty much the same beyond the colour components - although this might just over complicate it! |
Tried checksum-ing comparision of slamfiles between |
Tested each using pangolin-loader, everything seems ok except for EUROCMAV one:
|
While I agree with spaces over tabs, I feel like it's making it really hard to look through the changes, which also makes it likely that it will take longer for Bruno to review and integrate this into the main repo - assuming Bruno would be fine with the change to spaces in the first place. I think for that reason it may be worth sticking to the current spacing method |
You could set the default distortion parameter to be empty. Then, inside your |
Is there any case where that causes problems, if a given set of distortion parameters were actually an empty set of 0'd values? |
I doubt so. If a dataset provides information about lens distortion, then it has to be included. If no distortion information is available, the most sensible option seems to be assuming no distortion. |
https://github.com/Matthewspear/slambench2/tree/data-tools-builder – Drafted the API in a seperate branch, implemented TUM as an example, feels like it reinvents the wheel (or sensor really). It can be tidied up, was trying to make it completely generic so one of the template parameters can be removed. |
- remove additional generic type - add additional grey and rgb sensor builder - update TUM class with sensor builder
Looks pretty good, I haven't tried building the datasets with the latest commits yet. Similar to how we have |
- added defaults to SensorBuilder subclasses - made SensorBuilder constructor protected for avoid implementation
7835201
to
e331697
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job! Had a few comments - some of them are admittedly issues not introduced in this PR, but it's not much work to change them and since we're refactoring this, it's worth fixing thm
- extract name into separate parameters for builders - use sensor size to set index in ICLNUIM - usage of nullptr over NULL in ICLNUIM
Half complete refactor, easier to revert and complete later and have input from library author on implementation details.
Having two methods to add distortion complicates the usage of the API, so it was removed.
Working on refactoring data-tool, modernised the C++ usage, remove repeated and unused code.