-
Notifications
You must be signed in to change notification settings - Fork 94
Added constrained uniform sampling of angles for SE3, SO3, and Quaternions #139
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
Added constrained uniform sampling of angles for SE3, SO3, and Quaternions #139
Conversation
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.
The code looks good to me, I just found some typos in the comments.
@neshed-bdai Fixed all typos mentioned. Thanks for the catch. Spell checker turned off when my VSCode updated. |
spatialmath/base/quaternions.py
Outdated
|
||
_eps = np.finfo(np.float64).eps | ||
|
||
_NUMBER_CDF_SIN_SQUARED_INTERP_POINTS = 256 |
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.
I'd make these optional arguments to the _compute_cdf_sin_squared
function with 256 default and compute the next one in the function?
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.
Does this result in fixed, discrete number of orientations you can get?
Change Overview
Added constrained uniform sampling of angles for SE3, SO3, and Quaternions based. Samling respects the distribution of orientations at different magnitudes and samples accordingly using the analytical CDF and Inverse Transform Sampling. Interpolation is used for fast inverses of the CDF. Derivation of CDF can be found here: Uniform_Rotation_Distributions.pdf.
Testing Done
Pose based unit tests pass.
Empirically checked distribution against rejection sampling.


