mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-04 00:57:46 +08:00
fixing ci errors
This commit is contained in:
@@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#ifndef IMU_H_
|
#ifndef IMU_H_
|
||||||
#define IMU_H_
|
#define IMU_H_
|
||||||
|
|
||||||
|
#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
|
||||||
#include <opencv2/core/core.hpp>
|
#include <opencv2/core/core.hpp>
|
||||||
#include <rtabmap/utilite/UEvent.h>
|
#include <rtabmap/utilite/UEvent.h>
|
||||||
#include <rtabmap/core/Transform.h>
|
#include <rtabmap/core/Transform.h>
|
||||||
@@ -52,7 +53,7 @@ namespace rtabmap {
|
|||||||
* @see SensorData::imu()
|
* @see SensorData::imu()
|
||||||
* @see IMUEvent
|
* @see IMUEvent
|
||||||
*/
|
*/
|
||||||
class IMU
|
class RTABMAP_CORE_EXPORT IMU
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** @brief Default-constructs an empty sample (null @ref localTransform()). */
|
/** @brief Default-constructs an empty sample (null @ref localTransform()). */
|
||||||
|
|||||||
@@ -299,9 +299,9 @@ TEST(SensorCaptureTest, TakeDataWithFrameRateThrottling)
|
|||||||
SensorData data2 = sensor.takeData();
|
SensorData data2 = sensor.takeData();
|
||||||
double elapsed = timer.ticks();
|
double elapsed = timer.ticks();
|
||||||
|
|
||||||
// With 10 Hz throttling, two captures should take at least ~100ms
|
// With 10 Hz throttling, two captures should wait ~100 ms each (~200 ms total).
|
||||||
EXPECT_GE(elapsed, 0.2); // Should be at least 200 ms for two frames
|
EXPECT_GE(elapsed, 0.19);
|
||||||
EXPECT_LE(elapsed, 0.21); // Slight margin
|
EXPECT_LE(elapsed, 0.5); // allow scheduler jitter on loaded CI runners (e.g. macOS)
|
||||||
EXPECT_TRUE(data1.isValid());
|
EXPECT_TRUE(data1.isValid());
|
||||||
EXPECT_TRUE(data2.isValid());
|
EXPECT_TRUE(data2.isValid());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ TEST(Util3dMotionEstimationTest, EstimateMotion3DTo2DBasic) {
|
|||||||
|
|
||||||
// Same test than above, but with added noise on the points and pixels
|
// Same test than above, but with added noise on the points and pixels
|
||||||
TEST(Util3dMotionEstimationTest, EstimateMotion3DTo2DWithNoise) {
|
TEST(Util3dMotionEstimationTest, EstimateMotion3DTo2DWithNoise) {
|
||||||
|
srand(0); // fixed seed: rand() noise must be reproducible across CI platforms
|
||||||
|
|
||||||
// Two triangles in front of the camera at two different depths, centered with the middle of the image frame
|
// Two triangles in front of the camera at two different depths, centered with the middle of the image frame
|
||||||
std::map<int, cv::Point3f> words3A = {
|
std::map<int, cv::Point3f> words3A = {
|
||||||
@@ -532,6 +533,7 @@ TEST(Util3dMotionEstimationTest, EstimateMotion3DTo3DBasic) {
|
|||||||
|
|
||||||
// Same as above but with noise
|
// Same as above but with noise
|
||||||
TEST(Util3dMotionEstimationTest, EstimateMotion3DTo3DWithNoise) {
|
TEST(Util3dMotionEstimationTest, EstimateMotion3DTo3DWithNoise) {
|
||||||
|
srand(0); // fixed seed: rand() noise must be reproducible across CI platforms
|
||||||
|
|
||||||
// Three triangles in front of the camera at three different depths, centered with the middle of the image frame
|
// Three triangles in front of the camera at three different depths, centered with the middle of the image frame
|
||||||
std::map<int, cv::Point3f> words3A = {
|
std::map<int, cv::Point3f> words3A = {
|
||||||
|
|||||||
Reference in New Issue
Block a user