mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-08 22:07:46 +08:00
Update: fixed iron compile error
This commit is contained in:
@@ -15,10 +15,12 @@ option(USE_NV_HW_DECODER "Use Nvidia hardware decoder" OFF)
|
||||
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
add_compile_options(-Wall -Wextra -Werror -Wno-pedantic -Wno-array-bounds)
|
||||
endif ()
|
||||
# Check if ROS Jazzy is installed
|
||||
if("$ENV{ROS_DISTRO}" STREQUAL "jazzy")
|
||||
# Check if ROS Jazzy or iron is installed
|
||||
if ("$ENV{ROS_DISTRO}" STREQUAL "jazzy")
|
||||
add_compile_definitions(ROS_JAZZY)
|
||||
endif()
|
||||
elseif ("$ENV{ROS_DISTRO}" STREQUAL "iron")
|
||||
add_compile_definitions(ROS_IRON)
|
||||
endif ()
|
||||
|
||||
# find dependencies
|
||||
set(dependencies
|
||||
@@ -220,12 +222,12 @@ install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}/)
|
||||
install(DIRECTORY config DESTINATION share/${PROJECT_NAME}/)
|
||||
install(DIRECTORY ${ORBBEC_INCLUDE_DIR} DESTINATION include)
|
||||
install(DIRECTORY ${ORBBEC_LIBS_DIR}/ DESTINATION lib/ FILES_MATCHING PATTERN "*.so*")
|
||||
if(DEFINED ENV{BUILDING_PACKAGE})
|
||||
if (DEFINED ENV{BUILDING_PACKAGE})
|
||||
# Install udev rules
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/99-obsensor-libusb.rules
|
||||
DESTINATION /etc/udev/rules.d
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
install(TARGETS list_devices_node
|
||||
list_depth_work_mode_node
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
#include "jpeg_decoder.h"
|
||||
#include <std_msgs/msg/string.hpp>
|
||||
|
||||
#if defined(ROS_JAZZY)
|
||||
#if defined(ROS_JAZZY) || defined(ROS_IRON)
|
||||
#include <cv_bridge/cv_bridge.hpp>
|
||||
#else
|
||||
#include <cv_bridge/cv_bridge.h>
|
||||
|
||||
@@ -22,7 +22,7 @@ class ParametersBackend {
|
||||
public:
|
||||
explicit ParametersBackend(rclcpp::Node* node);
|
||||
~ParametersBackend();
|
||||
#if defined(ROS_JAZZY)
|
||||
#if defined(ROS_JAZZY) || defined(ROS_IRON)
|
||||
void addOnSetParametersCallback(
|
||||
rclcpp::node_interfaces::NodeParametersInterface::OnSetParametersCallbackType callback);
|
||||
#else
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2023 Orbbec 3D Technology, Inc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
#if defined(ROS_JAZZY)
|
||||
* Copyright (c) 2023 Orbbec 3D Technology, Inc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
#if defined(ROS_JAZZY) || defined(ROS_IRON)
|
||||
#include <cv_bridge/cv_bridge.hpp>
|
||||
#else
|
||||
#include <cv_bridge/cv_bridge.h>
|
||||
|
||||
@@ -26,7 +26,7 @@ ParametersBackend::~ParametersBackend() {
|
||||
ros_callback_.reset();
|
||||
}
|
||||
}
|
||||
#if defined(ROS_JAZZY)
|
||||
#if defined(ROS_JAZZY) || defined(ROS_IRON)
|
||||
void ParametersBackend::addOnSetParametersCallback(
|
||||
rclcpp::node_interfaces::NodeParametersInterface::OnSetParametersCallbackType callback) {
|
||||
ros_callback_ = node_->add_on_set_parameters_callback(callback);
|
||||
|
||||
Reference in New Issue
Block a user