### A* Example Executable Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Defines an executable target 'a_star' that builds the a_star example. It links against Boost libraries. ```cmake # Examples ## a_star add_executable(a_star example/a_star.cpp ) target_link_libraries(a_star ${Boost_LIBRARIES} ) ``` -------------------------------- ### Assignment Example Executable Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Configures the 'assignment' executable for the assignment example. It links against Boost libraries. ```cmake ## assignment add_executable(assignment example/assignment.cpp ) target_link_libraries(assignment ${Boost_LIBRARIES} ) ``` -------------------------------- ### A* Epsilon Example Executable Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Defines an executable target 'a_star_epsilon' for the a_star_epsilon example. It requires linking against Boost libraries. ```cmake ## a_star_epsilon add_executable(a_star_epsilon example/a_star_epsilon.cpp ) target_link_libraries(a_star_epsilon ${Boost_LIBRARIES} ) ``` -------------------------------- ### SIPP Example Executable Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Builds the 'sipp' executable for the SIPP example. This target links against Boost and yaml-cpp libraries. ```cmake ## sipp add_executable(sipp example/sipp.cpp ) target_link_libraries(sipp ${Boost_LIBRARIES} yaml-cpp ) ``` -------------------------------- ### Run ECBS Example Source: https://github.com/whoenig/libmultirobotplanning/blob/main/README.md Execute an ECBS planning instance with specified input and output files, and visualize the result. ```bash ./ecbs -i ../benchmark/32x32_obst204/map_32by32_obst204_agents10_ex1.yaml -o output.yaml -w 1.3 python3 ../example/visualize.py ../benchmark/32x32_obst204/map_32by32_obst204_agents10_ex1.yaml output.yaml ``` -------------------------------- ### CBS Roadmap Example Executable Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Builds the 'cbs_roadmap' executable for the corresponding example. This target links against Boost and yaml-cpp libraries. ```cmake ## cbs_roadmap add_executable(cbs_roadmap example/cbs_roadmap.cpp ) target_link_libraries(cbs_roadmap ${Boost_LIBRARIES} yaml-cpp ) ``` -------------------------------- ### Project Setup and Dependency Finding Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Initializes the CMake project and finds necessary packages like Boost and PkgConfig for yaml-cpp. Ensures Doxygen is available for documentation generation. ```cmake cmake_minimum_required(VERSION 3.5) project(libMultiRobotPlanning) find_package(Boost 1.58 REQUIRED COMPONENTS program_options) find_package(PkgConfig) pkg_check_modules(YamlCpp yaml-cpp) # check if Doxygen is installed find_package(Doxygen) ``` -------------------------------- ### ECBS Example Executable Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Builds the 'ecbs' executable for the ECBS example. It links against Boost and yaml-cpp libraries. ```cmake ## ecbs add_executable(ecbs example/ecbs.cpp ) target_link_libraries(ecbs ${Boost_LIBRARIES} yaml-cpp ) ``` -------------------------------- ### CBS Example Executable Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Defines the 'cbs' executable for the CBS example. It requires linking to Boost and yaml-cpp libraries. ```cmake ## cbs add_executable(cbs example/cbs.cpp ) target_link_libraries(cbs ${Boost_LIBRARIES} yaml-cpp ) ``` -------------------------------- ### Next Best Assignment Example Executable Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Configures the 'next_best_assignment' executable for the corresponding example. It links against Boost and yaml-cpp libraries. ```cmake ## next_best_assignment add_executable(next_best_assignment example/next_best_assignment.cpp ) target_link_libraries(next_best_assignment ${Boost_LIBRARIES} yaml-cpp ) ``` -------------------------------- ### CBS TA Example Executable Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Configures the 'cbs_ta' executable for the CBS TA example. This target links against Boost and yaml-cpp libraries. ```cmake ## cbs_ta add_executable(cbs_ta example/cbs_ta.cpp ) target_link_libraries(cbs_ta ${Boost_LIBRARIES} yaml-cpp ) ``` -------------------------------- ### MAPF Prioritized SIPP Example Executable Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Defines the 'mapf_prioritized_sipp' executable for the MAPF Prioritized SIPP example. It requires linking to Boost and yaml-cpp libraries. ```cmake ## mapf_prioritized_sipp add_executable(mapf_prioritized_sipp example/mapf_prioritized_sipp.cpp ) target_link_libraries(mapf_prioritized_sipp ${Boost_LIBRARIES} yaml-cpp ) ``` -------------------------------- ### ECBS TA Example Executable Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Defines the 'ecbs_ta' executable for the ECBS TA example. This target requires linking to Boost and yaml-cpp libraries. ```cmake ## ecbs_ta add_executable(ecbs_ta example/ecbs_ta.cpp ) target_link_libraries(ecbs_ta ${Boost_LIBRARIES} yaml-cpp ) ``` -------------------------------- ### Doxygen Documentation Target Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Configures a custom CMake target 'docs' to generate API documentation using Doxygen. It requires Doxygen to be installed and configured via a Doxyfile.in template. ```cmake if (DOXYGEN_FOUND) # set input and output files set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in) set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) # request to configure the file configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY) message("Doxygen build started") # note the option ALL which allows to build the docs together with the application add_custom_target( docs COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generating API documentation with Doxygen" VERBATIM ) else (DOXYGEN_FOUND) message("Doxygen need to be installed to generate the doxygen documentation") endif (DOXYGEN_FOUND) ``` -------------------------------- ### Test Execution Target Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Defines a custom target 'run-test' to execute all unit tests using Python's unittest module. Tests are discovered starting from the 'test' directory. ```cmake # tests add_custom_target(run-test COMMAND python3 -m unittest discover -s ${CMAKE_CURRENT_SOURCE_DIR}/test ) ``` -------------------------------- ### Clang-Tidy Linting Target Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Defines a custom target 'clang-tidy' to perform static code analysis and linting using clang-tidy. It requires clang-tidy to be installed and configured to export compile commands. ```cmake # clang-tidy target (linter & static code analysis) add_custom_target(clang-tidy COMMAND CMAKE_EXPORT_COMPILE_COMMANDS=ON run-clang-tidy ${CMAKE_CURRENT_SOURCE_DIR}) ``` -------------------------------- ### Build libMultiRobotPlanning Source: https://github.com/whoenig/libmultirobotplanning/blob/main/README.md Standard CMake build process for the library. Assumes Ubuntu 16.04. ```bash mkdir build cd build cmake .. make ``` -------------------------------- ### Annotate and Run CBS Roadmap Source: https://github.com/whoenig/libmultirobotplanning/blob/main/README.md Annotate a roadmap file and then run the CBS planner on the annotated roadmap, followed by visualization. ```python python3 ../tools/annotate_roadmap.py ../test/mapf_simple1_roadmap_to_annotate.yaml mapf_simple1_roadmap_annotated.yaml ./cbs_roadmap -i mapf_simple1_roadmap_annotated.yaml -o output.yaml python3 ../example/visualize_roadmap.py mapf_simple1_roadmap_annotated.yaml output.yaml ``` -------------------------------- ### All Targets Combined Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Creates a meta-target 'everything' that depends on all other custom targets: clang-format, clang-tidy, docs, and run-test. This allows building/running all development tools with a single command. ```cmake add_custom_target(everything DEPENDS clang-format clang-tidy docs run-test ) ``` -------------------------------- ### Run Specific Test Source: https://github.com/whoenig/libmultirobotplanning/blob/main/README.md Execute a specific test case for the next best assignment algorithm using Python. ```python python3 ../test/test_next_best_assignment.py TestNextBestAssignment.test_1by2 ``` -------------------------------- ### Clang-Format Target Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Creates a custom target 'clang-format' to automatically format all source files according to predefined style guidelines. This ensures consistent code style across the project. ```cmake # clang-format set(ALL_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/libMultiRobotPlanning/a_star.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/libMultiRobotPlanning/a_star_epsilon.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/libMultiRobotPlanning/assignment.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/libMultiRobotPlanning/cbs.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/libMultiRobotPlanning/cbs_ta.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/libMultiRobotPlanning/ecbs.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/libMultiRobotPlanning/ecbs_ta.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/libMultiRobotPlanning/neighbor.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/libMultiRobotPlanning/next_best_assignment.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/libMultiRobotPlanning/planresult.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/libMultiRobotPlanning/sipp.hpp ${CMAKE_CURRENT_SOURCE_DIR}/example/a_star.cpp ${CMAKE_CURRENT_SOURCE_DIR}/example/a_star_epsilon.cpp ${CMAKE_CURRENT_SOURCE_DIR}/example/assignment.cpp ${CMAKE_CURRENT_SOURCE_DIR}/example/cbs.cpp ${CMAKE_CURRENT_SOURCE_DIR}/example/cbs_ta.cpp ${CMAKE_CURRENT_SOURCE_DIR}/example/ecbs.cpp ${CMAKE_CURRENT_SOURCE_DIR}/example/ecbs_ta.cpp ${CMAKE_CURRENT_SOURCE_DIR}/example/mapf_prioritized_sipp.cpp ${CMAKE_CURRENT_SOURCE_DIR}/example/next_best_assignment.cpp ${CMAKE_CURRENT_SOURCE_DIR}/example/shortest_path_heuristic.cpp ${CMAKE_CURRENT_SOURCE_DIR}/example/shortest_path_heuristic.hpp ${CMAKE_CURRENT_SOURCE_DIR}/example/sipp.cpp ${CMAKE_CURRENT_SOURCE_DIR}/example/timer.hpp ) add_custom_target(clang-format COMMAND clang-format -i ${ALL_SOURCE_FILES} ) ``` -------------------------------- ### C++ Standard and Warnings Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Configures the C++ standard to C++14 and enables all compiler warnings (-Wall -Wextra) for better code quality and early error detection. Extensions are disabled. ```cmake # Enable C++14 and warnings set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") ``` -------------------------------- ### Include Directories Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Specifies the 'include' directory to be added to the compiler's include path. This allows header files in the 'include' directory to be found by the build system. ```cmake include_directories( include ) ``` -------------------------------- ### Compile Commands Export Source: https://github.com/whoenig/libmultirobotplanning/blob/main/CMakeLists.txt Enables the export of compile commands to a compile_commands.json file. This is essential for tools like clang-tidy and clang-format to understand the project's build configuration. ```cmake # Creates compile database used by clang-tidy. set(CMAKE_EXPORT_COMPILE_COMMANDS ON) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.