Classes | Functions | Variables
test_spline_interpolation.cpp File Reference
#include <gtest/gtest.h>
#include <ur_client_library/control/trajectory_point_interface.h>
#include <ur_client_library/example_robot_wrapper.h>
#include <ur_client_library/ur/ur_driver.h>
#include <ur_client_library/types.h>
#include <chrono>
#include <iostream>
#include <memory>
#include <math.h>
#include <fstream>
#include <ostream>
#include <thread>
#include "test_utils.h"
Include dependency graph for test_spline_interpolation.cpp:

Go to the source code of this file.

Classes

class  SplineInterpolationTest
 

Functions

void handleTrajectoryState (control::TrajectoryResult state)
 
int main (int argc, char *argv[])
 
bool nearlyEqual (double a, double b, double eps=1e-15)
 
int sign (double val)
 
 TEST_F (SplineInterpolationTest, cubic_spline_with_end_point_velocity)
 
 TEST_F (SplineInterpolationTest, physically_unfeasible_trajectory_cubic_spline)
 
 TEST_F (SplineInterpolationTest, physically_unfeasible_trajectory_quintic_spline)
 
 TEST_F (SplineInterpolationTest, quintic_spline_with_end_point_velocity_with_speedscaling)
 
 TEST_F (SplineInterpolationTest, spline_interpolation_cubic)
 
 TEST_F (SplineInterpolationTest, spline_interpolation_quintic)
 
 TEST_F (SplineInterpolationTest, switching_control_mode_with_trajectory_produces_result)
 
 TEST_F (SplineInterpolationTest, switching_control_mode_without_trajectory_produces_no_result)
 
 TEST_F (SplineInterpolationTest, zero_time_trajectory_cubic_spline)
 
 TEST_F (SplineInterpolationTest, zero_time_trajectory_quintic_spline)
 
bool waitForTrajectoryResult (std::chrono::milliseconds timeout)
 

Variables

const std::string CALIBRATION_CHECKSUM = "calib_12788084448423163542"
 
bool g_HEADLESS = true
 
std::unique_ptr< ExampleRobotWrapperg_my_robot
 
std::string g_ROBOT_IP = "192.168.56.101"
 
control::TrajectoryResult g_trajectory_result
 
std::condition_variable g_trajectory_result_cv
 
std::mutex g_trajectory_result_mutex
 
bool g_trajectory_running
 
const std::string INPUT_RECIPE = "resources/rtde_input_recipe.txt"
 
const std::string OUTPUT_RECIPE = "resources/rtde_output_recipe_spline.txt"
 
const std::string SCRIPT_FILE = "../resources/external_control.urscript"
 
const std::string SPLINE_SCRIPT_FILE = "spline_external_control.urscript"
 

Function Documentation

◆ handleTrajectoryState()

void handleTrajectoryState ( control::TrajectoryResult  state)

Definition at line 63 of file test_spline_interpolation.cpp.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 1155 of file test_spline_interpolation.cpp.

◆ nearlyEqual()

bool nearlyEqual ( double  a,
double  b,
double  eps = 1e-15 
)

Definition at line 77 of file test_spline_interpolation.cpp.

◆ sign()

int sign ( double  val)

Definition at line 72 of file test_spline_interpolation.cpp.

◆ TEST_F() [1/10]

TEST_F ( SplineInterpolationTest  ,
cubic_spline_with_end_point_velocity   
)

Definition at line 354 of file test_spline_interpolation.cpp.

◆ TEST_F() [2/10]

TEST_F ( SplineInterpolationTest  ,
physically_unfeasible_trajectory_cubic_spline   
)

Definition at line 1012 of file test_spline_interpolation.cpp.

◆ TEST_F() [3/10]

TEST_F ( SplineInterpolationTest  ,
physically_unfeasible_trajectory_quintic_spline   
)

Definition at line 1060 of file test_spline_interpolation.cpp.

◆ TEST_F() [4/10]

TEST_F ( SplineInterpolationTest  ,
quintic_spline_with_end_point_velocity_with_speedscaling   
)

Definition at line 467 of file test_spline_interpolation.cpp.

◆ TEST_F() [5/10]

TEST_F ( SplineInterpolationTest  ,
spline_interpolation_cubic   
)

Definition at line 630 of file test_spline_interpolation.cpp.

◆ TEST_F() [6/10]

TEST_F ( SplineInterpolationTest  ,
spline_interpolation_quintic   
)

Definition at line 735 of file test_spline_interpolation.cpp.

◆ TEST_F() [7/10]

TEST_F ( SplineInterpolationTest  ,
switching_control_mode_with_trajectory_produces_result   
)

Definition at line 1121 of file test_spline_interpolation.cpp.

◆ TEST_F() [8/10]

TEST_F ( SplineInterpolationTest  ,
switching_control_mode_without_trajectory_produces_no_result   
)

Definition at line 1109 of file test_spline_interpolation.cpp.

◆ TEST_F() [9/10]

TEST_F ( SplineInterpolationTest  ,
zero_time_trajectory_cubic_spline   
)

Definition at line 847 of file test_spline_interpolation.cpp.

◆ TEST_F() [10/10]

TEST_F ( SplineInterpolationTest  ,
zero_time_trajectory_quintic_spline   
)

Definition at line 931 of file test_spline_interpolation.cpp.

◆ waitForTrajectoryResult()

bool waitForTrajectoryResult ( std::chrono::milliseconds  timeout)

Definition at line 83 of file test_spline_interpolation.cpp.

Variable Documentation

◆ CALIBRATION_CHECKSUM

const std::string CALIBRATION_CHECKSUM = "calib_12788084448423163542"

Definition at line 53 of file test_spline_interpolation.cpp.

◆ g_HEADLESS

bool g_HEADLESS = true

Definition at line 55 of file test_spline_interpolation.cpp.

◆ g_my_robot

std::unique_ptr<ExampleRobotWrapper> g_my_robot

Definition at line 57 of file test_spline_interpolation.cpp.

◆ g_ROBOT_IP

std::string g_ROBOT_IP = "192.168.56.101"

Definition at line 54 of file test_spline_interpolation.cpp.

◆ g_trajectory_result

control::TrajectoryResult g_trajectory_result

Definition at line 62 of file test_spline_interpolation.cpp.

◆ g_trajectory_result_cv

std::condition_variable g_trajectory_result_cv

Definition at line 60 of file test_spline_interpolation.cpp.

◆ g_trajectory_result_mutex

std::mutex g_trajectory_result_mutex

Definition at line 61 of file test_spline_interpolation.cpp.

◆ g_trajectory_running

bool g_trajectory_running

Definition at line 59 of file test_spline_interpolation.cpp.

◆ INPUT_RECIPE

const std::string INPUT_RECIPE = "resources/rtde_input_recipe.txt"

Definition at line 52 of file test_spline_interpolation.cpp.

◆ OUTPUT_RECIPE

const std::string OUTPUT_RECIPE = "resources/rtde_output_recipe_spline.txt"

Definition at line 51 of file test_spline_interpolation.cpp.

◆ SCRIPT_FILE

const std::string SCRIPT_FILE = "../resources/external_control.urscript"

Definition at line 49 of file test_spline_interpolation.cpp.

◆ SPLINE_SCRIPT_FILE

const std::string SPLINE_SCRIPT_FILE = "spline_external_control.urscript"

Definition at line 50 of file test_spline_interpolation.cpp.



ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Mon May 26 2025 02:35:58