Open fmauch opened 2 months ago
This should now run "successfully".
There seem to be issues using gz sim inside launch_testing
. As far as I understand things, gz sim is started in a sub-shell. Then, when the test is stopped, child processes are not necessarily killed, correctly (see https://github.com/ros2/launch/issues/545).
When running our sim_control launchfile, the following processes are started:
auch 478001 9.1 0.1 213548 44864 pts/5 Sl+ 14:20 0:00 /usr/bin/python3 /opt/ros/rolling/bin/ros2 launch ur_simulation_gz ur_sim_control.launch.p
mauch 478012 0.0 0.0 2880 1920 pts/5 S+ 14:20 0:00 /bin/sh -c ruby $(which gz) sim -r -v 4 empty.sdf --force-version 8
mauch 478014 2.7 0.1 247956 64176 pts/5 S+ 14:20 0:00 gz sim -r -v 4 empty.sdf
mauch 478050 25.5 0.5 3256864 169584 pts/5 Rl 14:20 0:01 gz sim server
mauch 478051 53.3 1.3 4760344 428392 pts/5 Sl 14:20 0:02 gz sim GUI
478012
with SIGINT
doesn't seem to do anything.SIGTERM
keeps the three gz sim
processes running.So, with this, a gz sim instance keeps running after the test finished. I would rather not merge it this way, but I would also rather much like to have integration tests...
This aims at fixing #9
The tests in this PR work fine in principle. However, the paremetrization with each robot model seems to lead to a situation where the simulation isn't properly torn down, so for the second tested model there already is a simulation running which prevents the respective simulation from coming up correctly.