Repository navigation
Added planning scene tests - #667
Conversation
rhaschke
left a comment
There was a problem hiding this comment.
Added functions to load both urdf and srdf models is good. The actually added test can be neglected. You should definitely actuate some robot poses with known collision state and validate the API against them.
| robot_state::RobotState current_state = ps->getCurrentState(); | ||
| if (ps->isStateColliding(current_state, "left_arm")) | ||
| { | ||
| EXPECT_FALSE(ps->isStateValid(current_state, "left_arm")); |
There was a problem hiding this comment.
This test isn't very useful, isn't it?
I think tests should verify the correct working of the API. In this particular example, you should set up some robot poses, that are known to collide/not collide and validate the result of isStateColliding().
Or you should set up some constraints that are fulfilled or not and validate isStateFeasible().
There was a problem hiding this comment.
@rhaschke Thank you for feedback. Work was done in the limited amount of time during World MoveIt Day 2017. Hopefully I will find some time to add suggested improvements before next WMD 2018 :)
There was a problem hiding this comment.
This seems useful enough to me... you use two different calls to verify expected behavior of invalid states.
| robot_state::RobotState current_state = ps->getCurrentState(); | ||
| if (ps->isStateColliding(current_state, "left_arm")) | ||
| { | ||
| EXPECT_FALSE(ps->isStateValid(current_state, "left_arm")); |
There was a problem hiding this comment.
This seems useful enough to me... you use two different calls to verify expected behavior of invalid states.
| loadRobotModel(robot_model_out); | ||
| std::string xml_string; | ||
| loadModelFile("pr2_description/srdf/robot.xml", xml_string); | ||
| srdf_model_out->initString(*robot_model_out, xml_string); |
There was a problem hiding this comment.
Ideally all tests would use the same test utilities for loading URDFs / SRDFs instead of remunerating them in every test. I have the same suggestion for a test @mlautman is working on in fact.
MoveIt! already has common file loading functionality for URDF / SRDF here - can that be reused in this file?
- use common functions for model loading - added small set of validations
- use common functions for model loading - added small set of validations
* Error if Octomap 'map_frame' is not provided * "octomap_frame", not "map_frame" Co-authored-by: Jafar Abdi <[email protected]> Co-authored-by: Jafar Abdi <[email protected]>

This is some kind of refactoring which will allow to add more tests easily. Related to #643