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

Removed the use of zeroTangentVector from PinholeCamera #262

Merged
merged 1 commit into from
Jan 19, 2021
Merged

Removed the use of zeroTangentVector from PinholeCamera #262

merged 1 commit into from
Jan 19, 2021

Conversation

acoadmarmon
Copy link
Collaborator

@dan-zheng I've manually implemented the zeroTangentVector functionality for the CameraCalibration object and Cal3_S2 which inherets it. I've run the suite of tests and it works well.

There is still one instance of zeroTangentVector that is being used in the codebase at

return pullback(at: v.zeroTangentVector, in: { self.Adjoint($0) })(v)
that I've had some trouble replacing, but I'll work on it as well. All other uses in the codebase are not being used as Richard Wei mentioned in his issue.

Let me know your thoughts on the current implementation, as well as if you have suggestions on removing the LieGroup zeroTangentVector.

Copy link
Collaborator

@dan-zheng dan-zheng left a comment

Choose a reason for hiding this comment

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

Thank you Andrew! Looks good to me if tests pass and correctness is unaffected.

@dan-zheng
Copy link
Collaborator

I'll go ahead and merge, assuming that tests pass and correctness is unaffected.

@dan-zheng dan-zheng merged commit 58a29e7 into borglab:main Jan 19, 2021
@dan-zheng
Copy link
Collaborator

dan-zheng commented Jan 19, 2021

There is still one instance of zeroTangentVector that is being used in the codebase at

return pullback(at: v.zeroTangentVector, in: { self.Adjoint($0) })(v)

that I've had some trouble replacing, but I'll work on it as well. All other uses in the codebase are not being used as Richard Wei mentioned in his issue.

Thanks for mentioning this. @acoadmarmon: do you have ideas and time to fix this remaining zeroTangentVector usage?

I think it should be possible by adding some conformance requirement on LieGroupCoordinate.LocalCoordinate (protocol requirement inherited from ManifoldCoordinate.LocalCoordinate) to a new protocol like DifferentiableHasInstanceZeroTangentVector (not great name) that refines Differentiable with an additional requirement var zeroTangentVector: TangentVector.

Pinging others in case they have time and see a better solution: @marcrasi @dabrahams @rxwei

@acoadmarmon
Copy link
Collaborator Author

@dan-zheng I can work on this but it will take a few days given my current to-do list and the added complexity of changing zeroTangentVector for this object. Since this seems to be a blocker for another issue, if anyone has time to fix this in the shorter term I'd defer to them. I'll pick this back up on Sunday if it hasn't been solved by then.

@dan-zheng
Copy link
Collaborator

Thanks for the quick update Andrew! Unless anyone (@rxwei) has higher urgency, I think fixing the remaining zeroTangentVector usage whenever you have time sounds great.

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