ICubBrain: Difference between revisions

From ISRWiki
Jump to navigation Jump to search
Line 126: Line 126:
   sudo apt-get install libcv-dev libhighgui-dev libcvaux-dev
   sudo apt-get install libcv-dev libhighgui-dev libcvaux-dev


=== iCub: downloading the repository ===
=== YARP and iCub ===


In /home/icub, do:
Follow the instructions on the [[RobotCub software]] article.
  cvs -d vislab@cvs.robotcub.org:/cvsroot/robotcub co iCub
 
IMPORTANT NOTE: BY MID DECEMBER 2009 ICUB REPOSITORY WAS MOVED TO SVN. THE OLD CVS REPOSITORY HAS BEEN BACKED UP TO FOLDER ICUB_CVS AND NO LONGER BEING USED. THE COMMANDS ISSUED TO GET THE NEW SVN REPOSITORY WERE:
  svn co https://robotcub.svn.sourceforge.net/svnroot/robotcub/trunk/iCub
 
 
For now, don't compile iCub but start installing YARP instead. ''(This is the most general approach which always works. However, since this machine does not have special iCub hardware to be found by YARP, like in the case of the PC104, then in this case we could've probably compiled straight ahead.)''
 
=== YARP ===
 
* Type this from the homedir (/home/icub):
  cvs -d:pserver:anonymous@yarp0.cvs.sourceforge.net:/cvsroot/yarp0 login
  cvs -z3 -d:pserver:anonymous@yarp0.cvs.sourceforge.net:/cvsroot/yarp0 co -P yarp2
  cd yarp2
 
IMPORTANT NOTE: BY MID DECEMBER 2009 YARP REPOSITORY WAS MOVED TO SVN. THE OLD CVS REPOSITORY HAS BEEN BACKED UP TO FOLDER YARP2_CVS AND NO LONGER BEING USED. THE COMMANDS ISSUED TO GET THE NEW SVN REPOSITORY WERE:
  svn co https://yarp0.svn.sourceforge.net/svnroot/yarp0/trunk/yarp2
    
    
 
* Custom yarp2 configuration
* Proceed with the configuration and compilation:
   ccmake .
   ccmake .
Click 'c' when CMake starts, then enable:
Click 'c' when CMake starts, then enable:
Line 158: Line 140:
   make
   make
   make test
   make test
   sudo make install
   sudo make install <-- decide whether this is good or not
 
=== iCub: compiling and installing ===
 
* Off we go:
  cd /home/icub/iCub
  ccmake .
  c  ''<-- whenever necessary''


* Enable these modules:
* Custom iCub configuration
   BUILD_IN_ROOT  ''<-- it is already ON, most likely''
   BUILD_IN_ROOT  ''<-- it is already ON, most likely''
