Skip to content

Use configurable output bits in RTDE client test - #626

Merged
urfeex merged 4 commits into
UniversalRobots:masterfrom
URJala:rtde_test_config_bits
Nov 19, 2026
Merged

urfeex merged 4 commits into
UniversalRobots:masterfrom
URJala:rtde_test_config_bits

Conversation

@URJala

@URJala URJala commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

CB7 does not support setting the non-configurable bits via RTDE

Copilot AI balanced review requested due to automatic review settings November 17, 2026 09:18
@cursor

cursor Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Test-only change with no production code or runtime behavior impact.

Overview
Updates the write_rtde_data RTDE client integration test so it works on CB7 controllers, which cannot set standard digital outputs over RTDE.

The test now bootstraps the client with actual_configurable_digital_output_bits in the output recipe (and ignore_unavailable_outputs enabled), then after init uses negotiated protocol version and robot properties to pick the control box type. On CB7 it writes via sendConfigurableDigitalOutput and reads actual_configurable_digital_output_bits; on older boxes it keeps the existing standard digital output path and field name for verification.

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

@mergify

mergify Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.80%. Comparing base (4151909) to head (01b05d1).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #626      +/-   ##
==========================================
- Coverage   83.84%   83.80%   -0.04%     
==========================================
  Files         127      127              
  Lines        8560     8560              
  Branches     3913     3913              
==========================================
- Hits         7177     7174       -3     
- Misses        970      971       +1     
- Partials      413      415       +2     
Flag Coverage Δ
python_scripts 49.69% <ø> (ø)
start_ursim 88.83% <ø> (-0.77%) ⬇️
unit 64.07% <ø> (-0.02%) ⬇️
ur20-latest 81.43% <ø> (-0.09%) ⬇️
ur5-3.14.3 81.26% <ø> (+0.05%) ⬆️
ur5e-10.11.0 77.03% <ø> (+0.01%) ⬆️
ur5e-10.12.0 78.00% <ø> (-0.04%) ⬇️
ur5e-10.7.0 ?
ur5e-5.9.4 81.41% <ø> (-0.08%) ⬇️
ur7e-10.13.0 78.39% <ø> (ø)
ur7e-10.14.0 78.63% <ø> (-0.02%) ⬇️

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

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

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread tests/test_rtde_client.cpp Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The CB7 test reads a feedback field absent from its output recipe, causing both unchecked extractions to fail and the test to report failure even when the configurable output write succeeds.

1 open issue
What changed in this PR

Updates the RTDE client integration test to use configurable digital outputs on CB7 controllers, where standard digital outputs cannot be set through RTDE.

Changes:

  • Selects configurable or standard output writes based on the control-box type.
  • Selects the corresponding feedback field when checking the output state.
File Description
tests/​test_rtde_client.cpp Adds hardware-dependent output writes and feedback selection to write_rtde_data.

Review effort: Balanced

Comment thread tests/test_rtde_client.cpp Resolved
Copilot AI balanced review requested due to automatic review settings November 17, 2026 10:37

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 effort and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 1c171ff. Configure here.

Comment thread tests/test_rtde_client.cpp Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The test treats missing robot properties as confirmed standard-output support, which can select an unsupported output bank on CB7 hardware instead of explicitly handling unknown hardware.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Do not assume standard outputs when robot hardware is unknown

tests/​test_rtde_client.cpp:481

Missing robot properties do not identify a CB5: getRobotProperties() can be empty after successful initialization when the properties request fails or a property is unavailable. On a CB7 in that state, this fallback selects sendStandardDigitalOutput() and the standard-output readback, so the test still exercises an unsupported output bank. Handle absent/UNKNOWN hardware explicitly (for example, skip with a diagnostic when the hardware cannot be determined) rather than treating it as confirmed standard-output support.

1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 17, 2026 11:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The output-selection fallback can send unsupported standard-output writes on CB7 when robot properties are missing or the hardware type is unknown.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Guard standard-output writes when controller type is unknown

tests/​test_rtde_client.cpp:475

Robot properties may be absent even after successful initialization, so this default can send an unsupported standard-output write on CB7. An explicit UNKNOWN type also falls through to that write. Select outputs using a reliable capability check, or skip with a diagnostic when hardware cannot be identified, while preserving legacy-controller coverage.

Review effort: Balanced

@urfeex urfeex left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving, but I would like to have a working CI again before merging this. See #627

@urfeex urfeex added the CI label Nov 17, 2026
@urfeex
urfeex force-pushed the rtde_test_config_bits branch from 73f0836 to 58e7d97 Compare November 17, 2026 13:45
Copilot AI balanced review requested due to automatic review settings November 17, 2026 13:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The test assumes CB5 when identification is unavailable, which can select an unsupported output and incorrect readback field on CB7 and cause failures despite successful initialization.

1 open issue

Review effort: Balanced

bool send_digital_output = true;
EXPECT_TRUE(client_->getWriter().sendStandardDigitalOutput(0, send_digital_output));
auto robot_properties = client_->getRobotProperties();
ControlBoxType cb_type = ControlBoxType::CB5;
This will give a clear failure reason instead of a failed write later in
the process.
Copilot AI balanced review requested due to automatic review settings November 18, 2026 14:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The digital-output test fails before exercising outputs when robot properties are legitimately unavailable after successful protocol-3 initialization, rather than skipping with an explanation.

2 open issues

Review effort: Balanced

Comment thread tests/test_rtde_client.cpp Resolved
@urfeex
urfeex merged commit 366e32a into UniversalRobots:master Nov 19, 2026
55 of 67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants