Aug 11

ROS & Robovero


Working in the UCSB Robotics Lab  I’ve had the fortune of getting to play with one of those adorable little chewable linux computers , during the ~week before my move to Japan. While unfortunately I wont get to see it though to its installation as the nervous system on a hoping robot,  I’ve had the adventure of getting it all up and running with the ROS (Robot Operating System)  toolchain. I pulled a bit of hair out during the process, so hopefully this post will prevent others from having to do so.




As of now, this blog describes the process of getting Gumstix to boot Ubuntu Natty from an SD card , autoconnect to wifi, and subscribe to a  ROS topic.
I’m using a Gumstix Overo Fire COM, 8GB SD card, and the new Robovero daughter board.

You don’t need that exact hardware, but at minimum:

  • -Gumstix Overo Air/Fire/FE
  • -Micro SD card (8 GB in these examples)
  • -Overo daughter board (could be pretty much any one)
  • -Computer running Ubuntu
  • -A wireless (or wired if you have the right Gumstix daughter board) network that both the Overo and Host computer can connect to


Creating the Bootable Ubutnu SD Card

First grab a copy of rootstock – a nifty tool we will use to create our armel ubuntu image:

# apt-get install rootstock

cd to someplace where you dont mind making a mess:

# mkdir gumbuntu
# cd gumbuntu

Now to generate the image:

~/gumbuntu# rootstock --fqdn overo --login robot --password temppasswd --imagesize 8G --seed wget,vim,linux-firmware,wireless-tools,wpasupplicant,usbutils,build-essential,tmux,openssh-server,lynx,python-yaml,cmake,subversion,wget,python-setuptools,pkg-config,python-dev,ntp,libboost-dev,libboost-all-dev,libapr1,libapr1-dev,libaprutil1,libaprutil1-dev,liblog4cxx10,liblog4cxx10-dev --dist natty --serial ttyS2

You may want to edit this somewhat. For more info on rootstock see https://wiki.ubuntu.com/ARM/RootfsFromScratch

This is bound to take a while. So in the meantime crack open a new terminal session and get your sd card formatted and bootable by following the directions here. STOP after copying MLO u-boot.bin and uImage to the boot partition, because we will be using our own rootfs image. You can download MLO u-boot.bin and uImage from here.

Once rootstock has completed unzip everything to the SD card’s root partition (lets call it sdroot)

~/gumbuntu# cd /media/sdroot
/media/sdroot# tar xvaf ~/gumbuntu/armel-rootfs-[creation date].tgz

This will also take a while. Make yourself useful by getting your Overo ready for the next step. The Ubuntu image we are building unfortunately does not have built in support for the Overo’s wifi chip, so we are going to swipe the modules and firmware from the nand image (which we know works). You could probably also find this stuff on the interweb , but this way is a pretty simple one stop shop for everything. If your kernel versions do not match you may be better off extracting the stuff from one of the Gumstix images to avoid compadibility issues.



Copying Modules and WiFi Firmware

Plug the daughter board into your desktop as you would normally to get to the serial console, give the boards power and let the Overo boot into the NAND Angstrom distro. We will be connecting to a wifi network to transfer files, becasue afaik there is no reliable way to do this over the serial connection. From the console (in a session thats not extracting files):

$ screen /dev/ttyUSB1 115200
[you will see the overo booting into Angstrom]
login: root
# ifconfig wlan0 up
# iwconfig wlan0 essid [your SSID]
# dhclient wlan0
# /etc/init.d/sshd restart

If you use encription you are going to have to set up wpa_supplicant.conf , but I’ll trust you know how to do this. The sshd restart probably isnt strictly necessary, but can’t hurt. Also don’t forget your Gumstix’s IP address; lets pretend its

Once the files have finished extracting from the SD card you will want to do the following (from a fresh terminal ) :

# cd /media/sdroot/lib
/media/sdroot/lib# scp -r root@* modules/
/media/sdroot/lib# scp root@* firmware/
/media/sdroot/lib# cd ..
/media/sdroot# scp -r root@* etc/network/
/media/sdroot/lib# cd
# umount -a

Your bootable Ubuntu MicroSD card is now all ready! plug it into the Overo and give it a go



Installing ROS

Log into your Gumstix Ubuntu distro with the username/pass you used in the rootstock command, connect to your router and install ros by running:

