Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 47 additions & 17 deletions rviz_mbf_plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,77 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
endif()

find_package(ament_cmake_ros REQUIRED)
find_package(ament_cmake REQUIRED)

find_package(pluginlib REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_action REQUIRED)
find_package(pluginlib REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(mbf_msgs REQUIRED)
find_package(rviz_common REQUIRED)

qt5_wrap_cpp(MOC_FILES
find_package(Qt5 REQUIRED COMPONENTS Widgets)


set(rviz_mbf_plugins_headers_to_moc
include/rviz_mbf_plugins/mbf_goal_actions_panel.hpp
)

add_library(${PROJECT_NAME}_mbf_goal_actions_panel src/mbf_goal_actions_panel.cpp ${MOC_FILES})
target_include_directories(${PROJECT_NAME}_mbf_goal_actions_panel PUBLIC
foreach(header "${rviz_mbf_plugins_headers_to_moc}")
qt5_wrap_cpp(rviz_mbf_plugins_moc_files "${header}")
endforeach()

add_library(rviz_mbf_plugins SHARED
${rviz_mbf_plugins_moc_files}
src/mbf_goal_actions_panel.cpp
)

target_include_directories(rviz_mbf_plugins PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
ament_target_dependencies(${PROJECT_NAME}_mbf_goal_actions_panel

ament_target_dependencies(rviz_mbf_plugins
rclcpp
rclcpp_action
pluginlib
rviz_common
geometry_msgs
mbf_msgs
rviz_common
)

install(TARGETS ${PROJECT_NAME}_mbf_goal_actions_panel
EXPORT export_${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
target_link_libraries(rviz_mbf_plugins
Qt5::Widgets
)
install(DIRECTORY include/ DESTINATION include)
install(FILES plugins_description.xml
DESTINATION share/${PROJECT_NAME}

target_compile_definitions(rviz_mbf_plugins PRIVATE "RVIZ_MBF_PLUGINS_BUILDING_LIBRARY")

pluginlib_export_plugin_description_file(rviz_common plugins_description.xml)

install(
TARGETS rviz_mbf_plugins
EXPORT export_${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)

install(
DIRECTORY include/
DESTINATION include
)

install(
FILES plugins_description.xml
DESTINATION share/${PROJECT_NAME}
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()


ament_export_include_directories(include)
ament_export_targets(export_${PROJECT_NAME} HAS_LIBRARY_TARGET)
pluginlib_export_plugin_description_file(rviz_common plugins_description.xml)

ament_package()
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class MbfGoalActionsPanel : public rviz_common::Panel

public:
explicit MbfGoalActionsPanel(QWidget * parent = nullptr);
virtual ~MbfGoalActionsPanel() {}
~MbfGoalActionsPanel() noexcept override = default;

void onInitialize() override;
void save(rviz_common::Config config) const override;
Expand Down
13 changes: 11 additions & 2 deletions rviz_mbf_plugins/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>mbf_msgs</depend>
<depend>pluginlib</depend>
<depend>rclcpp</depend>
<depend>rclcpp_action</depend>
<depend>pluginlib</depend>
<depend>mbf_msgs</depend>
<depend>rviz_common</depend>
<depend>geometry_msgs</depend>

<build_depend>qtbase5-dev</build_depend>
<build_export_depend>qtbase5-dev</build_export_depend>

<exec_depend>libqt5-widgets</exec_depend>
<exec_depend>libqt5-gui</exec_depend>
<exec_depend>libqt5-core</exec_depend>

<test_depend>ament_cmake_auto</test_depend>
<test_depend>ament_cmake_uncrustify</test_depend>
Expand Down
2 changes: 1 addition & 1 deletion rviz_mbf_plugins/plugins_description.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<library path="rviz_mbf_plugins_mbf_goal_actions_panel">
<library path="rviz_mbf_plugins">
<class name="rviz_mbf_plugins/MbfGoalActions"
type="rviz_mbf_plugins::MbfGoalActionsPanel"
base_class_type="rviz_common::Panel">
Expand Down
1 change: 1 addition & 0 deletions rviz_mbf_plugins/src/mbf_goal_actions_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,4 +412,5 @@ void MbfGoalActionsPanel::exePathResultCallback(
} // namespace rviz_mbf_plugins

#include <pluginlib/class_list_macros.hpp>
#include <rviz_common/panel.hpp>
PLUGINLIB_EXPORT_CLASS(rviz_mbf_plugins::MbfGoalActionsPanel, rviz_common::Panel)