Use preallocated feedback from JTC to avoid heap allocation#2160
Use preallocated feedback from JTC to avoid heap allocation#2160saikishor wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2160 +/- ##
=======================================
Coverage 84.79% 84.79%
=======================================
Files 151 151
Lines 14833 14833
Branches 1286 1286
=======================================
Hits 12578 12578
Misses 1784 1784
Partials 471 471
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
christophfroehlich
left a comment
There was a problem hiding this comment.
The idea LGTM, but I suggest moving the initialization to a different place
|
|
||
| // Pre-allocate feedback message to avoid heap allocation in RT loop | ||
| preallocated_feedback_ = std::make_shared<FollowJTrajAction::Feedback>(); | ||
| preallocated_feedback_->joint_names = params_.joints; |
There was a problem hiding this comment.
This has nothing to do with the hold_position message.
let's move this to the on_configure, or rename the method.
|
This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete. |
|
This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete. |
This PR adds a preallocated feedback variable to avoid head allocation in the RT loop. This PR was tested along with ros-controls/realtime_tools#486 to improve the realtimeness of the JTC
Thank you