A quick guide for getting pyrobot running in Ubuntu, I’ve managed to get it running on 32bit and 64bit Ubuntu (10.10) so follow the guide accordingly to whichever architecture you’re using (64bit is about half way down the post).
32-bit
1. Download this file, or copy the below into a file and save it as pyroinstall.sh to your home dir.
#!/bin/sh
currentdir=$(pwd)
sudo apt-get install build-essential python2.6 python2.6-dev python-tk python-numeric libjpeg62-dev libncurses5-dev swig
wget http://pyrorobotics.org/download/pyrobot-latest.tgz
tar -zxvf pyrobot-latest.tgz
cd pyrobot
python configure.py
make
sed -ie 's/-e #!/#!/g' $currentdir/pyrobot/bin/pyrobot
sed -ie 's/-e # /# /g' $currentdir/pyrobot/system/version.py
echo 'export PATH=${PATH}:'$currentdir'/pyrobot/bin' >> $currentdir/.bashrc
Note: The ‘ in the code highlighter I have above won’t work in terminal, there isn’t much I can do about it so you’ll have to re-write it. Also if you’re doing this manually change the “$currentdir” to “~” if you are doing it in your home directory.
2. Make sure this file is in your home directory (e.g /home/alex/pyroinstall.sh) and make it executable:
chmod +x pyroinstall.sh
3. Run the usual way (as super user because it has to install stuff etc):
sudo ./pyroinstall.sh
4. It’ll ask you some questions, below are the answers I used – you can use other configurations if you know what you need. I also put the full output in pastebin ’cause it was bunging up the guide – http://pastebin.com/Kc5jyhja
1. 2.6
2. /usr/include/python2.6
3. /usr/bin/python2.6
4. /etc/X11
5. none
6.01 n
6.02 n
6.03 n
6.04 n
6.05 n
6.06 n
6.07 n
6.08 n
6.09 n
6.10 n
6.11 y
6.12 y
5. Once it’s done reboot or run:
source ~/.bashrc
6. Allow read/write/execute permissions for the pyrobot folder:
sudo chmod -R 777 ~/pyrobot
You should all be done, try typing the following to get it running!
pyrobot
64-bit
In order to get pyrobot running on 64bit, you basically need to add -fPIC to CFLAGS in all the relative Makefiles as explained in this mailing list post – http://www.mail-archive.com/pyro-users@pyrorobotics.org/msg00344.html – Lucky for you I’ve already gone through the effort of doing it and compressed it (download here you won’t need to if you are going to run the script though, it’ll do it for you..).
This script should download the file, configure and make and output the path to the .bashrc file for you (similar to the 32bit one does) so download this file, or copy and paste the script below into a file in your home directory:
#!/bin/sh
currentdir=$(pwd)
sudo apt-get install build-essential python2.6 python2.6-dev python-tk python-numeric libjpeg62-dev libncurses5-dev swig
wget http://dl.dropbox.com/u/307455/pyrobot-5.0.0_64bit.tar
tar -zxvf pyrobot-5.0.0_64bit.tar
cd pyrobot
python configure.py
make
echo 'export PATH=${PATH}:'$currentdir'/pyrobot/bin' >> $currentdir/.bashrc
2. Make sure this file is in your home directory (e.g /home/alex/pyroinstall64.sh) and make it executable:
chmod +x pyroinstall64.sh
3. Run the usual way (as super user because it has to install stuff etc):
sudo ./pyroinstall64.sh
Steps 4. 5. and 6. are the same as above..
Change Default Editor
If you want to change the default editor from emacs to anything else (this will change the default editor used in other terminal applications too..) use the following commands, just change gedit to whatever you’d like (vi, vim, kedit etc):
echo "export EDITOR=/usr/bin/gedit" >> ~/.bashrc
source ~/.bashrc
Any problems leave a comment and I’ll try and help as best as I can..