diff --git a/source/modulo_components/include/modulo_components/LifecycleComponent.hpp b/source/modulo_components/include/modulo_components/LifecycleComponent.hpp index 5514c2a0..80704e11 100644 --- a/source/modulo_components/include/modulo_components/LifecycleComponent.hpp +++ b/source/modulo_components/include/modulo_components/LifecycleComponent.hpp @@ -277,7 +277,7 @@ class LifecycleComponent : public rclcpp_lifecycle::LifecycleNode, public Compon std::map< std::string, std::function(const std::string& topic_name)>> - output_configuration_callables_;///< Map of configuration callables + output_configuration_callables_;///< Map of output configuration callables }; template diff --git a/source/modulo_components/src/LifecycleComponent.cpp b/source/modulo_components/src/LifecycleComponent.cpp index 5eb566f0..d4fc20d3 100644 --- a/source/modulo_components/src/LifecycleComponent.cpp +++ b/source/modulo_components/src/LifecycleComponent.cpp @@ -243,7 +243,7 @@ bool LifecycleComponent::configure_outputs() { auto topic_name = this->get_parameter_value(name + "_topic"); RCLCPP_DEBUG_STREAM( this->get_logger(), "Configuring output '" << name << "' with topic name '" << topic_name << "'."); - interface = this->configuration_callables_.at(name)(topic_name); + interface = this->output_configuration_callables_.at(name)(topic_name); } catch (const modulo_core::exceptions::CoreException& ex) { success = false; RCLCPP_ERROR_STREAM(this->get_logger(), "Failed to configure output '" << name << "': " << ex.what()); diff --git a/source/modulo_components/test/cpp/test_component_interface.cpp b/source/modulo_components/test/cpp/test_component_interface.cpp index bb2073ac..305fce69 100644 --- a/source/modulo_components/test/cpp/test_component_interface.cpp +++ b/source/modulo_components/test/cpp/test_component_interface.cpp @@ -110,9 +110,7 @@ TYPED_TEST(ComponentInterfaceTest, AddRemoveInput) { this->component_->remove_input("test_13"); EXPECT_TRUE(this->component_->inputs_.find("test_13") == this->component_->inputs_.end()); - auto sensor_msg_data = std::make_shared(); - sensor_msg_data->height = 480; - EXPECT_NO_THROW(this->component_->add_input("sensor_msg_data", sensor_msg_data)); + EXPECT_NO_THROW(this->component_->add_input("sensor_msg_data", std::make_shared())); EXPECT_FALSE(this->component_->inputs_.find("sensor_msg_data") == this->component_->inputs_.end()); }