Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration tests #17

Merged
merged 5 commits into from
Aug 6, 2024
Merged

Integration tests #17

merged 5 commits into from
Aug 6, 2024

Conversation

fmauch
Copy link
Collaborator

@fmauch fmauch commented Apr 15, 2024

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.

@fmauch fmauch linked an issue Apr 15, 2024 that may be closed by this pull request
2 tasks
@fmauch
Copy link
Collaborator Author

fmauch commented Jun 24, 2024

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 ros2/launch#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
  • Stopping 478012 with SIGINT doesn't seem to do anything.
  • Stopping it with 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...

@fmauch fmauch marked this pull request as ready for review July 1, 2024 12:50
@fmauch fmauch requested a review from VinDp July 1, 2024 12:50
@fmauch fmauch mentioned this pull request Jul 1, 2024
Since the simulation doesn't shutdown cleanly, we do not want to leave behind a dangling simulation after running a colcon build.
Copy link
Collaborator

@VinDp VinDp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@VinDp VinDp merged commit a1115e5 into UniversalRobots:ros2 Aug 6, 2024
6 of 10 checks passed
@VinDp VinDp mentioned this pull request Aug 26, 2024
fmauch pushed a commit that referenced this pull request Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add integration tests for GZ simulatio
2 participants