Graphical programming with Ptolemy

Since there’s been a lot of talk about GUIs and graphical programming,
I’ll describe some of the work I’ve been doing. I’m using a graphical
modeling tool called Ptolemy to allow design of gnuradio systems.

Here is the basic approach:

  1. Automatically scan gnuradio source tree and build XML
    representations of blocks, including things like constructor parameter
    lists. These are in Ptolemy’s MoML format so Ptolemy can import them.
    I have written a python program to generate these files.

  2. Use Ptolemy to draw block diagrams and connections. Ptolemy allows
    block parameters to be configured by inspecting the XML I just
    described.

  3. Then have Ptolemy convert the block diagram into a gnuradio python
    program. Ptolemy is written in Java, so I have written Java classes
    to do this.

  4. Ptolemy launches this program and communicates with it using pipes.
    This allows you to create other pieces of Ptolemy simulations that
    source or sink data to GR.

Here’s a screenshot to give you an idea:
http://www.ee.ucla.edu/~tjdreier/gnuradio_ptolemy.jpg

It shows a top-level model where GNU Radio components look like black
boxes to a Ptolemy simulation. Then it shows the GNU Radio flowgraph
that is inisde. And finally, it shows an example of configuring a
block parameter, such as the modulator sensitivity.

Information on Ptolemy can be found here:
http://ptolemy.eecs.berkeley.edu/ptolemyII/index.htm

Questions or comments are always welcome.

Tad Dreier

TJ Dreier wrote:

I’m using a graphical
modeling tool called Ptolemy to allow design of gnuradio systems.

  1. Use Ptolemy to draw block diagrams and connections. Ptolemy allows
    block parameters to be configured by inspecting the XML I just
    described.
  1. Then have Ptolemy convert the block diagram into a gnuradio python
    program. Ptolemy is written in Java, so I have written Java classes
    to do this.

This are the parts I want to see in Python for several reasons:

  • Gnuradio uses already Python. This is a known technology to the
    developers. And you can get rid of XML, another unknown technology.
    (Gnuradio depends on C++, USB, Swig, Python and wxWidgets, moreover the

3 audio interfaces. That’s a enough to support as can be seen on this
list.)

  • Gnuradio can work quite fine with wxWidgets. It’s quite portable in
    this configuration.
  • I doubt that you use less system resources with both Python and
    Java/Ptolemy running.
  1. Ptolemy launches this program and communicates with it using pipes.
    This allows you to create other pieces of Ptolemy simulations that
    source or sink data to GR.

Of course Ptolemy has a lot more functionality.

Here’s a screenshot to give you an idea:
http://www.ee.ucla.edu/~tjdreier/gnuradio_ptolemy.jpg

Looks quite like the thing I had in mind.
Perhaps I should give it a try…

ad point 3): Do you have any means for parsing working apps?

Patrick

Engineers motto: cheap, good, fast: choose any two
Patrick S.
Student of Telematik, Techn. University Graz, Austria

On Fri, May 05, 2006 at 12:12:38PM +0200, Patrick S. wrote:

to do this.
Java/Ptolemy running.
This is probably not an issue for most people.

  1. Ptolemy launches this program and communicates with it using pipes.
    This allows you to create other pieces of Ptolemy simulations that
    source or sink data to GR.

Of course Ptolemy has a lot more functionality.

It’s also got all the infrastructure for the GUI stuff, not to mention
many many years of development.

Here’s a screenshot to give you an idea:
http://www.ee.ucla.edu/~tjdreier/gnuradio_ptolemy.jpg

Tad,

Can you provide a link to your work in progress? CVS / svn?

Eric

On Thu, May 11, 2006 at 09:22:46AM -0700, John C. wrote:

Patrick S. schrieb:

It seems to becoming an ‘annual’ event that I setup a GNURadio
environment, and this year’s candidate machine seems to have almost
nothing of the antecedent packeges…

Gee, if you use any of Mandriva, SuSE, Ubuntu or FC5, I think the
only thing you’ve got to build is SDCC.

Perhaps you ought to rethink your distribution choice…
Out of curiousity, what distribution are you using?

Eric

Patrick S. schrieb:

This are the parts I want to see in Python for several reasons:

  • Gnuradio uses already Python. This is a known technology to the
    developers. And you can get rid of XML, another unknown technology.
    (Gnuradio depends on C++, USB, Swig, Python and wxWidgets, moreover
    the >3 audio interfaces. That’s a enough to support as can be seen on
    this list.)

