ROS 2 rclcpp + rcl - kilted
kilted
ROS 2 C++ Client Library with ROS Client Library
|
#include <stdint.h>
#include "rcl/allocator.h"
#include "rcl/arguments.h"
#include "rcl/context.h"
#include "rcl/guard_condition.h"
#include "rcl/macros.h"
#include "rcl/node_options.h"
#include "rcl/types.h"
#include "rcl/visibility_control.h"
#include "type_description_interfaces/srv/get_type_description.h"
Go to the source code of this file.
Classes | |
struct | rcl_node_s |
Structure which encapsulates a ROS Node. More... | |
Typedefs | |
typedef struct rcl_node_impl_s | rcl_node_impl_t |
typedef struct rcl_service_s | rcl_service_t |
typedef struct rcl_node_s | rcl_node_t |
Structure which encapsulates a ROS Node. | |
Functions | |
RCL_PUBLIC RCL_WARN_UNUSED rcl_node_t | rcl_get_zero_initialized_node (void) |
Return a rcl_node_t struct with members initialized to NULL . | |
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t | rcl_node_init (rcl_node_t *node, const char *name, const char *namespace_, rcl_context_t *context, const rcl_node_options_t *options) |
Initialize a ROS node. More... | |
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t | rcl_node_fini (rcl_node_t *node) |
Finalize a rcl_node_t. More... | |
RCL_PUBLIC bool | rcl_node_is_valid (const rcl_node_t *node) |
Return true if the node is valid, else false . More... | |
RCL_PUBLIC bool | rcl_node_is_valid_except_context (const rcl_node_t *node) |
Return true if node is valid, except for the context being valid. More... | |
RCL_PUBLIC RCL_WARN_UNUSED const char * | rcl_node_get_name (const rcl_node_t *node) |
Return the name of the node. More... | |
RCL_PUBLIC RCL_WARN_UNUSED const char * | rcl_node_get_namespace (const rcl_node_t *node) |
Return the namespace of the node. More... | |
RCL_PUBLIC RCL_WARN_UNUSED const char * | rcl_node_get_fully_qualified_name (const rcl_node_t *node) |
Return the fully qualified name of the node. More... | |
RCL_PUBLIC RCL_WARN_UNUSED const rcl_node_options_t * | rcl_node_get_options (const rcl_node_t *node) |
Return the rcl node options. More... | |
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t | rcl_node_get_domain_id (const rcl_node_t *node, size_t *domain_id) |
Return the ROS domain ID that the node is using. More... | |
RCL_PUBLIC RCL_WARN_UNUSED rmw_node_t * | rcl_node_get_rmw_handle (const rcl_node_t *node) |
Return the rmw node handle. More... | |
RCL_PUBLIC RCL_WARN_UNUSED uint64_t | rcl_node_get_rcl_instance_id (const rcl_node_t *node) |
Return the associated rcl instance id. More... | |
RCL_PUBLIC RCL_WARN_UNUSED const rcl_guard_condition_t * | rcl_node_get_graph_guard_condition (const rcl_node_t *node) |
Return a guard condition which is triggered when the ROS graph changes. More... | |
RCL_PUBLIC RCL_WARN_UNUSED const char * | rcl_node_get_logger_name (const rcl_node_t *node) |
Return the logger name of the node. More... | |
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t | rcl_node_resolve_name (const rcl_node_t *node, const char *input_name, rcl_allocator_t allocator, bool is_service, bool only_expand, char **output_name) |
Expand a given name into a fully-qualified topic name and apply remapping rules. More... | |
RCL_PUBLIC rcl_ret_t | rcl_get_disable_loaned_message (bool *disable_loaned_message) |
Check if loaned message is disabled, according to the environment variable. More... | |
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t | rcl_node_type_description_service_init (rcl_service_t *service, const rcl_node_t *node) |
Initialize the node's ~/get_type_description service. More... | |
RCL_PUBLIC void | rcl_node_type_description_service_handle_request (rcl_node_t *node, const rmw_request_id_t *request_header, const type_description_interfaces__srv__GetTypeDescription_Request *request, type_description_interfaces__srv__GetTypeDescription_Response *response) |
Process a single pending request to the GetTypeDescription service. More... | |
Variables | |
const char *const | RCL_DISABLE_LOANED_MESSAGES_ENV_VAR |
RCL_PUBLIC rcl_ret_t rcl_get_disable_loaned_message | ( | bool * | disable_loaned_message | ) |
Check if loaned message is disabled, according to the environment variable.
If the ROS_DISABLE_LOANED_MESSAGES
environment variable is set to "1", disable_loaned_message
will be set to true.
[out] | disable_loaned_message | Must not be NULL. |
Definition at line 494 of file node.c.
References RCL_RET_INVALID_ARGUMENT.
Referenced by rcl_publisher_get_default_options().
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_node_fini | ( | rcl_node_t * | node | ) |
Finalize a rcl_node_t.
Destroys any automatically created infrastructure and deallocates memory. After calling, the rcl_node_t can be safely deallocated.
All middleware primitives created by the user, e.g. publishers, services, etc, which were created from this node must be finalized using their respective rcl_*_fini()
functions before this is called.
Attribute | Adherence |
---|---|
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | Yes |
Lock-Free | Yes [1] |
[1] if atomic_is_lock_free()
returns true for atomic_uint_least64_t
[in] | node | rcl_node_t to be finalized |
Definition at line 341 of file node.c.
References rcl_node_options_s::allocator, rcl_node_options_s::arguments, rcl_arguments_s::impl, rcl_node_s::impl, rcl_arguments_fini(), rcl_guard_condition_fini(), RCL_RET_ERROR, RCL_RET_NODE_INVALID, and RCL_RET_OK.
Referenced by rclcpp::node_interfaces::NodeBase::NodeBase().
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_node_get_domain_id | ( | const rcl_node_t * | node, |
size_t * | domain_id | ||
) |
Return the ROS domain ID that the node is using.
This function returns the ROS domain ID that the node is in.
This function should be used to determine what domain_id
was used rather than checking the domain_id field in the node options, because if RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID is used when creating the node then it is not changed after creation, but this function will return the actual domain_id
used.
The domain_id
field must point to an allocated size_t
object to which the ROS domain ID will be written.
Attribute | Adherence |
---|---|
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | node | the handle to the node being queried |
[out] | domain_id | storage for the domain id |
Definition at line 444 of file node.c.
References rcl_node_s::context, rcl_context_get_domain_id(), rcl_node_is_valid(), RCL_RET_INVALID_ARGUMENT, RCL_RET_NODE_INVALID, and RCL_RET_OK.
RCL_PUBLIC RCL_WARN_UNUSED const char* rcl_node_get_fully_qualified_name | ( | const rcl_node_t * | node | ) |
Return the fully qualified name of the node.
This function returns the node's internal namespace and name combined string. This function can fail, and therefore return NULL
, if:
NULL
Attribute | Adherence |
---|---|
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | node | pointer to the node |
NULL
Definition at line 426 of file node.c.
References rcl_node_s::impl, and rcl_node_is_valid_except_context().
Referenced by rclcpp::node_interfaces::NodeBase::get_fully_qualified_name().
RCL_PUBLIC RCL_WARN_UNUSED const rcl_guard_condition_t* rcl_node_get_graph_guard_condition | ( | const rcl_node_t * | node | ) |
Return a guard condition which is triggered when the ROS graph changes.
The handle returned is a pointer to an internally held rcl guard condition. This function can fail, and therefore return NULL
, if:
NULL
The returned handle is made invalid if the node is finialized or if rcl_shutdown() is called.
The guard condition will be triggered anytime a change to the ROS graph occurs. A ROS graph change includes things like (but not limited to) a new publisher advertises, a new subscription is created, a new service becomes available, a subscription is canceled, etc.
Attribute | Adherence |
---|---|
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | node | pointer to the rcl node |
NULL
Definition at line 476 of file node.c.
References rcl_node_s::impl, and rcl_node_is_valid_except_context().
Referenced by rclcpp::node_interfaces::NodeGraph::get_graph_guard_condition().
RCL_PUBLIC RCL_WARN_UNUSED const char* rcl_node_get_logger_name | ( | const rcl_node_t * | node | ) |
Return the logger name of the node.
This function returns the node's internal logger name string. This function can fail, and therefore return NULL
, if:
NULL
The returned string is only valid as long as the given rcl_node_t is valid. The value of the string may change if the value in the rcl_node_t changes, and therefore copying the string is recommended if this is a concern.
Attribute | Adherence |
---|---|
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | node | pointer to the node |
NULL
Definition at line 485 of file node.c.
References rcl_node_s::impl, and rcl_node_is_valid_except_context().
Referenced by rclcpp::node_interfaces::NodeLogging::get_logger_name(), rclcpp::get_node_logger(), rcl_logging_rosout_fini_publisher_for_node(), and rcl_logging_rosout_init_publisher_for_node().
RCL_PUBLIC RCL_WARN_UNUSED const char* rcl_node_get_name | ( | const rcl_node_t * | node | ) |
Return the name of the node.
This function returns the node's internal name string. This function can fail, and therefore return NULL
, if:
NULL
The returned string is only valid as long as the given rcl_node_t is valid. The value of the string may change if the value in the rcl_node_t changes, and therefore copying the string is recommended if this is a concern.
Attribute | Adherence |
---|---|
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | node | pointer to the node |
NULL
Definition at line 408 of file node.c.
References rcl_node_s::impl, and rcl_node_is_valid_except_context().
Referenced by rclcpp::Client< ServiceT >::Client(), rclcpp::node_interfaces::NodeGraph::count_clients(), rclcpp::node_interfaces::NodeGraph::count_publishers(), rclcpp::node_interfaces::NodeGraph::count_services(), rclcpp::node_interfaces::NodeGraph::count_subscribers(), rclcpp::GenericService::GenericService(), rclcpp::node_interfaces::NodeBase::get_name(), rclcpp::PublisherBase::PublisherBase(), rcl_logging_rosout_init_publisher_for_node(), rcl_node_init(), rcl_node_resolve_name(), rclcpp::Service< ServiceT >::Service(), and rclcpp::SubscriptionBase::SubscriptionBase().
RCL_PUBLIC RCL_WARN_UNUSED const char* rcl_node_get_namespace | ( | const rcl_node_t * | node | ) |
Return the namespace of the node.
This function returns the node's internal namespace string. This function can fail, and therefore return NULL
, if:
NULL
The returned string is only valid as long as the given rcl_node_t is valid. The value of the string may change if the value in the rcl_node_t changes, and therefore copying the string is recommended if this is a concern.
Attribute | Adherence |
---|---|
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | node | pointer to the node |
NULL
Definition at line 417 of file node.c.
References rcl_node_s::impl, and rcl_node_is_valid_except_context().
Referenced by rclcpp::Client< ServiceT >::Client(), rclcpp::node_interfaces::NodeGraph::count_clients(), rclcpp::node_interfaces::NodeGraph::count_publishers(), rclcpp::node_interfaces::NodeGraph::count_services(), rclcpp::node_interfaces::NodeGraph::count_subscribers(), rclcpp::GenericService::GenericService(), rclcpp::node_interfaces::NodeBase::get_namespace(), rclcpp::PublisherBase::PublisherBase(), rcl_node_init(), rcl_node_resolve_name(), rclcpp::Service< ServiceT >::Service(), and rclcpp::SubscriptionBase::SubscriptionBase().
RCL_PUBLIC RCL_WARN_UNUSED const rcl_node_options_t* rcl_node_get_options | ( | const rcl_node_t * | node | ) |
Return the rcl node options.
This function returns the node's internal options struct. This function can fail, and therefore return NULL
, if:
NULL
The returned struct is only valid as long as the given rcl_node_t is valid. The values in the struct may change if the options of the rcl_node_t changes, and therefore copying the struct is recommended if this is a concern.
Attribute | Adherence |
---|---|
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | node | pointer to the node |
NULL
Definition at line 435 of file node.c.
References rcl_node_s::impl, and rcl_node_is_valid_except_context().
Referenced by rclcpp::node_interfaces::NodeParameters::NodeParameters(), rcl_count_clients(), rcl_count_publishers(), rcl_count_services(), rcl_count_subscribers(), rcl_logging_rosout_init_publisher_for_node(), rcl_node_resolve_name(), and rcl_service_server_is_available().
RCL_PUBLIC RCL_WARN_UNUSED uint64_t rcl_node_get_rcl_instance_id | ( | const rcl_node_t * | node | ) |
Return the associated rcl instance id.
This id is stored when rcl_node_init is called and can be compared with the value returned by rcl_get_instance_id() to check if this node was created in the current rcl context (since the latest call to rcl_init().
This function can fail, and therefore return 0
, if:
NULL
This function will succeed even if rcl_shutdown() has been called since the node was created.
Attribute | Adherence |
---|---|
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | node | pointer to the rcl node |
0
on error Definition at line 467 of file node.c.
References rcl_node_s::context, rcl_context_get_instance_id(), and rcl_node_is_valid_except_context().
RCL_PUBLIC RCL_WARN_UNUSED rmw_node_t* rcl_node_get_rmw_handle | ( | const rcl_node_t * | node | ) |
Return the rmw node handle.
The handle returned is a pointer to the internally held rmw handle. This function can fail, and therefore return NULL
, if:
NULL
The returned handle is made invalid if the node is finalized or if rcl_shutdown() is called. The returned handle is not guaranteed to be valid for the life time of the node as it may be finalized and recreated itself. Therefore it is recommended to get the handle from the node using this function each time it is needed and avoid use of the handle concurrently with functions that might change it.
Attribute | Adherence |
---|---|
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | node | pointer to the rcl node |
NULL
Definition at line 458 of file node.c.
References rcl_node_s::impl, and rcl_node_is_valid_except_context().
Referenced by rcl_client_fini(), rcl_client_init(), rcl_count_clients(), rcl_count_publishers(), rcl_count_services(), rcl_count_subscribers(), rcl_get_client_names_and_types_by_node(), rcl_get_node_names(), rcl_get_node_names_with_enclaves(), rcl_get_publisher_names_and_types_by_node(), rcl_get_service_names_and_types(), rcl_get_service_names_and_types_by_node(), rcl_get_subscriber_names_and_types_by_node(), rcl_get_topic_names_and_types(), rcl_node_init(), rcl_publisher_fini(), rcl_publisher_init(), rcl_service_fini(), rcl_service_init(), rcl_service_server_is_available(), rcl_subscription_fini(), and rcl_subscription_init().
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_node_init | ( | rcl_node_t * | node, |
const char * | name, | ||
const char * | namespace_, | ||
rcl_context_t * | context, | ||
const rcl_node_options_t * | options | ||
) |
Initialize a ROS node.
Calling this on a rcl_node_t makes it a valid node handle until rcl_shutdown is called or until rcl_node_fini is called on it.
After calling, the ROS node object can be used to create other middleware primitives like publishers, services, parameters, etc.
The name of the node must not be NULL and adhere to naming restrictions, see the rmw_validate_node_name() function for rules.
The name of the node cannot coincide with another node of the same name. If a node of the same name is already in the domain, it will be shutdown.
The namespace of the node should not be NULL and should also pass the rmw_validate_namespace() function's rules.
Additionally this function allows namespaces which lack a leading forward slash. Because there is no notion of a relative namespace, there is no difference between a namespace which lacks a forward and the same namespace with a leading forward slash. Therefore, a namespace like "foo/bar"
is automatically changed to "/foo/bar"
by this function. Similarly, the namespace ""
will implicitly become "/"
which is a valid namespace.
A node contains infrastructure for ROS parameters, which include advertising publishers and service servers. This function will create those external parameter interfaces even if parameters are not used later.
The rcl_node_t given must be allocated and zero initialized. Passing an rcl_node_t which has already had this function called on it, more recently than rcl_node_fini, will fail. An allocated rcl_node_t with uninitialized memory is undefined behavior.
Expected usage:
Attribute | Adherence |
---|---|
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | Yes |
Lock-Free | Yes [1] |
[1] if atomic_is_lock_free()
returns true for atomic_uint_least64_t
rcl_*
functions[in,out] | node | a preallocated rcl_node_t |
[in] | name | the name of the node, must be a valid c-string |
[in] | namespace_ | the namespace of the node, must be a valid c-string |
[in] | context | the context instance with which the node should be associated |
[in] | options | the node options. The options are deep copied into the node. The caller is always responsible for freeing memory used options they pass in. |
Definition at line 106 of file node.c.
References rcl_guard_condition_options_s::allocator, rcl_node_options_s::allocator, rcl_node_options_s::arguments, rcl_node_s::context, rcl_context_s::global_arguments, rcl_context_s::impl, rcl_node_s::impl, RCL_CHECK_ALLOCATOR_WITH_MSG, rcl_context_is_valid(), rcl_get_zero_initialized_guard_condition(), rcl_get_zero_initialized_node(), rcl_guard_condition_fini(), rcl_guard_condition_get_default_options(), rcl_guard_condition_init_from_rmw(), rcl_node_get_default_options(), rcl_node_get_name(), rcl_node_get_namespace(), rcl_node_get_rmw_handle(), rcl_node_options_copy(), rcl_node_options_fini(), rcl_remap_node_name(), rcl_remap_node_namespace(), RCL_RET_ALREADY_INIT, RCL_RET_BAD_ALLOC, RCL_RET_ERROR, RCL_RET_INVALID_ARGUMENT, RCL_RET_NODE_INVALID_NAME, RCL_RET_NODE_INVALID_NAMESPACE, RCL_RET_NOT_INIT, RCL_RET_OK, rcl_context_impl_s::rmw_context, and rcl_node_options_s::use_global_arguments.
Referenced by rclcpp::node_interfaces::NodeBase::NodeBase().
RCL_PUBLIC bool rcl_node_is_valid | ( | const rcl_node_t * | node | ) |
Return true
if the node is valid, else false
.
Also return false
if the node pointer is NULL
or the allocator is invalid.
A node is invalid if:
NULL
(rcl_node_init not called or failed)There is a possible validity race condition.
Consider:
In the third line the node is now invalid, even though on the previous line of thread 1 it was checked to be valid. This is why this function is considered not thread-safe.
Attribute | Adherence |
---|---|
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | Yes |
Lock-Free | Yes [1] |
[1] if atomic_is_lock_free()
returns true for atomic_uint_least64_t
[in] | node | rcl_node_t to be validated |
true
if the node and allocator are valid, otherwise false
. Definition at line 394 of file node.c.
References rcl_node_s::context, rcl_context_is_valid(), and rcl_node_is_valid_except_context().
Referenced by rcl_client_init(), rcl_count_clients(), rcl_count_publishers(), rcl_count_services(), rcl_count_subscribers(), rcl_get_client_names_and_types_by_node(), rcl_get_node_names(), rcl_get_node_names_with_enclaves(), rcl_get_publisher_names_and_types_by_node(), rcl_get_service_names_and_types(), rcl_get_service_names_and_types_by_node(), rcl_get_subscriber_names_and_types_by_node(), rcl_get_topic_names_and_types(), rcl_node_get_domain_id(), rcl_publisher_init(), rcl_service_init(), rcl_service_server_is_available(), and rcl_subscription_init().
RCL_PUBLIC bool rcl_node_is_valid_except_context | ( | const rcl_node_t * | node | ) |
Return true if node is valid, except for the context being valid.
This is used in clean up functions that need to access the node, but do not need use any functions with the context.
It is identical to rcl_node_is_valid except it ignores the state of the context associated with the node.
Definition at line 384 of file node.c.
References rcl_node_s::impl.
Referenced by rcl_client_fini(), rcl_node_get_fully_qualified_name(), rcl_node_get_graph_guard_condition(), rcl_node_get_logger_name(), rcl_node_get_name(), rcl_node_get_namespace(), rcl_node_get_options(), rcl_node_get_rcl_instance_id(), rcl_node_get_rmw_handle(), rcl_node_is_valid(), rcl_publisher_fini(), rcl_service_fini(), and rcl_subscription_fini().
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_node_resolve_name | ( | const rcl_node_t * | node, |
const char * | input_name, | ||
rcl_allocator_t | allocator, | ||
bool | is_service, | ||
bool | only_expand, | ||
char ** | output_name | ||
) |
Expand a given name into a fully-qualified topic name and apply remapping rules.
Attribute | Adherence |
---|---|
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | node | Node object. Its name, namespace, local/global command line arguments are used. |
[in] | input_name | Topic name to be expanded and remapped. |
[in] | allocator | The allocator to be used when creating the output topic. |
[in] | is_service | For services use true , for topics use false . |
[in] | only_expand | When true , remapping rules are ignored. |
[out] | output_name | Output char * pointer. |
Definition at line 134 of file node_resolve_name.c.
References rcl_node_options_s::arguments, rcl_node_s::context, rcl_context_s::global_arguments, rcl_node_get_name(), rcl_node_get_namespace(), rcl_node_get_options(), RCL_RET_ERROR, RCL_RET_INVALID_ARGUMENT, and rcl_node_options_s::use_global_arguments.
Referenced by rcl_client_init(), rcl_node_type_description_service_init(), rcl_publisher_init(), rcl_service_init(), rcl_subscription_init(), and rclcpp::node_interfaces::NodeBase::resolve_topic_or_service_name().
RCL_PUBLIC void rcl_node_type_description_service_handle_request | ( | rcl_node_t * | node, |
const rmw_request_id_t * | request_header, | ||
const type_description_interfaces__srv__GetTypeDescription_Request * | request, | ||
type_description_interfaces__srv__GetTypeDescription_Response * | response | ||
) |
Process a single pending request to the GetTypeDescription service.
This function may be called to handle incoming requests by any client starting the service. It is not intended to be called directly by users.
Attribute | Adherence |
---|---|
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | node | the handle to the node |
[in] | request_header | ID of the incoming request |
[in] | request | Request that came in to the service |
[out] | response | Allocated, uninitialized response to the request |
Definition at line 513 of file node.c.
References rcl_node_s::impl.
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_node_type_description_service_init | ( | rcl_service_t * | service, |
const rcl_node_t * | node | ||
) |
Initialize the node's ~/get_type_description service.
This function initializes the node's ~/get_type_description service which can be used to retrieve information about types used by the node's publishers, subscribers, services or actions.
Note that this will not register any callback for the service, client-level code must register rcl_node_type_description_service_handle_request or a custom callback to handle incoming requests, via that client's executor/waitset capabilities.
Note that the returned service must be cleaned up by the caller by calling rcl_service_fini.
Attribute | Adherence |
---|---|
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | service | the handle to the type description service to be initialized |
[in] | node | handle to the node for which to initialize the service |
Definition at line 579 of file node.c.
References rcl_context_impl_s::allocator, rcl_node_s::context, rcl_context_s::impl, rcl_node_s::impl, rcl_node_resolve_name(), RCL_RET_ALREADY_INIT, RCL_RET_INVALID_ARGUMENT, RCL_RET_NODE_INVALID, RCL_RET_OK, rcl_service_get_default_options(), rcl_service_init(), and rcl_service_is_valid().