moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
unittest_trajectory_generator_ptp.cpp File Reference
#include <memory>
#include <gtest/gtest.h>
#include <pilz_industrial_motion_planner/joint_limits_aggregator.hpp>
#include <pilz_industrial_motion_planner/trajectory_generator_ptp.hpp>
#include "test_utils.hpp"
#include <moveit/kinematic_constraints/utils.hpp>
#include <moveit/robot_model/robot_model.hpp>
#include <moveit/robot_model_loader/robot_model_loader.hpp>
#include <pluginlib/class_loader.hpp>
#include <rclcpp/rclcpp.hpp>
Include dependency graph for unittest_trajectory_generator_ptp.cpp:

Go to the source code of this file.

Classes

class  TrajectoryGeneratorPTPTest

Functions

const std::string JOINT_POSITION_TOLERANCE ("joint_position_tolerance")
const std::string JOINT_VELOCITY_TOLERANCE ("joint_velocity_tolerance")
const std::string JOINT_ACCELERATION_TOLERANCE ("joint_acceleration_tolerance")
const std::string POSE_TRANSFORM_MATRIX_NORM_TOLERANCE ("pose_norm_tolerance")
 TEST_F (TrajectoryGeneratorPTPTest, TestExceptionErrorCodeMapping)
 Checks that each derived MoveItErrorCodeException contains the correct error code.
 TEST_F (TrajectoryGeneratorPTPTest, noLimits)
 Construct a TrajectoryGeneratorPTP with no limits given.
 TEST_F (TrajectoryGeneratorPTPTest, emptyRequest)
 Send an empty request, define res.trajectory.
 TEST_F (TrajectoryGeneratorPTPTest, missingVelocityLimits)
 Construct a TrajectoryGeneratorPTP with missing velocity limits.
 TEST_F (TrajectoryGeneratorPTPTest, missingDecelerationimits)
 Construct a TrajectoryGeneratorPTP missing deceleration limits.
 TEST_F (TrajectoryGeneratorPTPTest, testInsufficientLimit)
 test the constructor when insufficient limits are given
 TEST_F (TrajectoryGeneratorPTPTest, testCartesianGoal)
 test the ptp trajectory generator of Cartesian space goal
 TEST_F (TrajectoryGeneratorPTPTest, testCartesianGoalMissingLinkNameConstraints)
 Check that missing a link_name in position or orientation constraints is detected.
 TEST_F (TrajectoryGeneratorPTPTest, testInvalidCartesianGoal)
 test the ptp trajectory generator of invalid Cartesian space goal
 TEST_F (TrajectoryGeneratorPTPTest, testJointGoalAlreadyReached)
 test the ptp trajectory generator of joint space goal which is close enough to the start which does not need to plan the trajectory
 TEST_F (TrajectoryGeneratorPTPTest, testScalingFactor)
 test scaling factor with zero start velocity
 TEST_F (TrajectoryGeneratorPTPTest, testJointGoalAndAlmostZeroStartVelocity)
 test the ptp trajectory generator of joint space goal with (almost) zero start velocity
 TEST_F (TrajectoryGeneratorPTPTest, testJointGoalNoStartVel)
 test the ptp_ trajectory generator of joint space goal with zero start velocity
int main (int argc, char **argv)

Function Documentation

◆ JOINT_ACCELERATION_TOLERANCE()

const std::string JOINT_ACCELERATION_TOLERANCE ( "joint_acceleration_tolerance" )

◆ JOINT_POSITION_TOLERANCE()

const std::string JOINT_POSITION_TOLERANCE ( "joint_position_tolerance" )

◆ JOINT_VELOCITY_TOLERANCE()

const std::string JOINT_VELOCITY_TOLERANCE ( "joint_velocity_tolerance" )

◆ main()

int main ( int argc,
char ** argv )

Definition at line 979 of file unittest_trajectory_generator_ptp.cpp.

◆ POSE_TRANSFORM_MATRIX_NORM_TOLERANCE()

const std::string POSE_TRANSFORM_MATRIX_NORM_TOLERANCE ( "pose_norm_tolerance" )

◆ TEST_F() [1/13]

TEST_F ( TrajectoryGeneratorPTPTest ,
emptyRequest  )

