mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-12 19:20:20 +08:00
fix read orbbec config
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -68,6 +68,7 @@ class OBCameraNodeDriver : public rclcpp::Node {
|
||||
void deviceCountUpdate();
|
||||
|
||||
private:
|
||||
std::string config_path_;
|
||||
std::unique_ptr<ob::Context> ctx_ = nullptr;
|
||||
rclcpp::Logger logger_;
|
||||
std::unique_ptr<OBCameraNode> ob_camera_node_ = nullptr;
|
||||
|
||||
@@ -15,11 +15,14 @@
|
||||
#include <unistd.h>
|
||||
#include <semaphore.h>
|
||||
#include <sys/shm.h>
|
||||
#include <ament_index_cpp/get_package_share_directory.hpp>
|
||||
|
||||
namespace orbbec_camera {
|
||||
OBCameraNodeDriver::OBCameraNodeDriver(const rclcpp::NodeOptions &node_options)
|
||||
: Node("orbbec_camera_node", "/", node_options),
|
||||
ctx_(std::make_unique<ob::Context>()),
|
||||
config_path_(ament_index_cpp::get_package_share_directory("orbbec_camera") +
|
||||
"/config/OrbbecSDKConfig_v1.0.xml"),
|
||||
ctx_(std::make_unique<ob::Context>(config_path_.c_str())),
|
||||
logger_(this->get_logger()) {
|
||||
init();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user