MacOSX Setup
From IPRE Wiki
Contents |
Package Installer
If you are running Mac OS X 10.5 then you need only install the below items.
- Download and install Python 2.5 for Macintosh OS X in the default location.
- Download and install media:MyroInstaller.dmg.
- Download and install Numpy.
- Download and install PIL.
- Upgrade Myro:
- In a terminal (found in Applications->Utilities->Terminal), type:
$ sudo python
>>>from myro import *
>>>upgrade("myro")
>>>exit()
Now go to Applications->MacPython->IDLE to run Python. This is the same interpreter that you have been using in class.
There is also an installer that contains all of the Myro packages, but Numpy does not work yet, and PIL may not.
- Download Myro Mac OS X Package.
Note: TkSnack does not work on Mac OS X.
Afterwards, follow the directions (below) to pair your computer's Bluetooth with the robot.
Setup Bluetooth
- Attach the IPRE Fluke to the scribbler
- Turn on the scribbler
- Click on the bluetooth icon in the upper right of your toolbar, select "Set up Bluetooth Device"
- Follow the wizard, select "Any device" as the device type
- Select the IPRE-XXXXXX where XXXXXX is your Fluke's serial number
- Enter the Passkey/PIN code (1234)
- From the bluetooth menu in the toolbar select "Open Bluetooth Preference"
- Highlight the IPRE bluetooth connection name
- Select Edit Serial Ports (little gear picture)
- Add a serial port to the Fluke via the "+" button if you don't have one already
- If you already have a serial port listed, change the port name to "scribbler" all lowercase
- Click Apply
- Select Edit Serial Ports again
- Select the "Require pairing for security" button
- Click Apply
- You should now have a device like "/dev/tty.scribbler" that is the serial port to the scribbler. Confirm the actual name using the terminal application.
- Start Python.
- At the Python prompt enter:
from myro import *
init("/dev/tty.scribbler")
Once connected, upgrade the fluke firmware and the scribbler
- At the Python prompt enter:
upgrade("fluke")
upgrade("scribbler")
If you get an RFCOMM error, go back to the Bluetooth Menu
- Click "Disconnect"
- Click "Edit Serial Ports"
- Select the "Require pairing for security" button
- Click Apply
- In Python:
init("/dev/tty.scribbler")
Bluetooth Problems
We have received reports that on some Macintosh computers the /dev/tty.scribbler port will sometimes change it's name to a /dev/tty.scribblerXX (where XX is a number). For example, /dev/tty.scribbler remains in the /dev/ directory, but does not connect to the scribbler robot, while /dev/tty.scribbler04 is the correct communications port to use when connecting to your robot. If you run into "A Bluetooth serial failure has occurred." and/or "Serial element not found." errors, please check for other entries in your /dev/ directory and try using the one with the highest number. You may have to delete your bluetooth serial port and re-add it to create a new entry that works.
Detailed Installation
These instructions are only needed if you cannot use the package installer above.
What Packages Do I Need?
Myro depends on various python packages. You can find some binary installers online, install using fink or macports, or install them manually from source. See below for more detailed instructions.
Packages needed:
- Python-2.4
- Pyserial
- Python Imaging Library (PIL)
- Numpy
- Myro
What OS Version?
Mac OS X 10.6 - BETA manual install package
Mac OS X 10.5 - binary install or package installer
Mac OS X 10.4 - manual or binary install
Mac OS X 10.3 - manual install
Although all the packages can be installed from source, the binary install instructions are simpler. Using myro with python-2.5 is in beta testing and may cause some strange problems with idle. Email us if you find anything strange.
Currently the gamepad() interface is not supported on mac because of a conflict with TK and pygame
TK Snack is not available for Intel-based Macs.
BETA install files (Use for Mac OS X 10.6 ONLY!)
You will need to install Xcode (Select the optional Unix Development Support package!) and macports on your computer!
This zip file includes Myro version 2.8.14, instructions, and an installer script that (should) do most of the work for you. It also includes an "IDLE.app" which allows students to load idle as a normal application (instead of having to work in the terminal).
It has NOT been extensively tested, but has worked for several of my students. If you have any problems with it, please let Jay Summet [ summetj at gatech dot edu] know!
Media:SnowLeopard_mac_OSX_10.6_myro-2.8.14-r3.zip
Package Installer (Use for Mac OS X 10.5)
This dmg contains an installer for all of the files required for Myro, as well as one for Python 2.5. The download is here: http://myro.roboteducation.org/packages/myro-270.dmg.
Binary Installer (Use for Mac OS X 10.5 or Mac OS X 10.4)
The binary packages can be found here
- Install Mac-Python
- Run the "Update Shell Profile.command" script in Applications/MacPython (this is needed for installing pyserial and myro)
- Install PIL
- Install Numpy
- Install pyserial from source using python
- Unzip pyserial
- In a terminal type (Mac OS will hide your password as you type it for security reasons):
- cd pyserial-2.2
- sudo python setup.py install
- Warning: if the pyserial file is not in the main directory, you may need to type cd nameofdirectory to get to the correct directory before typing cd pyserial-2.2.
- Install the latest myro
- Unzip myro
- In a terminal type:
- cd myro-2.8.2
- sudo python setup.py install
- Warning: if the myro file is not in the main directory, you may need to type cd nameofdirectory to get to the correct directory before typing cd myro-2.8.2. Please note that your version number may be different than 2.8.2.
- Install xmpppy (optional, for chat, register, send pictures)
- Unzip xmpppy
- In a terminal type:
- cd xmpppy-0.4.0
- sudo python setup.py install
Manual Install (Mac OSX 10.3)
Note: to set up Myro on Macs, you'll need to follow the instructions here -- the CDROM setup is only for Windows.
- You will most likely need to open the Terminal application to install all the packages.
- You will need gcc (install xcode from Mac OS cds or web) for Numpy, PIL, and jpeg
- Install python2.4 mac package or using fink
- Mac DMG package: /Library/Frameworks/Python.framework/Versions/2.4/bin/python2.4
- For fink: /sw/bin/python2.4
- Install pyserial from source using python2.4
- sudo python setup.py install
- Install libraries to save and send your images as jpeg.
- If you have fink or macports try installing libjpeg that way
- (e.g. fink install libjpeg libjpeg-bin libjpeg-shlibs)
- Otherwise follow these instructions to install libjpeg from source.
- download libjpeg http://www.ijg.org/files/jpegsrc.v6b.tar.gz
- untar that (tar -xvzf jpegsrc.v6b.tar.gz)
- cd jpeg-6b/
- ln -s `which glibtool` ./libtool
- export MACOSX_DEPLOYMENT_TARGET=10.4 (for tcsh or csh use setenv MAXOSX_DEPLOYMENT_TARGET 10.4)
- ./configure --enable-shared --prefix=/usr/local/
- if /usr/local/ /usr/local/include /usr/local/lib don't exist create them:
- sudo mkdir /usr/local/
- sudo mkdir /usr/local/lib/
- sudo mkdir /usr/local/include/
- make
- sudo make install-lib
- sudo make install-headers
- export MACOSX_DEPLOYMENT_TARGET=
- Install PIL
- sudo python setup.py install
- If you have a problem when running savePicture() while running Mac OS X 10.4, you may need edit setup.py so the paths point to the right versions of freetype, jpeglib, and zlib. Run the above steps again.
- Install Numpy
- sudo python setup.py install
- Install the latest myro
- sudo python setup.py install
- Install optional packages from Linux Setup especially xmpppy (for chat, register, sendPicture).
- For intel mac you can't use snack mac binaries since they are for PPC so you need to build you're own from source (still in progress, doesn't currently work).
What if Something goes wrong?
If you are using MacPython 2.5 and something goes wrong, you may have to UNINSTALL MacPython and do a complete re-install. Here is how to correctly uninstall MacPython2.5:
- Remove the /Applications/MacPython folder. (Drag it to the trash, or in a terminal type "sudo rm /Applications/MacPython"
- Remove the /Library/Frameworks/Python.framework directory. ("sudo rm /Library/Frameworks/Python.framework")
- Remove all files that start with Python in the /Library/Receipts directory (This allows the MacPython installer to successfully re-install) A command such as "sudo rm /Library/Receipts/Python*" will do this. [Note the * touching the end of Python, make sure you do NOT leave a space between the * and the Python or this command will delete everything in the current directory.]
Intel Mac with Windows XP via Parallels
Setup Myro
- Follow the Windows instructions from Myro Installation Manual
Setup Bluetooth using USB Adapter
- For newest version of parallels: Connect a USB Bluetooth adapter
- Allow windows XP to access the bluetooth adapter via the toolbar on the bottom of the window
- Follow Windows instructions for Bluetooth Setup
Setup Bluetooth using old version of Parallels (shouldn't be necessary anymore)
- Getting the bluetooth to work with XP via parallels is a little tricky. Basically the built-in bluetooth adapter (at least in the macbook pro) needs extra drivers in XP. Instead, use the Cellink USB-bluetooth adapter since that doesn't require any extra drivers.
- First we have to remove the bluetooth drivers from the macbook so it releases the device to XP
sudo kextunload -b com.apple.driver.CSRUSBBluetoothHCIController sudo kextunload -b com.apple.driver.AppleUSBBluetoothHCIController
- Plug in the cellink USB bluetooth adapter
- Fire up XP in parallels
- Using the parallels interface, let XP control the "wireless adapter XX:XX:XX:XX" which is the bluetooth dongle
- The device should be seen by XP
- Follow regular windows instructions
- When finished, release the device from windows in parallels
- Unplug the adapter
- Reload the drivers to enable the device to be used from Mac OS
sudo kextload -b com.apple.driver.AppleUSBBluetoothHCIController sudo kextload -b com.apple.driver.CSRUSBBluetoothHCIController
