Control methods, electronic devices and storage media for mobile devices
By acquiring the relative positional relationship between different height parts of the mobile device and objects, the device is controlled to move to avoid collisions. This solves the problem of limited passable range caused by the coarse obstacle avoidance strategy in the prior art, and achieves more precise obstacle avoidance and safe movement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INDEPENDENT VARIABLE ROBOT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2026-04-29
- Publication Date
- 2026-07-17
Smart Images

Figure CN122111032B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of robotics, and more particularly to a control method, electronic device, and storage medium for a mobile device. Background Technology
[0002] Obstacle avoidance is crucial for the autonomous operation of mobile devices (such as robots or robotic vacuum cleaners). Generally, collision detection is performed on the mobile device as a whole to achieve obstacle avoidance. However, the obstacle avoidance strategies in related technologies are relatively coarse, sacrificing the mobile device's traversable range. Summary of the Invention
[0003] In view of the above, embodiments of this disclosure provide a control method for a mobile device, an electronic device, and a storage medium.
[0004] In a first aspect, embodiments of this disclosure provide a control method for a mobile device, the mobile device comprising a first part and a second part, the first part being located to one side of the second part in a vertical direction, and the front end point of the first part and the front end point of the second part being at different horizontal positions in a traveling direction, the method comprising: As the mobile device moves toward the object, Obtain the first position corresponding to the object, wherein the first position corresponds to the first part in the horizontal direction; Obtain the second position corresponding to the object, the second position corresponding to the second part in the horizontal direction; Determine the first relative positional relationship between the first position and the first part; Determine the second relative positional relationship between the second position and the second part; Control the mobile device to move toward the object until the first relative position relationship or the second relative position relationship meets the preset conditions.
[0005] Secondly, embodiments of this disclosure also provide an electronic device, including one or more processors and one or more memories, wherein the one or more memories store a computer program executable by the one or more processors, and the computer program, when executed by the one or more processors, implements the method as described above.
[0006] Thirdly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that can be executed by one or more processors to implement the method described above.
[0007] The present disclosure provides a control method, electronic device, and storage medium for a mobile device. The mobile device includes a first part and a second part. The first part is located on one side of the second part in the vertical direction. In the direction of travel, the horizontal positions of the front end points of the first part and the second part are different. During the movement of the mobile device toward an object, a first position corresponding to the object in the horizontal direction of the first part and a second position corresponding to the object in the horizontal direction of the second part are acquired. A first relative positional relationship between the first position and the first part is determined, and a second relative positional relationship between the second position and the second part is determined. The mobile device is controlled to move toward the object until the first or second relative positional relationship meets a preset condition. The movement of the mobile device is controlled by determining the relative positional relationships between parts of the mobile device at different heights and the object. For mobile devices of a specific shape, the relative positional relationships between different heights and obstacles can be determined separately, allowing the mobile device to approach obstacles as closely as possible, achieving more accurate collision detection or obstacle avoidance, and increasing the passable area of the mobile device.
[0008] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0009] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. The accompanying drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a flowchart illustrating a control method for a mobile device provided in an embodiment of this disclosure; Figure 2 This is a flowchart illustrating another control method for a mobile device provided in an embodiment of this disclosure; Figure 3 This is a flowchart illustrating another control method for a mobile device provided in an embodiment of this disclosure; Figure 4 This is a flowchart illustrating another control method for a mobile device provided in an embodiment of this disclosure; Figure 5 This is a schematic diagram of a robot comprising three parts according to an embodiment of the present disclosure; Figure 6 This is a flowchart illustrating another control method for a mobile device provided in an embodiment of this disclosure; Figure 7 This is a schematic block diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0011] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. The described embodiments are only some, not all, of the embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0012] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0013] It should be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure. As used in this disclosure and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0014] It should also be understood that the term “and / or” as used in this disclosure and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0015] Obstacle avoidance is crucial for the autonomous operation of mobile devices (such as robots or robotic vacuum cleaners). Generally, collision detection is performed on the mobile device as a whole to achieve obstacle avoidance. However, the obstacle avoidance strategies in related technologies are relatively coarse, sacrificing the mobile device's traversable range.
[0016] For example, many types of robots are not the same size from top to bottom. For instance, a robot with a robotic arm may appear larger in the upper body than in the torso when viewed from above. Furthermore, obstacles may have different shapes at different heights. In these application scenarios, mapping the robot and obstacles onto a 2D plane for collision detection may result in the robot's passable area being identified as an obstacle avoidance zone, thus reducing the robot's passable area.
[0017] In view of this, embodiments of the present disclosure provide a control method, electronic device, and storage medium for a mobile device to ensure the accessibility of the mobile device.
[0018] The following detailed description of some embodiments of this disclosure is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0019] Please see Figure 1 , Figure 1 This is a flowchart illustrating a control method for a mobile device provided in an embodiment of this disclosure. The mobile device can be a robot, such as an autonomous robot or an automated guided vehicle, etc., and is not limited thereto in this disclosure.
[0020] The mobile device includes a first part and a second part. The first part is located on one side of the second part in the vertical direction, for example, the first part is located above the second part. The first part and the second part are at different heights relative to the ground. Furthermore, in the direction of travel of the mobile device, the front end point of the first part and the front end point of the second part are at different horizontal positions. For example, the front end point of the first part is further forward than the front end point of the second part in the direction of travel. The mobile device has a shape that is wider at the top and narrower at the bottom.
[0021] For example, the first part of a mobile device includes an upper limb mechanism, and the second part includes a torso mechanism. It is understood that different types of mobile devices will have different structural forms for their upper limb and torso mechanisms. For instance, taking a robot as an example, the robot's upper limb mechanism includes a robotic arm, joints, and an end effector. The torso mechanism serves as a support structure for the upper limb mechanism and also enables the lifting and lowering of the upper limb mechanism.
[0022] For example, the position of the tip point can change as the movable object moves. For instance, the first part may include a robotic arm, and the position of the tip point may change as the robotic arm moves.
[0023] For example, the torso mechanism includes a columnar structure, with an upper limb mechanism mounted on the side wall of the columnar structure. The upper limb mechanism can move up and down along the columnar structure. For instance, the upper limb mechanism slides upward along the columnar structure to raise itself; or slides downward along the columnar structure to lower itself. Alternatively, the torso mechanism includes a lead screw and nut structure, one end of which is connected to the upper limb mechanism. A motor drives the lead screw to rotate, causing the nut to move vertically to raise or lower the upper limb mechanism. For instance, the nut moves vertically upward to raise itself; or moves vertically downward to lower itself. Another example is that the torso mechanism can use a conveyor chain or conveyor belt to raise or lower the upper limb mechanism.
[0024] For example, the torso mechanism includes a piston rod structure, one end of which is connected to the upper limb mechanism. The piston rod moves vertically to achieve the raising and lowering of the upper limb mechanism. For instance, moving the piston rod vertically upwards raises the upper limb mechanism; moving the piston rod vertically downwards lowers the upper limb mechanism.
[0025] For example, the torso mechanism includes a linkage structure that can be deployed or closed. The upper limb mechanism is connected to one end of the linkage structure, and the deployment and closure of the linkage structure enables the upper limb mechanism to rise or fall. For instance, deploying the linkage structure allows the upper limb mechanism to rise; closing the linkage structure allows the upper limb mechanism to fall.
[0026] It should be noted that, in addition to the examples listed above, the torso mechanism can also be other structures, and this disclosure does not impose any specific limitations.
[0027] like Figure 1 As shown, the control method for the mobile device specifically includes steps S101 to S103.
[0028] S101. During the process of the mobile device moving toward the object, a first position corresponding to the object is obtained, the first position corresponding to the first part in the horizontal direction; a second position corresponding to the object is obtained, the second position corresponding to the second part in the horizontal direction.
[0029] For example, during the operation of a mobile device, if there are obstacles (such as boxes, vehicles, etc.) in the working environment, in order to achieve obstacle avoidance movement of the mobile device, a first position corresponding to the object in the horizontal direction of the first part of the mobile device is obtained based on the height of the first part of the mobile device, and a second position corresponding to the object in the horizontal direction of the second part of the mobile device is obtained based on the height of the second part of the mobile device. The first and second positions can refer to the location of the object in the corresponding horizontal direction, or they can be positions corresponding to the object's location in the corresponding horizontal direction extended by a preset distance. The horizontal distance between the first and second positions is a preset distance. The specific value of the preset distance can be flexibly set according to the actual situation, such as 5 meters, or other values; this disclosure does not impose specific limitations.
[0030] For example, the first position corresponding to the first part in the horizontal direction means that the height of the first position is within the range of the height of the first part.
[0031] S102. Determine the first relative positional relationship between the first position and the first part; determine the second relative positional relationship between the second position and the second part.
[0032] In some embodiments, the control method for a mobile device further includes: determining the position of the first portion; and determining the position of the second portion. The position of the first portion is used to determine a first relative positional relationship between the first position and the first portion, and the position of the second portion is used to determine a second relative positional relationship between the second position and the second portion.
[0033] The location of the first part of the mobile device can refer to the location of a specific point within the first part, such as the center point of the first part, or it can refer to the location of the first part as a whole, such as the location including the outline of the first part. Similarly, the location of the second part can refer to the location of a specific point within the second part (such as the center point), or it can refer to the location of the second part as a whole, such as the location including the outline of the second part.
[0034] For the first and second parts of the mobile device, determine the positions of the first and second parts respectively. For example, determine the position corresponding to the center point of the first part as the position of the first part, and determine the position corresponding to the center point of the second part as the position of the second part. Alternatively, determine the position corresponding to the outline range of the first part as the position of the first part, and determine the position corresponding to the outline range of the second part as the position of the second part.
[0035] Since the first position corresponds horizontally to the first part, and the second position corresponds horizontally to the second part, and the positions of the first position and the second part, as well as the positions of the second position and the first part, are staggered in height, it is only necessary to consider the first relative positional relationship between the first position and the first part, and the second relative positional relationship between the second position and the second part. The first and second relative positional relationships can refer to a distance relationship or a range relationship; this disclosure does not impose specific limitations.
[0036] S103. Control the mobile device to move toward the object until the first relative position relationship or the second relative position relationship meets the preset conditions.
[0037] The system uses preset conditions to determine whether a collision is likely between the mobile device and an object. If neither the first nor the second relative positional relationship meets the preset conditions, it indicates that a collision is unlikely, and the mobile device can be controlled to move towards the object. Conversely, if either the first or second relative positional relationship meets the preset conditions, it indicates that a collision is possible, and the mobile device can be controlled to stop moving or adjust its direction, such as moving away from the object, thus avoiding a collision and improving the safety of the mobile device's movement. Furthermore, by determining the relative positional relationship between different parts of the mobile device at different heights and objects to determine collisions, the system also reduces the likelihood of classifying certain passable areas of the mobile device as obstacle avoidance zones, ensuring the mobile device's passability. For mobile devices of specific shapes, the relative positional relationship between different parts at different heights and obstacles can be determined separately, allowing the device to approach obstacles as closely as possible for more accurate collision detection or obstacle avoidance.
[0038] In some embodiments, such as Figure 2 As shown, step S102 may include sub-step S1021, and step S103 may include sub-step S1031.
[0039] S1021. Determine a first distance between the first position and the first part; determine a second distance between the second position and the second part; S1031. Control the mobile device to move toward the object until the first distance is less than or equal to a preset distance threshold or the second distance is less than or equal to a preset distance threshold.
[0040] For example, a first distance between a first location and a first part, and a second distance between a second location and a second part, can be obtained based on a map of the environment in which the mobile device is located, by generating the map.
[0041] For example, a mobile device is equipped with a lidar, which can be used to measure distances and obtain a first distance between a first position and a first part, and a second distance between a second position and a second part.
[0042] For example, a mobile device is equipped with an ultrasonic transmitter / receiver, which can obtain a first distance between a first position and a first part, and a second distance between a second position and a second part, by using the time difference between the ultrasonic transmitter / receiver transmitting and receiving ultrasonic waves.
[0043] It should be noted that, in addition to the examples listed above, the first distance between the first position and the first part, and the second distance between the second position and the second part can also be determined by other means, and no specific limitation is made in this disclosure.
[0044] A preset distance threshold is established to determine whether a collision is likely between the mobile device and an object. The specific value of this preset distance threshold can be flexibly set according to actual conditions, and is not specifically limited in this disclosure. If both the first distance and the second distance are greater than the preset distance threshold, and the preset conditions are not met, the mobile device can be controlled to move towards the object. Conversely, if either the first distance or the second distance is less than or equal to the preset distance threshold, and the preset conditions are met, the mobile device can be controlled to stop moving or adjust its direction, thereby avoiding a collision between the mobile device and the object.
[0045] In some embodiments, such as Figure 3 As shown, step S102 may include sub-step S1022, and step S103 may include sub-step S1032.
[0046] S1022. Determine whether the first position is located within the first range corresponding to the first part; determine whether the second position is located within the second range corresponding to the second part; S1032. Control the movable device to move toward the object until it is determined that the first position is within the first range corresponding to the first part or the second position is within the second range corresponding to the second part.
[0047] For example, the first range corresponding to the first part is defined by the outer contour of the first part. For example, the first range can be the range corresponding to the outer contour of the first part, or it can be the extended range of the contour including the outer contour of the first part. This disclosure does not make a specific limitation. Similarly, the second range corresponding to the second part is defined by the outer contour of the second part. For example, the second range can be the range of the outer contour of the second part, or it can be the extended range of the contour including the outer contour of the second part. This disclosure does not make a specific limitation.
[0048] For example, the first range is defined by a first polyhedron, wherein the first part is located within the first polyhedron. The first polyhedron can be a cube or an irregular polyhedron, and this disclosure does not specifically limit it. For example, the first range can be the range of the first polyhedron, or it can be the range of the first polyhedron extended outward by a certain amount. Similarly, the second range corresponding to the second part is defined by a second polyhedron, wherein the second part is located within the second polyhedron. The second polyhedron can be a cube or an irregular polyhedron, and this disclosure does not specifically limit it. For example, the second range can be the range of the second polyhedron, or it can be the range of the second polyhedron extended outward by a certain amount.
[0049] Understandably, since the first position corresponds to the first part in the horizontal direction, the first range can be a range on a two-dimensional plane. For example, the first range can be the range corresponding to the cross-section of the first polyhedron in the horizontal direction. Similarly, the second range can be the range corresponding to the cross-section of the second polyhedron in the horizontal direction.
[0050] For example, taking the first polyhedron and the second polyhedron as a cube, the 3D shape of the first polyhedron containing the first part is expressed as: {"footprint":[[-0.31,-0.33],[-0.31,0.33],[0.5,0.33],[0.5,-0.33]],"z_zone":[0.75,1.5]}; The 3D shape corresponding to the second polyhedron containing the second part is expressed as: {"footprint":[[-0.31,-0.33],[-0.31,0.33],[0.31,0.33],[0.31,-0.33]],"z_zone":[0.0,0.75]}; In this context, the set of points within the footprint represents the polygon representation at a certain height, and z_zone represents the height range of the polygon. Based on the data, the height range of the first polyhedron containing the first part is 0.75-1.5 (in meters), and the height range of the second polyhedron containing the second part is 0-0.75 (in meters). Furthermore, the first polyhedron is wider than the second polyhedron.
[0051] The first range corresponding to the first part is defined by a first polyhedron. For example, the first range can be a planar range formed by horizontally oriented [[-0.31,-0.33],[-0.31,0.33],[0.5,0.33],[0.5,-0.33]] at a certain height between 0.75 and 1.5. The second range corresponding to the second part is defined by a second polyhedron. For example, the second range can be a planar range formed by horizontally oriented [[-0.31,-0.33],[-0.31,0.33],[0.31,0.33],[0.31,-0.33]] at a certain height between 0.0 and 0.75.
[0052] For example, the first range is defined by a first sphere or a first curved surface structure, wherein the first portion is located within the first sphere or the first curved surface structure. For instance, the first range can be the range of the first sphere, or the range of a sphere corresponding to a larger radius after extending the radius of the first sphere. Similarly, the second range is defined by a second sphere or a second curved surface structure, wherein the second portion is located within the second sphere or the second curved surface structure. For instance, the second range can be the range of the second sphere, or the range of a sphere corresponding to a larger radius after extending the radius of the second sphere.
[0053] It should be noted that, in addition to the examples listed above, the first and second scopes can be determined in other ways, and no specific limitations are made in this disclosure.
[0054] Based on a first range, it is determined whether a first position corresponding to an object is within the first range corresponding to a first part. Based on a second range, it is determined whether a second position corresponding to an object is within the second range corresponding to a second part. If the first position is outside the first range corresponding to the first part, and the second position is outside the second range corresponding to the second part, and the preset conditions are not met, the mobile device can be controlled to move towards the object. Conversely, if the first position is within the first range corresponding to the first part, or the second position is within the second range corresponding to the second part, and the preset conditions are met, the mobile device can be controlled to stop moving or adjust its direction, thereby avoiding collisions between the mobile device and the object.
[0055] In some embodiments, such as Figure 4 As shown, the control method for the mobile device further includes step S104.
[0056] S104. Determine the first risk coefficient corresponding to the first position and the second risk coefficient corresponding to the second position. The first risk coefficient and the horizontal distance between the first position and the object are negatively correlated, and the second risk coefficient and the horizontal distance between the second position and the object are negatively correlated. The larger the first risk coefficient and the second risk coefficient are, the greater the collision risk between the mobile device and the object.
[0057] For a first position corresponding to the first part in the horizontal direction and a second position corresponding to the second part in the horizontal direction, a first risk coefficient is determined based on the horizontal distance between the first position and the object. The first risk coefficient and the horizontal distance between the first position and the object are negatively correlated; the smaller the horizontal distance, the larger the first risk coefficient. A larger first risk coefficient indicates a greater risk of collision between the first part of the mobile device and the object. Similarly, a second risk coefficient is determined based on the horizontal distance between the second position and the object. The second risk coefficient and the horizontal distance between the second position and the object are also negatively correlated; the smaller the horizontal distance, the larger the second risk coefficient. A larger second risk coefficient indicates a greater risk of collision between the second part of the mobile device and the object.
[0058] During the movement of the mobile device toward an object, if the first position is within the first range corresponding to the first part, the movement of the mobile device can be controlled based on the first risk coefficient corresponding to the first position. For example, if the first risk coefficient corresponding to the first position is greater than a first threshold but less than a second threshold, it indicates that there is a risk of collision between the mobile device and the object. In this case, the mobile device can be controlled to slow down, for example, by controlling the mobile device to approach the object at a slower speed. If the first risk coefficient is greater than the second threshold, it indicates that the risk of collision between the mobile device and the object is high. In this case, the distance between the first part and the object can be determined, and the movement of the mobile device can be controlled to make the distance between the first part and the object greater than or equal to a preset distance threshold, thereby reducing the occurrence of collisions between the mobile device and the object and further improving the safety of the movement of the mobile device. The specific value of the threshold can be flexibly set according to the actual situation, and is not specifically limited in this disclosure. The judgment method for the second part is similar to that for the first part and will not be described again.
[0059] In some embodiments, feature points corresponding to objects within a preset range are filtered based on a map to obtain a set of feature points. Based on the set of feature points, a first risk coefficient corresponding to a first location and a second risk coefficient corresponding to a second location are obtained. The map can be a 3D point cloud map or other types of maps, such as depth maps; this disclosure does not impose specific limitations.
[0060] For example, taking a 3D point cloud map as an example, traverse the point cloud and filter out points that exceed a preset range. For instance, for a point P(Px, Py, Pz) in the point cloud, if Px, Py, and Pz satisfy the following conditions, then point P is filtered out: fabs(Px)>obs_max_dis fabs(Py)>obs_max_dis fabs(Pz)>obs_max_height Wherein, fabs represents taking the absolute value, obs_max_dis represents the maximum distance to the mobile device to be considered, such as 5 meters, or other values, which are not specifically limited in this disclosure; obs_max_height represents the height, which can be set based on the height of the mobile device, such as 1.5 meters, or other values, which are not specifically limited in this disclosure.
[0061] Based on the selected and retained feature points, a feature point set is generated. Then, based on a preset expansion distance, expansion is performed with each point in the feature point set as the center, obtaining the risk coefficient corresponding to the expansion range. The risk coefficient is highest at the center of the expansion range, and decreases with distance from the center. The expansion distance can be set to 0.5 meters or other values; this disclosure does not specify a particular value.
[0062] For example, if a multi-layer raster map is initialized using a first preset resolution a1 as the height resolution and a second preset resolution a2 as the horizontal resolution, then the minimum values of the xoy plane raster coordinates g_min_x and g_min_y for each raster layer are 0, and the maximum values g_max_x and g_max_y are respectively: g_max_x=(p_max_x-origin_x) / a2 g_max_y=(p_max_y-origin_y) / a2 Where p_max_x and p_max_y are the maximum coordinates of the feature point in the x and y directions in the coordinate system corresponding to the mobile device, and origin_x and origin_y are the corresponding minimum coordinates.
[0063] The first preset resolution a1 and the second preset resolution a2 can be flexibly set according to the actual situation. For example, the first preset resolution a1 can be set to 0.05 meters and the second preset resolution a2 can be set to 0.03 meters. Other values can also be set. No specific limitation is made in this disclosure.
[0064] For the feature point set generated from the selected and retained feature points, the position of each feature point in the multi-layer raster map is obtained. First, the coordinates P(Px, Py, Pz) of each feature point in the coordinate system corresponding to the mobile device are transformed to the map coordinate system to obtain the corresponding coordinates map_P(map_Px, map_Py, map_Pz). For example, given the pose data T0 corresponding to the mobile device, based on T0 and P, map_P is calculated as follows: map_P=T0 P Then, based on map_P(map_Px,map_Py,map_Pz), the position (layer_grid_x,layer_grid_y,layer_height) in the multi-layer raster map is calculated as follows: layer_height=map_Pz / a1 layer_grid_x=(map_Px-origin_x) / a2 layer_grid_y=(map_Py-origin_y) / a2 Where layer_height represents the height layer of the raster map, which needs to be rounded up; layer_grid_x and layer_grid_y represent the raster coordinates in the raster map corresponding to the height layer.
[0065] Set the risk coefficient value corresponding to the coordinate (layer_grid_x, layer_grid_y, layer_height) to the first value (e.g., 128). Simultaneously, set the risk coefficient value corresponding to the coordinate (layer_grid_x, layer_grid_y, layer_height) to the first value. The values of layer_grid_y and layer_height are recorded in the expansion array obs_inf_vec.
[0066] For each point coordinate (layer_grid_x, layer_grid_y, ...) in the dilated array obs_inf_vec layer_height), based on the preset inflation distance inflate_dis, with (layer_grid_x, Dilation is performed with layer_grid_y and layer_height as the center point, and the dilation range is obtained as follows: [layer_height-inflate_dis / a1,layer_height+inflate_dis / a1] [layer_grid_x-inflate_dis / a2,layer_grid_x+inflate_dis / a2] [layer_grid_y-inflate_dis / a2,layer_grid_y+inflate_dis / a2] The risk coefficient value corresponding to the center point is the first value, and the risk coefficient values for other positions are updated as follows: value+=(inflate_dis-hypot(gx-layer_grid_x,gy-layer_grid_y) / inflate_dis 8 The risk coefficient value is highest at the center of the expansion range, and the risk coefficient value decreases the farther away from the center.
[0067] In some embodiments, the control method for the mobile device further includes updating the map. For example, a lidar is installed on the mobile device, and the 3D point cloud map is updated using the point cloud data currently detected by the lidar.
[0068] For example, updating the map includes: In response to the first feature point being within the current detection view of the mobile device, the risk coefficient corresponding to the expansion range of the first feature point is updated, wherein the risk coefficient corresponding to the first feature point is cleared to zero, and the first feature point is the feature point within the preset range selected at the previous moment. Based on the expansion distance, expansion is performed with each second feature point as the center to obtain the risk coefficient corresponding to the expansion range of the second feature point, wherein the second feature point is the feature point selected at the current time that is located within the preset range.
[0069] For example, iterating through each point in the dilated array obs_inf_vec corresponding to the previous time step, it determines whether each point is within the current detection view of the mobile device, such as whether it is within the current LiDAR field of view. For instance, based on the pose data T1 corresponding to the mobile device at the current time step, and the coordinates map_P of each point in the dilated array obs_inf_vec in the map coordinate system, the coordinates P_ti of that point in the coordinate system corresponding to the mobile device at the current time step are calculated as follows: P_ti=T1.inverse() map_P Based on P_ti, the angle between the point and the pitch and yaw directions of the lidar of the mobile device can be determined, and it can be determined whether the point is within the lidar's field of view at the current moment.
[0070] If the point is outside the lidar's field of view, i.e., outside the current detection view of the mobile device, then no processing is performed on that point. If the point is within the current detection view of the mobile device, then the point is added to `obs_clear_vec`. By iterating through each point in `obs_clear_vec`, and based on the inflation distance `inflate_dis`, inflation is performed with each point in `obs_clear_vec` as the center point, resulting in the following inflation range: [layer_height-inflate_dis / a1,layer_height+inflate_dis / a1] [layer_grid_x-inflate_dis / a2,layer_grid_x+inflate_dis / a2] [layer_grid_y-inflate_dis / a2,layer_grid_y+inflate_dis / a2] The risk coefficient value corresponding to the center point is reset to zero, and the risk coefficient values for other positions are updated as follows: value-=(inflate_dis-hypot(gx-layer_grid_x,gy-layer_grid_y) / inflate_dis 8 Furthermore, the current time-inflation array obs_inf_vec is recorded in the same way as described above, and each point in the current time-inflation array obs_inf_vec is traversed. Based on the inflation distance inflate_dis, inflation is performed with each point in the current time-inflation array obs_inf_vec as the center point. The risk coefficient value corresponding to the center point of the inflation range is the largest, and the risk coefficient value is smaller the farther away from the center point. For details, please refer to the previous text, which will not be repeated here.
[0071] Updating the map using the above method only updates the risk coefficient corresponding to the changed points, resulting in fast update efficiency.
[0072] Furthermore, as the mobile device moves toward the object, the movement of the mobile device can be controlled based on the first risk coefficient corresponding to the latest first position and the second risk coefficient corresponding to the second position.
[0073] In some embodiments, step S103 includes: In response to determining that the first location is within a first range corresponding to the first part, the movable device is controlled to move according to the first risk coefficient; In response to determining that the first location is within a first range corresponding to the first part and determining that the first risk coefficient is greater than or equal to a preset threshold, the distance between the first part and the object is determined; Control the mobile device to move toward the object until the distance between the first part and the object is less than or equal to a preset distance threshold; and / or In response to determining that the second position is within the second range corresponding to the second part, the movable device is controlled to move according to the second risk coefficient; In response to determining that the second location is within the second range corresponding to the second part and determining that the second risk coefficient is greater than or equal to a preset threshold, the distance between the second part and the object is determined; Control the mobile device to move toward the object until the distance between the second part and the object is less than or equal to a preset distance threshold.
[0074] For the first position, if it is determined that the first position is within the first range corresponding to the first part, the movement of the mobile device is controlled according to the first risk coefficient corresponding to the first position. For example, the speed of movement of the mobile device is adjusted according to the first risk coefficient. The larger the first risk coefficient, the smaller the speed of movement of the mobile device, thereby improving the safety of the movement of the mobile device.
[0075] If the first position is determined to be within the first range corresponding to the first part, and the first risk coefficient is greater than or equal to a preset threshold, there is a possibility of collision between the mobile device and the object. In this case, the distance between the first part of the mobile device and the object is further determined; the specific method for determining the first distance can be referred to, and will not be repeated here. If the distance between the first part and the object is greater than the preset distance threshold, a collision will not occur temporarily. The mobile device can be controlled to move towards the object until the distance between the first part and the object is less than or equal to the preset distance threshold. To avoid a collision, the movement of the mobile device towards the object is stopped; for example, the mobile device is controlled to stop moving or adjust its direction. The specific value of the preset distance threshold can be flexibly set according to the actual situation, and is not specifically limited in this disclosure.
[0076] Similarly, for the second position, if it is determined that the second position is within the second range corresponding to the second part, the movement of the mobile device is controlled according to the second risk coefficient corresponding to the second position. For example, the speed of movement of the mobile device is adjusted according to the second risk coefficient. The larger the second risk coefficient, the smaller the speed of movement of the mobile device is controlled, thereby improving the safety of the movement of the mobile device.
[0077] If the second position is determined to be within the second range corresponding to the second part, and the second risk coefficient is greater than or equal to a preset threshold, a collision between the mobile device and the object is possible. In this case, the distance between the first part of the mobile device and the object is further determined, specifically by referring to the method for determining the first distance, which will not be repeated here. If the distance between the first part and the object is greater than the preset distance threshold, a collision will not occur temporarily. The mobile device can be controlled to move towards the object until the distance between the first part and the object is less than or equal to the preset distance threshold. To avoid a collision, the movement of the mobile device towards the object is stopped; for example, the mobile device is controlled to stop moving or adjust its direction. The specific value of the preset distance threshold can be flexibly set according to the actual situation, and is not specifically limited in this disclosure.
[0078] In some embodiments, considering that other objects may exist in the environment where the mobile device is located, for the first position, in addition to the first risk coefficient corresponding to the first position, there is also a risk coefficient corresponding to the first position relative to other objects. Similarly, for the second position, in addition to the second risk coefficient corresponding to the second position, there is also a risk coefficient corresponding to the second position relative to other objects. Based on this, the control method for the mobile device further includes: Determine the overall risk coefficient for the first location; Determine the overall risk coefficient for the second position; Determining the comprehensive risk coefficient of the first location includes: Based on the first risk coefficient and the risk coefficient of the first position relative to other objects, determine the comprehensive risk coefficient of the first position; The determination of the comprehensive risk coefficient for the second position includes: Based on the second risk coefficient and the risk coefficient of the second position relative to other objects, determine the comprehensive risk coefficient of the second position; The step of controlling the movable device to move toward the object until the first relative positional relationship or the second relative positional relationship satisfies a preset condition includes: In response to determining that the first location is within a first range corresponding to the first part, the movable device is controlled to move based on the comprehensive risk coefficient of the first location; In response to determining that the first location is within a first range corresponding to the first part and determining that the comprehensive risk coefficient of the first location is greater than or equal to a preset threshold, the distance between the first part and the object or the other object is determined; Control the mobile device to move toward the object or the other object until the distance between the first part and the object or the other object is less than or equal to a preset distance threshold; And / or, In response to determining that the second position is within the second range corresponding to the second part, the movement of the mobile device is controlled according to the comprehensive risk coefficient of the second position; In response to determining that the second location is within the second range corresponding to the second part and determining that the comprehensive risk coefficient of the second location is greater than or equal to a preset threshold, the distance between the second part and the object or the other object is determined; Control the mobile device to move toward the object or the other object until the distance between the second part and the object or the other object is less than or equal to a preset distance threshold.
[0079] For example, the average of the first risk coefficient and the risk coefficient of the first position relative to other objects is calculated, and the average risk coefficient is determined as the comprehensive risk coefficient of the first position.
[0080] For example, the weight of each risk coefficient corresponding to the first position can be quantified, and the first risk coefficient and the risk coefficient of the first position relative to other objects can be weighted and summed to obtain the comprehensive risk coefficient of the first position.
[0081] It should be noted that, in addition to the examples listed above, the comprehensive risk coefficient of the first position can be determined in other ways, and this disclosure does not make specific limitations.
[0082] Similarly, the comprehensive risk coefficient for the second position can be determined in the same way, which will not be elaborated here.
[0083] During the process of the mobile device moving toward the object, the movement of the mobile device can be controlled based on the comprehensive risk coefficient corresponding to the first position and the comprehensive risk coefficient corresponding to the second position. For details, please refer to the control method of controlling the movement of the mobile device based on the first risk coefficient corresponding to the first position and the second risk coefficient corresponding to the second position, which will not be elaborated here.
[0084] In some embodiments, the mobile device further includes a third portion located on the opposite side of the second portion in the vertical direction, for example, the third portion is located below the second portion; and in the direction of travel, the front end of the third portion is at a different horizontal position than the front end of the second portion, for example, the front end of the third portion is further forward than the front end of the second portion in the direction of travel.
[0085] For example, the third part includes the lower limb mechanism. It is understood that the lower limb mechanism will have different structural forms depending on the type of mobile device. For example, the lower limb mechanism can be a mobile chassis, or the foot or ankle joint components of a humanoid robot.
[0086] For example, taking a mobile device as an example, the robot includes an upper limb mechanism, a trunk mechanism, and a lower limb mechanism. The upper limb mechanism is located above the trunk mechanism, and the lower limb mechanism is located below the trunk mechanism. The upper limb mechanism, trunk mechanism, and lower limb mechanism are at different heights relative to the ground. The horizontal dimension of the upper limb mechanism is greater than the horizontal dimension of the trunk mechanism, and the horizontal dimension of the lower limb mechanism is greater than the horizontal dimension of the trunk mechanism; that is, the horizontal dimensions of adjacent parts are different. Figure 5 As shown, the upper limb mechanism is located inside cube 1, and the first range of the upper limb mechanism is defined by cube 1. The trunk mechanism is located inside cube 2, and the second range of the trunk mechanism is defined by cube 2. The lower limb mechanism is located inside cube 3, and the third range of the lower limb mechanism is defined by cube 3.
[0087] For mobile devices that also include a third part, such as Figure 6 As shown, the control method for the mobile device further includes steps S105 and S106, and step S103 may include sub-step S1033.
[0088] S105. Obtain the third position corresponding to the object, wherein the third position corresponds to the third part in the horizontal direction; S106. Determine the third relative positional relationship between the third position and the third part; S1033. Control the mobile device to move toward the object until the first relative position relationship, the second relative position relationship, or the third relative position relationship meets the preset conditions.
[0089] The operation of obtaining the third position of the object can be referred to in the previous introduction of obtaining the first and second positions, and the operation of determining the third relative position relationship can be referred to in the previous introduction of determining the first and second relative position relationships, which will not be repeated here.
[0090] If none of the preset conditions are met for the first, second, or third relative positional relationship, it indicates that the mobile device will not collide with the object. In this case, the mobile device can be controlled to move towards the object. Conversely, if the preset conditions are met for the first, second, or third relative positional relationship, it indicates that a collision may occur between the mobile device and the object. In this case, the mobile device can be controlled to stop moving or adjust its direction, such as moving away from the object, thereby avoiding collisions and improving the safety of the mobile device's movement. Furthermore, by determining the relative positional relationships between parts of the mobile device and objects at more different height levels to quickly identify collision issues, the occurrence of misclassifying the mobile device's passable area as an obstacle avoidance zone is further reduced, thus further ensuring the passability of the mobile device.
[0091] It should be noted that the movable device may include more parts, such as a fourth part, a fifth part, etc., which are not specifically limited in this disclosure. The corresponding relative positional relationships are determined in the same way, and the movable device is controlled to move toward the object until at least one of the relative positional relationships satisfies a preset condition. Specific operations can be found in the preceding description and will not be repeated here.
[0092] In some embodiments, in the direction of travel, the front end of the first portion is further forward than the front end of the second portion, the object includes a protrusion facing the second portion, the protrusion corresponding to the second portion in the horizontal direction, the protrusion having a space on one side in the vertical direction, the space corresponding to the first portion in the horizontal direction, and the space being capable of accommodating the first portion, the method further includes: controlling the movable device to move toward the object so that the first portion enters the recess.
[0093] For example, the object may be a workbench (e.g., a wall and a workbench against the wall), which corresponds horizontally to the second part, and has a space on its upper or lower side that can accommodate the first part. In this case, using the method provided by the embodiments of this disclosure, the first part of the movable device can enter the space until the second part is close to the workbench, increasing the passable area.
[0094] In some embodiments, collision detection can be performed on different parts of the mobile device based on a map. Specifically, the map is layered at different heights, and the mobile device part corresponding to each height layer is determined. The risk coefficient of the target point (e.g., the center point) corresponding to the determined mobile device part is obtained. If the risk coefficient is small, such as 0 or less than a preset threshold, it indicates that the distance to the object is far. If the risk coefficient is large, such as greater than 0 or greater than or equal to the preset threshold, it indicates that the distance to the object is close. In this case, further collision detection is performed based on the determined mobile device part. The collision detection methods used include, but are not limited to, AABB (Axis Aligned Bounding Box) algorithm, OBB (Oriented Bounding Box) algorithm, Bounding Sphere algorithm, FDH (Fixed Direction Hull) algorithm, SAT (Separating Axis Theorem) algorithm, BVH (Bounding Volume Hierarchy) algorithm, and BSP (Binary Space) algorithm. Partitioning (binary space partitioning) tree algorithm, EPA (Expanding Polytope Algorithm), MPR (Minkowski Portal Refinement), CCD (Continuous Collision Detection) algorithm, etc., are not limited in this disclosure.
[0095] It should be noted that, for different shapes of mobile devices, the target point can be determined in advance by taking multiple points (such as corner points) as representatives, and is not limited to the center point.
[0096] For example, continuing with the multi-layered raster map described earlier, we traverse the multi-layered raster map. For the height corresponding to each raster layer, we determine the portion of the mobile device corresponding to each raster layer. For instance, assuming that the height of one raster layer is 0.5 meters, this height corresponds to the second part of the mobile device. We determine the center point of the second part as P_b(0,0,0.5). Based on the pose data T1 corresponding to the mobile device, we obtain the coordinates map_P_b(P_mx,P_my,P_mz) in the map coordinate system as follows: map_P_b=T1 P_b The calculated raster coordinates corresponding to map_P_b are: P_m_gridx=(P_mx-origin_x) / a2 P_m_gridy=(P_my-origin_y) / a2 If the risk coefficient corresponding to the grid coordinates (P_m_gridx, P_m_gridy) in the height layer grid map is large, for example, the risk coefficient is greater than 0, it means that the second part is close to the object. Then, the second range of the second part is converted to each grid corresponding to the grid map, each grid is traversed, and the maximum risk coefficient among the risk coefficients corresponding to each grid is taken as the risk coefficient corresponding to the second range of the second part. This risk coefficient can be used as a reference for trajectory planning.
[0097] Using a target point (such as the center point) within a mobile device as a representative, a preliminary judgment is made based on the risk coefficient of the target point's location on the map. Only when the risk coefficient is high (e.g., greater than 0) is a more precise judgment made on the entire portion. This significantly reduces computational load, avoids redundant and meaningless judgments, and improves collision detection efficiency. Furthermore, the mobile device portion is defined by simplified polyhedrons, spheres, curved surfaces, etc., and collision issues are determined using the ranges defined by these simplified polyhedrons corresponding to portions of different heights, ensuring real-time collision detection.
[0098] Please see Figure 7 , Figure 7 This is a schematic block diagram of an electronic device provided in one embodiment of this disclosure. The electronic device may include a robot, such as an autonomous robot or an automated guided vehicle, etc., but is not limited thereto in this disclosure.
[0099] like Figure 7 As shown, the electronic device 100 may include one or more processors 110 and one or more memories 120, which are connected by a bus, such as an I2C (Inter-integrated Circuit) bus.
[0100] Specifically, the processor 110 can be a microcontroller unit (MCU), a central processing unit (CPU), or a digital signal processor (DSP), etc.
[0101] Specifically, the memory 120 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a portable hard drive, etc. One or more memories 120 may store computer programs that can be executed by one or more processors 110.
[0102] The processor 110 is used to execute a computer program and, when executing the computer program, implement the method as described in the above embodiments.
[0103] The relevant descriptions and implementation methods in the embodiments of this disclosure can be found in the foregoing descriptions in the method embodiments, and will not be repeated here.
[0104] This disclosure also provides a computer-readable storage medium, which includes a stored computer program. When the computer program is run by one or more processors, it controls the device where the computer-readable storage medium is located to execute the control method for the mobile device provided in this disclosure.
[0105] The computer-readable storage medium can be an internal storage unit of the electronic device described in the foregoing embodiments, such as a hard disk or memory of the electronic device. Alternatively, the computer-readable storage medium can be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device.
[0106] The relevant descriptions and implementation methods in the embodiments of this disclosure can be found in the relevant introductions in the foregoing method embodiments, and will not be repeated here.
[0107] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0108] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the scope of the technology disclosed in this disclosure, and such modifications or substitutions should all be covered within the scope of protection of this disclosure.
Claims
1. A control method for a mobile device, characterized in that, The mobile device includes a first part and a second part. The first part includes an upper limb mechanism. The first part is located to one side of the second part in the vertical direction. In the direction of travel, the horizontal positions of the front end point of the first part and the front end point of the second part are different, with the front end point of the first part being further forward than the front end point of the second part. The method includes: As the mobile device moves toward the object, Obtain the first position corresponding to the object, wherein the first position corresponds to the first part in the horizontal direction; Obtain the second position corresponding to the object, the second position corresponding to the second part in the horizontal direction; the object includes a protrusion facing the second part, the protrusion corresponding to the second part in the horizontal direction, and the protrusion has a space on one side in the vertical direction, the space corresponding to the first part in the horizontal direction, and the space can accommodate the first part; Control the movable device to move toward the object so that the first part enters the space; Determine the first relative positional relationship between the first position and the first part; Determine the second relative positional relationship between the second position and the second part; Control the mobile device to move toward the object until the first relative position relationship or the second relative position relationship meets the preset conditions.
2. The control method according to claim 1, characterized in that, Determining the first relative positional relationship between the first position and the first part includes: Determine the first distance between the first position and the first part; Determining the second relative positional relationship between the second position and the second part includes: Determine the second distance between the second position and the second part; The step of controlling the movable device to move toward the object until the first relative positional relationship or the second relative positional relationship satisfies a preset condition includes: Control the mobile device to move toward the object until the first distance is less than or equal to a preset distance threshold or the second distance is less than or equal to a preset distance threshold.
3. The control method according to claim 1, characterized in that, Determining the first relative positional relationship between the first position and the first part includes: Determine whether the first position is located within the first range corresponding to the first part; Determining the second relative positional relationship between the second position and the second part includes: Determine whether the second position is located within the second range corresponding to the second part.
4. The control method according to claim 3, characterized in that, The step of controlling the movable device to move toward the object until the first relative positional relationship or the second relative positional relationship satisfies a preset condition includes: Control the mobile device to move toward the object until it is determined that the first position is within a first range corresponding to the first part or that the second position is within a second range corresponding to the second part.
5. The control method according to claim 3, characterized in that, The control method further includes: A first risk coefficient corresponding to the first position and a second risk coefficient corresponding to the second position are determined. The first risk coefficient and the first position are negatively correlated with the horizontal distance between the object and the first position. The second risk coefficient and the second position are negatively correlated with the horizontal distance between the object and the second position. The larger the first risk coefficient and the second risk coefficient are, the greater the collision risk between the mobile device and the object.
6. The control method according to claim 5, characterized in that, The step of controlling the movable device to move toward the object until the first relative positional relationship or the second relative positional relationship satisfies a preset condition includes: In response to determining that the first location is within a first range corresponding to the first part, the movable device is controlled to move according to the first risk coefficient; In response to determining that the first location is within a first range corresponding to the first part and determining that the first risk coefficient is greater than or equal to a preset threshold, the distance between the first part and the object is determined; Control the mobile device to move toward the object until the distance between the first part and the object is less than or equal to a preset distance threshold; and / or In response to determining that the second position is within the second range corresponding to the second part, the movable device is controlled to move according to the second risk coefficient; In response to determining that the second location is within the second range corresponding to the second part and determining that the second risk coefficient is greater than or equal to a preset threshold, the distance between the second part and the object is determined; Control the mobile device to move toward the object until the distance between the second part and the object is less than or equal to a preset distance threshold.
7. The control method according to claim 5, characterized in that, The method further includes: Determine the overall risk coefficient for the first location; Determine the overall risk coefficient for the second position; Determining the comprehensive risk coefficient of the first location includes: Based on the first risk coefficient and the risk coefficient of the first position relative to other objects, determine the comprehensive risk coefficient of the first position; The determination of the comprehensive risk coefficient for the second position includes: Based on the second risk coefficient and the risk coefficient of the second position relative to other objects, determine the comprehensive risk coefficient of the second position; The step of controlling the movable device to move toward the object until the first relative positional relationship or the second relative positional relationship satisfies a preset condition includes: In response to determining that the first location is within a first range corresponding to the first part, the movable device is controlled to move based on the comprehensive risk coefficient of the first location; In response to determining that the first location is within a first range corresponding to the first part and determining that the comprehensive risk coefficient of the first location is greater than or equal to a preset threshold, the distance between the first part and the object or the other object is determined; Control the mobile device to move toward the object or the other object until the distance between the first part and the object or the other object is less than or equal to a preset distance threshold; And / or, In response to determining that the second position is within the second range corresponding to the second part, the movement of the mobile device is controlled according to the comprehensive risk coefficient of the second position; In response to determining that the second location is within the second range corresponding to the second part and determining that the comprehensive risk coefficient of the second location is greater than or equal to a preset threshold, the distance between the second part and the object or the other object is determined; Control the mobile device to move toward the object or the other object until the distance between the second part and the object or the other object is less than or equal to a preset distance threshold.
8. The control method according to any one of claims 1-7, characterized in that, The second part includes the torso mechanism; The torso mechanism includes a columnar structure, and the upper limb mechanism is mounted on the side wall of the columnar structure, allowing the upper limb mechanism to move up and down along the columnar structure; or The torso mechanism includes a piston rod structure, one end of which is connected to the upper limb mechanism to achieve the raising and lowering of the upper limb mechanism; or The torso mechanism includes a linkage structure, and the upper limb mechanism is connected to one end of the linkage structure so that the upper limb mechanism can be raised and lowered by the opening and closing of the linkage structure.
9. The control method according to any one of claims 1-7, characterized in that, The mobile device further includes a third part, which is located on the opposite side of the second part in the vertical direction, and in the direction of travel, the horizontal position of the front end point of the third part is different from that of the front end point of the second part. The method further includes: Obtain the third position corresponding to the object, wherein the third position corresponds to the third part in the horizontal direction; Determine the third relative positional relationship between the third position and the third part; The step of controlling the movable device to move toward the object until the first relative positional relationship or the second relative positional relationship satisfies a preset condition includes: Control the mobile device to move toward the object until the first relative position relationship, the second relative position relationship, or the third relative position relationship meets the preset conditions.
10. The control method according to any one of claims 3-7, characterized in that, The first range is defined by the outer contour of the first portion, and the second range is defined by the outer contour of the second portion; or The first range is defined by a first polyhedron, the first portion is located within the first polyhedron, and the second range is defined by a second polyhedron, the second portion is located within the second polyhedron; or The first range is defined by a first sphere or a first curved surface structure, and the first portion is located within the first sphere or the first curved surface structure. The second range is defined by a second sphere or a second curved surface structure, and the second portion is located within the second sphere or the second curved surface structure.
11. The control method according to any one of claims 1-3, characterized in that, The first position and the second position are positions corresponding to a preset distance extended from the position of the object in the corresponding horizontal direction. The horizontal distance between the first position and the object is a preset distance, and the horizontal distance between the second position and the object is a preset distance.
12. The control method according to any one of claims 1-7, characterized in that, The method further includes: Determine the location of the first part; Determine the location of the second part.
13. An electronic device, characterized in that, It includes one or more processors and one or more memories, the one or more memories storing a computer program that can be executed by the one or more processors, the computer program being executed by the one or more processors to implement the method as described in any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that can be executed by one or more processors to implement the method as described in any one of claims 1 to 12.