Development scripts from the SPQReL team.
- follow instructions in 'INSTALL.md'
- you may check out the
Dockerfile
inlcas/spqrel_launch
for reference of all the steps to set up a system from scratch. ThisDockerfile
is not meant to be taken verbatim, but it documents all general steps required to get a suitable local workspace. Or, simply use the docker image:docker run --rm -it lcasuol/spqrel_launch
(but only if you understanddocker
). - The docker image also provides the perfect, clean cross-compilation environment for pepper. Steps to cross compile in docker, see the
nut.yml
- you may check out the
- go to the workspace you want to use (assuming
$HOME/spqrel/workspace
, socd $HOME/spqrel/workspace
) - clone our top-level repository:
git clone --recurse-submodules https://github.com/LCAS/spqrel_launch.git
(this will pull in all submodules as well- the workspace has the following structure (more or less):
<ROOT> bin/ (where all compiled binaries will end up in) lib/ (where all compiled libraries will end up in) worktree/ PetriNetPlans/ (submodule via git clone https://github.com/iocchi/PetriNetPlans.git) spqrel_navigation/ (submodule via git clone https://github.com/lcas/spqrel_navigation.git) spqrel_tools/ (submodule via git clone https://github.com/lcas/spqrel_tools.git)
- the workspace has the following structure (more or less):
- go to
cd worktree/spqrel_tools
- edit the local config file
setup-local.bash
so that cour SDKs are being found and your top-level SPQReL root is being set (note: Make sure you don't commit you local changes. rungit update-index --skip-worktree setup-local.bash
once to avoid it being accidentally committed. It's your own configuration that goes in here only.) - If you are going to develop in any of the submodules (most likely in
spqrel_tools/
), you will notice that the git head is detached (don't worry if you don't know what I'm talking about). Simply check out the branch you want to work on (usuallygit checkout master
) and you are good to go.
- go to your
spqrel_tools
directory (e.g.cd $HOME/spqrel/workspace/spqrel_launch/worktree/spqrel_tools
) - run
make install
inspqrel_tools
, it should compile all binaries and translate all plans found, and install everything in the respective places. It will find all qibuild workspaces underworktree/
(all submodules configured)
Note: do not source setup.bash
or source setup-dev.bash
as they are needed only for running, and somehow get in cmake's way of finding boost.
-
make sure you load your local development environment:
source setup-dev.bash
(local computer only) andsource setup.bash
(both local computer and Pepper robot). If you are using tmule (see below, those will be outloaded).- make sure you haven't sourced any other configurations, e.g. ROS workspaces etc. Never autoload any project-specific environments in your
.bashrc
.
- make sure you haven't sourced any other configurations, e.g. ROS workspaces etc. Never autoload any project-specific environments in your
-
fire up TMule as either:
tmule --config spqrel-local-config.yaml server
(if you want to run locally)tmule --config spqrel-pepper-config.yaml server
(this is the config usually run on Pepper)
Either will result in the TMule control server being launched and accessible via web browser wherever it was launched (E.g. on Pepper Wifi address) at port 9999, e.g. http://localhost:9999.
-
Start the TMule sub-systems you want to use (in the browser)
-
In order to make everything is orderly terminated, stop the TMule server with
[Ctrl-C]
and follow this bytmule --config spqrel-local-config.yaml terminate
tmule --config spqrel-pepper-config.yaml terminate
respectively
- initial SSH setup for git:
- create local workspace dir
mkdir -p ~/spqrel
and change into itcd ~/spqrel
- Download snapshot of
pepper
branch ofspqrel_launch
to get initial binaries:wget https://github.com/LCAS/spqrel_launch/archive/pepper.zip
and unzip it (will give you directoryspqrel_launch-pepper
). export GIT_EXEC_PATH=$HOME/spqrel/spqrel_launch-pepper/libexec/git-core
to make sure git finds its helpers and setPATH=$HOME/spqrel/spqrel_launch-pepper/bin:$PATH
- still in
~/spqrel
rungit clone --recurse-submodules --depth 1 -b pepper [email protected]:LCAS/spqrel_launch.git
to clone the repository (only shallow clone, we don't need the entire history here) cd spqrel_launch
and runupdate-all.sh
once to make sure everything is updated- you may now remove the bootstrap installation
rm -r ~/spqrel/spqrel_launch-pepper
- a hack is needed to get psutil working correctly:
- download this psutil zip for binaries for i386:
wget -O /tmp/psutil.zip http://lcas.lincoln.ac.uk/owncloud/index.php/s/p57cSlU8588CdUT/download
- unzip into local python install with
unzip -d ~ /tmp/psutil.zip
- download this psutil zip for binaries for i386:
pip install -U --user tmule trollius requests
- go to
cd ~/spqrel/spqrel_launch/worktree/spqrel_tools
- edit
setup-local.bash
with the correct paths source setup.bash
- make sure
setup-local.bash
is not committed:git update-index --skip-worktree setup-local.bash
- configure git:
git config --global user.email "[email protected]"
git config --global user.name "SPQReL team"
git config --global push.default simple
- you are ready to go, now let's Run
- all general configurations (applying to both local installation on your computer and on pepper should you into
setup.bash
. This file loadssetup-local.bash
if it exists and must respect the variables defined inspqrel-local.bash
. They must always take precendence.setup.bash
is the place to set all required environment variables - all development configurations (e.g. where the find the SDK, etc.) are configured in
setup-dev.bash
. This file also readssetup-local.bash
, but should only besource
-d on development machines (i.e.linux64
) and not on Pepper. - the
setup-local.bash
contains all the local paths you need to configure for your environment. Changes to that file shall not be committed to the repository ever. Hence, it is good practice to configure it in git to be ignored usinggit update-index --skip-worktree setup-local.bash