Difference between revisions of "ICub laptop installation instructions for old releases"

From Wiki for iCub and Friends
Jump to: navigation, search
Line 1: Line 1:
Place here instructions for installing the pc104 laptop.
+
This page contains guidelines for installation of the iCub server so that it matches the requirements of the Linux on the pc104 (open call configuration).
  
LAPTOP CONFIGURATION
+
We assume you have installed a working Debian or Ubuntu on the laptop.
  
*enable icub user as sudoers
+
== Software Repository ==
edit /etc/sudoers and add
+
 
    icub ALL=(ALL) ALL
+
At the end of the boot the pc104 mounts an nfs share from the laptop. In addition the laptop exports a separate repository for other machines (and itself).
 +
 
 +
For this to work you need:
 +
 
 +
* install nfs server on the laptop:
 +
  sudo apt-get install nfs-kernel-server nfs-common portmap
 +
* creates the directory the directories that will be exported:
 +
 
 +
  mkdir /exports/code-64
 +
  mkdir /exports/code-pc104
 +
 
 +
Respectively for the laptop/other machines and the pc104.
 +
 
 +
Set appropriate permissions to the icub user:
 +
 
 +
    sudo chown icub:icub -R /exports/code-pc-104
 +
    sudo chown icub:icub -R /exports/code-64
 +
 
 +
* Now configure the nfs-server to export these directories:
  
*mounting point
+
Add these lines to /etc/exports:
edit /etc/fstab and add:
 
    /exports/code-64  /usr/local/src/robot  none bind
 
  
*enable NAT and port forwarding (using wlan0 as external network interface)  
+
/exports/code-64 10.0.0.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_check)
 +
/exports/code-pc104 10.0.0.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_check)
  
add these line in /etc/rc.local:
+
You might need to restart the nfs server.
  
    iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
+
  /etc/init.d/nfs-sever restart
    echo 1 > /proc/sys/net/ipv4/ip_forward
 
  
*install ssh key
+
Or just reboot the machine.
as icub:
 
  
    ssh -keygen - t dsa
+
* Now configure the laptop to mount /exports/code-64 to /usr/local/src/robot
    cp /home/icub/.ssh/id_rsa.pub /exports/code-pc104/pc104/hooks/keys/authorized_keys
 
    cp /home/icub/.ssh/id_rsa.pub /home/icub/ssh
 
  
*install nfs:
+
Edit /etc/fstab and add:
 +
    /exports/code-64  /usr/local/src/robot  none bind
  
    sudo apt-get install nfs-kernel-server nfs-common portmap
+
  Reboot or type
 +
 
 +
  sudo mount -a
  
put these lines in /etc/exports:
 
  
    /exports/code-64 10.0.0.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_check)
+
* Install ssh key
    /exports/code-pc104 10.0.0.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_check)
 
  
give permission of code-pc104 folder to icub:
+
  Log in as icub:
  
    sudo chown icub:icub -R /exports/code-pc-104
+
    ssh -keygen - t dsa
 +
    cp /home/icub/.ssh/id_rsa.pub /exports/code-pc104/pc104/hooks/keys/authorized_keys
 +
    cp /home/icub/.ssh/id_rsa.pub /home/icub/ssh
  
*configure bashrc
+
* Configure bashrc. Add these lines in /home/icub/.bashrc:
add these lines in /home/icub/.bashrc:
 
  
 
     export ICUB_ROOT=/usr/local/src/robot/iCub
 
     export ICUB_ROOT=/usr/local/src/robot/iCub
Line 45: Line 60:
 
     export YARP_ROOT=/usr/local/src/robot/yarp2
 
     export YARP_ROOT=/usr/local/src/robot/yarp2
 
     export YARP_DIR=$YARP_ROOT
 
     export YARP_DIR=$YARP_ROOT
     export ICUB_ROBOTNAME=iCubAberystwyth01
