Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You should think of your NodeMain as the main method. In there, you can use Node.executeCancelableLoop() to start a thread which will do the work for you and be shut down once the Node is shut down.

You should not try to write code in the main method of your application. In fact, you should use org.ros.RosRun as your application's main class as is done in the pubsub tutorial.