Code Monkey home page Code Monkey logo

o80_roboball2d's Introduction

What it is

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

Installation requires a machine installed with ubuntu 18.04.

installing dependencies

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

Note 1

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.

Note 2

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)

Note 3

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

SSH setup

You need a github account. Set up your ssh key to github : github help

Cloning treep project

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

Compiling

cd workspace
source /opt/ros/melodic/setup.bash 
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3 install

Setting up bashrc file

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.

Running the example

All python scripts are in :

cd <absolute path to Software>/workspace/src/o80/o80_roboball2d/scripts

Must be run in this order:

starting the pseudo real robot

In a terminal:

python3 ./run_reality.py

A window showing a robot should pop up.

starting simulated robot and simulated ball

In another terminal:

python3 ./run_simulation.py

A window showing a robot should pop up.

starting the experiment:

In another terminal:

python3 ./env.py

Ball should be flying around and the real robot / simulated robot moving

Exit

  • 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)

Troubleshooting

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/*

Limitations

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.

Author

Vincent Berenz, Max Planck Institute for Intelligent Systems

o80_roboball2d's People

Contributors

vincentberenz avatar alexanderdittrich avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.