moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
collision_detection::CollisionPlugin Class Referenceabstract

Plugin API for loading a custom collision detection robot/world. More...

#include <collision_plugin.h>

Inheritance diagram for collision_detection::CollisionPlugin:
Inheritance graph
[legend]

Public Member Functions

 CollisionPlugin ()
 
virtual ~CollisionPlugin ()
 
virtual bool initialize (const planning_scene::PlanningScenePtr &scene) const =0
 This should be used to load your collision plugin.
 

Detailed Description

Plugin API for loading a custom collision detection robot/world.

Typical Usage:

  namespace my_collision_checker
  {

  class MyCollisionDetectorAllocator :
    public collision_detection::CollisionDetectorAllocatorTemplate<MyCollisionEnv, MyCollisionDetectorAllocator>
  {
    public:
      const std::string& getName() const override {
        static const std::string NAME = "my_checker";
        return NAME;
      }
      static const std::string NAME_;
  };

  }

  namespace collision_detection
  {

  class MyCollisionDetectionLoader : public CollisionPlugin
  {
  public:
    virtual bool initialize(const planning_scene::PlanningScenePtr& scene) const
    {
      scene->allocateCollisionDetector(my_collision_checker::MyCollisionDetectorAllocator::create());
      return true;
    }
  };

Definition at line 80 of file collision_plugin.h.

Constructor & Destructor Documentation

◆ CollisionPlugin()

collision_detection::CollisionPlugin::CollisionPlugin ( )
inline

Definition at line 83 of file collision_plugin.h.

◆ ~CollisionPlugin()

virtual collision_detection::CollisionPlugin::~CollisionPlugin ( )
inlinevirtual

Definition at line 86 of file collision_plugin.h.

Member Function Documentation

◆ initialize()

virtual bool collision_detection::CollisionPlugin::initialize ( const planning_scene::PlanningScenePtr &  scene) const
pure virtual

This should be used to load your collision plugin.

Implemented in collision_detection::CollisionDetectorBtPluginLoader, and collision_detection::CollisionDetectorFCLPluginLoader.


The documentation for this class was generated from the following file: