Mobile robot path planning method and system in man-machine co-fusion environment

Through deep reinforcement learning combined with robot-centered obstacle avoidance area and pedestrian detection, a natural, continuous and safe navigation path is generated, which solves the problem of unsafe mobile robot navigation in the existing technology and improves pedestrian comfort.

CN118567362APending Publication Date: 2024-08-30SUZHOU UNIV

Patent Information

Application Number
CN202410678440.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The existing technology cannot fully consider the feelings of pedestrians when navigating mobile robots in a human-machine integrated environment, resulting in unsafe and unnatural paths that cannot meet pedestrian comfort requirements, and are prone to collisions with pedestrians, especially in crowded environments.

Method used

The deep reinforcement learning method is used to combine the robot-centered obstacle avoidance area initialization, global path generation, pedestrian detection and lidar data input to generate a natural, continuous and safe path through the trained deep reinforcement learning model, taking into account the position and movement direction of pedestrians. and velocity, output linear velocity and angular velocity commands.

Benefits of technology

It generates a navigation path with high comfort and safety for pedestrians, avoids collision with pedestrians, improves the naturalness and continuity of navigation, and meets the comfort requirements of pedestrians.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567362A
    Figure CN118567362A
Patent Text Reader

Abstract

The invention relates to a mobile robot path planning method and system in a man-machine co-fusion environment, and the method comprises the steps: taking a robot as a center to initialize a pedestrian obstacle avoidance region, and receiving end point information; generating a global path according to the current position information and the terminal point information of the robot; the robot detects the pedestrian to obtain the pose information of the pedestrian; whether the pedestrian is in the obstacle avoidance area is judged according to the position of the pedestrian, and only the pedestrian in the pedestrian obstacle avoidance area is considered; generating a window end point according to the pedestrian obstacle avoidance area and the global path, and taking the window end point as a temporary end point; inputting various data related to the robot into the trained deep reinforcement learning model, and outputting a linear velocity and an angular velocity for controlling the robot; the robot navigates to advance according to the linear velocity and the angular velocity; and judging whether the robot arrives at the terminal. According to the invention, a continuous, natural and safe path meeting the comfort of pedestrians can be planned for the robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot path planning, and in particular to a method and system for mobile robot path planning in a human-machine collaborative environment. Background Art

[0002] In recent years, breakthroughs in artificial intelligence technology have brought huge opportunities to the research of mobile service robots. At present, mobile service robots such as guide robots, sweeping robots, shopping guide robots, and cargo handling robots have been successfully applied to human-machine integration environments such as airports, supermarkets, museums, and homes. This requires robots to not only avoid ordinary obstacles, but also pay full attention to the feelings of pedestrians and keep a suitable distance from them. The dynamic obstacle avoidance algorithm in the current mainstream navigation framework usually regards pedestrians as dynamic obstacles and avoids pedestrians through passive reactions. The generated path is unsafe and unnatural and cannot meet the requirements of pedestrian comfort. Therefore, it is hoped that the robot will fully consider the feelings of pedestrians during the navigation process, keep a proper distance from pedestrians during the navigation process, and use deep reinforcement learning methods to generate a natural, continuous and comfortable path for pedestrians.

[0003] Existing methods such as Risk-RRT (Risk-Biased Rapidly Exploring Random Trees) algorithm is a path planning algorithm that combines the fast path search and risk assessment of Rapidly Exploring Random Trees (RRT) to produce safer and more reliable paths. This algorithm is particularly suitable for path planning problems of robots, self-driving vehicles and other autonomous systems. However, the path generated by this algorithm usually needs further optimization, such as reducing the curvature of the path through a smooth trajectory generation algorithm or other techniques to make it more suitable for actual execution.

[0004] The current dynamic obstacle avoidance algorithm based on robot speed sampling only regards pedestrians as obstacles in a human-machine co-existence environment, while ignoring the feelings of pedestrians, causing the mobile robot to sometimes get too close to pedestrians during navigation, intruding into their private space, causing psychological discomfort to pedestrians. In a crowded environment, the current method causes the robot to take unnatural, short-sighted and unsafe movements. When the pedestrian moves faster, it may even collide with the pedestrian, resulting in path planning failure. For example, in a human-machine co-existence environment, when the robot detects an oncoming pedestrian, it does not consider the direction of movement to bypass the pedestrian in advance, but only considers it when navigating near the pedestrian. However, due to the attraction of the navigation destination, the robot cannot stop path planning, so it outputs a very discontinuous trajectory, causing the robot to stagnate, rotate or shake, thereby affecting the normal passage of pedestrians. Summary of the invention

[0005] Therefore, the technical problem to be solved by the present invention is to overcome the prior art.

[0006] In order to solve the above technical problems, the present invention provides a mobile robot path planning method in a human-machine collaborative environment, comprising:

[0007] S1: Initialize the pedestrian obstacle avoidance area with the robot as the center and receive the end point information;

[0008] S2: Generate a global path based on the robot's current position information and end point information;

[0009] S3: The robot detects the pedestrian to obtain the pedestrian's posture information, where the posture information includes moving direction, moving speed, and position;

[0010] S4: Determine whether the pedestrian is in the obstacle avoidance area based on the pedestrian's position, and only consider pedestrians in the obstacle avoidance area;

[0011] S5: Generate a window endpoint according to the pedestrian obstacle avoidance area and the global path, and use the window endpoint as a temporary endpoint;

