o80 is a software for synchronizing and communicating with processes. roboball2d is a lightweight simulation of a 3dofs robot playing with balls.
This repository is used to test idea of software architecture using o80 for synchronisation.
It is not meant for any other purpose, and no documentation is offered.
Installation requires a machine installed with ubuntu 18.04.
After cloning of ubuntu installation scripts, the script setup_ubuntu (in the 'official' folder) can be run, passing the option 'ros':
sudo ./setup_ubuntu install ros
This installation script does not do anything fancy. It (almost) just install software using aptitute and pip, i.e. it does not create some complicated systems difficult to track, or that could break anything else you already have installed on your machine.
If you'd rather not have ros installed, you may run instead:
sudo ./setup_ubuntu install core
Ros is not a required dependency, but is convenient (e.g. rosrun, roslaunch, etc)
You may also pull the corresponding docker image : docker.is.localnet:5000/amd/18.04:ros You need first to login to docker.is.localnet:
docker login https://docker.is.localnet:5000
In case of issue, you may try to add to /etc/docker/daemon.json:
{
"insecure-registries": [ "docker.is.localnet:5000" ]
}
and restart docker:
sudo systemctl daemon-reload
sudo systemctl restart docker
You need a github account. Set up your ssh key to github : github help
Create a new workspace and clone treep_isr ('isr'='intelligent soft robots')
mkdir Software # you may call the folder whatever you like
cd Software
git clone [email protected]:intelligent-soft-robots/treep_isr.git
treep --clone O80_ROBOBALL2D
cd workspace
source /opt/ros/melodic/setup.bash
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3 install
To make sure things are activated properly in all new terminals you open, you may add to your ~/.bashrc file (replacing by what makes sense):
echo "sourcing o80 roboball2d"
source /opt/ros/melodic/setup.bash
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:<absolute path to Software>/workspace/devel/lib
source <absolute path to Software>/workspace/install/setup.bash
Before continuing, source ~/.bashrc or open a new terminal.
All python scripts are in :
cd <absolute path to Software>/workspace/src/o80/o80_roboball2d/scripts
Must be run in this order:
In a terminal:
python3 ./run_reality.py
A window showing a robot should pop up.
In another terminal:
python3 ./run_simulation.py
A window showing a robot should pop up.
In another terminal:
python3 ./env.py
Ball should be flying around and the real robot / simulated robot moving
- close the window in which env.py run
- close the window in which run_simulation.py run
- cltr-c for exiting run_reality.py and run_vision.py
It is possible to exit env.py and run_simulation.py, but keeping run_reality.py running (and starting run_simulation.py and env.py again)
Issues may occur if programs are not exited cleanly, or not in the right order. This may block the applications to be started again. If this happens, cleaning the shared memory should help:
sudo rm /dev/shm/*
This software has been created for the purpose of testing o80. It is not expected to be used beyond this, and no documentation is offered.
Vincent Berenz, Max Planck Institute for Intelligent Systems