Use absolute topic name for rosout (#549)

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
This commit is contained in:
Ivan Santiago Paunovic 2019-12-06 09:29:03 -03:00 committed by GitHub
parent 73d2c4caec
commit 024c3ee50d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ extern "C"
{ {
#endif #endif
#define ROSOUT_TOPIC_NAME "rosout" #define ROSOUT_TOPIC_NAME "/rosout"
/* Return RCL_RET_OK from this macro because we won't check throughout rcl if rosout is /* Return RCL_RET_OK from this macro because we won't check throughout rcl if rosout is
* initialized or not and in the case it's not we want things to continue working. * initialized or not and in the case it's not we want things to continue working.

View file

@ -95,7 +95,7 @@ public:
// create rosout subscription // create rosout subscription
const rosidl_message_type_support_t * ts = const rosidl_message_type_support_t * ts =
ROSIDL_GET_MSG_TYPE_SUPPORT(rcl_interfaces, msg, Log); ROSIDL_GET_MSG_TYPE_SUPPORT(rcl_interfaces, msg, Log);
const char * topic = "rosout"; const char * topic = "/rosout";
this->subscription_ptr = new rcl_subscription_t; this->subscription_ptr = new rcl_subscription_t;
*this->subscription_ptr = rcl_get_zero_initialized_subscription(); *this->subscription_ptr = rcl_get_zero_initialized_subscription();
rcl_subscription_options_t subscription_options = rcl_subscription_get_default_options(); rcl_subscription_options_t subscription_options = rcl_subscription_get_default_options();