Long initialization in nodelet
On page http://wiki.ros.org/nodelet#Threading... the following is written:
1.6.1 onInit
This method is called on init and should not block or do significant work.
If the nodelet initialization process takes longer (e.g. reading data from database and process it etc.) what is the best practice to execute the long initialization process without blocking the onInit()
call? One possible solution is to create a worker thread in the onInit()
method which does the long initialization without blocking the call but I am wondering is there any "ROS pattern" to do this job?