Projekt

Ogólne

Profil

Lab1 » Historia » Wersja 19

Dawid Seredyński, 2019-07-24 16:22

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 15 Dawid Seredyński
* The tutor adds teams and their members to organization PW-EITI-ANRO-SUMMER-19 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 18 Dawid Seredyński
* Installing and Configuring Your ROS Environment: attachment:tutorial_ros_1.pdf
21 1 Dawid Seredyński
22 13 Tomek Winiarski
 * *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 7 Tomek Winiarski
 * When creating your Catkin workspace (*Create a ROS Workspace*) use default setting for catkin
24 18 Dawid Seredyński
* Navigating the ROS Filesystem: attachment:tutorial_ros_2.pdf
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 18 Dawid Seredyński
* Creating a ROS Package: attachment:tutorial_ros_3.pdf
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 7 Tomek Winiarski
 * 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 members 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 18 Dawid Seredyński
* Building a ROS Package: attachment:tutorial_ros_4.pdf
36 2 Dawid Seredyński
37 3 Dawid Seredyński
 * This section describes build procedure for your package.
38 18 Dawid Seredyński
* Understanding ROS Nodes: attachment:tutorial_ros_5.pdf
39 2 Dawid Seredyński
40 3 Dawid Seredyński
 * You can run your Node in this tutorial.
41 19 Dawid Seredyński
* Understanding ROS Topics: attachment:tutorial_ros_6.pdf
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 19 Dawid Seredyński
* Understanding ROS Services and Parameters: attachment:tutorial_ros_7.pdf
47 2 Dawid Seredyński
48 4 Dawid Seredyński
 * To use TAB key autocompletion, begin paths with / key
49 19 Dawid Seredyński
* Using rqt_console and roslaunch: attachment:tutorial_ros_8.pdf
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 16 Dawid Seredyński
* Ask the tutor to add your github user to 'PW-EITI-ANRO-SUMMER-19' organisation on GitHub
83 11 Tomek Winiarski
84 16 Dawid Seredyński
* Create 'anro-TEAM_NAME' repository in 'PW-EITI-ANRO-SUMMER-19' organisation on GitHub, using github page. The 'TEAM_NAME' should be a specific name of your team.
85 8 Tomek Winiarski
86 5 Dawid Seredyński
* Update *.rosinstall* file in your workspace, i.e. add the following line:
87 2 Dawid Seredyński
88 16 Dawid Seredyński
 * <pre>- git: {local-name: src/anro-TEAM_NAME, uri: 'https://github.com/PW-EITI-ANRO-SUMMER-19/anro-TEAM_NAME.git', version: 'master'}</pre>
89 6 Dawid Seredyński
 * If the file is missing, create your workspace using command *wstool init*
90 1 Dawid Seredyński
91 5 Dawid Seredyński
* Pull repositories using command *wstool update*
92 2 Dawid Seredyński
93 5 Dawid Seredyński
 * The created repository cannot be empty. If it is empty, you can add README file in GitHub.
94 5 Dawid Seredyński
* Change current directory to src/anro-TEAM_NAME
95 5 Dawid Seredyński
* Create a new ROS package in the directory.
96 5 Dawid Seredyński
* Write a program (in C++ or Python) that controls the turtle:
97 2 Dawid Seredyński
98 5 Dawid Seredyński
 * The keys used to control the turtle should be different than in tutorial, e.g. g d p l.
99 5 Dawid Seredyński
 * The list of keys that control the turtle should be loaded from ROS parameter server. The server starts automatically with roscore.
100 5 Dawid Seredyński
* Add roslaunch file, that runs turtle node and control node.
101 5 Dawid Seredyński
* Test the node and show it to the tutor.
102 5 Dawid Seredyński
103 5 Dawid Seredyński
h2. Git repository:
104 5 Dawid Seredyński
105 5 Dawid Seredyński
* After the node is properly written and works:
106 5 Dawid Seredyński
107 5 Dawid Seredyński
 * Add all files, except output file using command *git add*
108 5 Dawid Seredyński
 * Commit local changes using command *git commit*
109 5 Dawid Seredyński
 * Upload the changes to GitHub server using command *git push*
110 5 Dawid Seredyński
* Add 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 system and communication methods.
111 5 Dawid Seredyński
* During the presentation to the tutor pull the package from the GitHub server.