Skip to content
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

Integrate UZH FPV Drone Racing Dataset #28

Merged
merged 12 commits into from
Sep 18, 2019

Conversation

matthewspear
Copy link
Collaborator

@matthewspear matthewspear commented Aug 29, 2019

Integrate the FPV Drone Racing dataset from: http://rpg.ifi.uzh.ch/uzh-fpv.html

Adds rules for downloading and processing the UZH FPV drone racing dataset
- added parameters to read values from dataset-generator calls
- added requirements check to files
- create gt sensor
- read groundtruth file
- create IMU sensor
- load parameters
- parse imu.txt file
- generic grey data loader function
- create sensors for snapdragon and davis
- load data from image list files
- add parameters to sensors
- then add to slamfile
- Enable EventCameraSensor to hold variable amounts of data
- Setup EventCamera Sensor
- Create Event data object
- Group sets of event data into SLAM frames split by framerate of sensor
- Write out event frames
@matthewspear
Copy link
Collaborator Author

Running into a problem around memory misalignment when copying Events.
To replicate paste into line 331 of UZHFPV.cpp:

    std::cout << events[current_index] << std::endl;
    std::cout << ((Event*)event_frame->Data)[0] << "\n\n";

    std::cout << events[current_index + 1] << std::endl;
    std::cout << ((Event*)event_frame->Data)[1] << "\n\n";

    std::cout << events[current_index + 2] << std::endl;
    std::cout << ((Event*)event_frame->Data)[2] << "\n\n";

Outputs:

1540820236.552855132 = 243 127 0
1540820236.92 = 243 127 0

1540820236.556519132 = 196 25 1
1753665328.21916 = 209 0 0

1540820236.558144132 = 289 94 1
1753646670.21916 = 34382 26758 156

Showing that after the first item, the memory is misaligned and not producing the same results - been staring at this for quite a while and can't spot anything obvious. If I were to guess I think it has something to do with the TimeStamp object.

I've created a sample project to test the memcpy with nested object and everything works fine: https://www.notion.so/mspear/Matt-Week-9-ed25d22609a64e0d8bf118472ed26df7#4b48c91d95cc4cd68ee92ae4bd4fac56

What am I missing?

Incorrect use of GetFrameSize function from previous fixed sized sensors, which caused an under allocation of memory.
@matthewspear
Copy link
Collaborator Author

matthewspear commented Sep 6, 2019

Turns out I was using PointCloudSensor as a template and that sensor overrides GetFrameSize() to return GetVariableSize() whereas the EventCameraSensor hust returns a static number for that function...

Atleast its solved now!

- encode width and height of the sensor for serialisation and deserialisation
- remove line logging
- remove memory size logging
Camera sensors (snapdragon / davis) use equidistant distortion, add support within CameraSensor including serialisation / deserialisation.

Note equidistant distortion is made up of 4 parameters but uses the existing type distortion_coefficents_t which is a typealias float[5]. This was used for consistency of the CameraSensor / Builder APIs. The final value of distortion_coefficents_t is ignored when used in an equidistant context.
@matthewspear matthewspear marked this pull request as ready for review September 18, 2019 15:47
- Explicitly define TimeStamp.h header in Event object to ensure it finds the correct class
- Remove unused import in CameraSensorFinder
@mihaibujanca mihaibujanca merged commit bf68a57 into mihaibujanca:master Sep 18, 2019
mihaibujanca pushed a commit that referenced this pull request Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants