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

Run a node from another node

asked 2015-09-24 11:29:22 -0500

metRo_ gravatar image

Hello,

I think I have a bug on one of my nodes, responsible for parsing msgs from a serial port. While I don't find the bug I have a node that wait from the msgs and if the msgs doesn't arrive within a time-out I want to kill and relaunch the node.

How I can achieve this?

I'm using c++.

Thank you

edit retag flag offensive close merge delete

Comments

1

Do you mean "kill" by "run" in the title?

NEngelhard gravatar image NEngelhard  ( 2015-09-24 13:29:23 -0500 )edit

I mean run

metRo_ gravatar image metRo_  ( 2015-10-01 07:01:51 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-09-24 12:23:09 -0500

dornhege gravatar image

You can either kill the binary with the usual system tools or do rosnode kill <node name>.

The obvious solution for this problem would be to fix the actual bug.

edit flag offensive delete link more

Comments

1

If you also start the node in launch-file with respawn="true", the node will automatically be restarted after you killed it. http://wiki.ros.org/roslaunch/XML/node

NEngelhard gravatar image NEngelhard  ( 2015-09-24 13:27:04 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-09-24 11:29:22 -0500

Seen: 329 times

Last updated: Sep 24 '15