aria-systems-group / Multi-Robot-OMPL

Our implementation of Kinodynamic Conflict Based Search (K-CBS) inside the The Open Motion Planning Library (OMPL)
Other
13 stars 5 forks source link

Installation for K-CBS #12

Open cshr25 opened 1 month ago

cshr25 commented 1 month ago

HI I was trying to run K-CBS demo, after cmake this repository, I ran the install-ompl-ubuntu.sh and OMPL seemed to be installed. But when I tried to make in K-CBS demo, it informed me that <ompl/multirobot/control/SpaceInformation.h> can't be found. I checked the ompl folder and there is no multirobot folder in it. What is the problem? Thank you!

JustinKottinger commented 1 month ago

Hi @cshr25,

Thank you for reaching out. The install-ompl-ubuntu.sh script is from the the original OMPL library from which this codebase is forked from. The script clones the OMPL repository from Github and builds it locally.

Screenshot 2024-09-27 at 6 32 21 AM

Since this repository is not part of that original one, it will not be built when running that script. You'll instead need to install this repository the old fashioned way:

mkdir -p build/Release
cd build/Release
cmake ../..
make -j 4 # replace "4" with the number of cores on your machine for a faster build
make install # install the library to use with K-CBS-Demos

Be sure to install the list of dependencies for OMPL prior to building the code. I should also mention that I have not written python bindings for the multirobot/ directory so you will need to use the C++ API's.

Give this a shot and let me know if you have any issues.

cshr25 commented 1 month ago

Hi Justin, thank you so much! Sorry I am completely unfamiliar with the make process. I successfully installed the branched OMPL. But when I tried to make K-CBS demo, I got a build error:

[ 3%] Building CXX object CMakeFiles/demo_Benchmark_Congested10x10_7robots_dyn2ndOrderCars.dir/src/demo_Benchmark_Congested10x10_7robots_dyn2ndOrderCars.cpp.o In file included from /home/cidi/KCBS/K-CBS-Demos/src/demo_Benchmark_Congested10x10_7robots_dyn2ndOrderCars.cpp:44: /home/cidi/KCBS/K-CBS-Demos/includes/SystemMergerDatabase.h: In constructor ‘homogeneous2ndOrderCarSystemMerger::homogeneous2ndOrderCarSystemMerger(const SpaceInformationPtr&, ompl::multirobot::base::ProblemDefinitionPtr, std::unordered_map<std::cxx11::basic_string, Robot>, std::set<Obstacle>, unsigned int, std::map<std::__cxx11::basic_string, std::pair<double, double> >, std::map<std::cxx11::basicstring, std::pair<double, double> >)’: /home/cidi/KCBS/K-CBS-Demos/includes/SystemMergerDatabase.h:53:139: error: no matching function for call to ‘ompl::multirobot::control::SystemMerger::SystemMerger(const SpaceInformationPtr&, const ProblemDefinitionPtr&)’ cles(obstacles), bound_(spacebound), starts(startmap), goals(goal_map) {}; ^

