Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove empty callbacks #1488

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Juliaj
Copy link
Contributor

@Juliaj Juliaj commented Jan 13, 2025

Follow up of #1477 (review). This is to remove empty callback, e.g. on_cleanup, on_deactivate from code base.

A noob question, based on node life_cycle doc , there are predefined roles for these call backs. Why were these coded as empty ? Was it for readability or a place holder for further development ?

Copy link

codecov bot commented Jan 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.87%. Comparing base (e0b929b) to head (f4d6b25).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1488      +/-   ##
==========================================
+ Coverage   83.86%   83.87%   +0.01%     
==========================================
  Files         122      122              
  Lines       11148    11140       -8     
  Branches      948      946       -2     
==========================================
- Hits         9349     9344       -5     
+ Misses       1486     1485       -1     
+ Partials      313      311       -2     
Flag Coverage Δ
unittests 83.87% <ø> (+0.01%) ⬆️

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

Files with missing lines Coverage Δ
...dmittance_controller/src/admittance_controller.cpp 74.71% <ø> (+0.55%) ⬆️
...jectory_controller/joint_trajectory_controller.hpp 100.00% <ø> (ø)
...ory_controller/src/joint_trajectory_controller.cpp 83.88% <ø> (-0.05%) ⬇️
pid_controller/src/pid_controller.cpp 68.42% <ø> (-0.28%) ⬇️

... and 4 files with indirect coverage changes

@christophfroehlich
Copy link
Contributor

A noob question, based on node life_cycle doc , there are predefined roles for these call backs. Why were these coded as empty ? Was it for readability or a place holder for further development ?

These are virtual methods defined in the LifecycleNodeInterface, and don't need to be overridden if there is no action to be done at the respective transition. Why they are here? I guess just because of copying a template around.

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

Thanks for the cleanup.

Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants