Skip to content

Commit

Permalink
move qos_profile_rosout_default to rmw.
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoya Fujita <[email protected]>
  • Loading branch information
fujitatomoya committed Nov 6, 2024
1 parent d9daca7 commit 5716579
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
19 changes: 0 additions & 19 deletions rcl/include/rcl/logging_rosout.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,6 @@ extern "C"
{
#endif

/// The default qos profile setting for topic /rosout
/**
* - depth = 1000
* - durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
* - lifespan = {10, 0}
*/
static const rmw_qos_profile_t rcl_qos_profile_rosout_default =
{
RMW_QOS_POLICY_HISTORY_KEEP_LAST,
1000,
RMW_QOS_POLICY_RELIABILITY_RELIABLE,
RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL,
RMW_QOS_DEADLINE_DEFAULT,
{10, 0},
RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT,
RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT,
false
};

/// Initializes the rcl_logging_rosout features
/**
* Calling this will initialize the rcl_logging_rosout features. This function must be called
Expand Down
4 changes: 3 additions & 1 deletion rcl/src/rcl/node_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ extern "C"
#include "rcl/error_handling.h"
#include "rcl/logging_rosout.h"

#include "rmw/qos_profiles.h"

rcl_node_options_t
rcl_node_get_default_options(void)
{
Expand All @@ -35,7 +37,7 @@ rcl_node_get_default_options(void)
.use_global_arguments = true,
.arguments = rcl_get_zero_initialized_arguments(),
.enable_rosout = true,
.rosout_qos = rcl_qos_profile_rosout_default,
.rosout_qos = rmw_qos_profile_rosout_default,
};
return default_options;
}
Expand Down
2 changes: 1 addition & 1 deletion rcl/test/rcl/test_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ TEST_F(TestNodeFixture, test_rcl_node_options) {

EXPECT_TRUE(default_options.use_global_arguments);
EXPECT_TRUE(default_options.enable_rosout);
EXPECT_EQ(rcl_qos_profile_rosout_default, default_options.rosout_qos);
EXPECT_EQ(rmw_qos_profile_rosout_default, default_options.rosout_qos);
EXPECT_TRUE(rcutils_allocator_is_valid(&(default_options.allocator)));

EXPECT_EQ(RCL_RET_INVALID_ARGUMENT, rcl_node_options_copy(nullptr, &default_options));
Expand Down

0 comments on commit 5716579

Please sign in to comment.