[0012] S6: Input the robot's lidar data, the pedestrian's moving direction, moving speed, position relative to the robot, and the position of the temporary end point relative to the robot into the trained deep reinforcement learning model, and output the linear velocity and angular velocity used to control the robot;

[0013] S7: The robot navigates forward according to the linear velocity and angular velocity;

[0014] S8: Determine whether the robot has reached the end point. If it has, the navigation ends; if it has not, return to step S2 until the robot reaches the end point.

[0015] In one embodiment of the present invention, the robot in S3 detects the pedestrian to obtain the pedestrian's position and posture information, including the following steps:

[0016] S31: The robot captures surrounding images in real time;

[0017] S32: Detect pedestrians in the surrounding images using the YOLOV7_tiny algorithm;

[0018] S33: When a pedestrian is detected, the position information of the pedestrian in the image coordinate system is obtained, and then the position information of the pedestrian is converted from the image coordinate system to the camera coordinate system and then to the world coordinate system. Assume that the coordinates of the pedestrian in the image coordinate system are (u, v) and the coordinates of the pedestrian in the camera coordinate system are (x c ,y c ,z c), the coordinates in the world coordinate system are (x, y, z), then the following mapping relationship is satisfied:

[0019]

[0020]

[0021]

[0022] in, represents the position of the pedestrian in the world coordinate system, and σ() represents the position of the pedestrian in the camera coordinate system;

[0023] To facilitate the actual conversion calculation, homogeneous coordinates are used to represent the camera parameters, and the conversion from a two-dimensional point (u, v) to a three-dimensional point (x, y, z) is expressed as:

[0024]

[0025] Among them, R represents the rotation matrix of the camera in the world coordinate system, and T represents the translation matrix of the camera in the world coordinate system. represents the 0 vector, f x ,f y ,c x ,c y All are camera internal parameters;

[0026] S34: Calculate the moving direction and moving speed of the pedestrian according to the change of the pedestrian's position information in adjacent time periods in the world coordinate system.

[0027] In one embodiment of the present invention, the step S4 of determining whether the pedestrian is in the obstacle avoidance area according to the position of the pedestrian includes the following steps:

[0028] S41: Based on the position information of the pedestrian in the world coordinate system, calculate the distance d from the pedestrian to the robot in the horizontal and vertical coordinates respectively. x and d y ;

[0029] S42: Determine d x and d y Are they all smaller than half of the side length of the pedestrian obstacle avoidance area? If so, it means that the pedestrian is in the obstacle avoidance area; if not, it means that the pedestrian is not in the obstacle avoidance area, wherein the pedestrian obstacle avoidance area is a square area centered on the robot in the grid map.

[0030] In one embodiment of the present invention, the step S5 generates a window endpoint according to the pedestrian obstacle avoidance area and the global path, comprising the following steps:

[0031] S51: extracting discrete points of the global path in step S2 one by one at preset intervals;

[0032] S52: Calculate the distance between each discrete point in the pedestrian obstacle avoidance area and the nearest edge of the pedestrian obstacle avoidance area, and put the discrete points into a small top pile priority queue, wherein the closer the discrete point is to the edge of the pedestrian obstacle avoidance area in the small top pile priority queue, the higher the priority;

[0033] S53: The discrete points are dequeued from the mini-heap priority queue according to the priority for collision detection. The collision detection is as follows: a line is connected between the discrete point and the position of the robot. If the line does not pass through an obstacle in the grid map, the collision detection passes, otherwise it fails. The collision detection is repeated until a discrete point that passes the collision detection is found, and the discrete point is used as the end point of the window.

[0034] In one embodiment of the present invention, in step S6, the robot's laser radar data, the pedestrian's moving direction, moving speed, position and the position of the temporary end point relative to the robot are input into the trained deep reinforcement learning model, and the output is used to control the robot's linear velocity and angular velocity, including the following steps:

[0035] Step S61: Obtain the position of the robot in the world coordinate system;

[0036] Step S62: Acquire laser radar data;

[0037] Step S63: Subtract the position and heading angle of the robot in the world coordinate system from the position and heading angle of the pedestrian in the world coordinate system, that is, the position and direction of the pedestrian relative to the robot in the world coordinate system;

[0038] Step S64: subtract the position of the robot in the world coordinate system from the position of the temporary end point in the world coordinate system to obtain the position of the temporary end point relative to the robot;

[0039] Step S65: Input the laser radar data, the direction of the pedestrian relative to the robot, the moving speed, the position and the position of the temporary end point relative to the robot into the trained deep reinforcement learning model, and output the linear velocity and angular velocity commands.

[0040] In one embodiment of the present invention, the deep reinforcement learning model includes a policy network and a value network during training;

[0041] The robot's laser radar data, the pedestrian's moving direction, speed, position relative to the robot, and the position of the temporary end point relative to the robot are input as state s into the policy network. The linear velocity and angular velocity output by the policy network are used as action a to be executed by the robot, and the next state s' is obtained after executing action a, and the corresponding reward r is obtained according to the preset reward function. The state s and action a are input into the value network, and the expected return Q(s,a) of the given state s and action a combination is output. The expected return Q(s,a) is used to evaluate the rationality of the robot's execution of action a. When the reward r obtained by the robot in each round tends to be stable and the expected return Q(s,a) tends to be stable, the training is completed, and a trained deep reinforcement learning model is obtained;

