-
Notifications
You must be signed in to change notification settings - Fork 420
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
Wrong closest points between shapes (box, sphere, cylinder) in distance computations #127
Comments
Should the z coordinate of the point on the box in local coordinates be |
Yes, you are correct, that was a typo. In any case, the point returned from the function makes no sense. I noticed another thing. For a generic box fcl::Box box1(dimx, dimy, dimz) the point returned on the box is always a triplet [x, y, z] where:
|
This should be resolved by the changes in #215. |
Hi, I am doing some distance calculations using ROS and MoveIt with the package ros-indigo-fcl however the nearest points are still wrong. Will the ros-indigo package be updated to the changes ? |
Has this been fixed? When using box primitive, nearest point is the closest vertex of the box which is not accurate. |
/cc @SeanCurtis-TRI Do you know if this is fixed? |
Sadly, I haven't spelunked into the distance query yet, so I have no certain knowledge one way or the other. |
I have been playing around with FCL to compute the distance between geometric shapes (e.g. boxes, cylinders and spheres) to test some simple collision avoidance methods.
For this purpose I am using the method.
FCL_REAL distance(const CollisionObject* o1, const CollisionObject* o2, const DistanceRequest& request, DistanceResult& result)
The method returns not only the distance between the two collision objects but also the nearest points, one per object. While the distance is correct the nearest points appear to be wrong.
More specifically, it seems that the nearest point is correct only for sphere objects, but not for the other shape geometries.
Here is a quick example to reproduce this error. In this example I am only checking the distance between a sphere of radius 1 placed in (0.0, 0.0, 0.0) and a box of dimensions (10, 2, 10) and placed in (0.0, 5.0, 3.0).
The output on screen is
distance = 3
point on sphere: x = 1.58946e-07 y = 1 z = 0
point on box: x = -5 y = -1 z = 0
The distance and the point on the sphere are correct, but the point on the box in local coordinates should be x =0, y=-1, z = -2.
As I already mentioned, this same behaviour happens also with the other geometric primitives.
So, is this behaviour a bug in the library or am I doing something wrong? If it is a bug, is there any way to bypass the problem and retrieve the nearest points?
The text was updated successfully, but these errors were encountered: