Skip to content

Commit

Permalink
Add publish/take messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dhood committed Nov 21, 2017
1 parent decb56a commit 88b8bee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions rcl/src/rcl/publisher.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ rcl_publisher_get_default_options()
rcl_ret_t
rcl_publish(const rcl_publisher_t * publisher, const void * ros_message)
{
RCUTILS_LOG_DEBUG_NAMED(ROS_PACKAGE_NAME, "Publisher publishing message")
if (!rcl_publisher_is_valid(publisher)) {
return RCL_RET_PUBLISHER_INVALID;
}
Expand Down
3 changes: 2 additions & 1 deletion rcl/src/rcl/subscription.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ rcl_take(
void * ros_message,
rmw_message_info_t * message_info)
{
RCUTILS_LOG_DEBUG_NAMED(ROS_PACKAGE_NAME, "Subscription taking message")
RCL_CHECK_ARGUMENT_FOR_NULL(subscription, RCL_RET_INVALID_ARGUMENT, rcl_get_default_allocator());
const rcl_subscription_options_t * options = rcl_subscription_get_options(subscription);
if (!options) {
Expand All @@ -231,7 +232,7 @@ rcl_take(
return RCL_RET_ERROR;
}
RCUTILS_LOG_DEBUG_NAMED(
ROS_PACKAGE_NAME, "Subscription take request succeeded: %s", taken ? "true" : "false")
ROS_PACKAGE_NAME, "Subscription take succeeded: %s", taken ? "true" : "false")
if (!taken) {
return RCL_RET_SUBSCRIPTION_TAKE_FAILED;
}
Expand Down

0 comments on commit 88b8bee

Please sign in to comment.