Home    About me    Publications    Blog    Undergrad memories

Fabio Ruini's blog

'cause Italians blog better

Archivio per aprile, 2012

iCub simulator on Mac OS X Lion: the definitive (?) tutorial

This tutorial will describe the various steps required to install YARP and the iCub robot simulator on a 64-bit computer running Mac OS X Lion.

Install GCC and homebrew

  • Make sure your Mac is running the latest version of OS X Lion (currently 10.7.3)
  • Install Xcode from the Mac App Store (the current version is 4.3.2)
  • Open Xcode and install the Command Line Tools, going to Preferences (cmd+,) -> Downloads -> Command Line Tools -> Install
  • Download and install homebrew issuing the following command in a Terminal window: /usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
  • Run brew doctor to check whether homebrew is fully functioning already. If not, please follow the instructions provided (most of the time you will simply have to launch a command like sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer)

Install YARP via homebrew

  • Run the brew install yarp command (other than YARP this will also automatically install several dependencies as ACE and CMake)

Compile and install ODE from the sources

  • Download the ODE sources (version 0.12) and extract the archive somewhere on your computer (we will refer to this location as $ODE_DIR)
  • Download premake4 and unzip the binary into $ODE_DIR/build
  • Download Code::Blocks and install it on your machine
  • Enter $ODE_DIR (cd $ODE_DIR) and generate a Code::Blocks project for ODE using the command ./premake4 --platform=x64 --os=macosx --no-alloca --all-collis-libs --cc=gcc codeblocks
  • Open $ODE_DIR/build/ode.cdb in Code::Blocks, select as build target “ReleaseDoubleLib|x64” and build everything
  • Copy the $ODE_DIR/include/ode folder to /usr/local/include/
  • Rename $ODE_DIR/libode_double.a to $ODE_DIR/libode.a and copy it to /usr/local/lib/

Compile and install SDL from the sources

  • Download the SDL sources (version 1.2.15), extract the archive somewhere on your computer (we will refer to this location as $SDL_DIR)
  • Install the autoconf tools running: brew install autoconf
  • Pre-configure, compile and install SDL running the following commands in sequence:
    • cd $SDL_DIR
    • ./autogen.sh
    • ./configure --disable-assembly
    • make
    • sudo make install
  • Copy SDLMain.h and SDLMain.m from $SDL_DIR/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/ to /usr/local/include/SDL/

Install the iCub simulator

  • Install the Gtk+ C++ interface gtkmm running: brew install gtkmm
  • Create a directory on your machine which will host the sources of the iCub simulator (we will refer to this location as $ICUB_REPOSITORY)
  • Enter $ICUB_REPOSITORY and download the latest version of the iCub simulator via SVN, running the command: #svn co https://robotcub.svn.sourceforge.net/svnroot/robotcub/trunk/iCub
  • Setup some environment variables adding the following lines to your ~/.profile file (replace $ICUB_REPOSITORY with the path of the directory created two steps above):
    • export ICUB_ROOT="$ICUB_REPOSITORY/iCub"
    • export ICUB_DIR="$ICUB_REPOSITORY/iCub/main/build"
  • Close and re-open the Terminal for the changes to the environment variables to be applied;
  • Run: mkdir $ICUB_DIR
  • Enter $ICUB_DIR (cd $ICUB_DIR) and run: ccmake ..
  • Configure the project (‘c‘ key) a few times, setting CMAKE_BUILD_TYPE to “Release” and USE_ODE_DOUBLE to “ON“. When it becomes available, press ‘g‘ to generate a Makefile and exit CMake
  • Compile the iCub simulator running the make command and install it with: sudo make install
  • Install the support applications running: sudo make install_applications
  • Enjoy! :)

Troubleshooting (compile and install YARP from the sources)

Many things might go wrong following the procedure outlined in this tutorial. One of the most common issues in which you could incur consists in the iCub simulator complaining about an incompatible version of YARP installed on your system. If this the case (and you have installed YARP on your computer via homebrew) you will have to download from the SVN the latest version of YARP and compile it by hand. The procedure for doing that is quite straightforward:

  • Uninstall the homebrew version of YARP running: brew uninstall yarp
  • Enter $ICUB_REPOSITORY and download the latest version of YARP via SVN, running the command: svn co https://yarp0.svn.sourceforge.net/svnroot/yarp0/trunk/yarp2
  • Add two new environment variables to your ~/.profile file:
    • export YARP_ROOT="$ICUB_REPOSITORY/yarp2"
    • export YARP_DIR="$ICUB_REPOSITORY/yarp2/build"
  • Close and re-open the Terminal for the changes to the environment variables to be applied;
  • Run: mkdir $YARP_DIR
  • Enter $YARP_DIR (cd $YARP_DIR) and run: ccmake ..
  • Configure the project (‘c‘ key) a few times, setting CMAKE_BUILD_TYPE to “Release, CREATE_GUIS to “ON“, CREATE_LIB_MATH to “ON“, CREATE_YMANAGER to “ON“, and (if available) CREATE_YMANAGER_GUI to “ON“. When it becomes available, press ‘g‘ to generate a Makefile and exit CMake
  • Compile YARP running the make command and install it with: sudo make install

For any question and/or feedback feel free to write me, or to post a message on the Robotcub Hackers mailing list.

Thanks, amongst the others, to Martin and Juxi for the work they have done on the subject in the past.

