0
$\begingroup$

Rosanswers logo

Hi,

This might be a question that has been asked long time ago. But, through my observation, there is still no significant answer to this question.

My experiment requires me to start and stop a robot simulation several times. I manage to start the simulation by calling roslaunch files. After a period of time, I need the simulation to stop automatically. So, ros::shutdown() is executed at all nodes. However, rosout keeps re-spawn as stated below, which hinders another simulation to be run.

[rosout-1] restarting process process[rosout-1]: started with pid [31335] [ERROR] [1400669233.337848698]: [registerService] Failed to contact master at [localhost:11311]. Retrying...

Could someone please help me to solve this problem?

Thank you.


Originally posted by faisal on ROS Answers with karma: 1 on 2014-05-21

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

By default, roslaunch will respawn the rosout node as long as the launch file is running.

You can make roslaunch terminate when one of your nodes exits by adding the required="true" parameter to its <node> tag in your launch file.

This will also cause roslaunch to shut down all of the other nodes in your launch file when the required node exits, meaning that you no longer have to implement a coordinated shutdown.


Originally posted by ahendrix with karma: 47576 on 2014-05-21

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by faisal on 2014-05-21:
Many thanks. I have added required="true" to one of nodes in my roslaunch file. Now, it works. rosout not respawning again. Problem solved! Thanks again for your help.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.