Skip to content

Conversation

@urfeex
Copy link
Member

@urfeex urfeex commented Jan 21, 2026

This is a refactor of RTDE communication effectively improving two things:

  • No more heap memory allocations during communication once everything is setup
  • Reduced parsing and access times of RTDE data that reduces the time of read and send operations

There's currently some documentation and testing missing, hence the draft status.

Creating new objects on the heap isn't really RT-capable and
undeterministic. This adds the possibility to parse incoming data
packages into a pre-allocated package to avoid having to create new
objects on the fly.

To achieve this, the pipeline in the RTDE client has been replaced by a
double buffer with two pre-allocated objects.
This should be a lot faster in accessing/storing objects in the data package
Before that change we were basically allocating strings and a new
DataPackage on each send operation. This change will preallocate a data
package and re-use that for future send operations. The necessary RTDE
dictionary keys are also preallocated.
@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.08%. Comparing base (4db70eb) to head (8d3344b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #419       +/-   ##
===========================================
+ Coverage   43.16%   83.08%   +39.92%     
===========================================
  Files          99        1       -98     
  Lines        8685      272     -8413     
  Branches     1182        0     -1182     
===========================================
- Hits         3749      226     -3523     
+ Misses       4654       46     -4608     
+ Partials      282        0      -282     
Flag Coverage Δ
start_ursim 83.08% <ø> (-1.22%) ⬇️
ur20-latest ?
ur5-3.14.3 ?
ur5e-10.7.0 ?
ur5e-5.9.4 ?

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.

This is specific to testing since we restart the RTDE client in very
quick succession. While we shutdown the connection from our end, the
robot might not have freed the resources, yet.
@urfeex urfeex force-pushed the refactor_rtde_parsing branch from 323b681 to ec6ab16 Compare January 22, 2026 10:02
@urfeex urfeex force-pushed the refactor_rtde_parsing branch from fe2dea1 to 8d3344b Compare January 23, 2026 20:36
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.

2 participants