[ros-users] (no subject)

Markus --- markus-t314 at gmx.de
Fri Jul 30 22:45:12 UTC 2010


Hi,

I am currently developing a gui (in c++ using Qt) for ros (using the latest svn version from https://code.ros.org/svn/ros/stacks/ros/trunk/) and have some questions:


1. I want to configure filters for subscribers. But these filters should be applied before the messages are sent, so that not every subscriber receives a message. I only found the existing message_filters, but in this case the messages are sent over the network and then are filtered before passing to the subscriber. Ideally the subscribers can also change their filter settings at run time.

For example my application has one node "A" which publishes images and another one "B" subscribing these (both nodes run on the same machine). Now I'd like my gui node "C" (which runs on a remote machine) to receive the images, but to reduce network traffic I'd like the gui to only receive e.g. every 10th image, whereas the local node "B" still needs every message.

I looked into the source code and thought of maybe editing Publication.cpp's function:
	bool Publication::enqueueMessage(const SerializedMessage& m)
where the message is sent to all subscribers.

The problem is the publication-class doesn't have the necessary information to achieve this. So my question, is it somehow possible to achieve the described behaviour without modifying the ros-code too much, or in any other way?


2. I'd like my gui to run existing commandline tools (e.g. rostopic) and also get the result, so that the gui can display it.

For example something like this:
std::list<std::string> topics = run_command("rostopic list");

Can I interface the tools from my c++ code or directly interface with the tool's python code?
If it's possible, can you give me a little example on how to that?


Thanks in advance
Markus
-- 
GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.  
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl



More information about the ros-users mailing list