feat: add parameter synchronization and validation methods in Parameters and OBCameraNode classes

This commit is contained in:
ob-yalian
2026-06-05 09:15:38 +08:00
parent e363537da4
commit c086004c19
4 changed files with 182 additions and 19 deletions
@@ -40,12 +40,14 @@ class Parameters {
template <class T>
void setParamValue(T& param, const T& value); // function updates the parameter value both
// locally and in the parameters server
void syncParameterValue(const std::string& param_name, const std::string& value);
void removeParam(const std::string& param_name);
private:
private:
rclcpp::Node* node_;
rclcpp::Logger logger_;
bool suppress_runtime_change_warning_ = false;
std::map<std::string, std::vector<std::function<void(const rclcpp::Parameter&)> > >
param_functions_;
std::map<void*, std::string> param_names_;
@@ -552,6 +552,9 @@ class OBCameraNode {
void setupLeftIrPostProcessFilter();
void setupUndistortionFilters();
bool shouldUseHwD2CColorUndistortion() const;
bool isHwD2CProfileSupported() const;
bool shouldUseGeneratedCameraInfo(const stream_index_pair& stream_index) const;
std::string getEffectiveOpticalFrameId(const stream_index_pair& stream_index) const;
void configureHwD2CColorUndistortion(const std::shared_ptr<ob::Frame>& depth_frame);
void applyHwD2CColorUndistortion(std::shared_ptr<ob::FrameSet>& frame_set,
const std::shared_ptr<ob::Frame>& depth_frame);