This is somewhat missleading… While these are the ‘primary’
dependencies, those packages all have secondary, tertiary, quarnary,
n-ary
dependencies which often lead to a tangled web of
‘you-cant’-get-there-from-here-without-a-heck-of-a-lot-of-work’. (for
example,
wxWidgets needs gtk, which needs pango, which needs cairo, which needs
fontconfig and freetype, etc… not to mention atk, and glib…)

It seems to becoming an ‘annual’ event that I setup a GNURadio
environment, and this year’s candidate machine seems to have almost
nothing of the antecedent packeges… and because of a very strange
problem of cairo not linking correctly, I’m compiling the
latest version of gcc to see of there is an implicit dependence on the
version of gcc somewhere…

so needless to say, I’m not particularlly enthusiastic at the moment…

John C.

Eric B. schrieb:

Gee, if you use any of Mandriva, SuSE, Ubuntu or FC5, I think the
only thing you’ve got to build is SDCC.

Perhaps you ought to rethink your distribution choice…
Out of curiousity, what distribution are you using?

Well the problem here is that, the machine is not ‘mine’. It appears to
be a Redhat
9 setup, and the directive was ‘put gnuradio’ on the machine… not
‘format and
install a new distribution, then install gnuradio’…

Personally I tend to install Debian for the very reason that apt-get has
many
of the dependencies delt with, if I don’t have a package already
installed.

As it is, compiling gcc, then re-doing the rest of the widgetry seems to
be moving
forward…

John clark

Eric B. wrote:

Gee, if you use any of Mandriva, SuSE, Ubuntu or FC5, I think the
only thing you’ve got to build is SDCC.

Does that mean that FC5 comes with wxPython already installed? Good to
know. I’m about to
upgrade my Gnu Radio R.A. receiver system to FC5 from FC3. Not having
to deal with building/installing
wxPython would be nice…

John C. wrote:

nothing of the antecedent packeges…
to be a Redhat
9 setup, and the directive was ‘put gnuradio’ on the machine… not
‘format and
install a new distribution, then install gnuradio’…

Then why would you blame GnuRadio for an ancient OS? On Ubuntu, I had
to load SDCC and that was it. I had to BUILD NOTHING. The
installations were binary.

Bob

John clark


AMSAT VP Engineering. Member: ARRL, AMSAT-DL, TAPR, Packrats,
NJQRP/AMQRP, QRP ARCI, QCWA, FRC. ARRL SDR Wrk Grp Chairman
Laziness is the number one inspiration for ingenuity. Guilty as
charged!

All of the wxPython stuff is in Fedora extras, so you just need to do a
yum install.

Matt

On Thu, 2006-05-11 at 15:20 -0400, Marcus L. wrote:

to deal with building/installing
wxPython would be nice…


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page

Matt E. [email protected]

On Thu, May 11, 2006 at 01:21:43PM -0700, John C. wrote:

Just as an aside, what is SDCC… Small Device C Compiler?? and why
would that be the obvious missing thing to load in?

Uhh, because it’s in the README for usrp and that when you try to run
configure, it tells you that it can’t find it…

Robert McGwier schrieb:

It seems to becoming an ‘annual’ event that I setup a GNURadio

installations were binary.
No ‘blame’, just it is not ‘clear’ when a dependency package is listed,
that there are futher dependencies, which add up to a major problem
for some setups, even if it is a ‘brandnew out of the box’ disribution
which someone has not had the foresight to load in a large number of
features which at the time of installation, do not seem to be useful.

I also indicated that when I have total control over a machine, I
usually will ‘update’ as well as use a reasonable distribution. However,
when asked to install a particular package on a machine which I don’t
have such control over, I have to work within that limitation.

Just as an aside, what is SDCC… Small Device C Compiler?? and why
would that be the obvious missing thing to load in?

John C.

Eric B. schrieb:

configure, it tells you that it can’t find it…

Well, that explains why I didn’t see any reference to it… I didn’t
setup for the USRP. But
I’ve just been informed that we’ve bought a USRP… so I’ll add this to
the list of things to setup.

John C.

John C. wrote:

It seems to becoming an ‘annual’ event that I setup a GNURadio
environment, and this year’s candidate machine seems to have almost
nothing of the antecedent packeges…

This is not exactly the content you would expect from the subject. I
know i’m a little late, but shouldn’t the subject be changed?
Moreover the references are kept with replying, so diligent clients
thread the messages misleading…

Patrick

Engineers motto: cheap, good, fast: choose any two
Patrick S.
Student of Telematik, Techn. University Graz, Austria