moveit2
The MoveIt Motion Planning Framework for ROS 2.
Classes | Functions | Variables
test_state_validity_checker.cpp File Reference
#include "load_test_robot.h"
#include <limits>
#include <ostream>
#include <gtest/gtest.h>
#include <moveit/ompl_interface/detail/state_validity_checker.h>
#include <moveit/ompl_interface/model_based_planning_context.h>
#include <moveit/ompl_interface/parameterization/joint_space/joint_model_state_space.h>
#include <moveit/planning_scene/planning_scene.h>
#include <moveit/utils/logger.hpp>
#include <ompl/geometric/SimpleSetup.h>
Include dependency graph for test_state_validity_checker.cpp:

Go to the source code of this file.

Classes

class  TestStateValidityChecker
 Generic implementation of the tests that can be executed on different robots. More...
 
class  PandaValidity
 
class  FanucTest
 

Functions

rclcpp::Logger getLogger ()
 
std::ostream & operator<< (std::ostream &os, const std::vector< double > &v)
 Pretty print std:vectors. More...
 
 TEST_F (PandaValidity, testConstructor)
 
 TEST_F (PandaValidity, testJointLimits)
 
 TEST_F (PandaValidity, testSelfCollision)
 
 TEST_F (PandaValidity, testPathConstraints)
 
 TEST_F (FanucTest, createStateValidityChecker)
 
 TEST_F (FanucTest, testJointLimits)
 
 TEST_F (FanucTest, testSelfCollision)
 
 TEST_F (FanucTest, testPathConstraints)
 
int main (int argc, char **argv)
 

Variables

constexpr bool VERBOSE = false
 This flag sets the verbosity level for the state validity checker. More...
 

Function Documentation

◆ getLogger()

rclcpp::Logger getLogger ( )

Definition at line 69 of file test_state_validity_checker.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 337 of file test_state_validity_checker.cpp.

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
const std::vector< double > &  v 
)

Pretty print std:vectors.

Definition at line 75 of file test_state_validity_checker.cpp.

◆ TEST_F() [1/8]

TEST_F ( FanucTest  ,
createStateValidityChecker   
)

Definition at line 310 of file test_state_validity_checker.cpp.

◆ TEST_F() [2/8]

TEST_F ( FanucTest  ,
testJointLimits   
)

Definition at line 315 of file test_state_validity_checker.cpp.

◆ TEST_F() [3/8]

TEST_F ( FanucTest  ,
testPathConstraints   
)

Definition at line 328 of file test_state_validity_checker.cpp.

◆ TEST_F() [4/8]

TEST_F ( FanucTest  ,
testSelfCollision   
)

Definition at line 321 of file test_state_validity_checker.cpp.

◆ TEST_F() [5/8]

TEST_F ( PandaValidity  ,
testConstructor   
)

Definition at line 273 of file test_state_validity_checker.cpp.

◆ TEST_F() [6/8]

TEST_F ( PandaValidity  ,
testJointLimits   
)

Definition at line 278 of file test_state_validity_checker.cpp.

◆ TEST_F() [7/8]

TEST_F ( PandaValidity  ,
testPathConstraints   
)

Definition at line 292 of file test_state_validity_checker.cpp.

◆ TEST_F() [8/8]

TEST_F ( PandaValidity  ,
testSelfCollision   
)

Definition at line 285 of file test_state_validity_checker.cpp.

Variable Documentation

◆ VERBOSE

constexpr bool VERBOSE = false
constexpr

This flag sets the verbosity level for the state validity checker.

This test checks the basics of a StateValidityChecker:

  • Can we create one?
  • States inside and outside joint limits.
  • States that are in self-collision.
  • Position constraints on the robot's end-effector link.

It does not yet test:

  • Collision with objects in the environment.
  • Orientation constraints, visibility constraints, ...
  • A user-specified feasibility function in the planning scene.

The test do show what is minimally required to create a working StateValidityChecker.

Definition at line 67 of file test_state_validity_checker.cpp.