Skip to main content

Posts

Showing posts from February, 2023

How to write Publisher Subscriber in ROS Noetic | Step by Step instructions

ROS1 Noetic -Publisher and Subscriber Example This post tells about the implementation of a publisher and a subscriber in ROS Noetic.   In this example, we have considered the following: Example 1:  One publisher (pub.py) and one Subscriber (Sub.py) Topic: first_lecture Message: String Message  Example 2: Two publishers (pub.py and pub1.py) and Two subscribers (sub.py and sub1.py) Topic: first_lecture   See the following video for step by step instructions for running this example: The following picture shows the nodes (The picture is taken by running the rqt_graph command) Publisher Subscriber in ROS Noetic How to run in ROS Noetic Prerequsities  1. Ubuntu Basic commands 2. PATH Setting in Ubuntu 3. Basic knowledge of Linux  4. Programming fundamentals To Install ROS1 Noetic in Ubuntu 20.04, you can refer the following video in my channel. ROS is enabled with a catkin make system which perform the easier build operation and cross compilation enablemen...

Telnet and FTP in Wired networks using NS2 (Network Simulator 2)

Telnet and FTP for a Wired Networks This post tells about the use of Telnet and FTP in Network Simulator 2 for a wired network. This can be extended to a wireless network as well. The following is the source code for implementing Telnet and FTP application in a Wired network scenario.  The network looks like this: Telnet in NS2 Node 0 to Node 2 is enabled with Telnet Application and Node 1 to Node 3 is enabled with FTP Application.  Save the following file as wired.tcl #=================================== # Simulation parameters setup #=================================== set val(stop) 10.0 ;# time of simulation end #=================================== # Initialization #=================================== #Create a ns simulator set ns [new Simulator] #Open the NS trace file set tracefile [open out.tr w] $ns trace-all $tracefile #Open the NAM trace file set namfile [open out.nam w] $ns namtrace-all $namfile #=================================== # ...