[0042] The preset reward function formula is:

[0043]

[0044] Among them, d m represents the minimum distance between the robot and the pedestrian within the time [t-Δt, t], D i represents the pedestrian's close distance threshold, D p Indicates the personal distance threshold of pedestrians.

[0045] In one embodiment of the present invention, the strategy network is specifically as follows: Since the information of each pedestrian will have an impact on the robot, each robot-human is modeled, and each robot-human joint state [s r ,s i ] Input to φ e (·), where s r is the robot feature, s i is the pedestrian feature, φ e (·) is a fully connected layer with a ReLU activation function, which outputs n fixed-length vectors e i ; Continue to convert n fixed-length vectors e i Input to ψ h (·), we obtain n fixed-length robot-pedestrian interaction features h i , where ψ α (·) is a fully connected layer with ReLU activation function; at the same time, the attention mechanism is used to convert n fixed-length vectors e i Input to ψ α (·) to obtain the impact score a of n pedestrians on the robot i ; Then the impact score of n pedestrians on the robot is a i Softmax normalization is performed to obtain the influence coefficients of n pedestrians on the robot; then each robot-pedestrian interaction feature h iThe corresponding pedestrian influence coefficients on the robot are multiplied and accumulated to obtain a fixed-length feature c of all pedestrian influences on the robot, and finally combined with the robot feature s r After splicing, input to f p (·), we get the linear velocity and angular velocity commands, where f p (·) is a fully connected layer with Tanh activation function;

[0046] The value network is specifically: the actions performed by the robot at time t With c and s r After splicing, input to f q (·) in the state Next execution The score of q (·) is a fully connected layer.

[0047] In order to solve the above technical problems, the present invention provides a mobile robot path planning system in a human-machine collaborative environment, comprising:

[0048] Initialization module: used to initialize the pedestrian obstacle avoidance area with the robot as the center and receive the end point information;

[0049] The first generation module is used to generate a global path according to the current position information and the end point information of the robot;

[0050] Detection module: used for the robot to detect pedestrians and obtain the pedestrian's posture information, which includes the moving direction, moving speed, and position;

[0051] Judgment module: used to judge whether the pedestrian is in the obstacle avoidance area according to the position of the pedestrian, and only consider the pedestrians in the obstacle avoidance area;

[0052] The second generation module is used to generate a window end point according to the pedestrian obstacle avoidance area and the global path, and use the window end point as a temporary end point;

[0053] Input and output module: used to input the robot's lidar data, the pedestrian's moving direction, moving speed, position and the position of the temporary end point relative to the robot into the trained deep reinforcement learning model, and the output is used to control the robot's linear velocity and angular velocity;

[0054] Navigation module: used for the robot to navigate forward according to the linear velocity and angular velocity;

[0055] Planning module: used to determine whether the robot has reached the end point. If it has, navigation ends; if it has not, the function of the first generation module is executed until the robot reaches the end point.

[0056] In order to solve the above technical problems, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the mobile robot path planning method in the human-machine collaborative environment are implemented as described above.

[0057] In order to solve the above technical problems, the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the mobile robot path planning method in the human-machine collaborative environment are implemented as described above.

[0058] The above technical solution of the present invention has the following advantages compared with the prior art:

[0059] The present invention combines deep reinforcement learning with navigation dynamic obstacle avoidance to distinguish between pedestrians and obstacles, trains a deep reinforcement learning model that fully considers the psychological feelings of pedestrians, and designs a reward function in which the robot will be punished to varying degrees when it enters the private space and intimate space of pedestrians. After the robot identifies a pedestrian who will cause a navigation conflict, it will comprehensively consider the pedestrian's position, movement direction, density, obstacle information, and endpoint information, and output a command to control the robot's linear velocity and angular velocity, guiding the robot to plan a continuous, natural, safe path that meets the comfort level of pedestrians. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to make the contents of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments of the present invention in conjunction with the accompanying drawings.

[0061] Figure 1 is a flow chart of the method of the present invention;

[0062] Figure 2 is a schematic diagram of robot collision detection in an embodiment of the present invention;

[0063] Figure 3 is a schematic diagram of a strategy network structure in an embodiment of the present invention;

[0064] Figure 4 is a schematic diagram of a value network structure in an embodiment of the present invention;

[0065] Figure 5 is a schematic diagram comparing navigation of the Risk-RRT algorithm and the algorithm of this embodiment in an open environment with a high pedestrian density and when the robot is invisible;

[0066] Figure 6 It is a schematic diagram comparing the navigation of the Risk-RRT algorithm and the algorithm of this embodiment in a complex environment with low pedestrian density and when the robot is invisible. DETAILED DESCRIPTION

[0067] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.

[0068] Embodiment 1

[0069] Reference Figure 1 The present invention relates to a mobile robot path planning method in a human-machine collaborative environment, comprising:

[0070] S1, initialize the pedestrian obstacle avoidance area with the robot as the center and receive the end point information;

[0071] S2, generating a global path based on the robot's current position information and end point information;

[0072] S3, the robot detects the pedestrian and obtains the pedestrian's posture information, wherein the posture information includes moving direction, moving speed, and position;

[0073] S4, judging whether the pedestrian is in the obstacle avoidance area according to the position of the pedestrian, only considering the pedestrian in the obstacle avoidance area, and ignoring the rest of the pedestrians;

