Rmw preallocate (#428)

* Proposola of changes for RMW_Preallocate. Related /ros2/rmw#160

Signed-off-by: Gonzalo de Pedro <gonzalo@depedro.com.ar>

* Changed RCL interface

Signed-off-by: Gonzalo de Pedro <gonzalo@depedro.com.ar>

* Updates for allocation in serialize methods.

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Fix tests for new APIs.

Signed-off-by: Michael Carroll <michael@openrobotics.org>
This commit is contained in:
Michael Carroll 2019-05-02 11:32:13 -05:00 committed by GitHub
parent 4262d4cb29
commit 3d48555597
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 63 additions and 29 deletions

View file

@ -390,7 +390,7 @@ rcl_action_take_cancel_response(
RCL_CHECK_ARGUMENT_FOR_NULL(ros_ ## Type, RCL_RET_INVALID_ARGUMENT); \
rmw_message_info_t message_info; /* ignored */ \
rcl_ret_t ret = rcl_take( \
&action_client->impl->Type ## _subscription, ros_ ## Type, &message_info); \
&action_client->impl->Type ## _subscription, ros_ ## Type, &message_info, NULL); \
if (RCL_RET_OK != ret) { \
if (RCL_RET_SUBSCRIPTION_TAKE_FAILED == ret) { \
return RCL_RET_ACTION_CLIENT_TAKE_FAILED; \

View file

@ -491,7 +491,7 @@ rcl_action_publish_feedback(
}
RCL_CHECK_ARGUMENT_FOR_NULL(ros_feedback, RCL_RET_INVALID_ARGUMENT);
rcl_ret_t ret = rcl_publish(&action_server->impl->feedback_publisher, ros_feedback);
rcl_ret_t ret = rcl_publish(&action_server->impl->feedback_publisher, ros_feedback, NULL);
if (RCL_RET_OK != ret) {
return RCL_RET_ERROR; // error already set
}
@ -559,7 +559,7 @@ rcl_action_publish_status(
}
RCL_CHECK_ARGUMENT_FOR_NULL(status_message, RCL_RET_INVALID_ARGUMENT);
rcl_ret_t ret = rcl_publish(&action_server->impl->status_publisher, status_message);
rcl_ret_t ret = rcl_publish(&action_server->impl->status_publisher, status_message, NULL);
if (RCL_RET_OK != ret) {
return RCL_RET_ERROR; // error already set
}