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

Add planar trifocal tensor #1094

Draft
wants to merge 32 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
18b4036
Finish 4.2a1
dellaert Jan 5, 2022
d6f3468
Merge pull request #1024 from borglab/release/4.2a2
dellaert Jan 10, 2022
76c7419
Merge pull request #1041 from borglab/release/4.2a3
dellaert Jan 17, 2022
d6edcea
Merge pull request #1073 from borglab/release/4.2a4
dellaert Jan 28, 2022
5dc5845
Merge branch 'master' of https://github.com/Hal-Zhaodong-Yang/gtsam i…
Hal-Zhaodong-Yang Feb 1, 2022
049e5d7
Planar Trifocal Tensor
Hal-Zhaodong-Yang Feb 1, 2022
3eda4cd
Merge branch 'develop' of github.com:Hal-Zhaodong-Yang/gtsam into tri…
akshay-krishnan Feb 4, 2022
a0b4dab
Add header file, API
akshay-krishnan Feb 4, 2022
e2e3e40
rename test file
akshay-krishnan Feb 4, 2022
719135c
add trifocal tensor class cpp file
Hal-Zhaodong-Yang Feb 5, 2022
b97fa7a
add transform
Hal-Zhaodong-Yang Feb 5, 2022
87bc39c
change constructor from const to non-const
Hal-Zhaodong-Yang Feb 5, 2022
92d60a0
fixed some bugs
Hal-Zhaodong-Yang Feb 5, 2022
e69490e
fixed some bugs
Hal-Zhaodong-Yang Feb 5, 2022
8aaebb4
Update implementations, builds now
akshay-krishnan Feb 5, 2022
df359c0
update test
akshay-krishnan Feb 5, 2022
b073fcb
fixed some bugs
Hal-Zhaodong-Yang Feb 5, 2022
f6d8cf5
Fixed the bugs and now the tests for trifocal tensor passed
Hal-Zhaodong-Yang Feb 6, 2022
98bdb49
Changed some format and added some comments
Hal-Zhaodong-Yang Feb 9, 2022
3d26c56
Changed some format and added some comments
Hal-Zhaodong-Yang Feb 9, 2022
2743031
Changed some comments
Hal-Zhaodong-Yang Feb 9, 2022
9eaaa0c
Changed some comments
Hal-Zhaodong-Yang Feb 9, 2022
0f0096d
update documentation, move accessor definitions to header
akshay-krishnan Feb 9, 2022
0df9836
throw invalid arg exception
akshay-krishnan Feb 9, 2022
a516b5f
remove debug print statements
akshay-krishnan Feb 9, 2022
62b4df4
remove debug statements in test
akshay-krishnan Feb 9, 2022
b5aade6
add file level comment in test
akshay-krishnan Feb 25, 2022
2bf85c5
create test data, update test doc
akshay-krishnan Feb 25, 2022
e2423e7
change measurement constructor to static method
akshay-krishnan Feb 26, 2022
5d2a3c2
add unit test for Jacobian of trifocal tensor
Hal-Zhaodong-Yang Feb 26, 2022
6cbde53
define constructor from matrices
akshay-krishnan Feb 26, 2022
2031ad1
Merge branch 'trifocal' of github.com:Hal-Zhaodong-Yang/gtsam into tr…
akshay-krishnan Feb 26, 2022
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
Prev Previous commit
Next Next commit
fixed some bugs
  • Loading branch information
Hal-Zhaodong-Yang committed Feb 5, 2022
commit 92d60a0aafdea34155a836c31e9c95dc88ce8520
36 changes: 18 additions & 18 deletions gtsam/geometry/TrifocalTensor2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ TrifocalTensor2::TrifocalTensor2(const std::vector<Rot2>& bearings_u,
const std::vector<Rot2>& bearings_v,
const std::vector<Rot2>& bearings_w) {
int i = 0;
gtsam::Matrix(bearing_u.size(), 8) system_matrix;
for (int i = 0; i < bearing_u.size(); i++) {
system_matrix(i, 0) = bearings_u.c() * bearings_v.c() * bearings_w.c();
system_matrix(i, 1) = bearings_u.c() * bearings_v.c() * bearings_w.s();
system_matrix(i, 2) = bearings_u.c() * bearings_v.s() * bearings_w.c();
system_matrix(i, 3) = bearings_u.c() * bearings_v.s() * bearings_w.s();
system_matrix(i, 4) = bearings_u.s() * bearings_v.c() * bearings_w.c();
system_matrix(i, 5) = bearings_u.s() * bearings_v.c() * bearings_w.s();
system_matrix(i, 6) = bearings_u.s() * bearings_v.s() * bearings_w.c();
system_matrix(i, 7) = bearings_u.s() * bearings_v.s() * bearings_w.s();
Matrix system_matrix(bearings_u.size(), 8);
for (int i = 0; i < bearings_u.size(); i++) {
system_matrix(i, 0) = bearings_u[i].c() * bearings_v[i].c() * bearings_w[i].c();
system_matrix(i, 1) = bearings_u[i].c() * bearings_v[i].c() * bearings_w[i].s();
system_matrix(i, 2) = bearings_u[i].c() * bearings_v[i].s() * bearings_w[i].c();
system_matrix(i, 3) = bearings_u[i].c() * bearings_v[i].s() * bearings_w[i].s();
system_matrix(i, 4) = bearings_u[i].s() * bearings_v[i].c() * bearings_w[i].c();
system_matrix(i, 5) = bearings_u[i].s() * bearings_v[i].c() * bearings_w[i].s();
system_matrix(i, 6) = bearings_u[i].s() * bearings_v[i].s() * bearings_w[i].c();
system_matrix(i, 7) = bearings_u[i].s() * bearings_v[i].s() * bearings_w[i].s();
}

gtsam::Matrix U, S, V;
Expand All @@ -32,13 +32,13 @@ TrifocalTensor2::TrifocalTensor2(const std::vector<Rot2>& bearings_u,
}
}

Rot2 transform(const Rot2& vZp, const Rot2& wZp) const{
Rot2 uZp;
Vector2 v_measurement, w_measurement;
v_measurement << vZp.c(), vZp.s();
w_measurement << wZp.c(), wZp.s();
uZp = Rot2.atan(trans(v_measurement) * matrix0_ * w_measurement, - trans(v_measurement) * matrix1_ * w_measurement);
return uZp;

Rot2 transform(const Rot2& vZp, const Rot2& wZp) const {
Rot2 uZp;
Vector2 v_measurement, w_measurement;
v_measurement << vZp.c(), vZp.s();
w_measurement << wZp.c(), wZp.s();
uZp = Rot2.atan(trans(v_measurement) * matrix0_ * w_measurement,
-trans(v_measurement) * matrix1_ * w_measurement);
return uZp;
}
} // namespace gtsam