### Install Dependencies on Ubuntu Source: https://github.com/hiroishida/plainmp/blob/master/README.md System package installation for Ubuntu environments followed by the plainmp Python package. ```bash sudo apt install libeigen3-dev libboost-all-dev libompl-dev libspatialindex-dev freeglut3-dev libsuitesparse-dev libblas-dev liblapack-dev pip install plainmp # or build from source after git submodules update --init ``` -------------------------------- ### Install Visualization Dependencies Source: https://github.com/hiroishida/plainmp/blob/master/README.md Command to install the required pyrender version for visualization features. ```bash pip uninstall -y pyrender && pip install git+https://github.com/mmatl/pyrender.git --no-cache-dir ``` -------------------------------- ### Install Dependencies on macOS Source: https://github.com/hiroishida/plainmp/blob/master/README.md System package installation for macOS environments using Homebrew followed by the plainmp Python package. ```bash brew install eigen boost ompl spatialindex suite-sparse openblas lapack pip install plainmp # or build from source after git submodules update --init ``` -------------------------------- ### Project Initialization and Dependencies Source: https://github.com/hiroishida/plainmp/blob/master/CMakeLists.txt Sets the C++ standard, build type, and locates required external libraries like Eigen3, Boost, and OMPL. ```cmake cmake_minimum_required(VERSION 3.10) set(CMAKE_CXX_STANDARD 17) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif(NOT CMAKE_BUILD_TYPE) set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS_INIT} -fPIC") find_package(Eigen3 REQUIRED) ADD_DEFINITIONS(-DEIGEN_NO_DEBUG) ADD_DEFINITIONS(-DEIGEN_DONT_VECTORIZE) include_directories(${EIGEN3_INCLUDE_DIR}) add_subdirectory("third/urdf_parser") include_directories("third/urdf_parser/include") find_package(Boost REQUIRED COMPONENTS serialization) find_package(ompl REQUIRED) include_directories(${OMPL_INCLUDE_DIRS}) add_subdirectory("third/ompl-ertconnect") include_directories("third/ompl-ertconnect") ``` -------------------------------- ### Run Performance Benchmarks Source: https://github.com/hiroishida/plainmp/blob/master/README.md Commands to execute benchmark scripts for different robot configurations. ```bash python3 example/bench/panda_plan.py # panda dual bars python3 example/bench/panda_plan.py --difficult # panda ceiled dual bars python3 example/bench/fetch_plan.py # fetch table ``` -------------------------------- ### Configure CMake Project and Versioning Source: https://github.com/hiroishida/plainmp/blob/master/third/urdf_parser/CMakeLists.txt Sets the minimum CMake version, C++ standard, and project version variables. ```cmake cmake_minimum_required( VERSION 3.10 FATAL_ERROR ) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_CXX_STANDARD 14) set (URDF_MAJOR_VERSION 1) set (URDF_MINOR_VERSION 0) set (URDF_PATCH_VERSION 4) set (URDF_VERSION ${URDF_MAJOR_VERSION}.${URDF_MINOR_VERSION}.${URDF_PATCH_VERSION}) set (URDF_MAJOR_MINOR_VERSION ${URDF_MAJOR_VERSION}.${URDF_MINOR_VERSION}) ``` -------------------------------- ### Dependency Management Source: https://github.com/hiroishida/plainmp/blob/master/third/ompl-ertconnect/CMakeLists.txt Locates and includes the required Eigen and OMPL libraries for the build. ```cmake find_package(Eigen3 REQUIRED) ADD_DEFINITIONS(-DEIGEN_NO_DEBUG) include_directories(${EIGEN3_INCLUDE_DIR}) find_package(ompl REQUIRED) include_directories(${OMPL_INCLUDE_DIRS}) ``` -------------------------------- ### CMake Project Configuration Source: https://github.com/hiroishida/plainmp/blob/master/third/ompl-ertconnect/CMakeLists.txt Sets the minimum CMake version and global compiler standards for the project. ```cmake cmake_minimum_required(VERSION 3.10) add_compile_options(-std=c++14) ``` -------------------------------- ### Configure TinyXML Library in CMake Source: https://github.com/hiroishida/plainmp/blob/master/third/urdf_parser/tinyxml/CMakeLists.txt Sets the minimum required CMake version and defines the tinyxml library target with its source files. ```cmake cmake_minimum_required( VERSION 3.10 FATAL_ERROR ) add_library(tinyxml tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp) ``` -------------------------------- ### Library Compilation Source: https://github.com/hiroishida/plainmp/blob/master/third/ompl-ertconnect/CMakeLists.txt Collects source files and defines the static library target with linked dependencies. ```cmake file(GLOB_RECURSE ERTTREE_SRC ertconnect/*.cpp) include_directories(ertconnect) add_library(ertconnect STATIC ${ERTTREE_SRC}) target_link_libraries(ertconnect ${OMPL_LIBRARIES}) ``` -------------------------------- ### Optional Valgrind Profiling Configuration Source: https://github.com/hiroishida/plainmp/blob/master/CMakeLists.txt Conditionally includes Valgrind headers if the USE_VALGRIND option is enabled. ```cmake option(USE_VALGRIND "Use valgrind to profile the code" OFF) if(USE_VALGRIND) find_path(VALGRIND_INCLUDE_DIR NAMES valgrind/callgrind.h PATHS /usr/include /usr/local/include ) if(VALGRIND_INCLUDE_DIR) include_directories(${VALGRIND_INCLUDE_DIR}) else() message(FATAL_ERROR "Could not find valgrind/callgrind.h. Please install the valgrind development package.") endif() add_definitions(-DUSE_VALGRIND) endif() ``` -------------------------------- ### Custom Build Command for Sequence Table Source: https://github.com/hiroishida/plainmp/blob/master/CMakeLists.txt Defines a custom command and target to generate a C++ header file using a Python script. ```cmake add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/cpp/plainmp/ompl/sequence_table.hpp COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/cpp/plainmp/ompl/generate_sequence.py DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cpp/plainmp/ompl/generate_sequence.py ) add_custom_target(generate_sequence_table DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cpp/plainmp/ompl/sequence_table.hpp ) ``` -------------------------------- ### Convert bubblify output to plainmp format Source: https://github.com/hiroishida/plainmp/blob/master/README.md Use this script to convert YAML output from the bubblify tool into the format required by plainmp. ```bash python3 -m plainmp.script.bubblify_to_plainmp --path ``` -------------------------------- ### Define URDF Parser Library Target Source: https://github.com/hiroishida/plainmp/blob/master/third/urdf_parser/CMakeLists.txt Adds the TinyXML subdirectory and defines the urdfdom_model static library target with its include directories and dependencies. ```cmake add_subdirectory("tinyxml") set(TinyXML_INCLUDE_DIRS "tinyxml") add_library(urdfdom_model STATIC src/pose.cpp src/model.cpp src/link.cpp src/joint.cpp) target_include_directories(urdfdom_model PUBLIC "include" ${TinyXML_INCLUDE_DIRS}) target_link_libraries(urdfdom_model tinyxml) set_target_properties(urdfdom_model PROPERTIES SOVERSION ${URDF_MAJOR_MINOR_VERSION}) ``` -------------------------------- ### Pybind11 Module and Target Linking Source: https://github.com/hiroishida/plainmp/blob/master/CMakeLists.txt Compiles the C++ source files into a Python module and links necessary libraries, including version-specific OMPL handling. ```cmake file(GLOB_RECURSE SRC_FILES cpp/*.cpp) include_directories(cpp) add_subdirectory(pybind11) pybind11_add_module(_plainmp ${SRC_FILES}) add_dependencies(_plainmp generate_sequence_table) if (TARGET ompl::ompl) set(_ompl_target ompl::ompl) else() set(_ompl_target ompl) # old versions of OMPL endif() target_link_libraries(_plainmp PRIVATE urdfdom_model ${_ompl_target} ertconnect ${Boost_LIBRARIES}) if(ompl_VERSION VERSION_LESS "1.7.0") target_compile_definitions(_plainmp PRIVATE OMPL_OLD_VERSION) endif() install(TARGETS _plainmp DESTINATION .) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.