Difference between revisions of "UPMC iCub project/XDE-simulator-dev"

From Wiki for iCub and Friends
Jump to: navigation, search
Line 15: Line 15:
 
'''Dependencies''':
 
'''Dependencies''':
 
* System dependencies
 
* System dependencies
 +
The basics for XDE-core
 
<code>
 
<code>
 
sudo apt-get install libeigen3-dev g++ python-dev cmake git
 
sudo apt-get install libeigen3-dev g++ python-dev cmake git
 
</code>
 
</code>
 +
These are necessary for XDE-ISIR modules
 +
<code>
 +
sudo apt-get install swig python-matplotlib
 +
</code>
 +
 
* [[UPMC iCub project/XDE-simulator|XDE: installation]]
 
* [[UPMC iCub project/XDE-simulator|XDE: installation]]
 
* [[UPMC iCub project/Installing ORC|ORC: installation]]
 
* [[UPMC iCub project/Installing ORC|ORC: installation]]
Line 27: Line 33:
 
You will need to retrieve some modules from the github repository https://github.com/xde-isir
 
You will need to retrieve some modules from the github repository https://github.com/xde-isir
 
Create a folder, for example xde-isir, where you can put all he modules. Each will be compiled separately.
 
Create a folder, for example xde-isir, where you can put all he modules. Each will be compiled separately.
   mkdir /home/icub/software/src/xde-isir
+
   cd /home/icub/software/src/xde-isir
 
   git clone https://github.com/XDE-ISIR/XDE-Observers.git
 
   git clone https://github.com/XDE-ISIR/XDE-Observers.git
 
   git clone https://github.com/XDE-ISIR/XDE-DocPythonAPI.git
 
   git clone https://github.com/XDE-ISIR/XDE-DocPythonAPI.git
Line 43: Line 49:
  
  
 +
== Installation ==
 +
 +
=== Linux ===
 +
 +
* XDE-Core
 +
Go in the folder where you have put xde-core, for example
 +
  cd /home/icub/software/src/xde-core
 +
and install the package:
 +
  dpkg -i xdecore_3.99.5.0_amd64.deb
 +
Check that LGSM library is included, this
 +
  pkg-config --cflags eigen3
 +
should return
 +
  -I/usr/include/eigen3 -I/usr/include/eigen3/unsupported
 +
If this is not the case, then you need to copy or modify the file eigen3.pc in your $PKG_CONFIG_PATH.
 +
Install the developer package:
 +
    sudo dpkg -i --force-all  xdecore-dev_3.99.5.0_amd64.deb
 +
Now you have to create a file xdecore.pc and put it your $PKG_CONFIG_PATH.
 +
In my case, $PKG_CONFIG_PATH=/home/icub/software/lib/pkgconfig.
 +
    cd $PKG_CONFIG_PATH
 +
    touch xdecore.pc
 +
Copy-paste this into the file:
 +
<code>
 +
prefix=/usr
 +
libdir=${prefix}/lib
 +
includedir=${prefix}/include/xdecore
 +
 +
Name: xdecore
 +
Description: XDE core library
 +
Version: 3.99.5.0
 +
Requires: eigen3
 +
Libs: -L${libdir} -lXDECore
 +
Cflags: -I${includedir}
 +
</code>
 +
 +
 +
* XDE-ISIR modules
 +
Now these modules have to be compiled one by one, and in some cases in a different way.
 +
 +
 +
Some documentation can be built by:
 +
  cd xde-isir
 +
  cd XDE-DocExamples
 +
  make html
 +
which will create a browsable html documentation in build/html. In source/examples you can find some examples with scripts.
  
  

Revision as of 22:03, 13 November 2013

If you want to develop robot controllers in XDE, you may need to prepare your machine by installing two further components: XDE-core, which is a set of development files of XDE used for developers, and ORC. XDE-core is, as XDE, not open-source.

Once you have XDE-core and ORC, you can install the modules developed in ISIR for developing controllers in XDE. In this case the code can be downloaded on github.

Preparation

Linux

We hereby assume you have Ubuntu 12.04.

Dependencies:

  • System dependencies

The basics for XDE-core sudo apt-get install libeigen3-dev g++ python-dev cmake git These are necessary for XDE-ISIR modules sudo apt-get install swig python-matplotlib

  • XDE-core

To retrieve the last developers packages, ask Sovannara Hak.

  • XDE-ISIR modules

You will need to retrieve some modules from the github repository https://github.com/xde-isir Create a folder, for example xde-isir, where you can put all he modules. Each will be compiled separately.

  cd /home/icub/software/src/xde-isir
  git clone https://github.com/XDE-ISIR/XDE-Observers.git
  git clone https://github.com/XDE-ISIR/XDE-DocPythonAPI.git
  git clone https://github.com/XDE-ISIR/demo-spacemouse.git
  git clone https://github.com/XDE-ISIR/XDE-ZMPy.git
  git clone https://github.com/XDE-ISIR/RTEKukaFRIClient.git
  git clone https://github.com/XDE-ISIR/orocos_toolchain_xde.git
  git clone https://github.com/XDE-ISIR/XDE-Resources.git
  git clone https://github.com/XDE-ISIR/XDE-ISIRController.git 
  git clone https://github.com/XDE-ISIR/XDE-RobotLoader.git
  git clone https://github.com/XDE-ISIR/XDE-WorldManager.git
  git clone https://github.com/XDE-ISIR/XDE-Spacemouse.git
  git clone https://github.com/XDE-ISIR/XDE-ISIR.git
  git clone https://github.com/XDE-ISIR/XDE-DocExamples.git


Installation

Linux

  • XDE-Core

Go in the folder where you have put xde-core, for example

  cd /home/icub/software/src/xde-core

and install the package:

  dpkg -i xdecore_3.99.5.0_amd64.deb

Check that LGSM library is included, this

  pkg-config --cflags eigen3

should return

  -I/usr/include/eigen3 -I/usr/include/eigen3/unsupported

If this is not the case, then you need to copy or modify the file eigen3.pc in your $PKG_CONFIG_PATH. Install the developer package:

   sudo dpkg -i --force-all  xdecore-dev_3.99.5.0_amd64.deb

Now you have to create a file xdecore.pc and put it your $PKG_CONFIG_PATH. In my case, $PKG_CONFIG_PATH=/home/icub/software/lib/pkgconfig.

   cd $PKG_CONFIG_PATH
   touch xdecore.pc

Copy-paste this into the file: prefix=/usr libdir=${prefix}/lib includedir=${prefix}/include/xdecore

Name: xdecore Description: XDE core library Version: 3.99.5.0 Requires: eigen3 Libs: -L${libdir} -lXDECore Cflags: -I${includedir}


  • XDE-ISIR modules

Now these modules have to be compiled one by one, and in some cases in a different way.


Some documentation can be built by:

  cd xde-isir
  cd XDE-DocExamples
  make html

which will create a browsable html documentation in build/html. In source/examples you can find some examples with scripts.


Usage

Linux

The general way to run scripts in XDE is

  runxde.sh my_script.py

If you installed XDE correctly, you should be able to have runxde.sh in the PATH (so you can use the autocompletion in your terminal).