In file included from /usr/local/include/ompl-1.6/ompl/multirobot/control/SpaceInformation.h:42, from /home/cidi/KCBS/K-CBS-Demos/includes/SystemMergerDatabase.h:39, from /home/cidi/KCBS/K-CBS-Demos/src/demo_Benchmark_Congested10x10_7robotsdyn2ndOrderCars.cpp:44: /usr/local/include/ompl-1.6/ompl/multirobot/control/SystemMerger.h:68:17: note: candidate: ‘ompl::multirobot::control::SystemMerger::SystemMerger(const SpaceInformationPtr&)’ SystemMerger(const SpaceInformationPtr &si) : si(si) ^~~~ /usr/local/include/ompl-1.6/ompl/multirobot/control/SystemMerger.h:68:17: note: candidate expects 1 argument, 2 provided /usr/local/include/ompl-1.6/ompl/multirobot/control/SystemMerger.h:64:19: note: candidate: ‘ompl::multirobot::control::SystemMerger::SystemMerger(const ompl::multirobot::control::SystemMerger&)’ class SystemMerger ^~~~ /usr/local/include/ompl-1.6/ompl/multirobot/control/SystemMerger.h:64:19: note: candidate expects 1 argument, 2 provided /usr/local/include/ompl-1.6/ompl/multirobot/control/SystemMerger.h:64:19: note: candidate: ‘ompl::multirobot::control::SystemMerger::SystemMerger(ompl::multirobot::control::SystemMerger&&)’ /usr/local/include/ompl-1.6/ompl/multirobot/control/SystemMerger.h:64:19: note: candidate expects 1 argument, 2 provided In file included from /home/cidi/KCBS/K-CBS-Demos/src/demo_Benchmark_Congested10x10_7robots_dyn2ndOrderCars.cpp:44: /home/cidi/KCBS/K-CBS-Demos/includes/SystemMergerDatabase.h: In member function ‘virtual std::pair<const std::shared_ptr, const std::sharedptr > homogeneous2ndOrderCarSystemMerger::merge(int, int) const’: /home/cidi/KCBS/K-CBS-Demos/includes/SystemMergerDatabase.h:92:17: error: ‘pdef’ was not declared in this scope pdef_->getIndividual(idx)->clearSolutionPaths(); ^~~~~ In file included from /usr/include/boost/geometry/geometries/point.hpp:26, from /usr/include/boost/geometry/geometries/geometries.hpp:17, from /home/cidi/KCBS/K-CBS-Demos/includes/Robot.h:38, from /home/cidi/KCBS/K-CBS-Demos/src/demo_Benchmark_Congested10x10_7robots_dyn2ndOrderCars.cpp:37: /usr/include/boost/geometry/strategies/within.hpp: In instantiation of ‘struct boost::geometry::strategy::within::services::default_strategy<boost::geometry::model::d2::point_xy, boost::geometry::model::d2::point_xy, boost::geometry::point_tag, boost::geometry::point_tag, boost::geometry::pointlike_tag, boost::geometry::pointlike_tag, boost::geometry::cartesian_tag, boost::geometry::cartesian_tag>’: /usr/include/boost/geometry/strategies/relate.hpp:68:8: required from ‘struct boost::geometry::strategy::point_in_geometry::services::default_strategy<boost::geometry::model::d2::point_xy, boost::geometry::model::d2::point_xy, boost::geometry::point_tag, boost::geometry::point_tag>’ /usr/include/boost/geometry/strategies/relate.hpp:100:8: required from ‘struct boost::geometry::strategy::relate::detail::default_point_in_geometry_strategy<boost::geometry::model::d2::point_xy, boost::geometry::model::d2::point_xy >’ /usr/include/boost/geometry/strategies/relate.hpp:132:8: required from ‘struct boost::geometry::strategy::relate::services::default_strategy<boost::geometry::model::d2::point_xy, boost::geometry::model::d2::point_xy, 0, 0>’ /usr/include/boost/geometry/strategies/disjoint.hpp:45:8: required from ‘struct boost::geometry::strategy::disjoint::services::default_strategy<boost::geometry::model::d2::point_xy, boost::geometry::model::d2::point_xy, boost::geometry::point_tag, boost::geometry::point_tag, 0, 0, boost::geometry::cartesian_tag, boost::geometry::cartesian_tag>’ /usr/include/boost/geometry/algorithms/detail/disjoint/interface.hpp:65:21: [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] /usr/include/boost/geometry/algorithms/detail/disjoint/interface.hpp:239:21: required from ‘bool boost::geometry::disjoint(const Geometry1&, const Geometry2&) [with Geometry1 = boost::geometry::model::d2::point_xy; Geometry2 = boost::geometry::model::d2::point_xy]’ /usr/include/boost/geometry/algorithms/correct.hpp:147:53: required from ‘static void boost::geometry::detail::correct::correct_ring<Ring, Predicate>::apply(Ring&, const Strategy&) [with Strategy = boost::geometry::strategy::area::surveyor<boost::geometry::model::d2::point_xy, void>; Ring = boost::geometry::model::ring<boost::geometry::model::d2::point_xy, false, true, std::vector, std::allocator>; Predicate = std::less]’ /usr/include/boost/geometry/algorithms/correct.hpp:185:21: required from ‘static void boost::geometry::detail::correct::correct_polygon::apply(Polygon&, const Strategy&) [with Strategy = boost::geometry::strategy::area::surveyor<boost::geometry::model::d2::point_xy, void>; Polygon = boost::geometry::model::polygon<boost::geometry::model::d2::point_xy, false, true>]’ /usr/include/boost/geometry/algorithms/correct.hpp:288:43: required from ‘static void boost::geometry::resolve_variant::correct::apply(Geometry&, const Strategy&) [with Strategy = boost::geometry::strategy::area::surveyor<boost::geometry::model::d2::point_xy, void>; Geometry = boost::geometry::model::polygon<boost::geometry::model::d2::point_xy, false, true>]’ /usr/include/boost/geometry/algorithms/correct.hpp:343:46: required from ‘void boost::geometry::correct(Geometry&) [with Geometry = boost::geometry::model::polygon<boost::geometry::model::d2::point_xy, false, true>]’ /home/cidi/KCBS/K-CBS-Demos/includes/Robot.h:96:40: required from here /usr/include/boost/geometry/strategies/within.hpp:80:5: error: no matching function for call to ‘assertionfailed(mpl::failed**** (boost::geometry::strategy::within::services::default_strategy<boost::geometry::model::d2::point_xy, boost::geometry::model::d2::point_xy, boost::geometry::point_tag, boost::geometry::point_tag, boost::geometry::pointlike_tag, boost::geometry::pointlike_tag, boost::geometry::cartesian_tag, boost::geometry::cartesian_tag>::NOT_IMPLEMENTED_FOR_THESETYPES::****)(mpl::assert_::types<boost::geometry::model::d2::point_xy, boost::geometry::model::d2::pointxy, mpl::na, mpl_::na>))’ BOOST_MPL_ASSERTMSG ^~~~~~~~ /usr/include/boost/mpl/assert.hpp:83:5: note: candidate: ‘template int mpl::assertionfailed(typename mpl::assert::type)’ int assertion_failed( typename assert::type ); ^~~~ /usr/include/boost/mpl/assert.hpp:83:5: note: template argument deduction/substitution failed: /usr/include/boost/geometry/strategies/within.hpp:80:5: note: cannot convert ‘boost::geometry::strategy::within::services::default_strategy<boost::geometry::model::d2::point_xy, boost::geometry::model::d2::point_xy, boost::geometry::point_tag, boost::geometry::point_tag, boost::geometry::pointlike_tag, boost::geometry::pointlike_tag, boost::geometry::cartesian_tag, boost::geometry::cartesian_tag>::NOT_IMPLEMENTED_FOR_THESE_TYPES84::assertarg()’ (type ‘mpl::failed**** (boost::geometry::strategy::within::services::default_strategy<boost::geometry::model::d2::point_xy, boost::geometry::model::d2::point_xy, boost::geometry::point_tag, boost::geometry::point_tag, boost::geometry::pointlike_tag, boost::geometry::pointlike_tag, boost::geometry::cartesian_tag, boost::geometry::cartesian_tag>::NOT_IMPLEMENTED_FOR_THESETYPES::****)(mpl::assert_::types<boost::geometry::model::d2::point_xy, boost::geometry::model::d2::pointxy, mpl::na, mpl::na>)’) to type ‘mpl::assert::type’ {aka ‘mpl_::assert’} BOOST_MPL_ASSERT_MSG ^ In file included from /usr/include/boost/geometry/algorithms/disjoint.hpp:24, from /usr/include/boost/geometry/algorithms/correct.hpp:48, from /home/cidi/KCBS/K-CBS-Demos/includes/Robot.h:40, from /home/cidi/KCBS/K-CBS-Demos/src/demo_Benchmark_Congested10x10_7robots_dyn2ndOrderCars.cpp:37: /usr/include/boost/geometry/algorithms/detail/disjoint/interface.hpp: In instantiation of ‘static bool boost::geometry::resolve_strategy::disjoint::apply(const Geometry1&, const Geometry2&, boost::geometry::default_strategy) [with Geometry1 = boost::geometry::model::d2::point_xy; Geometry2 = boost::geometry::model::d2::point_xy]’: /usr/include/boost/geometry/algorithms/detail/disjoint/interface.hpp:91:49: required from ‘static bool boost::geometry::resolve_variant::disjoint<Geometry1, Geometry2>::apply(const Geometry1&, const Geometry2&, const Strategy&) [with Strategy = boost::geometry::default_strategy; Geometry1 = boost::geometry::model::d2::point_xy; Geometry2 = boost::geometry::model::d2::point_xy]’ /usr/include/boost/geometry/algorithms/detail/disjoint/interface.hpp:239:21: required from ‘bool boost::geometry::disjoint(const Geometry1&, const Geometry2&) [with Geometry1 = boost::geometry::model::d2::point_xy; Geometry2 = boost::geometry::model::d2::point_xy]’ /usr/include/boost/geometry/algorithms/correct.hpp:147:53: required from ‘static void boost::geometry::detail::correct::correct_ring<Ring, Predicate>::apply(Ring&, const Strategy&) [with Strategy = boost::geometry::strategy::area::surveyor<boost::geometry::model::d2::point_xy, void>; Ring = boost::geometry::model::ring<boost::geometry::model::d2::point_xy, false, true, std::vector, std::allocator>; Predicate = std::less]’ /usr/include/boost/geometry/algorithms/correct.hpp:185:21: required from ‘static void boost::geometry::detail::correct::correct_polygon::apply(Polygon&, const Strategy&) [with Strategy = boost::geometry::strategy::area::surveyor<boost::geometry::model::d2::point_xy, void>; Polygon = boost::geometry::model::polygon<boost::geometry::model::d2::point_xy, false, true>]’ /usr/include/boost/geometry/algorithms/correct.hpp:288:43: required from ‘static void boost::geometry::resolve_variant::correct::apply(Geometry&, const Strategy&) [with Strategy = boost::geometry::strategy::area::surveyor<boost::geometry::model::d2::point_xy, void>; Geometry = boost::geometry::model::polygon<boost::geometry::model::d2::point_xy, false, true>]’ /usr/include/boost/geometry/algorithms/correct.hpp:343:46: required from ‘void boost::geometry::correct(Geometry&) [with Geometry = boost::geometry::model::polygon<boost::geometry::model::d2::point_xy, false, true>]’ /home/cidi/KCBS/K-CBS-Demos/includes/Robot.h:96:40: required from here /usr/include/boost/geometry/algorithms/detail/disjoint/interface.hpp:65:21: error: no type named ‘type’ in ‘struct boost::geometry::strategy::disjoint::services::default_strategy<boost::geometry::model::d2::point_xy, boost::geometry::model::d2::point_xy, boost::geometry::point_tag, boost::geometry::point_tag, 0, 0, boost::geometry::cartesian_tag, boost::geometry::cartesian_tag>’

