You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[rclcpp_lifecycle] issue a warning if publishing on a not active publisher #552
changed the title [-]rclcpp_lifecycle: issue a warning if publishing on a not active publisher[/-][+][rclcpp_lifecycle] issue a warning if publishing on a not active publisher[/+]on Sep 6, 2018
I'm adding the warning message, but I cannot understand how to do it.
Normally I use RCLCPP_WARN, but I'm not inside a node, so it cannot be called, right?
It gives you macros such as RCUTILS_LOG_DEBUG_NAMED ... I am not sure whether you can use the RCLCPP macros without a node logger. @dhood can you help out here?
Activity
[-]rclcpp_lifecycle: issue a warning if publishing on a not active publisher[/-][+][rclcpp_lifecycle] issue a warning if publishing on a not active publisher[/+]Karsten1987 commentedon Sep 6, 2018
I believe the warning makes sense. Would you consider opening a PR for this?
Myzhar commentedon Sep 27, 2018
I'm adding the warning message, but I cannot understand how to do it.
Normally I use
RCLCPP_WARN, but I'm not inside a node, so it cannot be called, right?Karsten1987 commentedon Sep 27, 2018
You can use the
rcutils/logging_macros.hto get non-node specific logging macros.There are some examples in the test: https://github.com/ros2/rcutils/blob/master/test/test_logging_macros.cpp
It gives you macros such as
RCUTILS_LOG_DEBUG_NAMED... I am not sure whether you can use the RCLCPP macros without a node logger. @dhood can you help out here?mikaelarguedas commentedon Sep 27, 2018
To use rclcpp logging macros you do need a
rclcpp::Logger, the demos repository contains some examples of passing a node logger to a function as well as creating a logger withrclcpp::get_loggerand using it for logging.Added warning if for "publish" when LifecyclePublisher is not activated
Karsten1987 commentedon Oct 23, 2018
@Myzhar any updates on this?
Myzhar commentedon Oct 24, 2018
@Karsten1987 I'm sorry, but I'm not working on ROS2 now, I had to move to ROS1.
I try to find a bit of time to complete this enhancement
fmrico commentedon Oct 27, 2018
I did a PR with the solution, which matches the one proposed by @Myzhar
in #574
Hope it helps
Karsten1987 commentedon Oct 28, 2018
fixed in e30f315
Document clock types (ros2#578)
correct master build (ros2#552)