Install Manual
User Manual:
Open the PDF directly: View PDF .
Page Count: 30
Download | |
Open PDF In Browser | View PDF |
LpzRobots and GoRobotos An installation manual Frank Hesse, Christoph Rauterberg, Poramate Manoonpong September 29, 2015 This installation manual shall first provide some general knowledge about the gorobots-Project and the architecture we use. Then this guide will explain step-by-step how to set up your Eclipse, so that you can work with the LpzRobots-Simulation and the gorobots-Project. In the future, we would like to complete this installation manual in a way, that it will also include manuals for setting up the software needed for AMOSII (Hexapod) and other robots. Contents 1 Introduction 4 2 Setting up Eclipse and LpzRobots 2.1 Running setUpGoRobots.sh . . . . . . . . 2.1.1 Forking a repository . . . . . . . . 2.2 Setting up Eclipse . . . . . . . . . . . . . 2.2.1 Installing Tool-Kits within Eclipse 2.2.2 Importing the Repositories . . . . 2.2.3 Code-Style withing Eclispe . . . . 2.3 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Project Structure 4 Working with GIT 4.1 Overview of GIT-commands . . . . . . 4.2 Setting up your own branch with GIT 4.3 Forking a Repository . . . . . . . . . . 4.4 Merging . . . . . . . . . . . . . . . . . 4.5 How to update your Master Branch . . 6 6 6 6 6 7 7 7 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Installing LpzRobots by Hand 10 10 12 13 13 13 16 6 Using the Google Test Framework for Unit Testing 17 6.1 Installing the framework . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 6.2 Creating test cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 7 Additional (real) Hardware: Camera and Laserscanner 20 7.1 Step by step to install: Camera, LpzRobots and Eclipse, Laser scanner . 20 7.2 Starting Laser scanner demo with simulated and real robots . . . . . . . 23 8 ROS installation 24 8.1 Step by step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 9 FAQs 9.1 Installation errors in general . . . . . . . . . 9.1.1 Symbol lookup error . . . . . . . . . 9.2 Problem of displaying plots from Guilogger 9.3 Cannot complie Lpzrobots . . . . . . . . . . 9.4 Errors using setUpGoRotobots.sh . . . . . . 9.4.1 Fail to run setUpGoRotobots.sh . . 9.4.2 Error with git clone . . . . . . . . . 9.5 Problems with GIT . . . . . . . . . . . . . . 9.5.1 Setting up Repositories in Eclipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 26 26 26 26 26 26 27 27 27 9.5.2 No Connection to GIT Server: The remote end hung up unexpectedly. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.6 Compile Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.6.1 OpenCV highgui missing . . . . . . . . . . . . . . . . . . . . . 9.6.2 C++11 unknown . . . . . . . . . . . . . . . . . . . . . . . . . . 9.6.3 osg::Geometry::BIND PER PRIMITIVE unknown . . . . . . . 9.6.4 cannot find -ltinyxml2 . . . . . . . . . . . . . . . . . . . . . . . 9.7 Errors when starting the simulation . . . . . . . . . . . . . . . . . . . 9.8 Using Lpzrobots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.9 Using EPuck Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.9.1 When trying to run qmake, I obtain “unknown QT: widgets” . 9.10 Serial interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.11 Public key to push to assembla . . . . . . . . . . . . . . . . . . . . . . 3 . . . . . . . . . . . . 27 28 28 28 28 28 29 29 29 29 30 30 1 Introduction The LpzRobots-Simulation is a robot simulation programmed at the university of Leipzig. Its main features include the ode robots, which is a 3D robot simulator, that is physically correct, and the so called selforg, that is a framework for controller implementation. The important parts of the software architecture are shown in Figure: 1: AbstractWiring Simulation ThisSim AbstractController Agent AbstractRobot Figure 1: Software Architecture for LpzRobots and GoRobotos ThisSim will, during a simulation, integrate all elements of this very simulation, which means controlling the environment, the robot, as well as setting initial parameters and plotting or logging data. Agent will integrate all elements of an agent by using the shown classes, one can for example add sensory preprocessing using a child class of AbstractWiring. LpzRobots and GoRobotos Installation Manual Page 4 of 30 Simulated Robot: amonsII.cpp\h Simulation Control amosIIcontrol.cpp\h Simulated Environment: main.cpp NeuralProcessing.ccp\h NeuralLocomotion.cpp\h Real Environment: main.cpp CPG().cpp\h Reality POSTCPG().cpp\h PSN().cpp\h Real Robot: AMOSII serial.cpp\h VRN().cpp\h Figure 2: Need name for this picture For working with the LpzRobots-Simulation, you will need a couple of things: 1. A (preferably up-to-date) UNIX-based Operating System (state of the art: Ubuntu 11.10 or Debian 6.0) 2. The Eclipse-Software combined with the following packages: • C/C++ SDK • The EGit-Tool-Kit 3. Access to the Assembla-Repository (contact your supervisor for access) 4. The setUpGoRobots.zip file (contact your supervisor for the file) LpzRobots and GoRobotos Installation Manual Page 5 of 30 2 Setting up Eclipse and LpzRobots 2.1 Running setUpGoRobots.sh From your supervisor, you will receive the .zip-File setUpGoRobots.zip - or you can find it at gorobots/docs/install script/. To begin with, you need to extract the files and the script setUpGoRobots.sh within. This script will: 1. Install the required packages on your computer 2. Include important settings to your .bashrc 3. Fetch the repositories LpzRobots and GoRobots 4. Import the project settings file 5. Compile the files After extracting, you can run the script, by typing ./setUpGoRobots.sh in the corresponding directory. However, you might have to change permission ”chmod u+x setUpGoRobots.sh” if you cannot execute. 2.1.1 Forking a repository The script will ask you for the URL of your forked repository. Please read about how to fork a network with Assembla in Section 4.3. 2.2 Setting up Eclipse 2.2.1 Installing Tool-Kits within Eclipse Before importing the repositories, you need two tool-kits for your Eclipse: 1. To install a tool-kit, go to Help→Install Software 2. The first tool-kit you need is the C++ Development Kit. Work with the following link: http://download.eclipse.org/tools/cdt/releases/indigo and install the so called CDT-Tool-kits. 3. The second tool-kit is EGIT for accessing GIT within Eclipse. You can download it working with this link: http://download.eclipse.org/egit/updates. Whilst doing so, you have to check the box for Eclipse Git Team Provider and uncheck the box for EGit Mylyn. LpzRobots and GoRobotos Installation Manual Page 6 of 30 2.2.2 Importing the Repositories Once you have finished running the script and have installed the tool-kits, you are ready to import the repositories into your Eclipse. To do so, first switch into the Git Repositories - View within Eclipse. You can do this by clicking: Window→Show View→Other→Git→Git-Repositories and hit OK. In this view, you can choose Add an existing local GIT repository. The script will have placed the files at /home/yourlogin/workspace. 2.2.3 Code-Style withing Eclispe To adapt the Code-Style, go Window→Preferences→C/C++→ Code-Style→Import. Now you choose the file: workspace/lpzrobots/codeStyleEclipse.xml and hit apply. 2.3 Troubleshooting If you encounter any problems while using the script, please contact Frank or me (c.rauterberg@gmx.de) and send us error output, solutions you found, etc. if possible. Find the install-by-hand-instructions at the end of this manual. LpzRobots and GoRobotos Installation Manual Page 7 of 30 3 Project Structure We use, as already mentioned, two GIT repositories, LpzRobots and GoRobots. Later, the controllers for each robot will be implemented within GoRobots, accessing the robots, which are located in LpzRobots. The folder DEMO will later contain demos of the different robots. Another visualisation of the two repositories and where which file belongs is given in Figure 3. Figure 3: Structure of the two repositories, LpzRobots and GoRobots You will later work with your own copy of the two repositories. LpzRobots and GoRobotos Installation Manual Page 8 of 30 ann-framework utils ann-library include controllers adaptive_climbing_control amosIIcontrol.cpp, .h .ccp, .h main.cpp sim Makefile.conf makefile amosii demos main.cpp Makefile.conf real archive (stand alone, inactive) makefile include climbing_obstacleavoidance_gapavoidance sim real adaptive_climbing_control_ii amosii dennis include sim new finished works (name of developer) amosiicontrol.cpp, .h BackboneJointControl.cpp, .h modular_neural_control delayline.cpp, .h amosii new.cpp, .h reinforcement_learning_control_rbf controllers (common components) existing.cpp, .h nimm4ii new.cpp, .h existing.cpp,.h nejihebi new.cpp, .h modular_neural_control sim real koh_preview_neural_control amosii reinforcement_learning_control_rbf one goal multiple goals adaptive_obstacleavoidance_control combinatorial_rc_rc_actor_sim projects (active, named by function) combinatorial_rc_sim nimm4ii reinforcement_learning_control_rbf Gorobots one goal multiple goals nejihebi xnor ploe balancing 2d (ICO learning) practices_solutions amosii nimm4ii ann-framework ann-library esn-framework utils (general use) dmp-framework sensors real_robots rbf-framework ann_controller (amos walking with anns) backpropagation (batch XOR training using ann-framework) artificial_neural_networks hopfield kohonen perceptron esn examples (AI tools, robots) ga evolutionary_algorithms actor_critic reinforcement_learning pole_balancing_numerical_sim q_learning sarsa real epuck monitor dmp amosii nimm4ii practices (AI classes, student homework) xnor (online learning) pole balancing 2d install_manual docs (manual) install_script Gorobots.mmap - 12/7/2013 - Figure 4: Structure of GoRobots. Green parts belong to GoRobotsEdu LpzRobots and GoRobotos Installation Manual Page 9 of 30 4 Working with GIT 4.1 Overview of GIT-commands The following picture will give a good overview over the workflow and the commands in GIT: The main advantage in GIT is, that every host has got his own local repository, which Figure 5: An Overview over GIT commands in itself is an external repository to another host. LpzRobots and GoRobotos Installation Manual Page 10 of 30 I will give an example, in which I will try, to use most of the commands GIT gives us: • You create a new file in your workspace in your own branch, that was not under version control before • Now you first have to add it to the index, which for GIT is just a list of files, that it has to monitor. You can do this using add • The next step is adding the actual file to the local repository. You can do this via commit • Now the file is under version control. You can now could get the file from the repository using checkout HEAD • If you also want to add the file to the remote repository, you can use push • Now another person can get your whole work using pull, which will provide him with everything, that is currently listed in your remote repository Please note: Be careful whilst merging, Eclipse will offer you to “overwrite”, which is not a good idea, as it does exactly what it promisses instead of merging. We will support this warning with a screenshot if possible! To provide a full overview over the commands, I will list all the commands, that Eduard did show us in his presentation: • git add: adds file changes in your workspace to your index • git commit: Commits all the changes listed in the index to the local repository • git push: Pushes local branch to the remote repository • git fetch: Fetches all files from the remote repository, that are not in the local repository • git merge: Merges one or more branches into your current branch • git pull: Fetches files from remote repository and merges them with local files (equal to git fetch; git merge) • git rm: Removes a file from your repository LpzRobots and GoRobotos Installation Manual Page 11 of 30 4.2 Setting up your own branch with GIT Within your repository, you should still create branches for each feature you develop. To create a new branch you simple do: 1. In Eclipse, right-click on name of your fork 2. Select Team→Switch to→New Branch 3. As shown in the picture bellow, select the source: refs/remotes/origin/goettingen master1 4. Choose a name following the scheme yourname yourfeature 5. Activate the checkbox for checking out the new branch 6. Work away Figure 6: How to create a new branch within Eclipse 1 By choosing this, you make sure, that you have the latest online version LpzRobots and GoRobotos Installation Manual Page 12 of 30 4.3 Forking a Repository To create a fork of a repository, you need access to the assembla-website. Once you have logged in, you can choose a repository and then click on the button fork network. One click on the button fork will then create a fork of the repository for you, as shown in Figure 7. You will furthermore be asked for a name of this copy of the repository, remember this name, as you will need it for the setup! Figure 7: How to fork a repository at the Assembla website 4.4 Merging Please check with your supervisor, before merging back into master. If you want to merge a branch of yours, you will have to send a merge request via the assembla-webpage. A supervisor will then have a look at your code. BUT he is only able to do so, if you have given him or her the rights to read your code. You can do so by, on the assembla-webpage in your forked repository, select team and then, on the right, select Invite people from other teams. No you can choose which one you want to invite, and then you can choose which rights you want to give him or her. 4.5 How to update your Master Branch Make sure that you are in your master branch by typing: ˜/ workspace /YOURLOGIN−g o r o b o t s −f o r k $ g i t branch The output should be something like this: LpzRobots and GoRobotos Installation Manual Page 13 of 30 goplus feature branch 1 feature branch 2 feature branch 3 ∗ master The star indicates, in which branch you are working right now. If you are not working in the master-branch, switch to the branch by typing: ˜/ workspace /YOURLOGIN−g o r o b o t s −f o r k $ g i t c h e c k o u t master You can use git branch again, to check of you are in the right branch now. If you are in the master branch type ˜/ workspace /YOURLOGIN−g o r o b o t s −f o r k $ g i t remote −v The output should be something like this (if you did not add a remote before): o r i g i n h t t p s : / /YOURLOGIN@git . a s s e m b l a . com/YOURLOGIN−g o r o b o t s −f o r k . g i t ( f e t c h ) o r i g i n h t t p s : / /YOURLOGIN@git . a s s e m b l a . com/YOURLOGIN−g o r o b o t s −f o r k . g i t ( push ) Now you have to add a stable repository as additional remote type: g i t remote add s t a b l e h t t p s : / /YOURLOGIN@git . a s s e m b l a . com/ g o r o b o t s . g i t git remote -v should now show something like: ˜/ workspace /YOURLOGIN−g o r o b o t s −f o r k $ g i t remote −v o r i g i n h t t p s : / /YOURLOGIN@git . a s s e m b l a . com/YOURLOGIN−g o r o b o t s −f o r k . g i t ( f e t c h ) o r i g i n h t t p s : / /YOURLOGIN@git . a s s e m b l a . com/YOURLOGIN−g o r o b o t s −f o r k . g i t ( push ) s t a b l e h t t p s : / /YOURLOGIN@git . a s s e m b l a . com/ g o r o b o t s . g i t ( f e t c h ) s t a b l e h t t p s : / /YOURLOGIN@git . a s s e m b l a . com/ g o r o b o t s . g i t ( push ) This means you are able to connect to the stable repository (referred to as stable) from your local repository. Now update your local repositories information about the stable repository by typing: ˜/ workspace /YOURLOGIN−g o r o b o t s −f o r k $ g i t f e t c h s t a b l e After typing your password you see an output like the following: From h t t p s : / / g i t . a s s e m b l a . com/ g o r o b o t s ∗ [ new branch ] master −> s t a b l e / master Your local repository knows now what branches are available in the stable repository. Now merge the changes of the stable master in your workspace (which currently contains your local master branch) by typing: ˜/ workspace /YOURLOGIN−g o r o b o t s −f o r k $ g i t merge s t a b l e / master If there were now changes, the Output would be something like: Already up−to−d a t e . An example of an output including changes would look like: LpzRobots and GoRobotos Installation Manual Page 14 of 30 Updating 1054 d9a . . 3 3 0 d652 Fast−f o r w a r d d o c s /README | 6 ++++++ d o c s / i n s t a l l m a n u a l /README | 5 +++++ 6 ++++++ d o c s / i n s t a l l s c r i p t /README | 3 f i l e s changed , 17 i n s e r t i o n s (+) , 0 d e l e t i o n s (−) c r e a t e mode 100644 d o c s /README c r e a t e mode 100644 d o c s / i n s t a l l m a n u a l /README c r e a t e mode 100644 d o c s / i n s t a l l s c r i p t /README Now you can use git commit, to commit changes to your local repository, and git push, to commit changes to the remote repository. Now your master branch is up to date with our stable version and you can continue with the next section. LpzRobots and GoRobotos Installation Manual Page 15 of 30 5 Installing LpzRobots by Hand Before you install LpzRobots, you first need to install a couple of additional packages. You can do this using the following commands: sudo apt-get install\ g++ make automake libtool xutils-dev m4 libreadline-dev libgsl0-dev\ libglu-dev libgl1-mesa-dev freeglut3-dev libopenscenegraph-dev\ libqt4-dev libqt4-opengl libqt4-opengl-dev qt4-qmake libqt4-qt3support gnuplot2 Also, you will need this package: sudo apt-get install binutils-gold3 Furthermore, you will need to add some lines to your .bashrc: # definitions for lpzrobots export CPATH=”$HOME/include” export LIBRARY PATH=”$HOME/lib” export LD LIBRARY PATH=${LD LIBRARY PATH}:$HOME/lib:/usr/lib/osgPlugins2.8.1 export PATH=${PATH}:$HOME/bin Now you are ready to install the LpzRobot-Simulation. As Eclipse has now synchronized its workspace with the GIT-Repository, you can find the setup-files in your workspace. To install LpzRobots, go to workspace→lpzrobots and run make (all). Install it to /home/YOURLOGIN and choose install as developer, which is the shortcut d 2 You 3 You can also find this list of dependencies in the repository lpzrobots may need this only for newer Ubuntu-Versions (>= 11.10), as the linker does not link anymore LpzRobots and GoRobotos Installation Manual Page 16 of 30 6 Using the Google Test Framework for Unit Testing We are trying to maintain our code with the help of a unit testing framework, namely googletest. 6.1 Installing the framework To be able to use this feature and develop new test cases, you first have to install the googletest framework. Here are the necessary steps: Start by downloading the source code of the most recent googletest version. It is available under https://code.google.com/p/googletest/downloads. Decompress the archive and enter it in a terminal: $ cd g t e s t − 1 . 7 . 0 Inside the decompressed folder, create a new directory called “build” and enter it: $ mkdir b u i l d $ cd b u i l d Use cmake to create a Makefile and use this Makefile to build googletest: $ cmake . . $ make You’ll find a libgtest.a and libgtest main.a file inside the build directory. Copy these files to some path that is registered in the LD LIBRARY PATH environment variable. Typically, during the installation of lpzrobots, you add the lib folder in your home directory to the LD LIBRARY PATH. To copy the files there, type: $ cp l i b g t e s t . a l i b g t e s t m a i n . a ˜/ l i b Furthermore, you have to copy the folder gtest inside the include directory located in the googletest root folder to some path that you include into the search path while compiling gorobots simulations. You can use the include folder created during the lpzrobots installation (typically in your home folder). Starting in the build directory, type the following: $ cd . . / i n c l u d e $ cp −r g t e s t ˜/ i n c l u d e / This finishes the installation of the googletest framework. You may now enter the gorobots folder and build the test cases: $ cd ˜/ workspace / g o r o b o t s $ make t e s t You should also try to run the tests: $ ./ build / run test LpzRobots and GoRobotos Installation Manual Page 17 of 30 6.2 Creating test cases There is a nice tutorial about the basic ideas and concepts of the googletest framework at the webpage of the project. You should definitely read it before going on: https://code. google.com/p/googletest/wiki/V1_7_Primer Within the gorobots project, we want to use the googletest framework for real unit testing as well as for something that is more like integration testing. Unit testing refers to the testing of as small as possible subunits of code. For instance, there is a test for the ann-framework that checks whether the activity property of the Neuron class works as expected: TEST( NeuronTest , a c t i v i t y ) { Neuron neuron ; neuron . s e t A c t i v i t y ( 1 . 2 ) ; ASSERT EQ ( 1 . 2 , neuron . g e t A c t i v i t y ( ) ) ; } This is as primitive as it can get. Observe that “NeuronTest” is the name of the test case and “activity” the name of the actual test. You should make sure your test case names are unique within gorobots. For creating a test for a given unit of code, create a new file in the “tests” folder within the gorobots repository. The path of the file within the tests folder should resemble the path of the tested unit in the gorobots repository. Furthermore, the name of the test file should be the name of the unit plus “ test”. If, for instance, the files containing the actual code are u t i l s / ann framework / neuron . h u t i l s / ann framework / neuron . cpp the correct path and name of the corresponding test file is t e s t s / u t i l s / ann framework / n e u r o n t e s t . cpp Within your new test file, you have to include the header of the googletest framework and the headers necessary to perform your tests. For instance: #i n c l u d e ” g t e s t / g t e s t . h” #i n c l u d e ” u t i l s /ann−framework / neuron . h” Afterwards, just start to define your tests. When it comes to testing of projects, thins get a little more trickier. This is due to our standard of defining the simulation class within the main.cpp. Unfortunately, every main.cpp typically also contains one main method and we cant’t link multiple objects that contain methods with the same name. The solution for this is a little hackish: Before including the main.cpp, which is necessary here, add two define statements to override the name of the main method and the ThisSim class. The latter is neccessary to avoid identically named classes in different object files. The results might look like this: #i n c l u d e ” g t e s t / g t e s t . h” // mask names o f o b j e c t s i n g l o b a l s c o p e #d e f i n e main p r o j e c t s n e j i h e b i e x a m p l e m a i n #d e f i n e ThisSim ProjectNejihebiExampleMainSim #i n c l u d e ” p r o j e c t s / n e j i h e b i / example / sim /main . cpp ” LpzRobots and GoRobotos Installation Manual Page 18 of 30 Within the actual test of your project, you should run your simulation for an as short as possible time interval and check afterwards whether the relevant parameters of the robot have the expected values. This might require too add some additional methods to the ThisSim class. Check out the test of the Nejihebi example project to get an idea how this might look like: t e s t s / p r o j e c t s / n e j i h e b i e x a m p l e t e s t . cpp LpzRobots and GoRobotos Installation Manual Page 19 of 30 7 Additional (real) Hardware: Camera and Laserscanner 7.1 Step by step to install: Camera, LpzRobots and Eclipse, Laser scanner 1) Linux: Install Linux e.g., Ubuntu 12.04 2) Camera: Install OpenCV and AprilTag for Camera (see How to Use Camera.pdf) OR follow the steps below 1. Use Synaptic Package Manager to install (OpenCV): libopencv-dev 2. Install necessary packages of AprilTag: See h t t p : / / a p r i l . e e c s . umich . edu / w i k i / i n d e x . php/ D o w n l o a d a n d I n s t a l l a t i o n OR sudo apt−g e t i n s t a l l emacs g i t −c o r e ant s u b v e r s i o n gtk−doc−t o o l s l i b g l i b 2 .0 − dev l i b u s b −1.0−0−dev gv l i b n c u r s e s −dev openjdk −6−j d k a u t o p o i n t l i b g l 1 −mesa−dev 3. Install LCM of AprilTag: cd $HOME svn c h e c k o u t h t t p : / / lcm . g o o g l e c o d e . com/ svn / trunk lcm cd lcm . / b o o t s t r a p . sh ./ configure make sudo make i n s t a l l 4. Install libdc1394of AprilTag: cd $HOME svn co h t t p s : / / l i b d c 1 3 9 4 . svn . s o u r c e f o r g e . n e t / s v n r o o t / l i b d c 1 3 9 4 / trunk / l i b d c 1 3 9 4 / cd l i b d c 1 3 9 4 a u t o r e c o n f − i −s ./ configure make sudo make i n s t a l l OR Note t h a t I met with a problem when I i n s t a l l l i b d c 1 3 9 4 . So , a n o t h e r way t o do t h i s i s : At t e r m i n a l : a p t i t u d e s e a r c h l i b d c 1 3 9 4 then you can s e e s e v e r a l f i l e s t h e r e . Choose l i b d c 1 3 9 4 −22 and l i b d c 1 3 9 4 −22−dev t o i n s t a l l , l i k e : sudo a p t i t u d e i n s t a l l l i b d c 1 3 9 4 −22 sudo a p t i t u d e i n s t a l l l i b d c 1 3 9 4 −22−dev LpzRobots and GoRobotos Installation Manual Page 20 of 30 5. Set up environment variables of AprilTag by adding the following lines to .bashrc e x p o r t CLASSPATH=$CLASSPATH: / u s r / s h a r e / j a v a / g l u e g e n −r t . j a r : / u s r / l o c a l / s h a r e / j a v a / lcm . j a r :$HOME/ a p r i l / j a v a / a p r i l . j a r : . / e x p o r t LD LIBRARY PATH=$LD LIBRARY PATH :$HOME/ a p r i l / l i b a l i a s j a v a =’ j a v a −ea −s e r v e r ’ 6. Then reload your bash settings (you won’t need to do this the next time you log in): source ˜/. bashrc 7. Install April Toolkit: cd $HOME g i t c l o n e g i t : / / a p r i l . e e c s . umich . edu /home/ g i t / a p r i l . g i t cd a p r i l / j a v a ant 8. Test AprilTag − > You can test the 3D visualization environment with: java a p r i l . v i s . VisTest Or t r y out t h e camera a c q u i s i t i o n s o f t w a r e with : j a v a a p r i l . jcam . JCamView Or t r y t o run camera t e s t program a t : \ camera \ T o S t e f f e n Make s u r e t h a t ”cvCaptureFromCAM( −1) o r cvCaptureFromCAM ( 0 ) ” i n t e s t c l i e n t . cpp Terminal 1 : java j s e r v e r t e s t Terminal 2 : make c l e a n make ./ t e s t c l i e n t 3) Lpzrobots and Eclipse (see Setting up Eclipse and LpzRobots section) I f you want t o u s e L a s e r s c a n n e r then make s u r e t h a t i n . / setUpGoRobots . sh These o n e s a r e not i n s t a l l e d : #echo ” sudo apt−g e t i n s t a l l b i n u t i l s −g o l d ” #sudo apt−g e t i n s t a l l b i n u t i l s −g o l d >A f t e r f i n i s h t h i s : >S t a r t : E c l i p s e s >>S e l e c t : Help>I n s t a l l S o f t w a r e 1 . Work with : h t t p : / / download . e c l i p s e . o r g / t o o l s / c d t / r e l e a s e s / i n d i g o LpzRobots and GoRobotos Installation Manual Page 21 of 30 S e l e c t : C/C++ Development T o o l s 2 . Work with : h t t p : / / download . e c l i p s e . o r g / e g i t / u p d a t e s S e l e c t : E c l i p s e EGIT Due t o Ubuntu 1 2 . 0 4 , you need t o type sudo make a l l then you might g e t t h e e r r o r m e s s a g e s : make [ 2 ] : Leaving d i r e c t o r y ‘ / home/ poramate / workspace /pmanoonpong−l p z r o b o t s −f o r k ’ sudo make i n s t a l l o d e r o b o t s [ sudo ] password f o r poramate : > ./ start > . / s t a r t : e r r o r while loading shared l i b r a r i e s : l i b o d e \ dbl . so . 1 : cannot open s h a r e d o b j e c t f i l e : No such f i l e o r d i r e c t o r y The s o l u t i o n was : When i n s t a l l i n g L p z r o b o t s make s u r e t h a t you i n s t a l l i t i n /home/ y o u r l o g i n , e . g . , /home/ poramate I f you made t h i s mistake , you c o u l d change t h i s by : From t e r m i n a l , go t o your l p z r o b o t s , e . g . poramate@ubuntu : ˜ / workspace /pmanoonpong−l p z r o b o t s −f o r k $ make c l e a n make c l e a n −a l l make c o n f Then : s e t new i n s t a l l i n g path : /home/ y o u r l o g i n , e . g . , /home/ poramate make a l l 4) Laser scanner u t i l i t i e s / urg 1 ) sudo apt−g e t i n s t a l l l i b s d l −n e t 1 . 2 2 ) sudo apt−g e t i n s t a l l l i b s d l −n e t 1 .2 − dev 3 ) sudo apt−g e t i n s t a l l l i b s d l 1 .2 − dev 4 ) sudo sh c o n f i g u r e 5 ) sudo make 6 ) sudo make i n s t a l l poramate@ubuntu : ˜ / Documents / u t i l i t i e s / urg Go t o example : LpzRobots and GoRobotos Installation Manual Page 22 of 30 poramate@ubuntu : ˜ / Documents / u t i l i t i e s / urg / s a m p l e s / cpp Running program : UrgDevice : : c o n n e c t : / dev /ttyACM0 : No such f i l e o r d i r e c t o r y poramate@ubuntu : ˜ / Documents / u t i l i t i e s / urg / s a m p l e s / cpp : sudo . / mdScan UrgDevice : : c o n n e c t : / dev /ttyACM0 : No such f i l e o r d i r e c t o r y poramate@ubuntu : ˜ / Documents / u t i l i t i e s / urg / s a m p l e s / cpp : 7.2 Starting Laser scanner demo with simulated and real robots 1 ) Check out ” p r e v i e w l a s e r s c a n n e r ” branch from L p z r o b o t s r e p o s i t o r y 2 ) i n t h e Lpzrobot d i r e c t o r y : e . g . , ˜/ w o r s k s p a c e / yourname−l p z r o b o t s −f o r k s : make c o n f , s e l e c t option = 1 for using laserscanner , s e l e c t o p t i o n = 0 f o r not u s i n g l a s e r s c a n n e r , 3 ) then make a l l 4 ) go t o ˜/ w o r s k s p a c e / yourname−l p z r o b o t s −f o r k s / o d e r o b o t s / simulations / template laserscanner 5 ) type make and then . / s t a r t LpzRobots and GoRobotos Installation Manual Page 23 of 30 8 ROS installation 8.1 Step by step ROS i s r e q u i r e d i f you want t o r e a d t h e EEG s i g n a l from s i n g l e dry e l e c t r o d e ( s e e Stoya ’ master t h e s i s , SDU) t o t h e L p z r o b o t s For example , s e e >> p r o j e c t s >> amosi>> e e g b a s e d c o n t r o l Step1 : check h t t p : / / w i k i . r o s . o r g / i n d i g o / I n s t a l l a t i o n /Ubuntu Step2 : C o n f i g u r e your Ubuntu r e p o s i t o r i e s C o n f i g u r e your Ubuntu r e p o s i t o r i e s t o a l l o w ” r e s t r i c t e d , ” ” u n i v e r s e , ” and ” m u l t i v e r s e . ” You can f o l l o w t h e Ubuntu g u i d e f o r i n s t r u c t i o n s on d o i n g t h i s . ( s e e , h t t p s : / / h e l p . ubuntu . com/ community / R e p o s i t o r i e s /Ubuntu ) Step3 : sudo sh −c ’ echo ” deb h t t p : / / p a c k a g e s . r o s . o r g / r o s / ubuntu $ ( l s b r e l e a s e −s c ) main” > / e t c / apt / s o u r c e s . l i s t . d/ r o s −l a t e s t . l i s t ’ Step4 : wget h t t p s : / / raw . g i t h u b u s e r c o n t e n t . com/ r o s / r o s d i s t r o / master / r o s . key −O − | sudo apt−key add − Step5 : sudo apt−g e t update Step6 : sudo apt−g e t i n s t a l l r o s −i n d i g o −desktop− f u l l Step7 : sudo r o s d e p i n i t Step8 : r o s d e p update Step9 : echo ” s o u r c e / opt / r o s / i n d i g o / s e t u p . bash ” >> ˜ / . b a s h r c Step10 : s o u r c e ˜ / . b a s h r c Step11 : sudo apt−g e t i n s t a l l python−r o s i n s t a l l >> S t a r t ROS by type > r o s c o r e >> Adding ROS i n t o L p z r o b o t s s e e MakeFile . c o n f i n >> p r o j e c t s >> amosi>> e e g b a s e d c o n t r o l >>sim pkg−c o n f i g −−c f l a g s r o s c p p >> Then add t h i s i n t o your makeFile . c o n f LpzRobots and GoRobotos Installation Manual Page 24 of 30 −I / opt / r o s / i n d i g o / i n c l u d e #ROS > Run : pkg−c o n f i g −−c f l a g s r o s c p p # This w i l l g i v e you t h e INC path , e . g . , −I / opt / r o s / i n d i g o / i n c l u d e s e e p r o j e c t s >amosi>e e g b a s e d c o n t r o l > f i l t e r i n g c l a s s i f i c a t i o n > MakeFile . c o n f Add t h i s i n t h e MakeFile . c o n f s e e MakeFile . c o n f i n >> p r o j e c t s >> amosi>> e e g b a s e d c o n t r o l >>sim s e e MakeFile . c o n f i n >> p r o j e c t s >>amosi>>e e g b a s e d c o n t r o l >> f i l t e r i n g c l a s s i f i c a t i o n INC += −I / opt / r o s / i n d i g o / i n c l u d e #ROS > Run : pkg−c o n f i g −− l i b s r o s c p p # This w i l l g i v e you t h e LIBS path Add t h i s i n t h e MakeFile . c o n f , s e e MakeFile . c o n f i n >> p r o j e c t s >> amosi>> e e g b a s e d c o n t r o l >>sim s e e MakeFile . c o n f i n >> p r o j e c t s >>amosi>>e e g b a s e d c o n t r o l >> f i l t e r i n g c l a s s i f i c a t i o n LIBS += −L/ opt / r o s / i n d i g o / l i b −l r o s c p p −l p t h r e a d − l : / u s r / l i b / x86 64−l i n u x −gnu/ l i b b o o s t s i g n a l s . s o − l : / u s r / l i b / x86 64−l i n u x −gnu/ l i b b o o s t f i l e s y s t e m . s o − l r o s c o n s o l e −l r o s c o n s o l e l o g 4 c x x −l r o s c o n s o l e b a c k e n d i n t e r f a c e − l : / u s r / l i b / l i b l o g 4 c x x . s o − l : / u s r / l i b / x86 64−l i n u x −gnu/ l i b b o o s t r e g e x . s o −l x ml r p c p p − l r o s c p p s e r i a l i z a t i o n −l r o s t i m e − l : / u s r / l i b / x86 64−l i n u x −gnu/ l i b b o o s t d a t e t i m e . s o −lcpp common − l : / u s r / l i b / x86 64−l i n u x −gnu/ l i b b o o s t s y s t e m . s o − l : / u s r / l i b / x86 64−l i n u x −gnu/ l i b b o o s t t h r e a d . s o − l : / u s r / l i b / x86 64−l i n u x −gnu/ l i b p t h r e a d . s o − l : / u s r / l i b / x86 64−l i n u x −gnu/ l i b c o n s o l e b r i d g e . s o LpzRobots and GoRobotos Installation Manual Page 25 of 30 9 FAQs 9.1 Installation errors in general 9.1.1 Symbol lookup error After installing the ”binutils-gold” package, I get the following error after recompiling my source code: ”./test: symbol lookup error: /usr/local/lib/liburg.so.0: undefined symbol: ZTIN3qrk10CoordinateE” (Note: liburg is a library for the Hokuyo laser scanners from here or via packet manager). As ”binutils-gold” contains a different linker for C++ files, which is optimized for speed, it is likely that this new linker does not link the laser scanner libraries correctly (probably due to ”bad” programming within the drivers). However, this new linker is not necessary for compiling and running lpzrobots, it just speeds up the compilation time. So the solution to the problem is simple: Uninstall ”binutils-gold” and everything works. 9.2 Problem of displaying plots from Guilogger If you cannot display any plots from Guilogger: You need t o i n s t a l l gnuplot −x11 ” sudo apt−g e t i n s t a l l gnuplot −x11 ” 9.3 Cannot complie Lpzrobots I f you cannot c o m p l i e Lpzrobots , you may check i n . b a s h r c \\ You s h o u l d have ‘ ‘ e x p o r t PATH = /home/YOUR USER NAME/ b i n : $PATH’ ’ e . g . , you s h o u l d have a l l t h e s e i n your . b a s h r c # definitions for lpzrobots e x p o r t CPATH= ‘ ‘$HOME/ i n c l u d e ’ ’ e x p o r t LIBRARY PATH= ‘ ‘$HOME/ l i b ’ ’ e x p o r t LD LIBRARY PATH=$ {LD LIBRARY PATH } :$HOME/ l i b : / u s r / l i b / o s g P l u g i n s 3 . 0 . 1 e x p o r t PATH=$ {PATH} :$HOME/ b i n e x p o r t PATH = /home/poma/ b i n :$PATH 9.4 Errors using setUpGoRotobots.sh 9.4.1 Fail to run setUpGoRotobots.sh You might have t o change p e r m i s s i o n i f you cannot e x e c u t e . ‘ ‘ chmod u+x setUpGoRobots . sh ’ ’ You s h o u l d a l s o t r y t o update your system . >> sudo apt−g e t update LpzRobots and GoRobotos Installation Manual Page 26 of 30 I f you f a i l t o c l o n e u s i n g t h e s c r i p t , you c o u l d c l o n e d i r e c t l y a s below ( o t h e r w i s e , s k i p t h i s ) >>/workspace$ g i t c l o n e h t t p s : / / your u s e r name@git . a s s e m b l a . com/ your u s e r name−g o r o b o t s −f o r k . g i t −b master >>/workspace$ g i t c l o n e h t t p s : / / your u s e r name@git . a s s e m b l a . com/ your u s e r name−l p z r o b o t s −f o r k . g i t −b l p z r o b o t s 9.4.2 Error with git clone Whilst cloning the repositories, I encountered the following error: g i t c l o n e h t t p s : / / c r a u t e r b @ g i t . a s s e m b l a . com/ l p z r o b o t s . g i t −b master C l o n i n g i n t o c r a u t e r b −l p z r o b o t s −f o r k . . . Password : remote : Counting o b j e c t s : 2 5 4 7 8 , done . remote : Compressing o b j e c t s : 100% ( 6 0 3 0 / 6 0 3 0 ) , done . remote : T o t a l 25478 ( d e l t a 1 9 2 1 1 ) , r e u s e d 25478 ( d e l t a 1 9 2 1 1 ) R e c e i v i n g o b j e c t s : 100% ( 2 5 4 7 8 / 2 5 4 7 8 ) , 1 9 . 9 7 MiB | 527 KiB/ s , done . R e s o l v i n g d e l t a s : 100% ( 1 9 2 1 1 / 1 9 2 1 1 ) , done . warning : Remote branch master not found i n upstream o r i g i n , u s i n g HEAD i n s t e a d warning : remote HEAD r e f e r s t o n o n e x i s t e n t r e f , u n a b l e t o c h e c k o u t . the repository Lpzrobots when there was no branch master, and for some reason, it was not added later and did not appear anywear. The solution was simple: Delete the forked version and create a new one - if possible. Worked for me. 9.5 Problems with GIT 9.5.1 Setting up Repositories in Eclipse In some cases, the instructions on how to set up the GIT-repositories within Eclipse did not work. Here is a different approach, that worked for me: 1. Import the repositories into the GIT-view of Eclipse, just as described before 2. Instead of importing over the GIT-View, you now go onto File → Import → General → Existing Projects into Workspace and you then choose the two repositories 3. After Eclipse has imported the files, you can right-click on the Project, and then select Team → Share 4. Now, just select GIT and the two GIT-repository-adresses should appear 5. Apply 9.5.2 No Connection to GIT Server: The remote end hung up unexpectedly. If you defined stable as usual (check withgit remote -v): stable https://wbj@git.assembla.com/lpzrobots.git(fetch) LpzRobots and GoRobotos Installation Manual Page 27 of 30 stable https://wbj@git.assembla.com/lpzrobots.git(push) but when typing git fetch origin you get the following error message: Password for ’https://wbj@git.assembla.com’: error: RPC failed; result=22, HTTP code = 401 fatal: The remote end hung up unexpectedly and also defining the origin with http only: stable_http http://wbj@git.assembla.com/lpzrobots.git(fetch) does not help, try to use the git protocol: stable_git2 git@git.assembla.com:lpzrobots.git(fetch) stable_git2 git@git.assembla.com:lpzrobots.git(push) 9.6 Compile Errors 9.6.1 OpenCV highgui missing You are using gorobots as a library build (“new makefile system”) and you are experiencing the following error while trying to compile, you are missing the highgui library development files of the opencv package: u t i l s / r e a l r o b o t s / s e n s o r s / camera / CamTagPositionSensor . h : 1 1 : 3 9 : f a t a l e r r o r : opencv2 / h i g h g u i / h i g h g u i . hpp : No such f i l e o r d i r e c t o r y Install the missing package by typing: $ sudo apt−g e t i n s t a l l l i b o p e n c v −h i g h g u i −dev 9.6.2 C++11 unknown If you are trying to compile and obtain errors related to the flag −s t d=c++11 it means that you finally will have to upgrade your machine as your version of gcc does not support the C++11 flag. 9.6.3 osg::Geometry::BIND PER PRIMITIVE unknown If your version of Open Scene Graph it too recent, you may observe the following error while trying to compile lpzrobots: o s g / o s g p r i m i t i v e . cpp : 6 6 8 : 3 2 : e r r o r : ’ BIND PER PRIMITIVE ’ i s not a member o f ’ o s g : : Geometry ’ One quick fix for this is to just comment out line 668 in osgosgprimitive.cpp. Updating to a more recent version of lpzrobots would resolve the problem as well. 9.6.4 cannot find -ltinyxml2 With the recent version of gorobots where unit test is embedded, you might have this problem after “make” in gorobots: LpzRobots and GoRobotos Installation Manual Page 28 of 30 / u s r / b i n / l d : cannot f i n d −l t i n y x m l 2 c o l l e c t 2 : error : ld returned 1 exit status make : ∗∗∗ [ l i b g o r o b o t s . s o ] E r r o r 1 You need to install -ltinyxml2. For installation, you could use synaptics and search for tinyxml2 and then select ”libtinyxml2-dev and litinyxml2-0.0.0”. 9.7 Errors when starting the simulation The error messages was: > ./ start > . / s t a r t : e r r o r while loading shared l i b r a r i e s : l i b o d e \ dbl . so . 1 : cannot open s h a r e d o b j e c t f i l e : No such f i l e o r d i r e c t o r y B a s i c a l l y when you c o m p i l e l p z −r o b o t t o some l o c a l d i r e c t o r y . The p r o j e c t s cannot s t a r t a s they cannot l o c a t e ” l i b o d e d b l . s o . 1 ” A q u i c k f i x i n v o l v e s making a s y m b o l i c l i n k ( with r o o t p r i v i l e d g e ) t h a t p o i n t s t o t h e f i l e i n your s y s t e m s / l i b / l i b r a r y . The solution was: > source ˜/. bashrc Another s o l u t i o n was : ” sudo l n − s f home/ username / l p z r o b o t s / opende / ode / s r c / . l i b s / l i b o d e d b l . s o . 1 / l i b / l i b o d e d b l . s o . 1 ” i f you u s e Ubuntu v e r s i o n 1 2 . 4 LTS , you might s e e t h i s problem : > ./ start > . / s t a r t : symbol lo oku p e r r o r : / u s r / l i b / l i b g s l . s o . 0 : u n d e f i n e d symbol : c b l a s d n r m 2 The solution was: > sudo apt−g e t remove b i n u t i l s −g o l d 9.8 Using Lpzrobots > > > > > a f t e r s t a r t s i m u l a t i o n , p r e s s 1 t o f i x e d camera view C t r l r = r e c o r d movie . \ s t a r t −f = r e c o r d l o g f i l e . \ s t a r t = s t a r t program . \ s t a r t −g 1 = d i s p l a y GUI 9.9 Using EPuck Monitor 9.9.1 When trying to run qmake, I obtain “unknown QT: widgets” EPuck monitor is optimized for Qt5. If you obtain the “unknown QT: widgets” warning you are most likely using Qt4 by default on your system. Find out how to enable Qt5 by default LpzRobots and GoRobotos Installation Manual Page 29 of 30 on your system. If you are working with Ubuntu 12.04 LTS, the following terminal commands are what you are looking for. They will install Qt5 and enable it as default: $ sudo apt−add−r e p o s i t o r y ppa : ubuntu−sdk−team/ppa $ sudo apt−g e t update $ sudo apt−g e t i n s t a l l q t d e c l a r a t i v e 5 −dev qt5−d e f a u l t 9.10 Serial interface > sudo usermod −a −G d i a l o u t username > Then r e s t a r t your PC 9.11 Public key to push to assembla For t h e f i r s t time t o push from your PC t o assembla , you need t o 1 ) Generate and upload your SSH key ssh−keygen −t r s a −C ” your e m a i l ” 2 ) Copy p u b l i c key ( i d r s a . pub ) i n t o your Assembla P r o f i l e : h t t p s : / /www. a s s e m b l a . com/ u s e r / e d i t / e d i t g i t s e t t i n g s P l e a s e a l s o check i n s t r u c t i o n s on a s s e m b l a : h t t p s : / /www. a s s e m b l a . com/ s p a c e s / dshaikh−g o r o b o t s −f o r k / g i t / i n s t r u c t i o n s LpzRobots and GoRobotos Installation Manual Page 30 of 30
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : No Page Count : 30 Page Mode : UseOutlines Author : Title : Subject : Creator : LaTeX with hyperref package Producer : pdfTeX-1.40.15 Create Date : 2015:09:29 13:50:22+02:00 Modify Date : 2015:09:29 13:50:22+02:00 Trapped : False PTEX Fullbanner : This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) kpathsea version 6.2.1devEXIF Metadata provided by EXIF.tools