# ifconfig wlan0 up
# iwconfig wlan0 essid [your SSID]
# dhclient wlan0
# apt-get update #not really needed yet, but verifies that you are connected
# easy_install -U rosinstall
# rosinstall ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=diamondback&variant=ros-base&overlay=no"


go get that cup of coffee.


now I’ll assume you can get your router to statically assign IPs , if not you will have to change things every time your router does.  Edit /etc/hosts to include the name of your desktop computer (which will be running roscore) lets pretend your desktop has IP address, and you want to name it desky

#echo " desky" >> /etc/hosts

#echo "source ~/ros/setup.bash" >> ~/.bashrc

#export ROS_MASTER_URI=http://Desky:11311

. ~/.bashrc

Now ROS is all set up! lets just configure the Gumstix so that it automatically connects to WiFi on boot.



Network Config

In /etc/rc.local put:

#ifconfig wlan0 up
#iwconfig wlan0 essid [your SSID]
#dhclient wlan0 -4

You may not need the -4 , but without it my connection would fail every few minutes and I would have to request a new lease.
Also if you are using encryption you will need to set up /etc/wpa_supplicant.conf and change the above lines to something more like:

#ifconfig wlan0 up
# wpa_supplicant -Dwext -i wlan0 -c/etc/wpa_supplicant.conf -B
#dhclient wlan0

Now your overo is all set! Unplug the mini-USB and reset the Overo. After about a minute you should see the outermost blue LED blink violently then remain lit. This means you are connected.
To make things easier on ourselves and ROS, lets make another similar entry in /etc/hosts. This time assume the gumstix is and we want to name it gummy

#echo " gummy" >> /etc/hosts

no tricks there.  Now you can log into your overo wirelessly simply by running

ssh [user]@gummy

You can now run your ROS programs , and the two computers should be able to find each other seamlessly.


Feb 11

Surgical Proceedings

Been busy with classes this quarter- as usual i gave in to the allure of really cool sounding classes as well as the carrot and stick diploma thing…
but srsly- check out this schedule:

