Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of main steps of a robot obstacle avoidance method according to an embodiment of the present invention. As shown in fig. 1, the robot obstacle avoidance method according to the embodiment of the present invention mainly includes the following steps:
step S101: sampling multiple groups of speeds in a speed space according to the motion limiting conditions of the robot to simulate the motion tracks of the robot under the multiple groups of speeds to obtain a simulated track set; wherein the plurality of sets of speeds includes speeds of the robot at a plurality of times. The motion limiting conditions of the robot include a maximum and minimum speed limit of the robot itself, an actual maximum and minimum speed limit that the robot can reach within a set time interval, and an anti-collision limit. On the premise of meeting the motion limiting conditions, the speed space is randomly sampled for multiple times, or the sampling is carried out for multiple times according to set intervals, and multiple groups of speeds are obtained. And inputting a plurality of groups of speeds into a pre-constructed track motion model to simulate a plurality of motion tracks of the robot, wherein the simulated motion tracks form a simulated track set.
Step S102: expanding the obstacles in the environment map, and filtering the motion trail passing through the obstacles or the expansion area from the simulation trail set to obtain an optimized trail set; the expansion area is an area surrounded by the pixel point edge and the expansion edge of the obstacle in the environment map. And (3) carrying out expansion processing on the obstacles in the environment map constructed by the robot in advance, namely expanding the pixel points of the obstacles in the environment map outwards according to the set expansion distance. If the robot moves along the motion track passing through the obstacle or the expansion area, the robot is likely to collide with the obstacle, so the motion track passing through the obstacle or the expansion area needs to be filtered from the simulation track set to obtain an optimized track set.
Step S103: and respectively evaluating the motion tracks of the optimized track set by adopting an evaluation function so as to determine a target track from the optimized track set according to an evaluation result, and driving the robot to move by using the speed corresponding to the target track. At least one evaluation factor is predetermined, and an evaluation function can be obtained by weighting and summing the evaluation factors. And calculating evaluation values of a plurality of motion tracks in the optimized track set by using an evaluation function to determine an optimal motion track, namely a target track, from the optimized track set based on the evaluation values, and sending a speed corresponding to the target track to the robot through a control command so as to drive the robot to move to a target position according to the speed and avoid collision with an obstacle.
Fig. 2 is a schematic diagram of the positioning and navigation principle of the robot according to the embodiment of the invention. As shown in fig. 2, first, the robot senses the surrounding environment by using the sensor carried by the robot to perform self-localization and construct an environment map. Then, the environment around the robot is recognized (namely, where the robot is located and the surrounding environment are determined) by combining the sensed environment information (including the information of the size, the shape, the position and the like of the obstacle) and the position information obtained by positioning, and then motion control is carried out; the motion control includes behavior cognition (that is, the robot moves in an omnidirectional manner, or only can move forward and rotate), obstacle avoidance behavior, position feedback (the position is the position of the robot after moving), and path planning (including global path planning and local path planning). And then, environment sensing is carried out again according to position feedback, and the current position of the robot, the target position of the robot, how to move to the target position and temporary obstacle avoidance in the moving process can be obtained by circulating the processes, so that the robot can move autonomously.
Fig. 3 is a main flow diagram of a robot obstacle avoidance method according to an embodiment of the present invention. As shown in fig. 3, the robot obstacle avoidance method according to the embodiment of the present invention mainly includes the following steps:
step S301: and constructing a track motion model for the robot. Assuming that the motion trajectory of the robot is a segment of an arc or a straight line (when the angular velocity of the robot is 0), a pair of the motion trajectories (v and v) are determinedt,ωt) It can represent a circular arc trajectory, where vtIs the linear velocity, omega, of the robot at time ttIs the angular velocity of the robot at time t.
Assuming that the robot can only advance and rotate and cannot move longitudinally, as shown in fig. 4, the motion track between two adjacent moments is regarded as a straight line in the embodiment, and the robot (i.e. the circle in fig. 4) follows the x directionrobotThe axis moving distance is vtX Δ t, where Δ t is the time interval. Projecting the moving distance to the x-axis and the y-axis of the world coordinate system to obtain the displacements Δ x and Δ y of the robot moving in the world coordinate system at the time t +1 relative to the time t, which can be specifically expressed by the following formula:
where v is the x-axis of the robot at time trobotLinear velocity in the axial direction, θtIs xrobotThe axis is at an angle to the x-axis.
By analogy, the accumulated sum of the displacements in a period of time can obtain the motion trajectory (x, y, θ) of the robot in a period of time, which can be specifically represented by the following formula:
if the robot is moving omnidirectionally, i.e. in the robot coordinate system, the robot is in xrobotAxis and yrobotThe axes all have speed, then the robot needs to be arranged at yrobotThe moving distance of the axis is projected to the world coordinate system, which can be specifically expressed by the following formula:
in the formula, vyFor the robot at time t along yrobotLinear velocity in the axial direction.
At the moment, the motion trail of the robot in a period of time needs to be superposed with y on the basis of the formula 2robotThe moving distance of the shaft can be specifically represented by the following formula:
the track motion model of the robot can be represented by formula 4, and the motion track of the robot can be simulated according to the track motion model.
Step S302: multiple sets of velocities are sampled in a velocity space according to motion constraints of the robot. According to the track motion model, a plurality of groups of speeds are sampled to simulate the motion track of the robot, and the obtained motion tracks are scored subsequently, so that the optimal motion track can be obtained. Infinite groups of speeds exist in a two-dimensional space of the speeds (V, omega), in the embodiment, multiple sampling can be carried out according to a set interval or randomly, multiple speeds at the same moment are obtained by sampling each time, the speeds are taken as a group, multiple groups of speeds are obtained by sampling for multiple times, and the multiple groups of speeds form a speed set Vm. For example, the linear velocity v is in the range of 0m/s, 1.5m/s]Sampling at 0.2m/s intervals, the sampled velocities are [0.2m/s, 0.4m/s, 0.6m/s, 0.8m/s, 1.0m/s, 1.2m/s, 1.4m/s]。
In an alternative embodiment, the velocity setVmThe velocity (v, ω) in (f) needs to satisfy the following motion limitation condition:
(1) maximum and minimum speed limit of the robot itself: the speed of the robot is limited by its maximum and minimum speed, i.e. it needs to be greater than or equal to its minimum speed allowed by itself, and less than or equal to its maximum speed allowed by itself, and it can be specifically represented by the following formula:
Vm={v∈[vmin,vmax],ω∈[ωmin,ωmax]equation 5
In the formula, vmin、vmaxRespectively the minimum linear speed and the maximum linear speed, omega, allowed by the robotminAnd ωmaxRespectively the minimum angular velocity and the maximum angular velocity allowed by the robot itself.
(2) Actual maximum minimum speed limit that the robot can reach within a set time interval: because the motor torque of the robot is limited and the maximum acceleration and deceleration limit exists, a dynamic window exists in the forward simulation period of the motion trail of the robot, and the speed in the dynamic window is the speed which can be actually reached by the robot. That is, the speed of the robot needs to be equal to or higher than the minimum speed that the robot can actually reach in the time interval, and is equal to or lower than the maximum speed that the robot can actually reach in the time interval, which can be specifically expressed by the following formula:
in the formula, v
cAnd ω
cRespectively the current linear velocity and the current angular velocity of the robot,
and
respectively the maximum deceleration and the maximum acceleration corresponding to the linear velocity of the robot,
and
the maximum deceleration and the maximum acceleration corresponding to the angular velocity of the robot are represented and calculated.
(3) Anti-collision limitation: based on the safety considerations of the robot, the robot needs to stop before hitting an obstacle, so under the condition of maximum deceleration, the speed of the robot should satisfy the following formula:
in the formula, dist (V, ω) is the closest distance between the robot and the obstacle on the motion trajectory corresponding to the velocity (V, ω), VaIs a set of speeds that the robot can stop before colliding with an obstacle. Fig. 5 is a schematic view of a robot collision prevention principle according to an embodiment of the present invention. As shown in fig. 5, the point where the motion trajectory intersects with the obstacle is a collision point, and the black solid line inside the robot is the motion direction of the robot. In order to ensure that the robot stops before hitting an obstacle, the speed of the robot needs to satisfy equation 7.
It should be noted that the condition corresponding to formula 7 is not obtained from the beginning of sampling, but needs to calculate the distance between the robot and the obstacle when moving along the motion trajectory after the motion trajectory of the robot is simulated, determine whether the speed corresponding to the motion trajectory can stop before colliding with the obstacle, and if the speed can stop, keep the pair of speeds; if it cannot stop, the pair of speeds is discarded.
Step S303: and inputting a plurality of groups of speeds into the track motion model to obtain a plurality of motion tracks of the robot, and adding the plurality of motion tracks into the simulation track set.
Step S304: and (3) carrying out expansion processing on the obstacles in the environment map, and filtering the motion trail passing through the obstacles or the expansion area from the simulation trail set. When the prior art is used for obstacle avoidance, the robot is taken as a mass point, namely the overall contour and the shape of the robot are not considered, and the optimal motion track is determined from the simulation track set directly by the evaluation function. However, the optimal motion trajectory determined in this way may be relatively close to the obstacle, so that the robot cannot pass through the real environment (i.e., may collide with the obstacle) or may pass through the real environment dangerously (i.e., may collide with the obstacle). Therefore, the obstacles in the environment map are subjected to expansion processing, and when the robot is subjected to local path planning, the movement tracks passing through the obstacles or the expansion area are discarded, so that the obstacles are greatly avoided, the number of the movement tracks subsequently participating in evaluation is reduced, and the path planning speed is increased. The expansion area is an area enclosed by the pixel point edge and the expansion edge of the obstacle in the environment map.
In the embodiment, the expansion processing of the obstacle is specifically realized as follows: and expanding the pixel points of the obstacles in the environment map outwards according to the set expansion distance. If a passable pixel point exists between two obstacles, the robot can pass through the two obstacles when the size of the real world corresponding to the passable pixel point is larger than or equal to the minimum width allowing the robot to pass through. Therefore, the expansion distance needs to be equal to or greater than 1/2, which is the width of the environment map corresponding to the minimum width allowing the robot to pass. In addition, the environment map is a 2-dimensional pixel array in the computer, for example, one pixel represents 10cm in the real world, and then 100 × 100 pixels can represent a 10 × 10m working environment. The pixel values may be 0 and 1 to indicate the presence and absence of an obstacle.
The expansion distance is exemplified below. For example, assume that the robot is cylindrical with a diameter D1The minimum width allowing the robot to pass is D1The minimum width D1Corresponding to the width of m in the environment map1The expansion distance S is greater than or equal to m1/2. As another example, the robot is a cube with a minimum dimension D2The minimum width allowing the robot to pass is D2The minimum width D2Corresponding to the width of m in the environment map2The expansion distance S is greater than or equal to m2/2. For another example, if the robot is irregular, the robot will be the rootAnd determining a minimum width allowing the robot to pass according to the contour and the shape of the robot, wherein the minimum width corresponds to the width of the environment map, and the expansion distance S is more than or equal to half of the width.
Step S305: judging whether the filtered simulation track set is empty, if so, executing step S306; if not, step S307 is executed. After the filtering process in step S304, although the obstacle can be greatly avoided, for the situation that a narrow path needs to be passed, such as an indoor environment, the expansion area may block the path, and directly filtering the motion trajectory containing the expansion area may result in that the robot cannot find a feasible motion trajectory, which results in a failure of path planning. Therefore, three regions that may be encountered by the robot during path planning are set in the embodiment: the safety area, the warning area and the obstacle area, and respectively processes the motion tracks passing through the three areas.
The following explains the three regions, respectively: a safety area: a region that does not intersect both the barrier and the expansion zone; a warning area: an area formed by removing the minimum expansion area of the obstacle from the expansion area; barrier area: the obstacle itself and the area of least expansion. Wherein the minimum expansion zone is obtained by: the expansion area obtained by performing the expansion processing on the obstacle is the minimum expansion area, with 1/2 being the width of the environment map corresponding to the minimum width allowing the robot to pass as the expansion distance.
Fig. 6 is a schematic diagram of the division of the safety zone, the warning zone and the obstacle zone in the embodiment of the present invention. As shown in fig. 6, the circle is a robot, and the black solid box is an obstacle. Assuming that the width of the environment map corresponding to the radius of the robot is 2cm, and the pixel of the obstacle in the environment map is 2 × 2cm, the expansion distance corresponding to the minimum expansion area is 2cm, and the minimum expansion area is obtained by expanding outwards from the edge of the pixel point of the obstacle by taking 2cm as the expansion distance. In the embodiment, the expansion area is obtained by expanding outwards from the edge of the pixel point of the barrier by taking 5cm as the expansion distance.
Step S306: the motion trajectory passing through the alert zone is added to the optimized trajectory set, and step S308 is performed. If the filtered simulation track set is empty, no feasible motion track exists in the safety area, the motion track passing through the warning area can be added into the optimized track set, and then the motion track in the optimized track set is evaluated, so that local path planning is realized, and the stability of the robot in a narrow environment in the obstacle avoidance process is improved.
In a preferred embodiment, the maximum moving speed of the robot can also be reduced, for example, reduced to half of the original speed, so that the robot passes through the warning area at a low speed, and the safety of the robot in a narrow environment during obstacle avoidance is improved.
Step S307: step S308 is executed with the filtered set of simulated trajectories as the optimized trajectory set. If the filtered simulation track set is not empty, the fact that a feasible motion track exists in the safety area is indicated, the filtered simulation track set is directly used as an optimized track set, and then the motion track in the optimized track set is evaluated to achieve local path planning.
Step S308: and respectively evaluating the motion tracks of the optimized track set by adopting an evaluation function. And comprehensively considering performance indexes such as the directivity of the motion track to be evaluated (namely, a plurality of motion tracks in the optimization track set), the smoothness of the robot motion, the rapidity of reaching a target position and the like, and constructing an evaluation function. The evaluation function is obtained by weighted summation of one or more evaluation factors, wherein the evaluation factors can comprise an azimuth evaluation factor, a first distance evaluation factor, a speed evaluation factor and second to fourth distance evaluation factors. In an example, the merit function G (v, ω) may be represented by the following formula:
wherein, sigma, alpha, beta, gamma, mu, eta and rho are the weights of the corresponding evaluation factors and are constants; the azimuth angle evaluation factor header (v, omega) is used for representing an angle between the robot and a target position when the robot reaches the tail end of a corresponding motion track at the current speed; a first distance evaluation factor dist (v, ω) for representing a closest distance between the robot and the obstacle on the current motion trajectory; the speed evaluation factor velocity (v, omega) is used for representing the speed corresponding to the current motion track; a second distance evaluation factor Obs (v, ω) for representing a moving distance of the robot within the simulation cycle; a third distance evaluation factor Gdist (v, ω) for representing the distance between the robot and the target position when the robot reaches the end of the corresponding motion trajectory at the current speed; and the fourth distance evaluation factor Pdest (v, omega) is used for representing the shortest distance of the optimal path corresponding to the global path planning when the robot reaches the tail end of the corresponding motion track at the current speed. The algorithm adopted by the global path planning may be an a Star (a), a D Star (D), or the like.
When the robot reaches the end of the corresponding motion track at the current speed, the angle between the robot and the target position
The smaller the evaluation score of heading (v, ω) is. The larger dist (v, ω), the higher the evaluation score. In a preferred embodiment, if there is no obstacle on the current motion trajectory, dist (v, ω) may be set to a constant, such as an empirical value of 8 m. The larger velocity (v, ω), the higher the evaluation score. Obs (v, ω) represents the speed of movement, and the larger the value, the higher the evaluation score. Gdist (v, ω) can ensure that the robot advances toward the target position, and the smaller the value thereof, the higher the evaluation score. The Pdi (v, omega) can ensure that the robot advances along the optimal path planned by the global path, the smoothness of the motion track is improved, and the smaller the value of the Pdi (v, omega), the higher the evaluation score is.
In the embodiment, the weight value of each evaluation factor is determined according to an actual application scenario, for example, in an outdoor spacious environment, if the safety of the robot is important, the weight values of heading (v, ω) and Gdist (v, ω) can be set to be large; in an indoor narrow environment, the speed of the robot is important, and the weight values of Obs (v, ω), velocity (v, ω), and the like may be set to be large. In an indoor narrow environment, the above-mentioned weight is set to 1.0, 0.1, 0.2, 0.3, 0.1, 0.2, respectively, in the embodiment.
In a preferred embodiment, after the five evaluation factors are calculated, normalization processing is performed first, and then the value of the evaluation function is calculated, so that the motion trajectory can be smoother. Taking dist (v, ω) as an example, the normalization process is shown as follows:
in the formula, normal _ dist (i) is a normalization result of the closest distance between the robot and the obstacle in the ith motion trajectory to be evaluated, dist (i) is the closest distance between the robot and the obstacle in the ith motion trajectory to be evaluated, and n is the number of the motion trajectories to be evaluated.
Fig. 7 is a schematic view of an angle between the robot and a target position when the robot travels along a motion track according to an embodiment of the present invention. As shown in fig. 7, when the robot moves from the current actual position to the predicted position along the current motion trajectory, the line connecting the center point of the robot and the target position forms an included angle with the motion direction of the robot
In the evaluation function of formula 8, the first three evaluation factors, namely, leading (v, ω), dist (v, ω), and velocity (v, ω), ensure that the robot avoids the obstacle and moves towards the target position at a relatively high speed in the local navigation process; the last three evaluation factors Obs (v, omega), Gdist (v, omega) and Pdist (v, omega) improve the stability and the smoothness of the movement direction of the robot and reduce the time for the robot to reach the end point.
Step S309: and taking the motion track of the optimal evaluation value as a target track, and driving the robot to move by using the speed corresponding to the target track. In the formula 8, since some evaluation factors have high evaluation scores when the evaluation factors take small values and some evaluation factors have high evaluation scores when the evaluation factors take large values, the weights of the evaluation factors can be adjusted to be positive or negative, so that the evaluation factors are unified into high evaluation scores when the evaluation factors take large values or small evaluation values. In the embodiment, when the evaluation factors are unified to be small in value and the evaluation score is high, and when the evaluation value of the evaluation function is the lowest, the corresponding motion track is the optimal track, and the track is taken as the target track, so that the robot can move towards the target position quickly, stably and smoothly while avoiding the obstacle.
In an embodiment, if the motion trajectory corresponding to the lowest evaluation value is the optimal trajectory, the speed corresponding to the lowest evaluation value may be determined by the following equation to drive the robot to move at the speed:
in the formula, V*(V, ω), V corresponding to the motion trajectory to be evaluated which is the lowest evaluation valuerAnd (v, omega) corresponding to all motion tracks to be evaluated.
In the implementation process, the motion trail of the simulated trail set is filtered out firstly, and if the residual motion trail exists, the motion trail with the lowest evaluation function value is taken to carry out local path planning; if no residual motion track exists at the moment, adding the motion track of the warning area, simultaneously reducing the moving speed of the robot, and then taking the motion track with the lowest evaluation function value to perform local path planning; if the motion track passing through the warning area does not exist, the robot cannot pass through the warning area.
According to the robot obstacle avoidance method, after the obstacle is subjected to expansion processing, the simulated track is filtered to concentrate the motion track passing through the obstacle or the expansion area, and then the target track is determined by combining the evaluation function, so that the collision between the robot and the obstacle is avoided, the number of the motion tracks participating in evaluation is reduced, and the time consumption for determining the target track is reduced; and determining the expansion distance based on the overall dimension of the robot, and ensuring that the filtered motion trail avoids the obstacle.
Fig. 8 is a schematic diagram of main modules of a robot obstacle avoidance device according to an embodiment of the present invention. As shown in fig. 8, a robot obstacle avoidance apparatus 800 according to an embodiment of the present invention mainly includes:
a trajectory simulation module 801, configured to sample multiple sets of speeds in a speed space according to a motion limitation condition of the robot, so as to simulate motion trajectories of the robot at the multiple sets of speeds, and obtain a simulated trajectory set; wherein the plurality of sets of speeds includes speeds of the robot at a plurality of times. The motion limiting conditions of the robot include a maximum and minimum speed limit of the robot itself, an actual maximum and minimum speed limit that the robot can reach within a set time interval, and an anti-collision limit. On the premise of meeting the motion limiting conditions, the speed space is randomly sampled for multiple times, or the sampling is carried out for multiple times according to set intervals, and multiple groups of speeds are obtained. And inputting a plurality of groups of speeds into a pre-constructed track motion model to simulate a plurality of motion tracks of the robot, wherein the simulated motion tracks form a simulated track set.
The expansion filtering module 802 is configured to perform expansion processing on the obstacles in the environment map, and filter the motion trajectory passing through the obstacle or the expansion area from the simulated trajectory set to obtain an optimized trajectory set; the expansion area is an area surrounded by the pixel point edge and the expansion edge of the obstacle in the environment map. And (3) carrying out expansion processing on the obstacles in the environment map constructed by the robot in advance, namely expanding the pixel points of the obstacles in the environment map outwards according to the set expansion distance. If the robot moves along the motion track passing through the obstacle or the expansion area, the robot is likely to collide with the obstacle, so the motion track passing through the obstacle or the expansion area needs to be filtered from the simulation track set to obtain an optimized track set.
And the evaluation determining module 803 is configured to respectively evaluate the motion trajectories of the optimized trajectory set by using an evaluation function, determine a target trajectory from the optimized trajectory set according to an evaluation result, and drive the robot to move at a speed corresponding to the target trajectory. At least one evaluation factor is predetermined, and an evaluation function can be obtained by weighting and summing the evaluation factors. And calculating evaluation values of a plurality of motion tracks in the optimized track set by using an evaluation function to determine an optimal motion track, namely a target track, from the optimized track set based on the evaluation values, and sending a speed corresponding to the target track to the robot through a control command so as to drive the robot to move to a target position according to the speed and avoid collision with an obstacle.
In addition, the robot obstacle avoidance device 800 according to the embodiment of the present invention may further include: add modules and build modules (not shown in figure 8). The adding module is used for adding the motion track passing through the warning area to the optimized track set under the condition that the filtered simulation track set is empty; wherein the warning region is obtained by removing the minimum expansion region of the obstacle from the expansion region. The building module is used for determining the moving distance of the robot in a set time interval under a robot coordinate system; projecting the moving distance to a world coordinate system to obtain the displacement of the robot in the world coordinate system; and cumulatively summing the displacements within a set time period to construct a track motion model for the robot.
From the above description, it can be seen that after the obstacle is subjected to expansion processing, the movement tracks of the simulated tracks passing through the obstacle or the expansion area are filtered, and then the target tracks are determined by combining the evaluation function, so that the robot and the obstacle are prevented from colliding, the number of the movement tracks participating in evaluation is reduced, and the time consumed for determining the target tracks is reduced; and determining the expansion distance based on the overall dimension of the robot, and ensuring that the filtered motion trail avoids the obstacle.
Fig. 9 shows an exemplary system architecture 900 of a robot obstacle avoidance method or a robot obstacle avoidance apparatus to which an embodiment of the present invention may be applied.
As shown in fig. 9, the system architecture 900 may include end devices 901, 902, 903, a network 904, and a server 905. Network 904 is the medium used to provide communication links between terminal devices 901, 902, 903 and server 905. Network 904 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 901, 902, and 903 may be mobile devices that need to provide an obstacle avoidance function, and in the embodiments, the mobile devices may be a sweeping robot, a meal delivery robot, a navigation transportation vehicle, and the like.
The server 905 may be a server that provides various services, such as a backend management server that provides support for data generated by the terminal devices 901, 902, 903. The background management server can store the received map data, motion trail and the like.
It should be noted that the robot obstacle avoidance method provided in the embodiment of the present application is generally executed by the terminal devices 901, 902, and 903, and accordingly, the robot obstacle avoidance apparatus is generally disposed in the terminal devices 901, 902, and 903.
It should be understood that the number of terminal devices, networks, and servers in fig. 9 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The invention also provides an electronic device and a computer readable medium according to the embodiment of the invention.
The electronic device of the present invention includes: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the robot obstacle avoidance method of the embodiment of the invention.
The computer readable medium of the present invention has a computer program stored thereon, and the program, when executed by a processor, implements the robot obstacle avoidance method of the embodiment of the present invention.
Referring now to FIG. 10, shown is a block diagram of a computer system 1000 suitable for use in implementing an electronic device of an embodiment of the present invention. The electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 10, the computer system 1000 includes a Central Processing Unit (CPU)1001 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)1002 or a program loaded from a storage section 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for the operation of the system 1000 are also stored. The CPU 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
The following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output section 1007 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 1008 including a hard disk and the like; and a communication section 1009 including a network interface card such as a LAN card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The driver 1010 is also connected to the I/O interface 1005 as necessary. A removable medium 1011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1010 as necessary, so that a computer program read out therefrom is mounted into the storage section 1008 as necessary.
In particular, the processes described above with respect to the main step diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication part 1009 and/or installed from the removable medium 1011. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 1001.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The principal step diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a trajectory simulation module, an expansion filter module, and an evaluation determination module. The names of these modules do not form a limitation on the module itself in some cases, for example, the trajectory simulation module may also be described as a module that "samples multiple sets of speeds in the speed space according to the motion limitation condition of the robot to simulate the motion trajectory of the robot at the multiple sets of speeds, resulting in a simulated trajectory set".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: sampling multiple groups of speeds in a speed space according to the motion limiting conditions of the robot to simulate the motion tracks of the robot under the multiple groups of speeds to obtain a simulated track set; wherein the plurality of sets of speeds comprises speeds of the robot at a plurality of times; expanding the obstacles in the environment map, and filtering the motion trail passing through the obstacles or the expansion area from the simulation trail set to obtain an optimized trail set; the expansion area is an area surrounded by the pixel point edge and the expansion edge of the obstacle in the environment map; and respectively evaluating the motion tracks of the optimized track set by adopting an evaluation function so as to determine a target track from the optimized track set according to an evaluation result, and driving the robot to move by using the speed corresponding to the target track.
From the above description, it can be seen that after the obstacle is subjected to expansion processing, the motion trajectories of the simulated trajectories passing through the obstacle or the expansion area are filtered, and then the target trajectory is determined by combining the evaluation function, so that the robot and the obstacle are prevented from colliding, the number of the motion trajectories participating in evaluation is reduced, and the time consumed for determining the target trajectory is reduced.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.