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

Node shutdown

asked 2016-12-22 09:28:43 -0600

g.bardaro gravatar image

Hello,

I'm working on a node with an internal state machine. The node has to run the main loop in the "running" state, then after using Ctrl+C (or sending a rosnode kill) switch into a "closing" state do some stuff (maybe ROS related, like publishing on a topic) and then shutdown completely. In synthesis, I need to break the main loop without using ros::shutdown().

Currently I'm using an implementation similar to the one suggested here: http://answers.ros.org/question/27655...

Is this one still the best (and probably only) approach? Or there is a way to "split" the shutdown procedure?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-12-22 18:51:54 -0600

tfoote gravatar image

http://answers.ros.org/question/27655... Is still the best approach.

edit flag offensive delete link more

Comments

I see, thank you.

Is there any future plan on extending the shutdown procedure and give to the developers more control over it?

g.bardaro gravatar image g.bardaro  ( 2016-12-23 03:04:58 -0600 )edit
0

answered 2016-12-23 00:25:37 -0600

Akhilesh gravatar image

updated 2016-12-23 00:27:28 -0600

Hi g.bardaro, check the 2nd answer on http://answers.ros.org/question/25018... It worked for me.

edit flag offensive delete link more

Comments

Thank you for the suggestion, but what I'm trying to do is different.

g.bardaro gravatar image g.bardaro  ( 2016-12-23 03:01:47 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2016-12-22 09:28:03 -0600

Seen: 3,087 times

Last updated: Dec 23 '16