ROS Basics
So you came across something called ROS, maybe from the internet or XYZ platform. So maybe you have so many questions about what is ROS and how it is working etc...right? So in this blog, we are discussing the basics of ROS with which you can start your little projects. So let's start
All innovative robots running on ROS.
ROS full form is Robotic Operating System, it is a distributed framework And its free open source platform. you can use Python and C++ script to run your robot. So ROS is introduced to reuse research work done by others. So you just need to download and clone the repository and start working. If you need a laser scan code, just clone it and utilise it according to your need. ROS allow you to write code in different RosNodes.
The below diagram shows the basic structure of ROS
The main part of ROS
- ROS MASTER- Master Node used to locate the different nodes available in the network
- ROSNODES- small user-defined script of code inside rosnetwork which can be accessed by other nodes
- ROS MESSAGE- information about the type of data to be sent
- ROS SERVICES- service of ros which enables a user to send a request to get data from a particular node.
Don't worry let me explain to you by an example, Assume that "Node A" want to send a message to "Node B" then both nodes should have to be connected with ROSMASTER. If they are not connected with ROSMASTER the Node A and Node B both don't have any possible way to transfer data with each other. ROSMASTER acts as a bridge between them.
Now, what is ROS Service: Here we send request to get data from a particular node. For example, if we want to check the status of the camera is ON or OFF... we just send a request and camera-related node will respond back with camera status.
Real-Time Example: Assume we have a Robot which has sensors and motors attached to it. So here We will write two Nodes one is for sensors to get data by subscribing(Sensor Node) and one is for the motor to send data publishing(MotorNode). To know more about publishing and subscribing visit(.....will update soon....) Both nodes are registered with ROSMASTER. So here we get sensor information by the sensor node, compute the velocity and will be sent to motors by the motor nodes.
So likewise we can write many nodes separately and we can easily access any node information.