RNCManipal / ROS_for_Beginners

For getting started with ROS
1 stars 3 forks source link

Task 3 (Beginner): First package #5

Open TheProjectsGuy opened 4 years ago

TheProjectsGuy commented 4 years ago

In this issue, you'll make the first package in your workspace.

Deadline for the tasks described here: Thu, 27 Aug 2020

Prerequisites

It is required that you complete #4 before you proceed with this task.

Package naming convention

So that we're all on the same page, the following naming convention must be used: <Language>_<Pkg name>. <Language> is Cpp for C++ packages and Py for Python package. You may use either. The <Pkg_name>, package name suffix, will be given. So for example, if the <Pkg_name> is given as ArgParser and you choose to use Python for the task, then the name of the package you'll be creating must be Py_ArgParser.

Code file naming convention

The code file names will be given with every task (when required).

Tasks

The following tasks have to be accomplished by every individual.

Navigating ROS File system

Learn about the ROS File system in #7

First Package

Create a package for this task. Package name suffix must be Pkg1. So the package name must be Py_Pkg1 or Cpp_Pkg1.

Argument Parser

Every program that is launched is passed arguments (at least the directory if nothing is passed). These can be accessed using the sys module in Python and the arguments in the main function in C++. Your program must print the arguments passed to the program (in whatever format you like). Use the resources to find help creating the packages, writing code, building (if necessary) and running / testing your code.

Code file name: ArgsParser.py or ArgsParser.cpp (ArgsParser executable name)

Publisher and Subscriber

Publishers and subscribers are used to send messages on streams called "topics".

Publisher

A node that publishes a string and a number (could be anything).

Code file name: SimplePublisher.pyor SimplePublisher.cpp (SimplePublisher executable name)

Subscriber

A node that subscribes to two topics (one gets strings and another gets numbers) and prints them on the terminal.

Code file name: SimpleSubscriber.py or SimpleSubscriber.cpp (SimpleSubscriber executable name)

References