00001 00002 #include <tf/tfMessage.h> 00003 00004 #include "ros_msg_transporter.hpp" 00005 #include "RosLib.hpp" 00006 #include <rtt/types/TransportPlugin.hpp> 00007 #include <rtt/types/TypekitPlugin.hpp> 00008 00009 namespace ros_integration { 00010 using namespace RTT; 00011 struct ROStfPlugin 00012 : public types::TransportPlugin 00013 { 00014 bool registerTransport(std::string name, types::TypeInfo* ti) 00015 { 00016 if(name == "/tf/tfMessage") 00017 return ti->addProtocol(ORO_ROS_PROTOCOL_ID,new RosMsgTransporter<tf::tfMessage>()); 00018 00019 return false; 00020 } 00021 00022 std::string getTransportName() const { 00023 return "ros"; 00024 } 00025 00026 std::string getTypekitName() const { 00027 return std::string("ros-")+"tf"; 00028 } 00029 std::string getName() const { 00030 return std::string("rtt-ros-") + "tf" + "-transport"; 00031 } 00032 00033 }; 00034 } 00035 00036 ORO_TYPEKIT_PLUGIN( ros_integration::ROStfPlugin )