MORSE / ROS Installation

Here are the steps I used to install MORSE with ROS support on Ubuntu 12.04 64-bit.

1.) Install ROS Fuerte first:
http://www.ros.org/wiki/ROS/Installation

2.) Get some requisites for building Python:

$ sudo apt-get install libgdbm-dev libreadline-dev

3.) Get Python
(as of 8/21/2012, you should use Python 3.2.2. I had problems with Python 3.2.3, some error messages about urandom missing):
$ mkdir ~/builds && cd ~/builds
$ wget http://www.python.org/ftp/python/3.2.2/Python-3.2.2.tar.bz2
$ tar xvf Python-3.2.2.tar.bz2
$ cd Python-3.2.2

4.) Build Python 3.2.2:

$ ./configure –with-wide-unicode –enable-shared
$ make
$ make test
(ensure that all appropriate tests run)
$ sudo make install

5.) Get Blender
(I untar-ed the blender executable to ~/builds/blender-2.61-linux-glibc27-x86_64/blender. You need to know this to set the $MORSE_BLENDER variable later.)
$ cd ~/builds
$ wget http://download.blender.org/release/Blender2.61/blender-2.61-linux-glibc27-x86_64.tar.bz2
$ tar xvf blender-2.61-linux-glibc27-x86_64.tar.bz2

6.) Get MORSE
(installing to /opt/morse, with ROS support)

$ cd ~/builds
$ git clone https://github.com/laas/morse.git
$ cd morse
$ git checkout -b 0.5_STABLE -t origin/0.5_STABLE
$ mkdir build && cd build

$ cmake -DBUILD_ROS_SUPPORT=ON -DCMAKE_BUILD_TYPE=Release -DPYMORSE_SUPPORT=ON -DCMAKE_INSTALL_PREFIX=/opt/morse ..
$ sudo make install

7.) Add variables to to .bashrc file
#
# MORSE Setup
#
export MORSE_ROOT=/opt/morse
export PATH=/opt/morse/bin:${PATH}
export MORSE_BLENDER=~/builds/blender-2.61-linux-glibc27-x86_64/blender
export PYTHONPATH=/opt/morse/lib/python3.2/site-packages:${PYTHONPATH}

8.) Install rospkg
(make sure to install using python3.2)

$ cd ~/builds
$ git clone git://github.com/ros/rospkg.git
$ cd rospkg
$ sudo python3.2 setup.py install

9.) Install PyYaml
(make sure to install using python3.2)

$ cd ~/builds
$ wget http://pyyaml.org/download/pyyaml/PyYAML-3.10.tar.gz
$ tar xvf PyYAML-3.10.tar.gz
$ cd PyYAML-3.10
$ sudo python3.2 setup.py

9.) Test MORSE
open a new terminal and type:

$ morse check

If successful, the following line will be printed after some other information about your configuration:

* Your environment is correctly setup to run MORSE.

 10.) Test MORSE with ROS

In a terminal start roscore:
$ roscore
In a new terminal, go to…
$ cd ~/builds/morse/examples/scenarii
Start the simulation
$ morse run ros_example.py

MORSE/Blender will start up.  Look for errors in the terminal window.

In another terminal, let’s monitor the gyroscope data coming from the ATRV

$ rostopic echo /ATRV/Gyroscope

If there are Python errors such as “No module named <foo>” it means that your PYTHONPATH probably isn’t setup correctly, or that you didn’t install a required Python library.  Even if you did install the Python library, maybe you only installed it to Python2 locations and not Python3 locations. You can tests these by opening a terminal…

$ python3.2
$ import rospkg
$ import yaml

These shouldn’t return errors.

3 thoughts on “MORSE / ROS Installation

  1. Pingback: MORSE / ROS Installation Notes | Signals

  2. Pingback: sudo python3.2 setup.py :no commands supplied | BlogoSfera

  3. Pingback: MORSE installation | HCI and AI topics

Comments are closed.