moveit2
The MoveIt Motion Planning Framework for ROS 2.
Macros | Functions
unittest_velocity_profile_atrap.cpp File Reference
#include <gtest/gtest.h>
#include <pilz_industrial_motion_planner/velocity_profile_atrap.h>
Include dependency graph for unittest_velocity_profile_atrap.cpp:

Go to the source code of this file.

Macros

#define EPSILON   1.0e-10
 

Functions

 TEST (ATrapTest, Test_SetProfile1)
 
 TEST (ATrapTest, Test_SetProfile2)
 
 TEST (ATrapTest, Test_SetProfile3)
 
 TEST (ATrapTest, Test_SetProfile4)
 
 TEST (ATrapTest, Test_SetProfileToLowDuration)
 Test Description. More...
 
 TEST (ATrapTest, Test_setProfileAllDurationsToLowDuration)
 Define Profile with setProfileAllDurations with to low duration. More...
 
 TEST (ATrapTest, Test_SetProfileZeroStartVelocity)
 Define Profile with setProfileStartVelocity with zero velocity. More...
 
 TEST (ATrapTest, Test_SetProfileDuration)
 
 TEST (ATrapTest, Test_setProfileAllDurations1)
 
 TEST (ATrapTest, Test_setProfileAllDurations2)
 
 TEST (ATrapTest, Test_setProfileStartVelocity1)
 
 TEST (ATrapTest, Test_setProfileStartVelocity2)
 
 TEST (ATrapTest, Test_setProfileStartVelocity3)
 
 TEST (ATrapTest, Test_setProfileStartVelocity4)
 
 TEST (ATrapTest, Test_setProfileStartVelocity5)
 
 TEST (ATrapTest, Test_setProfileStartVelocity6)
 
 TEST (ATrapTest, Test_Clone)
 Check that the clone function returns a equal profile. More...
 
int main (int argc, char **argv)
 

Macro Definition Documentation

◆ EPSILON

#define EPSILON   1.0e-10

Definition at line 40 of file unittest_velocity_profile_atrap.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 627 of file unittest_velocity_profile_atrap.cpp.

◆ TEST() [1/17]

TEST ( ATrapTest  ,
Test_Clone   
)

Check that the clone function returns a equal profile.

Note: Definitions other than setProfileAllDurations could fail due to numeric noise

Definition at line 616 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [2/17]

TEST ( ATrapTest  ,
Test_SetProfile1   
)

Definition at line 42 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [3/17]

TEST ( ATrapTest  ,
Test_SetProfile2   
)

Definition at line 89 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [4/17]

TEST ( ATrapTest  ,
Test_SetProfile3   
)

Definition at line 128 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [5/17]

TEST ( ATrapTest  ,
Test_SetProfile4   
)

Definition at line 163 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [6/17]

TEST ( ATrapTest  ,
Test_setProfileAllDurations1   
)

Definition at line 308 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [7/17]

TEST ( ATrapTest  ,
Test_setProfileAllDurations2   
)

Definition at line 355 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [8/17]

TEST ( ATrapTest  ,
Test_setProfileAllDurationsToLowDuration   
)

Define Profile with setProfileAllDurations with to low duration.

Test Sequence:

  1. Define a profile with SetProfile(double, double), this will yield the fastest duration
  2. Try to define a profile with setProfileAllDurations with a faster combination of durations

Expected Results: 1.

  1. Both trajectories should be equal

Definition at line 223 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [9/17]

TEST ( ATrapTest  ,
Test_SetProfileDuration   
)

Definition at line 261 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [10/17]

TEST ( ATrapTest  ,
Test_setProfileStartVelocity1   
)

Definition at line 368 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [11/17]

TEST ( ATrapTest  ,
Test_setProfileStartVelocity2   
)

Definition at line 405 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [12/17]

TEST ( ATrapTest  ,
Test_setProfileStartVelocity3   
)

Definition at line 454 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [13/17]

TEST ( ATrapTest  ,
Test_setProfileStartVelocity4   
)

Definition at line 495 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [14/17]

TEST ( ATrapTest  ,
Test_setProfileStartVelocity5   
)

Definition at line 536 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [15/17]

TEST ( ATrapTest  ,
Test_setProfileStartVelocity6   
)

Definition at line 581 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [16/17]

TEST ( ATrapTest  ,
Test_SetProfileToLowDuration   
)

Test Description.

Test Sequence:

  1. Generate two profiles with same specifica
  2. Set double EPSILON as duration of the first
  3. Set the resulting duration as the duration of the second trajectory

Expected Results:

  1. -
  2. -
  3. Both profiles should be the same (checked with testpoints in the middle of each phase

Definition at line 196 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function:

◆ TEST() [17/17]

TEST ( ATrapTest  ,
Test_SetProfileZeroStartVelocity   
)

Define Profile with setProfileStartVelocity with zero velocity.

Test Sequence:

  1. Define a profile with SetProfile(double, double)
  2. Try to define a profile with setProfileStartVelocity with zero velocity

Expected Results: 1.

  1. Both trajectories should be equal

Definition at line 249 of file unittest_velocity_profile_atrap.cpp.

Here is the call graph for this function: