mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 20:17:47 +08:00
feat: support multiple ROS 2 distributions
This commit is contained in:
@@ -14,12 +14,20 @@
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
#pragma once
|
||||
#include <sensor_msgs/msg/image.hpp>
|
||||
#include <rclcpp/rclcpp.hpp>
|
||||
|
||||
#if __has_include(<message_filters/subscriber.hpp>)
|
||||
#include <message_filters/subscriber.hpp>
|
||||
#include <message_filters/sync_policies/approximate_time.hpp>
|
||||
#include <message_filters/synchronizer.hpp>
|
||||
#include <message_filters/time_synchronizer.hpp>
|
||||
#include <sensor_msgs/msg/image.hpp>
|
||||
#include <rclcpp/rclcpp.hpp>
|
||||
#elif __has_include(<message_filters/subscriber.h>)
|
||||
#include <message_filters/subscriber.h>
|
||||
#include <message_filters/sync_policies/approximate_time.h>
|
||||
#include <message_filters/synchronizer.h>
|
||||
#else
|
||||
#error "No compatible message_filters headers found"
|
||||
#endif
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <sensor_msgs/msg/point_cloud2.hpp>
|
||||
#include <sensor_msgs/point_cloud2_iterator.hpp>
|
||||
#include <tf2_ros/static_transform_broadcaster.hpp>
|
||||
#include <tf2_ros/transform_broadcaster.hpp>
|
||||
#include <tf2/LinearMath/Quaternion.hpp>
|
||||
#include <tf2/LinearMath/Vector3.hpp>
|
||||
#include <tf2/LinearMath/Transform.hpp>
|
||||
#include <std_srvs/srv/set_bool.hpp>
|
||||
#include <std_srvs/srv/empty.hpp>
|
||||
#include <diagnostic_updater/diagnostic_updater.hpp>
|
||||
@@ -81,6 +76,26 @@
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if __has_include(<tf2/LinearMath/Quaternion.hpp>)
|
||||
#include <tf2/LinearMath/Quaternion.hpp>
|
||||
#include <tf2/LinearMath/Vector3.hpp>
|
||||
#elif __has_include(<tf2/LinearMath/Quaternion.h>)
|
||||
#include <tf2/LinearMath/Quaternion.h>
|
||||
#include <tf2/LinearMath/Vector3.h>
|
||||
#else
|
||||
#error "No compatible tf2 LinearMath headers found"
|
||||
#endif
|
||||
|
||||
#if __has_include(<tf2_ros/static_transform_broadcaster.hpp>)
|
||||
#include <tf2_ros/static_transform_broadcaster.hpp>
|
||||
#include <tf2_ros/transform_broadcaster.hpp>
|
||||
#elif __has_include(<tf2_ros/static_transform_broadcaster.h>)
|
||||
#include <tf2_ros/static_transform_broadcaster.h>
|
||||
#include <tf2_ros/transform_broadcaster.h>
|
||||
#else
|
||||
#error "No compatible tf2_ros broadcaster headers found"
|
||||
#endif
|
||||
|
||||
#if __has_include(<cv_bridge/cv_bridge.hpp>)
|
||||
#include <cv_bridge/cv_bridge.hpp>
|
||||
#elif __has_include(<cv_bridge/cv_bridge.h>)
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
#include <sensor_msgs/msg/laser_scan.hpp>
|
||||
#include <sensor_msgs/msg/point_cloud2.hpp>
|
||||
#include <sensor_msgs/point_cloud2_iterator.hpp>
|
||||
#include <tf2_ros/static_transform_broadcaster.hpp>
|
||||
#include <tf2_ros/transform_broadcaster.hpp>
|
||||
#include <tf2/LinearMath/Quaternion.hpp>
|
||||
#include <tf2/LinearMath/Vector3.hpp>
|
||||
#include <tf2/LinearMath/Transform.hpp>
|
||||
#include <std_srvs/srv/set_bool.hpp>
|
||||
#include <std_srvs/srv/empty.hpp>
|
||||
#include <diagnostic_updater/diagnostic_updater.hpp>
|
||||
@@ -66,6 +61,26 @@
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if __has_include(<tf2/LinearMath/Quaternion.hpp>)
|
||||
#include <tf2/LinearMath/Quaternion.hpp>
|
||||
#include <tf2/LinearMath/Vector3.hpp>
|
||||
#elif __has_include(<tf2/LinearMath/Quaternion.h>)
|
||||
#include <tf2/LinearMath/Quaternion.h>
|
||||
#include <tf2/LinearMath/Vector3.h>
|
||||
#else
|
||||
#error "No compatible tf2 LinearMath headers found"
|
||||
#endif
|
||||
|
||||
#if __has_include(<tf2_ros/static_transform_broadcaster.hpp>)
|
||||
#include <tf2_ros/static_transform_broadcaster.hpp>
|
||||
#include <tf2_ros/transform_broadcaster.hpp>
|
||||
#elif __has_include(<tf2_ros/static_transform_broadcaster.h>)
|
||||
#include <tf2_ros/static_transform_broadcaster.h>
|
||||
#include <tf2_ros/transform_broadcaster.h>
|
||||
#else
|
||||
#error "No compatible tf2_ros broadcaster headers found"
|
||||
#endif
|
||||
|
||||
#if __has_include(<cv_bridge/cv_bridge.hpp>)
|
||||
#include <cv_bridge/cv_bridge.hpp>
|
||||
#elif __has_include(<cv_bridge/cv_bridge.h>)
|
||||
|
||||
@@ -17,13 +17,19 @@
|
||||
#pragma once
|
||||
#include <ostream>
|
||||
#include <Eigen/Dense>
|
||||
#include <tf2/LinearMath/Quaternion.hpp>
|
||||
#include <rclcpp/rclcpp.hpp>
|
||||
|
||||
#include "libobsensor/ObSensor.hpp"
|
||||
#include "sensor_msgs/distortion_models.hpp"
|
||||
#include "sensor_msgs/msg/camera_info.hpp"
|
||||
#include "orbbec_camera_msgs/msg/extrinsics.hpp"
|
||||
#if __has_include(<tf2/LinearMath/Quaternion.hpp>)
|
||||
#include <tf2/LinearMath/Quaternion.hpp>
|
||||
#elif __has_include(<tf2/LinearMath/Quaternion.h>)
|
||||
#include <tf2/LinearMath/Quaternion.h>
|
||||
#else
|
||||
#error "No compatible tf2 Quaternion header found"
|
||||
#endif
|
||||
#include <sensor_msgs/msg/point_cloud2.hpp>
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
Reference in New Issue
Block a user