Skip to content

VBot2410/beginner_tutorials

Repository files navigation

beginner_tutorials

ROS Beginner Tutorials

License: MIT

Overview

This project contains a ROS package named "beginner_tutorials".
This project covers a tutorial on how to write a simple publisher and subscriber node in C++.
The package and code is taken directly from ROS Tutorials.

Dependencies

ROS

ROS should be installed on the system. This package is tested on Ubuntu 16.04 LTS with ROS Kinetic Distribution.
Installation Instructions can be found here.

catkin

catkin is a Low-level build system macros and infrastructure for ROS.
catkin is included by default when ROS is installed. It can also be installed with apt-get

sudo apt-get install ros-kinetic-catkin

Build Instructions

Creating a catkin workspace

Create a catkin workspace using following instructions:

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/
$ catkin_make

Running catkin_make command the first time in your workspace will create a CMakeLists.txt link in your 'src' folder. Before continuing source your new setup.*sh file:

$ source devel/setup.bash

Building the Package inside catkin workspace

Clone the package in src folder of catkin workspace using following commands:

$ cd ~/catkin_ws/src/
$ git clone https://github.com/VBot2410/beginner_tutorials.git

Then build the package using following commands:

$ cd ~/catkin_ws/
$ catkin_make

Running The Demo

Open a terminal and run following commands:

$ cd ~/catkin_ws
$ source devel/setup.bash
$ roslaunch beginner_tutorials Tutorial.launch

You may also specify custom message and Frequency by using arg:=value. For example, to launch with Message "Hi!" & Frequency 100Hz,

roslaunch beginner_tutorials Tutorial.launch Message:="Hi!" Frequency:=100

For the custom message to take effect, open a new terminal & follow these instructions:

$ cd ~/catkin_ws
$ source devel/setup.bash
$ rosrun beginner_tutorials modify

Using rosservice to call the service

Open a new terminal after following the above instructions for running the Demo

$ cd ~/catkin_ws
$ source devel/setup.bash
rosservice call /String_Modify Message:"Modified String"

The message broadcasted by talker will be changed to "Modified String". You may use any custom string while using above command.

About

ROS Beginner Tutorials

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published