Skip to content

Commit

Permalink
Fixed crash due to already declared parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
FranzAlbers committed Dec 11, 2023
1 parent 1bafc35 commit 6490198
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions draco_point_cloud_transport/src/draco_subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@ namespace draco_point_cloud_transport
{
void DracoSubscriber::declareParameters()
{
declareParam<bool>(std::string("SkipDequantizationPOSITION"), false);
declareParam<bool>(std::string("SkipDequantizationNORMAL"), false);
declareParam<bool>(std::string("SkipDequantizationCOLOR"), false);
declareParam<bool>(std::string("SkipDequantizationTEX_COORD"), false);
declareParam<bool>(std::string("SkipDequantizationGENERIC"), false);
try{
declareParam<bool>(std::string("SkipDequantizationPOSITION"), false);
declareParam<bool>(std::string("SkipDequantizationNORMAL"), false);
declareParam<bool>(std::string("SkipDequantizationCOLOR"), false);
declareParam<bool>(std::string("SkipDequantizationTEX_COORD"), false);
declareParam<bool>(std::string("SkipDequantizationGENERIC"), false);
} catch (rclcpp::exceptions::ParameterAlreadyDeclaredException & e) {
RCLCPP_DEBUG(this->getLogger(), e.what());
}

auto param_change_callback =
[this](std::vector<rclcpp::Parameter> parameters) -> rcl_interfaces::msg::SetParametersResult
Expand Down

0 comments on commit 6490198

Please sign in to comment.