Giter VIP home page Giter VIP logo

robocomp's Introduction

Join the chat at https://gitter.im/robocomp/robocomp

by RoboLab (Universidad de Extremadura), Aston University, ISIS (Universidad de Málaga) and many other collaborators from the Google Summer of Code program.

RoboComp is an open-source Robotics framework providing the tools to create and modify software components that communicate through public interfaces. Components may require, subscribe, implement or publish interfaces in a seamless way. Building new components is done using two domain-specific languages, IDSL and CDSL. With IDSL you define an interface and with CDSL you specify how the component will communicate with the world. With this information, a code generator creates C++ and/or Python sources, based on CMake, that compile and execute flawlessly. When some of these features have to be changed, the component can be easily regenerated and all the user-specific code is preserved thanks to a simple inheritance mechanism.

If you already have RoboComp installed, jump to tutorials to start coding!

⚠️ If you want to contribute with something new to Robocomp, please do it on the development branch. If you fix something on the stable branch, please check if it's also relevant for the development branch and try to cherrypick your commit.

❓ If you have a question please look for it in the FAQ.

Installation in Ubuntu from PPA

Coming soon...

Installation from source

Tested in Ubuntu 18.04.
Note: RoboComp is not compatible with Ubuntu 16.04. RoboComp needs to be compiled using C++11. Ice libraries with C++11 support are only available for zeroc-ice 3.7 and the packages for this version are only available since Ubuntu 18.04.

Note: If you have installed Anaconda in your system. Then you need to change the python from anaconda to default.

Requirements

Make sure you have installed the following packages from the Ubuntu repository:

sudo apt-get update
sudo apt-get install git git-annex cmake make g++ libgsl-dev libopenscenegraph-dev cmake-qt-gui zeroc-ice-all-dev freeglut3-dev libboost-system-dev libboost-thread-dev qt5-default libqt5xmlpatterns5-dev libqt5opengl5-dev libxt-dev libboost-test-dev libboost-filesystem-dev  libccd-dev zeroc-ice-all-runtime
sudo apt-get install python3-pip python3-setuptools python3-pyparsing=2.2.0+dfsg1-2 python3-numpy python3-libxml2 python3-xmltodict python3-zeroc-ice
sudo pip3 install networkx pyside2 argcomplete termcolor cogapp

It is recommendable to install the following packages::

sudo apt-get install yakuake qttools5-dev-tools qt5-assistant

Note: One of the main tools of Robocomp, robocompdsl is using pyparsing and the current code doesn't work with 2.4 version of this library. With the previous commands, we are installing the 2.2 version (python-pyparsing=2.2.0+dfsg1-2). If you have a more recent version of pyparsing installed with apt or pip we recommend you to uninstall it and install the 2.2 version. You can check your current version of pyparsing with this command:

python3 -c "import pyparsing; print(pyparsing.__version__)"

Installation itself

cd to your home directory (you are probably in it already) and type:

git clone https://github.com/robocomp/robocomp.git

Now we will create a symbolic link so RoboComp can find everything. You will have to enter your password:

sudo ln -s ~ /home/robocomp

(the ~ is in Alt-4)

Edit your ~/.bashrc file

gedit ~/.bashrc

Add these lines at the end:

export ROBOCOMP=~/robocomp
export PATH=$PATH:/opt/robocomp/bin

make bash process the modified file by typing:

source ~/.bashrc

Done! Now let's compile and install the whole thing:

sudo [ -d /opt/robocomp ] && rm -r /opt/robocomp
cd robocomp
mkdir build
cd build
cmake ..
make
sudo make install

If you want to compile Robocomp with support for FCL, follow the instructions in the Robocomp with FCL tutorial.

The RoboComp's core libraries and simulator should now be compiled and installed in /opt/robocomp.

Let's now tell Linux where to find RoboComp's libraries:

sudo nano /etc/ld.so.conf

and add the following line:

/opt/robocomp/lib/

save the file and type:

sudo ldconfig

Done! Now let's have some fun.

Testing the installation using the RCIS robotics simulator

We will first fetch some meshes and textures used by the simulator (it will take a while):

cd ~/robocomp
git annex get .

Now let's run the simulator.

cd ~/robocomp/files/innermodel
rcis simpleworld.xml

You can also use the default innermodel/simpleworld.xml anywhere if you have set the ROBOCOMP environment variable.

rcis

Congratulations! RCIS should be up and running with a simple robot endowed with a laser and an RGBD camera, moving on a wooden floor. Don't forget to turn around the floor to see the robot from above.

Installing some RoboLab's components from GitHub

The software of the robots using RoboComp is composed of different software components working together, communicating among them. What we just installed is just the core of RoboComp (the simulator, a component generator, and some libraries). To have other features like joystick control we have to run additional software components available from other repositories, for example, robocomp-robolab:

cd ~/robocomp/components
git clone https://github.com/robocomp/robocomp-robolab.git

The RoboLab's set of basic robotics components are now dowloaded. You can see them in ~/robocomp/components/robocomp-robolab/components

Connecting a JoyStick (if no JoyStick available skip to the next section)

If you have a joystick around, connect it to the USB port and:

cd ~/robocomp/components/robocomp-robolab/components/hardware/external_control/joystickComp
cmake .
make
cd bin
sudo addgroup your-user dialout   // If you find permissions issues in Ubuntu
check the config file in the component's etc folder and male sure that the port matches the DifferentialRobot endpoint in     RCIS.
bin/joystick etc/config

Your joystick should be now running. It will make the robot advance and turn at your will. If it does not work, check where the joystick device file has been created (e.g., /dev/input/js0). If it is not /dev/input/js0, edit ~/robocomp/components/robocomp-robolab/components/hardware/external_control/joystickComp/etc/config change it accordingly and restart. Note that you might want to save the config file to the component's home directory so it does not interfere with future GitHub updates.

Using the keyboard as a JoyStick

If you don't have a JoyStick install this component,

cd ~/robocomp/components/robocomp-robolab/components/hardware/external_control/keyboardrobotcontroller
cmake .
make
src/keyboardrobotcontroller.py etc/config

and use the arrow keys to navigate the robot, the space bar to stop it and 'q' to exit.

Note 1: You must have your simulator running in a terminal and only then you can run a component in another terminal. You will get an error message if you run the above component without having RCIS already running.

Note 2: If you have anaconda installed (for python 3), It is recommended to uninstall anaconda first and then install robocomp. (It is only applicable if you have faced errors while running above commands.)


You can find more tutorials on RoboComp in tutorials

Drop comments and ask questions in:

Please, report any bugs with the github issue system: Robocomp Issues

If you have any suggestions to improve the repository, like features or tutorials, please contact us on Join the chat at https://gitter.im/robocomp/robocomp or create a feature request here.

robocomp's People

Contributors

ljmanso avatar pbustos avatar orensbruli avatar kmayankkr avatar elebarr avatar rcintas avatar yashsanap avatar nithinmurali avatar mariabohorquez avatar mercedes92 avatar luiky avatar ibarbech avatar danielgallegosanchez avatar rajathkmp avatar basilmvarghese avatar mhaut avatar rbkmarfil avatar sparsh789 avatar abhi-kumar avatar nikhilsteph avatar daniel1108 avatar fig21 avatar fcidb avatar vzccristian avatar pilarbachiller avatar juankllr avatar ksakash avatar juanptm avatar harrykarwasra avatar argarces avatar

Watchers

James Cloos 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.