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
Check for nullptr on getGlobalLinkTransform #611
Check for nullptr on getGlobalLinkTransform #611
Conversation
Codecov Report
@@ Coverage Diff @@
## main #611 +/- ##
==========================================
+ Coverage 46.96% 46.96% +0.01%
==========================================
Files 185 185
Lines 19655 19659 +4
==========================================
+ Hits 9229 9231 +2
- Misses 10426 10428 +2
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.
Thank you for fixing this. At some point we should add a test for this.
Good catch! Are you sure you want to throw a std::runtime_error, though? I don't see that done anywhere else in robot_state.h or robot_state.cpp. I think it should be like this, instead:
To match what's done here. |
Seems good to me, switched over to that |
moveit_core/robot_state/include/moveit/robot_state/robot_state.h
Outdated
Show resolved
Hide resolved
Co-authored-by: AndyZe <andyz@utexas.edu>
Description
Checks for
nullptr
when looking up a link transformation. TheLinkModel*
is set asnullptr
here if the link name isn't known. This PR makes it throw in this case, instead of Seg Faulting. This should probably be backported to Moveit1 as wellI found this by modifying this line to be an unknown frame, then running the servo teleop demo with keyboard (arrow keys) input
Checklist