[0074] S5. Generate a temporary end point (i.e., window end point) according to the pedestrian obstacle avoidance area and the global path;

[0075] S6, according to the laser radar data loaded on the robot, the pedestrian's moving direction, speed, position relative to the robot, and the position of the temporary end point relative to the robot, input into the trained deep reinforcement learning strategy network, and output the linear velocity and angular velocity of the control robot;

[0076] S7, the robot executes the navigation command according to the linear velocity and angular velocity;

[0077] S8. Determine whether the robot has reached the end point. If it has, navigation ends. If not, return to step S2. Since the robot may deviate from the global path of step S2 or the path planning algorithm can only plan the current path, if the robot has not reached the end point, return to step S2 to replan the path.

[0078] Specifically, the pedestrian obstacle avoidance area in step S1 is a square area centered on the robot in the grid map, and the size can be adjusted according to the map resolution and the degree of sensitivity that the user wants the robot to have to pedestrians.

[0079] Specifically, in step S2, a global path is generated by the A* algorithm, and the A* algorithm can only plan the current global path.

[0080] Specifically, in step S8, it is determined whether the robot has reached the end point. The real-time position coordinates of the robot in the world coordinate system are subscribed to through ROS (Robot Operating System) and compared with the end point coordinates in the world coordinate system. If the distance between the two coordinates is less than or equal to a threshold, it indicates that the robot has arrived. The coordinate difference threshold set in this embodiment is 0.3.

[0081] Specifically, the pedestrian detection and obtaining of posture information in step S3 includes the following steps:

[0082] Step S31: capturing surrounding images in real time through a depth camera carried by the robot;

[0083] Step S32: applying the YOLOV7_tiny algorithm to detect pedestrians in the surrounding images;

[0084] Step S33: After the pedestrian is detected using the above network, the coordinate information of the pedestrian in the image coordinate system can be obtained. Next, the conversion from the image coordinate system to the camera coordinate system and then to the world coordinate system is implemented. In this embodiment, it is assumed that the coordinates of the pedestrian in the image coordinate system are (u, v) and the coordinates in the camera coordinate system are (x c ,y c ,z c ), the coordinates in the world coordinate system are (x, y, z), and there is the following mapping relationship between them:

[0085]

[0086]

[0087]

[0088] in, represents the position of the pedestrian in the world coordinate system, and σ() represents the position of the pedestrian in the camera coordinate system;

[0089] In order to facilitate the actual conversion calculation, this embodiment uses homogeneous coordinates to represent the camera parameters, so the conversion from a two-dimensional point to a three-dimensional point can be expressed as:

[0090]

[0091] Among them, R represents the rotation matrix of the camera in the world coordinate system, and T represents the translation matrix of the camera in the world coordinate system. represents the 0 vector, f x ,f y ,c x ,c y Both represent camera internal parameters.

[0092] Step S34: Calculate the moving direction and moving speed of the pedestrian according to the change of the pedestrian's position in the world coordinate system at adjacent times.

[0093] Specifically, judging whether the pedestrian is within the obstacle avoidance range according to the position of the pedestrian in step S4 includes the following steps:

[0094] Step S41: Based on the position of the pedestrian in the world coordinate system output in step S3 and the position of the ROS-subscribed robot in the world coordinate system, calculate the distance d from the pedestrian to the robot in the horizontal and vertical coordinates respectively. x and d y ;

[0095] Step S42: Determine d x and d y Are they both smaller than half of the side length L of the pedestrian obstacle avoidance area? If they are both smaller than, it means that the pedestrian appears in the obstacle avoidance area; otherwise, the pedestrian does not appear. In this embodiment, the size of L is set to 5m.

[0096] Specifically, generating a temporary endpoint in step S5 includes the following steps:

[0097] Step S51: extracting discrete points of the global path planned in step S2 one by one at preset intervals. In this embodiment, the size of the preset interval is set to 0.1 m;

[0098] Step S52: Calculate the distance between each discrete point in the pedestrian obstacle avoidance area and the nearest edge of the pedestrian obstacle avoidance area, and put the discrete points into a small top heap priority queue; it should be noted that in the small top heap priority queue, the value of each node is less than or equal to the value of its child node and the smaller the value, the higher the priority of the node;

[0099] Step S53: Remove the discrete points from the head of the small top priority queue according to the priority for collision detection (i.e. connect the discrete points with the position of the robot. If the connection line does not pass through the obstacles in the grid map, it is considered that the collision detection has passed, otherwise it has not passed. For details, see Figure 2 ), repeat this step until a discrete point that passes the collision detection is found and this point is used as the temporary end point. In short, it is to find a discrete point in the pedestrian obstacle avoidance area that is closest to the edge of the pedestrian obstacle avoidance area in order to make the robot's navigation path smoother.

[0100] Specifically, the deep reinforcement learning model in step S6 is mainly divided into two parts: a policy network and a value network. In this embodiment, the laser radar data, the moving direction, speed, position of the pedestrian relative to the robot, and the position of the temporary end point relative to the robot are input into the policy network as the state s. The linear velocity and angular velocity output by the policy network are executed by the robot as the action a in the simulation environment, and the next state s' is obtained, and the corresponding reward r is obtained according to the preset reward function. The state s and the action a are input into the value network, and the expected return Q (s, a) of the given state s and action a combination can be output. The expected return Q (s, a) is used to evaluate the rationality of the robot's execution of action a. When the reward r obtained by the robot in each round tends to be stable (for example, the reward r executes the "distance moved toward the end point * 0.1" in the following reward function for several consecutive rounds, it indicates that the reward r tends to be stable) and the expected return Q (s, a) tends to be stable (that is, the value of Q (s, a) is getting larger and closer to a fixed value), the training is completed, and a trained deep reinforcement learning model is obtained.

