Projekt

Ogólne

Profil

Lab1 » Historia » Wersja 13

« Poprzednie - Wersja 13/23 (diff) - Następne » - Obecna wersja
Tomek Winiarski, 2018-07-17 15:48


Lab 1: Introduction to ROS www.ros.org

Preparation

  • Teams are formed
  • The tutor adds teams and their members to organization PW-EITI-ANRO-SUMMER-18 on GitHub.
  • Introduction to the laboratories.

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

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 workspace (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 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.
    • 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.

The task:

  • Ask the tutor to add your github user to 'PW-EITI-ANRO-SUMMER-18' organisation on GitHub
  • Create 'anro-TEAM_NAME' repository in 'PW-EITI-ANRO-SUMMER-18' organisation on GitHub, using github page. The 'TEAM_NAME' should be a specific name of your team.
  • Update .rosinstall file in your workspace, i.e. add the following line:
    • git: {local-name: src/anro-TEAM_NAME, uri: 'https://github.com/PW-EITI-ANRO-SUMMER-18/anro-TEAM_NAME.git', version: 'master'}
    • If the file is missing, create your workspace using command wstool init
  • Pull repositories using command wstool update
    • The created repository cannot be empty. If it is empty, you can add README file in GitHub.
  • Change current directory to src/anro-TEAM_NAME
  • Create a new ROS package in the directory.
  • Write a program (in C++ or Python) that controls the turtle:
    • The keys used to control the turtle should be different than in tutorial, e.g. g d p l.
    • The list of keys that control the turtle should be loaded from ROS parameter server. The server starts automatically with roscore.
  • Add roslaunch file, that runs turtle node and control node.
  • Test the node and show it to the tutor.

Git repository:

  • After the node is properly written and works:
    • Add all files, except output file using command git add
    • Commit local changes using command git commit
    • Upload the changes to GitHub server using command git push
  • 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.
  • During the presentation to the tutor pull the package from the GitHub server.

tutorial_ros_1.pdf - ROS tutorial: Installing and Configuring Your ROS Environment (87,8 KB) Dawid Seredyński, 2019-07-24 16:14

tutorial_ros_2.pdf - ROS tutorial: Navigating the ROS Filesystem (114 KB) Dawid Seredyński, 2019-07-24 16:15

tutorial_ros_3.pdf - ROS tutorial: Creating a ROS Package (108 KB) Dawid Seredyński, 2019-07-24 16:16

tutorial_ros_4.pdf - ROS tutorial: Building a ROS Package (95,5 KB) Dawid Seredyński, 2019-07-24 16:16

tutorial_ros_5.pdf - ROS tutorial: Understanding ROS Nodes (122 KB) Dawid Seredyński, 2019-07-24 16:17

tutorial_ros_6.pdf - ROS tutorial: Understanding ROS Topics (518 KB) Dawid Seredyński, 2019-07-24 16:20

tutorial_ros_7.pdf - ROS tutorial: Understanding ROS Services and Parameters (133 KB) Dawid Seredyński, 2019-07-24 16:20

tutorial_ros_8.pdf - ROS tutorial: Using rqt_console and roslaunch (512 KB) Dawid Seredyński, 2019-07-24 16:21

tutorial_ros_9.pdf - ROS tutorial: Using rosed to edit files in ROS (107 KB) Dawid Seredyński, 2019-07-24 16:22

tutorial_ros_10.pdf - ROS tutorial: Creating a ROS msg and srv (129 KB) Dawid Seredyński, 2019-07-24 16:23

tutorial_ros_12.pdf - ROS tutorial: Writing a Simple Publisher and Subscriber (Python) (135 KB) Dawid Seredyński, 2019-07-24 16:24

tutorial_ros_13.pdf - ROS tutorial: Examining the Simple Publisher and Subscriber (81,3 KB) Dawid Seredyński, 2019-07-24 16:25

tutorial_ros_15.pdf - ROS tutorial: Writing a Simple Service and Client (Python) (107 KB) Dawid Seredyński, 2019-07-24 16:26

tutorial_ros_16.pdf - ROS tutorial: Examining the Simple Service and Client (74,1 KB) Dawid Seredyński, 2019-07-24 16:27

talker.py Magnifier - Script for ROS tutorial 12 (2,17 KB) Dawid Seredyński, 2019-07-24 16:33

listener.py Magnifier - Script for ROS tutorial 12 (2,35 KB) Dawid Seredyński, 2019-07-24 16:34