-
Notifications
You must be signed in to change notification settings - Fork 935
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
Add test to ompl interface for StateValidityChecker #2247
Add test to ompl interface for StateValidityChecker #2247
Conversation
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.
Looks good to me.
@mamoll The tests with path constraints just started working today. It must have been some issue with my local environment, although I have no idea what caused the issue. But if the tests also succeed on Travis I will take that as proof that it was my local environment. |
Codecov Report
@@ Coverage Diff @@
## master #2247 +/- ##
=======================================
Coverage 56.38% 56.38%
=======================================
Files 287 287
Lines 24451 24451
=======================================
Hits 13785 13785
Misses 10666 10666
Continue to review full report at Codecov.
|
43da2a7
to
0fc2b1b
Compare
moveit_planners/ompl/ompl_interface/test/test_state_validity_checker.cpp
Outdated
Show resolved
Hide resolved
/** \brief Use this flag to turn on extra output on std::cout for debugging. **/ | ||
constexpr bool VERBOSE{ false }; |
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 not use ROS logging macros and setting them to output DEBUG with a namespace for this test?
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.
True! It's an old habit from when I didn't bother setting up my ROS debug levels correctly... I will fix this.
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.
Hmm, I will change the log statements, but I also use it to set the verbosity of the state validity checker
checker->setVerbose(VERBOSE);
which in turn is passed on to the collision request. Maybe I can make it an optional command-line argument for the test. The verbose output from the collision checker can be really useful when debugging. I can also set it to true by default.
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.
Talking about "minor" patches, it's really annoying that we can't specify arbitrary output streams for these methods. :-)
moveit_planners/ompl/ompl_interface/test/test_state_validity_checker.cpp
Outdated
Show resolved
Hide resolved
moveit_planners/ompl/ompl_interface/test/test_state_validity_checker.cpp
Outdated
Show resolved
Hide resolved
moveit_planners/ompl/ompl_interface/test/test_state_validity_checker.cpp
Outdated
Show resolved
Hide resolved
moveit_planners/ompl/ompl_interface/test/test_state_validity_checker.cpp
Outdated
Show resolved
Hide resolved
4984d0f
to
0fdb435
Compare
moveit_planners/ompl/ompl_interface/test/test_state_validity_checker.cpp
Outdated
Show resolved
Hide resolved
173a0c8
to
c73370e
Compare
I think this is ready to be merged after another review. |
I just noticed I did not add the new test dependencies to the <test_depend>moveit_resources_fanuc_description</test_depend>
<test_depend>moveit_resources_panda_description</test_depend> |
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 updating this. I made a couple comments about a minor nit but overall I think this test looks really good so I'm aproving it to make it easy to merge.
moveit_planners/ompl/ompl_interface/test/test_state_validity_checker.cpp
Outdated
Show resolved
Hide resolved
moveit_planners/ompl/ompl_interface/test/test_state_validity_checker.cpp
Outdated
Show resolved
Hide resolved
2032c2d
to
14bd736
Compare
@mamoll ping |
thanks! |
Description
I added some minimal tests for the
ompl_interface::StateValidityChecker
. My intend is to better understand how all the pieces fit together, not necessarily thorough testing of this class.The test uses a new generic test class to make it easy to run the same test on several robots. (See the documentation in the code.) Addmiditly it might come across as a bit overengineered, but I plan to use this for other tests in the future.
As mentioned in the comment, I could simplify it by using rostest and passing robot specific setup over the parameter server. But these tests would run slower and as this package is outside
moveit_ros
(so ideally ROS independent I guess).Or is there a better way?
Checklist