Skip to content

Commit

Permalink
fix(autoware_overlay_rviz_plugin): fix subs and cleanup (#6978)
Browse files Browse the repository at this point in the history
Signed-off-by: M. Fatih Cırıt <[email protected]>
  • Loading branch information
xmfcx authored May 11, 2024
1 parent 8176c63 commit fd6306d
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 959 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,13 @@ project(autoware_overlay_rviz_plugin)

# find dependencies
find_package(ament_cmake_auto REQUIRED)
find_package(ament_cmake REQUIRED)
find_package(autoware_auto_vehicle_msgs REQUIRED)
find_package(tier4_planning_msgs REQUIRED)
find_package(autoware_perception_msgs REQUIRED)
ament_auto_find_build_dependencies()

find_package(autoware_overlay_msgs REQUIRED)

find_package(rviz_common REQUIRED)
find_package(rviz_rendering REQUIRED)
find_package(rviz_ogre_vendor REQUIRED)
find_package(std_msgs REQUIRED)

set(
headers_to_moc
include/overlay_text_display.hpp
include/signal_display.hpp

set(headers_to_moc
include/signal_display.hpp
)

set(
headers_to_not_moc
set(headers_to_not_moc
include/steering_wheel_display.hpp
include/gear_display.hpp
include/speed_display.hpp
Expand All @@ -34,47 +19,42 @@ set(
)



foreach(header "${headers_to_moc}")
qt5_wrap_cpp(display_moc_files "${header}")
qt5_wrap_cpp(display_moc_files "${header}")
endforeach()

set(
display_source_files
src/overlay_text_display.cpp
src/overlay_utils.cpp
src/signal_display.cpp
src/steering_wheel_display.cpp
src/gear_display.cpp
src/speed_display.cpp
src/turn_signals_display.cpp
src/traffic_display.cpp
src/speed_limit_display.cpp

set(display_source_files
src/overlay_utils.cpp
src/signal_display.cpp
src/steering_wheel_display.cpp
src/gear_display.cpp
src/speed_display.cpp
src/turn_signals_display.cpp
src/traffic_display.cpp
src/speed_limit_display.cpp
)

add_library(
${PROJECT_NAME} SHARED
${display_moc_files}
${headers_to_not_moc}
${display_source_files}
add_library(${PROJECT_NAME} SHARED
${display_moc_files}
${headers_to_not_moc}
${display_source_files}
)

set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17)
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic)

target_include_directories(
${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
${Qt5Widgets_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
${Qt5Widgets_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)

target_link_libraries(
${PROJECT_NAME} PUBLIC
rviz_ogre_vendor::OgreMain
rviz_ogre_vendor::OgreOverlay
${PROJECT_NAME} PUBLIC
rviz_ogre_vendor::OgreMain
rviz_ogre_vendor::OgreOverlay
)


Expand All @@ -85,22 +65,19 @@ target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNC

pluginlib_export_plugin_description_file(rviz_common plugins_description.xml)

ament_target_dependencies(
${PROJECT_NAME}
PUBLIC
rviz_common
rviz_rendering
autoware_overlay_msgs
autoware_auto_vehicle_msgs
tier4_planning_msgs
autoware_perception_msgs
ament_target_dependencies(${PROJECT_NAME} PUBLIC
rviz_common
rviz_rendering
autoware_auto_vehicle_msgs
tier4_planning_msgs
autoware_perception_msgs
)

ament_export_include_directories(include)
ament_export_targets(${PROJECT_NAME} HAS_LIBRARY_TARGET)
ament_export_dependencies(
rviz_common
rviz_ogre_vendor
rviz_common
rviz_ogre_vendor
)

if(BUILD_TESTING)
Expand All @@ -109,32 +86,32 @@ if(BUILD_TESTING)
endif()

install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)

install(
DIRECTORY include/
DESTINATION include
DIRECTORY include/
DESTINATION include
)

install(
TARGETS
DESTINATION lib/${PROJECT_NAME}
TARGETS
DESTINATION lib/${PROJECT_NAME}
)

# Copy the assets directory to the installation directory
install(
DIRECTORY assets/
DESTINATION share/${PROJECT_NAME}/assets
DIRECTORY assets/
DESTINATION share/${PROJECT_NAME}/assets
)

add_definitions(-DQT_NO_KEYWORDS)

ament_package(
CONFIG_EXTRAS "autoware_overlay_rviz_plugin-extras.cmake"
CONFIG_EXTRAS "autoware_overlay_rviz_plugin-extras.cmake"
)
Loading

0 comments on commit fd6306d

Please sign in to comment.