-
Notifications
You must be signed in to change notification settings - Fork 947
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 errors when loading scene geometry from files #1056
Check errors when loading scene geometry from files #1056
Conversation
I like helpful error messages, so I like this. Is there anything to update in the visualization tab? |
@felixvd do you mean for the rviz plugin? I hadn't looked at that - I was actually using this function directly from a non-gui program. |
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.
Love it
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.
Not sure how critical this is but 1-2 unit tests would be nice. With or without, these are very welcome changes.
@bmagyar good point - I'll add a couple unit tests.. |
@bmagyar I've added a couple tests. Not exhaustive by any means, but should do a decent job of sanity checking the code. |
I changed usages of the method in existing MoveIt! code to consider the return value. |
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 also approve this. Instead of returning a boolean, what about throwing an exception?
In this fashion we could also pass the error message to the caller. However, that's not the standard in ROS.
@rhaschke thanks for updating the rviz plugin to use this! Switching to exceptions seems like a bigger change - other functions in |
(if you do want exceptions here though, let me know and I'm happy to update the PR) |
Description
Before this PR, there was no error checking when loading planning scene geometry from a text file. This meant the caller couldn't tell whether the planning scene had been successfully loaded.
Not sure if this should be cherry-picked. It changes the return type of two PlanningScene member functions, so I think it would require people to re-compile their code.
Checklist