Zhi YAN (Web Page) is a new postdoc in our team since september, 15th 2013. He will work 12 months on our CAIRE project. Today, Zhi presented us some of its work during its PhD.

Presentation title: Tasks and motion planning for multi-robot systems

Summary: This presentation focuses on the issue of multi-robot coordination from the standpoint of planning, which contains task planning and motion planning.
Two new approaches are proposed for the task planning. The first one is a decentralized approach based on trading rules. This approach is designed to simulate the relationship between buyers and sellers in a business system, to achieve dynamic task allocation by using a mechanism of unsolicited bid. The second approach is an heuristic one which is based on an empirical model. It is designed to assign the transportation task to individual robots by estimating the production rate of goods in a centralized system.
Two new approaches are proposed for the motion planning. Both are sampling-based approaches, designed to plan separate kinematic paths for multiple robots to minimize the issue of waiting situation including congestion, collision and deadlock, in an effective way in order to improve the system planning efficiency. All these proposed approaches have been tested and evaluated through simulation experiments.

Slides (in French)

Videos

My objective is to have:

  • A virtual image: VirtualBox (preferred), VMWare
  • with Ubuntu: precise? 12.04 (preferred because LTS), quantal 12.10, raring 13.04
  • ROS: Groovy (preferred because latest stable), Hydro (but still unstable), Fuerte (no because no Catkin)
  • MORSE simulator: 1.0 (latest stable), newer

If you don’t want to install it yourself, you can download my VMWare 4.1.4 image of a ROS Groovy on an Ubuntu Quantal 12.10 with MORSE (updated 2013-05-13).

If it works on a newer version of VMWare, please let me know.

Constraints & Incompatible Combinations

I learnt the hard way the multiple incompatible combinations ;-)
Here some constraints:

  • Ubuntu and ROS. You can find here a really good help. So, Groovy works on 12.04 and Quantal (12.10) but not Raring (13.04) which can be used with Hydro.
  • VirtualBox and Ubuntu. The following report on using the latest VirtualBox on OSX 4.2.x :
    • Ubuntu 12.04: no problem but Groovy cannot be installed on top of it.
    • Ubuntu 12.10: it is really slow. It seems to be 3D support problem but I did not succeed to fix it.
    • Ubuntu 13.04: it works perfectly after installing VBox tools and 3D acceleration (cf. here) but Groovy cannot be installed on top of it.
  • ROS and MORSE. MORSE requires Python>=3 but ROS is currently Python 2.7 compliant, even Hydro. However, the MORSE installations notes describes a solution to make install.

Finally I went for:

  • VMWare 4.1.4
  • Ubuntu 12.10
  • ROS Groovy
  • MORSE bleeeding edge

Step 1: Ubuntu Quantal (12.10) on VMWare 4.1.4

It has been straightforward. Steps:

  1. Download Ubuntu iso (ubuntu-12.10-desktop-i386.iso)
  2. Create a VM image in VMWare
  3. Boot on Iso mounted in CD
  4. Install
  5. VMWare Tools should install automatically
  6. Ensure that 3D acceleration checkbox is cheked in the VM preferences
  7. Ensure 3D acceleration is working well by doing in command line:

    /usr/lib/nux/unity_support_test -p

  8. I advise you to do a VM snapshot here ;-)

Step 2: ROS Groovy Installation

Documentation is here.

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu quantal main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install ros-groovy-desktop-full
sudo rosdep init
rosdep update
echo "source /opt/ros/groovy/setup.bash" >> ~/.bashrc
source ~/.bashrc

Test that ROS is working

TODO: Je ne suis plus sûr de cette ligne ;-)
roscheck ?

You can also do the ROS tutorials.

Step 3: MORSE Installation

Documentation is here.
But we must make ROS Python 3 compliant first.

ROS and Python 3

Documentation is here.

Doing sudo apt-get install morse-simulator did not work for me because of Python problems.

