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

Pose3 improvements #1148

Merged
merged 5 commits into from
Mar 27, 2022
Merged

Pose3 improvements #1148

merged 5 commits into from
Mar 27, 2022

Conversation

dellaert
Copy link
Member

  • add Matrix versions of transformTo/From
  • Align, matrix version
  • expose Align in wrapper

Copy link
Collaborator

@varunagrawal varunagrawal left a comment

Choose a reason for hiding this comment

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

Maybe use GEMM?

@dellaert
Copy link
Member Author

Copy link
Contributor

@jerredchen jerredchen left a comment

Choose a reason for hiding this comment

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

After the Eigen broadcasting everything looks good with me.

Copy link
Collaborator

@varunagrawal varunagrawal left a comment

Choose a reason for hiding this comment

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

One docstring needs updating but LGTM

python/gtsam/tests/test_Pose3.py Show resolved Hide resolved
python/gtsam/tests/test_Pose3.py Outdated Show resolved Hide resolved
@@ -354,6 +354,14 @@ Point3 Pose3::transformFrom(const Point3& point, OptionalJacobian<3, 6> Hself,
return R_ * point + t_;
}

Matrix Pose3::transformFrom(const Matrix& points) const {
if (points.rows() != 3) {
throw std::invalid_argument("Pose3:transformFrom expects 3*N matrix.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR, Frank. I personally would find it more intuitive to have (N,3) as input, rather than (3,N).

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 respect that, and realize many will feel that way as it's the numpy way. I don't understand why. Points are column vectors in all texts I know of, and replicating columns is much more natural, e.g., to multiply with matrices as the code above shows. It is also used the convention elsewhere in GTSAM (unless it slipped in somewhere, in which case I'd like to deprecate it).

@dellaert dellaert merged commit c2c54bc into develop Mar 27, 2022
@dellaert dellaert deleted the feature/transformAll branch March 27, 2022 04:24
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.

4 participants