|
From: MUKHTAR G. R. <gha...@gm...> - 2017-01-27 08:49:25
|
Well, I manage to tackle my issues, just for future users that might run in those problems I have several pointers that might be relevant. 1. Regarding the problem with OMPL version 1.2 and its compatibility with ros indigo moveit I replaced the fix given here <https://groups.google.com/forum/#!topic/moveit-users/VPUhA46UkR4> by the building against a catkenized ompl for ros indigo that I found here <https://github.com/DavidB-CMU/OMPL_catkin_pkg/tree/master/ompl> where all shared pointers have been changed directly into boost::shared_ptr. But anyway this was not the cause of my segfault, because I kept getting it. 2. After following the error trace I found that the genesis of the error comes from passing an empty ompl::base::state to some other planning functions (there are several of them) so I added a couple of tests in all relevant places and now I can run the planning for 100 thousands iteration and more. But I don't know why those empty states were coming, may it is my naive implementation of the thunder frame work (I am new to this). As example of the places where I inserted the test of the ompl::base::state: - For example the error related to FCL comes from the fact that when the program tries to validate a sampled state in (ompl::base::UniformValidStateSampler::sample(*state) ) and the state is empty it gives this segfault. So I added a simple if() condition to verify that the state isn't NULL before calling the validation. - Another example is in ompl::base::PlannerInputStates::nextStart() after calling the problem definition member (getStartState()) sometimes it returns empty states, so I verify there also. - In general you can follow the segfault by running your node with a gdb debugger. Cheers! On Fri, Jan 20, 2017 at 3:54 PM, MUKHTAR GHANIM RIDAELDIN < gha...@gm...> wrote: > So regarding the question above, I found out that when I disable the > "state validity check" part, everything works fine and the database is > produced. And I can reuse the produced data to plan for the baxter arm > around (look at the attached files: "generate_baxter_database.cpp" produce > the database for the planner, and "test_baxter_database.cpp" uses it to > move the arm via a movegroup class) but what I noticed is that this way the > produced solutions later aren't always collision free and if I activate the > "state validity check" in "test_baxter_database.cpp" then again after some > iterations I got a segmentation fault. > > Any ideas of how to correctly set this validity checker? > > Cheers! > > On Wed, Jan 18, 2017 at 6:12 PM, MUKHTAR GHANIM RIDAELDIN < > gha...@gm...> wrote: > >> *Hi all,* >> >> *I am trying to use the "Thunder frame work" with moveit! under ubuntu >> 14.04 and ros indigo. So I had to install everything from source to make it >> work. You can see all the details of problems I faced and how I worked >> around them here >> <https://groups.google.com/forum/#!topic/moveit-users/VPUhA46UkR4>, now >> everything works and I am trying to build a database for my robot "Baxter" >> using the attached code and launch file. The problem is that after some >> iterations I always get a Segmentation fault, and it is random, for example >> this one:* >> >> Program received signal SIGSEGV, Segmentation fault. >> [Switching to Thread 0x7fffdcb73700 (LWP 13212)] >> 0x00007ffff7ba092c in ompl_interface::ModelBasedStat >> eSpace::copyState(ompl::base::State*, ompl::base::State const*) const () >> from /home/ghanim/ws_moveit/devel/.private/moveit_planners_ompl/l >> ib/libmoveit_ompl_interface.so.0.7.3 >> (gdb) bt >> #0 0x00007ffff7ba092c in ompl_interface::ModelBasedStat >> eSpace::copyState(ompl::base::State*, ompl::base::State const*) const () >> from /home/ghanim/ws_moveit/devel/.private/moveit_planners_ompl/l >> ib/libmoveit_ompl_interface.so.0.7.3 >> #1 0x00007ffff7555368 in ompl::base::StateSpace::cloneState(ompl::base::State >> const*) const () from /home/ghanim/ws_moveit/devel/l >> ib/x86_64-linux-gnu/libompl.so.12 >> #2 0x00007ffff78195b7 in ompl::geometric::SPARSdb::find >> GraphNeighbors(ompl::base::State const*, std::vector<unsigned long, >> std::allocator<unsigned long> >&) () from /home/ghanim/ws_moveit/devel/l >> ib/x86_64-linux-gnu/libompl.so.12 >> #3 0x00007ffff7821062 in ompl::geometric::SPARSdb::getSimilarPaths(int, >> ompl::base::State const*, ompl::base::State const*, >> ompl::geometric::SPARSdb::CandidateSolution&, >> ompl::base::PlannerTerminationCondition const&) () >> from /home/ghanim/ws_moveit/devel/lib/x86_64-linux-gnu/libompl.so.12 >> #4 0x00007ffff782419d in ompl::tools::ThunderDB::findNearestStartGoal(int, >> ompl::base::State const*, ompl::base::State const*, >> ompl::geometric::SPARSdb::CandidateSolution&, >> ompl::base::PlannerTerminationCondition const&) () >> from /home/ghanim/ws_moveit/devel/lib/x86_64-linux-gnu/libompl.so.12 >> #5 0x00007ffff7726d1a in ompl::geometric::ThunderRetrie >> veRepair::solve(ompl::base::PlannerTerminationCondition const&) () from >> /home/ghanim/ws_moveit/devel/lib/x86_64-linux-gnu/libompl.so.12 >> #6 0x00007ffff7801085 in ompl::tools::ParallelPlan::solveOne(ompl::base::Planner*, >> unsigned long, ompl::base::PlannerTerminationCondition const*) () from >> /home/ghanim/ws_moveit/devel/lib/x86_64-linux-gnu/libompl.so.12 >> #7 0x00007ffff5102c30 in ?? () from /usr/lib/x86_64-linux-gnu/libs >> tdc++.so.6 >> #8 0x00007ffff55f7184 in start_thread (arg=0x7fffdcb73700) at >> pthread_create.c:312 >> #9 0x00007ffff4b9037d in clone () at ../sysdeps/unix/sysv/linux/x86 >> _64/clone.S:111 >> >> >> *This is another one:* >> >> Program received signal SIGSEGV, Segmentation fault. >> 0x00007fffeeec5e96 in fcl::HierarchyTree<fcl::AABB>: >> :bottomup(__gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >, __gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >) () from /opt/ros/indigo/lib/libfcl.so >> (gdb) bt >> #0 0x00007fffeeec5e96 in fcl::HierarchyTree<fcl::AABB>: >> :bottomup(__gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >, __gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >) () from /opt/ros/indigo/lib/libfcl.so >> #1 0x00007fffeeec7c65 in fcl::HierarchyTree<fcl::AABB>: >> :topdown_0(__gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >, __gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >) () from /opt/ros/indigo/lib/libfcl.so >> #2 0x00007fffeeec7c21 in fcl::HierarchyTree<fcl::AABB>: >> :topdown_0(__gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >, __gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >) () from /opt/ros/indigo/lib/libfcl.so >> #3 0x00007fffeeec7c0f in fcl::HierarchyTree<fcl::AABB>: >> :topdown_0(__gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >, __gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >) () from /opt/ros/indigo/lib/libfcl.so >> #4 0x00007fffeeec7c0f in fcl::HierarchyTree<fcl::AABB>: >> :topdown_0(__gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >, __gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >) () from /opt/ros/indigo/lib/libfcl.so >> #5 0x00007fffeeec7c0f in fcl::HierarchyTree<fcl::AABB>: >> :topdown_0(__gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >, __gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >) () from /opt/ros/indigo/lib/libfcl.so >> #6 0x00007fffeeec7c0f in fcl::HierarchyTree<fcl::AABB>: >> :topdown_0(__gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >, __gnu_cxx::__normal_iterator<fcl::NodeBase<fcl::AABB>**, >> std::vector<fcl::NodeBase<fcl::AABB>*, std::allocator<fcl::NodeBase<fcl::AABB>*> >> > >) () from /opt/ros/indigo/lib/libfcl.so >> #7 0x00007fffeeec8331 in fcl::HierarchyTree<fcl::AABB>: >> :init_0(std::vector<fcl::NodeBase<fcl::AABB>*, >> std::allocator<fcl::NodeBase<fcl::AABB>*> >&) () from >> /opt/ros/indigo/lib/libfcl.so >> #8 0x00007fffeeec4df3 in fcl::DynamicAABBTreeCollisionM >> anager::registerObjects(std::vector<fcl::CollisionObject*, >> std::allocator<fcl::CollisionObject*> > const&) () from >> /opt/ros/indigo/lib/libfcl.so >> #9 0x00007ffff2382d86 in collision_detection::FCLObject >> ::registerTo(fcl::BroadPhaseCollisionManager*) () from >> /home/ghanim/ws_moveit/devel/.private/moveit_core/lib/libmov >> eit_collision_detection_fcl.so.0.7.3 >> #10 0x00007ffff2391cad in collision_detection::Collision >> RobotFCL::checkSelfCollisionHelper(collision_detection::CollisionRequest >> const&, collision_detection::CollisionResult&, moveit::core::RobotState >> const&, collision_detection::AllowedCollisionMatrix const*) const () >> from /home/ghanim/ws_moveit/devel/.private/moveit_core/lib/libmov >> eit_collision_detection_fcl.so.0.7.3 >> #11 0x000000000043ccd4 in isStateValid(ompl::base::State const*, >> boost::shared_ptr<moveit::core::RobotModel>&, >> boost::shared_ptr<ompl_interface::ModelBasedPlanningContext>&) () >> #12 0x00007ffff756c4bf in ompl::base::SpaceInformation:: >> setStateValidityChecker(std::function<bool (ompl::base::State const*)> >> const&)::FnStateValidityChecker::isValid(ompl::base::State const*) const >> () >> from /home/ghanim/ws_moveit/devel/lib/x86_64-linux-gnu/libompl.so.12 >> #13 0x00007ffff7583e85 in ompl::base::DiscreteMotionVali >> dator::checkMotion(ompl::base::State const*, ompl::base::State const*) >> const () from /home/ghanim/ws_moveit/devel/l >> ib/x86_64-linux-gnu/libompl.so.12 >> #14 0x00007ffff7784be6 in ompl::geometric::PathSimplifie >> r::collapseCloseVertices(ompl::geometric::PathGeometric&, unsigned int, >> unsigned int) () from /home/ghanim/ws_moveit/devel/l >> ib/x86_64-linux-gnu/libompl.so.12 >> #15 0x00007ffff7786933 in ompl::geometric::PathSimplifie >> r::simplify(ompl::geometric::PathGeometric&, >> ompl::base::PlannerTerminationCondition const&) () from >> /home/ghanim/ws_moveit/devel/lib/x86_64-linux-gnu/libompl.so.12 >> #16 0x00007ffff7786c14 in ompl::geometric::PathSimplifie >> r::simplify(ompl::geometric::PathGeometric&, double) () from >> /home/ghanim/ws_moveit/devel/lib/x86_64-linux-gnu/libompl.so.12 >> #17 0x00007ffff77793b6 in ompl::geometric::SimpleSetup::simplifySolution(double) >> () from /home/ghanim/ws_moveit/devel/lib/x86_64-linux-gnu/libompl.so.12 >> #18 0x000000000043b6ee in main () >> >> >> *So I am wondering about what could be the problem exactly? * >> >> *Thanks for your help * >> >> *Cheers!* >> > > |