[0101] According to the personal space theory proposed by Hall, when the distance between the robot and the pedestrian is less than the personal distance and the intimate distance, the pedestrian will feel psychological pressure, and the discomfort will change differently when entering different distances. In this example, the preset reward function formula is:

[0102]

[0103] Among them, d m represents the minimum distance between the robot and the pedestrian within the time [t-Δt, t], D i The threshold of the close distance between pedestrians is set to 0.45 meters. p Indicates the personal distance threshold for pedestrians, which is set to 1.2 meters.

[0104] Specifically, the strategy network structure in step S6 is as follows: Figure 3 First, since each person's information will have an impact on the robot, this embodiment models each robot-human and converts the joint state of each robot-human [s r ,s i ] Input to φ e (·), where s r is the robot feature, s i is the pedestrian feature, φ e (·) is a fully connected layer with a ReLU activation function, which outputs n fixed-length vectors e i . Continue to add n fixed-length vectors e i Input to ψ h (·), we obtain n fixed-length robot-pedestrian interaction features h i, where ψ α (·) is a fully connected layer with a ReLU activation function. Since the number of people around may vary greatly in different scenarios, a model that can process any number of inputs and obtain a fixed number of outputs is required. Because the impact of each pedestrian on the robot is different, this embodiment uses an attention mechanism to store n fixed-length vectors e i Input to ψ α (·) to obtain the impact score a of n pedestrians on the robot i , where ψ α (·) is a fully connected layer with ReLU activation function. Then n influence scores a i Perform softmax normalization to obtain the influence coefficients of n pedestrians on the robot. Then, each robot-pedestrian interaction feature h i The corresponding pedestrian influence coefficients are multiplied and accumulated to obtain a fixed-length feature c of all pedestrian influences on the robot, and then added to the robot feature s r After splicing, input to f p (·), we get the linear velocity and angular velocity commands, where f p (·) is a fully connected layer with Tanh activation function.

[0105] The structure of the value network is similar to that of the strategy network, such as Figure 4 As shown. Because this network is an action-value network, it is necessary to convert the action performed by the robot at time t into With c and s r After splicing, input to f q (·) in the state Next execution The score of q (·) is a fully connected layer.

[0106] Specifically, running the trained deep reinforcement learning policy network in step S6 includes the following steps:

[0107] Step S61: Obtain the position of the robot in the world coordinate system through the AMCL positioning module in the ROS system;

[0108] Step S62: Obtaining laser radar data (i.e., data on whether there are obstacles detected by the laser radar);

[0109] Step S63: Subtract the position and yaw angle of the robot in the world coordinate system from the position and yaw angle of the pedestrian in the world coordinate system to obtain the position and direction of the pedestrian relative to the robot in the world coordinate system;

[0110] Step S64: Subtract the position of the robot in the world coordinate system from the position of the temporary end point in the world coordinate system to obtain the position of the temporary end point relative to the robot.

[0111] Step S65: The laser radar data, the speed of the pedestrian, the direction and position relative to the robot, and the position of the temporary end point relative to the robot are input into the trained deep reinforcement learning strategy network, and the linear velocity and angular velocity commands are output.

[0112] Specifically, in step S8, it is determined whether the robot has reached the end point. The real-time position coordinates of the robot in the world coordinate system are subscribed to by ROS and compared with the end point coordinates in the world coordinate system. If the distance between the two coordinates is less than or equal to a threshold, it indicates that the robot has arrived. The coordinate difference threshold set in this embodiment is 0.3.

[0113] This embodiment uses the TD3 algorithm to train the policy network and the value network respectively.

[0114] The detailed steps are as follows:

[0115]

[0116] SX1, initialize the actor network and critic network respectively, and copy their network structure and parameters to the target network;

[0117] SX2, initialize the experience replay buffer, which stores the history of the agent's interaction with the environment (current state, current action, current reward, next moment state);

[0118] SX3, let the robot interact with the environment to get a state, and use the current actor network to get an action;

[0119] SX4, execute the action output by the actor network in the previous step, obtain the reward from the environment feedback and observe the next state, and store the (current state, current action, current reward, next moment state) information in the experience playback area;

[0120] SX5, randomly sample a batch of experience tuples from the experience playback area;

[0121] SX6. Calculate the TD error of the critic network;

[0122] SX7, update the parameters of the critic network by minimizing the TD error;

[0123] SX8. If the critic network has been updated k times, update the actor network parameters by maximizing the output of the critic network and perform a soft update on the target network.

[0124] SX9. If the robot has not reached the end point and has not collided or timed out, execute step SX3;

[0125] SX10: If the set episode has not been reached, execute step SX3.

[0126] It should be noted that this embodiment includes two networks, namely the policy network and the value network, when training the deep reinforcement learning model. However, at the end of the training, this embodiment only uses the policy network to directly output the linear velocity and angular velocity of the control robot by inputting various data into the trained deep reinforcement learning model.

