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

Compile for ROS2 Iron #22

Open
FlorianHou opened this issue Jan 13, 2024 · 1 comment
Open

Compile for ROS2 Iron #22

FlorianHou opened this issue Jan 13, 2024 · 1 comment

Comments

@FlorianHou
Copy link

If you try to compile SDK for iron. You might get some error like following:

ubuntu@ubuntu-001:~/WSS/ws_orbec2$ colcon build --event-handlers  console_direct+  --parallel-workers 1 --packages-select orbbec_camera
Starting >>> orbbec_camera
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ament_cmake: 2.0.3 (/home/ubuntu/ros2_iron/install/ament_cmake/share/ament_cmake/cmake)
-- Found Python3: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter
-- Found ament_index_cpp: 1.5.2 (/home/ubuntu/ros2_iron/install/ament_index_cpp/share/ament_index_cpp/cmake)
-- Found builtin_interfaces: 1.6.0 (/home/ubuntu/ros2_iron/install/builtin_interfaces/share/builtin_interfaces/cmake)
-- Found rosidl_generator_c: 4.0.1 (/home/ubuntu/ros2_iron/install/rosidl_generator_c/share/rosidl_generator_c/cmake)
-- Found rosidl_generator_cpp: 4.0.1 (/home/ubuntu/ros2_iron/install/rosidl_generator_cpp/share/rosidl_generator_cpp/cmake)
-- Using all available rosidl_typesupport_c: rosidl_typesupport_fastrtps_c;rosidl_typesupport_introspection_c
-- Using all available rosidl_typesupport_cpp: rosidl_typesupport_fastrtps_cpp;rosidl_typesupport_introspection_cpp
-- Found cv_bridge: 3.4.0 (/opt/ros/iron/share/cv_bridge/cmake)
-- Found rmw_implementation_cmake: 7.1.0 (/home/ubuntu/ros2_iron/install/rmw_implementation_cmake/share/rmw_implementation_cmake/cmake)
-- Found rmw_fastrtps_cpp: 7.1.2 (/home/ubuntu/ros2_iron/install/rmw_fastrtps_cpp/share/rmw_fastrtps_cpp/cmake)
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.2")
-- Found FastRTPS: /home/ubuntu/ros2_iron/install/fastrtps/include
-- Using RMW implementation 'rmw_fastrtps_cpp' as default
-- Found camera_info_manager: 4.2.2 (/home/ubuntu/ros2_iron/install/camera_info_manager/share/camera_info_manager/cmake)
-- Found image_transport: 4.2.2 (/home/ubuntu/ros2_iron/install/image_transport/share/image_transport/cmake)
-- Found image_publisher: 3.0.1 (/opt/ros/iron/share/image_publisher/cmake)
-- Found OpenCV: /usr (found version "4.5.4")
-- Found orbbec_camera_msgs: 1.2.2 (/home/ubuntu/WSS/ws_orbec2/install/orbbec_camera_msgs/share/orbbec_camera_msgs/cmake)
-- Found std_srvs: 5.0.0 (/home/ubuntu/ros2_iron/install/std_srvs/share/std_srvs/cmake)
-- Found tf2: 0.31.5 (/home/ubuntu/ros2_iron/install/tf2/share/tf2/cmake)
-- Found tf2_eigen: 0.31.5 (/home/ubuntu/ros2_iron/install/tf2_eigen/share/tf2_eigen/cmake)
-- Found tf2_sensor_msgs: 0.31.5 (/home/ubuntu/ros2_iron/install/tf2_sensor_msgs/share/tf2_sensor_msgs/cmake)
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for one of the modules 'libglog'
-- ORRBEC Machine : x86_64

-- ORRBEC Machine Bits : 64

