Skip to content

Commit

Permalink
Enable get_type_description service by default
Browse files Browse the repository at this point in the history
Signed-off-by: Hans-Joachim Krauch <achim.krauch@gmail.com>
  • Loading branch information
achim-k committed Jun 12, 2023
1 parent ad8aa93 commit 61ca3dc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rcl/include/rcl/node_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ typedef struct rcl_node_options_s
/// Middleware quality of service settings for /rosout.
rmw_qos_profile_t rosout_qos;

/// Register the ~/get_type_description service. Defaults to false.
/// Register the ~/get_type_description service. Defaults to true.
bool enable_type_description_service;
} rcl_node_options_t;

Expand Down
6 changes: 0 additions & 6 deletions rcl/src/rcl/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,6 @@ rcl_node_init(
goto fail;
}
}
if (node->impl->options.enable_type_description_service) {
RCUTILS_LOG_WARN_NAMED(
ROS_PACKAGE_NAME,
"Requested ~/get_type_description service enabled, but feature is not yet implemented. "
"Service is not created.");
}
RCUTILS_LOG_DEBUG_NAMED(ROS_PACKAGE_NAME, "Node initialized");
ret = RCL_RET_OK;
TRACETOOLS_TRACEPOINT(
Expand Down
2 changes: 1 addition & 1 deletion rcl/src/rcl/node_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ rcl_node_get_default_options()
.arguments = rcl_get_zero_initialized_arguments(),
.enable_rosout = true,
.rosout_qos = rcl_qos_profile_rosout_default,
.enable_type_description_service = false,
.enable_type_description_service = true,
};
return default_options;
}
Expand Down
3 changes: 3 additions & 0 deletions rcl/test/rcl/test_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class CLASSNAME (TestGraphFixture, RMW_IMPLEMENTATION) : public ::testing::Test
*this->old_node_ptr = rcl_get_zero_initialized_node();
const char * old_name = "old_node_name";
rcl_node_options_t node_options = rcl_node_get_default_options();
node_options.enable_type_description_service = false;
ret = rcl_node_init(this->old_node_ptr, old_name, "", this->old_context_ptr, &node_options);
ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
ret = rcl_shutdown(this->old_context_ptr); // after this, the old_node_ptr should be invalid
Expand Down Expand Up @@ -939,6 +940,7 @@ class NodeGraphMultiNodeFixture : public CLASSNAME(TestGraphFixture, RMW_IMPLEME
remote_node_ptr = new rcl_node_t;
*remote_node_ptr = rcl_get_zero_initialized_node();
rcl_node_options_t node_options = rcl_node_get_default_options();
node_options.enable_type_description_service = false;

this->remote_context_ptr = new rcl_context_t;
*this->remote_context_ptr = rcl_get_zero_initialized_context();
Expand Down Expand Up @@ -1414,6 +1416,7 @@ TEST_F(CLASSNAME(TestGraphFixture, RMW_IMPLEMENTATION), test_graph_guard_conditi
// Graph change since adding new node
rcl_node_t node_new = rcl_get_zero_initialized_node();
rcl_node_options_t node_options = rcl_node_get_default_options();
node_options.enable_type_description_service = false;
ret = rcl_node_init(&node_new, "test_graph2", "", context_ptr, &node_options);
ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;

Expand Down

0 comments on commit 61ca3dc

Please sign in to comment.