ICub machines configuration: Difference between revisions

From ISRWiki
Jump to navigation Jump to search
(add link to Archive subpage)
(→‎Environment variables: Ugo's suggested variables (May 2012))
Line 68: Line 68:
* Create a file called ~/.bash_env (used by both interactive and non-interactive sessions, such as commands launched via <code>yarprun</code> from another machine) like this one:
* Create a file called ~/.bash_env (used by both interactive and non-interactive sessions, such as commands launched via <code>yarprun</code> from another machine) like this one:


   export YARP_ROOT=/home/icub/yarp2
   export code=/usr/local/src/robot
  export YARP_ROOT=$code/yarp2
   export YARP_DIR=$YARP_ROOT/build
   export YARP_DIR=$YARP_ROOT/build
   export ICUB_ROOT=/home/icub/iCub
   export ICUB_ROOT=$code/iCub
   export ICUB_DIR=$ICUB_ROOT/main/build
   export ICUB_DIR=$ICUB_ROOT/main/build
   export PATH=$PATH:$YARP_DIR/bin:$ICUB_DIR/bin
   export PATH=$PATH:$YARP_DIR/bin:$ICUB_DIR/bin
   export ICUB_ROBOTNAME=iCubLisboa01 # only for machines that connect to the real robot
   export ICUB_ROBOTNAME=iCubLisboa01 # only for machines that connect to the real robot
   export IPOPT_DIR=/home/icub/Ipopt-3.10.0 # only for servers (IK solver)
   export IPOPT_DIR=/home/icub/Ipopt-3.10.2/build # only for servers (IK solver)
  export OpenCV_DIR=$code/OpenCV-2.4.0/build # manually installed OpenCV with TBB support
   source $YARP_ROOT/scripts/yarp_completion   
   source $YARP_ROOT/scripts/yarp_completion   



Revision as of 11:46, 31 May 2012

In this page we will list configurations that are commonplace to machines used at Vislab, particularly Linux machines that work with the iCub robot.

See VisLab machines configuration/Archive for obsolete information and environment variables. You can safely ignore this.

Operating system installation

Nothing fancy here - follow Ubuntu defaults and partitioning. For servers, use LTS releases. Machines involved in demos must have a user named 'icub', called by the graphical Application Manager.

Operations after first boot

  • choose Main server (rather than Portugal server, which is not always reliable) as the software repository:
    • on desktop machines, System -> Administration -> Synaptic Package Manager -> Settings -> Repositories -> Download from: Main server
    • on server machines, remove all the "pt." strings from /etc/apt/sources.list with the following command: sudo sed -i 's/pt.//g' sources.list
  • update packages:
    • either with Ubuntu graphical frontends
    • or from a Terminal: sudo apt-get update; sudo apt-get upgrade
  • add 'icub' user if not done already:
    • either with Ubuntu graphical frontends
    • or from a Terminal: sudo adduser icub followed by sudo usermod -aG admin icub to give it sudo privileges

Other operations

Network configuration

See also: VisLab network, ISR computing resources.

Manually configure your internet connection as detailed in one of the following subsections, depending if the machine is a desktop or a server one.

Optionally, you may also customize the /etc/hosts file like we did on Chico3; this would allow us to quickly access other machines, as in: ping cortex1. Alternatively, we can do nothing and just use ping cortex1.visnet (i.e., attach the .visnet part after a machine name, see VisLab network for details).

Desktop machines

With the graphical Network Manager (https://help.ubuntu.com/10.04/internet/C/connecting-wired.html), configure the connection "Auto eth0" IPv4 as follows:

Address Netmask Gateway DNS Servers notes
10.10.1.x 255.255.255.0 10.10.1.254 10.0.0.1, 10.0.0.2 for iCub machines
10.0.x.y 255.255.0.0 10.0.0.254 10.0.0.1, 10.0.0.2 for the rest of ISR

Servers

Edit /etc/network/interfaces like this:

  auto lo
  iface lo inet loopback
  
  auto eth0
  iface eth0 inet static
  address 10.x.y.z # put your IP here, see above table
  netmask 255.255.x.y # see above table
  network 10.10.1.0
  broadcast 10.10.1.255
  gateway 10.10.1.254

Edit /etc/resolv.conf like this:

  nameserver 10.0.0.1
  nameserver 10.0.0.2

Essential packages

  sudo apt-get install gcc g++ make subversion ssh libace-dev libgsl0-dev libncurses5-dev gfortran cmake-curses-gui

Environment variables

  • Create a file called ~/.bash_env (used by both interactive and non-interactive sessions, such as commands launched via yarprun from another machine) like this one:
 export code=/usr/local/src/robot
 export YARP_ROOT=$code/yarp2
 export YARP_DIR=$YARP_ROOT/build
 export ICUB_ROOT=$code/iCub
 export ICUB_DIR=$ICUB_ROOT/main/build
 export PATH=$PATH:$YARP_DIR/bin:$ICUB_DIR/bin
 export ICUB_ROBOTNAME=iCubLisboa01 # only for machines that connect to the real robot
 export IPOPT_DIR=/home/icub/Ipopt-3.10.2/build # only for servers (IK solver)
 export OpenCV_DIR=$code/OpenCV-2.4.0/build # manually installed OpenCV with TBB support
 source $YARP_ROOT/scripts/yarp_completion  
  • 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

Subversion

For security, uncomment (thus enabling) the following parameter in /etc/subversion/config:

 store-passwords = no

This implies that SVN will ask you for your password every time you do a commit, as opposed to storing it in plain text on the system. (Don't worry about changing your personal ~/.subversion/config file: the parameter is not actually set there, so the global /etc setting is used.)

Additional software

OpenCV

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

YARP and iCub

Follow the instructions on the RobotCub software article. For compilation on servers, do not use sudo make install but simply make (we have configured the PATH variable to find the latest compiled binaries, and we do not want two copies of the same thing on the system).

  • usual yarp2 CMake flags
 CMAKE_BUILD_TYPE Release
 CREATE_LIB_MATH
  • usual iCub CMake flags
 CMAKE_BUILD_TYPE Release

Special machines such as pc104 or robot computation servers need additional flags. In addition, machines that work with the physical robot need the following setup:

  1. yarp namespace /icub
  2. in order to find the yarpserver running on chico3, write 10.10.1.53 10000 into the file specified by yarp conf