Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Failure Corrected for develop branch #549

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ void Executor::Run(void* arg) {

try {
rcl_wait_set_t wait_set = rcl_get_zero_initialized_wait_set();
rcl_ret_t ret = rcl_wait_set_init(&wait_set, 0, 2, 0, 0, 0, 0,
executor->context_, rcl_get_default_allocator());
rcl_ret_t ret = rcl_wait_set_init(&wait_set, 0, 2, 0, 0, 0, rcl_get_default_allocator());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the rcl_wait_set_init function has the parameters as follows https://github.com/ros2/rcl/blob/master/rcl/include/rcl/wait.h#L124

if (ret != RCL_RET_OK) {
throw std::runtime_error(std::string("Init waitset failed: ") +
rcl_get_error_string().str);
Expand All @@ -119,9 +118,9 @@ void Executor::Run(void* arg) {
0u,
handle_manager->timer_count(),
handle_manager->client_count(),
handle_manager->service_count(),
handle_manager->service_count()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// TODO(minggang): support events.
0u) != RCL_RET_OK) {
) != RCL_RET_OK) {
std::string error_message = std::string("Failed to resize: ")
+ std::string(rcl_get_error_string().str);
throw std::runtime_error(error_message);
Expand Down
4 changes: 2 additions & 2 deletions src/rcl_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ NAN_METHOD(RclTake) {
rcl_subscription_t* subscription =
reinterpret_cast<rcl_subscription_t*>(subscription_handle->ptr());
void* msg_taken = node::Buffer::Data(info[1]->ToObject());
rcl_ret_t ret = rcl_take(subscription, msg_taken, nullptr, nullptr);
rcl_ret_t ret = rcl_take(subscription, msg_taken, nullptr);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

@suab321321 suab321321 Jan 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@minggangw yes you are right the function paramters are changed.I m using crsystal version of ros2 installed from binary.Sorry should have checked before opening PR


if (ret != RCL_RET_OK && ret != RCL_RET_SUBSCRIPTION_TAKE_FAILED) {
Nan::ThrowError(rcl_get_error_string().str);
Expand Down Expand Up @@ -495,7 +495,7 @@ NAN_METHOD(Publish) {
RclHandle::Unwrap<RclHandle>(info[0]->ToObject())->ptr());

void* buffer = node::Buffer::Data(info[1]->ToObject());
THROW_ERROR_IF_NOT_EQUAL(rcl_publish(publisher, buffer, nullptr), RCL_RET_OK,
THROW_ERROR_IF_NOT_EQUAL(rcl_publish(publisher, buffer), RCL_RET_OK,
rcl_get_error_string().str);

info.GetReturnValue().Set(Nan::Undefined());
Expand Down