Skip to content

Added a test to check all robot model parametrizations#505

Open
urfeex wants to merge 6 commits into
UniversalRobots:masterfrom
urfeex:check_robot_model
Open

Added a test to check all robot model parametrizations#505
urfeex wants to merge 6 commits into
UniversalRobots:masterfrom
urfeex:check_robot_model

Conversation

@urfeex
Copy link
Copy Markdown
Member

@urfeex urfeex commented May 12, 2026

This PR adds a workflow to check the robot model as reported from the primary interface with the model argument provided to start_ursim.sh.

This also fixes passing ur7e or ur12e to PolyScope 5.

To reduce build resources, this PR splits the integration tests into a "build" stage and two "test" stages utilizing that build. This probably doesn't save any time, but build resources and makes handling a failed build easier.


Note

Medium Risk
Moderate risk because it restructures CI execution and modifies start_ursim.sh model normalization for UR7e/UR12e, which could break integration test orchestration or URSim startup if misconfigured.

Overview
Splits the integration workflow into a dedicated Ubuntu build job and downstream test jobs by archiving/uploading the CMake build directory and reusing it in run_tests (and a new check job), reducing repeated compilation.

Adds a new CI job to validate robot model parametrizations across many URSim versions/models by running only PrimaryClientTest.test_robot_type and reporting coverage with distinct Codecov flags.

Fixes UR7e/UR12e handling in scripts/start_ursim.sh so PolyScope 5 strips the trailing e while PolyScope X keeps UR7e/UR12e, with updated Bats assertions.

Introduces robotTypeFromString in helpers and a new GTest that compares the primary interface-reported robot type against the ROBOT_MODEL env var mapping (including UR7e→UR5 and UR12e→UR10).

Reviewed by Cursor Bugbot for commit 3cb96c9. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.66%. Comparing base (8f35234) to head (3cb96c9).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/helpers.cpp 83.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #505      +/-   ##
==========================================
- Coverage   76.96%   76.66%   -0.31%     
==========================================
  Files         116      116              
  Lines        6342     6354      +12     
  Branches     2761     2764       +3     
==========================================
- Hits         4881     4871      -10     
- Misses       1112     1134      +22     
  Partials      349      349              
Flag Coverage Δ
check_version_ur10-3.15.8 11.08% <83.33%> (?)
check_version_ur10e-10.11.0 11.73% <83.33%> (?)
check_version_ur10e-5.15.2 11.73% <83.33%> (?)
check_version_ur12e-10.12.1 11.78% <83.33%> (?)
check_version_ur15-10.12.1 11.73% <83.33%> (?)
check_version_ur15-5.25.1 11.73% <83.33%> (?)
check_version_ur16e-10.12.1 11.78% <83.33%> (?)
check_version_ur16e-5.25.1 11.73% <83.33%> (?)
check_version_ur18-10.12.1 11.73% <83.33%> (?)
check_version_ur18-5.25.1 11.78% <83.33%> (?)
check_version_ur20-10.12.1 11.73% <83.33%> (?)
check_version_ur20-5.25.1 11.73% <83.33%> (?)
check_version_ur3-3.14.3 11.08% <83.33%> (?)
check_version_ur30-10.12.1 11.78% <83.33%> (?)
check_version_ur30-5.25.1 11.73% <83.33%> (?)
check_version_ur3e-10.11.0 11.73% <83.33%> (?)
check_version_ur3e-5.9.4 11.78% <83.33%> (?)
check_version_ur5e-10.11.0 11.78% <83.33%> (?)
check_version_ur5e-5.12.8 11.93% <83.33%> (?)
check_version_ur7e-10.11.0 11.73% <83.33%> (?)
check_version_ur7e-5.22.2 11.73% <83.33%> (?)
check_version_ur8long-10.12.1 11.73% <83.33%> (?)
check_version_ur8long-5.25.1 11.93% <83.33%> (?)
python_scripts 75.90% <ø> (ø)
start_ursim 83.57% <100.00%> (-1.46%) ⬇️
ur20-latest 72.76% <0.00%> (-0.32%) ⬇️
ur5e-10.11.0 66.80% <0.00%> (-0.41%) ⬇️
ur5e-10.12.0 67.86% <0.00%> (-0.48%) ⬇️
ur5e-10.7.0 66.51% <0.00%> (+0.05%) ⬆️
ur5e-5.9.4 73.28% <0.00%> (-0.45%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@urfeex urfeex force-pushed the check_robot_model branch from 37723a8 to 9b34981 Compare May 13, 2026 10:05
@urfeex urfeex marked this pull request as ready for review May 15, 2026 12:00
@urfeex urfeex requested a review from a team May 15, 2026 12:00
Comment thread src/helpers.cpp
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default mode and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 3cb96c9. Configure here.

Comment thread .github/workflows/ci.yml
URSIM_VERSION: ${{matrix.env.URSIM_VERSION}}
- name: Upload test results to Codecov
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
if: ${{ !cancelled() }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Coverage steps lost !cancelled() guard condition

Low Severity

The install gcovr, gcovr, and Upload coverage reports steps in run_tests previously had if: ${{ !cancelled() && steps.build.outcome == 'success' }}, ensuring coverage was collected even when tests failed. Removing the entire condition (rather than just the now-invalid steps.build.outcome check) means these steps default to success() and won't run on test failure — silently dropping coverage data. The Upload test results step at line 116 correctly kept !cancelled(), making this inconsistency look like an oversight.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3cb96c9. Configure here.

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.

1 participant