[0127] Experimental verification

[0128] In order to fully demonstrate the effectiveness of the present invention, the present invention and the Risk-RRT algorithm were compared in a simulation scenario. Two different environments were set up to verify the effectiveness of the algorithm, namely an open environment with high pedestrian density and a complex environment with low pedestrian density. The map size of these two environments is 15m×15m. The starting point of the robot is located at the center of the map, and the targets are randomly distributed in the free area 1-2m away from the edge of the map. The number of pedestrians in the open environment is 180, and the number of pedestrians in the complex environment is randomly set to 50-70, and the pedestrians are randomly distributed in the free area of ​​the map. In these two scenarios, this embodiment sets two situations in which the robot can be seen by pedestrians and cannot be seen by pedestrians. Since there are a large number of pedestrians in the test environment, if all pedestrians in the map are input into the model for processing, the system will become stuck, and the real-time performance of the robot cannot be guaranteed. Therefore, this embodiment decides to limit all algorithms to detect pedestrians within five meters. All tests are carried out in two different environments, and each environment uses 100 random test cases to evaluate the model. The performance indicators include success rate, collision rate, timeout rate, navigation time, trajectory length, and hazard frequency. The success rate (SR) is the ratio of the number of trials in which the robot reaches the goal to the total number of trials, the collision rate (CR) is the ratio of the number of trials in which the robot collides with humans or static obstacles to the total number of trials, the timeout rate (TR) is the ratio of the number of trials in which the robot does not collide and does not reach the goal within 60 seconds to the total number of trials, the navigation time (NT) is the average time for the robot to reach the end point, the trajectory length (TL) is the average trajectory length of the robot to reach the goal, and the hazard frequency (DF) is the ratio of the time when the robot is less than 0.2m from the pedestrian to the total navigation time.

[0129] Figure 5The figure shows the comparison of the two algorithms in an open environment with high pedestrian density and when the robot is invisible. The gray circles represent pedestrians in the environment, the gray arrows represent the direction of movement of the pedestrians, the blue circles represent the position of the robot, the arrows in the path planning represent the direction of movement of the robot, the five-pointed star represents the end point, the path planning curve represents the safe trajectory of the robot, and the thick lines in the path planning represent the dangerous trajectory of the robot (the robot is less than 0.2m away from the pedestrians). Figure 5 (a) and Figure 5 (c) Some intermediate moments of robot navigation driven by Risk-RRT algorithm, Figure 5 (e) is the entire trajectory of the robot driven by the Risk-RRT algorithm to complete the navigation task. It can be seen that Figure 5 (a) Figure 5 (c) Figure 5 (e) There are dangerous trajectories (bold lines). Figure 5 (b) and Figure 5 (d) are some intermediate moments of the robot navigation driven by the algorithm of this embodiment, Figure 5 (f) is the entire trajectory of the robot driven by the algorithm of this embodiment to complete the navigation task. It can be seen that Figure 5 (b) Figure 5 (d) Figure 5 (f) All are safe trajectories. Table 1 shows the experimental results of the two algorithms in an open environment with high density of pedestrians when the robot is invisible, and Table 2 shows the experimental results of the two algorithms in an open environment with high density of pedestrians when the robot is visible. It can be seen that the algorithm proposed in this embodiment is more compliant with human social rules than the Risk-RRT algorithm, and the trajectory is more natural and smooth.

[0130] Table 1 Experimental results of two algorithms in an open environment with high pedestrian density where the robot is invisible

[0131]

[0132] Table 2 Experimental results of the two algorithms in an open environment with high pedestrian density and robot visibility

[0133]

[0134] Figure 6 This is a comparison of the navigation of the two algorithms in a complex environment with low pedestrian density and where the robot is invisible. Figure 6 (a) and Figure 6 (c) Some intermediate moments of robot navigation driven by Risk-RRT algorithm, Figure 6 (e) The entire trajectory of the robot driven by the Risk-RRT algorithm to complete the navigation task. Figure 6 (b) and Figure 6 (d) are some intermediate moments of the robot navigation driven by the algorithm of this embodiment, Figure 6 (f) is the entire trajectory of the robot driven by the algorithm of this embodiment to complete the navigation task. Table 3 shows the experimental results of the two algorithms in a complex environment with low pedestrian density and the robot is invisible, and Table 4 shows the experimental results of the two algorithms in a complex environment with low pedestrian density and the robot is visible. It can be seen that in a complex environment with low pedestrian density, the algorithm proposed in this embodiment has a navigation success rate of 12.19% higher than that of the Risk-RRT algorithm, and the danger frequency is reduced by 90.08%.

[0135] Table 3 Experimental results of two algorithms in complex environment with low density of pedestrians where the robot is invisible

[0136]

[0137] Table 4 Experimental results of the two algorithms in robot visibility in complex environment with low pedestrian density

[0138]

[0139] Embodiment 2

[0140] This embodiment provides a mobile robot path planning system in a human-machine collaborative environment, including:

[0141] Initialization module: used to initialize the pedestrian obstacle avoidance area with the robot as the center and receive the end point information;

[0142] The first generation module is used to generate a global path according to the current position information and the end point information of the robot;

[0143] Detection module: used for the robot to detect pedestrians and obtain the pedestrian's posture information, which includes the moving direction, moving speed, and position;

