Skip to main content

Posts

Showing posts from May, 2020

Basic ROS programming on Windows 10 - Publisher and Subscriber nodes

We've seen how to install ROS in Windows 10 in  this article  and how to write the Hello World in this article . Today lets go further and lets write some advanced and very basic programming in ROS, Publisher and Subscriber nodes in Windows 10. A transmitter and a recipient can be compared to the publishers and subscribers used in ROS message communication. The transmitter is called publisher in ROS, and the recipient is called subscriber. This section is intended to establish a simple message file, and to build and run nodes for Publisher and Subscriber. First we have to create a package with dependencies inside the source folder in catkin workspace. To create a new message the 'message generation' package will be required. 'Std msgs' is the standard ROS message package and the client library to use C/C++ in ROS is 'roscpp'. While creating the package, these dependent packages can be included. They can also be added after creating the 'package...

Hello World project in ROS on Windows 10

We've seen how to install ROS in Windows 10 in this article, this is the time to start programming. What is the very first thing we do once we setup a new Programming Language? Hello World !!! Lets see how to write Hello World in ROS on Windows machine. Before going into the programming, make sure you've installed Gedit on your Windows machine. You can get it from here. Also, setup the path for Gedit and restart your machine to ensure the path definition works. First open the ROS terminal and check for the working directory. We have to be in the catkin workspace. If you've already created it, go to that directory. Or else, create it like this. Create a src folder inside catkin_ws. Inside that newly created src folder, lets create a new package in it. The command to create a ROS package is as follows. >catkin_create_pkg [PACKAGE_NAME] [DEPENDENT_PACKAGE_1] ....[DEPENDENT_PACKAGE_N] ‘std_msgs’ and ‘roscpp’ were added as optional dependent packages...