rtt_rospack_service.cpp
Go to the documentation of this file.
00001 
00030 #include <rtt/RTT.hpp>
00031 #include <rtt/plugin/Plugin.hpp>
00032 #include <rtt/plugin/ServicePlugin.hpp>
00033 #include <rtt/internal/GlobalService.hpp>
00034 
00035 #include <ros/package.h>
00036 
00037 using namespace RTT;
00038 using namespace std;
00039 
00040 void loadROSPackService(){
00041   RTT::Service::shared_ptr ros = RTT::internal::GlobalService::Instance()->provides("ros");
00042 
00043   ros->addOperation("find", &ros::package::getPath).doc(
00044       "Returns the fully-qualified path to a package, or an empty string if the package is not found");
00045 }
00046 
00047 using namespace RTT;
00048 extern "C" {
00049   bool loadRTTPlugin(RTT::TaskContext* c){
00050     if (c != 0) return false;
00051     loadROSPackService();
00052     return true;
00053   }
00054   std::string getRTTPluginName (){
00055     return "rospack";
00056   }
00057   std::string getRTTTargetName (){
00058     return OROCOS_TARGET_NAME;
00059   }
00060 }


rtt_rospack
Author(s): Ruben Smits
autogenerated on Mon Apr 3 2017 03:34:36