-
Notifications
You must be signed in to change notification settings - Fork 938
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
Fixed doc-comment for robot_state::computeAABB #516
Conversation
The docstring says the format of the vector is `(minx, miny, minz, maxx, maxy, maxz)`, but according to both the method's implementation and use in moveit, the format is rather `(minx, maxx, miny, maxy, minz, maxz)`.
Moreover, looking into updateAABB implementation, it really seems to be wrong. Correct me if I'm missing a hidden assumption, but if I take the "maximal" corner of a box and transform it with an affine transform to a different frame, it no longer holds that this corner has to be the "maximal" in the new coordinate frame. I really think you should check all 8 vertices to be both larger than and lower than the current AABB. |
I have restarted the travis CI check - it seemed to be a failed internet connection.
Could you link to one of both of the implementation source code locations in your description?
I'm not sure the details of this function, but if you propose a change myself (and others) can look it over |
Implementation: https://github.com/ros-planning/moveit/blob/0.9.7/moveit_core/robot_state/src/robot_state.cpp#L2030
|
And this is my code that takes into account all vertices. I'm not sending it as a PR yet, because I just want to know from you if the idea looks correct to you. The piece of code was inspired by updateAABB, but was integrated elsewhere, so it is now using some member variables etc...
|
The docstring says the format of the vector is `(minx, miny, minz, maxx, maxy, maxz)`, but according to both the method's implementation and use in moveit, the format is rather `(minx, maxx, miny, maxy, minz, maxz)`.
The docstring says the format of the vector is `(minx, miny, minz, maxx, maxy, maxz)`, but according to both the method's implementation and use in moveit, the format is rather `(minx, maxx, miny, maxy, minz, maxz)`.
your comment change certainly looks good, picked to J/K While I understand your other proposed fix by description, I don't understand the code you've presented because I've never worked with that part of the code base. Perhaps you could a) propose the change in a clear PR to this current repo b) create unit tests to demonstrate the error c) use visualization to show a transformed object with a transformed AABB that is not correct or d) all of the above :-p thanks for your efforts on this!! |
I did a quick test, and this is the AABB of a PR2. There's definitely something wrong. It is too high and too narrow. Or maybe I did the visualization it in a wrong way. I compute the AABB using this code:
And the visualization is done using joint_state_publisher and robot_state_publisher using the "Center" values for all joints. Is that correct, or is the pose after calling setToDefaultValues different from the "all zeros" pose? |
Description
The docstring says the format of the vector is
(minx, miny, minz, maxx, maxy, maxz)
, but according to both the method's implementation and use in moveit, the format is rather(minx, maxx, miny, maxy, minz, maxz)
.Checklist
Thank you!