File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
include/depthai_ros_driver/dai_nodes Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 5
5
6
6
#include " depthai-shared/common/CameraBoardSocket.hpp"
7
7
#include " depthai/pipeline/Node.hpp"
8
+ #include " depthai_ros_driver/param_handlers/camera_param_handler.hpp"
8
9
#include " depthai_ros_driver/utils.hpp"
9
10
#include " rclcpp/logger.hpp"
10
11
@@ -99,6 +100,8 @@ class BaseNode {
99
100
std::string baseDAINodeName;
100
101
bool intraProcessEnabled;
101
102
rclcpp::Logger logger;
103
+
104
+ std::unique_ptr<param_handlers::CameraParamHandler> ph;
102
105
};
103
106
} // namespace dai_nodes
104
107
} // namespace depthai_ros_driver
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ namespace dai_nodes {
15
15
BaseNode::BaseNode (const std::string& daiNodeName, std::shared_ptr<rclcpp::Node> node, std::shared_ptr<dai::Pipeline> /* pipeline*/ )
16
16
: baseNode(node), baseDAINodeName(daiNodeName), logger(node->get_logger ()) {
17
17
intraProcessEnabled = node->get_node_options ().use_intra_process_comms ();
18
+ ph = std::make_unique<param_handlers::CameraParamHandler>(baseNode, " camera" );
18
19
};
19
20
BaseNode::~BaseNode () = default ;
20
21
void BaseNode::setNodeName (const std::string& daiNodeName) {
@@ -46,6 +47,10 @@ std::string BaseNode::getSocketName(dai::CameraBoardSocket socket) {
46
47
}
47
48
48
49
std::string BaseNode::getTFPrefix (const std::string& frameName) {
50
+ if (ph->getParam <bool >(" i_publish_tf_from_calibration" )) {
51
+ return ph->getParam <std::string>(" i_tf_base_frame" ) + " _" + frameName;
52
+ }
53
+
49
54
return std::string (getROSNode ()->get_name ()) + " _" + frameName;
50
55
}
51
56
You can’t perform that action at this time.
0 commit comments