-
Notifications
You must be signed in to change notification settings - Fork 116
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
Enable particle initialization using covariances #259
Conversation
include/mcl_3dl/noise_generator.h
Outdated
{ | ||
public: | ||
template <typename T> | ||
explicit DiagonalNoiseGenerator(T& sigma) |
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.
Currently it is not possible to make this "const T& sigma", as some classes that inherit ParticleBase in our private repository does not have const version of operator[]. We need to fix them first.
[#667] FAILED on melodic
[#667] PASSED on kineticAll tests passed
|
Codecov Report
@@ Coverage Diff @@
## master #259 +/- ##
==========================================
+ Coverage 94.24% 94.29% +0.04%
==========================================
Files 25 28 +3
Lines 1563 1629 +66
==========================================
+ Hits 1473 1536 +63
- Misses 90 93 +3
Continue to review full report at Codecov.
|
[#668] PASSED on melodicAll tests passed
[#668] FAILED on kineticTest failed
[#668] PASSED on kineticAll tests passed
|
test/src/test_noise_generator.cpp
Outdated
{ | ||
const double average = std::accumulate(results[i].begin(), results[i].end(), 0.0) / results[i].size(); | ||
EXPECT_GE(average, -0.1); | ||
EXPECT_LE(average, 0.1); |
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.
EXPECT_NEAR
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.
Done
include/mcl_3dl/noise_generator.h
Outdated
{ | ||
public: | ||
template <typename T> | ||
explicit DiagonalNoiseGenerator(T& sigma) |
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 think it's better to handle mean value of the distribution in noise generator class.
It will make it easy to implement other random distribution types like uniform distribution in desired polygons which would be useful to generate initial distribution.
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.
Mean is used in State6DOF::generateNoise() (i.e. out of noise generator classes), so it is needed to update interfaces to do it. I made new issue (#260).
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.
API of generateNoise
is changed in this PR and it will be changed again to do #260.
IMO, it would better be done in this PR to minimize the number of API change.
At least, it should be done before the next release.
[#669] PASSED on kineticAll tests passed
[#669] PASSED on melodicAll tests passed
|
@at-wat Please take another look. |
[#673] FAILED on melodicTest failed
[#673] PASSED on kineticAll tests passed
[#673] PASSED on melodicAll tests passed
|
NoiseGeneratorBase class is added, and mean is included in this class. @at-wat Sorry for the delay. Please take a look when you have a time. |
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.
@nhatao thanks. I have added some minor comments.
include/mcl_3dl/state_6dof.h
Outdated
} | ||
State6DOF noise; | ||
const auto org_noise = gen(engine); |
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.
This auto would better be specified explicitly to avoid confusing with State6DOF type.
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.
Done
test/src/test_noise_generator.cpp
Outdated
|
||
namespace mcl_3dl | ||
{ | ||
void testDiagonalNoiseGeneratorResults(const std::vector<float>& expected_mean, |
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.
Is it possible to generate diagonal covariance matrix from sigma and wrap testMultivariateNoiseGeneratorResults
?
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.
testDiagonalNoiseGeneratorResults() and testMultivariateNoiseGeneratorResults() are unified
into testNoiseGeneratorResults().
[#678] FAILED on kineticTest failed
[#678] FAILED on melodicTest failed
|
[#679] PASSED on kineticAll tests passed
[#679] PASSED on melodicAll tests passed
|
@at-wat PTAL. |
[#680] PASSED on kineticAll tests passed
[#680] PASSED on melodicAll tests passed
|
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.
LGTM
merging |
Closes #258
Closes #202