We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When detecting the distance of obj, the example uses the following method::
OcTree<S>* tree = new OcTree<S>(std::shared_ptr<const octomap::OcTree>(test::generateOcTree(resolution))); CollisionObject<S> tree_obj(std::shared_ptr<CollisionGeometry<S>>(tree)); DynamicAABBTreeCollisionManager<S>* manager = new DynamicAABBTreeCollisionManager<S>(); manager->registerObjects(env); manager->setup(); DefaultDistanceData<S> cdata; test::TStruct t1; test::Timer timer1; timer1.start(); manager->octree_as_geometry_collide = false; manager->octree_as_geometry_distance = false; manager->distance(&tree_obj, &cdata, DefaultDistanceFunction); timer1.stop(); t1.push_back(timer1.getElapsedTime());
The specific error I encountered is in the call to the distance function. The relevant function implementation is as follows:
distance
template <typename S> FCL_EXPORT void DynamicAABBTreeCollisionManager<S>::distance(BroadPhaseCollisionManager<S>* other_manager_, void* cdata, DistanceCallBack<S> callback) const { DynamicAABBTreeCollisionManager* other_manager = static_cast<DynamicAABBTreeCollisionManager*>(other_manager_); if((size() == 0) || (other_manager->size() == 0)) return; S min_dist = std::numeric_limits<S>::max(); detail::dynamic_AABB_tree::distanceRecurse(dtree.getRoot(), other_manager->dtree.getRoot(), cdata, callback, min_dist); }
I noticed that S min_dist is initialized as std::numeric_limits<S>::max(). I tried setting this value to 0, and the program seems to run fine.
std::numeric_limits<S>::max()
The text was updated successfully, but these errors were encountered:
it looks like the calculated distance is still wrong.
Sorry, something went wrong.
No branches or pull requests
When detecting the distance of obj, the example uses the following method::
The specific error I encountered is in the call to the
distance
function. The relevant function implementation is as follows:I noticed that S min_dist is initialized as
std::numeric_limits<S>::max()
. I tried setting this value to 0, and the program seems to run fine.The text was updated successfully, but these errors were encountered: