diff --git a/rtt_roscomm/include/rtt_roscomm/rtt_rosservice_proxy.h b/rtt_roscomm/include/rtt_roscomm/rtt_rosservice_proxy.h index ee4d8fc3..9e76e7b1 100644 --- a/rtt_roscomm/include/rtt_roscomm/rtt_rosservice_proxy.h +++ b/rtt_roscomm/include/rtt_roscomm/rtt_rosservice_proxy.h @@ -10,6 +10,8 @@ #include #include +namespace rtt_roscomm { + //! Abstract ROS Service Proxy class ROSServiceProxyBase { @@ -260,4 +262,6 @@ class ROSServiceProxyFactory : public ROSServiceProxyFactoryBase } }; +} // namespace rtt_roscomm + #endif // ifndef __RTT_ROSCOMM_RTT_ROSSERVICE_PROXY_H diff --git a/rtt_roscomm/include/rtt_roscomm/rtt_rosservice_registry_service.h b/rtt_roscomm/include/rtt_roscomm/rtt_rosservice_registry_service.h index cb9b4d0e..fad53a6a 100644 --- a/rtt_roscomm/include/rtt_roscomm/rtt_rosservice_registry_service.h +++ b/rtt_roscomm/include/rtt_roscomm/rtt_rosservice_registry_service.h @@ -4,6 +4,8 @@ #include #include +namespace rtt_roscomm { + class ROSServiceRegistryService; class ROSServiceProxyFactoryBase; typedef boost::shared_ptr ROSServiceRegistryServicePtr; @@ -42,4 +44,6 @@ class ROSServiceRegistryService : public RTT::Service static ROSServiceRegistryServicePtr s_instance_; }; +} // namespace rtt_roscomm + #endif // __RTT_ROSSERVICE_RTT_ROSSERVICE_REGISTRY_SERVICE_H diff --git a/rtt_roscomm/src/rtt_rosservice_registry_service.cpp b/rtt_roscomm/src/rtt_rosservice_registry_service.cpp index afe48de5..fcbc9faf 100644 --- a/rtt_roscomm/src/rtt_rosservice_registry_service.cpp +++ b/rtt_roscomm/src/rtt_rosservice_registry_service.cpp @@ -6,6 +6,8 @@ #include #include +namespace rtt_roscomm { + ROSServiceRegistryServicePtr ROSServiceRegistryService::s_instance_; ROSServiceRegistryServicePtr ROSServiceRegistryService::Instance() @@ -101,7 +103,10 @@ static void loadROSServiceRegistryService() ROSServiceRegistryService::Instance(); } +} // namespace rtt_roscomm + using namespace RTT; +using namespace rtt_roscomm; extern "C" { bool loadRTTPlugin(RTT::TaskContext* c){ if (c != 0) return false; diff --git a/rtt_roscomm/src/rtt_rosservice_service.cpp b/rtt_roscomm/src/rtt_rosservice_service.cpp index e3efa986..0f07ae4b 100644 --- a/rtt_roscomm/src/rtt_rosservice_service.cpp +++ b/rtt_roscomm/src/rtt_rosservice_service.cpp @@ -9,6 +9,8 @@ using namespace RTT; using namespace std; +namespace rtt_roscomm { + /** * The globally loadable ROS service. */ @@ -215,4 +217,6 @@ class ROSServiceService : public RTT::Service std::map client_proxies_; }; -ORO_SERVICE_NAMED_PLUGIN(ROSServiceService, "rosservice") +} // namespace rtt_roscomm + +ORO_SERVICE_NAMED_PLUGIN(rtt_roscomm::ROSServiceService, "rosservice") diff --git a/rtt_roscomm/src/templates/service/rtt_rosservice_proxies.cpp.in b/rtt_roscomm/src/templates/service/rtt_rosservice_proxies.cpp.in index 2f8a7959..6206c34a 100644 --- a/rtt_roscomm/src/templates/service/rtt_rosservice_proxies.cpp.in +++ b/rtt_roscomm/src/templates/service/rtt_rosservice_proxies.cpp.in @@ -12,6 +12,8 @@ namespace rtt_@ROSPACKAGE@_ros_service_proxies { + using namespace rtt_roscomm; + bool registerROSServiceProxies() { // Get the ros service registry service ROSServiceRegistryServicePtr rosservice_registry = ROSServiceRegistryService::Instance(); diff --git a/typekits/rtt_std_srvs/include/rtt_std_srvs/Empty.h b/typekits/rtt_std_srvs/include/rtt_std_srvs/Empty.h index a985b3f6..2ceadde4 100644 --- a/typekits/rtt_std_srvs/include/rtt_std_srvs/Empty.h +++ b/typekits/rtt_std_srvs/include/rtt_std_srvs/Empty.h @@ -12,6 +12,8 @@ // - void empty() // +namespace rtt_roscomm { + template<> struct ROSServiceServerOperationCallerWrapper { typedef bool Signature(); typedef RTT::OperationCaller ProxyOperationCallerType; @@ -29,4 +31,6 @@ template<> struct ROSServiceServerOperationCallerWrapper { } }; +} // namespace rtt_roscomm + #endif // RTT_STD_SRVS_EMPTY_H diff --git a/typekits/rtt_std_srvs/include/rtt_std_srvs/SetBool.h b/typekits/rtt_std_srvs/include/rtt_std_srvs/SetBool.h index 8e075668..4c76a9a5 100644 --- a/typekits/rtt_std_srvs/include/rtt_std_srvs/SetBool.h +++ b/typekits/rtt_std_srvs/include/rtt_std_srvs/SetBool.h @@ -14,6 +14,8 @@ // - void setBool(bool) // response.success = true and response.message will be empty // +namespace rtt_roscomm { + template<> struct ROSServiceServerOperationCallerWrapper { typedef bool Signature(bool, std::string&); typedef RTT::OperationCaller ProxyOperationCallerType; @@ -52,4 +54,6 @@ template<> struct ROSServiceServerOperationCallerWrapper { } }; +} // namespace rtt_roscomm + #endif // RTT_STD_SRVS_SETBOOL_H diff --git a/typekits/rtt_std_srvs/include/rtt_std_srvs/Trigger.h b/typekits/rtt_std_srvs/include/rtt_std_srvs/Trigger.h index 6e1f4f49..5d140121 100644 --- a/typekits/rtt_std_srvs/include/rtt_std_srvs/Trigger.h +++ b/typekits/rtt_std_srvs/include/rtt_std_srvs/Trigger.h @@ -13,6 +13,8 @@ // - std::string trigger() // response.success = true // +namespace rtt_roscomm { + template<> struct ROSServiceServerOperationCallerWrapper { typedef bool Signature(std::string &message_out); typedef RTT::OperationCaller ProxyOperationCallerType; @@ -41,4 +43,6 @@ template<> struct ROSServiceServerOperationCallerWrapper { } }; +} // namespace rtt_roscomm + #endif // RTT_STD_SRVS_TRIGGER_H