Fixed tests

This commit is contained in:
Pascal Serrarens 2024-01-23 11:05:56 +01:00
parent 31bd49dde9
commit a5add0f4b8
2 changed files with 9 additions and 8 deletions

@ -1 +1 @@
Subproject commit fd252d4b454548d6dd8eed17c0cae543f9655c18
Subproject commit 7ece8abd029778505e1d1f23be265886bfa08543

View File

@ -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