Chico2 desktop machine configuration: Difference between revisions
(→Network: add chico3 in /etc/hosts) |
m (update links) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
''July 2009 note: this page is obsolete! Chico2 is no longer being used as the machine that manages VisLab demos. Please refer to the following page for more up-to-date configuration information: [[iCub laptop]].'' | |||
== Operating system installation == | == Operating system installation == | ||
Line 54: | Line 56: | ||
10.10.1.4 cortex4 | 10.10.1.4 cortex4 | ||
10.10.1.5 cortex5 | 10.10.1.5 cortex5 | ||
10.10.1.41 icubbrain1 | |||
10.10.1.42 icubbrain2 | |||
=== Additional packages === | === Additional packages === | ||
Line 181: | Line 185: | ||
click on the icon and select the directory where your icons are, typically ~/Pictures/ | click on the icon and select the directory where your icons are, typically ~/Pictures/ | ||
click on open, then select the picture for this particular button | click on open, then select the picture for this particular button | ||
write in the field "command": gnome-terminal --window-with-profile=cortex -e "ssh | write in the field "command": gnome-terminal --window-with-profile=cortex -e "ssh icub@10.10.1.1 -X" | ||
set the name to something like: ssh | set the name to something like: ssh icub@cortex1 | ||
the profile specified (--window-with-profile=cortex) does not exist by default, you need to create it. | the profile specified (--window-with-profile=cortex) does not exist by default, you need to create it. | ||
those profiles are used to give terminals on different machines different colors (e.g. all terminals running in a cortex computer will be blue, terminals local to chico2 will be white, etc.). | those profiles are used to give terminals on different machines different colors (e.g. all terminals running in a cortex computer will be blue, terminals local to chico2 will be white, etc.). | ||
Line 194: | Line 198: | ||
* for the buttons that start nautilus, the file manager, on pc104 and on cortex (once again, all cortex computers share the same disk, so you need only one button for them) you should use these lines of code: | * for the buttons that start nautilus, the file manager, on pc104 and on cortex (once again, all cortex computers share the same disk, so you need only one button for them) you should use these lines of code: | ||
nautilus sftp://icub@10.10.1.50/home/icub/ | nautilus sftp://icub@10.10.1.50/home/icub/ | ||
nautilus sftp:// | nautilus sftp://icub@10.10.1.1/home/demo | ||
and... you're done! | and... you're done! |
Latest revision as of 17:43, 14 November 2014
July 2009 note: this page is obsolete! Chico2 is no longer being used as the machine that manages VisLab demos. Please refer to the following page for more up-to-date configuration information: iCub laptop.
Operating system installation
We installed Ubuntu 8.04 'Hardy Heron' because it is proven to be stable and working well with the latest versions of ACE and YARP (as of May 2009).
Partitions
size | mountpoint | filesystem |
---|---|---|
498GB | / | ext3 |
2GB | swap |
Ubuntu installation parameters
machine name: chico2
user name: icub (don't use vislab user, as for demos yarprun requires all users to be called the same, and pc104 only has a 'icub' user - therefore, always use icub on chico2 too)
Operations after first boot
operations performed after the standard installation
- system update
- enabled nvidia drivers
- removed the package network-manager-gnome.
Other operations performed
Network
- manually configured the internet connection (/etc/network/interfaces):
auto lo iface lo inet loopback auto eth1 iface eth1 inet static address 10.10.1.52 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.
10.10.1.50 pc104 10.10.1.51 icubsrv 10.10.1.52 chico2 10.10.1.53 chico3 <-- this used to be venus' IP; not anymore 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
- install some required packages:
sudo apt-get install libncurses5-dev libace-dev cmake libgsl0-dev libgtk2.0-dev libgtkmm-2.4-dev libglademm-2.4-dev cvs g++ subversion ssh
Additional RobotCub software
OpenCV
Ubuntu prepackaged version 1.0.0-4:
sudo apt-get install libcv1 libcvaux1 libcvaux-dev libcv-dev libhighgui1 libhighgui-dev opencv-doc python-opencv
YARP
mkdir ~/YARP cd ~/YARP 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 ccmake . #click "c" when cmake starts, then enable: #CREATE_DEVICE_LIBRARY_MODULES, CREATE_GUIS, CREATE_LIB_MATH. #click "c" again, then ENABLE_yarpmod_opencv_grabber. #click "c" a couple of times more, until nothing happens when you do it. #then click on "g": generate and quit. make make test sudo make install
Add these lines to /etc/bash.bashrc:
YARP_DIR=/home/icub/YARP/yarp2/ export YARP_DIR YARP_ROOT=$YARP_DIR export YARP_ROOT
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
iCub software
In /home/icub/ do:
cvs -d vislab@cvs.robotcub.org:/cvsroot/robotcub co iCub ccmake . #click "c" when cmake starts, then enable: #CREATE_GUIS_GTK and CREATE_GUIS_GTKMM. #then click on "g": generate and quit. make sudo make install
add these lines to /etc/bash.bashrc:
ICUB_DIR=/home/icub/iCub/ export ICUB_DIR ICUB_ROOT=$ICUB_DIR export ICUB_ROOT
add these lines to ~/.bash_env:
export ICUB_DIR=/home/icub/iCub export ICUB_ROOT=$ICUB_DIR export PATH=$PATH:/home/icub/iCub/bin
comment one line in /etc/bash.bashrc for yarp run to get the correct environment variables through ssh:
#MATTEO: I commented this line as it was probably the source of all evil! # If not running interactively, don't do anything #[ -z "$PS1" ] && return
modify /etc/environment adding the path of the iCub binaries at the end of the PATH line:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/vislab/iCub/bin"
I'm not sure if this takes effect immediately, but after a reboot it does. this enables yarp run to find the binaries.
- create a local version of these configuration files, in $ICUB_DIR/app/default/scripts:
cp config.sh.template config.sh cp config-nodes.sh.template config-nodes.sh #there might be some misspellings in them, beware.
- edit file $ICUB_ROOT/app/default/scripts/config-nodes.sh like this:
NODE_CAMERAS=pc104 NODE_VIEWERS=chico2
More VisLab-specific configuration
- set up passwordless log-in to the Cortex computers:
#generate the public and private keys on this computer. enter empty strings when prompted for various answers. ssh-keygen #the cortex computers (ip addresses 10.10.1.1 to 10.10.1.5) share the same disk, so you need to do the set up only once.
#copy the public key you just generated to cortex1, on the user account you want to use there (e.g. demo). scp /home/vislab/.ssh/id_rsa.pub demo@10.10.1.1: #log in to cortex1 ssh demo@10.10.1.1 #add the public key to the authorized ones cat id_rsa.pub >> ~/.ssh/authorized_keys #remove the id_rsa.pub file and log out from cortex1. rm id_rsa.pub exit exit #log in again to each cortex computer, to check that the process worked and they don't prompt for a password.
- set up passwordless log-in to pc104
pc104 boots from a read-only medium, so you cannot modify permanently its authorized_keys file. pc104, though, mounts a part of icubsrv's hard-disk and then runs some scripts from there (see the pc104 page for reference).
#copy the usual public key to the icubsrv (laptop) scp id_rsa.pub icub@10.10.1.51: #ssh to icubsrv ssh icub@10.10.1.51 #add the key to the authorized ones cat id_rsa.pub >> /exports/code-pc104/pc104/hooks/keys/authorized_keys #rm the id_rsa.pub file rm id_rsa.pub
Restart pc104 and check that you can log in passwordlessly. If you receive an RSA key error because of different pc104 hardware setups (with or without pen), thus different RSA keys, you can use this option:
ssh -o StrictHostKeyChecking=no pc104
Customization of GNOME panel
See Chico2 desktop machine configuration/Archive for obsolete information. Here we report how we actually proceeded.
- add buttons to the panel/bar at the top of the screen, to conveniently open terminals and file managers on remote machines.
the top bar should look something like this when you're done:
pick the images you like and turn them into 48x48pixel gif images (you can use the GIMP for this). example for the button to open the gnome-terminal on cortex1: right click on the panel and select "add to panel" select "custom application launcher" click on the icon and select the directory where your icons are, typically ~/Pictures/ click on open, then select the picture for this particular button write in the field "command": gnome-terminal --window-with-profile=cortex -e "ssh icub@10.10.1.1 -X" set the name to something like: ssh icub@cortex1 the profile specified (--window-with-profile=cortex) does not exist by default, you need to create it. those profiles are used to give terminals on different machines different colors (e.g. all terminals running in a cortex computer will be blue, terminals local to chico2 will be white, etc.). to create the "cortex" profile: open a terminal on, say, cortex1 click on File, select "new profile" and name it "cortex". choose the colors. cortex windows usually are blue with white text, while pc104 windows are yellow with black text.
- note: for pc104 it might be necessary to add a StrictHostKeyChecking=no option argument to ssh (because there are different incompatible keys depending on the pc104 hardware setup, i.e., with or without pen):
gnome-terminal --window-with-profile=pc104 -e "ssh -o StrictHostKeyChecking=no icub@10.10.1.50 -X"
- for the buttons that start nautilus, the file manager, on pc104 and on cortex (once again, all cortex computers share the same disk, so you need only one button for them) you should use these lines of code:
nautilus sftp://icub@10.10.1.50/home/icub/ nautilus sftp://icub@10.10.1.1/home/demo
and... you're done! easy, huh? :-)
if you'd like to, you can set the desktop background to: