You are currently viewing ROS-(Robotic Operating System)

ROS-(Robotic Operating System)

Spread the love

ROS is the open source software libraries used to Robotics based applications. ROS has many features like libraries, drivers, visualizers etc. Now the low cost ROS interface is using Raspberry Pi which has SD Card boot option in which the ROS libraries are installed and can be used for several functionalities such as Autonomous car, Mapping, Path planning and Path following using LIDAR. 


Click below youtube icon to see hardware demo on ROS with LIDAR using Raspberry pi

Click here for Video Demo

Main parts of ROS

  • ROS Workspace
  • ROS Topic
  • ROS Node
  • Publishers
  • Subscribers
  • Service
  • Action
  • Tools of ROS

ROS Workspace

  • Workspace is the folder in the system where several ROS Files are organized.
  • Catkin is the tool which compiles source code files in a project into the binaries
  • Catkin workspace is also one of the workspace that uses catkin as a build tool.
  • Workspace contains 4 main sub folders
    • Build
    • Deval
    • logs
    • src
  • Build– Build space is used to store object files which obtained while doing build process in catkin toolBuild space is used to store object files which obtained while doing build process in catkin tool
  • Deval – ROS environment used for setting up the project lies in the deval folder. It also contains executable of the source files.
  • Logs – Logs contains the debug information which is known as log space associated with various software modules of the projects.
  • SRC – Source folder is used to write the custom code for own ROS application.

ROS Topic

It is the topic in which the scan or any type of data which gets published or subscribed. For example: LIDAR scan data is published in the name of ROS topic “/scan”, which can be received from any ROS Network subscribed to the same ROS topic “/scan”

ROS Topic options

  • rostopic list – It displays the available ros topic list which can be subscribed to receive the data published via the same topic
  • rostopic info </topic name> : It displays the type of the specific ros topic. For example:  rostopic info /scan results the type like Sensor_msgs/LaserScan
  • rostopic echo </topic name>: It continuously displays the message data published in the topic. For example rostopic echo /scan results the complete scan data obtained from the sensors like Ranges, angles, minimum angles, maximum angles etc.
  • /rosout & /rodout_agg are internal topic of ros

ROS Node

ROS Node are the node points which resembles the publishers and subscribers that shows the name of the node acts as publishers and name of the node acts as subscribers. Publishing and subscribing will occur between 2 nodes through the ros topic

ROS Node options

  • rosnode list – It displays the available ROS Nodes
  • rqt_graph – rqt_graph shows the connectivity tree diagram of current networks of ROS, which includes ROS Nodes with its connecting ROS topics etc.

Service

Service is one type of function can be start or stop by calling the service. For example: If we supposed to move the car forward, we can call the forward service, then if supposed to turn right suddenly we can call the right service. So that car breaks the current service and do the latest service command received.

For example: To Start the service:

roslaunch service_demo service_launch.launch

To call the service, below command should be run in another terminal.

rosservice call /service_demo “{}”


Actions

Actions are similar to services, in the sense that they also allow you to code a functionality for your robot, and then provide it so that anyone can call it. The main difference between actions and services is that when you call a service, the robot has to wait until the service has ended before doing something else. On the other hand, when you call an action, your robot can still keep doing something else while performing the action.

For example: Start action :

roslaunch action_demo action_launch.launch

To call the action, below command should be run in another terminal.

roslaunch action_demo_client client_launch.launch


Tools

rviz” is also one of the ROS tools which is used to visualize the mapping obtained while LIDAR is connected publishes the scan data, subscribed and received then displayed in the rviz display tool


ROS in MATLAB

Matlab is also has Software packages for Robotic Operating System(ROS), we can use Matlab programming for processing LIDAR scans or any processing by connecting Laptop with the same network at which the ROS device is connected. So that by using ROS Network configurations you can able to communicate with ROS hardware from Matlab.

For example: By setting Env in Matlab you can communicate with the ROS

setenv('ROS_IP','192.168.1.6');
setenv('ROS_HOSTNAME','192.168.1.6');
setenv('ROS_MASTER_URI','http://192.168.1.12:11311');
  • In the above env setting,
  • ROS_IP address 192.168.1.6 is the IP address of the System where matlab is installed
  • ROS_HOSTNAME is also same the PC’s IP Address
  • ROS_MASTER_URI is the IP address of the ROS system, which already configured 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.