-
Notifications
You must be signed in to change notification settings - Fork 21
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
Unify pose; Support multi-shape Physx components in SapienPlanningWorld conversion #81
Conversation
This struct is intended to be used only for interfacing with Python. Internally, Pose is converted to and stored as Eigen::Isometry3 which is used by all computations.
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.
Nice! I didn't think it would be such a big effort again. Two things I was wondering
- Floating point error accumulation can de-unitize the quaternion not sure if it will affect result
- How come
Pinocchio
and some other modules are still rockingIsometry
? If it was just missed, I can go ahead and unify all of them in my pass.
|
||
/// @brief Overloading operator * for ``Pose<S> * Pose<S>`` | ||
Pose<S> operator*(const Pose<S> &other) const { | ||
return {q * other.p + p, q * other.q}; |
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 am not super sure if Eigen will keep the resulting quaternion as unit quaternion due to floating point error. This may potentially break your conjugate inverse from above?
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.
Not sure about that too. But I guessed that it won't matter too much as we are using double
instead of float
.
You are certainly welcomed to add unit-tests for this.
Meanwhile will fix the tests. Will be busy this afternoon with classes so might get these done later today |
mplib.Pose
similar tosapien.Pose
but usesfloat64
instead.sapien.Pose
and 4x4 np.ndarray transformation matrix tomplib.Pose
sapien.Pose
/np.ndarray
to any method that requires amplib.Pose
and implicit conversions will jump in so there's no need to callmplib.Pose()
constructor explicitly. (Maybe add tests for these as well?)pyright
's type checking will give error, which is expected and cannot be handled on MPlib side imo.@Lexseal Please review this first and make a separate pull request for updating all examples/tests.
Support for Halfspace is not added here. It will have a separate pull request.