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

[JSB] Fix the behaviour of publishing unavailable state interfaces when they are previously available #1331

Conversation

saikishor
Copy link
Member

@saikishor saikishor commented Oct 30, 2024

Hello!

While reviewing the Example 13, I came across this situation described in the comment : ros-controls/ros2_control_demos#417 (comment)

After debugging, the resource manager properly sets the state interfaces. However, some internal variables are not properly reset, and this results in the publishing of previously available interfaces.

The proposed fix fixes the issue of properly publishing the state of the known state interfaces alone

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.67%. Comparing base (7c89c17) to head (1178e73).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1331      +/-   ##
==========================================
+ Coverage   80.57%   80.67%   +0.10%     
==========================================
  Files         109      109              
  Lines        9553     9580      +27     
  Branches      832      835       +3     
==========================================
+ Hits         7697     7729      +32     
+ Misses       1578     1573       -5     
  Partials      278      278              
Flag Coverage Δ
unittests 80.67% <100.00%> (+0.10%) ⬆️

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

Files with missing lines Coverage Δ
..._state_broadcaster/src/joint_state_broadcaster.cpp 89.24% <100.00%> (+2.14%) ⬆️
..._broadcaster/test/test_joint_state_broadcaster.cpp 96.62% <100.00%> (+1.24%) ⬆️

... and 1 file with indirect coverage changes

Copy link
Member

@bmagyar bmagyar left a comment

Choose a reason for hiding this comment

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

oh mamma mia! that is a good catch!

@bmagyar bmagyar added backport-humble This label should be used by maintaines only! Label triggers PR backport to ROS2 humble. backport-iron This label should be used by maintaines only! Label triggers PR backport to ROS2 Iron. labels Oct 31, 2024
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.

I tested this right now with example_13: I could reproduce the issue and can confirm that this PR solves it.

@christophfroehlich christophfroehlich merged commit 87f21b3 into ros-controls:master Nov 1, 2024
18 of 20 checks passed
mergify bot pushed a commit that referenced this pull request Nov 1, 2024
…en they are previously available (#1331)

* Add test to reproduce the behaviour of ros-controls/ros2_control_demos#417 (comment)

* Add fix to solve the issue of the publishing non-existing joint_states

(cherry picked from commit 87f21b3)
mergify bot pushed a commit that referenced this pull request Nov 1, 2024
…en they are previously available (#1331)

* Add test to reproduce the behaviour of ros-controls/ros2_control_demos#417 (comment)

* Add fix to solve the issue of the publishing non-existing joint_states

(cherry picked from commit 87f21b3)
@saikishor saikishor deleted the fix/joint_states/behaviour branch November 1, 2024 19:16
christophfroehlich pushed a commit that referenced this pull request Nov 1, 2024
…en they are previously available (#1331) (#1339)

* Add test to reproduce the behaviour of ros-controls/ros2_control_demos#417 (comment)

* Add fix to solve the issue of the publishing non-existing joint_states

(cherry picked from commit 87f21b3)

Co-authored-by: Sai Kishor Kothakota <[email protected]>
christophfroehlich pushed a commit that referenced this pull request Nov 1, 2024
…en they are previously available (#1331) (#1340)

* Add test to reproduce the behaviour of ros-controls/ros2_control_demos#417 (comment)

* Add fix to solve the issue of the publishing non-existing joint_states

(cherry picked from commit 87f21b3)

Co-authored-by: Sai Kishor Kothakota <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-humble This label should be used by maintaines only! Label triggers PR backport to ROS2 humble. backport-iron This label should be used by maintaines only! Label triggers PR backport to ROS2 Iron.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants