Lab1 » Historia » Wersja 23
Dawid Seredyński, 2019-07-24 16:37
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 | 23 | 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 | 23 | 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 | 23 | 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 | 23 | 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 | 23 | 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 | 23 | 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 | 23 | 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 | 23 | 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 | 23 | Dawid Seredyński | # Using rosed to edit files in ROS: attachment:tutorial_ros_9.pdf |
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 | 23 | Dawid Seredyński | # Creating a ROS msg and srv: attachment:tutorial_ros_10.pdf |
56 | 2 | Dawid Seredyński | |
57 | 3 | Dawid Seredyński | * You should *source* your *setup.bash* file in your workspace directory. |
58 | 23 | 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 | 23 | Dawid Seredyński | # Writing a Simple Publisher and Subscriber (Python): attachment:tutorial_ros_12.pdf |
62 | 2 | Dawid Seredyński | |
63 | 4 | Dawid Seredyński | * Create subscriber and publisher nodes in Python. |
64 | 22 | Dawid Seredyński | * source code for talker node: attachment:talker.py |
65 | 22 | Dawid Seredyński | * source code for listener node: attachment:listener.py |
66 | 23 | Dawid Seredyński | # Examining the Simple Publisher and Subscriber: attachment:tutorial_ros_13.pdf |
67 | 2 | Dawid Seredyński | |
68 | 4 | Dawid Seredyński | * Console output can differ slightly from the tutorial webpage. |
69 | 23 | Dawid Seredyński | # Writing a Simple Service and Client (C++) |
70 | 2 | Dawid Seredyński | |
71 | 4 | Dawid Seredyński | * Create service and client nodes in C++. |
72 | 23 | Dawid Seredyński | # Writing a Simple Service and Client (Python): attachment:tutorial_ros_15.pdf |
73 | 2 | Dawid Seredyński | |
74 | 4 | Dawid Seredyński | * Create service and client nodes in Python. |
75 | 23 | Dawid Seredyński | # Examining the Simple Service and Client: attachment:tutorial_ros_16.pdf |
76 | 2 | Dawid Seredyński | |
77 | 4 | Dawid Seredyński | * The same test as in the previous tutorial |
78 | 23 | Dawid Seredyński | # Recording and playing back data |
79 | 2 | Dawid Seredyński | |
80 | 4 | Dawid Seredyński | * Topics data can be recorded and played back. |
81 | 2 | Dawid Seredyński | |
82 | 2 | Dawid Seredyński | h2. The task: |
83 | 2 | Dawid Seredyński | |
84 | 16 | Dawid Seredyński | * Ask the tutor to add your github user to 'PW-EITI-ANRO-SUMMER-19' organisation on GitHub |
85 | 11 | Tomek Winiarski | |
86 | 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. |
87 | 8 | Tomek Winiarski | |
88 | 5 | Dawid Seredyński | * Update *.rosinstall* file in your workspace, i.e. add the following line: |
89 | 2 | Dawid Seredyński | |
90 | 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> |
91 | 6 | Dawid Seredyński | * If the file is missing, create your workspace using command *wstool init* |
92 | 1 | Dawid Seredyński | |
93 | 5 | Dawid Seredyński | * Pull repositories using command *wstool update* |
94 | 2 | Dawid Seredyński | |
95 | 5 | Dawid Seredyński | * The created repository cannot be empty. If it is empty, you can add README file in GitHub. |
96 | 5 | Dawid Seredyński | * Change current directory to src/anro-TEAM_NAME |
97 | 5 | Dawid Seredyński | * Create a new ROS package in the directory. |
98 | 5 | Dawid Seredyński | * Write a program (in C++ or Python) that controls the turtle: |
99 | 2 | Dawid Seredyński | |
100 | 5 | Dawid Seredyński | * The keys used to control the turtle should be different than in tutorial, e.g. g d p l. |
101 | 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. |
102 | 5 | Dawid Seredyński | * Add roslaunch file, that runs turtle node and control node. |
103 | 5 | Dawid Seredyński | * Test the node and show it to the tutor. |
104 | 5 | Dawid Seredyński | |
105 | 5 | Dawid Seredyński | h2. Git repository: |
106 | 5 | Dawid Seredyński | |
107 | 5 | Dawid Seredyński | * After the node is properly written and works: |
108 | 5 | Dawid Seredyński | |
109 | 5 | Dawid Seredyński | * Add all files, except output file using command *git add* |
110 | 5 | Dawid Seredyński | * Commit local changes using command *git commit* |
111 | 5 | Dawid Seredyński | * Upload the changes to GitHub server using command *git push* |
112 | 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. |
113 | 5 | Dawid Seredyński | * During the presentation to the tutor pull the package from the GitHub server. |