''(I don't think we need more modules here. Right?)''


* And finally:
  g
   make
   make
   sudo make install
   sudo make install <-- decide whether this is good or not


=== Final configuration ===
=== Final configuration ===

Revision as of 15:48, 19 November 2010

In June 2009, we purchased "1U Twin" servers that are to be used as iCub Brain (hence the name). The box includes a SC808T-980 1U chassis and two twin X7DWT serverboards. Each of the two boards hosts an Intel Xeon 8-core processor (8 x E5405 @ 2.00 GHz). They are two independent computers, each one with its hard disk, power button, reset button.

For full system specifications, go here (PDF) or on the entry on tsunami.pt

Current setup

machine location operating system notes
icubbrain1 left half of chassis Ubuntu 10.04 LTS 64bit
  • has IPOPT 3.8.1 (manual installation)
  • graphical system (xorg icewm) and OpenGL development packages installed (libglew15-dev libglut-dev libxmn-dev)
icubbrain2 right half of chassis Ubuntu 10.04 LTS 32bit has IPOPT 3.5.5 (precompiled version from the last link of this page)

Operating system installation

The chassis contains two separate machines, each one having two hard disk drive drawers. Next, we will explain how we configured the left part of the server, called icubbrain1. The settings for icubbrain2 will be just about the same (unless otherwise noted, see above table), with the last octet of the IP address being 42 instead of 41.

Boot

We booted the Ubuntu Server CD from an external USB CD drive without problems. We then had to manually confirm the usage of a 'cdrom' module within the installation (following all the default selections).

Network interface

icubbrain1 has two Gbit interfaces. First we plugged an Ethernet cable into the first one (which turns on the "1" led in the chassis front). Then, when Ubuntu asked us to choose between eth0 and eth1, we picked up eth0.

Partitions

We chose the 'Guided - use entire disk' option, which yielded the following:

Hard disk partitioning
size mountpoint filesystem
133GB / ext3
5GB swap

Ubuntu installation parameters

  • machine name: icubbrain1
  • user name: icub
  • software selection: OpenSSH

Operations after first boot

  • choose Main server (rather than Portugal server, which is incomplete) as the software repository. We do this by removing all the "pt." strings from /etc/apt/sources.list
  • sudo apt-get update; sudo apt-get upgrade

Other operations performed

Network configuration

  • manually configured the internet connection (/etc/network/interfaces):
  auto lo
  iface lo inet loopback
  
  auto eth0
  iface eth0 inet static
  address 10.10.1.41
  netmask 255.255.255.0
  network 10.10.1.0
  broadcast 10.10.1.255
  gateway 10.10.1.254
  • added the following lines to /etc/hosts, to enable running commands like: ping cortex1. Note: this is not necessary anymore, see VisLab network
  10.10.1.50	pc104
  10.10.1.51	icubsrv
  10.10.1.52	chico2
  10.10.1.53	chico3
  10.10.1.1	cortex1
  10.10.1.2	cortex2
  10.10.1.3	cortex3
  10.10.1.4	cortex4
  10.10.1.5	cortex5
  10.10.1.41	icubbrain1
  10.10.1.42	icubbrain2

Additional packages and environment variables

  • Install some required packages:
  sudo apt-get install gcc g++ make cmake cvs subversion ssh libace-dev libgsl0-dev libncurses5-dev gfortran
  • Create a file called ~/.bash_env (used by non-interactive sessions, namely commands launched via yarprun from another machine) containing these lines:
  export ICUB_DIR=/home/icub/iCub
  export ICUB_ROOT=$ICUB_DIR
  export YARP_DIR=/home/icub/yarp2
  export YARP_ROOT=$YARP_DIR
  export PATH=$PATH:$ICUB_DIR/bin
  export PATH=$PATH:$YARP_DIR/bin
  export ICUB_ROBOTNAME=iCubLisboa01

and one of these two:

  export IPOPT_DIR=/home/icub/Ipopt-3.6.1    // for icubbrain1 (manual compilation -- TO BE FIXED: TRY v3.6.0)
  export IPOPT_DIR=/opt/Ipopt-3.5.5-linux-x86_32-gcc4.2.4   // for icubbrain2 (pre-compiled 32 bit binaries)
  • Copy all that stuff at the bottom of ~/.bashrc, too. Note: this step is redundant, don't do it
  cat ~/.bash_env >> ~/.bashrc
  • Then, before the following line of /etc/bash.bashrc
  [ -z "$PS1" ] && return

add this:

  # per-user environment variables (non-interactive and interactive mode)
  source $HOME/.bash_env

Additional RobotCub software

OpenCV

Ubuntu prepackaged version 1:

  sudo apt-get install libcv-dev libhighgui-dev libcvaux-dev

YARP and iCub

Follow the instructions on the RobotCub software article.

  • Custom yarp2 configuration
  ccmake .

Click 'c' when CMake starts, then enable:

  CREATE_DEVICE_LIBRARY_MODULES
  CREATE_LIB_MATH

Click 'c' again, then choose

  ENABLE_yarpmod_opencv_grabber

Click 'c' a couple of times more, until nothing happens when you do it. Now hit 'g': generate and quit.

  make
  make test
  sudo make install <-- decide whether this is good or not
  • Custom iCub configuration
  BUILD_IN_ROOT   <-- it is already ON, most likely
  make
  sudo make install <-- decide whether this is good or not

Final configuration

  yarp namespace /icub

Additional software

Matlab2010a is installed on icubbrain1. The installation of libXp6 was required, it was performed executing the following command.

  sudo apt-get install libxp6