[0144] Judgment module: used to judge whether the pedestrian is in the obstacle avoidance area according to the position of the pedestrian, and only consider the pedestrians in the obstacle avoidance area;

[0145] The second generation module is used to generate a window end point according to the pedestrian obstacle avoidance area and the global path, and use the window end point as a temporary end point;

[0146] Input and output module: used to input the robot's lidar data, the pedestrian's moving direction, moving speed, position and the position of the temporary end point relative to the robot into the trained deep reinforcement learning model, and the output is used to control the robot's linear velocity and angular velocity;

[0147] Navigation module: used for the robot to navigate forward according to the linear velocity and angular velocity;

[0148] Planning module: used to determine whether the robot has reached the end point. If it has, navigation ends; if it has not, the function of the first generation module is executed until the robot reaches the end point.

[0149] Embodiment 3

[0150] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the mobile robot path planning method in the human-machine collaborative environment described in Embodiment 1 are implemented.

[0151] Embodiment 4

[0152] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for mobile robot path planning in a human-machine collaborative environment described in Embodiment 1 are implemented.

[0153] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.

[0154] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0155] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0156] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0157] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0158] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.

Claims

1. A method for mobile robot path planning in a human-machine collaborative environment, characterized in that: The following steps are involved: S1: Initialize the pedestrian obstacle avoidance area with the robot as the center and receive the end point information; S2: Generate a global path based on the robot's current position information and end point information; S3: The robot detects the pedestrian to obtain the pedestrian's posture information, where the posture information includes moving direction, moving speed, and position; S4: Determine whether the pedestrian is in the obstacle avoidance area based on the pedestrian's position, and only consider pedestrians in the obstacle avoidance area; S5: Generate a window endpoint according to the pedestrian obstacle avoidance area and the global path, and use the window endpoint as a temporary endpoint; S6: Input the robot's lidar data, the pedestrian's moving direction, moving speed, position relative to the robot, and the position of the temporary end point relative to the robot into the trained deep reinforcement learning model, and output the linear velocity and angular velocity used to control the robot; S7: The robot navigates forward according to the linear velocity and angular velocity; S8: Determine whether the robot has reached the end point. If it has, the navigation ends; if it has not, return to step S2 until the robot reaches the end point.

2. The method for mobile robot path planning in a human-machine collaborative environment according to claim 1, characterized in that: In S3, the robot detects the pedestrian to obtain the pedestrian's position information, including the following steps: S31: The robot captures surrounding images in real time; S32: Detect pedestrians in the surrounding images using the YOLOV7_tiny algorithm; S33: When a pedestrian is detected, the position information of the pedestrian in the image coordinate system is obtained, and then the position information of the pedestrian is converted from the image coordinate system to the camera coordinate system and then to the world coordinate system. Assume that the coordinates of the pedestrian in the image coordinate system are (u, v) and the coordinates of the pedestrian in the camera coordinate system are (x c ,y c ,z c ), the coordinates in the world coordinate system are (x, y, z), then the following mapping relationship is satisfied: in, represents the position of the pedestrian in the world coordinate system, and σ() represents the position of the pedestrian in the camera coordinate system; To facilitate the actual conversion calculation, homogeneous coordinates are used to represent the camera parameters, and the conversion from a two-dimensional point (u, v) to a three-dimensional point (x, y, z) is expressed as: Among them, R represents the rotation matrix of the camera in the world coordinate system, and T represents the translation matrix of the camera in the world coordinate system. represents the 0 vector, f x ,f y ,c x ,c y All are camera internal parameters; S34: Calculate the moving direction and moving speed of the pedestrian according to the change of the pedestrian's position information in adjacent time periods in the world coordinate system.

3. The method for mobile robot path planning in a human-machine collaborative environment according to claim 2, characterized in that: In step S4, judging whether the pedestrian is in the obstacle avoidance area according to the position of the pedestrian includes the following steps: S41: Based on the position information of the pedestrian in the world coordinate system, calculate the distance d from the pedestrian to the robot in the horizontal and vertical coordinates respectively. x and d y ; S42: Determine d x and d y Are they all smaller than half of the side length of the pedestrian obstacle avoidance area? If so, it means that the pedestrian is in the obstacle avoidance area; if not, it means that the pedestrian is not in the obstacle avoidance area, wherein the pedestrian obstacle avoidance area is a square area centered on the robot in the grid map.

4. The method for mobile robot path planning in a human-machine collaborative environment according to claim 1, characterized in that: The step S5 generates a window end point according to the pedestrian obstacle avoidance area and the global path, including the following steps: S51: extracting discrete points of the global path in step S2 one by one at preset intervals; S52: Calculate the distance between each discrete point in the pedestrian obstacle avoidance area and the nearest edge of the pedestrian obstacle avoidance area, and put the discrete points into a small top pile priority queue, wherein the closer the discrete point is to the edge of the pedestrian obstacle avoidance area in the small top pile priority queue, the higher the priority; S53: The discrete points are dequeued from the mini-heap priority queue according to the priority for collision detection. The collision detection is as follows: a line is connected between the discrete point and the position of the robot. If the line does not pass through an obstacle in the grid map, the collision detection passes, otherwise it fails. The collision detection is repeated until a discrete point that passes the collision detection is found, and the discrete point is used as the end point of the window.

