Skip to content
This repository was archived by the owner on Mar 27, 2019. It is now read-only.

Fix/remove randomness#16

Open
khupilz wants to merge 2 commits intomoveit:kinetic-develfrom
PilzDE:fix/remove_randomness
Open

Fix/remove randomness#16
khupilz wants to merge 2 commits intomoveit:kinetic-develfrom
PilzDE:fix/remove_randomness

Conversation

@khupilz
Copy link
Copy Markdown

@khupilz khupilz commented Feb 14, 2018

Fixed unstable tests due to following two reasons:

  • random test data breaks the checking of success rate eventually
    A random number generator with a seed is used for generating test data
  • Additional checking of z>0 in test case searchIKWithCallback throws some test samples away but this is not taken in account when computing success rate.

Copy link
Copy Markdown
Member

@davetcoleman davetcoleman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 makes sense to me

int num_nearest_ik_tests_;

// random generator
random_numbers::RandomNumberGenerator rng_{RANDOM_SEED};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this aggregate initialization? im not used to this syntax http://en.cppreference.com/w/cpp/language/aggregate_initialization

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is C++11 Brace-Initialization, can be used also for class members. check the link http://www.informit.com/articles/article.aspx?p=1852519

@@ -382,7 +389,7 @@ TEST(IKFastPlugin, searchIKWithCallback)
}

ROS_INFO_STREAM("Success Rate: " << (double)success / kinematics_test.num_ik_cb_tests_);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subtract removed_sample from this debug out put too please

 - removed test samples because of z > 0 are considered
@khupilz khupilz force-pushed the fix/remove_randomness branch from bebe45f to d80edc7 Compare February 19, 2018 12:07
@@ -340,6 +346,7 @@ TEST(IKFastPlugin, searchIKWithCallback)
// check height
if (poses[0].position.z <= 0.0f)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't recall why the height has to be checked here ...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you made this in order to check if the IKCallback works.

@jrgnicho
Copy link
Copy Markdown
Contributor

I'm not sure what's wrong with travis build but this looks good to me. @khupilz thanks for submitting this patch.

rhaschke added a commit to ubi-agni/moveit that referenced this pull request Mar 6, 2019
Kinematics unittests use random sampling, which might (randomly) cause the tests to fail.
This fix reduces randomness by using a fixed seed to sample robot states.

Additionally, the "searchIKWithCallback" test should resample dismissed samples as pointed out
in moveit/moveit_kinematics_tests#16.
rhaschke added a commit to ubi-agni/moveit that referenced this pull request Mar 6, 2019
Kinematics unittests use random sampling, which might (randomly) cause the tests to fail.
This fix reduces randomness by using a fixed seed to sample robot states.

Additionally, the "searchIKWithCallback" test should resample dismissed samples as pointed out
in moveit/moveit_kinematics_tests#16.
rhaschke added a commit to moveit/moveit that referenced this pull request Mar 7, 2019
Kinematics unit tests use random sampling, which might (randomly) cause the tests to fail (unfortunately sampling many failing samples).
This fix reduces randomness by using a fixed seed to sample robot states.

Additionally, the "searchIKWithCallback" test should resample dismissed samples as pointed out
in moveit/moveit_kinematics_tests#16.
henningkayser pushed a commit to henningkayser/moveit2 that referenced this pull request Mar 7, 2019
Kinematics unit tests use random sampling, which might (randomly) cause the tests to fail (unfortunately sampling many failing samples).
This fix reduces randomness by using a fixed seed to sample robot states.

Additionally, the "searchIKWithCallback" test should resample dismissed samples as pointed out
in moveit/moveit_kinematics_tests#16.
mayman99 pushed a commit to mayman99/moveit that referenced this pull request Mar 9, 2019
Kinematics unit tests use random sampling, which might (randomly) cause the tests to fail (unfortunately sampling many failing samples).
This fix reduces randomness by using a fixed seed to sample robot states.

Additionally, the "searchIKWithCallback" test should resample dismissed samples as pointed out
in moveit/moveit_kinematics_tests#16.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants