Scribbler 2 Robot + Fluke + Myro

 Python, robots, Ubuntu  Comments Off on Scribbler 2 Robot + Fluke + Myro
Nov 192015
 

Last night I gave a presentation on Robots and Python at the Omaha Python User’s Group meeting.

I’ve decided to lend out my robot to other group members who are interested in the topic. I am going to document how to get the Robot set up and create an environment to interact with it. It had been a while since I last used the robot (python2.4 or so) and I had to do a few things to get things fixed up with the current version of python and the supporting packages. I got a lot of help from this article but I am going to condense that information to what needs to be done on a linux platform.

NOTE: These instructions are for python2.7, I’ve read that python3.x is problematic, although I’ve not tried.

Software Environment

  1. First setup a virtual environment
  2. virtualenv robot

  3. Now change to the directory and activate the virtual environment
  4. cd robot; source bin/activate

  5. Now install the dependencies
  6. pip install numpy pyserial Pillow

  7. Now checkout the latest myro source
  8. svn co http://svn.cs.brynmawr.edu/Myro/trunk myro

  9. change into the myro/myro subdirectory and edit the graphics.py file. You will need to change the line import ImageTk to from PIL import ImageTk
  10. Now change back up one directory and run the setup for the myro library
  11. python setup.py install

  12. now go back one more directory so you are in robot

Bluetooth setup

My laptop didn’t have Bluetooth built-in so I used a dongle. Do what you need to do and open up your Bluetooth manager, then turn on the robot (with the fluke board attached). Robot requires 6 AA batteries and will run fine with rechargeable batteries if you have them. Install them in bottom compartment. Install fluke board by mating it to the rs-232 connector on the top of the S2. Power switch is a black slider by the comm port.

Look in your bluetooth manager for a device that has IPRE in the string. Pair with it and use the following code. 1234 Make a note of the device that is set up. On my rig it was /dev/rfcomm0
NOTE: on mine the /dev/rfcomm0 was root:dialout but I couldn’t access it. I was too lazy to check my groups so I just pulled out the hammer and hit it with
sudo chmod 666 /dev/rfcomm0

Ready to Test

Inside your virtualenv, fire up python and enter the following:

from myro import *
initialize('/dev/rfcomm0')

repeat the initialize command until your are successfully connected. You’ll hear the beeps once you connect. Now lets test it. Assuming we are starting where we left off from above. (If not, start the python interpreter up again and issue the import and initialize commands from above.)

forward(1, 1)

See the manual for a list of commands or just dir() and help(interestingCommand)

If you run into any issues please let me know. I am going to keep this post updated so as others borrow the robot they’ll have some up to date instructions to get them started. If you are a member of the Omaha Python Group and would like to arrange to borrow the robot, please contact me.

I’ll post some robot code in future posts.
Have Fun!

 Posted by at 8:07 pm

CrossOver Chromium vs. Firefox 3 – Javascript performance results

 Business, Firefox, Google, Ubuntu  Comments Off on CrossOver Chromium vs. Firefox 3 – Javascript performance results
Sep 152008
 

An interesting thing happened on my way to the web today. While reading through my rss feeds, I came across a story about CrossOver doing a Proof of Concept port of Chromium to CX. Interesting since the mighty “g” can’t seem to get it together for Linux. I’ve already downloaded and played with Chromium at work on my XP box and was impressed with the speed. It seemed much snappier than FF3.

So being an overly curious bugger, I downloaded the deb pkg for Ubuntu32. Yeah, it looks pretty rough — but what the hey, it’s a PoC right? So, I thought maybe a little speed test is called for, so I googled “javascript test” and my cloud brain returned, “Sunspider JavaScript Benchmark“.

So I fired it up in the cxChromium port and then it the standard FF3 on Ubuntu. Here is what I saw for cxChromium. I then swing over with FF3 and get these results.   Javascript in FF3 is 2.44x slower than cxChromium.  Man oh Man, is the v8 javascript engine a hummer.

ubuntu: Using xdmcp in the Term Server Client

 Ubuntu  Comments Off on ubuntu: Using xdmcp in the Term Server Client
Mar 252007
 

To enable xdmcp in the terminal server client for Ubuntu (edgy). By default the
terminal server client program has xdmcp disabled. To fix this just
install xnest:
# apt-get install xnest

 Posted by at 8:48 am
Jan 052007
 

I tried setting up a workingenv for playing with SQLAlchemy today but I ran into a number of problems. First, since I had installed pysqlite2 via Synaptix, easy_install was not finding the package. So I had to uninstall the pysqlite2 that I had installed with Synaptix and then install with easy_setup.

However, there is a bug for pysqlite on cheeseshop and no download is listed. So after inquiring on the TG mailing list, I tried:
easy_install -f http://initd.org/pub/software/pysqlite/releases/2.3/2.3.2/ pysqlite

but that failed because it couldn’t find the sqlite headers.
In file included from src/module.c:24:
src/connection.h:33:21: error: sqlite3.h: No such file or directory
...
error: Setup script exited with error: command 'gcc' failed with exit status 1

So I installed the libsqlite3-dev package via Synaptix — and finally all was right with the world.

I couldn’t get pysqlite to install fully into the workingenv, so I had to install it on the base system and then when I issued the
easy_install -f http://initd.org/pub/software/pysqlite/releases/2.3/2.3.2/ pysqlite
in the workingenv a proper entry was made pointing back to the package in site-packages
Adding pysqlite 2.3.2 to easy-install.pth file
Using /usr/lib/python2.4/site-packages/pysqlite-2.3.2-py2.4-linux-i686.egg

 Posted by at 9:48 pm