Sex – no its not offered through Exercise and Sports Studies ; actually a relatively easy sociology class that will count towards GE reqs. Im currently writing this instead of studying for the midterm that’s 32 minutes away.
Data Structures and Algorithms – a class that makes you think ‘damn that was clever’
Compilers – a class that makes you think ‘damn that was REALLY clever’
Ethics for Engineers– how to lie to your self in the mirror
Digital Control Design – a crazy amount of work for an upper division elective , but really worth it. The teacher [zomg] seems to actually care about her students learning and being interested in controls! I feel a lot of the loose ends from last quarter rapidly coming together.
xxxSmartphones – bi weekly seminars on the current technologies – learn the API on your own time.xxx =( dropped this one…

[wow wordrpress you suck at del, strike, and s tags]
So there’s my excuse for going a month+ between posts. Worse still, it means the fun non-curricular stuff now has to be saved for weekends…
Anyway here is the current run-down on the progress of these weekend amusements:

The FBVisual project has been kind of set aside for the moment, I made a few more screens (pictured below) which I don’t really consider to be 100% complete – but they are kind of neat as proof of concept, and at some point I would like to get them more polished.

What up: a cloud map in a word bubble. Larger words are words that appear more frequently, smaller words are less frequent. The left bubble was derived from a scan of all my friends current ‘status’ on facebook, while the one on the right it taken from the ‘about me’ section. Of course, I also do some filtering to get rid of words that are very common and not so interesting (prepositions and such) to make the good stuff pop out. Shows some interesting trends, especially around holidays or big events. Things like ‘snow’ ‘christmas’ ‘family’ and ‘new year’ emerged pretty strongly when i ran it a few months ago – wish i thought to run it on valentines day , I would have expected to see some lovey-dovey stuff come out.

She started out as an RB2000 kit I picked up during my travels East and will now in the process of being outfitted with some additional additional smarts and weaponry for that mech-warfare challenge.
When I heard about the challenge, it really caught my imagination and I thought it was just wayy to cool to pass up – the rules (in short) are as follows:
-No looking at the battle arena, except through a wireless camera mounted on the bot
-Robot must walk on legs
-Destroy all other robots!
(ok, in actuality they are a little more in depth, but you get the idea)

and this coming year , if all goes according to plan, they will be adding a ‘hardcore’ class which promotes the use of CO2 pistols, Flamethrowers, and Micro Rockets .

High tech + red neck = my kind of sport.

I bet you can guess which class I’ll be trying to enter =D
Major modifications to the RB2000 thus far:
New Skull – surgically inserted my nifty custom machined mounting bracket, wireless wide angle camera, zigbee mount, and red LED in the eye for good measure

Laser mounted and attached to arm – hopefully this will be sufficient feedback to let a remote machine know what the arm is pointed at through the computer vision loop. I have it tested and working with a fair amount of reliability, but it could definitely be improved.
New battery connectors!– ok maybe not so exciting – but will allow me to connect up my new 3Ah lithium polymer batteries alone, or 2 in parallel. Only thing that’s kinda a shame (for the efficiency junkie in me) is that the batteries are 7.2v and the board just uses a 5v linear regulator- which is like a 30% loss! There will still be plenty of juice, but if im feeling like a badass I may try to include a switching regulator stage at some point.

Zigbee board– purdy aint it?

The lovely thing was that when i finally got all the parts I needed to test it, I managed to kill the main servo driver board by (I think) shorting the 3.3v src to gnd with the dmm..
I wont repeat all the expletives uttered here, but suffice to say I was pretty unhappy.. Its looking like a replacement will run somewhere between $200 and $390 which and there would be a 2-3 week lead time to get the part from Japan. painful.

before I totally give up on repairing the thing, Im going to try just swapping out the 3.3v smc regulator with the hope that that’s all that got fried, but who knows…
wish me luck!

Nov 10

Passive Dynamic Locomotion!

Now that I’m back in the business of keeping an up-to-date blog , here is a post describing in more detail the research I worked on during my stay in Japan. Of course the best, and unabridged version can be read here , or the slides from my talk here.
But in short, the work I did with the Osuka-Ishikawa Robotics Laboratory was on passive dynamic locomotion, and more specifically with what is being called the Phase Transition Phenomenon. As I described briefly in a previous post, the idea behind passive dynamic locomotion is that machines can be created which ‘walk’ passively; ie without the standard array of sensors/actuators that are typically required for this sort of task. Through clever mechanical design the control is implied in the physical structure and thus it is said that the system utilizes morphological computation to control motion. Of course these robots must be placed on an incline such that their decent down the slope allows them to regain the energy lost through the inelastic foot collisions. Furthermore, devices of this sort have started to be developed which are able to walk as well as run (running implies a phase of motion in which both feet are off of the ground) depending on the incline angle. Here is a video from another lab which has collaborated on some of this research:


While in Osaka my work involved setting up a simulation environment (using the Open Dynamics Engine, a free open source C++ rigid body physics engine) in which similar 3-dimensional passive dynamic walking mechanisms were tested and evolved to optimize walking/running ability. Below is an image showing an example body, and the parameters that were evolved.

Again, more detailed explanation of the procedure and results can be found in the paper linked to above, but the gist of it is that a Genetic Algorithm was employed utilizing a handcrafted tailored fitness function, 70% crossover, 25% mutation, 10% mutation amount, a population size of 256 and Stochastic Universal Selection to maintain a high level of genetic diversity. On my desktop PC 150 generations of evolution took ~12 hours, which certainly put a damper on the number of variants I could test given the limited amount time I was Osaka working on this… At any rate I still found that the GA was effective in creating machines that were increasingly able to walk/run below are a few graphs showing the course of the evolution.  

Below is some video showing the initial randomness of population0 compared to population150’s ability to take several steps before falling over. Although stable walking/running motion was never achieved, I still think the results are pretty interesting. In the paper/slides I talk about how things like a better fitness function, more generations of evolution, a faster program (or supercomputer), careful introduction of additional a priori knowledge , a different incline angle or body configuration could have improved this. I am not currently working on developing this any further, but I found the study to be quite interesting and would definitely consider taking it [or something similar] up again in the future.  

Morphology Evolution of a Passive Dynamic Walking Machine from Z R on Vimeo.

Mar 10

First 3d Data Visualization



As posted on the as posted on the Media Art and Technology page:




For the final MAT259 project, students create a 3D interractive data visualization using data collected as part of the Seattle Public Library project (link).



The idea behind this project was to create a 3 dimensional interractive data visualization which would provide users with an effective and visually pleasing format to explore relationships between different item formats (eg. Book, CD, Magazine), the day of the week, time of day, and duration for which they are checked out.


Modes and Operation:

There are several modes, and methods of control which can be accessed by hovering over the "CONTROL" pane in the bottom portion of the screen. A list and brief description follows:


  • zoom – zooms the camera in and out
  • opacity – adjusts the opacity of the the graphics displayed
  • background – changes the background linearly from back to white
  • animation speed – adjusts the speed for animation (when in animation mode)


  • spherical – maps plotting from cartesian to spherical coordinates (time of day to θ, day of week to ρ, and checkout duration to radius)
  • log – uses logarithmic function to compress checkout duration, and make data more viewable
  • animate – animate by interpolating between consecutive check ins
  • axis – display x, y, and z axis
  • labels – display lables to allow for a more quantative analysis of the data presented
  • lines – display lines connecting the dots which represent individual transactions


  • previous – view previous item format
  • next – view next item format



The UCSB MAT program, Professor George Legrady, T.A. Reza Ali, Ben Fry, and everyone behind the developement of the Processing language as well as the PeasyCam and ControlP5 libraries.

Feb 10

Some DAC fun


My sensor peripheral interface design lab has us working with a 4 channel DAC. The requirements are to make a sine and triangle wave- but since those are kinda boring I thought id do some experimentation in XY mode 🙂

Feb 10


In LOVE with all my courses – how it should be.

ECE 153b – Sensor Peripheral Interface/Design
More on hardware description languages; field-programmable logic and ASIC design techniques. Bus interfacing. Mixed-signal techniques: A/D and D/A converter interfaces; video and audio signal acquisition, processing and generation, communication and network interfaces, basic motor control (PID).
Currently working on a circuit/program which acquires an signal via ADC, and replays it over DAC. Full Lab Report coming soon!

ECE 181C / ME 170C – Intro to Robot Control
Overview of robot control technology from open-loop manipulators and sensing systems,
to single-joint servovalves and servomotors, to integrated adaptive force and position
control using feedback from machine vision and touch sensing systems. Design emphasis
on accurate tracking accomplished with minimal algorithm complexity.

21.7 second Wall Following bot:

RoboRat Solo Time Trials Tomorrow!
RoboRat Final Competition W2010

ECE 130B – Discrete Time Signal Processing
Analysis of discrete- and continuous-time linear systems in the time and frequency
domains. Superposition and convolution. Bilateral and unilateral Laplace and Z
transforms. Fourier series, Fourier transforms, discrete Fourier transforms. Filtering,
modulation, and sampling. — Usefull Stuff!

MAT 259 – Information Visualization
Exploration the visual organization of information. Lectures, readings and technical demos will focus on a range of conceptual models of data visual mapping as implemented in various disciplines, artistic, statistical and scientific, that are used to represent information visually.

-2D Spatial Visualization link

-3D Interactive Visualization
Coming Soon!

Continue to Chuglet Project

Feb 10


Classes kinda boring this quarter.

not inspiring.

Continue to W10

Feb 10


Physics 15 lab – FerroFluid Fountain!

FerroFluid Fountain

This was quite a fun project; completed as part of the honors/ccs physics lab series in which students are commissioned to design and build a physics demonstration for use with undergrad lectures. The basin holds ~60 ml of the ferrofluid which is sucked into the middle, pulled to the sides, or drawn up the centerpiece by electromagnets whose field can be manipulated to be constant or exhibit patterns dictated by the array of buttons/knobs mounted to the front panel. I should really upload a picture of the whole unit.. Anyway, this also resulted in my group and me being invited to show it off on behalf of ccs at a benefactor’s event – and man do they feed people at those events well 🙂

FerroFluid Fountain! from Z R on Vimeo.

ECE 152b Digital Design Methodologies – like being GOD!
Build a 4-bit RISC Computer!! Register Transfer Level Design, Clocking, b bus architectures, pipelining, control units, memory systems, microcoded systems.

Continue to ECE94R

Feb 10


– ECE 152a Digital Design Principles – enlightening
logic gates and their operation in larger circuits – latches, flip-flops, adders, etc. Also state machines, and FPGA implementation.

-ME 12S – Basic Machining – Useful

continue to S09

Feb 10


– continued work at Toyon

– CS 153a – AWESOME
writing file systems and device drivers, I/O, DMA, UARTs, addressing modes, compilation, interrupts, device drivers, compilation, optimization, an introduction to real time systems, OS/Realtime scheduling, virtual memory, and virtualization.

– Electric vehicle curiosity develops- much independent research on parts, manufacturers, suppliers, and technologies.

Curiosity Becomes Obsession


r/w_ blog : 05-23-2024
powered by WordPress