Possibly uninitialized warnings
There a few warnings left on latest pipeline build: https://bitbucket.org/gtborg/gtsam/addon/pipelines/home#!/results/66
All tests pass so not an urgent thing. Assigning to @andreicostinescu as he proved particularly adept at solving some of these (I still owe you a beer, Andrei!)
Comments (8)
-
reporter -
Thanks, can it perhaps wait 2 more weeks?
-
reporter Of course
-
It seems that on the latest develop version, the first warning does not occur anymore.
I ran
cmake ..
andcmake -DGTSAM_USE_SYSTEM_EIGEN=OFF -DGTSAM_USE_EIGEN_MKL=OFF ..
and the first warning does not appear. It could be that it was solved in the latest Eigen upgrade?The second warning still appears, so I'll work on that.
-
I found out where the “error” lies. If you change line 111 in ImuFactorExample2.cpp from
auto measuredAcc
toVector3 measuredAcc
, the warning disappears. I don’t understand whyauto
-ing the declaration created these warnings... -
How do you want me to fix this issue?
Edit: I think the underlying problem lies somewhere in the file Scenario.h because if you add/subtract anything to the omega_b method in line 112, a similar warning appears for that line.
Edit2: I thought that the problem was in the
ConstantTwistScenario
(because that is the initialized scenario in ImuFactorExample2). Specifically, in its constructor, whentwist_
gets initialized with an emptyVector6()
. However, even after setting thetwist_
to a constant 0-valued vector, the warnings still appeared. I then tried modifying theomega_b
method in theConstantTwistScenario
to return a constantVector3(1, 1, 1)
. Still the same error appeared when I subtracted 0 fromscenario.omega_b(t)
before assigning it toauto measuredOmega
. My conclusion from this is that the gtsam code (implementation) is correct, containing itself no warnings. However, there is a problem with Eigen when dealing withauto
.Is it ok if I declare
measuredAcc
andmeasuredOmega
asVector3
instead ofauto
? -
reporter Just change it to Vector3 and do a PR? But pull develop first, as I merged a recent change that did something similar.
-
reporter - changed status to resolved
In PR #356
- Log in to comment
Pinging Andrei