summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--0001-start-color-sensor-before-stereo.patch53
-rw-r--r--realsense2-camera.spec7
2 files changed, 59 insertions, 1 deletions
diff --git a/0001-start-color-sensor-before-stereo.patch b/0001-start-color-sensor-before-stereo.patch
new file mode 100644
index 0000000..dbf744a
--- /dev/null
+++ b/0001-start-color-sensor-before-stereo.patch
@@ -0,0 +1,53 @@
+From 310p-color-first Mon Sep 17 00:00:00 2001
+From: openEuler Embodied AI Team <embodied-ai@openeuler.org>
+Date: Tue, 28 Jul 2026 00:00:00 +0000
+Subject: [PATCH] Start color sensor before stereo sensor
+
+On the affected 310P USB path, configuring Stereo before RGB can leave the
+shared control endpoint unable to complete the later Color format setup.
+Keep the existing relative order for all other sensors while starting the
+Color sensor first.
+
+This is a startup-order workaround. It does not suppress or repair the
+underlying UVC control transfer failure.
+---
+ src/rs_node_setup.cpp | 17 +++++++++++++++--
+ 1 file changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/src/rs_node_setup.cpp b/src/rs_node_setup.cpp
+index 2106bdf..b28f986 100755
+--- a/src/rs_node_setup.cpp
++++ b/src/rs_node_setup.cpp
+@@ -13,6 +13,7 @@
+ // limitations under the License.
+
+ #include "../include/base_realsense_node.h"
++#include <algorithm>
+ #include <image_publisher.h>
+ #include <fstream>
+ #include <rclcpp/qos.hpp>
+@@ -491,7 +492,21 @@ void BaseRealSenseNode::stopRequiredSensors()
+ void BaseRealSenseNode::startUpdatedSensors()
+ {
+ try{
+- for(auto&& sensor : _available_ros_sensors)
++ std::vector<RosSensor*> sensors_to_start;
++ sensors_to_start.reserve(_available_ros_sensors.size());
++ for (auto& sensor : _available_ros_sensors)
++ sensors_to_start.push_back(sensor.get());
++
++ // Configure RGB before Stereo so the shared EP0 control failure cannot
++ // interrupt the Color UVC format negotiation.
++ std::stable_sort(sensors_to_start.begin(), sensors_to_start.end(),
++ [](const RosSensor* lhs, const RosSensor* rhs) {
++ const bool lhs_is_color = lhs->is<rs2::color_sensor>();
++ const bool rhs_is_color = rhs->is<rs2::color_sensor>();
++ return lhs_is_color && !rhs_is_color;
++ });
++
++ for(auto* sensor : sensors_to_start)
+ {
+ std::string module_name(rs2_to_ros(sensor->get_info(RS2_CAMERA_INFO_NAME)));
+ // if active_profiles != wanted_profiles: stop sensor.
+--
+2.43.0
diff --git a/realsense2-camera.spec b/realsense2-camera.spec
index 8ce0127..bc96d5d 100644
--- a/realsense2-camera.spec
+++ b/realsense2-camera.spec
@@ -11,12 +11,13 @@
Name: ros-%{ros_distro}-%{RosPkgName}
Version: 4.57.7
-Release: 4%{?dist}%{?release_suffix}
+Release: 5%{?dist}%{?release_suffix}
Summary: RealSense camera package allowing access to RealSense D400 3D cameras
Url: http://www.ros.org/wiki/RealSense
License: Apache License 2.0
Source0: %{RosPkgName}-%{version}.tar.gz
+Patch0: 0001-start-color-sensor-before-stereo.patch
Requires: eigen3-devel
Requires: ros-%{ros_distro}-builtin-interfaces
@@ -141,5 +142,9 @@ else echo "RPM TESTS SKIPPED"; fi
/opt/ros/%{ros_distro}
%changelog
+* Wed Aug 12 2026 openEuler Embodied AI Team embodied-ai@openeuler.org - 4.57.7-5
+- Start the color sensor before the stereo sensor on the affected 310P USB path
+- Preserve the existing relative order for all other sensors
+
* Fri Apr 03 2026 LibRealSense Team rsswsdk@realsensecloud.onmicrosoft.com - 4.57.7-4
- Autogenerated by ros-porting-tools