Ask Your Question
0

How to dynamically launch and kill nodes?

asked 2018-03-13 08:31:32 -0500

Cerin gravatar image

Is there any best practice and/or guides surrounding how to dynamically launch and kill nodes?

I'm building a small Raspberry Pi based robot, and since it only has 1GB of memory and limited CPU, I don't want every possibly node I use to be loaded, because even a node that's "standing by" consumes about 2-3% of memory.

For example, say I want to start a procedure that looks for QR codes in a video stream. If I don't normally do this, it doesn't make sense to have a QR tracking node running at all times, so I'll want to dynamically launch the node as needed, and then kill it when the procedure is complete. What's the best way to do this using rospy?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-03-13 08:45:40 -0500

tuandl gravatar image

updated 2018-03-13 09:45:20 -0500

For killing a node when you finish processing: #q250494

For starting a node only when it is required, I would suggest using actionlib.

edit flag offensive delete link more

Comments

Cerin gravatar imageCerin ( 2018-03-13 09:42:54 -0500 )edit

Sorry, edited the link.

tuandl gravatar imagetuandl ( 2018-03-13 09:45:39 -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

3 followers

Stats

Asked: 2018-03-13 08:31:32 -0500

Seen: 78 times

Last updated: Mar 13 '18