Send an empty request, define res.trajectory.

  • Test Sequence:
    1. Create request, define a trajectory in the result
    2. assign at least one joint limit will all required limits
  • Expected Results:
    1. the res.trajectory should be cleared (contain no waypoints)

Definition at line 195 of file unittest_trajectory_generator_ptp.cpp.

◆ TEST_F() [2/13]

TEST_F ( TrajectoryGeneratorPTPTest ,
missingDecelerationimits  )

Construct a TrajectoryGeneratorPTP missing deceleration limits.

Definition at line 242 of file unittest_trajectory_generator_ptp.cpp.

Here is the call graph for this function:

◆ TEST_F() [3/13]

TEST_F ( TrajectoryGeneratorPTPTest ,
missingVelocityLimits  )

Construct a TrajectoryGeneratorPTP with missing velocity limits.

Definition at line 217 of file unittest_trajectory_generator_ptp.cpp.

Here is the call graph for this function:

◆ TEST_F() [4/13]

Construct a TrajectoryGeneratorPTP with no limits given.

Definition at line 178 of file unittest_trajectory_generator_ptp.cpp.

◆ TEST_F() [5/13]

TEST_F ( TrajectoryGeneratorPTPTest ,
testCartesianGoal  )

test the ptp trajectory generator of Cartesian space goal

Definition at line 349 of file unittest_trajectory_generator_ptp.cpp.

Here is the call graph for this function:

◆ TEST_F() [6/13]

TEST_F ( TrajectoryGeneratorPTPTest ,
testCartesianGoalMissingLinkNameConstraints  )

Check that missing a link_name in position or orientation constraints is detected.

Definition at line 398 of file unittest_trajectory_generator_ptp.cpp.

Here is the call graph for this function:

◆ TEST_F() [7/13]

TEST_F ( TrajectoryGeneratorPTPTest ,
TestExceptionErrorCodeMapping  )

Checks that each derived MoveItErrorCodeException contains the correct error code.

Definition at line 162 of file unittest_trajectory_generator_ptp.cpp.

◆ TEST_F() [8/13]

TEST_F ( TrajectoryGeneratorPTPTest ,
testInsufficientLimit  )

test the constructor when insufficient limits are given

  • Test Sequence:
    1. assign joint limits without acc and dec
    2. assign at least one joint limit per group with all required limits
  • Expected Results:
    1. the constructor throws an exception of type TrajectoryGeneratorInvalidLimitsException
    2. the constructor throws no exception

Definition at line 274 of file unittest_trajectory_generator_ptp.cpp.

Here is the call graph for this function:

◆ TEST_F() [9/13]

TEST_F ( TrajectoryGeneratorPTPTest ,
testInvalidCartesianGoal  )

test the ptp trajectory generator of invalid Cartesian space goal

Definition at line 436 of file unittest_trajectory_generator_ptp.cpp.

Here is the call graph for this function:

◆ TEST_F() [10/13]

TEST_F ( TrajectoryGeneratorPTPTest ,
testJointGoalAlreadyReached  )

test the ptp trajectory generator of joint space goal which is close enough to the start which does not need to plan the trajectory

Definition at line 466 of file unittest_trajectory_generator_ptp.cpp.

Here is the call graph for this function:

◆ TEST_F() [11/13]

TEST_F ( TrajectoryGeneratorPTPTest ,
testJointGoalAndAlmostZeroStartVelocity  )

test the ptp trajectory generator of joint space goal with (almost) zero start velocity

Definition at line 658 of file unittest_trajectory_generator_ptp.cpp.

Here is the call graph for this function:

◆ TEST_F() [12/13]

TEST_F ( TrajectoryGeneratorPTPTest ,
testJointGoalNoStartVel  )

test the ptp_ trajectory generator of joint space goal with zero start velocity

Definition at line 795 of file unittest_trajectory_generator_ptp.cpp.

Here is the call graph for this function:

◆ TEST_F() [13/13]

TEST_F ( TrajectoryGeneratorPTPTest ,
testScalingFactor  )

test scaling factor with zero start velocity

Definition at line 494 of file unittest_trajectory_generator_ptp.cpp.

Here is the call graph for this function: