Install Wine on Mac Mountain Lion with Homebrew

It was nice to see that I could

brew install wine

Until it failed trying to install libicns:

==> ./configure --prefix=/usr/local/Cellar/libicns/0.8.1
==> make install
_WritePNGImage in icns2png.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [icns2png] Error 1
make: *** [install-recursive] Error 1


These open issues may also help:

Fortunately the second link showed what needed to be done:

brew rm libpng
brew remove freetype
brew install libpng --universal
brew install freetype --universal
brew install wine

Self-Driving Cars: Biggest Societal Change Since… Cars

KITT: The Self Driving Car

KITT: The Self Driving Car

New Scientist is having a contest with the prize being a trip of a lifetime to the Arctic Circle and the bottom of the North Sea. I discovered after I wrote my entry that they only wanted less than 100 words. So here is what I originally wrote before I had to truncate it to something like Self Driving Cars FTW!

Self driving cars will be one of the biggest changes to society since, well, cars. Transportation is about 28% of all energy consumed in the US and cars are 60% of that. Self driving cars increase the efficiency of the use of cars in many ways.

Robotic cars won’t have a “lead foot” they can accelerate and decelerate optimally most of the time whereas human drivers are crazy on the accelerator and the brake. This will dramatically improve the overall efficiency of stop and go / around town driving.

Another dramatic optimization will be that automated vehicles will be able to operate safely as dynamic “trains” on highways. As cars flow onto a highway, they will all know where each other are going and can spontaneously form trains for the longer distances.  Wind resistance is where most of your car’s energy consumption goes to once you go faster than around town speeds, putting cars into trains would be a huge savings. Eventually automated cars could even get on rails for long distance travel and then convert back to tires for local road travel. A steel wheel in contact with a steel rail reduces by 85-99% the amount of rolling friction than a rubber tire on asphalt/concrete.

There will be other  significant indirect savings of energy due to changes in how we lay out cities, suburbs and highways. We can probably have fewer and smaller highways (or at least not have to widen highways as automated vehicles will be able to use less lanes and gaps. And if we can replace  interstate highways with rails but still have personalized transportation with automated vehicles, we could eliminate most long distance highways.

We’ll also need significantly less cars to be manufactured each year as most people will not have to own a car. Transportation as a Service (TaaS) will emerge as the most popular mode. You just use your personal communicator to schedule or  fetch the most available TaaS vehicle and it come picks you up. A huge amount of energy (let alone capital) would be saved by not building so many cars.

And that’s just for the generation of negawatts (the amount of energy we do NOT have to generate). The amount of personal and societal capital savings will be huge. To begin with, just think of how much capital is idle in all the parked cars at any instant. We might even get more exercise! Our cities and residential areas can be taken back from cars since we don’t need to leave a car at our destination anymore. And we’ll need to allocate much less of our space to roads and parking. Ecosystems can be restored since there won’t be as a huge swath of  interstate highway all over. The list goes on and there are many other unexpected savings to be found.

I can’t wait!

Google Self Driving Car Today

Getting My Hands into Robotics

Robot and Human Holding Hands
I’ve always loved software that can effect the “real world” and robotics does that in a great way. I figured it was time to dip my toe in the realm, so for the Holidays I decided I wanted to build a robot. But I really didn’t want to have to do toooo much C / C++ programming. I’ve been spoiled by Ruby and I wanted to do more Clojure. It seemed that finally there were low cost computer boards like the Raspberry Pi and BeagleBone that would make that feasible though I might still use an Arduino based system for low level stuff.

I spent a lot of time looking at the various kits trying to understand the differences and advantages / disadvantages between them. This included going to some local Robotics Meetups like the Silicon Valley Robotics and  the HomeBrew Robotics Club. In the end I decided on a platform made by DFRobots. It was now too late to order one online so I got the J-Bot V2 from Jameco mainly because Jameco is near my work and I could go pick it up. This is based on the DFRobot 4WD Mobile Platform which comes with an Arduino clone and an embeded Motor Controller calle Romeo. This kit includes 4 DC Motors with gearboxes, an Ultrasonic rangefinder mounted on a server so it can scan 180 degrees.

Putting the kit together was pretty easy. The only soldering was to solder wires to the motors. The rest was like putting together a desktop PC, just screwing things together. The sample test code that Jameco supplied (which is basically the same code as DFRobots ships) worked with no problem, but the code to make it autonomous turned out to be based on the V1 version of the J-Bot which used a standard Arduino and the Adafruit Motor Shield and thus uses the AFMotor library. Though the Romeo uses a roughly similar H-Bridge chip design, its different enough that the code doesn’t work as is. So this meant I had to immediately dive into C and C++ code AND the schematics to figure out what the differences were. Well I did want to learn about this stuff, so there I went.

Here are some things I discovered so far: (This is preliminary and some assumptions may be wrong)

  • The Romeo has only 2 independent motor drive outputs (a single L298SO H-Bridge Driver). So this kit has the two left motors controlled by one output and the two right motors controlled by the other.
  • The Romeo uses 4 Arduino digital pins to control the L298SO Dual H-Bridge and 2 motors. For each motor, one pin goes thru a a pair of nan-gates to control the two pins on the L298 to set the direction and the other pin is the output of the PWM to drive the enable and thus control the speed
  • The Adafruit Motor Shield uses 4 Arduino digital pins to drive a 74HCT595N shift register. This allows the shield to map 4 pins to control the 4 motors

Thus one can’t just take the AFMotor library and use it with the Romeo. And all the examples I can find for the Romeo motor control are splats of linear C code with no Library or Object Orientation. So I’ve been trying to decide if I should modify the AFMotor Library which is object oriented and an Arduino Library and make a version that is RomeoMotor and try to keep the same interfaces or do something different. I was surprised that I could not find a motor control meta object or template or whatever its called in C++.

I did find a pretty good tutorial on the AFMotor:

Adafruit Motor Shield – Part 1: Software Serial Peripheral Interface (SPI)

Adafruit Motor Shield – Part 2: Timer/Counter and PWM

That’s it for now.

Gigabit Internet for $70: the unlikely success of California’s WHY NOWHERE ELSE? Hint: Oligopoly

Via Scoop.itDemand Transformation

They offer each house up to one gigabit per second in bandwidth, making this one of the fastest streets in America. For only $69.95/month (100MBps for $39.95, both include phone service. … Wondering “why can’t somebody else do this?” You’re asking the right question. But you may not like the answer.