ROS Mobile

What is ROS?

ROS is an open-source software framework designed for robotics operating systems. It provides a hardware abstraction layer that allows developers to build robotics applications without needing to worry about the specifics of the hardware being used.

ROS also includes a variety of tools for visualizing and debugging robot data. At its core, ROS is a message-passing middleware that enables processes to communicate and exchange data, even when running on different machines. This message-passing can be either synchronous or asynchronous.

ROS organizes software into packages, which promotes modularity and reusability. By leveraging the message-passing middleware and hardware abstraction layer provided by ROS, developers can build a wide range of robotic capabilities, including mapping and navigation for mobile robots.

The Filesystem Level

The Filesystem Level

The filesystem in ROS comprises various components, including metapackages, packages, package manifests, messages, services, codes, and miscellaneous files.

Here’s a brief description of each component:

  • Metapackages: Metapackages are used to group together packages for a specific application, such as the navigation metapackage for mobile robot navigation.
  • Packages: Packages are the primary unit of organization in ROS, and may contain nodes, datasets, and configuration files.
  • Package manifest: Each package includes a manifest file called package.xml, which contains information about the package, including its name, version, author, license, and dependencies.
  • Messages (msg): Messages, used for communication purposes in ROS, are defined in files with the .msg extension.
  • Service (srv): Services, which are used for communication at the computation graph level, are defined in files with the .srv extension.

The Computation Graph level

The ROS computation graph consists of nodes, topics, messages, the master, the parameter server, services, and bags.

Computation Graph level


Nodes: In ROS, nodes are processes that use APIs to communicate with each other. Robots may have multiple nodes for different tasks, such as hardware interfacing, laser scan reading, and localization. You can create these nodes using ROS client libraries like roscpp and rospy.

Master: The ROS master acts as an intermediary node that facilitates communication between different nodes and maintains information about all the nodes in the ROS environment.

Parameter server: A parameter server is a tool that allows nodes to store variables and set their visibility. All the nodes can access these variables if they have a global scope. The ROS parameter runs along with the ROS master.

ROS nodes can communicate with each other through various methods, including messages, topics, services, and bags.

Messages: Messages are data structures used to exchange data.

Topics: Topics are named buses for message exchange, in which data is exchanged using ROS messages. Each topic uses a specific name, and one node will publish data to a topic and another node can read from the topic by subscribing to it.

Services: Services are a form of communication similar to topics, but instead of using a publish-subscribe interaction, they use a request-reply method. In this process, one node acts as a service provider, running a service routine, while a client node sends a request for a service. The service provider executes the routine and sends the result back to the client, which must wait for the server’s response before continuing.

Bags: Bags are a useful tool in ROS for recording and playing back topics. They can be useful for testing and debugging, especially in situations where hardware is not available. Rosberg allows users to record sensor data and save it in a bag file, which they can then copy to other computers and play it back for data inspection.

An Example of Communication in ROS

Communication in ROS 


There are two nodes, named talker and listener. The talker node publishes a string message called Hello World into a topic called /talker, and the listener node is subscribed to this topic.

Here’s what happens at the three marked stages in the diagram above

  1. You must start the ROS Master before running any nodes in ROS. Once it is running, it will wait for nodes to connect. When you launch a talker node (publisher), it will first connect to the ROS Master and share the information about the topic it will publish, including the topic name, message type, and URI of the publishing node. The URI of the master is a global value that all nodes can use to connect. The master maintains a table of publishers connected to it and updates the table automatically whenever a publisher’s details change.
  2. When starting a listener node (subscriber), it will connect to the ROS Master and share information about the node, including the topic it will subscribe to, the message type, and the node’s URI. The master also maintains a table of subscribers, similar to the publisher table.
  3. If a subscriber and publisher subscribe to the same topic, the ROS Master facilitates a connection between them by sharing the publisher’s URI with the subscriber. Therefore, once they connect, they exchange data directly, and the master no longer takes part in the communication process. Instead, the data flows directly between the nodes as they become interconnected.

What is ROS-Mobile?

It is a highly customizable ROS application for Android devices that allows for remote control and monitoring of mobile robotic systems. The application follows the MVVM architecture and includes simple testing structures and extensibility.

Currently Available ROS Nodes

ROS-Mobile supports the following nodes.:

  • Debug (similar to rostopic echo)
  • Joystick (geometry_msgs/Twist)
  • GridMap (nav_msgs/OccupancyGrid)
  • Camera (sensor_msgs/Image, sensor_msgs/CompressedImage)
  • GPS (sensor_msgs/NavSatFix)
  • Button (std_msgs/Bool)
  • Logger (std_msgs/String)

Components of ROS-Mobile

  • Master Tab: We have to establish a ROS connection over WLAN with the system. This allows us to control the robot by publishing ROS messages, such as velocity commands, and visualize published measurement results, such as map data. We connect the application to the ROS master running on the robot via WLAN by entering the correct IP address. This enables us to analyze the system’s behavior and interact with the robot remotely.
  • Details Tab: By adding  nodes in the details tab, we can control the differential drive robot using a joystick method that sends a topic, and we can visualize the generated occupancy grid map by subscribing to the map topic using a GridMap method.
  • VIZ Tab: In this tab, we can see various controls for the robot. For example, in the visualization tab, as shown in Figure 3d (given below), we can view the recorded occupancy grid map and a joystick. You can use the joystick to send control inputs over the cmd_vel topic to the robot by touching it.
  • SSH Tab: We use the secure shell tab to connect our mobile directly to the operating system.


Components of ROS-Mobile


How XAVOR Can Help in Robotics

Robotics is one of those emerging technologies that have the potential to significantly change the world as we know it. It will wield enormous influence on how individuals live their lives and companies conduct their businesses. Thus, it is an IT field teeming with exciting opportunities as companies turn to robots to do everything formerly done by humans.

Xavor has vast experience in embedded technologies and provides solutions that solve your problems. Xavor can help:

  • Automate your office, commercial buildings, or home electronics.
  • Develop mobile applications to control things.
  • Increase the healthcare system’s efficiency by automating medical machinery.

 If you want to use Robotics or build a ROS application, contact us at [email protected].

Let's make it happen

We love fixing complex problems with innovative solutions. Get in touch to let us know what you’re looking for and our solution architect will get back to you soon.