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..
12 replies on “How To: Install Pyrobot in Ubuntu”
Hello, you can help me to install pyrobot in Windows 7?
Thanks in advance!
Sorry I have no experience installing under Windows 7, the official instructions are here: http://pyrorobotics.org/?page=PyroInstallation
Otherwise it might be an idea to try using the Live CD (http://pyrorobotics.org/?page=PyroLiveCD) but again I have not used this.
But how is pyrobot formed?
Hey protroll, this link might help – http://bit.ly/eBgjGY
I followed your tutorial for a 64bit Ubuntu install but it still doesn’t work right… When I used “source ~/.bashrc” it said that “export: command not found”. Now after rebooting my computer, the terminal has that message at the top. Any ideas?
Nevermind, it turns out that the last line of ~/.bashrc had an apostrophe before the export command.
However, I still can’t start pyrobot from the terminal (after finishing the tutorial). I didn’t receive any errors when I ran “sudo chmod -R 777 ~/pyrobot” so I don’t know why it isn’t working. When I run “pyrobot” in the terminal, it tells me that the command was not found.
Try running it from ~/pyrobot/bin/./pyrobot to see if that is working correctly, if so it’s something to do with the bashrc file rather than the install which is good. If it doesn’t work like that, please post the output, otherwise check you have the following line (export PATH=${PATH}:/home/YOURUSERNAMEHERE/pyrobot/bin) at the bottom of your bashrc file (gedit ~/.bashrc)
Works great Alex, thanks!
Hello Alex, do you still have the installation script somewhere? The above link 404s.
Thank you anyway for the guide, it’s quite the help.
Hi;
please, i wanna know if the pyrobot simulator is a multirobots sim, or it’s developed to simulate one robot
thanks
for me, it didn’t work untill follow these steps:
cd pyrobot/bin
python pyrobot
Hi,
I installed pyrobot succesfully at /home/klaas/pyrobot.
It runs fine.
Now I want to develop robotcode for my own robot.
Do this using PyCharm but
it will not import like: from pyrobot import Robot
pyrobot is unresolved
what can I do
klaas