Dear Cedric, where are the packages message_transport sharedmem_transport coming from? Are those yours? cheers, D. On Mon, May 10, 2010 at 11:09 PM, Cedric Pradalier wrote: > Hi all, > > I'm not quite sure who will be interested by this message, but since we > don't have (yet) our official ros repository, I'll send the info here. > Please feel free to contact me or discuss on the list if you want more > information. > > Given the long travel time coming back from ICRA, and my experience with > the image_transport plugin architecture, I found that being only able to > make transport_plugin and shared memory only for sensor_msgs::Image was > a bit limiting. > > So I've adapted the image_transport framework using templates to make it > generic, and integrated a generic shared memory transport into the > framework. I've also ported the compressed and theora transport, but > still keeping them specialised to Image. > > The resulting framework allow to create a starting set of plugins (raw > and sharedmem) for (e.g) PointCloud using the following code: > > manifest.cpp: > #include > #include > #include > #include > #include > #include > > // Raw class > PLUGINLIB_REGISTER_CLASS(raw_pub, >    message_transport::RawPublisher, >    message_transport::PublisherPlugin) > PLUGINLIB_REGISTER_CLASS(raw_sub, >    message_transport::RawSubscriber, >    message_transport::SubscriberPlugin) > > // Sharedmem class (the PointCloud message contains a header, which the > publisher uses) > PLUGINLIB_REGISTER_CLASS(sharedmem_pub, > > sharedmem_transport::SharedmemPublisherWithHeader, > >    message_transport::PublisherPlugin) > PLUGINLIB_REGISTER_CLASS(sharedmem_sub, >    sharedmem_transport::SharedmemSubscriber, >    message_transport::SubscriberPlugin) > > Note that a specialised list_transport must be compiled for each message > classes where plugins are developed: > list_transport.cpp: > #include > #include > > using namespace message_transport; > > int main(int argc, char** argv) > { >    LIST_TRANSPORT("pointcloud_transport",sensor_msgs::PointCloud); > >    return 0; > } > > As an instance, the plugin declaration for the compressed images starts > with: > > class CompressedPublisher : public >    message_transport::SimplePublisherPlugin        sensor_msgs::CompressedImage> > { ... > > protected: >  virtual void publish(const sensor_msgs::Image& message, >          const message_transport::SimplePublisherPlugin                sensor_msgs::CompressedImage>::PublishFn& publish_fn) > const ; > }; > > > For the moment, my message_transport stack contains -- i.e. written and > tested -- (indentation means dependency): > message_transport_common > ->sharedmem_transport >  ->pointcloud_transport >  ->imagem_transport >    ->compressed_imagem_transport >    ->theora_imagem_transport > > Other plugins are obviously possible and easy to write, to extend the > library for image and pointcloud or for other types of message. > > HTH > > -- > Dr. Cedric Pradalier > http://www.asl.ethz.ch/people/cedricp > > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users > -- MSc. Dejan Pangercic PhD Student/Researcher Intelligent Autonomous Systems Group Technische Universität München Telephone: +49 (89) 289-26908 E-Mail: dejan.pangercic@cs.tum.edu WWW: http://ias.cs.tum.edu/people/pangercic