Skip to content

Commit

Permalink
Clean benchmark_target.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
mosfet80 authored Jan 14, 2025
1 parent beb713a commit 57f42dd
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions test/benchmark_target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include <ruckig/ruckig.hpp>


using namespace ruckig;


Expand Down Expand Up @@ -51,18 +50,8 @@ void benchmark(size_t n, double number_trajectories, bool verbose = true) {
Randomizer<DOFs, decltype(limit_dist)> l { limit_dist, 44 };

InputParameter<DOFs> input;
// input.synchronization = Synchronization::None;
// input.control_interface = ControlInterface::Velocity;
std::vector<double> average, worst, global;

// Initial warm-up calculation
// p.fill(input.current_position);
// p.fill(input.target_position);
// l.fill(input.max_velocity, input.target_velocity);
// l.fill(input.max_acceleration, input.target_acceleration);
// l.fill(input.max_jerk);
// check_calculation(otg, input);

for (size_t j = 0; j < n; ++j) {
double average_ = 0.0;
double worst_ = 0.0;
Expand All @@ -84,11 +73,6 @@ void benchmark(size_t n, double number_trajectories, bool verbose = true) {
l.fill(input.max_acceleration, input.target_acceleration);
l.fill(input.max_jerk);

// input.current_velocity[0] = 0.5;
// input.target_velocity[0] = 0.5;
// input.target_position[0] = input.current_position[0] + 1.0;
// input.max_jerk[0] = 0.0;

if constexpr (std::is_same<OTGType, RuckigThrow<DOFs>>::value) {
if (!otg.template validate_input<false>(input)) {
continue;
Expand Down Expand Up @@ -120,8 +104,6 @@ void benchmark(size_t n, double number_trajectories, bool verbose = true) {
std::cout << "Worst Calculation Duration " << worst_mean << " pm " << worst_std << " [µs]" << std::endl;
std::cout << "End-to-end Calculation Duration " << global_mean << " pm " << global_std << " [µs]" << std::endl;
}

// std::cout << otg.degrees_of_freedom << "\t" << average_mean << "\t" << average_std << "\t" << worst_mean << "\t" << worst_std << std::endl;
}


Expand Down

0 comments on commit 57f42dd

Please sign in to comment.