+
     export ICUB_ROBOTNAME=NAME_OF_YOUR_ROBOT (e.g. iCubAberystwyth01)
 
     export PATH=$PATH:$ICUB_DIR/bin:$YARP_DIR/bin
 
     export PATH=$PATH:$ICUB_DIR/bin:$YARP_DIR/bin
 +
 +
== Other configurations ==
 +
 +
* It is handy to enable icub user to the sudoers
 +
edit /etc/sudoers and add
 +
    icub  ALL=(ALL) ALL
 +
 +
* Enable NAT and port forwarding so that the pc104 (and other machines on the network) have internet access (using wlan0 as external network interface)
 +
 +
Add these line in /etc/rc.local:
 +
 +
    iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
 +
    echo 1 > /proc/sys/net/ipv4/ip_forward
 +
 +
== Code installation ==
 +
 +
Now you can install YARP and the iCub software both on the laptop and on the pc104. Instructions are very similar, so we report only quick informations about the pc104.
 +
 +
Boot the pc104, login as icub. Checkout the code on /usr/local/src/robot. At the end you should have yarp and iCub directories. Compile following the instructions on the Manual.

Revision as of 22:44, 23 September 2010

This page contains guidelines for installation of the iCub server so that it matches the requirements of the Linux on the pc104 (open call configuration).

We assume you have installed a working Debian or Ubuntu on the laptop.

Software Repository

At the end of the boot the pc104 mounts an nfs share from the laptop. In addition the laptop exports a separate repository for other machines (and itself).

For this to work you need:

  • install nfs server on the laptop:
 sudo apt-get install nfs-kernel-server nfs-common portmap
  • creates the directory the directories that will be exported:
 mkdir /exports/code-64
 mkdir /exports/code-pc104

Respectively for the laptop/other machines and the pc104.

Set appropriate permissions to the icub user:

   sudo chown icub:icub -R /exports/code-pc-104
   sudo chown icub:icub -R /exports/code-64
  • Now configure the nfs-server to export these directories:
Add these lines to /etc/exports:
/exports/code-64 10.0.0.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_check)
/exports/code-pc104 10.0.0.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_check)

You might need to restart the nfs server.

 /etc/init.d/nfs-sever restart 

Or just reboot the machine.

  • Now configure the laptop to mount /exports/code-64 to /usr/local/src/robot

Edit /etc/fstab and add:

    /exports/code-64   /usr/local/src/robot  none bind
 Reboot or type 
 
 sudo mount -a 


  • Install ssh key
 Log in as icub:
    ssh -keygen - t dsa
    cp /home/icub/.ssh/id_rsa.pub /exports/code-pc104/pc104/hooks/keys/authorized_keys 
    cp /home/icub/.ssh/id_rsa.pub /home/icub/ssh
  • Configure bashrc. Add these lines in /home/icub/.bashrc:
   export ICUB_ROOT=/usr/local/src/robot/iCub
   export ICUB_DIR=$ICUB_ROOT/main/build
   export YARP_ROOT=/usr/local/src/robot/yarp2
   export YARP_DIR=$YARP_ROOT
   export ICUB_ROBOTNAME=NAME_OF_YOUR_ROBOT (e.g. iCubAberystwyth01)
   export PATH=$PATH:$ICUB_DIR/bin:$YARP_DIR/bin

Other configurations

  • It is handy to enable icub user to the sudoers

edit /etc/sudoers and add

    icub  ALL=(ALL) ALL
  • Enable NAT and port forwarding so that the pc104 (and other machines on the network) have internet access (using wlan0 as external network interface)

Add these line in /etc/rc.local:

    iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
    echo 1 > /proc/sys/net/ipv4/ip_forward

Code installation

Now you can install YARP and the iCub software both on the laptop and on the pc104. Instructions are very similar, so we report only quick informations about the pc104.

Boot the pc104, login as icub. Checkout the code on /usr/local/src/robot. At the end you should have yarp and iCub directories. Compile following the instructions on the Manual.