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

Untested PriorPose3Ref #619

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/factors/PartialPose3.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,26 @@ function compare(a::PriorPose3ZRP, b::PriorPose3ZRP; tol::Float64=1e-10)
end


"""
$(TYPEDEF)

Prior for vector measurements on Pose3.
"""
Base.@kwdef struct PriorPose3Ref{T<:SamplableBelief} <: IncrementalInference.AbstractPrior
Z::T
ref::SVector{3, Float64}
partial::Tuple{Int,Int,Int} = (4,5,6)
end

getManifold(::PriorPose3Ref) = TranslationGroup(3)

function (cf::CalcFactor{<:PriorPose3Ref})(p_m, p)
n_r = cf.factor.ref
nRp = p.x[2]
n_m = nRp * p_m
return n_r - n_m
Copy link
Member

Choose a reason for hiding this comment

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

Partials must be indicated, and for gravity should only be pitch and roll.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not that simple. Pitch and Roll are not on the same manifold as the parameters or measurement.
I don't know yet how to make it work for the non-parametric solver, that's why no partials.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, what if the sensor is mounted with a pitch of 90 deg?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is where the gradients come in - or info per coord

Copy link
Member

Choose a reason for hiding this comment

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

that is why we are starting with gyro only, and we can get to accels once we are ready to work on them. This can become a rabbit hole of calib, 0vel detect etc. So I say just hold on accels entirely until we are ready for it. I need your help on the application examples please.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think results will be bad without absolute information. I've added partials as I see it.

Copy link
Member

Choose a reason for hiding this comment

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

yep, agree adding gravity alignment will be good, let's just solve the bigger problem of alignments, rotations, and calibrations first. Will start using this factor soon after

end


##==============================================================================
## Partial Pose3 Pose3 Factors
Expand Down