[ros-users] Multiple init/start/shutdown cycles without rest…

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: User discussions
日付:  
To: ros-users
題目: [ros-users] Multiple init/start/shutdown cycles without restart
Hi,

i would like to use multiple cycles of ros::init/ros::start/ros::shutdown
without restarting the binary every time. Currently the ros::init function
protects itself from multiple calls (using the bool g_initialized).

I added/hacked an additional function ros::uninit() which currently just resets
the bool to false. Multiple ros::init/ros::start/ros::shutdown/ros::uninit
cycles are now working (without extensive testing).

I suppose that the uninit-function needs to perform more cleaning and resetting.

Are there any sideeffects i should be aware of?
Can such a function be integrated into ROS (with a more comprehensive
implementation than my one, of course)?

Dirk