Skip to content

Commit

Permalink
Specialize templates to get fully qualified name (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
domire8 committed Jul 11, 2023
1 parent 007575b commit f963acb
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.9
2.2.10
2 changes: 1 addition & 1 deletion doxygen/doxygen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Modulo"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 2.2.9
PROJECT_NUMBER = 2.2.10

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion source/modulo_component_interfaces/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>modulo_component_interfaces</name>
<version>2.2.9</version>
<version>2.2.10</version>
<description>Interface package for communicating with modulo components through the ROS framework</description>
<maintainer email="enrico@aica.tech">Enrico Eberhard</maintainer>
<license>GPLv3</license>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,7 @@ inline state_representation::CartesianPose ComponentInterface<NodeT>::lookup_tra
template<class NodeT>
inline void ComponentInterface<NodeT>::publish_predicate(const std::string& name) {
modulo_component_interfaces::msg::Predicate message;
message.component = this->get_fully_qualified_name();
message.component = this->get_node_base_interface()->get_fully_qualified_name();
message.predicate = name;
message.value = this->get_predicate(name);
this->predicate_publisher_->publish(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ def _publish_predicate(self, name):
self.get_logger().error(f"Predicate '{name}' has invalid type: expected 'bool', got '{type(value)}'.",
throttle_duration_sec=1.0)
return
message.component = self.get_name()
message.component = self.get_fully_qualified_name()
message.predicate = name
self._predicate_publisher.publish(message)

Expand Down
2 changes: 1 addition & 1 deletion source/modulo_components/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>modulo_components</name>
<version>2.2.9</version>
<version>2.2.10</version>
<description>Modulo base classes that wrap ROS2 Nodes as modular components for the AICA application framework</description>
<maintainer email="baptiste@aica.tech">Baptiste Busch</maintainer>
<maintainer email="enrico@aica.tech">Enrico Eberhard</maintainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ TEST_F(ComponentCommunicationTest, InputOutputManual) {
TEST_F(ComponentCommunicationTest, Trigger) {
auto trigger = std::make_shared<Trigger>(rclcpp::NodeOptions());
auto listener =
std::make_shared<modulo_utils::testutils::PredicatesListener>("trigger", std::vector<std::string>{"test"});
std::make_shared<modulo_utils::testutils::PredicatesListener>("/trigger", std::vector<std::string>{"test"});
this->exec_->add_node(listener);
this->exec_->add_node(trigger);
auto result_code = this->exec_->spin_until_future_complete(listener->get_predicate_future(), 500ms);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ TEST_F(LifecycleComponentCommunicationTest, InputOutputManual) {
TEST_F(LifecycleComponentCommunicationTest, Trigger) {
auto trigger = std::make_shared<LifecycleTrigger>(rclcpp::NodeOptions());
auto listener =
std::make_shared<modulo_utils::testutils::PredicatesListener>("trigger", std::vector<std::string>{"test"});
std::make_shared<modulo_utils::testutils::PredicatesListener>("/trigger", std::vector<std::string>{"test"});
this->exec_->add_node(trigger->get_node_base_interface());
trigger->configure();
this->exec_->add_node(listener);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_input_output_invalid(ros_exec, make_minimal_invalid_encoded_state_publi

def test_trigger(ros_exec, make_predicates_listener):
trigger = Trigger()
listener = make_predicates_listener("trigger", ["test"])
listener = make_predicates_listener("/trigger", ["test"])
ros_exec.add_node(listener)
ros_exec.add_node(trigger)
ros_exec.spin_until_future_complete(listener.predicates_future, timeout_sec=0.5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test_input_output_invalid(ros_exec, make_lifecycle_change_client, make_minim

def test_trigger(ros_exec, make_lifecycle_change_client, make_predicates_listener):
trigger = Trigger()
listener = make_predicates_listener("trigger", ["test"])
listener = make_predicates_listener("/trigger", ["test"])
client = make_lifecycle_change_client("trigger")
ros_exec.add_node(trigger)
ros_exec.add_node(listener)
Expand Down
2 changes: 1 addition & 1 deletion source/modulo_core/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>modulo_core</name>
<version>2.2.9</version>
<version>2.2.10</version>
<description>Modulo Core communication and translation utilities for interoperability with AICA Control Libraries</description>
<maintainer email="baptiste@aica.tech">Baptiste Busch</maintainer>
<maintainer email="enrico@aica.tech">Enrico Eberhard</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion source/modulo_utils/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>modulo_utils</name>
<version>2.2.9</version>
<version>2.2.10</version>
<description>Modulo utils package for shared test fixtures</description>
<maintainer email="dominic@aica.tech">Dominic Reber</maintainer>
<license>GPLv3</license>
Expand Down

0 comments on commit f963acb

Please sign in to comment.