Ask Your Question
5

Nodelet unloading based on misconfiguration in onInit()

asked 2012-10-24 05:02:01 -0500

mjcarroll gravatar image

updated 2014-01-28 17:14:02 -0500

ngrennan gravatar image

I'm currently trying to determine if anyone has come up with a sound way of unloading a nodelet based on error conditions in either the onInit() function, or in normal operation of the node.

Essentially, I would like to sanity check all of the nodelet's parameters in the onInit() function, and then stop operation if the parameters don't fall within the correct bounds.

Obviously, I could probably return before loading all of the publishers and subscribers, but this leaves the nodelet loaded, which I don't feel is a terribly clean solution.

Has anyone else come up with a better mechanism for this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-10-24 10:15:29 -0500

Chad Rockey gravatar image

Looks like the current best solution is still calling the manager's 'unloadNodelet' service. You'll have to use a parameter (or some REALLY clever namespace/nodehandle tricks) to determine what service to call.

Here's a relevant mailing list thread: http://ros-users.122217.n3.nabble.com/nodelet-shutdown-unload-itself-requestShutdown-td3151148.html

Here's the still open ticket: https://code.ros.org/trac/ros-pkg/ticket/4431

edit flag offensive delete link more

Comments

Has that ticket been moved to github? If not we have a script to move trac tickets to github around here somewhere...

WilliamWoodall gravatar image WilliamWoodall  ( 2012-10-24 10:18:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-10-24 05:02:01 -0500

Seen: 632 times

Last updated: Oct 24 '12