3.1. Sports model
Currently, the chassis of inspection robots mainly consists of legged, tracked, and wheeled types, each with its advantages and disadvantages in different environments. Legged inspection robots have strong terrain adaptability, but their structure and control system are complex. Tracked inspection robots have high traction and strong applicability in complex terrains such as outdoor, sandy, and muddy areas, but their speed is relatively low, and they have high motion noise. Wheeled inspection robots have fast speed, high efficiency, and low motion noise, and are widely used. In this paper, we focus on the complex indoor factory environment and adopt a two-wheel differential wheeled robot whose kinematic model is shown in
Figure 4 [
21].
In
Figure 4, the motion of robot
is completed by two independently driven wheels. Let the radius of the driving wheel be
, and define the midpoint of the two driving wheels as
. The distance between the two wheels is
, where
is the inertial Cartesian coordinate system, and
is the local coordinate system of the robot.
is the speed of the left driving wheel,
is the speed of the right wheel, and
is the speed of the center of the robot. If
, the angular velocity
can be obtained. According to the robot model, the forward speed depends on the speed of the wheels.
The angular velocity
is determined by the difference in speed between the left and right driving wheels and the distance between them.
In the ideal case, according to the principle of rigid motion, the trajectory of the robot is a circle, and the radius can be expressed as
The kinematic equation of the robot can be expressed as
The above formula is the pose state matrix and motion state matrix, and the final formula can be written as follows:
where
is a
smooth linearly independent matrix, and
V is the motion matrix of the robot.
3.2. Path Planning
The path planning of inspection robots mainly relies on the constructed grid map to generate a safe and collision-free path by specifying the start and target locations. The path planning for robots can be divided into global path planning and local path planning.
(1) Global path planning
To ensure that the patrol robot can effectively avoid obstacles globally and locally, and considering that the grid map of the actual road scene is relatively simple, the A-star algorithm is used as the global path planning method to provide accurate obstacle avoidance directions for the robot through real-time planning [
22,
23]. A-star combines heuristic search with breadth-first algorithm to select the search direction through the cost function
, and expands around the starting point. The cost value of each surrounding node is calculated by the heuristic function
, and the minimum cost value is selected as the next expanding point. This process is repeated until the endpoint is reached, generating a path from the starting point to the endpoint. In the search process, since each node on the path is the node with the minimum cost, the cost of the path obtained is also minimum. The cost function of the A-star algorithm is
where
is the cost function at the current position,
is the cost value from the starting position to the current position in the search space, and
is the cost value from the current position to the goal position. In the A-star algorithm, the selection of the heuristic function is crucial. Since the map environment is a grid map with obstacles, the Manhattan distance is used as the heuristic function, which is given by:
where
,
represent the coordinates from the current position to the target position. In the path planning of the A-star algorithm, the nodes are stored in two lists, Closelist and Openlist. The nodes that have been searched and generated cost values are stored in Openlist. The node with the minimum estimated cost is stored in Closelist, and the moving trajectory is formed by processing the trajectories of each node in Closelist. The specific steps are as follows:
Step 1.The starting point s of the robot is the first calculated point, and the surrounding nodes are added to Openlist, and the cost function of each point is calculated.
Step 2.Search Openlist, select the node with the smallest cost value as the current processing node n, remove the node from Openlist, and put it into Closelist.
Step 3.If the real cost value of the adjacent node from the current processing node to the starting point s is smaller than the original value, the parent node of the adjacent node is set to the current processing node; if it is larger, the current processing node is removed from Closelist, and the node with the second smallest value of is selected as the current processing node.
Step 4.Repeat the above steps until the target point g is added to Closelist, traverse along each parent node, and the obtained node coordinates are the path.
(2)Local path planning
The working environment of inspection robots is not always static. In the process of moving along the global path, real-time obstacles may appear. To avoid collisions, the Timed-Elastic-Band (TEB) algorithm, which introduces local path planning with time elasticity, is used on the basis of global path planning to achieve real-time obstacle avoidance [
24]. The TEB algorithm is an optimization algorithm that follows the path generated by the global path planner. The local trajectory it generates is composed of a series of continuous time and pose sequences, and the robot’s pose is defined as:
where
represents the i-th pose in the robot coordinate system, including position information
,
and angle
. The time interval between adjacent poses
and
is denoted by
, as shown in
Figure 5.
In the optimization process, the TEB algorithm applies graph optimization to the adjacent time intervals and states of the robot as nodes, and uses velocity, acceleration, and non-holonomic constraints of the robot as edges. It also considers obstacle information, discrete interval of planned trajectory, and adjacent temporal and spatial sequence constraints. Finally, the G2O solver is used to calculate the control variable
(where
v and
represent the linear and angular velocity of the robot, respectively), to obtain the optimal trajectory. The TEB algorithm obtains the optimal pose points through weighted multi-objective optimization [
25,
26], where the mathematical description of the objective function is:
where
is the objective function that considers various constraints,
is the constraint function,
is the weight of each item, and
is the optimal TEB trajectory. The TEB algorithm has four constraint functions.
1) Path following and obstacle constraint objective function
The TEB algorithm aims to avoid collisions with static or dynamic obstacles while following the path. The algorithm treats piecewise continuous and differentiable functions as constraints and punishes behaviors that do not conform to the constraints. Specifically:
Building on Equation (
18), penalty functions
and
are constructed. Here,
denotes the boundary,
is the offset factor, S is the scaling factor, n is the order,
is the independent variable representing the distance between the path point and obstacle,
is the maximum distance of the trajectory deviation from the path point, and
is the minimum distance between the trajectory and obstacle.
2) The velocity and acceleration constraint functions of a robot
According to the dynamic equation, the constraint functions of the robot’s velocity and acceleration are expressed as equations (21) - (24) :
3) Non-holonomic constraint:
The robot used in the algorithm simulation and experiment is a differential drive structure with two degrees of freedom, which cannot perform translational motion along the y-axis of the robot coordinate system. The curvature of the circular arc between two adjacent robot poses is approximately constant, and the outer product of the direction vector
and the turning angle
between adjacent poses in the robot coordinate system is equal to the outer product of the turning angle
and the direction vector
.
represents the orientation of the robot in the global coordinate system, and the corresponding relationship equation and non-holonomic constraint are:
The objective function punishes the quadratic error for violating this constraint, ensuring that the output velocity of the robot follows the non-holonomic constraint.
4) Fastest path constraint
The TEB algorithm incorporates the time interval information between poses, and the total time is the sum of all time intervals. The relevant objective function is:
After optimizing the TEB sequence, the objective function of the constraints is optimized to ensure that the path planned by the algorithm achieves the best results in terms of obstacle avoidance, time, and distance.
(3)Path planning based on fusion algorithm
The A-star algorithm yields a navigation path consisting of only the start point, key points, and destination point, but it cannot avoid unknown obstacles in the environment. The TEB algorithm exhibits good local obstacle avoidance ability, but with only a single final goal point as a guide, it is prone to becoming trapped in local optima. Therefore, we propose a hybrid path planning algorithm that combines the strengths of both algorithms. The specific algorithm process is shown in
Figure 6.
Global path planning takes a static obstacle cost map as input, and does not consider the robot’s mechanical performance and kinematic constraints when planning the path. It uses the A-star algorithm to plan the optimal path from the robot’s current position to the desired target position, and provides an initial value for local planning.
Local path planning collects path nodes on the global optimal path, and optimizes the global path subset between the robot’s current node and the collected path nodes. It combines the static obstacle cost map and dynamic obstacle cost map, and uses the TEB algorithm to continuously adjust the pose and orientation of the robot during its movement, taking into account its shape, dynamic model, and motion performance in the scope of local planning. When encountering dynamic obstacles, it removes the old robot pose and adds a new robot pose, so that a new path can be generated in each iteration, and an optimized path can be obtained through continuous iteration.
By fusing navigation algorithms, we achieve optimal global path planning and real-time obstacle avoidance functionality in the process of mobile robot navigation.