-- Found ament_lint_auto: 0.14.2 (/home/ubuntu/ros2_iron/install/ament_lint_auto/share/ament_lint_auto/cmake)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/WSS/ws_orbec2/build/orbbec_camera
[  5%] Building CXX object CMakeFiles/orbbec_camera.dir/src/d2c_viewer.cpp.o
[ 11%] Building CXX object CMakeFiles/orbbec_camera_node.dir/rclcpp_components/node_main_orbbec_camera_node.cpp.o
[ 22%] Building CXX object CMakeFiles/orbbec_camera.dir/src/ob_camera_node.cpp.o
[ 22%] Building CXX object CMakeFiles/orbbec_camera.dir/src/ros_param_backend.cpp.o
[ 44%] Building CXX object CMakeFiles/orbbec_camera.dir/src/ros_service.cpp.o
[ 44%] Building CXX object CMakeFiles/orbbec_camera.dir/src/ob_camera_node_driver.cpp.o
[ 44%] Building CXX object CMakeFiles/orbbec_camera.dir/src/synced_imu_publisher.cpp.o
[ 44%] Building CXX object CMakeFiles/orbbec_camera.dir/src/dynamic_params.cpp.o
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/d2c_viewer.cpp:16:
/opt/ros/iron/include/cv_bridge/cv_bridge/cv_bridge.h:42:2: error: #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead [-Werror=cpp]
   42 | #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead
      |  ^~~~~~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node.h:31,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ros_service.cpp:17:
/opt/ros/iron/include/cv_bridge/cv_bridge/cv_bridge.h:42:2: error: #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead [-Werror=cpp]
   42 | #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead
      |  ^~~~~~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node.h:31,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ob_camera_node.cpp:17:
/opt/ros/iron/include/cv_bridge/cv_bridge/cv_bridge.h:42:2: error: #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead [-Werror=cpp]
   42 | #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead
      |  ^~~~~~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node.h:31,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node_driver.h:22,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ob_camera_node_driver.cpp:17:
/opt/ros/iron/include/cv_bridge/cv_bridge/cv_bridge.h:42:2: error: #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead [-Werror=cpp]
   42 | #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead
      |  ^~~~~~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ros_param_backend.cpp:17:
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ros_param_backend.h:26:7: error: ‘rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType’ has not been declared
   26 |       rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback);
      |       ^~~~~~
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ros_param_backend.cpp:30:6: error: variable or field ‘addOnSetParametersCallback’ declared void
   30 | void ParametersBackend::addOnSetParametersCallback(
      |      ^~~~~~~~~~~~~~~~~
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ros_param_backend.cpp:31:55: error: ‘OnParametersSetCallbackType’ is not a member of ‘rclcpp::node_interfaces::NodeParametersInterface’
   31 |     rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback) {
      |                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/dynamic_params.h:20,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/dynamic_params.cpp:16:
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ros_param_backend.h:26:7: error: ‘rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType’ has not been declared
   26 |       rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback);
      |       ^~~~~~
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/dynamic_params.cpp: In constructor ‘orbbec_camera::Parameters::Parameters(rclcpp::Node*)’:
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/dynamic_params.cpp:22:45: error: cannot convert ‘orbbec_camera::Parameters::Parameters(rclcpp::Node*)::<lambda(const std::vector<rclcpp::Parameter>&)>’ to ‘int’
   22 |   params_backend_.addOnSetParametersCallback(
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
   23 |       [this](const std::vector<rclcpp::Parameter> &parameters) {
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   24 |         for (const auto &parameter : parameters) {
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   25 |           if (param_functions_.find(parameter.get_name()) != param_functions_.end()) {
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   26 |             auto functions = param_functions_[parameter.get_name()];
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   27 |             if (functions.empty()) {
      |             ~~~~~~~~~~~~~~~~~~~~~~~~
   28 |               RCLCPP_WARN_STREAM(logger_, "Parameter " << parameter.get_name()
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   29 |                                                        << " can not be changed in runtime.");
      |                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   30 |             } else {
      |             ~~~~~~~~
   31 |               for (const auto &func : param_functions_[parameter.get_name()]) {
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   32 |                 func(parameter);
      |                 ~~~~~~~~~~~~~~~~
   33 |               }
      |               ~
   34 |             }
      |             ~
   35 |           }
      |           ~
   36 |         }
      |         ~
   37 |         rcl_interfaces::msg::SetParametersResult result;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   38 |         result.successful = true;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |         return result;
      |         ~~~~~~~~~~~~~~
   40 |       });
      |       ~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/dynamic_params.h:20,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/dynamic_params.cpp:16:
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ros_param_backend.h:26:85: note:   initializing argument 1 of ‘void orbbec_camera::ParametersBackend::addOnSetParametersCallback(int)’
   26 |       rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback);
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
gmake[2]: *** [CMakeFiles/orbbec_camera.dir/build.make:132: CMakeFiles/orbbec_camera.dir/src/ros_param_backend.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/orbbec_camera.dir/build.make:90: CMakeFiles/orbbec_camera.dir/src/dynamic_params.cpp.o] Error 1
[ 50%] Linking CXX executable orbbec_camera_node
[ 50%] Built target orbbec_camera_node
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/dynamic_params.h:20,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node.h:60,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node_driver.h:22,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ob_camera_node_driver.cpp:17:
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ros_param_backend.h:26:7: error: ‘rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType’ has not been declared
   26 |       rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback);
      |       ^~~~~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/dynamic_params.h:20,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node.h:60,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ob_camera_node.cpp:17:
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ros_param_backend.h:26:7: error: ‘rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType’ has not been declared
   26 |       rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback);
      |       ^~~~~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/dynamic_params.h:20,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node.h:60,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ros_service.cpp:17:
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ros_param_backend.h:26:7: error: ‘rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType’ has not been declared
   26 |       rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback);
      |       ^~~~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/orbbec_camera.dir/build.make:104: CMakeFiles/orbbec_camera.dir/src/ob_camera_node_driver.cpp.o] Error 1
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/orbbec_camera.dir/build.make:118: CMakeFiles/orbbec_camera.dir/src/ob_camera_node.cpp.o] Error 1
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/orbbec_camera.dir/build.make:146: CMakeFiles/orbbec_camera.dir/src/ros_service.cpp.o] Error 1
[Processing: orbbec_camera]
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/orbbec_camera.dir/build.make:76: CMakeFiles/orbbec_camera.dir/src/d2c_viewer.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:145: CMakeFiles/orbbec_camera.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
--- stderr: orbbec_camera
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/d2c_viewer.cpp:16:
/opt/ros/iron/include/cv_bridge/cv_bridge/cv_bridge.h:42:2: error: #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead [-Werror=cpp]
   42 | #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead
      |  ^~~~~~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node.h:31,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ros_service.cpp:17:
