Comments (5)
As an occasional user of this method I'd appreciate a guaranteed-stable variant, and shuffling the names around makes sense. The iterative version should have a scarier name to indicate it's fallible, though. Maybe also take a max iteration count and return Option
so it's possible to use safely?
from nalgebra.
I have been able to reproduce this.
from nalgebra.
from nalgebra.
So we've had plenty of problems with these construction methods. The crux of the issue, in my opinion, is that they rely on an iterative algorithm with - to my understanding - no guaranteed convergence (don't get fooled by the paper title containing the word "Robust", it is very loosely used).
I think a method with the name from_matrix
should use a provably reliable method. We can have a separate method for a faster iterative variant which users can opt in to. I also think that from_matrix
is not a good name in the first place, because it's not "just" a "from conversion": it attempts to find the closest rotation to the given matrix. I'd suggest something like the following:
- Introduce a method
closest_rotation_to_matrix
which uses a rotationally proper Polar decomposition or similar to guarantee a robust result (barring problems with our SVD ...). - Deprecate
from_matrix
andfrom_matrix_eps
, and instead move the functionality here to separate methodsclosest_rotation_to_matrix_iterative
or something like that.
I didn't think too much about names here. I also don't have a personal stake in this problem so I might have missed some important considerations apparent to users who are running into the problem. A 5 minute literature study turned up this recent paper which upon a cursory scan seems to feature a decent discussion of the problem:
Sarabandi et al., On Closed-Form Formulas for the 3-D Nearest Rotation Matrix Problem
from nalgebra.
There's some more in-depth discussion of the current implementation in this merged PR from earlier this year: #1101.
from nalgebra.
Related Issues (20)
- [bug] Reshape does not work with views HOT 2
- Implement Default for all matrix types in `nalgebra` and `nalgebra-sparse` HOT 2
- Is there a plan for stable/1.0 version, or at least LTS? HOT 12
- LAPACK General Error Handling
- v0.32.1 doesnt compile for me HOT 1
- Function that converts `Matrix1` into just item? HOT 3
- `Matrix::svd(...)` produces different singular values depending on whether singular vectors are computed HOT 1
- Clarify needed features for examples in `nalgebra-sparse` reference docs
- SVD fails to order singular values for 3x3 matrix HOT 2
- Confusing documentation on `strides` HOT 2
- Matrix::variance() incorrect results when all elements are the same HOT 4
- Perspective matrix for Vulkan HOT 1
- Incorrect statement about assignment for matrix views in user guide HOT 4
- How to obtain a square matrix of the diagonal elements and 0 ?
- Provide a `RowDVectorView` for `RowDVector`s similar to `DVectorView` for `DVectors` HOT 2
- Converting between View and Storage is not behaving as expected HOT 1
- (Feature request) Swing Twist Decomposition
- Clarify angle units in the documentation HOT 2
- Pretty printing of dynamically-sized vectors and matrices in debuggers HOT 5
- Proposal: Provide nalgebra wrappers to `faer` factorizations HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nalgebra.