Lab1 » Historia » Wersja 4
Dawid Seredyński, 2018-06-13 12:24
1 | 1 | Dawid Seredyński | h1. Lab 1: Introduction to ROS www.ros.org |
---|---|---|---|
2 | 1 | Dawid Seredyński | |
3 | 1 | Dawid Seredyński | h2. Preparation |
4 | 1 | Dawid Seredyński | |
5 | 1 | Dawid Seredyński | * Teams are formed |
6 | 1 | Dawid Seredyński | * The tutor adds teams and their members to organization PW-EITI-ANRO-SUMMER-18 on GitHub. |
7 | 1 | Dawid Seredyński | * Introduction to the laboratories. |
8 | 1 | Dawid Seredyński | |
9 | 1 | Dawid Seredyński | h2. Scope: |
10 | 1 | Dawid Seredyński | |
11 | 1 | Dawid Seredyński | * Getting familiar with ROS tutorials (http://wiki.ros.org/ROS/Tutorials) |
12 | 1 | Dawid Seredyński | |
13 | 1 | Dawid Seredyński | * Read and follow Core ROS Tutorials->Beginner Level without sections: Getting started with roswtf, Navigating the ROS wiki, Where Next? |
14 | 1 | Dawid Seredyński | * We advise you to type commands instead of copying them from the webpage. This should help you remember them. |
15 | 1 | Dawid Seredyński | * Writing your own ROS package. |
16 | 1 | Dawid Seredyński | * Uploading your results (source code) to GitHub |
17 | 1 | Dawid Seredyński | |
18 | 3 | Dawid Seredyński | h2. Detailed hints for ROS Tutorials: |
19 | 1 | Dawid Seredyński | |
20 | 1 | Dawid Seredyński | * Installing and Configuring Your ROS Environment |
21 | 1 | Dawid Seredyński | |
22 | 3 | Dawid Seredyński | * 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. |
23 | 3 | Dawid Seredyński | * When creating your Catkin worskpace (*Create a ROS Workspace*) use default setting for catkin |
24 | 1 | Dawid Seredyński | * Navigating the ROS Filesystem |
25 | 2 | Dawid Seredyński | |
26 | 3 | Dawid Seredyński | * As in the previous tutorial, stick to a single version of Catkin for all tasks. |
27 | 3 | Dawid Seredyński | * ROS package ros-tutorials is already installed in the lab. |
28 | 3 | Dawid Seredyński | * The command *roscd log* works only if *roscore* is already running. You can run *roscore* in another terminal. |
29 | 2 | Dawid Seredyński | * Creating a ROS Package |
30 | 1 | Dawid Seredyński | |
31 | 3 | Dawid Seredyński | * Remember to set needed paths using *source* command with proper arguments (your workspace directory). Use this also in the following tasks/tutorials. |
32 | 3 | Dawid Seredyński | * *Do not* follow the section *package dependencies* in the lab. |
33 | 3 | Dawid Seredyński | * 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. |
34 | 3 | Dawid Seredyński | * 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. |
35 | 2 | Dawid Seredyński | * Building a ROS Package |
36 | 2 | Dawid Seredyński | |
37 | 3 | Dawid Seredyński | * This section describes build procedure for your package. |
38 | 2 | Dawid Seredyński | * Understanding ROS Nodes |
39 | 2 | Dawid Seredyński | |
40 | 3 | Dawid Seredyński | * You can run your Node in this tutorial. |
41 | 2 | Dawid Seredyński | * Understanding ROS Topics |
42 | 2 | Dawid Seredyński | |
43 | 3 | Dawid Seredyński | * The graph in rqt_graph differs slightly from the one shown in webpage, but it is okay. |
44 | 3 | Dawid Seredyński | * We use newer distribution of ROS (Kinetic instead of Hydro). |
45 | 3 | Dawid Seredyński | * Video Tutorial can be omitted. |
46 | 2 | Dawid Seredyński | * Understanding ROS Services and Parameters |
47 | 2 | Dawid Seredyński | |
48 | 4 | Dawid Seredyński | * To use TAB key autocompletion, begin paths with / key |
49 | 2 | Dawid Seredyński | * Using rqt_console and roslaunch |
50 | 2 | Dawid Seredyński | |
51 | 3 | Dawid Seredyński | * Look of some windows differ slightly from tutorial webpage, but it does not matter. |
52 | 2 | Dawid Seredyński | * Using rosed to edit files in ROS |
53 | 2 | Dawid Seredyński | |
54 | 3 | Dawid Seredyński | * Default program for editing with *rosed* can be set using *.bashrc* file in your home directory. |
55 | 2 | Dawid Seredyński | * Creating a ROS msg and srv |
56 | 2 | Dawid Seredyński | |
57 | 3 | Dawid Seredyński | * You should *source* your *setup.bash* file in your workspace directory. |
58 | 2 | Dawid Seredyński | * Writing a Simple Publisher and Subscriber (C++) |
59 | 2 | Dawid Seredyński | |
60 | 4 | Dawid Seredyński | * Create subscriber and publisher nodes in C++. |
61 | 1 | Dawid Seredyński | * Writing a Simple Publisher and Subscriber (Python) |
62 | 2 | Dawid Seredyński | |
63 | 4 | Dawid Seredyński | * Create subscriber and publisher nodes in Python. |
64 | 2 | Dawid Seredyński | * Examining the Simple Publisher and Subscriber |
65 | 2 | Dawid Seredyński | |
66 | 4 | Dawid Seredyński | * Console output can differ slightly from the tutorial webpage. |
67 | 2 | Dawid Seredyński | * Writing a Simple Service and Client (C++) |
68 | 2 | Dawid Seredyński | |
69 | 4 | Dawid Seredyński | * Create service and client nodes in C++. |
70 | 2 | Dawid Seredyński | * Writing a Simple Service and Client (Python) |
71 | 2 | Dawid Seredyński | |
72 | 4 | Dawid Seredyński | * Create service and client nodes in Python. |
73 | 2 | Dawid Seredyński | * Examining the Simple Service and Client |
74 | 2 | Dawid Seredyński | |
75 | 4 | Dawid Seredyński | * The same test as in the previous tutorial |
76 | 2 | Dawid Seredyński | * Recording and playing back data |
77 | 2 | Dawid Seredyński | |
78 | 4 | Dawid Seredyński | * Topics data can be recorded and played back. |
79 | 2 | Dawid Seredyński | |
80 | 2 | Dawid Seredyński | h2. The task: |
81 | 2 | Dawid Seredyński | |
82 | 2 | Dawid Seredyński | * W katalogu roboczym wykorzystywanym podczas przechodzenia przewodnika aktualizujemy plik .rosinstall rozszerzając go (dodająć linię( o repozytorium z organizacji GitHub przedmiotu |
83 | 2 | Dawid Seredyński | |
84 | 2 | Dawid Seredyński | *<pre>git: {local-name: src/anro-NAZWA_ZESPOLU, uri: 'https://github.com/PW-EITI-ANRO-NUMER_SEMESTRU/anro-NAZWA_ZESPOLU.git', version: 'master'}</pre> |
85 | 2 | Dawid Seredyński | * Jeśli nie ma tego pliku należy wywołać wstool init |
86 | 2 | Dawid Seredyński | |
87 | 2 | Dawid Seredyński | * Pobieramy repozytoria wywołując polecenie wstool update |
88 | 2 | Dawid Seredyński | * Pobierane repozytorium nie może być puste. Jeżeli jest puste można mu dodać np. plik README z poziomu GitHub |
89 | 2 | Dawid Seredyński | * wchodzimy do podkatalogu src |
90 | 2 | Dawid Seredyński | * Wchodzimy do podkatalogu anro-NAZWA_ZESPOLU |
91 | 2 | Dawid Seredyński | * W tym katalogu tworzymy nowy pakiet ROS |
92 | 2 | Dawid Seredyński | * Za pomocą dowolnego z dwóch języków (C++, Python) tworzymy program, który będzie służył do sterowania żółwiem |
93 | 2 | Dawid Seredyński | * Program powinien zapewnić sterowanie za pomocą innych klawiszy niż oryginalnie w przewodniku, np: g d p l. |
94 | 2 | Dawid Seredyński | * Klawisze, którymi się steruje, powinny być wczytywane z serwera parametrów. Serwer parametrów startuje automatycznie po uruchomieniu roscore. |
95 | 2 | Dawid Seredyński | * Dołączamy plik roslaunch, który uruchomi węzeł żółwia i węzeł sterowania |
96 | 2 | Dawid Seredyński | * Testujemy system i przedstawiamy prowadzącemu do oceny |
97 | 2 | Dawid Seredyński | |
98 | 2 | Dawid Seredyński | h2. git repository: |
99 | 2 | Dawid Seredyński | |
100 | 2 | Dawid Seredyński | * Zakładamy, że pakiet ROS jest poprawnie napisany |
101 | 2 | Dawid Seredyński | * Dodajemy wszystkie pliki oprócz wynikowych za pomocą polecenia git add |
102 | 2 | Dawid Seredyński | * Całość komitujemy lokalnie za pomocą polecenia git commit |
103 | 2 | Dawid Seredyński | * na serwer wgrywamy poleceniem git push |
104 | 2 | Dawid Seredyński | * W ramach nowo utworzonego repozytorium na serwerze GitHub z własnym pakietem dodajemy wiki z opisem plików źródłowych oraz instrukcją jak uruchomić system opisany w pliku roslaunch. Dodatkowo schemat i opis struktury systemu wraz z użytymi mechanizmami komunikacji. |
105 | 2 | Dawid Seredyński | * Podczas prezentacji prowadzącemu pobieramy pakiet z serwera GitHub. |