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

[nodelet] Public api to check nodelet is initialized #34

Open
wants to merge 1 commit into
base: indigo-devel
Choose a base branch
from

Conversation

wkentaro
Copy link
Contributor

What I'd like to do is detecting the nodelet's initialization in the subclass of nodelet::Nodelet.
I mean after onInit() by 'initialization'.

@tfoote
Copy link
Member

tfoote commented Nov 11, 2015

Can you explain a little bit about your use case? The initialized flag seems to be very generic and does not have direct use in all cases. You could easily set a flag in onInit which is specific to an action and could indicate more information such as a failure or specific component started or failed.

@wkentaro
Copy link
Contributor Author

I have a subclass of nodelet::NodeletClass here. https://github.com/jsk-ros-pkg/jsk_common/blob/master/jsk_topic_tools/src/connection_based_nodelet.cpp#L41-L65
And I'd like to call onInitPostProcess() after onInit(), the onInit() is virtual method of that class, but onInitPostProcess() is not virtual one.
So currently onInitPostProcess() needs to be called in onInit() (like here) method of the subclass which overwrites the parent class' one. (but I can't make the author add onInitPostProcess() certainly.)

For jsk-ros-pkg/jsk_common#1145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants