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

Start/Stop node at runtime?

asked 2012-03-01 02:44:21 -0600

Cav gravatar image

updated 2014-01-28 17:11:32 -0600

ngrennan gravatar image

Hi,

is there a nice ROS-way to start a node at runtime (using C++) and after some time stop it again (without using system() etc.)?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
5

answered 2012-03-01 05:36:53 -0600

dornhege gravatar image

updated 2012-03-01 05:37:49 -0600

At least for killing there is an xmlrpc shutdown call, which is what rosnode kill uses. That is probably the ROS'iest way to do it. Sending SIGINT would also be OK as ROS installs a SIGINT handler.

Slave API

edit flag offensive delete link more
1

answered 2012-03-01 04:51:28 -0600

joq gravatar image

I don't think so.

The ROS-way is for all nodes to run continuously until shutdown. If a node crashes, roslaunch can respawn it for you.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-03-01 02:44:21 -0600

Seen: 4,947 times

Last updated: Mar 01 '12