UPMC iCub project/MACSi scripts

From Wiki for iCub and Friends
Revision as of 17:27, 14 February 2013 by Arwen (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Desktop scripts

iCub GUIs

Save the following text in a sh file (for example scriptLaunch.sh)

  cd $ICUB_ROOT/main/app/iCubCluster/scripts
  ./icub-cluster.py ../../robots/iCubParis01/scripts/cluster-config.xml &
  cd $ICUB_ROOT/main/app/default/scripts
  ./manager.py ../../robots/iCubParis01/scripts/cameras.xml &
  ./manager.py ../../robots/iCubParis01/scripts/dumpData.xml &
  cd $ICUB_ROOT/main/app
  ./icubapp.py app.txt &

then do

  chmod a+x scriptLaunch.sh

now you can execute it to launch the main iCub GUIs.

Converting images from ppm to jpg (or other formats)

When dumping images from cameras with DataDumper, images are saved in .ppm format. To convert such images in jpg (or other formats, using ImageMagick convert) you can use this command

  ls *.ppm | sed -e "s/.ppm$//" | xargs -n1 --replace convert -verbose {}.ppm {}.jpg

To create an animated gif for preview purposes (e.g. for a web page) you can select some images and using the same package

  convert -delay 100 -loop 0 image*.jpg animation.gif

To create a video from single images do

  ffmpeg -r 24 -b 2000000 -i %08d.ppm test.avi

Useful commands for images

Appending multiple images in the same row (es: Im1 Im2 Im3... ImN)

  convert Im* +append ImROW.png

Server scripts

Update yarp and iCub on icubsrv and pc104

This script is located in the server (icubsrv), and is used to update yarp and iCub repositories for both pc104 and cluster. To launch it do:

  ssh icubsrv
  sh svn_update_everything.sh

Here is the content:

  echo "Starting svn update on icubsrv..."
  echo "pc104 - yarp"
  cd /exports/code-pc104/yarp2
  svn update 
  echo "icubsrv - yarp"
  cd /home/icub/software/src/yarp2
  svn update 
  echo "pc104 - icub"
  cd /exports/code-pc104/iCub
  svn update
  echo "icubsrv - icub"
  cd /home/icub/software/src/iCub
  svn update
  echo "icubsrv - icub_isir"
  cd /home/icub/software/src/iCub_ISIR
  svn update
  echo "icubsrv - icub_macsi"
  cd /home/icub/software/src/iCub_MACSI
  svn update
  echo "icubsrv - icub_chris"
  cd /home/icub/software/src/iCub_CHRIS
  svn update
  echo "icubsrv - icub_italk"
  cd /home/icub/software/src/iCub_ITALK
  svn update
  echo "Finished svn update on icubsrv!!"