ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
7

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
1

Question Tools

Stats

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

Seen: 808 times

Last updated: Oct 24 '12