mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-09 22:29:48 +08:00
feat: add StreamConfigurationError exception handling for stream setup
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <queue>
|
||||
#include <rclcpp/rclcpp.hpp>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
@@ -136,6 +137,11 @@
|
||||
#define DEVICE_PATH "/dev/camsync"
|
||||
|
||||
namespace orbbec_camera {
|
||||
class StreamConfigurationError : public std::runtime_error {
|
||||
public:
|
||||
explicit StreamConfigurationError(const std::string& message) : std::runtime_error(message) {}
|
||||
};
|
||||
|
||||
using GetDeviceConfig = orbbec_camera_msgs::srv::GetDeviceConfig;
|
||||
using GetActionConfig = orbbec_camera_msgs::srv::GetActionConfig;
|
||||
using GetDeviceInfo = orbbec_camera_msgs::srv::GetDeviceInfo;
|
||||
|
||||
@@ -114,6 +114,7 @@ class OBCameraNodeDriver : public rclcpp::Node {
|
||||
std::atomic_bool is_alive_{false};
|
||||
std::atomic_bool device_connected_{false};
|
||||
std::atomic_bool device_connecting_{false};
|
||||
std::atomic_bool stream_configuration_error_{false};
|
||||
std::string serial_number_;
|
||||
std::string device_unique_id_;
|
||||
std::string usb_port_;
|
||||
|
||||
Reference in New Issue
Block a user