pass context to wait set (#617)
Signed-off-by: William Woodall <william@osrfoundation.org>
This commit is contained in:
parent
99dd0313ab
commit
c0a6b474d7
2 changed files with 3 additions and 3 deletions
|
@ -60,9 +60,8 @@ Executor::Executor(const ExecutorArgs & args)
|
||||||
// Store the context for later use.
|
// Store the context for later use.
|
||||||
context_ = args.context;
|
context_ = args.context;
|
||||||
|
|
||||||
if (rcl_wait_set_init(
|
ret = rcl_wait_set_init(&wait_set_, 0, 2, 0, 0, 0, context_->get_rcl_context().get(), allocator);
|
||||||
&wait_set_, 0, 2, 0, 0, 0, allocator) != RCL_RET_OK)
|
if (RCL_RET_OK != ret) {
|
||||||
{
|
|
||||||
RCUTILS_LOG_ERROR_NAMED(
|
RCUTILS_LOG_ERROR_NAMED(
|
||||||
"rclcpp",
|
"rclcpp",
|
||||||
"failed to create wait set: %s", rcl_get_error_string().str);
|
"failed to create wait set: %s", rcl_get_error_string().str);
|
||||||
|
|
|
@ -79,6 +79,7 @@ GraphListener::start_if_not_started()
|
||||||
0, // number_of_timers
|
0, // number_of_timers
|
||||||
0, // number_of_clients
|
0, // number_of_clients
|
||||||
0, // number_of_services
|
0, // number_of_services
|
||||||
|
this->parent_context_->get_rcl_context().get(),
|
||||||
rcl_get_default_allocator());
|
rcl_get_default_allocator());
|
||||||
if (RCL_RET_OK != ret) {
|
if (RCL_RET_OK != ret) {
|
||||||
throw_from_rcl_error(ret, "failed to initialize wait set");
|
throw_from_rcl_error(ret, "failed to initialize wait set");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue