From 8076d4e930bbe739f3bc745873f7b4309d73c430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Wed, 17 Jan 2024 10:43:05 +0100 Subject: [PATCH 1/3] Depth image transport configure susbcribers (#844) (#845) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- depth_image_proc/src/point_cloud_xyzrgb.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/depth_image_proc/src/point_cloud_xyzrgb.cpp b/depth_image_proc/src/point_cloud_xyzrgb.cpp index c77a1e680..8bc94ae45 100644 --- a/depth_image_proc/src/point_cloud_xyzrgb.cpp +++ b/depth_image_proc/src/point_cloud_xyzrgb.cpp @@ -109,12 +109,27 @@ void PointCloudXyzrgbNode::connectCb() std::string depth_image_transport_param = "depth_image_transport"; image_transport::TransportHints depth_hints(this, "raw", depth_image_transport_param); + rclcpp::SubscriptionOptions sub_opts; + // Update the subscription options to allow reconfigurable qos settings. + sub_opts.qos_overriding_options = rclcpp::QosOverridingOptions { + { + // Here all policies that are desired to be reconfigurable are listed. + rclcpp::QosPolicyKind::Depth, + rclcpp::QosPolicyKind::Durability, + rclcpp::QosPolicyKind::History, + rclcpp::QosPolicyKind::Reliability, + }}; + // depth image can use different transport.(e.g. compressedDepth) - sub_depth_.subscribe(this, "depth_registered/image_rect", depth_hints.getTransport()); + sub_depth_.subscribe( + this, "depth_registered/image_rect", + depth_hints.getTransport(), rmw_qos_profile_default, sub_opts); // rgb uses normal ros transport hints. image_transport::TransportHints hints(this, "raw"); - sub_rgb_.subscribe(this, "rgb/image_rect_color", hints.getTransport()); + sub_rgb_.subscribe( + this, "rgb/image_rect_color", + hints.getTransport(), rmw_qos_profile_default, sub_opts); sub_info_.subscribe(this, "rgb/camera_info"); } } From 8e2c0c5de874e9edc79a74fadcf4c3c0b8e4db08 Mon Sep 17 00:00:00 2001 From: Michael Ferguson Date: Wed, 17 Jan 2024 08:56:15 -0500 Subject: [PATCH 2/3] add myself as a maintainer (#846) --- camera_calibration/package.xml | 1 + depth_image_proc/package.xml | 1 + image_pipeline/package.xml | 1 + image_proc/package.xml | 1 + image_publisher/package.xml | 1 + image_rotate/package.xml | 1 + image_view/package.xml | 1 + stereo_image_proc/package.xml | 1 + tracetools_image_pipeline/package.xml | 2 +- 9 files changed, 9 insertions(+), 1 deletion(-) diff --git a/camera_calibration/package.xml b/camera_calibration/package.xml index cbdb05e92..3528d1482 100644 --- a/camera_calibration/package.xml +++ b/camera_calibration/package.xml @@ -11,6 +11,7 @@ Vincent Rabaud Joshua Whitley Jacob Perron + Michael Ferguson BSD https://index.ros.org/p/camera_calibration/github-ros-perception-image_pipeline/ diff --git a/depth_image_proc/package.xml b/depth_image_proc/package.xml index 30b12a1c3..281a0d495 100644 --- a/depth_image_proc/package.xml +++ b/depth_image_proc/package.xml @@ -16,6 +16,7 @@ Joshua Whitley Chris Ye Jacob Perron + Michael Ferguson BSD https://index.ros.org/p/depth_image_proc/github-ros-perception-image_pipeline/ diff --git a/image_pipeline/package.xml b/image_pipeline/package.xml index a729b09bd..89072d396 100644 --- a/image_pipeline/package.xml +++ b/image_pipeline/package.xml @@ -8,6 +8,7 @@ Vincent Rabaud Joshua Whitley Jacob Perron + Michael Ferguson BSD https://index.ros.org/p/image_pipeline/github-ros-perception-image_pipeline/ diff --git a/image_proc/package.xml b/image_proc/package.xml index 95908c7e8..a54db2bbb 100644 --- a/image_proc/package.xml +++ b/image_proc/package.xml @@ -8,6 +8,7 @@ Vincent Rabaud Joshua Whitley Jacob Perron + Michael Ferguson BSD https://index.ros.org/p/image_proc/github-ros-perception-image_pipeline/ diff --git a/image_publisher/package.xml b/image_publisher/package.xml index ef8773b05..b8dd70ad2 100644 --- a/image_publisher/package.xml +++ b/image_publisher/package.xml @@ -14,6 +14,7 @@ Joshua Whitley Chris Ye Jacob Perron + Michael Ferguson BSD https://index.ros.org/p/image_publisher/github-ros-perception-image_pipeline/ diff --git a/image_rotate/package.xml b/image_rotate/package.xml index e95c2f674..ab6091460 100644 --- a/image_rotate/package.xml +++ b/image_rotate/package.xml @@ -27,6 +27,7 @@ Vincent Rabaud Joshua Whitley Jacob Perron + Michael Ferguson BSD https://index.ros.org/p/image_rotate/github-ros-perception-image_pipeline/ diff --git a/image_view/package.xml b/image_view/package.xml index 85f372c32..2dd029db3 100644 --- a/image_view/package.xml +++ b/image_view/package.xml @@ -11,6 +11,7 @@ Vincent Rabaud Joshua Whitley Jacob Perron + Michael Ferguson BSD https://index.ros.org/p/image_view/github-ros-perception-image_pipeline/ diff --git a/stereo_image_proc/package.xml b/stereo_image_proc/package.xml index c1e29b83a..e00a72aa6 100644 --- a/stereo_image_proc/package.xml +++ b/stereo_image_proc/package.xml @@ -8,6 +8,7 @@ Vincent Rabaud Joshua Whitley Jacob Perron + Michael Ferguson BSD https://index.ros.org/p/stereo_image_proc/github-ros-perception-image_pipeline/ diff --git a/tracetools_image_pipeline/package.xml b/tracetools_image_pipeline/package.xml index 5d4eb498e..15f99bea3 100644 --- a/tracetools_image_pipeline/package.xml +++ b/tracetools_image_pipeline/package.xml @@ -7,10 +7,10 @@ LTTng tracing provider wrapper for image_pipeline ROS 2 meta-package. Víctor Mayoral-Vilches + Michael Ferguson Apache 2.0 Víctor Mayoral-Vilches - ament_cmake_ros pkg-config From 24dec5202e278d510fd050073edd677eb1912cb2 Mon Sep 17 00:00:00 2001 From: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com> Date: Wed, 17 Jan 2024 23:27:27 +0900 Subject: [PATCH 3/3] fix: change type for epsilon (#822) Signed-off-by: wep21 --- stereo_image_proc/src/stereo_image_proc/disparity_node.cpp | 2 +- stereo_image_proc/src/stereo_image_proc/point_cloud_node.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stereo_image_proc/src/stereo_image_proc/disparity_node.cpp b/stereo_image_proc/src/stereo_image_proc/disparity_node.cpp index f9f9207eb..d092fcc05 100644 --- a/stereo_image_proc/src/stereo_image_proc/disparity_node.cpp +++ b/stereo_image_proc/src/stereo_image_proc/disparity_node.cpp @@ -166,7 +166,7 @@ DisparityNode::DisparityNode(const rclcpp::NodeOptions & options) // Declare/read parameters int queue_size = this->declare_parameter("queue_size", 5); bool approx = this->declare_parameter("approximate_sync", false); - bool approx_sync_epsilon = this->declare_parameter("approximate_sync_tolerance_seconds", 0.0); + double approx_sync_epsilon = this->declare_parameter("approximate_sync_tolerance_seconds", 0.0); this->declare_parameter("use_system_default_qos", false); // Synchronize callbacks diff --git a/stereo_image_proc/src/stereo_image_proc/point_cloud_node.cpp b/stereo_image_proc/src/stereo_image_proc/point_cloud_node.cpp index 692db0882..ddbf752a0 100644 --- a/stereo_image_proc/src/stereo_image_proc/point_cloud_node.cpp +++ b/stereo_image_proc/src/stereo_image_proc/point_cloud_node.cpp @@ -110,7 +110,7 @@ PointCloudNode::PointCloudNode(const rclcpp::NodeOptions & options) // Declare/read parameters int queue_size = this->declare_parameter("queue_size", 5); bool approx = this->declare_parameter("approximate_sync", false); - bool approx_sync_epsilon = this->declare_parameter("approximate_sync_tolerance_seconds", 0.0); + double approx_sync_epsilon = this->declare_parameter("approximate_sync_tolerance_seconds", 0.0); this->declare_parameter("use_system_default_qos", false); rcl_interfaces::msg::ParameterDescriptor descriptor; // TODO(ivanpauno): Confirm if using point cloud padding in `sensor_msgs::msg::PointCloud2`