Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Conversation

@meyerj
Copy link
Contributor

@meyerj meyerj commented Feb 2, 2023

  • Use exec where appropriate, such that signals send by roslaunch are received directly by the gzserver or gzclient processes and do not have to be forwarded by the shell explicitly.

  • Apply the $gzserver_pid variable saved earlier instead of $! in the all-in-one gazeboscript to kill the server process once the client terminates. The old version should also have been fine, because$!is the pid of the last _background_ process. Before, variablegzserver_pid` was unused.

  • With the gzclient script the gazebo_ros_api_plugin was also loaded into the client process. That plugin creates the /gazebo ROS node, and hence two identical nodes are spawned. Launching the client like that broke the ROS API of Gazebo for us, including /clock publishing, at least once the GUI would be closed.

    The gzclient script is also what is executed by the launch files in package gazebo_ros if argument gui:=true (the default). In this case the node names do not clash because roslaunch overwrites the default node name with /gazebo_gui, but still it is probably unintended to load the plugin into the GUI at all, I assume.

This patch eventually fixes #751?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gzserver not dying after killing the simulation

1 participant