Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a remake of #301 given that neither @fmauch nor @bmagyar
are reacting why this PR has been closed.
Differences to the original PR
time_data_
field in a RealTimeBox as the access solely happens from the RT thread.Testing
I tested it by cherry-picking the commit back to the iron branch and running it on my setup with multiple joint motions. They were looking fine. We are using basically the same code (but added to the original scaled jtc) on our production setup for more than 3/4 of a year now. (https://github.com/firesurfer/Universal_Robots_ROS2_Driver/tree/fixed_jtc)
Configuration
The PR adds the following configuration entry:
For a multiarm scenario one would set this topic to the same topic name for all involved JTCs.
Up to discussion: Should it be disabled per default?
Notes
The
scaling_factor_
field does not need to be in a RealTime box (it does not matter if it is updated an update cycle earlier or later) but it might make sense to use anstd::atomic<double>
double as some platforms might not guarantee atomic access to the variable.It has the same issue as the original PR bei @fmauch. It does not scale velocities and efforts at the moment. But never the less I think it is a really useful addition and bringing this feature upstream will avoid issues such as #1182 where the bug has been fixed upstream but not backported yet.
iron backport I used for testing: https://github.com/firesurfer/ros2_controllers/tree/scaled_jtc_iron