-
Notifications
You must be signed in to change notification settings - Fork 946
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
[AIST-QA]Fix possibile division-by-zero issues. #1809
[AIST-QA]Fix possibile division-by-zero issues. #1809
Conversation
- Correct the indication by the static analysis tool. - Added a safeguard and display warning.
- Correct the indication by the static analysis tool. - Added a safegurad that check scale value is zero or non-zero.
Thanks for helping in improving MoveIt and open source robotics! |
To fulfill the checklist requirement, I've reviewed this PR: #1804 and left a comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have objections about the benchmark, but the addition in ChompCost should be changed imo. Unintuitive/edge-case behavior like that should not be silent, it's too easy to create hard-to-find bugs down the line.
Also pinging @BryceStevenWilley because he'd be more familiar with this part of the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if the small correction is added. Thanks for the quick iteration.
Congrats on getting your first MoveIt pull request merged and improving open source robotics! |
Description
Local variables are used as denominator in
measure_ik_call_cost.cpp
andchomp_optimizer.cpp
.These variables are initialized with zero and there are cases when they are used without changing value.
This fix adds checking the local variable against zero. (In
chomp_optimizer
, the fix is applied to the functionChompCost::scale
)This contribution is made by AIST ( https://www.aist.go.jp ) based on static code analysis with klocwork (Perforce Software).
Checklist