-
Notifications
You must be signed in to change notification settings - Fork 494
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 crash if MoveIt Servo collision check is disabled #568
Fix crash if MoveIt Servo collision check is disabled #568
Conversation
Codecov Report
@@ Coverage Diff @@
## main #568 +/- ##
==========================================
- Coverage 46.73% 46.71% -0.01%
==========================================
Files 184 184
Lines 19685 19686 +1
==========================================
- Hits 9198 9195 -3
- Misses 10487 10491 +4
Continue to review full report at Codecov.
|
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.
Why is the timer shared_ptr
in the first place? In MoveIt1 it is just ros::Timer
. This will fix the problem but I think the fix could also be unifying the timer initialization to match the MoveIt1.
In ROS1, the NodeHandle's |
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.
Thanks! Good catch.
Description
If the Servo collision check parameter is set to
false
,CollisionCheck
'srclcpp::TimerBase::SharedPtr
timer_
member is never initialized. Since~CollisionCheck()
callstimer_->cancel()
, requesting that Servo start if collision checking was not enabled causes a crash.This fixes the crash by checking if
timer_
was actually set before trying to cancel it.Checklist