Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmake_minimum_required(VERSION 3.5)
- project(custom_sensor_plugin)
- find_package(ament_cmake REQUIRED)
- find_package(rclcpp REQUIRED)
- find_package(rclcpp_lifecycle REQUIRED)
- find_package(hardware_interface REQUIRED)
- find_package(pluginlib REQUIRED)
- find_package(gz_ros2_control REQUIRED)
- find_package(ignition-gazebo6 REQUIRED)
- find_package(ignition-plugin1 REQUIRED COMPONENTS register)
- include_directories(include)
- add_library(custom_sensor
- src/custom_sensor.cpp
- )
- ament_target_dependencies(custom_sensor
- rclcpp
- rclcpp_lifecycle
- hardware_interface
- pluginlib
- gz_ros2_control
- ignition-gazebo6
- )
- target_link_libraries(custom_sensor
- PRIVATE
- gz_ros2_control::gz_ros2_control
- ignition-gazebo6::ignition-gazebo6
- ignition-plugin${ignition-plugin1_VERSION_MAJOR}::ignition-plugin${ignition-plugin1_VERSION_MAJOR}
- )
- pluginlib_export_plugin_description_file(gz_ros2_control custom_sensor_plugin.xml)
- install(
- TARGETS custom_sensor
- ARCHIVE DESTINATION lib
- LIBRARY DESTINATION lib
- RUNTIME DESTINATION bin
- )
- install(
- DIRECTORY include/
- DESTINATION include
- )
- install(
- FILES package.xml custom_sensor_plugin.xml
- DESTINATION share/${PROJECT_NAME}
- )
- ament_export_include_directories(include)
- ament_export_libraries(custom_sensor)
- ament_package()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement