Skip to content
Snippets Groups Projects
Select Git revision
  • 04757929e04a39c0237a49880e11eb8c53c54be9
  • master default
  • johannes/feature/noetic
3 results

docker-run.bat

Blame
  • CMakeLists.txt 2.81 KiB
    cmake_minimum_required(VERSION 2.8.3)
    project(sample_applications)
    
    add_compile_options(-std=c++14)
    set(GCC_COVERAGE_COMPILE_FLAGS "-fpermissive")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS} ${GAZEBO_CXX_FLAGS}")
    
    # Find catkin macros and libraries if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) is used, also find other
    # catkin packages
    find_package(catkin REQUIRED
            COMPONENTS controller_manager
            effort_controllers
            gazebo_ros
            genmsg
            joint_state_controller
            joint_state_publisher
            joint_trajectory_controller
            robot_state_publisher
            roscpp
            std_msgs
            xacro
            moveit_core
            moveit_visual_tools
            moveit_ros_planning
            moveit_ros_planning_interface
            controller_interface
            hardware_interface
            simulation_util)
    
    # System dependencies are found with CMake's conventions
    find_package(PkgConfig REQUIRED)
    
    # ################################################################################################################################
    # catkin specific configuration ##
    # ################################################################################################################################
    # The catkin_package macro generates cmake config files for your package Declare things to be passed to dependent projects
    catkin_package(CATKIN_DEPENDS
            moveit_core
            moveit_visual_tools
            moveit_ros_planning_interface
            controller_interface
            hardware_interface
            pluginlib
            simulation_util
            DEPENDS
            # system_lib
            )
    
    # ################################################################################################################################
    # Build ##
    # ################################################################################################################################
    
    # Specify additional locations of header files Your package locations should be listed before other locations
    include_directories(${catkin_INCLUDE_DIRS})
    
    add_executable(BasicCartesianPlanner src/BasicCartesianPlanner.cpp)
    add_executable(BasicJointSpacePlanner src/BasicJointSpacePlanner.cpp)
    add_executable(ObstacleAwarePlanner src/ObstacleAwarePlanner.cpp)
    add_executable(GraspPlanner src/GraspPlanner.cpp)
    add_executable(${PROJECT_NAME}_pick_place src/pick_place_tutorial.cpp)
    
    set_target_properties(${PROJECT_NAME}_pick_place PROPERTIES OUTPUT_NAME pick_place PREFIX "")
    
    ## Add cmake target dependencies of the executable
    target_link_libraries(BasicCartesianPlanner ${catkin_LIBRARIES})
    target_link_libraries(BasicJointSpacePlanner ${catkin_LIBRARIES})
    target_link_libraries(ObstacleAwarePlanner ${catkin_LIBRARIES})
    target_link_libraries(GraspPlanner ${catkin_LIBRARIES})
    target_link_libraries(${PROJECT_NAME}_pick_place ${catkin_LIBRARIES})