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

Fix floating point comparison in JTC #879

Conversation

Abishalini
Copy link
Contributor

I was going through the MoveIt tutorials and there were instances where motion planning succeeded but execution failed with the error

[ros2_control_node-5] [ERROR] [1701709582.650235815] [joint_trajectory_controller]: Velocity of last trajectory point of joint joint_1 is not zero: -0.000000

Changing the comparison to use an epsilon fixed it locally for me.

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.

Thank you!

@bmagyar bmagyar added backport-iron backport-humble This label should be used by maintainers only! Label triggers PR backport to ROS2 humble. labels Dec 4, 2023
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.

LGTM, only one small fix in the format.

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

Copy link

codecov bot commented Dec 4, 2023

Codecov Report

Merging #879 (0669174) into master (038a547) will increase coverage by 0.60%.
The diff coverage is 0.00%.

❗ Current head 0669174 differs from pull request most recent head 71ee272. Consider uploading reports for the commit 71ee272 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #879      +/-   ##
==========================================
+ Coverage   46.73%   47.33%   +0.60%     
==========================================
  Files          40       40              
  Lines        3640     3640              
  Branches     1718     1718              
==========================================
+ Hits         1701     1723      +22     
+ Misses        749      725      -24     
- Partials     1190     1192       +2     
Flag Coverage Δ
unittests 47.33% <0.00%> (+0.60%) ⬆️

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

Files Coverage Δ
...ory_controller/src/joint_trajectory_controller.cpp 48.68% <0.00%> (ø)

... and 2 files with indirect coverage changes

@christophfroehlich christophfroehlich removed the backport-humble This label should be used by maintainers only! Label triggers PR backport to ROS2 humble. label Dec 4, 2023
@christophfroehlich christophfroehlich merged commit 71b06d0 into ros-controls:master Dec 4, 2023
11 of 13 checks passed
mergify bot pushed a commit that referenced this pull request Dec 4, 2023
* Fix floating point comparison in JTC

* Fix format

---------

Co-authored-by: Christoph Fröhlich <[email protected]>
(cherry picked from commit 71b06d0)
christophfroehlich added a commit to christophfroehlich/ros2_controllers that referenced this pull request Dec 4, 2023
* Fix floating point comparison in JTC

* Fix format

---------

Co-authored-by: Christoph Fröhlich <[email protected]>
@Abishalini Abishalini deleted the pr-fix-floating-point-comparison-in-jtc branch December 4, 2023 23:01
bmagyar pushed a commit that referenced this pull request Dec 5, 2023
@Abishalini
Copy link
Contributor Author

Abishalini commented Dec 5, 2023

Thanks for fixing this up and merging! Can this be backported to humble as well?

@christophfroehlich
Copy link
Contributor

I included this in #801 to avoid any conflicts on JTC. I hope it get merged soon, if you prefer you can use the branch and build it from source in the meantime (and give feedback/approval to the PR if you tested it successfully).

christophfroehlich added a commit to christophfroehlich/ros2_controllers that referenced this pull request Dec 5, 2023
* Fix floating point comparison in JTC

* Fix format

---------

Co-authored-by: Christoph Fröhlich <[email protected]>
bmagyar pushed a commit that referenced this pull request Dec 6, 2023
* Fix floating point comparison in JTC

* Fix format

---------

Co-authored-by: Christoph Fröhlich <[email protected]>
henrygerardmoore pushed a commit to henrygerardmoore/ros2_controllers that referenced this pull request Jul 19, 2024
Co-authored-by: Bence Magyar <[email protected]>
Co-authored-by: Denis Štogl <[email protected]>
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.

5 participants