Audit finding
- ID:
AUD-019
- Status: Verified defect
- Severity: High
- Confidence: High
- Audited revision:
2f479320d805a1f9f35ebe4afaaeeded48913a94
Problem
The default LQR Cart-Pole simulator aborts during construction before entering the Qt event loop. LqrCartPoleSimulator() calls Configure() and RecomputeGain(), which uses the asserting LQR constructor; the default DARE result is not converged.
Source:
|
{ |
|
LqrCartPoleSimulator::LqrCartPoleSimulator() |
|
{ |
|
Configure(LqrCartPoleConfig{}); |
|
} |
|
|
|
void LqrCartPoleSimulator::Configure(const LqrCartPoleConfig& config) |
|
{ |
|
configuration = config; |
|
plant = CartPolePlant(config.plantParams); |
|
RecomputeGain(); |
|
} |
|
|
|
void LqrCartPoleSimulator::Reset() |
|
{ |
|
plant.Reset(); |
|
} |
|
|
|
void LqrCartPoleSimulator::SetState(const CartPoleState& state) |
|
{ |
|
plant.SetState(state); |
|
} |
|
|
|
void LqrCartPoleSimulator::RecomputeGain() |
|
{ |
|
auto& w = configuration.weights; |
|
|
|
StateMatrix Q{ |
|
{ w.qX, 0.0f, 0.0f, 0.0f }, |
|
{ 0.0f, w.qXDot, 0.0f, 0.0f }, |
|
{ 0.0f, 0.0f, w.qTheta, 0.0f }, |
|
{ 0.0f, 0.0f, 0.0f, w.qThetaDot }, |
|
}; |
|
|
Reproduction
An offscreen startup smoke test exits 134 with the Lqr.hpp assertion r.converged. The other ten simulator executables remained alive until timeout.
Acceptance criteria
Audit finding
AUD-0192f479320d805a1f9f35ebe4afaaeeded48913a94Problem
The default LQR Cart-Pole simulator aborts during construction before entering the Qt event loop.
LqrCartPoleSimulator()callsConfigure()andRecomputeGain(), which uses the asserting LQR constructor; the default DARE result is not converged.Source:
numerical-toolbox-cpp/simulator/controllers/LqrCartPole/application/LqrCartPoleSimulator.cpp
Lines 5 to 38 in 2f47932
Reproduction
An offscreen startup smoke test exits 134 with the
Lqr.hppassertionr.converged. The other ten simulator executables remained alive until timeout.Acceptance criteria