-
Notifications
You must be signed in to change notification settings - Fork 81
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
[jsk_topic_tools][connection_based_nodelet] warn if onInitPostProcess is not called #1513
[jsk_topic_tools][connection_based_nodelet] warn if onInitPostProcess is not called #1513
Conversation
Nice feature. Why we need the param |
@wkentaro I'd like to, but the current implementation does not monitor exact end of |
Ok, so it depends on the implementation of the nodelet and there are few reasons why we use rosparam for that option, right? |
@wkentaro I think if we could mind about the duration, we already could notice that we forgot |
But if you want to change on/off, you already notice that you forget |
void ConnectionBasedNodelet::warnOnInitPostProcessCalledCallback(const ros::WallTimerEvent& event) | ||
{ | ||
if (!on_init_post_process_called_) { | ||
NODELET_WARN("[%s] onInitPostProcess is not yet called.", nodelet::Nodelet::getName().c_str()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[%s]
should be set using ROSCONSOLE_FORMAT
.
http://wiki.ros.org/rosconsole
export ROSCONSOLE_FORMAT='[${severity}] [${time}]: ${message}'
|
||
// timer to warn when onInitProcess is not called | ||
pnh_->param("no_warn_on_init_post_process", on_init_post_process_called_, false); | ||
if (!on_init_post_process_called_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure exactly why you need this.
Right, but even if you remember and write void HogeNodelet::onInit() {
DiagnosticNodelet::onInit(/*warn onInitPostProcess = */ false);
// PROCESS may take more than 5 seconds
onInitPostProcess();
} But I thought that non-advanced developers may copy & paste the first line, so I chose to use parameter. |
Yeah. So I thought configurable duration was better.
I think non-advanced developers won't notice the rosparam, either. |
? |
sorry, I did not catch the discussion,
and
|
yeah, there may be some better param names like |
Inspired from jsk-ros-pkg/jsk_recognition#2043 (comment)