Imu motion predictor (#1791)

* Imu motion predictor

* simplified parameters

* refactored odom's imu init orientation

* fixing sign issue with x86-64-v3

* fixing M_PI not defined in tests

* Added auto gravity estimation mode

* Fixing crash on windows when uFormat() is to long
This commit is contained in:
matlabbe
2026-10-11 13:59:27 -07:00
committed by GitHub
parent 8d93f807c8
commit dca24fc11f
20 changed files with 1777 additions and 132 deletions
+11
View File
@@ -201,3 +201,14 @@ TEST(UConversionTest, UFormat)
EXPECT_NE(result.find("42"), std::string::npos);
}
TEST(UConversionTest, UFormatLongerThanItsFirstBuffer)
{
// Over the 1024 bytes uFormat first tries: formatted whole, not truncated (MSVC's
// checked vsnprintf_s used to abort the process instead).
const std::string longText(3000, 'a');
std::string result = uFormat("%s %d", longText.c_str(), 42);
EXPECT_EQ(result, longText + " 42");
result = uFormat("%s", std::string(1023, 'b').c_str());
EXPECT_EQ(result, std::string(1023, 'b'));
}