Comments (4)
Hi @salihmarangoz,
Thanks for reporting this issue! The problem was due do uninitialized iterators, it should be fixed with #515.
from hpp-fcl.
Could you share a reproducible example please?
from hpp-fcl.
Did some tests:
- Spheres -> ok
- Inflated spheres -> ok
- Spheres + Inflated spheres -> ok
- Spheres + plane -> ok
- Inflated spheres + plane -> segmentation fault
Multiple inflated spheres are ok. But planes don't work together with inflated spheres. Perhaps is there a problem with using the copy constructor of Sphere?
#include <hpp/fcl/shape/geometric_shapes.h>
#include <hpp/fcl/collision.h>
#include <hpp/fcl/broadphase/broadphase.h>
using hpp::fcl::DynamicAABBTreeCollisionManager;
using hpp::fcl::Vec3f;
using hpp::fcl::CollisionObject;
using hpp::fcl::Sphere;
using hpp::fcl::Plane;
int main()
{
DynamicAABBTreeCollisionManager collision_manager;
std::vector<CollisionObject*> collision_objects;
// auto o1 = new CollisionObject(hpp::fcl::make_shared<Sphere>(0.1));
// o1->setTranslation(Vec3f(0.2, 0.1, 0.4));
// o1->computeAABB();
// collision_objects.push_back(o1);
// auto o2 = new CollisionObject(hpp::fcl::make_shared<Sphere>(0.2));
// o2->setTranslation(Vec3f(0.3, 0.2, 0.4));
// o2->computeAABB();
// collision_objects.push_back(o2);
auto o3 = new CollisionObject(hpp::fcl::make_shared<Plane>(0.0, 0.0, 1.0, 0.0));
o3->computeAABB();
collision_objects.push_back(o3);
auto o4 = new CollisionObject(hpp::fcl::make_shared<Sphere>(Sphere(0.05).inflated(0.05).first));
o4->setTranslation(Vec3f(0.1, 0.3, 0.4));
o4->computeAABB();
collision_objects.push_back(o4);
collision_manager.registerObjects(collision_objects);
collision_manager.update();
}
AddressSanitizer output:
AddressSanitizer:DEADLYSIGNAL
=================================================================
==218156==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f5b4ff8df89 bp 0x602000000270 sp 0x7ffd27381ec0 T0)
==218156==The signal is caused by a READ memory access.
==218156==Hint: address points to the zero page.
#0 0x7f5b4ff8df88 in hpp::fcl::detail::HierarchyTree<hpp::fcl::AABB>::bottomup(__gnu_cxx::__normal_iterator<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>**, std::vector<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*, std::allocator<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*> > >, __gnu_cxx::__normal_iterator<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>**, std::vector<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*, std::allocator<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*> > >) include/hpp/fcl/broadphase/detail/hierarchy_tree-inl.h:307
#1 0x7f5b4ff8edd4 in hpp::fcl::detail::HierarchyTree<hpp::fcl::AABB>::topdown_0(__gnu_cxx::__normal_iterator<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>**, std::vector<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*, std::allocator<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*> > >, __gnu_cxx::__normal_iterator<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>**, std::vector<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*, std::allocator<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*> > >) include/hpp/fcl/broadphase/detail/hierarchy_tree-inl.h:397
#2 0x7f5b4ff8f044 in hpp::fcl::detail::HierarchyTree<hpp::fcl::AABB>::init_0(std::vector<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*, std::allocator<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*> >&) include/hpp/fcl/broadphase/detail/hierarchy_tree-inl.h:468
#3 0x7f5b4ff8ab51 in hpp::fcl::detail::HierarchyTree<hpp::fcl::AABB>::init(std::vector<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*, std::allocator<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*> >&, int) include/hpp/fcl/broadphase/detail/hierarchy_tree-inl.h:83
#4 0x7f5b4ff8ab51 in hpp::fcl::DynamicAABBTreeCollisionManager::registerObjects(std::vector<hpp::fcl::CollisionObject*, std::allocator<hpp::fcl::CollisionObject*> > const&) src/broadphase/broadphase_dynamic_AABB_tree.cpp:471
#5 0x555ca7021717 in main (/home/salih/catkin_ws/devel_release/.private/hpp_fcl_issue_514/lib/hpp_fcl_issue_514/hpp_fcl_issue_514_node+0x6717)
#6 0x7f5b4f84c082 in __libc_start_main ../csu/libc-start.c:308
#7 0x555ca7021d3d in _start (/home/salih/catkin_ws/devel_release/.private/hpp_fcl_issue_514/lib/hpp_fcl_issue_514/hpp_fcl_issue_514_node+0x6d3d)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV include/hpp/fcl/broadphase/detail/hierarchy_tree-inl.h:307 in hpp::fcl::detail::HierarchyTree<hpp::fcl::AABB>::bottomup(__gnu_cxx::__normal_iterator<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>**, std::vector<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*, std::allocator<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*> > >, __gnu_cxx::__normal_iterator<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>**, std::vector<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*, std::allocator<hpp::fcl::detail::NodeBase<hpp::fcl::AABB>*> > >)
==218156==ABORTING
from hpp-fcl.
Solved via #515
from hpp-fcl.
Related Issues (20)
- How should I cite this repo? HOT 1
- RuntimeError: Library built without qhull. Cannot build object of this type. HOT 5
- Does this new fcl lib support taking convex object as the leaf node for building BVH model? HOT 4
- Can you share examples and tutorials for calling hpp-fcl in python, especially for robotic arm urdf or .stl? HOT 1
- Segmentation Fault when using with Pinocchio HOT 2
- How to compile in Windows? HOT 2
- Python 3.8 with pip CI step fail HOT 1
- Point inside given shape HOT 1
- Is there any tutorial or demo ?? HOT 2
- Broadphase optimization with Planes/Halfspaces
- Fix cmake export to allow cross-compilation with sysroot HOT 3
- make error: Eigen 'Vector' template error HOT 2
- Support for raycast HOT 8
- TODO: avoid BVH-BVH copy in `collide`?
- TODO: Add `TriangleP` to the distance function matrix
- TODO: rename `nearest_points` to `witness_points` in collision data
- Should we `clear` inside `collide`? HOT 4
- Question About Specific Narrowphase Collision Algorithm HOT 2
- Can broadphase collision detect parallel in different transform scenario? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hpp-fcl.