Skip to content

Commit

Permalink
Moved reset of speed slider to correct teardown function, so that it …
Browse files Browse the repository at this point in the history
…resets between each test.
  • Loading branch information
URJala committed Jul 2, 2024
1 parent 548f3b7 commit 0b61ee7
Showing 1 changed file with 14 additions and 31 deletions.
45 changes: 14 additions & 31 deletions tests/test_spline_interpolation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,6 @@ class SplineInterpolationTest : public ::testing::Test

static void TearDownTestSuite()
{
// Set target speed scaling to 100% as one test change this value
g_ur_driver_->getRTDEWriter().sendSpeedSlider(1);

g_dashboard_client_->disconnect();
// Remove temporary file again
std::remove(SPLINE_SCRIPT_FILE.c_str());
Expand All @@ -170,6 +167,12 @@ class SplineInterpolationTest : public ::testing::Test
}
}

void TearDown()
{
// Set target speed scaling to 100% as one test change this value
g_ur_driver_->getRTDEWriter().sendSpeedSlider(1);
}

void sendIdle()
{
ASSERT_TRUE(g_ur_driver_->writeKeepalive(RobotReceiveTimeout::sec()));
Expand Down Expand Up @@ -314,34 +317,14 @@ class SplineInterpolationTest : public ::testing::Test
{
std::ofstream outfile(filename);
// Header
outfile << "time, "
<< "actual_positions0, "
<< "actual_positions1, "
<< "actual_positions2, "
<< "actual_positions3, "
<< "actual_positions4, "
<< "actual_positions5, "
<< "actual_velocities0, "
<< "actual_velocities1, "
<< "actual_velocities2, "
<< "actual_velocities3, "
<< "actual_velocities4, "
<< "actual_velocities5, "
<< "actual_acceleration0, "
<< "actual_acceleration1, "
<< "actual_acceleration2, "
<< "actual_acceleration3, "
<< "actual_acceleration4, "
<< "actual_acceleration5, "
<< "error_positions0, "
<< "error_positions1, "
<< "error_positions2, "
<< "error_positions3, "
<< "error_positions4, "
<< "error_positions5, "
<< "speed_scaling, "
<< "spline_time"
<< "\n";
outfile << "time, " << "actual_positions0, " << "actual_positions1, " << "actual_positions2, "
<< "actual_positions3, " << "actual_positions4, " << "actual_positions5, " << "actual_velocities0, "
<< "actual_velocities1, " << "actual_velocities2, " << "actual_velocities3, " << "actual_velocities4, "
<< "actual_velocities5, " << "actual_acceleration0, " << "actual_acceleration1, "
<< "actual_acceleration2, " << "actual_acceleration3, " << "actual_acceleration4, "
<< "actual_acceleration5, " << "error_positions0, " << "error_positions1, " << "error_positions2, "
<< "error_positions3, " << "error_positions4, " << "error_positions5, " << "speed_scaling, "
<< "spline_time" << "\n";

// Data
for (unsigned int i = 0; i < actual_positions.size(); ++i)
Expand Down

0 comments on commit 0b61ee7

Please sign in to comment.