-
Notifications
You must be signed in to change notification settings - Fork 8
Home
OUTDATED: Consult README.md
instead
It assumes the following:
- Cross-compilation toolchain correctly installed: https://sites.google.com/a/dis.uniroma1.it/peppino/software-setup
- Cross-compilation toolchain for pepper is called
pepper
- SDK for C++ locally installed, toolchain names
linux64
- You have installed qibuild, no need to configure a workspace (we'll come to that in a bit)
- You need github configured with ssh-keys to have access to the repos.
- The following general dir structure (names may vary):
<ROOT> setup.bash (sets all environment variables, incl LD_LIBRARY_PATH and PATH) bin/ (where all compiled binaries will end up in) lib/ (where all compiled libraries will end up in) worktree/ PetriNetPlans/ (via git clone https://github.com/iocchi/PetriNetPlans.git) spqrel_navigation/ (via git clone https://github.com/lcas/spqrel_navigation.git) spqrel_tools/ (via git clone https://github.com/lcas/spqrel_tools.git)
The Makefile
uses a variable called TOOLCHAIN
to set the toolchain to be used for everything. Here are the steps to deploy to Pepper, with the default TOOLCHAIN=linux64
To checkout the SPQReL system from scratch:
- checkout
spqrel_launch
:git clone --recursive [email protected]:LCAS/spqrel_launch.git
. This will pull in all our repos as submodules into theworktree/
directory. In order to always use the latest HEAD in those submodules, one has to go into each one of them and dogit checkout <BRANCH>
(usually master), followed bygit pull
. But this is only needed if you want to really work on that module. Most people only need to do this inspqrel_tools
(see below). -
cd spqrel_launch/worktree/spqrel_tools/
to go into the module, rungit checkout master
andgit pull
to make sure you have the latest version. - simple run
make
if you want to build everything forlinux64
or runmake TOOLCHAIN=pepper
for a cross compilation target. (this will compile the PNP local stuff, configure all found qibuild projects and useworktree/
as qi workspace for all of them. - Follow this by
make install
to install the compiled binaries intospqrel_launch/bin
and libraries intospqrel_launch/lib
, respectively. If you cross-compiled for Pepper, these will be binaries that are ready to be deployed to pepper.
There are two setup scripts that set up the correct environment variables:
-
spqrel_launch/setup.bash
is the main setup file. This needs to be loaded in Pepper and your local environment viasource spqrel_launch/setup.bash
in each shell you are using. It sets thePATH
so that the binaries are found and also things likeLD_LIBRARY_PATH
and others. Check here: https://github.com/LCAS/spqrel_tools/blob/master/setup.bash -
spqrel_launch/worktree/spqrel_tools/setup-dev.bash
is just a convenience script to set the variables for binaries and libraries that are part of the SDK. Use this with care (read: don't load in your.bashrc
), and only in a shell of your development environment where you want to easily run binaries of the Linux SDK and so one. It can have side effects when compiling stuff, as it will give preference to libs and tools that are part of the SDK (e.g. the core PNP won't build any more when this is loaded!)
See above, but this time we use TOOLCHAIN=pepper
and make sure we work in the pepper
branch of spqrel_launch
. It is recommended to have a separate workspace where the pepper
branch of spqrel_launch
is checked out and always used to cross-compile for Pepper. Most of the instructions are variants of the above, so only shortly described.
- checkout
spqrel_launch
:git clone --recursive -b pepper [email protected]:LCAS/spqrel_launch.git
. Checkout pepper branch -
cd spqrel_launch/worktree/spqrel_tools/
to go into the module, rungit checkout master
andgit pull
to make sure you have the latest version. Do the same for all other submodules to make you really corss-compile the latest code. - simple run
make TOOLCHAIN=pepper
- Follow this by
make install TOOLCHAIN=pepper
- go to the top level of
spqrel_launch
-
git status
should show the binaries and other things that have changed and show that you are on thepepper
branch. If not, make sure you are by doinggit checkout pepper
. - add all changes in
bin/
andlib/
withgit add -A --ignore-removal bin lib
, you may also wan to commit other changes. -
git commit -m "your message here"
all the new binaries -
git push
to publish the new cross-compiled stuff
At the first time, the deployment repository needs to be cloned. A version of git
should be installed in ~/.local/bin
which is in the $PATH
by default (download from https://github.com/LCAS/spqrel_launch/raw/pepper/bin/git, via wget https://github.com/LCAS/spqrel_launch/raw/pepper/bin/git
and put it into ~/.local/bin
)
git clone --depth 1 --recursive -b pepper git://github.com/lcas/spqrel_launch.git
This creates a shallow clone (--depth 1
) and only for the pepper
branch, to save disk space
This contains a setup.bash
, which should be sourced (source ~/spqrel_launch/setup.bash
)
In later updates, just run git pull
in the cloned repository to get the latest changes pushed as described above.
*Note: The git
version on Pepper does not support https
due to missing libraries on pepper. Only git+ssh
is working.
We use our own TMuLE - TMux Launch Engine to control the system. Simple run
cd $SPQREL_HOME/worktree/spqrel_tools/tmux; tmux.py launch
which should fire up the default configuration file $SPQREL_HOME/worktree/spqrel_tools/tmux/spqrel-pepper-config.json
.
Then look at the running session with tmux a -t spqrel
. Use Ctrl-b d
to detach from the session again, or Ctrl-b w
to switch between different windows.
Kill everything with tmux.py kill
.
Make sure you read the README.md
DON'T FOLLOW THIS TO THE LETTER, IT'S MORE A DUMP THAN ANYTHING ELSE
# prior to this install naoqi SDKs in /opt/naoqi is shown in https://sites.google.com/a/dis.uniroma1.it/peppino/software-setup
qitoolchain create linux64 /opt/naoqi/naoqi-sdk-2.5.5.5-linux64/toolchain.xml
qitoolchain create pepper /opt/naoqi/ctc-linux64-atom-2.5.2.74/toolchain.xml
sudo apt-get install python-pip
sudo pip install qibuild
# install opencv over existing naoqi SDK again, as described in https://github.com/LCAS/spqrel_navigation/wiki/NAOQI-Installation-and-Usage#prepare-a-specific-opencv-version
# setup your git if you haven't done so, e.g.
# make sure git ssh access is enabled and keys are set on your account here: https://github.com/settings/keys
git config --global user.email "[email protected]"
git config --global user.nSPQReL team"
git config --global push.default simple
# prepare the SPQReL worktree
mkdir ~/spqrel
cd ~/spqrel
git clone [email protected]:LCAS/spqrel_launch.git
cd spqrel_launch
git submodule init
git submodule update
cd worktree/spqrel_tools
git checkout master
git pull
cd ../spqrel_navigation/
git checkout master
git pull
cd ../PetriNetPlans/
git checkout master
git pull
# init the worktree
cd ~/spqrel/spqrel_launch/worktree
qibuild init
qibuild add-config linux64 -t linux64
qibuild add-config pepper -t pepper
# manually build the PNP stuff to create generated files
cd ~/spqrel/spqrel_launch/worktree/PetriNetPlans/PNP
mkdir build && cd build && cmake .. && make -j8
cd ../../PNPgen/
mkdir build && cd build && cmake .. && make -j8
# build all SPQReL things for cross compilation for pepper
cd ~/spqrel/spqrel_launch/worktree/spqrel_tools
make configure
make build
make install
# you could make push here to release the new build stuff into the repository
# build for local use (linux64)
make reconfigure TOOLCHAIN=linux64
make build TOOLCHAIN=linux64
make install TOOLCHAIN=linux64