If anyone feels like preparing a PDF file out of the information contained in this tutorial, please give me a shout!

Share

Serie A

Un solo rammarico. Non poter essere stato in via Guasco ad assistere alla gara.

Grandissimi, ragazzi!

Share

Being introduced to wireless penetration testing

Chiusa l’avventura con l’ottimo volume The Basics of Hacking and Penetration Testing di Patrick Engebretson, che mi ha dato una bella infarinatura dei concetti di base legati al mondo dell’(ethical) hacking “via cavo” e’ giunta l’ora di approfondire un po’ il discorso wireless. Per farlo mi sono affidato ad un altro libro, BackTrack 5 Wireless Penetration Testing, a cura di Vivek Ramachandran. Il quale, per chi non lo sapesse (situazione nella quale il sottoscritto versava fino a poche ore fa) e’ a capo del team che sta dietro a SecurityTube.

Come si può evincere dal titolo, il libro si appoggia (piuttosto che a soluzioni dedicate come ad esempio Infinito) all’ormai celebre distribuzione Linux BackTrack. L’approccio e’ pratico, molto pratico. Probabilmente fin troppo pratico per chi, come ad esempio io, non può contare su grosse conoscenze pregresse in materia di protocolli di comunicazione wireless. Si inizia con poche righe di introduzione e qualche pagina dedicata a come creare un wireless lab, per poi entrare subito nel vivo del discorso packet sniffing via WireShark. Nei capitoli che seguono, nonostante la snellezza del libro, gli argomenti trattati sono svariati. Giusto per dare un’idea, alcuni dei primi capitoli sono intitolati: Bypassing WLAN Authentication (tratta del come scoprire reti wireless che non broadcastano l’SSID, superare i filtri MAC ed Open/Shared Authentication), WLAN Encryption Flaws (cracking di password WEP e WPA-PSK/PSK2, decrittaggio di pacchetti WEP e WPA), Attacks on the WLAN Infrastructure (attacco agli access point).

Il vario hardware necessario per poter testare dal vivo le varie situazioni (nel dettaglio un wireless adapter USB Alfa AWUS036H ed un access point D-Link DIR-615) mi e’ arrivato ieri da Amazon ed e’ stato messo in funzione molto rapidamente. Qui sotto una foto di gruppo, nella quale l’unico assente e’ il mio PC Windows fisso che farà nei prossimi giorni le veci della vittima.

Buon divertimento a me!

Share

Flashback.K

Essendo stato “disconnesso” dal mondo digitale per diversi giorni non ho avuto modo di seguire l’epopea legata a Flashback, un trojan una cui variante, la .K, apparentemente molto efficace ha recentemente preso di mira i sistemi OS X.

Il malware si installa sui sistemi target sfruttando una vulnerabilita’ nota di Java. E’ sufficiente aprire una pagina web predisposta allo scopo per ritrovarsi il software sul proprio computer (con una tecnica definita di drive-by download). A questo punto, per quanto il sistema bersaglio sia gia’ da considerarsi infetto, per convincere l’utente a dare al trojan pieni poteri, Flashback si spaccia come un aggiornamento del player Flash (un sistema che ricorda il vecchio Mac Defender) e confida sul fatto che chi e’ di fronte al computer si lasci ingannare e fornisca tutte le autorizzazioni del caso.

Cosa succede una volta che Flashback si insinua nei meandri del vostro hard disk? Ce lo riassume in maniera breve ed efficace MacWorld:

Once it succeeds in infecting your Mac, Flashback inserts itself into Safari and (according to F-Secure) appears to harvest information from your Web browsing activities, including usernames and passwords. It then sends this information to command-and-control servers on the Internet.

Non e’ esagerato dire che siamo di fronte ad una delle piu’ serie infezioni che gli utenti Mac ricordino dall’abbandono dei floppy disk ad oggi. Stando a stime elaborate da diversi centri di ricerca, i computer infetti nel mondo sarebbe circa un milione. Hexus.net propone anche una mappa che mostra quali sono i Paesi piu’ colpiti dal malware.

Per verificare l’eventuale presenza del trojan sulla vostra macchina e procedere nel caso alla sua eliminazione, pare funzioni molto bene l’apposito removal tool predisposto da F-Secure.

Per saperne di piu’ sull’argomento, vi invito a visitare (oltre ai link che avete incontrato leggendo questo post) Macitynet e PCMag.com.

Share

Towards a Biologically-inspired Cognitive Architecture for Short-Term Memory in Humanoid Robots

A distanza di un bel po’ di tempo, complice un 2011 dedicato quasi esclusivamente alla tesi di PhD (nel quale metto infatti a referto una sola pubblicazione, frutto del periodo speso a Losanna nella seconda meta’ del 2010), si torna finalmente a pubblicare qualcosa. O, perlomeno, ci si prova. Ho infatti sottomesso a TAROS 2012 (che quest’anno si terra’ congiuntamente a FIRA) un articolo riguardante il lavoro portato avanti da quando ho iniziato il mio post-doc fino ad oggi.

Come il titolo del post lascia intendere, il lavoro verte sullo sviluppo di un’architettura cognitiva per robot umanoidi, avente il compito di dotare il suo “portatore” di un sistema di memoria a breve termine bio-inspirato. Chi volesse dare un’occhiata alla versione sottomessa dell’articolo può scaricarlo dal link qui sotto.

Share

Pagina successiva »