Sample Controller#

Creating a new controller is done by first inheriting from Controller, which can be seen below for the declaration. In the controller declaration below we extend the base controller be the ability to pick and drop an object.

class SampleController : public Controller {

protected:
    ros::NodeHandle nodeHandle;
    std::vector<std::unique_ptr<Connection>> connections;
public:

    SampleController(const ros::NodeHandle &nodeHandle, const std::string &cellName);

    // application "skills"
    virtual bool pickAndDrop(Object &robot, Object &object, Object &bin);
};

The implementation of the pickAndDrop method could later use our provided panda_grasping module which offers methods to pick, place and drop objects with rectangular shapes. More controller implementations are located in our GitLab.