Lab1 » Historia » Wersja 5
Wersja 4 (Dawid Seredyński, 2018-06-13 12:24) → Wersja 5/23 (Dawid Seredyński, 2018-06-13 15:39)
h1. Lab 1: Introduction to ROS www.ros.org
h2. Preparation
* Teams are formed
* The tutor adds teams and their members to organization PW-EITI-ANRO-SUMMER-18 on GitHub.
* Introduction to the laboratories.
h2. Scope:
* Getting familiar with ROS tutorials (http://wiki.ros.org/ROS/Tutorials)
* Read and follow Core ROS Tutorials->Beginner Level without sections: Getting started with roswtf, Navigating the ROS wiki, Where Next?
* We advise you to type commands instead of copying them from the webpage. This should help you remember them.
* Writing your own ROS package.
* Uploading your results (source code) to GitHub
h2. Detailed hints for ROS Tutorials:
* Installing and Configuring Your ROS Environment
* ROS and all needed packages are already installed on computers in the laboratory. You do not have to install anything during the class, but you are welcome to install ROS on your own PC.
* When creating your Catkin worskpace (*Create a ROS Workspace*) use default setting for catkin
* Navigating the ROS Filesystem
* As in the previous tutorial, stick to a single version of Catkin for all tasks.
* ROS package ros-tutorials is already installed in the lab.
* The command *roscd log* works only if *roscore* is already running. You can run *roscore* in another terminal.
* Creating a ROS Package
* Remember to set needed paths using *source* command with proper arguments (your workspace directory). Use this also in the following tasks/tutorials.
* *Do not* follow the section *package dependencies* in the lab.
* The last section, *Customizing Your Package* is important. You can use any text editor to modify package.xml file (e.g. *gedit*, *vim* in terminal). Add to package.xml name of one of memebers of your team. To build your workspace use *catkin_make* command (described in the next section). The command should check for errors (at least some of them) in package.xml and CMakeLists.txt files.
* To compile use command *catkin_make* with proper arguments. You can also use other build commands for catkin, e.g. *catkin_make_isolated* or catkin tools in default devel mode. However you should stick to one compilation method through the whole course.
* Building a ROS Package
* This section describes build procedure for your package.
* Understanding ROS Nodes
* You can run your Node in this tutorial.
* Understanding ROS Topics
* The graph in rqt_graph differs slightly from the one shown in webpage, but it is okay.
* We use newer distribution of ROS (Kinetic instead of Hydro).
* Video Tutorial can be omitted.
* Understanding ROS Services and Parameters
* To use TAB key autocompletion, begin paths with / key
* Using rqt_console and roslaunch
* Look of some windows differ slightly from tutorial webpage, but it does not matter.
* Using rosed to edit files in ROS
* Default program for editing with *rosed* can be set using *.bashrc* file in your home directory.
* Creating a ROS msg and srv
* You should *source* your *setup.bash* file in your workspace directory.
* Writing a Simple Publisher and Subscriber (C++)
* Create subscriber and publisher nodes in C++.
* Writing a Simple Publisher and Subscriber (Python)
* Create subscriber and publisher nodes in Python.
* Examining the Simple Publisher and Subscriber
* Console output can differ slightly from the tutorial webpage.
* Writing a Simple Service and Client (C++)
* Create service and client nodes in C++.
* Writing a Simple Service and Client (Python)
* Create service and client nodes in Python.
* Examining the Simple Service and Client
* The same test as in the previous tutorial
* Recording and playing back data
* Topics data can be recorded and played back.
h2. The task:
* Update *.rosinstall* file in your workspace, i.e. add the following line: W katalogu roboczym wykorzystywanym podczas przechodzenia przewodnika aktualizujemy plik .rosinstall rozszerzając go (dodająć linię( o repozytorium z organizacji GitHub przedmiotu
* <pre>git: *<pre>git: {local-name: src/anro-TEAM_NAME, src/anro-NAZWA_ZESPOLU, uri: 'https://github.com/PW-EITI-ANRO-SUMMER-18/anro-TEAM_NAME.git', 'https://github.com/PW-EITI-ANRO-NUMER_SEMESTRU/anro-NAZWA_ZESPOLU.git', version: 'master'}</pre>
* To create your workspace use command *wstool init* Jeśli nie ma tego pliku należy wywołać wstool init
* Pull repositories using command *wstool update*
Pobieramy repozytoria wywołując polecenie wstool update
* The created repository cannot be empty. If it is empty, you can add Pobierane repozytorium nie może być puste. Jeżeli jest puste można mu dodać np. plik README file in GitHub. z poziomu GitHub
* Change current directory to src/anro-TEAM_NAME wchodzimy do podkatalogu src
* Create a new Wchodzimy do podkatalogu anro-NAZWA_ZESPOLU
* W tym katalogu tworzymy nowy pakiet ROS package in the directory.
* Write a program (in C++ or Za pomocą dowolnego z dwóch języków (C++, Python) that controls the turtle:
tworzymy program, który będzie służył do sterowania żółwiem
* The keys used to control the turtle should be different than in tutorial, e.g. Program powinien zapewnić sterowanie za pomocą innych klawiszy niż oryginalnie w przewodniku, np: g d p l.
* The list of keys that control the turtle should be loaded from ROS parameter server. The server starts automatically with Klawisze, którymi się steruje, powinny być wczytywane z serwera parametrów. Serwer parametrów startuje automatycznie po uruchomieniu roscore.
* Add roslaunch file, that runs turtle node and control node. Dołączamy plik roslaunch, który uruchomi węzeł żółwia i węzeł sterowania
* Test the node and show it to the tutor. Testujemy system i przedstawiamy prowadzącemu do oceny
h2. Git git repository:
* After the node is properly written and works:
Zakładamy, że pakiet ROS jest poprawnie napisany
* Add all files, except output file using command *git add*
Dodajemy wszystkie pliki oprócz wynikowych za pomocą polecenia git add
* Commit local changes using command *git commit*
Całość komitujemy lokalnie za pomocą polecenia git commit
* Upload the changes to GitHub server using command *git push* na serwer wgrywamy poleceniem git push
* Add W ramach nowo utworzonego repozytorium na serwerze GitHub z własnym pakietem dodajemy wiki page to your repository (the documentation). The page should contain description of source files and instruction for launching. Additionally, add graph and description of structure of the z opisem plików źródłowych oraz instrukcją jak uruchomić system and communication methods. opisany w pliku roslaunch. Dodatkowo schemat i opis struktury systemu wraz z użytymi mechanizmami komunikacji.
* During the presentation to the tutor pull the package from the GitHub server. Podczas prezentacji prowadzącemu pobieramy pakiet z serwera GitHub.
h2. Preparation
* Teams are formed
* The tutor adds teams and their members to organization PW-EITI-ANRO-SUMMER-18 on GitHub.
* Introduction to the laboratories.
h2. Scope:
* Getting familiar with ROS tutorials (http://wiki.ros.org/ROS/Tutorials)
* Read and follow Core ROS Tutorials->Beginner Level without sections: Getting started with roswtf, Navigating the ROS wiki, Where Next?
* We advise you to type commands instead of copying them from the webpage. This should help you remember them.
* Writing your own ROS package.
* Uploading your results (source code) to GitHub
h2. Detailed hints for ROS Tutorials:
* Installing and Configuring Your ROS Environment
* ROS and all needed packages are already installed on computers in the laboratory. You do not have to install anything during the class, but you are welcome to install ROS on your own PC.
* When creating your Catkin worskpace (*Create a ROS Workspace*) use default setting for catkin
* Navigating the ROS Filesystem
* As in the previous tutorial, stick to a single version of Catkin for all tasks.
* ROS package ros-tutorials is already installed in the lab.
* The command *roscd log* works only if *roscore* is already running. You can run *roscore* in another terminal.
* Creating a ROS Package
* Remember to set needed paths using *source* command with proper arguments (your workspace directory). Use this also in the following tasks/tutorials.
* *Do not* follow the section *package dependencies* in the lab.
* The last section, *Customizing Your Package* is important. You can use any text editor to modify package.xml file (e.g. *gedit*, *vim* in terminal). Add to package.xml name of one of memebers of your team. To build your workspace use *catkin_make* command (described in the next section). The command should check for errors (at least some of them) in package.xml and CMakeLists.txt files.
* To compile use command *catkin_make* with proper arguments. You can also use other build commands for catkin, e.g. *catkin_make_isolated* or catkin tools in default devel mode. However you should stick to one compilation method through the whole course.
* Building a ROS Package
* This section describes build procedure for your package.
* Understanding ROS Nodes
* You can run your Node in this tutorial.
* Understanding ROS Topics
* The graph in rqt_graph differs slightly from the one shown in webpage, but it is okay.
* We use newer distribution of ROS (Kinetic instead of Hydro).
* Video Tutorial can be omitted.
* Understanding ROS Services and Parameters
* To use TAB key autocompletion, begin paths with / key
* Using rqt_console and roslaunch
* Look of some windows differ slightly from tutorial webpage, but it does not matter.
* Using rosed to edit files in ROS
* Default program for editing with *rosed* can be set using *.bashrc* file in your home directory.
* Creating a ROS msg and srv
* You should *source* your *setup.bash* file in your workspace directory.
* Writing a Simple Publisher and Subscriber (C++)
* Create subscriber and publisher nodes in C++.
* Writing a Simple Publisher and Subscriber (Python)
* Create subscriber and publisher nodes in Python.
* Examining the Simple Publisher and Subscriber
* Console output can differ slightly from the tutorial webpage.
* Writing a Simple Service and Client (C++)
* Create service and client nodes in C++.
* Writing a Simple Service and Client (Python)
* Create service and client nodes in Python.
* Examining the Simple Service and Client
* The same test as in the previous tutorial
* Recording and playing back data
* Topics data can be recorded and played back.
h2. The task:
* Update *.rosinstall* file in your workspace, i.e. add the following line: W katalogu roboczym wykorzystywanym podczas przechodzenia przewodnika aktualizujemy plik .rosinstall rozszerzając go (dodająć linię( o repozytorium z organizacji GitHub przedmiotu
* <pre>git: *<pre>git: {local-name: src/anro-TEAM_NAME, src/anro-NAZWA_ZESPOLU, uri: 'https://github.com/PW-EITI-ANRO-SUMMER-18/anro-TEAM_NAME.git', 'https://github.com/PW-EITI-ANRO-NUMER_SEMESTRU/anro-NAZWA_ZESPOLU.git', version: 'master'}</pre>
* To create your workspace use command *wstool init* Jeśli nie ma tego pliku należy wywołać wstool init
* Pull repositories using command *wstool update*
Pobieramy repozytoria wywołując polecenie wstool update
* The created repository cannot be empty. If it is empty, you can add Pobierane repozytorium nie może być puste. Jeżeli jest puste można mu dodać np. plik README file in GitHub. z poziomu GitHub
* Change current directory to src/anro-TEAM_NAME wchodzimy do podkatalogu src
* Create a new Wchodzimy do podkatalogu anro-NAZWA_ZESPOLU
* W tym katalogu tworzymy nowy pakiet ROS package in the directory.
* Write a program (in C++ or Za pomocą dowolnego z dwóch języków (C++, Python) that controls the turtle:
tworzymy program, który będzie służył do sterowania żółwiem
* The keys used to control the turtle should be different than in tutorial, e.g. Program powinien zapewnić sterowanie za pomocą innych klawiszy niż oryginalnie w przewodniku, np: g d p l.
* The list of keys that control the turtle should be loaded from ROS parameter server. The server starts automatically with Klawisze, którymi się steruje, powinny być wczytywane z serwera parametrów. Serwer parametrów startuje automatycznie po uruchomieniu roscore.
* Add roslaunch file, that runs turtle node and control node. Dołączamy plik roslaunch, który uruchomi węzeł żółwia i węzeł sterowania
* Test the node and show it to the tutor. Testujemy system i przedstawiamy prowadzącemu do oceny
h2. Git git repository:
* After the node is properly written and works:
Zakładamy, że pakiet ROS jest poprawnie napisany
* Add all files, except output file using command *git add*
Dodajemy wszystkie pliki oprócz wynikowych za pomocą polecenia git add
* Commit local changes using command *git commit*
Całość komitujemy lokalnie za pomocą polecenia git commit
* Upload the changes to GitHub server using command *git push* na serwer wgrywamy poleceniem git push
* Add W ramach nowo utworzonego repozytorium na serwerze GitHub z własnym pakietem dodajemy wiki page to your repository (the documentation). The page should contain description of source files and instruction for launching. Additionally, add graph and description of structure of the z opisem plików źródłowych oraz instrukcją jak uruchomić system and communication methods. opisany w pliku roslaunch. Dodatkowo schemat i opis struktury systemu wraz z użytymi mechanizmami komunikacji.
* During the presentation to the tutor pull the package from the GitHub server. Podczas prezentacji prowadzącemu pobieramy pakiet z serwera GitHub.