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