Hello,
I am using the ROS plugin for v.3.3.0 in headless mode on a linux machine, and it is running well.
However, when I try to terminate V-REP by hitting CTRL+C, V-REP stops responding and never quit. So, I need to kill the process manually.
I looked into the code a bit, and it seems that v_repEnd() for the ROS plugin is never called. (Maybe the termination process gets stuck before calling it?)
On the other hand, V-REP terminates cleanly when
- the ROS plugin was not loaded, or
- V-REP is running in GUI mode with ROS plugin.
It would be great if you can take a look and give me some advice.
Thank you.
ROS plugin doesn't quit in headless mode
Re: ROS plugin doesn't quit in headless mode
Hello,
CTRL+C is not directly supported, I guess when you use it it will simply kill the process. You should call simQuitSimulator from a child script, or from within a plugin. If you do that make sure that no simulation is running (simStopSimulation, then wait a bit, since the command needs a few cycles to execute).
Have a look at the beta release that came out today: with the new RosInterface, you can easily achieve what you want. With the old RosPlugin you could also do it by simply setting a specific signal, and a child script / customization script reacting to that signal and executing the quit command.
Cheers
CTRL+C is not directly supported, I guess when you use it it will simply kill the process. You should call simQuitSimulator from a child script, or from within a plugin. If you do that make sure that no simulation is running (simStopSimulation, then wait a bit, since the command needs a few cycles to execute).
Have a look at the beta release that came out today: with the new RosInterface, you can easily achieve what you want. With the old RosPlugin you could also do it by simply setting a specific signal, and a child script / customization script reacting to that signal and executing the quit command.
Cheers
Re: ROS plugin doesn't quit in headless mode
Thanks for the information. In the meantime I tried the following bash commands to unload the ROS plugin node from the master and kill the process, but maybe I need a fancier way to do that.
$ kill -2 $(pgrep vrep); sleep 1; kill -15 $(pgrep vrep);
By the way, the new ROS plugin looks good! Thank you for your continued support for ROS users.
$ kill -2 $(pgrep vrep); sleep 1; kill -15 $(pgrep vrep);
By the way, the new ROS plugin looks good! Thank you for your continued support for ROS users.