Giter Site home page Giter Site logo

beginner_tutorials's Introduction

ROS beginner tutorial of Publisher Subscriber

License: MIT

Implementation of ROS publisher and subscriber in roscpp

Pre-requisite

The project requires ROS kinectic and catkin, and is developed on UBUNTU 16.04 LTS.

To install ROS please follow the tutorial on: http://wiki.ros.org/kinetic/Installation

To Install catkin: http://wiki.ros.org/catkin

Link for the tutorial: http://wiki.ros.org/ROS/Tutorials/NavigatingTheFilesystem

Build

Before building make sure ROS kinetic and catkin are installed.

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_make
source devel/setup.bash
cd src/
git clone -b Week10_HW --single-branch https://github.com/NithishkumarS/beginner_tutorials.git 
cd ..
catkin_make

Running Demo

To run the demo open a new terminal and type

roscore

To run talker open a new terminal and type

cd catkin_ws
source devel/setup.bash
rosrun beginner_tutorials talker

To run listener open a new terminal and type

cd catkin_ws
source devel/setup.bash
rosrun beginner_tutorials listener

To stop the program press ctrl+C in each of the three terminals.

Using service to modify the base string

To modify the default text run the demo either using the launch file as mentioned above (or you can run the demo without the launch file as explained above)

After the demo starts open a new terminal and type

cd catkin_ws
source devel/setup.bash
rosservice call /modifyText <your string>

You will notice that the default text changes to the text you have entered.

an example would be

rosservice call /changeString Nithish

Changing the chatter frequency via command line using launch file

To modify the loop frequency open run the demo using launch file using the following command

roslaunch beginner_tutorials Week10.launch use_param:=<int value greater than 0>

an example would be

roslaunch beginner_tutorials hw10.launch frequency:=15

Modifying the severity type

After starting the demo run this is a seperate terminal

rosservice call /talker/set_logger_level ros.beginner_tutorials <logger_level>

beginner_tutorials's People

Contributors

nithishkumars avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.