Comments (6)
Some progress: when the numerical derivative blows up, it's because the calculated angle is near pi or -pi. See screenshot below. Will update unit test to only check derivatives if angle is a little bit away from the boundary.
from bioslam.
It seems like it's multiple jacobians that will randomly fail this, whereas I was trying to target a specific one. From running a few times, the following will fail at threshold 1e-3:
1,4,6
(and note that 7 probably also fails since 6 and 7 are nearly identical but 6 will error first)
What do these have in common? They're the derivatives w.r.t. the two poses and the distal imu vectors v1 and v2 (from the imu to the joints)
from bioslam.
On second thought, I couldn't get unsignedAngle() derive to pass with any tighter tolerance than 1.0e-4. I think that function is the underlying problem here. Changing title of issue, investigate this. See unit test testGenericMath.cpp.
from bioslam.
For unsignedAngle(v1,v2), this does seem to be related to norm(cross(v1,v2)). If this norm is small, the numerical derivatives don't pass. Maybe this is just a classical numerical conditioning issue?
from bioslam.
Bug identified: it's related to the derivative of atan(y,x). When y or x gets really small, this causes atan2's derivative to blow up. See testGenericMath.cpp, function testatan2() for more info.
I'm not gonna close this for now. It leads to the question: what do we do about this? Do we just make sure we are always testing with non-small x and y?
To be clear: This is a problem not with bioslam's analytical derivative for atan2, but rather with numerical approximation of that derivative for unit testing. We test with random values, so it's possible that it would best to just put in some simple if/then logic to only test with non-small values of x and y.
from bioslam.
I didn't find the real reason this test was failing. However, since it was obviously just due to the numerical derivative blowing up I've added a hack fix: just disregard tests where the numerical derivative blew up. Not great form, but fixes the test for now.
from bioslam.
Related Issues (20)
- GTSAM compatibility HOT 1
- Creating custom h5 wrapper
- Setting up CI HOT 1
- Missing OpalIMUData Function in matlab examples HOT 7
- Updating magnetometer factor to GTSAM's new built-in `MagPoseFactor`
- Make Bioslam available on Windows HOT 2
- Building docker image on Windows 11 failed at "/bin/sh -c make install -j4" HOT 4
- Tracking issue: GTSAM 4.2 and boost 1.74
- Tag 1.0.1 before updating to GTSAM 4.2
- Known issue: timing is incorrect in C++
- remove dependency on imuDataUtils
- Fix linking issues in docker container
- Transition away from Boost in favor of modern C++
- Fixing broken MATLAB wrapper HOT 2
- How can I obtain a visualization of the human skeleton?
- Updating CMake for modern Boost compatibility HOT 1
- problem with return type of gtsam::noiseModels HOT 2
- Check and disable building of MATLAB wrapper in CMake
- Use GTSAM random objects
- Save imuPoseEstimator results to .h5 file
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 bioslam.