Class InitOptions

Class Documentation

class InitOptions

Encapsulation of options for initializing rclcpp.

Public Functions

explicit InitOptions(rcl_allocator_t allocator = rcl_get_default_allocator())

Constructor.

It allows you to specify the allocator used within the init options.

Parameters:

allocator[in] used allocate memory within the init options

Throws:

anythingrclcpp::exceptions::throw_from_rcl_error can throw.

explicit InitOptions(const rcl_init_options_t &init_options)

Constructor which is initialized by an existing init_options.

Initialized by an existing init_options.

Parameters:

init_options[in] rcl_init_options_t to initialized

Throws:

anythingrclcpp::exceptions::throw_from_rcl_error can throw.

InitOptions(const InitOptions &other)

Copy constructor.

bool auto_initialize_logging() const

Return true if logging should be initialized when rclcpp::Context::init is called.

InitOptions &auto_initialize_logging(bool initialize_logging)

Set flag indicating if logging should be initialized or not.

InitOptions &operator=(const InitOptions &other)

Assignment operator.

virtual ~InitOptions()
const rcl_init_options_t *get_rcl_init_options() const

Return the rcl init options.

Throws:

anythingrclcpp::exceptions::throw_from_rcl_error can throw.

Returns:

the rcl init options.

void use_default_domain_id()

Retrieve default domain id and set.

void set_domain_id(size_t domain_id)

Set the domain id.

size_t get_domain_id() const

Return domain id.

Public Members

bool shutdown_on_signal = true

If true, the context will be shutdown on SIGINT by the signal handler (if it was installed).

Protected Functions

void finalize_init_options()