5. The method for mobile robot path planning in a human-machine collaborative environment according to claim 1, characterized in that: In step S6, the robot's laser radar data, the pedestrian's moving direction, moving speed, position relative to the robot, and the position of the temporary end point relative to the robot are input into the trained deep reinforcement learning model, and the output is used to control the robot's linear velocity and angular velocity, including the following steps: Step S61: Obtain the position of the robot in the world coordinate system; Step S62: Acquire laser radar data; Step S63: Subtract the position and heading angle of the robot in the world coordinate system from the position and heading angle of the pedestrian in the world coordinate system, that is, the position and direction of the pedestrian relative to the robot in the world coordinate system; Step S64: subtract the position of the robot in the world coordinate system from the position of the temporary end point in the world coordinate system to obtain the position of the temporary end point relative to the robot; Step S65: Input the laser radar data, the direction of the pedestrian relative to the robot, the moving speed, the position and the position of the temporary end point relative to the robot into the trained deep reinforcement learning model, and output the linear velocity and angular velocity commands.

6. The method for mobile robot path planning in a human-machine collaborative environment according to claim 1, characterized in that: Deep reinforcement learning models include a policy network and a value network during training; The robot's laser radar data, the pedestrian's moving direction, speed, position relative to the robot, and the position of the temporary end point relative to the robot are input as state s into the policy network. The linear velocity and angular velocity output by the policy network are used as action a to be executed by the robot, and the next state s' is obtained after executing action a, and the corresponding reward r is obtained according to the preset reward function. The state s and action a are input into the value network, and the expected return Q(s,a) of the given state s and action a combination is output. The expected return Q(s,a) is used to evaluate the rationality of the robot's execution of action a. When the reward r obtained by the robot in each round tends to be stable and the expected return Q(s,a) tends to be stable, the training is completed, and a trained deep reinforcement learning model is obtained; The preset reward function formula is: Among them, d m represents the minimum distance between the robot and the pedestrian within the time [t-Δt, t], D i represents the pedestrian's close distance threshold, D p Indicates the personal distance threshold of pedestrians.

7. The method for mobile robot path planning in a human-machine collaborative environment according to claim 6, characterized in that: The strategy network is specifically as follows: Since the information of each pedestrian will affect the robot, each robot-human is modeled and the joint state of each robot-human [s r ,s i ] Input to φ e (·), where s r is the robot feature, s i is the pedestrian feature, φ e (·) is a fully connected layer with a ReLU activation function, which outputs n fixed-length vectors e i ; Continue to convert n fixed-length vectors e i Input to ψ h (·), we obtain n fixed-length robot-pedestrian interaction features h i , where ψ α (·) is a fully connected layer with ReLU activation function; at the same time, the attention mechanism is used to convert n fixed-length vectors e i Input to ψ α (·) to obtain the impact score a of n pedestrians on the robot i ; Then the impact score of n pedestrians on the robot is a u Perform softmax normalization to obtain the influence coefficients of n pedestrians on the robot; then calculate each robot-pedestrian interaction feature h i The corresponding pedestrian influence coefficients on the robot are multiplied and accumulated to obtain a fixed-length feature c of all pedestrian influences on the robot, and finally combined with the robot feature s r After splicing, input to f p (·), we get the linear velocity and angular velocity commands, where f p (·) is a fully connected layer with Tanh activation function; The value network is specifically: the actions performed by the robot at time t With c and s r After splicing, input to f q (·) in the state Next execution The score of q (·) is a fully connected layer.

8. A mobile robot path planning system in a human-machine collaborative environment, characterized by: include: Initialization module: used to initialize the pedestrian obstacle avoidance area with the robot as the center and receive the end point information; The first generation module is used to generate a global path according to the current position information and the end point information of the robot; Detection module: used for the robot to detect pedestrians and obtain the pedestrian's posture information, which includes the moving direction, moving speed, and position; Judgment module: used to judge whether the pedestrian is in the obstacle avoidance area according to the position of the pedestrian, and only consider the pedestrians in the obstacle avoidance area; The second generation module is used to generate a window end point according to the pedestrian obstacle avoidance area and the global path, and use the window end point as a temporary end point; Input and output module: used to input the robot's lidar data, the pedestrian's moving direction, moving speed, position and the position of the temporary end point relative to the robot into the trained deep reinforcement learning model, and the output is used to control the robot's linear velocity and angular velocity; Navigation module: used for the robot to navigate forward according to the linear velocity and angular velocity; Planning module: used to determine whether the robot has reached the end point. If it has, navigation ends; if it has not, the function of the first generation module is executed until the robot reaches the end point.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method for path planning of a mobile robot in a human-machine collaborative environment as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for mobile robot path planning in a human-machine collaborative environment as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Riding path planning method and device, computer equipment and storage medium

    CN112101676A

  • Man-machine co-fusion mobile robot path planning method based on generative adversarial network

    CN115309164A

  • Robot path collision avoidance planning method based on deep reinforcement learning in pedestrian environment

    CN116360454A

  • Non-particle multi-agent collision avoidance path planning method and planning system thereof

    CN116518998A

  • Path planning method, device, equipment and medium

    CN117419742A

Cited By

  • Discharging and feeding robot and path dynamic optimization method thereof

    CN120269581A

  • Robot social adaptive navigation knowledge learning and migration method and system

    CN120947653A

  • Humanoid robot three-dimensional complex environment navigation method and system

    CN120991885A

  • Humanoid robot three-dimensional complex environment navigation method and system

    CN120991885B