Difference between revisions of "Robotics-2010"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
= Software Stack = | = Software Stack = | ||
− | + | === Ubuntu with Brad's Live ISO === | |
# Make sure you have the latest version of the [http://cs.earlham.edu/~carrick/courses/cs282/cs282live_2.iso Live ISO] (as of this writing) | # Make sure you have the latest version of the [http://cs.earlham.edu/~carrick/courses/cs282/cs282live_2.iso Live ISO] (as of this writing) | ||
− | #* Recent improvements: | + | #* Recent improvements: Right and middle click from the mac touchpad, no longer need to use sudo when trying to access USB bus, based on latest Ubuntu version, new Bluetooth management tool |
− | |||
− | |||
− | |||
− | |||
# Boot off the live ISO, either on real hardware or virtually | # Boot off the live ISO, either on real hardware or virtually | ||
# Login using cs282/johnny5 | # Login using cs282/johnny5 | ||
Line 27: | Line 23: | ||
# After your passkey is accepted, try running query.py | # After your passkey is accepted, try running query.py | ||
− | ==== | + | === OSX === |
+ | * These instructions were tested under Snow Leopard (10.6.2), they will probably work under Leopard too. | ||
+ | * These instructions assume you already have Python, you can check this by typing <code>python</code> at a shell (aka Terminal) prompt. The Python interpreter should start, read the on-screen instructions to see how to exit it. | ||
+ | * Frequently it's easier to get USB working than it is Bluetooth, and they use much of the same underlying plumbing. | ||
+ | * You should test each step as you go, most of the packages have example code you can use to do this. | ||
+ | * Each of the steps below require that a package or files to be downloaded to your computer first. They are all available in the [http://cs.earlham.edu/~charliep/courses/cs282/packages CS282 packages] directory. Once you have downloaded the zip file you can un-zip it, cd to the created directory, and run the command listed below for that directory. | ||
+ | $ sudo python ez_setup.py -U setuptools # setuptools | ||
+ | $ sudo python setup.py install # py2app | ||
+ | $ sudo python setup.py install # lightblue | ||
+ | $ sudo python setup.py install # nxt-python-1.1 | ||
+ | * Simon Levy's script (bluetooth.py*) must be in the directory that you are running the interpreter in for the Bluetooth interface to work. <i>Update: Release v1.1 appears to have integrated this script into the NXT-Python library.</i> | ||
+ | * For USB support you will need PyUSB, you can download it from its SourceForge [http://sourceforge.net/projects/pyusb site] and then install it. | ||
+ | * Once you think all the plumbing is working correctly you can use the query.py script in the [http://cs.earlham.edu/~charliep/courses/cs282/source CS282 source] directory to test it. <b>N.B.</b> Change the BlueTooth ID in query.py to match your NXT. | ||
= Python = | = Python = | ||
* [[nxt-python-doc|NXT-Python Documentation]] | * [[nxt-python-doc|NXT-Python Documentation]] | ||
* [[nxt-python-threads|Thread Notes]] | * [[nxt-python-threads|Thread Notes]] |
Revision as of 07:02, 23 February 2010
Software Stack
Ubuntu with Brad's Live ISO
- Make sure you have the latest version of the Live ISO (as of this writing)
- Recent improvements: Right and middle click from the mac touchpad, no longer need to use sudo when trying to access USB bus, based on latest Ubuntu version, new Bluetooth management tool
- Boot off the live ISO, either on real hardware or virtually
- Login using cs282/johnny5
- Download Brad's installation kit and untar it anywhere you want.
- In your editor of choice, modify the install.sh script to connect to your brick instead of Brad's. This will be within the first few lines.
- Open a terminal, navigate to the folder with your newly untarred files and type
sudo ./install.sh
If your computer supports bluetooth, set up your connection to your robot
- Turn on your brick.
- Navigate through the menu to enable bluetooth
- Ensure that your device is set to "findable"
- Click the bluetooth symbol at the top of your computer's screen, next to the envelope.
- Select "Set up new device"
- Select your robot
- You will be prompted to input a passkey into your robot
- Use the small grey button to delete characters and the large orange button to select characters
- Select the checkmark to submit your passkey
- Work quickly! You have about a minute before the passkey kicks you out and makes you start over!
- You will be notified on-screen if your passkey was successful
- After your passkey is accepted, try running query.py
OSX
- These instructions were tested under Snow Leopard (10.6.2), they will probably work under Leopard too.
- These instructions assume you already have Python, you can check this by typing
python
at a shell (aka Terminal) prompt. The Python interpreter should start, read the on-screen instructions to see how to exit it. - Frequently it's easier to get USB working than it is Bluetooth, and they use much of the same underlying plumbing.
- You should test each step as you go, most of the packages have example code you can use to do this.
- Each of the steps below require that a package or files to be downloaded to your computer first. They are all available in the CS282 packages directory. Once you have downloaded the zip file you can un-zip it, cd to the created directory, and run the command listed below for that directory.
$ sudo python ez_setup.py -U setuptools # setuptools $ sudo python setup.py install # py2app $ sudo python setup.py install # lightblue $ sudo python setup.py install # nxt-python-1.1
- Simon Levy's script (bluetooth.py*) must be in the directory that you are running the interpreter in for the Bluetooth interface to work. Update: Release v1.1 appears to have integrated this script into the NXT-Python library.
- For USB support you will need PyUSB, you can download it from its SourceForge site and then install it.
- Once you think all the plumbing is working correctly you can use the query.py script in the CS282 source directory to test it. N.B. Change the BlueTooth ID in query.py to match your NXT.