Comments (3)
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).
I looked at this with @caguero today, and it appears to be related to uninitialized variables. The following patch fixes it:
diff -r 832c63ae5b8c10237e90f0adaf74281892065532 include/ignition/math/Filter.hh
--- a/include/ignition/math/Filter.hh Fri Jul 11 10:51:20 2014 -0700
+++ b/include/ignition/math/Filter.hh Fri Jul 11 16:49:55 2014 -0700
@@ -212,7 +212,12 @@
}
/// \brief Input gain control coefficients.
- protected: double a0, a1, a2, b0, b1, b2 = 0;
+ protected: double a0 = 0,
+ a1 = 0,
+ a2 = 0,
+ b0 = 0,
+ b1 = 0,
+ b2 = 0;
/// \brief Gain of the feedback coefficients.
protected: T x1, x2, y1, y2;
diff -r 832c63ae5b8c10237e90f0adaf74281892065532 src/Filter_TEST.cc
--- a/src/Filter_TEST.cc Fri Jul 11 10:51:20 2014 -0700
+++ b/src/Filter_TEST.cc Fri Jul 11 16:49:55 2014 -0700
@@ -73,6 +73,7 @@
TEST(FilterTest, Biquad)
{
math::BiQuad<double> filterA;
+ filterA.Set(0.0);
EXPECT_NEAR(filterA.Value(), 0.0, 1e-10);
EXPECT_NEAR(filterA.Process(1.1), 0.0, 1e-10);
filterA.Fc(0.3, 1.4);
The modification to the test with Set(0.0)
is necessary to initialize the Filter::y0
variable. I don't know of any other way to initialize it.
from gz-math.
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
Instead of filterA.set(0.0);
in the FilterTest, can you modify line 248 in Filter.hh to be:
protected: y0{}
from gz-math.
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
- changed state from "new" to "resolved"
Fixed in pull request #23
from gz-math.
Related Issues (20)
- Material_TEST.py fails on debian buster amd64, arm64 HOT 3
- Definition of math::clock HOT 4
- Add AdditivelySeparableScalarField3 class Python interface
- Add PiecewiseScalarField3 class Python interface
- Windows: Python interfaces are not tested
- Add Python Bindings for `VolumetricGridLookupField`
- Add Python Bindings for `TimeVaryingVolumetricGrid` HOT 1
- Helpers_TEST fails on arm64 debbuilds HOT 2
- `gz-math7` not compiling on Windows
- Python bindings + Windows/Conda: dependent libraries of the *.pyd library cannot be found HOT 1
- Error apt-upgrading 6.13.0-1 to 6.13.0-2 HOT 6
- Point GitHub About link to https://gazebosim.org/libs/math HOT 3
- MSVC Compiler warnings in Helpers.hh HOT 2
- Support Windows pybind11 generation
- EXAMPLES_*_TEST require a system installation of gz-math code to work HOT 4
- Add MecanumDriveOdometry Python wrapper HOT 1
- Consider Slerp instead of Squad for rotation interpolation HOT 5
- non-const `Color::operator[]` should return mutable reference HOT 3
- Problems compiling with NVCC HOT 1
- Illegal Instruction on UTM M2 Apple Silicon HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gz-math.