Manual installation steps:

  1. Re-install ROS catkin_pkg from sources to make it use Python 3.
  2. git clone git://github.com/ros-infrastructure/catkin_pkg.git -b 0.1.9
    cd catkin_pkg
    sudo python3 setup.py install
    
  3. Re-install ROS catkin from sources to make it use Python 3. However, cloning the regular catkin repository on github did not work for me because of syntax changes in Python 3 (u"xxx" not supported anymore). So I use here my cloned and modified version. However, I advise you to first check if it has been corrected in the official repository.
  4. # slightly modified version of catkin to support Python 3
    git clone git://github.com/LucFabresse/catkin.git
    cd catkin
    sudo python3 setup.py install
    

MORSE real Installation

sudo apt-get install python3-dev    
cd ~
git clone https://github.com/laas/morse.git
cd morse    

# if you want a stable version, just checkout the right branch or skip the next command
git checkout -b 1.0_STABLE -t origin/1.0_STABLE

mkdir build && cd build     

# compile with the support you need. have a look at cmake --help.
cmake -DPYMORSE_SUPPORT=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_ROS_SUPPORT=ON -DPYTHON_EXECUTABLE=`which python3` .. 

sudo make install

You can now test that MORSE is working by executing:

morse check

Step 4: Post-Install

Congrats, if you reached this step, everything is done and you can work.

But I advise you to do a VM snapshot or better a VM clone ;-)

How to Update the Installation

For Ubuntu and ROS:

apt-get update
apt-get upgrade

Be careful, it may install a non Python3-compliant ROS version!

cd ~/morse
git pull
cd build
sudo make install

Use it remotely

You can even use it remotely through ssh -X

Conclusion

That’s all folks.
I hope it saved some time for someone out there.

While working on robots, we needed to work with a sensor that uses a serial communication protocol. However, we also needed UDP sockets to work with other parts of the robot. The problem is:

  • SerialPlugin only work in squeak VM (old VM) and not in the Cog VM
  • UDP sockets only work in Cog VM and not in squeak VM

I decided to take the bull by the horns and modify the Cog VM so that the SerialPlugin works. In this post, I will quickly explain what I did.

1. Get the VM sources

git clone git://gitorious.org/cogvm/blessed.git

I cloned the git repository of Cog. I did not used the svn repository (http://squeakvm.org/svn/squeak/trunk) because the git repository also includes useful scripts. Then, I followed the steps described in the HOWTOBUILD file.

2. Create your own VMMaker image

cd image
PHARO_VM=/Applications/SmalltalkVMs/CogVM.app/Contents/MacOS/CogVM ./newImage.sh

You should specify your own VM path. Then, you can use the generator.image that has loaded the right VMMaker package.

3. Generate C source code from Slang

In the generator.image, a workspace contains a lot of useful snippets. Execute the right one depending on your setup. For me it was:

"Configuration for OSX"
CogCocoaIOSConfig new
addExternalPlugins: #( FT2Plugin );
addInternalPlugins: #( UnixOSProcessPlugin );
"generateForDebug;"
generateSources; generate.

You can analyse the generated C source code in the src/ directory.

4. Compile C code

# as of 10.7 llvm is the default but incompatible compiler
export CC='/usr/bin/gcc-4.2'
export MACOSX_DEPLOYMENT_TARGET=10.5
cd build
sh ../codegen-scripts/extract-commit-info.sh
cmake .
make

5. Check your new VM

In the result/ directory you should find your new VM.

6. Modify VM sources

You can now either modify the C source code (plugins, …) or the Slang code. In my case, I changed a single method in the SerialPlugin class. Then I rebuilt a new modified VM and tested it. I also verified that I worked on the latest version.

Note: In my case, I worked on the VMMaker-oscog branch (Pharo branch?) and not the VMMaker.oscog (Eliot’s branch).

7. Publish your patch

I am not sure that I followed the “right” process in this step. What I did is to fill a bug entry in the Cog bug tracker https://code.google.com/p/cog/issues/list and I attached a .mcz (or .st) file to the bug entry.

Thanks to Igor, Esteban and others who made this process simple.