/opt/ros/iron/include/cv_bridge/cv_bridge/cv_bridge.h:42:2: error: #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead [-Werror=cpp]
   42 | #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead
      |  ^~~~~~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node.h:31,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ob_camera_node.cpp:17:
/opt/ros/iron/include/cv_bridge/cv_bridge/cv_bridge.h:42:2: error: #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead [-Werror=cpp]
   42 | #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead
      |  ^~~~~~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node.h:31,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node_driver.h:22,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ob_camera_node_driver.cpp:17:
/opt/ros/iron/include/cv_bridge/cv_bridge/cv_bridge.h:42:2: error: #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead [-Werror=cpp]
   42 | #warning This header is obsolete, please include cv_bridge/cv_bridge.hpp instead
      |  ^~~~~~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ros_param_backend.cpp:17:
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ros_param_backend.h:26:7: error: ‘rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType’ has not been declared
   26 |       rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback);
      |       ^~~~~~
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ros_param_backend.cpp:30:6: error: variable or field ‘addOnSetParametersCallback’ declared void
   30 | void ParametersBackend::addOnSetParametersCallback(
      |      ^~~~~~~~~~~~~~~~~
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ros_param_backend.cpp:31:55: error: ‘OnParametersSetCallbackType’ is not a member of ‘rclcpp::node_interfaces::NodeParametersInterface’
   31 |     rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback) {
      |                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/dynamic_params.h:20,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/dynamic_params.cpp:16:
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ros_param_backend.h:26:7: error: ‘rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType’ has not been declared
   26 |       rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback);
      |       ^~~~~~
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/dynamic_params.cpp: In constructor ‘orbbec_camera::Parameters::Parameters(rclcpp::Node*)’:
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/dynamic_params.cpp:22:45: error: cannot convert ‘orbbec_camera::Parameters::Parameters(rclcpp::Node*)::<lambda(const std::vector<rclcpp::Parameter>&)>’ to ‘int’
   22 |   params_backend_.addOnSetParametersCallback(
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
   23 |       [this](const std::vector<rclcpp::Parameter> &parameters) {
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   24 |         for (const auto &parameter : parameters) {
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   25 |           if (param_functions_.find(parameter.get_name()) != param_functions_.end()) {
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   26 |             auto functions = param_functions_[parameter.get_name()];
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   27 |             if (functions.empty()) {
      |             ~~~~~~~~~~~~~~~~~~~~~~~~
   28 |               RCLCPP_WARN_STREAM(logger_, "Parameter " << parameter.get_name()
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   29 |                                                        << " can not be changed in runtime.");
      |                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   30 |             } else {
      |             ~~~~~~~~
   31 |               for (const auto &func : param_functions_[parameter.get_name()]) {
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   32 |                 func(parameter);
      |                 ~~~~~~~~~~~~~~~~
   33 |               }
      |               ~
   34 |             }
      |             ~
   35 |           }
      |           ~
   36 |         }
      |         ~
   37 |         rcl_interfaces::msg::SetParametersResult result;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   38 |         result.successful = true;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |         return result;
      |         ~~~~~~~~~~~~~~
   40 |       });
      |       ~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/dynamic_params.h:20,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/dynamic_params.cpp:16:
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ros_param_backend.h:26:85: note:   initializing argument 1 of ‘void orbbec_camera::ParametersBackend::addOnSetParametersCallback(int)’
   26 |       rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback);
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
gmake[2]: *** [CMakeFiles/orbbec_camera.dir/build.make:132: CMakeFiles/orbbec_camera.dir/src/ros_param_backend.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/orbbec_camera.dir/build.make:90: CMakeFiles/orbbec_camera.dir/src/dynamic_params.cpp.o] Error 1
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/dynamic_params.h:20,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node.h:60,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node_driver.h:22,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ob_camera_node_driver.cpp:17:
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ros_param_backend.h:26:7: error: ‘rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType’ has not been declared
   26 |       rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback);
      |       ^~~~~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/dynamic_params.h:20,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node.h:60,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ob_camera_node.cpp:17:
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ros_param_backend.h:26:7: error: ‘rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType’ has not been declared
   26 |       rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback);
      |       ^~~~~~
