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 <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

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

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 333 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 71 of file test_state_validity_checker.cpp.

◆ TEST_F() [1/8]

TEST_F ( FanucTest  ,
createStateValidityChecker   
)

Definition at line 306 of file test_state_validity_checker.cpp.

◆ TEST_F() [2/8]

TEST_F ( FanucTest  ,
testJointLimits   
)

Definition at line 311 of file test_state_validity_checker.cpp.

◆ TEST_F() [3/8]

TEST_F ( FanucTest  ,
testPathConstraints   
)

Definition at line 324 of file test_state_validity_checker.cpp.

◆ TEST_F() [4/8]

TEST_F ( FanucTest  ,
testSelfCollision   
)

Definition at line 317 of file test_state_validity_checker.cpp.

◆ TEST_F() [5/8]

TEST_F ( PandaValidity  ,
testConstructor   
)

Definition at line 269 of file test_state_validity_checker.cpp.

◆ TEST_F() [6/8]

TEST_F ( PandaValidity  ,
testJointLimits   
)

Definition at line 274 of file test_state_validity_checker.cpp.

◆ TEST_F() [7/8]

TEST_F ( PandaValidity  ,
testPathConstraints   
)

Definition at line 288 of file test_state_validity_checker.cpp.

◆ TEST_F() [8/8]

TEST_F ( PandaValidity  ,
testSelfCollision   
)

Definition at line 281 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 66 of file test_state_validity_checker.cpp.