**3.3 Hierarchical modular design**

Layering is an important concept in software design. The division of layers provides a framework for business decomposition and simplifies many thinking processes. Considering the design characteristics of the software system and the functional features of the robot, the entire software architecture can be divided into four layers: presentation layer, application layer, sense layer, and data layer. The hierarchical modular design architecture is shown in **Figure 9**.



**117**

*Manipulating Complex Robot Behavior for Autonomous and Continuous Operations*

environmental perception and a motion module responsible for the motion control of the upper and lower computers. Sense layer is a description of the

4.Data layer: Data layer serves the data generated by the system. Part of the data generated by the system is stored in a local database for real-time decision making of the system. One part is uploaded to the server through the network and is fused with data from other robots and other time dimensions to plan the

The criteria for the division of functional modules are to reduce coupling, relatively independent functions, and high code repeatability. According to the robot's task module, the software system can be divided into motion (*motion\_pkg*), control (*control\_pkg*), vision (*vision\_pkg*), visualization (*visualization\_pkg*), collaboration (*coorperation\_pkg*), database (*database\_pkg*), and network (*network\_pkg*). Each function module is represented as a function package at the file system layer. There can be multiple nodes in a package, and different nodes can be written in different

Finite state machine (FSM) is a mathematical model of computational science. The objects it represents can be in a limited number of states at any one time. When an external input occurs, the system responds to the external input, and the FSM can conditionally transition from one state to another. This process is called an action. In computer science, finite state machines are widely used for modeling application behavior, hardware circuit system design, software engineering, compilers, network protocols, and computation and language research. FSM can be defined by the present state, condition, action, and substate. The specific interpretation is as follows:

*DOI: http://dx.doi.org/10.5772/intechopen.92254*

robot's capabilities.

**Figure 10.** *Presentation layer.*

programming languages.

*3.4.1 SMACH*

continuous operation of the robot.

**3.4 Cooperative control of dual-arm picking based on FSM**

**Figure 9.** *Layered modular architecture design.*

*Manipulating Complex Robot Behavior for Autonomous and Continuous Operations DOI: http://dx.doi.org/10.5772/intechopen.92254*

**Figure 10.** *Presentation layer.*

*Service Robotics*

analysis and understanding of the robot's internal architecture, we divide the functions of the robot into seven modules, each of which is functionally independent of each other. Combining the above two is a hierarchical modular design, which divides the functional modules into a specific layer according to the attributes of the functions, thus strengthening the logic of the system.

2.Finite state machine control: In order to solve the shortcomings of behaviorbased architecture, we have designed a task planning module based on finite state machines, which is used to schedule and control the execution order of

Layering is an important concept in software design. The division of layers provides a framework for business decomposition and simplifies many thinking processes. Considering the design characteristics of the software system and the functional features of the robot, the entire software architecture can be divided into four layers: presentation layer, application layer, sense layer, and data layer. The

1.Presentation layer: Presentation layer has more business logic requirements. We designed the presentation layer based on the QT architecture. The entire presentation layer includes several main components as shown in **Figure 10**: the RVIZ module displays the model of the robot and other visual information; the image module displays the video image information collected by the current robot; the node module monitors all current node information; and the DashBoard module provides users with a function module for manually operating the robot; shell module provides command line functions; console module displays all log information executed by the system; reconfigure module provides users with a convenient tool for changing model parameters; and

diagnostic module provides real-time robot monitoring information.

combination of function modules to coordinate a task.

2.Application layer: Application layer focuses on the task execution of a single robot. It is separated from the implementation of specific functions and uses a

3.Sense layer: Sense layer is responsible for the interaction between the software system and the hardware. There are both a visual module responsible for

each functional module to complete a specific task.

hierarchical modular design architecture is shown in **Figure 9**.

**3.3 Hierarchical modular design**

**116**

**Figure 9.**

*Layered modular architecture design.*

environmental perception and a motion module responsible for the motion control of the upper and lower computers. Sense layer is a description of the robot's capabilities.

4.Data layer: Data layer serves the data generated by the system. Part of the data generated by the system is stored in a local database for real-time decision making of the system. One part is uploaded to the server through the network and is fused with data from other robots and other time dimensions to plan the continuous operation of the robot.

The criteria for the division of functional modules are to reduce coupling, relatively independent functions, and high code repeatability. According to the robot's task module, the software system can be divided into motion (*motion\_pkg*), control (*control\_pkg*), vision (*vision\_pkg*), visualization (*visualization\_pkg*), collaboration (*coorperation\_pkg*), database (*database\_pkg*), and network (*network\_pkg*). Each function module is represented as a function package at the file system layer. There can be multiple nodes in a package, and different nodes can be written in different programming languages.