In file included from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/dynamic_params.h:20,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ob_camera_node.h:60,
                 from /home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/src/ros_service.cpp:17:
/home/ubuntu/WSS/ws_orbec2/OrbbecSDK_ROS2/orbbec_camera/include/orbbec_camera/ros_param_backend.h:26:7: error: ‘rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType’ has not been declared
   26 |       rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback);
      |       ^~~~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/orbbec_camera.dir/build.make:104: CMakeFiles/orbbec_camera.dir/src/ob_camera_node_driver.cpp.o] Error 1
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/orbbec_camera.dir/build.make:118: CMakeFiles/orbbec_camera.dir/src/ob_camera_node.cpp.o] Error 1
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/orbbec_camera.dir/build.make:146: CMakeFiles/orbbec_camera.dir/src/ros_service.cpp.o] Error 1
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/orbbec_camera.dir/build.make:76: CMakeFiles/orbbec_camera.dir/src/d2c_viewer.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:145: CMakeFiles/orbbec_camera.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< orbbec_camera [33.6s, exited with code 2]

Summary: 0 packages finished [36.5s]
  1 package failed: orbbec_camera
  1 package had stderr output: orbbec_camera

For solving the problems you should change OnParametersSetCallbackType to OnSetParametersCallbackType under the following files:

        modified:   orbbec_camera/include/orbbec_camera/ros_param_backend.h
        modified:   orbbec_camera/src/ros_param_backend.cpp

And change #include "cv_bridge.h" to #include "cv_bridge.hpp" in the following files:

        modified:   orbbec_camera/src/d2c_viewer.cpp
        modified:   orbbec_camera/include/orbbec_camera/ob_camera_node.h
@Andrew-Infinite
Copy link

Thanks! It works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants