-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fixes and tests on PartialPose3, Bearing, and BearingRange Factors #509
Conversation
ah, think the issue with the new factor residual function is that R[1:2,1:2] rotation matrix parts contain more than just the yaw angle. That 2x2 segment also contains information from pitch and roll. |
You might be correct. I just followed the previous factor, but can have another look. |
Hi Johan, this is probably still not 100%, but hopefully closer:
EDIT, best to run the residual in SE(2), however, note that all three Lie exp rotation coordinates will be affected, so the partial needs to involve for XYYaw = EDIT2: the main issue is which reference frame should XYYaw work in? The assumption is this |
Hi @dehann. As far as I can tell, I missed the projection part to make sure the SE(2) points are on the manifold. |
Co-authored-by: Dehann Fourie <dehann@users.noreply.github.com>
Fix (or try to) Pose3Pose3XYYaw
test/testPartialPose3.jl
Outdated
## | ||
|
||
# ensure the newly updated values match what is specified in mu2 | ||
@show mu2 # mu2 is used for XYYaw | ||
# trying to compare world and body frame values -- not right! | ||
@show Statistics.mean(pts[newdims,:],dims=2) | ||
@test_broken sum(abs.(Statistics.mean(pts[newdims,:],dims=2)-mu2) .< [1.5;1.5;0.3]) == 3 | ||
|
||
# ensure a re-evaluation of the partial factor updates the partial variable dimensions correclty | ||
@test norm(X2pts[newdims,:] - pts[newdims,:]) < 1.0 | ||
|
||
# ensure that memory pointers are working correctly | ||
memcheck = getVal(v2) | ||
# @test norm(X2pts - memcheck) < 1e-10 | ||
|
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.
These looks outdated as pts no longer exists
Should have probably done BearingRange fix in a new branch, but it just reverts back to when it last worked. It should be correct now and we can update and make sure it still passes the tests. |
Potential bug remains in partials |
I'm happy to merge this and do further improvements in new PRs. CI failures are intermittent numerical failures. |
cool thanks! I was looking at bearing tests yesterday and trying to see if there is a bug or shortcoming in IIF, but wasn't yet able to pin down either way yet. Think we're close to tagging IIF. |
Probably easiest to use
Rotations.RotXY
or something similar? Issue is the test script was written assuming the coordinates for rotation are Euler angles -- this is probably no longer true, as more general SE(n) objects are now being used.