8 #include <rtt_ros_msgs/Eval.h> 9 #include <rtt_ros_msgs/RunScript.h> 10 #include <rtt_ros_msgs/GetPeerList.h> 12 #include <ocl/DeploymentComponent.hpp> 34 rtt_ros_msgs::Eval::Request& request,
35 rtt_ros_msgs::Eval::Response& response);
38 rtt_ros_msgs::RunScript::Request& request,
39 rtt_ros_msgs::RunScript::Response& response);
41 bool get_peer_list_cb(
42 rtt_ros_msgs::GetPeerList::Request& request,
43 rtt_ros_msgs::GetPeerList::Response& response);
62 RTT::log(
RTT::Error) <<
"Attempted to load the rosdeployment service on a TaskContext which is not an OCL::DeploymentComponent. No ROS services will be advertised." <<
RTT::endlog();
67 rtt_ros_msgs::Eval::Request& request,
68 rtt_ros_msgs::Eval::Response& response)
71 response.success =
eval_(request.code);
76 rtt_ros_msgs::RunScript::Request& request,
77 rtt_ros_msgs::RunScript::Response& response)
84 rtt_ros_msgs::GetPeerList::Request& request,
85 rtt_ros_msgs::GetPeerList::Response& response)
99 deployer->
import(
"rtt_rosnode");
102 RTT::log(
RTT::Error) <<
"The rtt_rosdeployment plugin cannot be used without the rtt_rosnode plugin. Please load rtt_rosnode." <<
RTT::endlog();
108 return tc->
provides()->addService( sp );
114 if(tc == 0)
return true;
124 return "rosdeployment";
128 return OROCOS_TARGET_NAME;
ros::ServiceServer run_script_service_
OCL::DeploymentComponent * deployer_
bool eval_cb(rtt_ros_msgs::Eval::Request &request, rtt_ros_msgs::Eval::Response &response)
Service::shared_ptr provides()
ROSCPP_DECL bool isInitialized()
bool loadROSDeploymentService(RTT::TaskContext *tc)
std::string getName(void *handle)
ROSDeploymentService(OCL::DeploymentComponent *deployer)
bool import(const std::string &package)
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
RTT::OperationCaller< bool(std::string const &)> eval_
bool get_peer_list_cb(rtt_ros_msgs::GetPeerList::Request &request, rtt_ros_msgs::GetPeerList::Response &response)
virtual PeerList getPeerList() const
RTT_EXPORT bool loadRTTPlugin(RTT::TaskContext *tc)
RTT_EXPORT RTT::Service::shared_ptr createService()
RTT_EXPORT std::string getRTTPluginName()
RTT_EXPORT std::string getRTTTargetName()
bool runScript(const std::string &file_name)
ros::ServiceServer get_peer_list_service_
bool run_script_cb(rtt_ros_msgs::RunScript::Request &request, rtt_ros_msgs::RunScript::Response &response)
static Logger::LogFunction endlog()
ros::ServiceServer eval_service_
boost::shared_ptr< ServiceType > getProvider(const std::string &name)