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

Fixed Seg Fault in getImuToCameraExtrinsics #156

Merged
merged 3 commits into from
Jun 16, 2021

Conversation

saching13
Copy link
Contributor

@saching13 saching13 commented Jun 11, 2021

Addresses #155

Copy link
Collaborator

@themarpe themarpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I presume segfault happened becasue of line 347, accessing tranformationMatrix which is empty?

If thats the case, please place a check there as well, could be empty in different cases.

Same applies to other places

src/device/CalibrationHandler.cpp Outdated Show resolved Hide resolved
@saching13
Copy link
Contributor Author

saching13 commented Jun 11, 2021

I presume segfault happened becasue of line 347, accessing tranformationMatrix which is empty?

If thats the case, please place a check there as well, could be empty in different cases.

Same applies to other places

std::vector<std::vector<float>> transformationMatrix = eepromData.imuExtrinsics.rotationMatrix;
The transformation matrix is a copy of the rotation matrix. So it will be empty only when rotation matrix is empty. And rotation matrix will be either empty or have 3x3 always.
Added to computeExtrinsicMatrix also. But I think it reach that point only if user writes to EEPROM their own custom one and misses to add the rotationMatrix.

@saching13 saching13 requested a review from themarpe June 11, 2021 17:06
@Luxonis-Brandon Luxonis-Brandon added the Gen2 Feature for or issue with Gen2 label Jun 11, 2021
src/device/CalibrationHandler.cpp Show resolved Hide resolved
@saching13 saching13 merged commit 4b5010d into develop Jun 16, 2021
@saching13 saching13 deleted the gen2-imu-extrinsic-fix branch June 16, 2021 19:49
Gen2 Phase II Efforts automation moved this from Bugs to Done Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gen2 Feature for or issue with Gen2
Development

Successfully merging this pull request may close these issues.

None yet

3 participants