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

issue a warning if publishing on a not active publisher #574

Merged
merged 2 commits into from
Oct 28, 2018

Conversation

fmrico
Copy link
Contributor

@fmrico fmrico commented Oct 27, 2018

Hi all,

Issue #552 seems to be blocked. @Myzhar did not a PR with his work. This is a PR with his changes.

This PR provides the machanism to issue a WARN when publishing on a not active publisher.

Best

@tfoote tfoote added the in review Waiting for review (Kanban column) label Oct 27, 2018
@Karsten1987
Copy link
Contributor

@fmrico thanks for patch. I believe the same comment for PR #552 applies here:
#562 (comment)

@fmrico
Copy link
Contributor Author

fmrico commented Oct 27, 2018

Hi @Karsten1987 ,

I fixed it following the comments in #562 . Is was not so simple, because I had to change logging macros, to make it compile. Macro has changed to:

::std::is_same<typename std::remove_reference<decltype(logger)>::type, \
    typename ::rclcpp::Logger>::value, \
    "First argument to logging macros must be an rclcpp::Logger")

adding typename, because std::remove_reference<Ty>::type is dependant on a template parameter, as I found here.

I run the tests and everything worked ok.

Best

@Karsten1987
Copy link
Contributor

Great to hear you made it work. The patch looks good to me so far.
I've triggered the buildfarrm to see if this patch introduces any regression on other tests:

CI:
Build Status
Build Status
Build Status
Build Status

@Karsten1987 Karsten1987 merged commit e30f315 into ros2:master Oct 28, 2018
@Karsten1987 Karsten1987 removed the in review Waiting for review (Kanban column) label Oct 28, 2018
@fmrico
Copy link
Contributor Author

fmrico commented Oct 28, 2018

Thanks @Karsten1987 !!!

@Myzhar
Copy link

Myzhar commented Oct 28, 2018

Great @fmrico 💪

cho3 pushed a commit to cho3/rclcpp that referenced this pull request Jun 3, 2019
* issue a warning if publishing on a not active publisher

* Adding a logger private member in LifecyclePublisher for avoiding creating a new one echa call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants