Files
rtabmap_ros/rtabmap_costmap_plugins/CMakeLists.txt
T
matlabbeandmathieu86 11edc01d6a rtabmap_odom tests and doc (#1456)
* rtabmap_odom tests and doc

* opengv note

* added ci checks or humble-latest flaky dep cmake errors

* Added real data tests for rgbd_odom and stereo_odom

* added real data for icp_odometry's deskewing test

* fixing json cmake error on lyrical/rolling

* test 2d icp odom deskewing branch

* first review of existing OdometryROS tests

* testing with imu used as guess

* tested imu arrivals sync

* Fixed odom reset on right pose when guess frame id is used

* fixing header errors in ci >=lyrical

* Added support for input rgbd_image topic with features for odom, added multicam rgbd_odometry test

* Added stereo odom support for features-only frames. Added multicam stereo tests.

* forcing latest rtabmap version

* updated OdometryROS API

* ci: dont build non-latest docker in pull requests

* splitting docker jobs

* doc edit

* Making publish_null_when_lost:=false continous when guess is provided (using guess covariance when we cannot register yet)

* updated stereo doc

* ficing rolling ci (rviz Ogre header)

* Added test coverage of alll rgbd_image callbacks

* fixing rolling ci

* making docker ci build/run the tests on pull requests

* fixing ros2 ci testing

* improved sync callback coverage

* improving stereo_odometry test coverage

* improved icp_odometry test coverage

* lyrical voxel_grid ptr error

* make multicam tests working as well without opengv

* removing deps of missing packages on rolling

* PCL empty cloud  conversion compiler errors fix

* fixing icp_odometry test failure on ci witohut libpointmatcher

* fixing nav2 costmap plugin build on lyrical

* joining thread when exiting

* updating icp test to work the same on pcl 1.15 (lyrical)

* Fix parallel tests seg fault

---------

Co-authored-by: mathieu86 <[email protected]>
2026-09-21 17:02:45 -07:00

101 lines
2.7 KiB
CMake

cmake_minimum_required(VERSION 3.5)
project(rtabmap_costmap_plugins)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
find_package(ament_cmake_ros REQUIRED)
find_package(pluginlib REQUIRED)
find_package(rclcpp REQUIRED)
find_package(nav2_costmap_2d REQUIRED)
find_package(visualization_msgs REQUIRED)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/include
)
SET(Libraries
pluginlib::pluginlib
rclcpp::rclcpp
nav2_costmap_2d::layers
visualization_msgs::visualization_msgs
)
SET(AmentLibraries
pluginlib
rclcpp
nav2_costmap_2d
visualization_msgs
)
###########
## Build ##
###########
add_library(rtabmap_costmap_plugins SHARED
src/voxel_layer.cpp
)
target_include_directories(rtabmap_costmap_plugins
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
IF("$ENV{ROS_DISTRO}" STRLESS "lyrical")
IF("$ENV{ROS_DISTRO}" STRLESS "jazzy")
target_compile_definitions(rtabmap_costmap_plugins PRIVATE -DPRE_ROS_JAZZY)
ENDIF()
target_compile_definitions(rtabmap_costmap_plugins PRIVATE -DPRE_ROS_LYRICAL)
ament_target_dependencies(rtabmap_costmap_plugins ${AmentLibraries})
ELSE()
target_link_libraries(rtabmap_costmap_plugins PRIVATE ${Libraries})
ENDIF()
# Causes the visibility macros to use dllexport rather than dllimport,
# which is appropriate when building the dll but not consuming it.
target_compile_definitions(rtabmap_costmap_plugins PRIVATE "RTABMAP_ROS_BUILDING_LIBRARY")
# prevent pluginlib from using boost
target_compile_definitions(rtabmap_costmap_plugins PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")
pluginlib_export_plugin_description_file(nav2_costmap_2d costmap_plugins.xml)
add_executable(rtabmap_costmap_voxel_marker src/voxel_marker.cpp)
IF("$ENV{ROS_DISTRO}" STRLESS "lyrical")
ament_target_dependencies(rtabmap_costmap_voxel_marker ${AmentLibraries})
ELSE()
target_link_libraries(rtabmap_costmap_voxel_marker PRIVATE ${Libraries})
ENDIF()
set_target_properties(rtabmap_costmap_voxel_marker PROPERTIES OUTPUT_NAME "voxel_marker")
#############
## Install ##
#############
ament_export_dependencies(${AmentLibraries})
ament_export_include_directories(include)
ament_export_targets(${PROJECT_NAME}) # To include downstream with targets
ament_export_libraries(rtabmap_costmap_plugins) # To include downstream without targets
install(TARGETS
rtabmap_costmap_plugins
EXPORT ${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
install(TARGETS
rtabmap_costmap_voxel_marker
DESTINATION lib/${PROJECT_NAME}
)
install(DIRECTORY include/
DESTINATION include
FILES_MATCHING PATTERN "*.h"
)
ament_package()