Skip to content

Commit

Permalink
Add enable_type_description_service node option - API only (ros2#1060)
Browse files Browse the repository at this point in the history
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
  • Loading branch information
emersonknapp authored and danthony06 committed Jun 14, 2023
1 parent b1aed1e commit 450c9a4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rcl/include/rcl/node_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ 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.
bool enable_type_description_service;
} rcl_node_options_t;

/// Return the default node options in a rcl_node_options_t.
Expand Down
6 changes: 6 additions & 0 deletions rcl/src/rcl/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,12 @@ 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;
TRACEPOINT(
Expand Down
2 changes: 2 additions & 0 deletions rcl/src/rcl/node_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,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,
};
return default_options;
}
Expand All @@ -62,6 +63,7 @@ rcl_node_options_copy(
options_out->use_global_arguments = options->use_global_arguments;
options_out->enable_rosout = options->enable_rosout;
options_out->rosout_qos = options->rosout_qos;
options_out->enable_type_description_service = options->enable_type_description_service;
if (NULL != options->arguments.impl) {
return rcl_arguments_copy(&(options->arguments), &(options_out->arguments));
}
Expand Down

0 comments on commit 450c9a4

Please sign in to comment.