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

provide option to not create logging publisher #510

Closed
wjwwood opened this issue Sep 30, 2019 · 13 comments
Closed

provide option to not create logging publisher #510

wjwwood opened this issue Sep 30, 2019 · 13 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@wjwwood
Copy link
Member

wjwwood commented Sep 30, 2019

Feature request

Feature description

Currently the node unconditionally creates a publisher for logging:

ret = rcl_logging_rosout_init_publisher_for_node(node);

This is potentially undesirable in systems which do not need this and have an rmw layer that aggressively preallocates storage for publishers and subscriptions.

There should be some way to control whether or not this occurs when creating the node, or possibly globally.

Implementation considerations

We should look for places where we assume this publisher exists for each node and ensure it falls back gracefully when it is disabled.

@wjwwood wjwwood added enhancement New feature or request help wanted Extra attention is needed labels Sep 30, 2019
@fujitatomoya
Copy link
Collaborator

fundamentally it looks like following flag is true,

static bool g_rcl_logging_rosout_enabled = false;

but we do not want to make publisher instance, am i understanding correct?

@fujitatomoya
Copy link
Collaborator

@wjwwood

could you take a look at #514 ? when you got time.

@fujitatomoya
Copy link
Collaborator

@wjwwood @ivanpauno

i believe that we can close this thread.

@ivanpauno
Copy link
Member

I think that we should keep this open.
IMO, having the ability of enabling/disabling rosout logging in each node individually is desired.

Now, we can only globally disable it.

@wjwwood
Copy link
Member Author

wjwwood commented Oct 17, 2019

IMO, having the ability of enabling/disabling rosout logging in each node individually is desired.

Definitely, and so I would be fine with leaving this open and/or closing it but opening a new issue.

@fujitatomoya
Copy link
Collaborator

@ivanpauno @wjwwood

okay, got it.

what about,

  • add rosout enable/disable flag in NodeOption as each node setting.
  • and we can also keep the global switch g_rcl_logging_rosout_enabled.

or you already have proposal?

@ivanpauno
Copy link
Member

@ivanpauno @wjwwood

okay, got it.

what about,

  • add rosout enable/disable flag in NodeOption as each node setting.
  • and we can also keep the global switch g_rcl_logging_rosout_enabled.

or you already have proposal?

Sounds like a good plan!

@Barry-Xu-2018
Copy link
Contributor

@ivanpauno @fujitatomoya @wjwwood

what about,
add rosout enable/disable flag in NodeOption as each node setting.
and we can also keep the global switch g_rcl_logging_rosout_enabled.

I implemented them.
Could you review my patches ?
#532 and ros2/rclcpp#900

@fujitatomoya
Copy link
Collaborator

@Barry-Xu-2018

requesting fix for #532 (review)

@Barry-Xu-2018
Copy link
Contributor

@fujitatomoya

requesting fix for #532 (review)

Thanks for your review.
But I have a question on your comments.
Could you check it #532 (comment)

@fujitatomoya
Copy link
Collaborator

@wjwwood @ivanpauno

no pressure, but could you take a look at it when you got time?

thanks

@fujitatomoya
Copy link
Collaborator

@wjwwood @ivanpauno

is there anything we could help you via this thread? if not, could you close this issue?

Best,

@ivanpauno
Copy link
Member

is there anything we could help you via this thread? if not, could you close this issue?

Thanks for the reminder. I think that everything has been done.
Thanks for the contributions @fujitatomoya @Barry-Xu-2018 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants