Skip to content

HowTo Modify installAlcommon For New NaoQi

Patrick de Kok edited this page Mar 30, 2015 · 1 revision

From time to time, Aldebaren releases a new version of NaoQi SDK. It is (relatively) easy to update BHuman's installAlcommon to copy all used header files from Aldebaran and their used version of Boost.

  1. Go to the naoqi sdk archive. Check that it is the 32 bit linux version.
  2. Extract it:
tar xf ${NAOQI_ARCHIVE}
  1. Go to the extracted folder.
  2. Go to include/ in that folder.
  3. Store this in a variable:
export ${NAOQI_INCLUDE}=`pwd`
  1. List all the folders with a -e in front (for later use in grep):
export NAOQI_INCLUDE_DIRS=`ls -p | grep '/'
export GREPVARS=`echo ${NAOQI_INCLUDE_DIRS} | sed -e 's/\s/ -e /g'`
  1. Go to the BHuman folder.
  2. Go to Src/ in that folder.
  3. Find all files including any of the naoqi headers:
grep -rE ${grepvars} 
  1. Store all included files from the NaoQi SDK in some variable ${INCLUDED_NAOQI}.
  2. Go to ${NAOQI_INCLUDE}:
cd ${NAOQI_INCLUDE}
  1. Find all included header files recursively:
g++ -I${NAOQI_INCLUDE} -M ${INCLUDED_NAOQI} > included_headers
  1. Open the file with vim:
vim included_headers
  1. Remove the .o's from the file:
:%s/^.*\.o://g
  1. Put each file on a single line:
:%s/ \\$//g
:%s/\n//g
:%s/ / \\\r/g
  1. Remove all system dependencies, these are on lines starting with a /:
:%s/^\/.*$\n//g
  1. Append include/ to the front:
:%s/^/include\//g
  1. Remove all duplicate lines and sort all lines:
:sort u
  1. Save this all, and close:
:wq
  1. Make a version with only Boost header files:
grep 'boost' included_headers > included_boost_headers
  1. Remove the boost headers from the original version:
vim included_headers
:%s/^boost.*$\n//g
:wq
  1. Go to the BHuman folder.
  2. Go to Install/.
  3. Edit installAlcommon and...
    • replace the value of includesAlcommon with those of included_headers;
    • replace the value of includesBoost with those of included_boost_headers;
    • replace defaultArchive with your current NaoQi version's archive name.

Clone this wiki locally