::type strategy_type; ^~~~~ CMakeFiles/demo_Benchmark_Congested10x10_7robots_dyn2ndOrderCars.dir/build.make:75: recipe for target 'CMakeFiles/demo_Benchmark_Congested10x10_7robots_dyn2ndOrderCars.dir/src/demo_Benchmark_Congested10x10_7robots_dyn2ndOrderCars.cpp.o' failed make[2]: [CMakeFiles/demo_Benchmark_Congested10x10_7robots_dyn2ndOrderCars.dir/src/demo_Benchmark_Congested10x10_7robots_dyn2ndOrderCars.cpp.o] Error 1 CMakeFiles/Makefile2:106: recipe for target 'CMakeFiles/demo_Benchmark_Congested10x10_7robots_dyn2ndOrderCars.dir/all' failed make[1]: [CMakeFiles/demo_Benchmark_Congested10x10_7robots_dyn2ndOrderCars.dir/all] Error 2 Makefile:90: recipe for target 'all' failed make: *** [all] Error 2

Is it some version mismatch issue? Thanks!

JustinKottinger commented 1 month ago

Yes, it looks like it could be that. You will need to be on the same branch for both repositories (either main or develop). Mismatching the branches could cause problems. Are the two repositories on the same branch?

cshr25 commented 1 month ago

Yes, it looks like it could be that. You will need to be on the same branch for both repositories (either main or develop). Mismatching the branches could cause problems. Are the two repositories on the same branch?

Hum, I tried making both of them on 'main' branch, but still that didn't work out.