mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 08:47:45 +08:00
Fixed compilation errors on rolling (backward compatible for Humble)
This commit is contained in:
@@ -60,6 +60,10 @@ IF("$ENV{ROS_DISTRO}" STRLESS "iron")
|
||||
add_definitions(-DPRE_ROS_IRON)
|
||||
ENDIF()
|
||||
|
||||
IF("$ENV{ROS_DISTRO}" STRLESS "kilted")
|
||||
add_definitions(-DPRE_ROS_KILTED)
|
||||
ENDIF()
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
@@ -73,7 +77,9 @@ target_include_directories(rtabmap_conversions
|
||||
ament_target_dependencies(rtabmap_conversions ${Libraries})
|
||||
|
||||
IF("$ENV{ROS_DISTRO}" STRLESS "iron")
|
||||
target_compile_definitions(rtabmap_conversions PUBLIC -DPRE_ROS_IRON)
|
||||
target_compile_definitions(rtabmap_conversions PUBLIC -DPRE_ROS_IRON -DPRE_ROS_KILTED)
|
||||
ELSEIF("$ENV{ROS_DISTRO}" STRLESS "kilted")
|
||||
target_compile_definitions(rtabmap_conversions PUBLIC -DPRE_ROS_KILTED)
|
||||
ENDIF()
|
||||
|
||||
#############
|
||||
|
||||
@@ -65,6 +65,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <rtabmap_msgs/msg/rgbd_image.hpp>
|
||||
#include <rtabmap_msgs/msg/user_data.hpp>
|
||||
|
||||
#ifdef PRE_ROS_KILTED
|
||||
#define RCLCPP_QOS(queueSize, qos) rclcpp::QoS(queueSize).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile()
|
||||
#else
|
||||
#define RCLCPP_QOS(queueSize, qos) rclcpp::QoS(queueSize).reliability((rmw_qos_reliability_policy_t)qos)
|
||||
#endif
|
||||
|
||||
namespace rtabmap_conversions {
|
||||
|
||||
void transformToTF(const rtabmap::Transform & transform, tf2::Transform & tfTransform);
|
||||
|
||||
Reference in New Issue
Block a user