From a5add0f4b8ddca8ebd9dc53483faac74ef75067a Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Tue, 23 Jan 2024 11:05:56 +0100 Subject: [PATCH] Fixed tests --- VectorAlgebra | 2 +- test/BB2B_Test.cc | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/VectorAlgebra b/VectorAlgebra index fd252d4..7ece8ab 160000 --- a/VectorAlgebra +++ b/VectorAlgebra @@ -1 +1 @@ -Subproject commit fd252d4b454548d6dd8eed17c0cae543f9655c18 +Subproject commit 7ece8abd029778505e1d1f23be265886bfa08543 diff --git a/test/BB2B_Test.cc b/test/BB2B_Test.cc index 53c338a..9e2a628 100644 --- a/test/BB2B_Test.cc +++ b/test/BB2B_Test.cc @@ -96,7 +96,7 @@ TEST(BB2B, NoObstacle) { EXPECT_FLOAT_EQ(rightActualSpeed, 1.0F); Polar velocity = - diffDrive->GetVelocity(); // this depends on the wheel diameter. + diffDrive->GetActualVelocity(); // this depends on the wheel diameter. EXPECT_FLOAT_EQ(velocity.distance, 1.0F); EXPECT_FLOAT_EQ(velocity.angle, 0.0F); @@ -205,11 +205,12 @@ TEST(BB2B, ObstacleLeft) { // Roboid velocity Polar velocity = - diffDrive->GetVelocity(); // this depends on the wheel diameter. + diffDrive->GetActualVelocity(); // this depends on the wheel diameter. EXPECT_FLOAT_EQ(velocity.distance, 0.0F); float angularVelocity = - diffDrive->GetAngularVelocity(); // this also depends on wheel separation + diffDrive + ->GetActualYawVelocity(); // this also depends on wheel separation EXPECT_FLOAT_EQ(angularVelocity, 90.0F); #pragma endregion @@ -305,10 +306,10 @@ TEST(BB2B, ObstacleRight) { EXPECT_FLOAT_EQ(rightActualSpeed, 1.0F); // Roboid velocity - Polar velocity = diffDrive->GetVelocity(); + Polar velocity = diffDrive->GetActualVelocity(); EXPECT_FLOAT_EQ(velocity.distance, 0.0F); - float angularVelocity = diffDrive->GetAngularVelocity(); + float angularVelocity = diffDrive->GetActualYawVelocity(); EXPECT_FLOAT_EQ(angularVelocity, -90.0F); #pragma endregion @@ -402,11 +403,11 @@ TEST(BB2B, ObstacleBoth) { EXPECT_FLOAT_EQ(rightActualSpeed, -1.0F); // Roboid velocity - Polar velocity = diffDrive->GetVelocity(); + Polar velocity = diffDrive->GetActualVelocity(); EXPECT_FLOAT_EQ(velocity.distance, 1.0F); EXPECT_FLOAT_EQ(velocity.angle, 180.0F); - float angularVelocity = diffDrive->GetAngularVelocity(); + float angularVelocity = diffDrive->GetActualYawVelocity(); EXPECT_FLOAT_EQ(angularVelocity, 0.0F); #pragma endregion