openrave-yarp-plugins
OpenraveYarpPlanner.hpp
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2 
3 #ifndef __OPENRAVE_YARP_PLANNER_HPP__
4 #define __OPENRAVE_YARP_PLANNER_HPP__
5 
6 #include <yarp/os/Network.h>
7 #include <yarp/os/RpcServer.h>
8 
9 #include <yarp/dev/PolyDriver.h>
10 
11 #include <openrave/openrave.h>
12 #include <openrave/plugin.h>
13 
14 #include "OypPortReader.hpp"
15 
16 namespace roboticslab
17 {
18 
29 class OpenraveYarpPlanner : public OpenRAVE::ModuleBase
30 {
31 public:
32  OpenraveYarpPlanner(OpenRAVE::EnvironmentBasePtr penv);
33  ~OpenraveYarpPlanner() override;
34  void Destroy() override;
35  int main(const std::string & cmd) override;
36 
37  bool Open(std::ostream & sout, std::istream & sinput);
38 
39 private:
40  yarp::os::Network yarp;
41  OypPortReader oypPortReader;
42  yarp::os::RpcServer oypRpcServer;
43 };
44 
49 class OpenraveYarpPlannerPlugin : public RavePlugin
50 {
51 public:
52  OpenRAVE::InterfaceBasePtr CreateInterface(OpenRAVE::InterfaceType type,
53  const std::string & interfacename,
54  std::istream & sinput,
55  OpenRAVE::EnvironmentBasePtr penv) override;
56 
57  const InterfaceMap & GetInterfaces() const override;
58  const std::string & GetPluginName() const override;
59 };
60 
61 } // namespace roboticslab
62 
63 #endif // __OPENRAVE_YARP_PLANNER_HPP__
OpenraveYarpPlanner plugin.
Definition: OpenraveYarpPlanner.hpp:50
Loads one or several YARP Plugin, passing environment pointer.
Definition: OpenraveYarpPlanner.hpp:30
Processes RPC requests for OpenraveYarpPlanner.
Definition: OypPortReader.hpp:18
The main, catch-all namespace for Robotics Lab UC3M.
Definition: groups.dox:5