HyPower is Live!

After a few months of development the HyPower project website is live!  Bookmark the page and check back to see how our work is progressing. As part of this announcement, we are also pleased to announce the release of PhysiCloud, our programming framework for cyber-physical systems. Check out the source code at Github! More examples will be released over the summer.

Oh – and my site has a shiny new finish. More revisions will be coming down the pipe, such as revamped teaching and research sections.

NSF CPS Proposal Awarded

I am pleased to announce that I was awarded an NSF Grant entitled Hybrid Control Tools for Power Management and Optimization in Cyber-Physical Systems. This grant is a joint research endeavor with Georgia Tech. It will allow for close interaction between Georgia Tech and York College. Furthermore, it facilitates the establishment of a novel Research Co-op experience for undergraduate students at York College. Stay tuned for more details as the grant gets going!

Phidgets and Clojure Integration

I have been using Phidgets in sensing and control applications in our Automation and Robotics Lab for several months. These devices are awesome since the company supports so many languages – including my favorite: Java. Since I have been learning Clojure, I thought it would be a great experience to play with Phidgets utilizing Clojure’s built-in Java interoperability. It turns out it is relatively simple to get Phidgets talking within Clojure!

The current Phidget I am working on is the Interface Kit 8/8/8, which provides 8 digital inputs, 8 digital outputs, and 8 analog inputs. To use it in Clojure, you just add the correct Java library in the namespace form:

(ns robocloj.core (:import (com.phidgets InterfaceKitPhidget)))

Now, to operate on this Phidget using Clojure, I had to think a bit differently when calling the Interface Kit. First, Clojure’s syntax treats the first element within the parentheses as a function call, so I create and open the Interface Kit with:

(def ikit (new InterfaceKitPhidget))
(.openAny ikit)
(.waitForAttachment ikit)

No big deal here, just a different way of calling the functions. The neatest part for me was making this code more Clojure-like using anonymous functions that wrap up the Java function call.

(defn update-sensor-vals [& more]
(map #(.getSensorRawValue ikit %) more))

This function uses the notion of “variable arity” to allow for any number of sensors to be read within a single line of code. For example, I could read both sensors by making the following call within my REPL:

(update-sensor-vals 0 1)

This call results in a sequence of integer values read from the A/D:

(871 1686)

Cool! But I still have much more to learn.

Getting Clojure

I have recently explored the use of Clojure as an implementation language for my research. In the past, I came across the use of functional languages, such as Haskell, in control and robotics. However, I was too wrapped up in coding everything in Java to really dig into the language. But then along came Clojure: a Lisp that runs on the JVM.

I have studied Clojure for about a month and I am excited by its potential to facilitate my work on motion description languages. I also like that it has a new approach to concurrency, a topic important for robotics and muti-agent systems. In future posts, I will be reporting on my exploration of the language and how to get it working on the Turtlebots in my lab at York College of Pennsylvania. Stay tuned!

JamVM on Phidget SBC

I recently acquired a slew of Phidget SBCs for my lab and have been working to upgrade their Java runtime to use the most recent version of JamVM. After successfully building a new kernel with JamVM 1.5.4 support, I decided to share the process for anyone else interested in upgrading JamVM! Note that this tutorial is for upgrading JamVM on the Phidget 1070 SBC, which has less RAM than their newer 1072. Furthermore, the newer 1072 runs a Debian distribution, which should make it easier to upgrade.


  • Linux based computer (I used Ubuntu 10.10).
  • Most recent Phidget SBC buildroot. View the README to make sure you have all required libraries for buildroot.
  • JamVM 1.5.4 source.

Extract the the SBC buildroot into a convenient location, i.e. your home directory, ~username, and go into the directory. Run the basic configuration command; however, before you can compile you need to manually tweak some files.

First, I recommend creating a symbolic link within the buildroot directory to a list of downloaded source packages that you want the SBC to have. For example:

ln -s ~username/PhidgetDL dl

will link the dl directory within buildroot to your own local “PhidgetDL” directory. The buildroot process looks in here for all required software packages at compile time. If it sees that you have *.tar.gz files, it will extract them rather than hit a Sourceforge mirror and download. I found that the build process would halt if the mirror was unavailable; consequently, it was more convenient to download myself and place in the download directory. Place your JamVM tarball in this directory, as well as any other packages that the build process cannot download.

Since my priority was to upgrade JamVM, I mainly tweaked gnu-classpath and jamvm configuration files within the buildroot/package/java directory. Start by changing into the classpath directory. Within here, edit the classpath.mk file with the following line under CLASSPATH_CONFIG_OPT:  --disable-gjdoc. This change will not affect your functionality, but it will save a little space and prevent an antlr build error.

Next, go into the jamvm directory and open the jamvm.mk file. Within jamvm.mk you need to change the version line to: JAMVM_VERSION=1.5.4. Also, you need to pass the option to disable thread local storage (TLS). This change is required since the uClibc version used in the SBC buildroot does not support TLS (as far as I can tell). In the future, this feature may be added if uClibc is migrated to 0.9.32 in the SBC buildroot. To disable TLS, pass in --disable-tls under the JAMVM_CONFIG_OPT section of the file.

Once you have made these changes, you can run make in the root of your buildroot directory. If everything is configured correctly, you will get a shiny new custom Linux build with JamVM 1.5.4. To finish the process, just point your web browser to your SBC’s address on your network and upload the new .bin file!

In the future, I hope to change the Phidget buildroot to use the most recent uClibc, which would then let me get TLS enabled again. If you have success with that upgrade, do tell! That is all for now.