moveit2
The MoveIt Motion Planning Framework for ROS 2.
Enumerations | Functions
compare_collision_speed_checking_fcl_bullet.cpp File Reference
#include <moveit/planning_scene_monitor/planning_scene_monitor.h>
#include <moveit/collision_plugin_loader/collision_plugin_loader.h>
#include <moveit/collision_detection_bullet/collision_detector_allocator_bullet.h>
#include <moveit/collision_detection_fcl/collision_detector_allocator_fcl.h>
#include <geometric_shapes/shape_operations.h>
#include <random_numbers/random_numbers.h>
#include <moveit/robot_model/robot_model.h>
#include <moveit/utils/robot_model_test_utils.h>
Include dependency graph for compare_collision_speed_checking_fcl_bullet.cpp:

Go to the source code of this file.

Enumerations

enum class  RobotStateSelector { IN_COLLISION , NOT_IN_COLLISION , RANDOM }
 Defines a random robot state. More...
 
enum class  CollisionDetector { FCL , BULLET }
 Enumerates the available collision detectors. More...
 
enum class  CollisionObjectType { MESH , BOX }
 Enumerates the different types of collision objects. More...
 

Functions

void clutterWorld (const planning_scene::PlanningScenePtr &planning_scene, const size_t num_objects, CollisionObjectType type)
 Clutters the world of the planning scene with random objects in a certain area around the origin. All added objects are not in collision with the robot. More...
 
void runCollisionDetection (unsigned int trials, const planning_scene::PlanningScenePtr &scene, const std::vector< moveit::core::RobotState > &states, const CollisionDetector col_detector, bool only_self, bool distance=false)
 Runs a collision detection benchmark and measures the time. More...
 
void findStates (const RobotStateSelector desired_states, unsigned int num_states, const planning_scene::PlanningScenePtr &scene, std::vector< moveit::core::RobotState > &robot_states)
 Samples valid states of the robot which can be in collision if desired. More...
 
int main (int argc, char **argv)
 

Enumeration Type Documentation

◆ CollisionDetector

enum CollisionDetector
strong

Enumerates the available collision detectors.

Enumerator
FCL 
BULLET 

Definition at line 64 of file compare_collision_speed_checking_fcl_bullet.cpp.

◆ CollisionObjectType

enum CollisionObjectType
strong

Enumerates the different types of collision objects.

Enumerator
MESH 
BOX 

Definition at line 71 of file compare_collision_speed_checking_fcl_bullet.cpp.

◆ RobotStateSelector

enum RobotStateSelector
strong

Defines a random robot state.

Enumerator
IN_COLLISION 
NOT_IN_COLLISION 
RANDOM 

Definition at line 56 of file compare_collision_speed_checking_fcl_bullet.cpp.

Function Documentation

◆ clutterWorld()

void clutterWorld ( const planning_scene::PlanningScenePtr &  planning_scene,
const size_t  num_objects,
CollisionObjectType  type 
)

Clutters the world of the planning scene with random objects in a certain area around the origin. All added objects are not in collision with the robot.

Parameters
planning_sceneThe planning scene
num_objectsThe number of objects to be cluttered
CollisionObjectTypeType of object to clutter (mesh or box)

Definition at line 83 of file compare_collision_speed_checking_fcl_bullet.cpp.

◆ findStates()

void findStates ( const RobotStateSelector  desired_states,
unsigned int  num_states,
const planning_scene::PlanningScenePtr &  scene,
std::vector< moveit::core::RobotState > &  robot_states 
)

Samples valid states of the robot which can be in collision if desired.

Parameters
desired_statesSpecifier for type for desired state
num_statesNumber of desired states
sceneThe planning scene
robot_statesResult vector

Definition at line 250 of file compare_collision_speed_checking_fcl_bullet.cpp.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 292 of file compare_collision_speed_checking_fcl_bullet.cpp.

Here is the call graph for this function:

◆ runCollisionDetection()

void runCollisionDetection ( unsigned int  trials,
const planning_scene::PlanningScenePtr &  scene,
const std::vector< moveit::core::RobotState > &  states,
const CollisionDetector  col_detector,
bool  only_self,
bool  distance = false 
)

Runs a collision detection benchmark and measures the time.

Parameters
trialsThe number of repeated collision checks for each state
sceneThe planning scene
CollisionDetectorThe type of collision detector
only_selfFlag for only self collision check performed

Definition at line 173 of file compare_collision_speed_checking_fcl_bullet.cpp.

Here is the call graph for this function: