mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-04 00:57:46 +08:00
fixing windows and mac ci errors
This commit is contained in:
@@ -317,9 +317,9 @@ TEST_F(CameraModelTest, FieldOfView)
|
||||
// Horizontal FOV should be larger than vertical for typical cameras
|
||||
EXPECT_GT(fovX, fovY);
|
||||
|
||||
// Degrees should be approximately radians * 180 / PI
|
||||
EXPECT_NEAR(hFOV, fovX * 180.0 / M_PI, 0.1);
|
||||
EXPECT_NEAR(vFOV, fovY * 180.0 / M_PI, 0.1);
|
||||
// Degrees should be approximately radians * 180 / PI (same as CameraModel.cpp)
|
||||
EXPECT_NEAR(hFOV, fovX * 180.0 / CV_PI, 0.1);
|
||||
EXPECT_NEAR(vFOV, fovY * 180.0 / CV_PI, 0.1);
|
||||
}
|
||||
|
||||
// InFrame Tests
|
||||
|
||||
@@ -433,7 +433,7 @@ TEST(SensorCaptureTest, HighFrameRate)
|
||||
TEST(SensorCaptureTest, VeryLowFrameRate)
|
||||
{
|
||||
MockSensorCapture sensor;
|
||||
sensor.setFrameRate(2.0f); // Low frame rate (500 ms seconds per frame)
|
||||
sensor.setFrameRate(2.0f); // 2 Hz = 500 ms per frame
|
||||
sensor.resetTimer();
|
||||
|
||||
UTimer timer;
|
||||
@@ -442,6 +442,6 @@ TEST(SensorCaptureTest, VeryLowFrameRate)
|
||||
|
||||
EXPECT_TRUE(data.isValid());
|
||||
EXPECT_GE(elapsed, 0.5);
|
||||
EXPECT_LT(elapsed, 0.51);
|
||||
EXPECT_LT(elapsed, 0.55); // allow scheduler jitter on loaded CI runners
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user