Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the code to use a non-deprecated header. #72

Merged
merged 3 commits into from Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions CMakeLists.txt
Expand Up @@ -2,15 +2,22 @@ cmake_minimum_required(VERSION 3.5)
project(depthimage_to_laserscan)
include(GenerateExportHeader)

# Default to C++14
# Default to C++17
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

message(STATUS "CHRIS: ROS_DISTRO: $ENV{ROS_DISTRO}")
clalancette marked this conversation as resolved.
Show resolved Hide resolved
clalancette marked this conversation as resolved.
Show resolved Hide resolved
if(DEFINED ENV{ROS_DISTRO})
if("$ENV{ROS_DISTRO}" STREQUAL "humble")
add_definitions(-DLEGACY_PINHOLE_CAMERA_INCLUDE=1)
endif()
endif()

find_package(ament_cmake_ros REQUIRED)

find_package(image_geometry REQUIRED)
Expand Down
4 changes: 4 additions & 0 deletions include/depthimage_to_laserscan/DepthImageToLaserScan.hpp
Expand Up @@ -38,7 +38,11 @@

#include "depthimage_to_laserscan/DepthImageToLaserScan_export.h"
#include "depthimage_to_laserscan/depth_traits.hpp"
#ifdef LEGACY_PINHOLE_CAMERA_INCLUDE
clalancette marked this conversation as resolved.
Show resolved Hide resolved
#include "image_geometry/pinhole_camera_model.h"
#else
#include "image_geometry/pinhole_camera_model.hpp"
#endif
#include <opencv2/core/core.hpp>
#include <sensor_msgs/msg/camera_info.hpp>
#include <sensor_msgs/msg/image.hpp>
Expand Down
3 changes: 3 additions & 0 deletions package.xml
Expand Up @@ -13,6 +13,9 @@

<buildtool_depend>ament_cmake_ros</buildtool_depend>

<!-- Used to determine which ROS version is available at build time -->
<build_depend>ros_environment</build_depend>

<depend>image_geometry</depend>
<depend>libopencv-dev</depend>
<depend>rclcpp</depend>
Expand Down