A method and system for autonomous escape of unmanned vehicles using a robot operating system
By independently generating temporary target points in ROS and performing path planning, the problem of unmanned vehicles failing to plan or collision of obstacles in an unstructured environment is solved, and the autonomous escape of unmanned vehicles and the arrival of target points is achieved.
Patent Information
- Application Number
- CN202211065520.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-08-31
AI Technical Summary
The existing robot operating system ROS cannot effectively solve the problem of failure in planning or collision of obstacles when unmanned vehicles encounter unstructured environments.
By independently generating temporary target points based on cost maps, the costmap is used to generate temporary target points that can be reached by unmanned vehicles, and after the unmanned vehicles arrive at the temporary target point, the original target point is sent again for path planning to achieve autonomous escape from the unmanned vehicles.
It effectively helps the unmanned vehicles get out of obstacles or planning failures, and finally reach the established target point, solving the problem that ROS navigation package cannot be accurately planned in an unstructured environment.
Smart Images

Figure CN115284299B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot operating systems, and in particular to an autonomous escape method and system for an unmanned vehicle using a robot operating system. Background Art
[0002] The Robot Operating System (ROS) is an open-source meta-operating system for robots. It provides essential operating system services, including hardware abstraction, low-level device control, implementation of common functions, inter-process messaging, and package management. It also provides tools and libraries for acquiring, compiling, writing, and running code across multiple computers. ROS's primary goal is to support code reuse in robotics research and development. From a software architecture perspective, ROS is a powerful and flexible robotics programming framework, employing a distributed multi-process architecture based on message-passing communication. ROS has long been used in the robotics industry. Many well-known open-source robotics libraries, such as quaternion-based coordinate transformation, 3D point cloud processing drivers, and SLAM localization algorithms, were developed by open-source contributors based on ROS. Because ROS is message-based, developers can break down software into modules based on their functionality. Each module is responsible for reading and distributing messages, and modules are connected through messages. Currently, a large number of third-party companies and research institutions have invested in ROS development, and an increasing number of robots are using ROS as a development platform.
[0003] ROS can be divided into two layers: the lower layer is the operating system layer, and the upper layer is composed of various software packages that implement different functions. The navigation package includes multiple function packages such as costmap_2d, global_planner, and base_local_planner. During runtime, it is exposed as the move_base function node, which can control the robot's autonomous driving based on the perception system. In unstructured and complex environments, unmanned vehicles lack high-precision maps to rely on, so they need to create perception maps in real time for route planning. Due to the contradiction between the planning and control frequency requirements and computing power under high-speed driving, as well as the inaccuracy of the constructed perception maps due to the characteristics of unstructured stationary and moving obstacles, unmanned vehicles are prone to colliding with obstacles and stopping, or being trapped in blind spots and unable to reach the intended destination. However, the existing ROS navigation package does not provide a relevant mechanism to address this problem. Summary of the Invention
[0004] In view of this, the purpose of an embodiment of the present invention is to provide an autonomous escape method and system for an unmanned vehicle used in a robot operating system. When the unmanned vehicle collides with an obstacle or planning fails, the mechanism can effectively help the unmanned vehicle escape and eventually reach the predetermined target point.
[0005] In a first aspect, an embodiment of the present invention provides an autonomous escape method for an unmanned vehicle using a robot operating system, comprising:
[0006] When the navigation center hub node (move_base) of the robot operating system reports that the unmanned vehicle cannot reach the predetermined target point, a temporary target point that the unmanned vehicle can reach is autonomously generated based on the cost map (costmap).
[0007] When the unmanned vehicle reaches the temporary target point and escapes from the trapped situation, it sends the original target point (precious_goal) to the navigation center hub node (move_base) again for path planning.
[0008] Among them, situations in which the unmanned vehicle cannot reach the predetermined target point include failure of local trajectory control, failure of route planning, or repeated oscillations.
[0009] The costmap is formed by assigning a cost value to each grid in the grid map.
[0010] In conjunction with the first aspect, an embodiment of the present invention provides a first possible implementation of the first aspect, wherein autonomously generating a temporary target point reachable by the unmanned vehicle based on a costmap includes:
[0011] Traverse all grids of the current costmap, and select the coordinates corresponding to one of the grids as the temporary target point position coordinates according to the temporarily preset target point generation method.
[0012] The current unmanned vehicle's orientation information is used as the orientation constraint of the temporary target point, the temporary target point is sent to the central hub node (move_base), and the temporary target point publishing variable (repub_goal) is set to true.
[0013] In combination with the first aspect, an embodiment of the present invention provides a second possible implementation of the first aspect, wherein traversing all grids of the current costmap and selecting coordinates corresponding to one of the grids as temporary target point position coordinates according to a temporarily preset target point generation method includes:
[0014] An unobstructed free space grid is selected for coordinate transformation, and the grid coordinates are filtered according to a temporarily preset target point generation function.
[0015] Set the relevant parameters for generating temporary target points, filter the grid coordinates again, and obtain the position coordinates of the temporary target points.
[0016] In combination with the first aspect, an embodiment of the present invention provides a third possible implementation of the first aspect, wherein selecting an unobstructed free space grid for coordinate transformation and filtering the grid coordinates according to a temporarily preset target point generation function includes:
[0017] The grid coordinates with a cost value of 0 and their distance information from the unmanned vehicle are stored in container No. 1.
[0018] The grid coordinates are transformed based on the coordinate system with the position of the unmanned vehicle as the origin and the orientation of the unmanned vehicle as the positive direction of the x-axis.
[0019] If the unmanned vehicle is stuck while performing a backward movement, a temporary target point is selected in the area in front of the vehicle. If the unmanned vehicle is stuck while performing a forward movement, a temporary target point is selected in the area behind the vehicle.
[0020] Determine whether the absolute value of the slope of the line connecting the unmanned vehicle position point and the temporary target point is less than the threshold set by the slope absolute value parameter. If so, place the grid that meets the condition into the second container.
[0021] Set the maximum distance, secondary distance, and minimum distance between the temporary target point candidate grid and the unmanned vehicle.
[0022] In combination with the first aspect, an embodiment of the present invention provides a fourth possible implementation of the first aspect, wherein the setting of relevant parameters when generating a temporary target point and filtering the grid coordinates again to obtain the position coordinates of the temporary target point include:
[0023] If none of the above conditions are met, a grid between the minimum distance and the secondary distance in container No. 2 is selected, and the grid that meets the conditions is placed in container No. 3.
[0024] If none of the above conditions are met, select the grid in container No. 2 that is smaller than the minimum distance value and place it in container No. 3.
[0025] Select the grid in the second container that is larger than the secondary distance and smaller than the maximum distance value and put it into the third container.
[0026] If container No. 3 is finally empty, the unmanned vehicle will return a message indicating that it has failed to escape, and the preset target point generation method will be re-executed.
[0027] If container No. 3 is not empty in the end, the grid with the smallest absolute value of the slope of the line connecting the unmanned vehicle position point and the grid point coordinates is selected, and its corresponding coordinates are used as the temporary target point position coordinates.
[0028] In combination with the first aspect, an embodiment of the present invention provides a fifth possible implementation of the first aspect, wherein, when the unmanned vehicle reaches the temporary target point and escapes the trapped situation, it again sends the original target point to the navigation center hub node (move_base) for path planning, including:
[0029] When the unmanned vehicle reaches the temporary goal point, it sends the original goal point (precious_goal) and sets the temporary goal point publication variable (repub_goal) to false.
[0030] When the central hub node (move_base) receives the original goal point (precious_goal), if the current temporary goal point publication variable (repub_goal) is false, the original goal point (precious_goal) is set as the current goal point.
[0031] In a second aspect, an embodiment of the present invention further provides an autonomous escape system for an unmanned vehicle using a robot operating system, comprising:
[0032] A temporary target point generating device is used to autonomously generate a temporary target point that the unmanned vehicle can reach based on a cost map (costmap) when the navigation center hub node (move_base) of the robot operating system feedbacks that the unmanned vehicle cannot reach the predetermined target point.
[0033] The original target point sending device is used to send the original target point (precious_goal) to the navigation center hub node (move_base) again for path planning when the unmanned vehicle reaches the temporary target point and escapes from the trapped situation.
[0034] In combination with the second aspect, an embodiment of the present invention provides a first possible implementation of the second aspect, wherein the temporary target point generating device includes:
[0035] The temporary target point location setting module is used to traverse all grids of the current costmap and select the coordinates corresponding to one of the grids as the temporary target point location coordinates according to the temporarily preset target point generation method.
[0036] The temporary target point variable setting module is used to use the current unmanned vehicle's orientation information as the orientation constraint of the temporary target point, send the temporary target point to the central hub node (move_base), and set the temporary target point publishing variable (repub_goal) to true.
[0037] In combination with the second aspect, an embodiment of the present invention provides a second possible implementation of the second aspect, wherein the temporary target point location setting module includes:
[0038] The barrier-free free space grid selection unit is used to store the grid coordinates with a cost value of 0 and the distance information between the grid coordinates and the unmanned vehicle into container No. 1.
[0039] The function filtering unit is used to transform the grid coordinates based on the coordinate system with the unmanned vehicle position as the origin and the unmanned vehicle orientation as the positive x-axis. If the unmanned vehicle is trapped during the backward movement, a temporary target point is selected in the area in front of the vehicle. If the unmanned vehicle is trapped during the forward movement, a temporary target point is selected in the area behind the vehicle. It is determined whether the absolute value of the slope of the line connecting the unmanned vehicle position point and the temporary target point is less than the threshold set by the slope absolute value parameter. If so, the grid that meets the condition is placed in the second container.
[0040] The parameter setting unit is used to set the maximum distance, secondary distance and minimum distance between the temporary target point candidate grid and the unmanned vehicle.
[0041] The secondary filtering unit is used to select the grids between the minimum distance and the secondary distance in the No. 2 container, and place the grids that meet the conditions into the No. 3 container; select the grids in the No. 2 container that are less than the minimum distance value and place them into the No. 3 container; select the grids in the No. 2 container that are greater than the secondary distance and less than the maximum distance value and place them into the No. 3 container.
[0042] The three-stage filtering unit is used to return the unmanned vehicle's escape failure information if the No. 3 container is finally empty, and re-execute the preset target point generation method. If the No. 3 container is not empty, the grid with the smallest absolute value of the slope of the line connecting the unmanned vehicle position point and the grid point coordinates is selected, and its corresponding coordinates are used as the temporary target point position coordinates.
[0043] In combination with the second aspect, an embodiment of the present invention provides a third possible implementation of the second aspect, wherein the original target point sending device includes:
[0044] The original target point setting module is used to send the original target point (precious_goal) when the unmanned vehicle reaches the temporary target point, and set the temporary target point publishing variable (repub_goal) to false.
[0045] The original target point variable setting module is used to set the original target point (precious_goal) as the current target point if the current temporary target point publication variable (repub_goal) is false after the central hub node (move_base) receives the original target point (precious_goal).
[0046] The beneficial effects of the embodiments of the present invention are:
[0047] The present invention's autonomous unmanned vehicle escape method and system for a robotically operated system incorporates a mechanism for autonomous escape. When the robotic operating system's navigation center hub (move_base) reports local trajectory control failure, route planning failure, or repeated oscillation, it autonomously generates a temporary destination point accessible to the unmanned vehicle based on a cost map. Once the unmanned vehicle reaches the temporary destination point and escapes the trapped situation, it retransmits the original destination point to the center hub (move_base) in the navigation package for path planning. This mechanism effectively helps the unmanned vehicle escape if it collides with an obstacle or planning fails, ultimately reaching its intended destination. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0049] Figure 1 This is a flow chart of the autonomous escape method for an unmanned vehicle using a robot operating system according to the present invention;
[0050] Figure 2 A schematic diagram of the complete process of the autonomous escape method for an unmanned vehicle using a robot operating system according to the present invention;
[0051] Figure 3 This is a schematic diagram of temporary target point filtering based on the unmanned vehicle's posture, driving behavior when trapped, and grid position in the present invention. DETAILED DESCRIPTION
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0053] Please refer to Figures 1 to 3 The first embodiment of the present invention provides an autonomous escape method for an unmanned vehicle using a robot operating system, which includes:
[0054] (11) When the navigation center hub node (move_base) of the robot operating system reports that the unmanned vehicle cannot reach the predetermined target point, a temporary target point that the unmanned vehicle can reach is autonomously generated based on the cost map (costmap).
[0055] (12) When the unmanned vehicle reaches the temporary target point and escapes from the trapped situation, it sends the original target point (precious_goal) to the navigation center hub node (move_base) again for path planning.
[0056] Among them, situations in which the unmanned vehicle cannot reach the predetermined target point include failure of local trajectory control, failure of route planning, or repeated oscillations.
[0057] The costmap is formed by assigning a cost value to each grid in the grid map.
[0058] The autonomous generation of temporary destination points reachable by the unmanned vehicle based on the costmap includes:
[0059] (112) Traverse all grids of the current costmap, and select the coordinates corresponding to one of the grids as the temporary target point position coordinates according to the temporarily preset target point generation method.
[0060] (113) The current orientation information of the unmanned vehicle is used as the orientation constraint of the temporary target point, the temporary target point is sent to the central hub node (move_base), and the temporary target point publishing variable (repub_goal) is set to true.
[0061] The traversal of all grids of the current costmap and the selection of coordinates corresponding to one of the grids as the temporary target point position coordinates according to a temporarily preset target point generation method include:
[0062] An unobstructed free space grid is selected for coordinate transformation, and the grid coordinates are filtered according to a temporarily preset target point generation function.
[0063] Set the relevant parameters for generating temporary target points, filter the grid coordinates again, and obtain the position coordinates of the temporary target points.
[0064] The step of selecting an unobstructed free space grid for coordinate transformation and filtering the grid coordinates according to a temporarily preset target point generation function includes:
[0065] (111) The grid coordinates with a cost value of 0 and the distance information between the grid coordinates and the unmanned vehicle are stored in container No. 1.
[0066] (1121) The grid coordinates are transformed based on a coordinate system with the position of the unmanned vehicle as the origin and the orientation of the unmanned vehicle as the positive direction of the x-axis.
[0067] If the unmanned vehicle is stuck while performing a backward movement, a temporary target point is selected in the area in front of the vehicle. If the unmanned vehicle is stuck while performing a forward movement, a temporary target point is selected in the area behind the vehicle.
[0068] Determine whether the absolute value of the slope of the line connecting the unmanned vehicle position point and the temporary target point is less than the threshold set by the slope absolute value parameter. If so, place the grid that meets the condition into the second container.
[0069] (1122) Set the maximum distance, secondary distance and minimum distance between the temporary target point candidate grid and the unmanned vehicle.
[0070] The setting of the relevant parameters for generating the temporary target point and filtering the grid coordinates again to obtain the temporary target point position coordinates include:
[0071] (1123) If none of the above conditions are met, a grid located between the minimum distance and the secondary distance in the second container is selected, and the grid meeting the conditions is placed in the third container.
[0072] (1124) If none of the above conditions are met, select the grid in container No. 2 that is smaller than the minimum distance value and place it in container No. 3.
[0073] (1125) Select the grid in the second container that is greater than the secondary distance and less than the maximum distance value and put it into the third container.
[0074] (1126) If the No. 3 container is finally empty, the unmanned vehicle will return the information that it failed to escape, and the preset target point generation method will be re-executed.
[0075] (1127) If container No. 3 is not empty in the end, the grid with the smallest absolute value of the slope of the line connecting the unmanned vehicle position point and the grid point coordinates is selected, and its corresponding coordinates are used as the temporary target point position coordinates.
[0076] When the unmanned vehicle reaches the temporary target point and escapes the trapped situation, it sends the original target point to the navigation center hub node (move_base) again for path planning, including:
[0077] (121) When the unmanned vehicle reaches the temporary target point, it sends the original target point (precious_goal) and sets the temporary target point publication variable (repub_goal) to false.
[0078] (122) When the central hub node (move_base) receives the original goal point (precious_goal), if the current temporary goal point publication variable (repub_goal) is false, the original goal point (precious_goal) is set as the current goal point.
[0079] A second embodiment of the present invention provides an autonomous escape system for an unmanned vehicle using a robot-operated system, comprising:
[0080] A temporary target point generating device is used to autonomously generate a temporary target point that the unmanned vehicle can reach based on a cost map (costmap) when the navigation center hub node (move_base) of the robot operating system feedbacks that the unmanned vehicle cannot reach the predetermined target point.
[0081] The original target point sending device is used to send the original target point (precious_goal) to the navigation center hub node (move_base) again for path planning when the unmanned vehicle reaches the temporary target point and escapes from the trapped situation.
[0082] Wherein, the temporary target point generating device includes:
[0083] The temporary target point location setting module is used to traverse all grids of the current costmap and select the coordinates corresponding to one of the grids as the temporary target point location coordinates according to the temporarily preset target point generation method.
[0084] The temporary target point variable setting module is used to use the current unmanned vehicle's orientation information as the orientation constraint of the temporary target point, send the temporary target point to the central hub node (move_base), and set the temporary target point publishing variable (repub_goal) to true.
[0085] Wherein, the temporary target point location setting module includes:
[0086] The barrier-free free space grid selection unit is used to store the grid coordinates with a cost value of 0 and the distance information between the grid coordinates and the unmanned vehicle into container No. 1.
[0087] The function filtering unit is used to transform the grid coordinates based on the coordinate system with the unmanned vehicle position as the origin and the unmanned vehicle orientation as the positive x-axis. If the unmanned vehicle is trapped during the backward movement, a temporary target point is selected in the area in front of the vehicle. If the unmanned vehicle is trapped during the forward movement, a temporary target point is selected in the area behind the vehicle. It is determined whether the absolute value of the slope of the line connecting the unmanned vehicle position point and the temporary target point is less than the threshold set by the slope absolute value parameter. If so, the grid that meets the condition is placed in the second container.
[0088] The parameter setting unit is used to set the maximum distance, secondary distance and minimum distance between the temporary target point candidate grid and the unmanned vehicle.
[0089] The secondary filtering unit is used to select the grids between the minimum distance and the secondary distance in the No. 2 container, and place the grids that meet the conditions into the No. 3 container; select the grids in the No. 2 container that are less than the minimum distance value and place them into the No. 3 container; select the grids in the No. 2 container that are greater than the secondary distance and less than the maximum distance value and place them into the No. 3 container.
[0090] The three-stage filtering unit is used to return the unmanned vehicle's escape failure information if the No. 3 container is finally empty, and re-execute the preset target point generation method. If the No. 3 container is not empty, the grid with the smallest absolute value of the slope of the line connecting the unmanned vehicle position point and the grid point coordinates is selected, and its corresponding coordinates are used as the temporary target point position coordinates.
[0091] Wherein, the original target point sending device includes:
[0092] The original target point setting module is used to send the original target point (precious_goal) when the unmanned vehicle reaches the temporary target point, and set the temporary target point publication variable (repub_goal) to false.
[0093] The original target point variable setting module is used to set the original target point (precious_goal) as the current target point if the current temporary target point publication variable (repub_goal) is false after the central hub node (move_base) receives the original target point (precious_goal).
[0094] A third embodiment of the present invention provides a specific implementation step of a method for autonomously escaping an unmanned vehicle using a robot-operated system, including:
[0095] 1. Enable the automatic generation mechanism of temporary target points
[0096] When control and planning fail or the unmanned vehicle oscillates, in the ROS navigation package move_base.cpp, in boolMoveBase::executeCycle(geometry_msgs::PoseStamped&goal,std::vector<geometry_msgs::PoseStamped> &global_plan) function, call the added function of resuming driving behavior after being trapped.
[0097] 2. Add a function for resuming driving after being trapped and select an obstacle-free free space grid
[0098] Add a function to resume driving after being trapped in the move_base node of the ROS navigation package. This function traverses all grids of the cost map generated in real time and obtains the current position information of the vehicle. If the grid cost value is 0, the coordinates of the obstacle-free free space grid and its distance to the unmanned vehicle are placed in container 1; then, the added temporary target point generation function is called.
[0099] 3. Design a temporary target point generation method and implement a temporary target point generation function
[0100] 3.1 The first coordinate transformation of the barrier-free free space grid: The temporary target point generation function called in the function of resuming driving behavior after being trapped first performs the first coordinate transformation on the barrier-free free space grid in container 1, such as Figure 2 As shown, the xy coordinate system is the original map coordinate system, and the lower right corner is the map origin; the current coordinates of the unmanned vehicle are used as the coordinate origin to form the x1y1 coordinate system, and then the coordinates of the grid in the x1y1 coordinate system are obtained;
[0101] 3.2 The second coordinate transformation of the barrier-free free space grid: Figure 2 As shown, with the direction of the unmanned vehicle as the positive direction of the x-axis, the x1y1 coordinate system is rotated to form the x2y2 coordinate system, and then the coordinates of the grid in the x2y2 coordinate system are obtained;
[0102] 3.3; First filtering: If the autonomous vehicle is trapped while reversing, select the unobstructed free space grid in front of the vehicle and whose absolute value of the slope of the line connecting the autonomous vehicle is less than the set slope absolute value threshold (based on the x2y2 coordinate system); otherwise, select the grid behind the vehicle and whose absolute value of the slope of the line connecting the autonomous vehicle is less than the set slope absolute value threshold (based on the x2y2 coordinate system); place the grids that meet the filtering conditions into container 2;
[0103] 3.4 Set the relevant parameters when generating temporary target points: maximum distance, secondary distance and minimum distance parameters;
[0104] 3.5: Second filtering: In container 2, select the grid between the minimum distance and the secondary distance. If it meets the conditions, put it into container 3. If it does not meet the conditions, select the grid with a value less than the minimum distance. If it meets the conditions, put it into container 3. If it does not meet the conditions, select the grid with a value greater than the secondary distance and less than the maximum distance. If it meets the conditions, put it into container 3.
[0105] 3.6: Third filtering: If container 3 is empty, return the information that the unmanned vehicle failed to escape; otherwise, traverse all the grids in container 3 and select the grid with the smallest absolute value of the slope of the line connecting the coordinate point and the origin of the x2y2 coordinate system.
[0106] 4. Send temporary target point
[0107] Clear containers 1, 2, and 3. After the third filtering, the world coordinates of the grid corresponding to the obtained grid are used as the location attributes of the temporary target point. The current vehicle's orientation information is used as the orientation constraint of the temporary target point. The temporary target point is sent to the move_base node, and the temporary target point publication variable (repub_goal) is set to true. If the unmanned vehicle cannot reach the temporary target point, return to step 1 and generate a new temporary target point based on the current cost map.
[0108] 5. Send the original target point
[0109] When the unmanned vehicle reaches the temporary target point, it sends the original target point (precious_goal) and sets the temporary target point publication variable (repub_goal) to false. After move_base receives the target point, if repub_goal is false, it sets precious_goal to the current target point.
[0110] The embodiments of the present invention are intended to protect a method and system for autonomously escaping an unmanned vehicle in a robot-operated system, which has the following effects:
[0111] This paper designs an autonomous unmanned vehicle escape mechanism. When the robot's navigation system's central hub node (move_base) reports local trajectory control failure, route planning failure, or repeated oscillation, it autonomously generates a temporary destination point accessible to the unmanned vehicle based on a cost map. Once the unmanned vehicle reaches the temporary destination point and escapes the trapped situation, it retransmits the original destination point to the central hub node (move_base) in the navigation package for path planning. This mechanism effectively helps the unmanned vehicle escape if it collides with an obstacle or planning fails, ultimately reaching its intended destination.
[0112] The computer program product of the method and device for autonomous escape of an unmanned vehicle using a robot operating system provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the previous method embodiment. For specific implementation, please refer to the method embodiment and will not be repeated here.
[0113] Specifically, the storage medium can be a general storage medium, such as a mobile disk, hard disk, etc. When the computer program on the storage medium is run, it can execute the above-mentioned unmanned vehicle autonomous escape method for the robot operating system, so that when the unmanned vehicle collides with an obstacle or the planning fails, it can effectively help the unmanned vehicle to escape and finally reach the predetermined target point.
[0114] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0115] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for autonomously escaping an unmanned vehicle using a robot operating system, characterized in that: include: When the navigation center hub node of the robot operating system reports that the unmanned vehicle cannot reach the predetermined target point, it will autonomously generate a temporary target point that the unmanned vehicle can reach based on the cost map; The autonomously generated temporary target points reachable by the unmanned vehicle include: Traverse all grids of the current cost map and select the coordinates corresponding to one of the grids as the temporary target point location coordinates according to the preset target point generation method. The cost map is formed by assigning a cost value to each grid in the grid map. The preset target point generation method includes: Store the grid coordinates with a cost value of 0 and the distance information between the grid coordinates and the unmanned vehicle into container No. 1; The grid coordinates are transformed based on the coordinate system with the position of the unmanned vehicle as the origin and the direction of the unmanned vehicle as the positive x-axis. If the autonomous vehicle is stuck while performing a backward movement, a temporary target point is selected in the area in front of the vehicle. If the autonomous vehicle is stuck while performing a forward movement, a temporary target point is selected in the area behind the vehicle. Determine whether the absolute value of the slope of the line connecting the unmanned vehicle position point and the temporary target point is less than the threshold set by the slope absolute value parameter. If so, place the grid that meets the condition into the second container. Set the maximum distance, secondary distance and minimum distance between the temporary target point candidate grid and the unmanned vehicle; Select the grids between the minimum distance and the secondary distance in the second container, and place the grids that meet the conditions into the third container; If none of the above conditions are met, select the grid with a smaller distance than the minimum value in the second container and put it into the third container; If none of the above conditions are met, select the grid in the second container that is larger than the secondary distance and smaller than the maximum distance value and put it into the third container; If the No. 3 container is finally empty, the unmanned vehicle will return a message indicating that it has failed to escape, and the preset target point generation method will be re-executed; If container No. 3 is not empty, the grid with the smallest absolute value of the slope of the line connecting the unmanned vehicle position and the grid point coordinates is selected, and its corresponding coordinates are used as the temporary target point position coordinates; When the unmanned vehicle reaches the temporary target point and escapes the trapped situation, it sends the original target point to the navigation center hub node again for path planning; Among them, situations in which the unmanned vehicle cannot reach the predetermined target point include failure of local trajectory control, failure of route planning, or repeated oscillations.
2. The autonomous escape method for an unmanned vehicle using a robot operating system according to claim 1, characterized in that: The autonomous generation of temporary target points reachable by the unmanned vehicle based on the cost map also includes: The current unmanned vehicle's orientation information is used as the orientation constraint of the temporary target point, the temporary target point is sent to the central hub node, and the temporary target point publishing variable is set to true.
3. The autonomous escape method for an unmanned vehicle using a robot operating system according to claim 2, characterized in that: When the unmanned vehicle reaches the temporary target point and escapes the trapped situation, it sends the original target point to the navigation center hub node again for path planning, including: When the unmanned vehicle reaches the temporary target point, it sends the original target point and sets the temporary target point publishing variable to false; When the central hub node receives the original destination point, if the current temporary destination point release variable is false, the original destination point is set as the current destination point.
4. An autonomous escape system for an unmanned vehicle using a robot operating system, characterized in that: include: A temporary target point generating device is used to autonomously generate a temporary target point that the unmanned vehicle can reach based on the cost map when the navigation center hub node of the robot operating system reports that the unmanned vehicle cannot reach the predetermined target point; The temporary target point generating device includes a temporary target point position setting module; The temporary target point location setting module is used to traverse all grids of the current cost map and select the coordinates corresponding to one of the grids as the temporary target point location coordinates according to a preset target point generation method, including: The barrier-free free space grid selection unit is used to store the grid coordinates with a cost value of 0 and the distance information between the grid coordinates and the unmanned vehicle into the first container; The function filtering unit is used to transform the grid coordinates based on the coordinate system with the position of the unmanned vehicle as the origin and the direction of the unmanned vehicle as the positive direction of the x-axis. If the unmanned vehicle is trapped during the backward movement, a temporary target point is selected in the area in front of the vehicle. If the unmanned vehicle is trapped during the forward movement, a temporary target point is selected in the area behind the vehicle. It is determined whether the absolute value of the slope of the line connecting the unmanned vehicle position point and the temporary target point is less than the threshold set by the slope absolute value parameter. If so, the grid that meets the condition is placed in the second container. The parameter setting unit is used to set the maximum distance, secondary distance and minimum distance between the temporary target point candidate grid and the unmanned vehicle; The secondary filtering unit is used to select the grids between the minimum distance and the secondary distance in the No. 2 container, and place the grids that meet the conditions into the No. 3 container; if the above conditions are not met, the grids in the No. 2 container that are less than the minimum distance value are selected and placed into the No. 3 container; if the above conditions are not met, the grids in the No. 2 container that are greater than the secondary distance and less than the maximum distance value are selected and placed into the No. 3 container; The tertiary filtering unit is used to return the unmanned vehicle escape failure information if the No. 3 container is ultimately empty and re-execute the preset target point generation method. If the No. 3 container is ultimately not empty, the grid with the smallest absolute value of the slope of the line connecting the unmanned vehicle position point and the grid point coordinates is selected, and the corresponding coordinates are used as the temporary target point position coordinates; The original target point sending device is used to send the original target point to the navigation center hub node again for path planning when the unmanned vehicle reaches the temporary target point and escapes from the trapped situation.
5. The autonomous escape system for unmanned vehicles with a robot operating system according to claim 4 is characterized in that: The temporary target point generating device further includes: The temporary target point variable setting module is used to use the current unmanned vehicle's orientation information as the orientation constraint of the temporary target point, send the temporary target point to the central hub node, and set the temporary target point publishing variable to true.
6. The autonomous escape system for unmanned vehicles with a robot operating system according to claim 4, characterized in that: The original target point sending device includes: The original target point setting module is used to send the original target point and set the temporary target point publishing variable to false when the unmanned vehicle arrives at the temporary target point; The original target point variable setting module is used to set the original target point as the current target point if the current temporary target point release variable is false after the central hub node receives the original target point.
Citation Information
Patent Citations
Real-time planning method for local driving route of unmanned vehicle in field environment
CN110967032A
ROS-oriented unmanned vehicle backing mechanism
CN112833898A