fix read orbbec config

This commit is contained in:
Joe Dong
2023-03-22 16:10:22 +08:00
parent 1b4e4ade0e
commit 9cf0fa5eb7
3 changed files with 1082 additions and 1 deletions
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;
+4 -1
View File
@@ -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();
}