-
Notifications
You must be signed in to change notification settings - Fork 72
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
Missing transform Vector3 operator for Pose3 #153
Comments
We've had some trouble with Unless it's for a class that has a well-established meaning in mathematics, like |
@stefanbuettner , after the comment above, do you still think the operator is needed? |
Either the operator or a function which let's me transform a vector from the pose's frame to the pose's parent frame. Vector3 Pose3::operator*(Vector3 const& p) {
return Matrix4(*this) * p;
} I find the addition and subtraction operators the confusing part. To me the This can also be described by 4x4 matrices. Although I would make it explicit via the Pose3d const table; // w.r.t the world
Pose3d const mug; // w.r.t the table
Vector3d const precomputed_grasp_point; // w.r.t. the mug
// I like both
Vector3d grasp_point = table * mug * precomputed_grasp_point;
Vector3d grasp_point = (table * mug).Transform(precomputed_grasp_point);
// Weird
Vector3d grasp_point = table.Concatenate(mug).Transform(precomputed_grasp_point); Although having a named function for concatenating poses would be weird. But probably just because I'm used to the multiplication operator and see matrices there. |
For what it's worth: I want to second this. Typically you'd name the transformation variables according to their references, e.g.:
Imo. it is exactly the inverse. There is no mathematical meaning to multiplying a 4x4 matrix with a 3x1 vector. Unless it is implicitly assumed that the 4x4 matrix represents a homogeneous transformation matrix, and that the 3x1 vector represents homogeneous coordinates [px; px; pz; 1]. The way it is implemented does imply this assumption. But this is contradictory with the general constructor which allows you to set all coordinates without restrictions. But even if the 4x4 matrix represents a homogeneous transformation matrix: |
Since there is not much of a discussion in the last 3 years and many opinions, let’s just close it. I think it’s not that important. |
Hey there,
is there a reason why there is no
Vector3 operator*(Vector3)
implemented forPose3
? Wouldn't it be rather handy for transforming points between different link/model/joint frames?Cheers,
Stefan
The text was updated successfully, but these errors were encountered: