Device moving method, device, electronic device and computer readable medium
By determining the ideal position and rotation direction of the movable device, judging the direction of the device and controlling its movement, the problems of large calculation amount and high resource utilization in the prior art are solved, and efficient and accurate device movement control is achieved.
Patent Information
- Application Number
- CN202110849706.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-27
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2041-07-27
AI Technical Summary
The existing method based on robot model prediction is difficult to apply to embedded systems with limited computing power when controlling the movable device to move to a designated location.
By determining the ideal position, ideal position line and rotation direction of the target movable device, it is determined whether the device is heading towards the ideal position line, and the device is moved according to the curve transformation information and the rotation direction control device.
It realizes efficient and accurate control of the target movable device to move to the ideal position, reduces the computing load and resource usage, and is suitable for embedded systems with limited computing capabilities.
Smart Images

Figure CN113568406B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a device moving method, a device, an electronic device, and a computer-readable medium. Background Art
[0002] At present, in the fields of autonomous driving, logistics, etc., there is often a need to control a movable device (e.g., driverless car, express delivery vehicle, etc.) to move to a designated location. To control the target movable device to move to the target location, the method usually adopted is: based on the robot model prediction method, firstly, a path is drawn according to the area, and then the control algorithm is designed to follow the planned path as much as possible.
[0003] However, when the above method is used to control the target movable device to move to the target location, the following technical problems often occur:
[0004] Although the robot model prediction method can achieve good results in theory, it is computationally intensive, resulting in high computer load and large resource usage. In addition, in practice, additional solvers are usually required to solve complex nonlinear optimization problems, which makes it difficult to apply to embedded systems with limited computing power. Summary of the invention
[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0006] Some embodiments of the present disclosure propose a device moving method, a device, an electronic device, and a computer-readable medium to solve one or more of the technical problems mentioned in the above background technology section.
[0007] In a first aspect, some embodiments of the present disclosure provide a method for moving a device, comprising: determining an ideal posture of a target movable device, an ideal posture straight line corresponding to the ideal posture, and a rotation direction during movement, wherein the movement process is a process of the target movable device moving to a position corresponding to the ideal posture; determining whether the target movable device is facing the ideal posture straight line according to the ideal posture straight line and coordinate information of the target movable device; in response to determining that the target movable device is facing the ideal posture straight line, determining curve transformation information of the target movable device; controlling the movement of the target movable device according to the curve transformation information and the rotation direction; and in response to determining that the target movable device has moved to the position corresponding to the ideal posture, ending the movement of the target movable device.
[0008] Optionally, the above-mentioned determination of the ideal posture of the target movable device, the ideal posture straight line corresponding to the above-mentioned ideal posture and the rotation direction during the movement includes: acquiring the ideal posture of the above-mentioned target movable device; determining the above-mentioned ideal posture straight line according to the above-mentioned ideal posture; determining the above-mentioned rotation direction according to the above-mentioned ideal posture and the above-mentioned ideal posture straight line by using a rotation direction determination method.
[0009] Optionally, based on the above-mentioned ideal posture straight line and the coordinate information of the above-mentioned target movable device, determining whether the above-mentioned target movable device is facing the above-mentioned ideal posture straight line includes: determining the coordinate information of the above-mentioned coordinate information perpendicular to the above-mentioned ideal posture straight line as the target coordinate information; generating a first vector associated with the above-mentioned coordinate information and the above-mentioned target coordinate information; generating a second vector representing the current direction of the above-mentioned target movable device; determining the angle between the above-mentioned first vector and the above-mentioned second vector; and determining whether the above-mentioned target movable device is facing the above-mentioned ideal posture straight line based on the above-mentioned angle.
[0010] Optionally, determining whether the target movable device is facing the ideal posture straight line based on the angle includes: in response to determining that the angle is greater than a target angle, determining that the target movable device is facing the ideal posture straight line.
[0011] Optionally, after determining the curve transformation information of the target movable device in response to determining that the target movable device is facing the ideal posture straight line, the method further includes: determining the in-situ rotation amount of the target movable device in response to determining that the target movable device is not facing the ideal posture straight line; and controlling the target movable device to rotate in-situ based on the in-situ rotation amount and the rotation direction so that the target movable device faces the ideal posture straight line.
[0012] Optionally, the above-mentioned rotation direction is determined according to the above-mentioned ideal posture and the above-mentioned ideal posture straight line using a rotation direction determination method, including: determining the coordinate information of the above-mentioned coordinate information perpendicular to the above-mentioned ideal posture straight line as the target coordinate information; generating a first vector associated with the above-mentioned coordinate information and the above-mentioned target coordinate information; generating a second vector representing the current orientation of the above-mentioned target movable device; determining the cross product value between the above-mentioned first vector and the above-mentioned second vector; and determining the above-mentioned rotation direction according to the above-mentioned cross product value.
[0013] Optionally, the above-mentioned curve transformation information includes: linear velocity information and angular velocity information; and the above-mentioned determination of the curve transformation information of the above-mentioned target movable device during the above-mentioned movement includes: obtaining preset angular velocity information; determining the linear velocity information of the above-mentioned target movable device based on the above-mentioned angular velocity information, the above-mentioned ideal posture, the coordinate information of the above-mentioned target movable device and the ideal posture straight line.
[0014] In a second aspect, some embodiments of the present disclosure provide a device moving device, comprising: a first determination unit, configured to determine an ideal posture of a target movable device, an ideal posture straight line corresponding to the above ideal posture, and a rotation direction during movement, wherein the above movement process is a process in which the above target movable device moves to a position corresponding to the above ideal posture; a second determination unit, configured to determine whether the above target movable device is facing the above ideal posture straight line based on the above ideal posture straight line and coordinate information of the above target movable device; a third determination unit, configured to determine curve transformation information of the above target movable device in response to determining that the above target movable device is facing the above ideal posture straight line; a control unit, configured to control the movement of the above target movable device based on the above curve transformation information and the above rotation direction; and an ending unit, configured to end the movement of the above target movable device in response to determining that the above target movable device moves to the position corresponding to the above ideal posture.
[0015] Optionally, the first determination unit is configured to: obtain the ideal posture of the target movable device; determine the ideal posture straight line according to the ideal posture; and determine the rotation direction using a rotation direction determination method according to the ideal posture and the ideal posture straight line.
[0016] Optionally, the second determination unit is configured to: determine the coordinate information of the above-mentioned coordinate information perpendicular to the above-mentioned ideal posture straight line as the target coordinate information; generate a first vector associated with the above-mentioned coordinate information and the above-mentioned target coordinate information; generate a second vector representing the current direction of the above-mentioned target movable device; determine the angle between the above-mentioned first vector and the above-mentioned second vector; and determine whether the above-mentioned target movable device is facing the above-mentioned ideal posture straight line based on the above-mentioned angle.
[0017] Optionally, the second determination unit is configured to: in response to determining that the angle is greater than the target angle, determine that the target movable device is oriented toward the ideal posture straight line.
[0018] Optionally, the above-mentioned device also includes: in response to determining that the above-mentioned target movable device is not facing the above-mentioned ideal posture straight line, determining the in-situ rotation amount of the above-mentioned target movable device; based on the above-mentioned in-situ rotation amount and the above-mentioned rotation direction, controlling the above-mentioned target movable device to rotate in-situ so that the above-mentioned target movable device faces the above-mentioned ideal posture straight line.
[0019] Optionally, the first determination unit is configured to: determine the coordinate information of the foot of the above-mentioned coordinate information on the above-mentioned ideal posture straight line as the target coordinate information; generate a first vector associated with the above-mentioned coordinate information and the above-mentioned target coordinate information; generate a second vector representing the current orientation of the above-mentioned target movable device; determine the cross product value between the above-mentioned first vector and the above-mentioned second vector; and determine the above-mentioned rotation direction based on the above-mentioned cross product value.
[0020] Optionally, the curve transformation information includes: linear velocity information and angular velocity information. The third determination unit is configured to: obtain preset angular velocity information; and determine the linear velocity information of the target movable device according to the angular velocity information, the ideal posture, the coordinate information of the target movable device and the ideal posture straight line.
[0021] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0022] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.
[0023] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the device moving method of some embodiments of the present disclosure can efficiently and accurately control the target movable device to move to the ideal position. Specifically, although the method based on the robot model prediction can achieve better results in theory, the method has a large amount of calculation, resulting in a high computer load and a large resource occupation. In addition, in practice, an additional solver is usually required to solve complex nonlinear optimization problems, which is difficult to apply to embedded systems with limited computing power. Based on this, the device moving method of some embodiments of the present disclosure can first determine the ideal posture of the target movable device, the ideal posture straight line corresponding to the above ideal posture, and the rotation direction during the movement process. Among them, the above movement process is the process of the above target movable device moving to the position corresponding to the above ideal posture. Here, the ideal posture, the ideal posture straight line and the rotation direction are determined to determine the target and direction of movement for the target movable device in the future. Then, according to the above ideal posture straight line and the coordinate information of the above target movable device, it is determined whether the above target movable device is facing the above ideal posture straight line. Here, by determining whether the target movable device is facing the above ideal posture straight line, the subsequent movement of the target movable device can be made more efficient and quick, and the target movable device can be prevented from moving around. Furthermore, in response to determining that the target movable device is oriented toward the ideal posture straight line, the curve transformation information of the target movable device is determined to subsequently determine the precise movement direction of the target movable device. Then, based on the curve transformation information and the rotation direction, the movement of the target movable device can be efficiently and accurately controlled. Finally, in response to determining that the target movable device has moved to the position corresponding to the ideal posture, the movement of the target movable device is terminated to efficiently complete the task of moving the target movable device to the position corresponding to the ideal posture. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0025] Figure 1 is a schematic diagram of an application scenario of a device movement method according to some embodiments of the present disclosure;
[0026] Figure 2 is a flow chart of some embodiments of the device movement method according to the present disclosure;
[0027] Figure 3 is a schematic diagram of an ideal posture, an ideal posture line, and a target movable device posture in some embodiments of the device movement method according to the present disclosure;
[0028] Figure 4 is a schematic diagram of determining the rotation of a target movable device in situ in some embodiments of the device movement method according to the present disclosure;
[0029] Figure 5 are flow charts of other embodiments of the device moving method according to the present disclosure;
[0030] Figure 6 is a schematic diagram of the structure of some embodiments of the device moving device according to the present disclosure;
[0031] Figure 7 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0032] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0033] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0034] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0035] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0037] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0038] Figure 1 It is a schematic diagram of an application scenario of the device movement method according to some embodiments of the present disclosure.
[0039] exist Figure 1In the application scenario, the electronic device 101 may first determine the ideal posture 103 of the target movable device 102, the ideal posture straight line 104 corresponding to the ideal posture 103, and the rotation direction 106 during the movement. The movement process is the process of the target movable device 102 moving to the position corresponding to the ideal posture 103. Then, the electronic device 101 may determine whether the target movable device 102 is facing the ideal posture straight line 104 according to the ideal posture straight line 104 and the coordinate information 105 of the target movable device 102. Furthermore, in response to determining that the target movable device 102 is facing the ideal posture straight line 104, the electronic device 101 may determine the curve transformation information 107 of the target movable device 102. Then, the electronic device 101 may control the movement of the target movable device 102 according to the curve transformation information 107 and the rotation direction 106. Finally, in response to determining that the target mobile device 102 moves to the position corresponding to the ideal posture 103 , the electronic device 101 may end the movement of the target mobile device 102 .
[0040] It should be noted that the electronic device 101 can be hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or it can be implemented as a single server or a single terminal device. When the electronic device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.
[0041] It should be understood that Figure 1 The number of electronic devices in the embodiment is only for illustration. Any number of electronic devices may be provided according to implementation requirements.
[0042] Continue to refer Figure 2 , shows a process 200 of some embodiments of the device moving method according to the present disclosure. The device moving method comprises the following steps:
[0043] Step 201 , determining an ideal posture of a target movable device, an ideal posture straight line corresponding to the ideal posture, and a rotation direction during movement.
[0044] In some embodiments, the execution subject of the above-mentioned device movement method (for example Figure 1The electronic device shown) can determine the ideal posture of the target movable device, the ideal posture straight line corresponding to the above ideal posture and the rotation direction during the movement. Among them, the above movement process is the process of the above target movable device moving to the position corresponding to the above ideal posture. The above target movable device may be a mobile device in various fields. For example, in the field of unmanned driving, the above target movable device may be a target unmanned vehicle. In the field of logistics, the above target movable device may be a target delivery cart or a target receiving cart. The above target movable device may also be a differential mobile robot. The above ideal posture may be pre-set. The above ideal posture may include: the ideal position of the target movable device and the ideal posture of the target movable device.
[0045] It should be noted that for the movement of the target movable device, a target coordinate system is established. The above-mentioned ideal posture may include: the target coordinates corresponding to the above-mentioned target movable device in the above-mentioned target coordinate system, and the ideal posture of the target movable device. The above-mentioned ideal posture straight line is a straight line determined according to the ideal posture.
[0046] As an example, Figure 3 As shown, for the application scenario where the target movable device turns around in the feasible area, the ideal posture, ideal posture straight line and rotation direction of the target movable device are explained. In the target coordinate system with x as the horizontal axis, y as the vertical axis and o as the origin, the target movable device 303 moves to the position corresponding to the ideal posture 302 according to the current posture. The above-mentioned ideal posture straight line 301 can be determined according to the ideal posture 302.
[0047] In some optional implementations of some embodiments, the above-mentioned determination of the ideal posture of the target movable device, the ideal posture straight line corresponding to the above-mentioned ideal posture, and the rotation direction during the movement may include the following steps:
[0048] In the first step, the execution subject may obtain the ideal position and posture of the target movable device through a wired or wireless method.
[0049] In the second step, based on the above ideal posture, the above execution subject can determine the above ideal posture straight line.
[0050] As an example, for Figure 3 As shown, in the target coordinate system, the coordinates corresponding to the ideal posture 302 can be (x 1 ,y 1 ). The above-mentioned ideal posture 302 includes the posture of the target movable device 302, which may be θ 1 The ideal posture straight line 301 can be defined as passing through the corresponding coordinates of the ideal posture 302 and being θ with the x-axis. 1Assume that the ideal posture straight line 301 is Ax+By+1=0. The parameter A can be generated by the following formula:
[0051]
[0052] Among them, parameter B can be generated by the following formula:
[0053]
[0054] In the third step, the execution subject may determine the rotation direction using a rotation direction determination method according to the ideal posture and the ideal posture straight line. The rotation direction determination method may be a method for determining the rotation direction.
[0055] Optionally, the determining of the rotation direction according to the ideal posture and the ideal posture straight line by using a rotation direction determination method may include the following steps:
[0056] In the first step, the execution entity may determine the coordinate information of the foot of the coordinate information perpendicular to the ideal posture straight line as the target coordinate information.
[0057] As an example, for Figure 3 As shown, the target coordinate information can be determined according to the ideal posture straight line 301 and the coordinate information of the target movable device in the target coordinate system by the following formula:
[0058] x 3 =(-A+B*B*x 2 -A*B*y 2 ) / (A*A+B*B)
[0059] y 3 =(-B+A*A*y 2 -A*B*x 2 ) / (A*A+B*B)
[0060] Among them, x 3 It can be the horizontal coordinate value of the target coordinate information. 3 It can be the vertical coordinate value of the target coordinate information. 2 Can be the horizontal coordinate value of the coordinate information. 2 It can be the horizontal coordinate value of the coordinate information. A and B can be the parameter values of the ideal posture line.
[0061] In a second step, the execution entity may generate a first vector associated with the coordinate information and the target coordinate information.
[0062] As an example, the first vector may be obtained by subtracting the abscissa of the target coordinate information from the abscissa of the coordinate information, and by subtracting the ordinate of the coordinate information from the ordinate of the target coordinate information.
[0063] In a third step, the execution entity may generate a second vector representing the current orientation of the target movable device.
[0064] As an example, for Figure 3 As shown, the second vector can be [cos(θ 2 ), sin(θ 2 )].
[0065] In a fourth step, the execution entity may determine a cross product value between the first vector and the second vector.
[0066] In the fifth step, the execution entity may determine the rotation direction according to the cross product value.
[0067] As an example, in response to the cross product value being greater than 0, the execution body may determine that the rotation direction is counterclockwise. In response to the cross product value being less than 0, the execution body may determine that the rotation direction is clockwise. In response to the cross product value being equal to 0, the execution body may determine that the rotation direction is clockwise or counterclockwise.
[0068] Step 202, based on the ideal posture straight line and the coordinate information of the target movable device, determine whether the target movable device is facing the ideal posture straight line.
[0069] In some embodiments, the execution subject may determine whether the target movable device is facing the ideal posture line in various ways according to the ideal posture line and the coordinate information of the target movable device, wherein the coordinate information of the target movable device may be the coordinate information corresponding to the initial position of the target movable device.
[0070] In some optional implementations of some embodiments, the determining whether the target movable device is facing the ideal posture straight line according to the ideal posture straight line and the coordinate information of the target movable device may include the following steps:
[0071] In the first step, the execution entity may determine the coordinate information of the foot of the coordinate information perpendicular to the ideal posture straight line as the target coordinate information.
[0072] In a second step, the execution entity may generate a first vector associated with the coordinate information and the target coordinate information.
[0073] In a third step, the execution entity may generate a second vector representing the current orientation of the target movable device.
[0074] In a fourth step, the execution entity may determine an angle between the first vector and the second vector.
[0075] As an example, the above execution entity can determine the above angle by the following formula:
[0076] dθ=acos((FR*RD) / norm(FR) / norm(RD)).
[0077] Wherein, FR may be the first vector, RD may be the second vector, acos() may be the arccosine function, and norm() may be the vector modulus function.
[0078] The fifth step is to determine whether the target movable device is facing the ideal posture straight line based on the angle.
[0079] As an example, in response to determining that the angle is an acute angle, it indicates that the target mobile device needs to rotate in situ so that the target mobile device faces the ideal posture straight line. In response to determining that the angle is not an acute angle, it indicates that the target mobile device does not need to rotate in situ and the target mobile device originally faces the ideal posture straight line.
[0080] As an example, Figure 4 As shown, it is a schematic diagram showing the determination that the target movable device needs to rotate in situ.
[0081] The angle between the target mobile device 401 that has not been rotated in situ and the horizontal coordinate axis x is θ. After rotating in situ for a certain angle, the target mobile device 402 that has been rotated in situ can be obtained. Among them, the coordinate point of the above target mobile device in the target coordinate system is R. The coordinate of R is (x 2 ,y 2 ). The foot of R on the ideal posture straight line is F. The first vector can be generated based on point F and point R. The second vector can be generated based on point R and point D. The angle between the first vector and the second vector is dθ.
[0082] against Figure 4 It should be noted that, in response to determining that the angle dθ is an acute angle, the target mobile device is to rotate in situ. The execution subject can obtain the rotation angle through the following steps:
[0083] Determine the third and fourth vectors corresponding to the ideal posture line. The third vector is: V_line1 = [B, -A]. The fourth vector is: V_line2 = [-B, A]. Accordingly, considering the line where the robot is facing after rotation, two intersection points can be found on the ideal posture line: P and P2. Among them, norm(FP) = norm(FP2) = norm(FR)*tan(dθ). Therefore, the coordinates of P can be F+norm(FP)*v_linel / norm(v_line1), and the coordinates of P2 can be F+norm(FP2)*v_line2 / norm(v_line2).
[0084] Therefore, we can discuss two situations:
[0085] (1) If the angle between the vector v_line1 and the robot's heading vector RD is less than pi / 2, the angle is rot_angle1 = angle_diff(atan2(RP[1], RP[0]), θ), where pi can be the circumference of a circle.
[0086] (2) If the angle between the vector v_line1 and the robot's heading vector RD is greater than or equal to pi / 2, the rotation angle is rot_angle2=angle_diff(atan2(RP2[1], RP2[0]), θ).
[0087] Furthermore, angle_diff(a, b) can be a standardized angle subtraction algorithm. Wherein, a and b are angle a and angle b respectively, and the angle range is in the interval (-pi, pi]. The above standardized angle subtraction algorithm can be used to solve angle a minus angle b. The above standardized angle subtraction algorithm can be as follows:
[0088] a=atana2(sin(a), cos(a)),
[0089] b = atan2(sin(b), cos(b)),
[0090] d 1 =ab,
[0091] d 2 =2*p i -abs(d 1 ),
[0092] Where abs() can be an absolute value operation. If d 1 >0, then let d 2 =-d 2 If abs(d 1 )<abs(d 2), the result is d 1 Otherwise, if abs(d 1 )>abs(d 2 ), the result is d 2 .
[0093] Optionally, in response to determining that the angle is greater than or equal to a target angle, the execution subject may determine that the target movable device is oriented toward the ideal posture straight line. As an example, the target angle may be 90 degrees.
[0094] Step 203, in response to determining that the target movable device is oriented toward the ideal posture straight line, determining curve transformation information of the target movable device.
[0095] In some embodiments, in response to determining that the target movable device is oriented toward the ideal posture straight line, the execution subject may determine the curve transformation information of the target movable device in various ways. The curve transformation information may be movement information associated with the target movable device. As an example, the curve transformation information may be movement information of the target movable device. For example, the curvature radius of the movement trajectory of the target movable device.
[0096] In some optional implementations of some embodiments, the curve transformation information includes: linear velocity information and angular velocity information; and the determining of the curve transformation information of the target movable device during the moving process may include the following steps:
[0097] The first step is to obtain the preset angular velocity information. As an example, the above angular velocity information is 0.1 radians per second.
[0098] In the second step, the linear velocity information of the target movable device is determined based on the angular velocity information, the ideal posture, the coordinate information of the target movable device and the ideal posture straight line.
[0099] As an example, the execution subject may determine the linear velocity information of the target mobile device through the following steps according to the angular velocity information, the ideal posture, the coordinate information of the target mobile device and the ideal posture straight line:
[0100] The first step is to obtain the initial coordinate information (x 2 ,y 2 ), the coordinates corresponding to the ideal pose (x 1 ,y 1 ) and the above-mentioned ideal posture includes the posture θ of the target mobile device 1 Among them, the initial posture of the target movable device in the target coordinate system, that is, the angle between the initial position and the x-axis is: θ2 .
[0101] The second step is to set the angular velocity information w. For example, the angular velocity information may be 0.1 radians per second.
[0102] The third step is to determine the linear velocity information of the target movable device.
[0103] As an example, since v=w*R, where R is the radius of curvature, the above execution entity can determine the control amount v by determining the radius of curvature R. It is assumed that the radius of curvature is determined by the robot angle θ and the parameter a:
[0104] R(θ)=a(θ 2 -θ f )
[0105] The above formula shows that if the direction of rotation does not change, the radius of curvature changes monotonically and the radius of curvature is zero when the final angle is reached. According to this formula, if the direction of rotation does not change, the sign of the linear velocity of the target movable transposition will not change.
[0106] Then, set the coordinates (x f ,y f ), the angle corresponding to the above final posture is θ f , which can be used to subsequently solve the curvature radius R and then obtain the linear speed control value v.
[0107] According to the kinematic formula:
[0108]
[0109]
[0110]
[0111] The final position and corresponding coordinates of the target movable device (x f ,y f ) and the curvature radius parameter a:
[0112]
[0113]
[0114] Similarly,
[0115] y f =y 2 +a(sinθ f -θ 2 cosθ 2 -sinθ 2 +θf sinθ 2 )
[0116] Define variables,
[0117] kx=cosθ f -θ 2 sinθ 2 -cosθ 2 +θ f sinθ 2 ,
[0118] ky=sinθ f -θ 2 cosθ 2 -sinθ 2 +θ f cosθ 2 .
[0119] Can get,
[0120] x f =x 2 +akx,
[0121] y f =y 2 +aky.
[0122] Next, by defining the optimization problem solution parameter a, the linear velocity control quantity v is solved. It is known that the ideal posture straight line is Ax+By+1=0. In the objective function of the optimization problem, it is expected that the target movable device is located on the ideal posture straight line as much as possible, that is,
[0123] θ f =θ 1
[0124] x f =x 2 +a*kx
[0125] y f =y 2 +a*ky.
[0126] It should be noted that one of the assumptions in the above derivation process is that the target movable device can continuously change its direction angle θ, that is, satisfying
[0127] By solving the optimization problem, we can get parameter a:
[0128]
[0129] The radius of curvature can be:
[0130] R(θ 2 )=a(θ2 -θ 1 )
[0131] When the angular velocity w is given, the linear velocity control quantity is:
[0132] v=w*R(θ 2 ).
[0133] Step 204: Control the target movable device to move according to the curve transformation information and the rotation direction.
[0134] In some embodiments, the execution entity may control the movement of the target movable device according to the curve transformation information and the rotation direction.
[0135] As an example, the above-mentioned execution subject can instruct the target movable device to move in the rotation direction at the initial position for a certain period of time based on the linear velocity information and angular velocity information in the curve transformation information. Then, after the target movable device moves for a certain period of time, it reaches a certain position, and the current position and posture of the target movable device are determined by the target position detection device. Then, the new linear velocity information and angular velocity information after the target movable device reaches the certain position is further determined. By analogy, that is, after the target movable device moves for a certain period of time, the linear velocity information and angular velocity information need to be re-determined to control the movement of the above-mentioned target movable device. Among them, the time for each movement of the target movable device may be uncertain.
[0136] Step 205, in response to determining that the target movable device moves to the position corresponding to the ideal posture, ending the movement of the target movable device.
[0137] In some embodiments, in response to determining that the target movable device moves to a position corresponding to the ideal posture, the execution subject may end the movement of the target movable device.
[0138] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the device moving method of some embodiments of the present disclosure can efficiently and accurately control the target movable device to move to the ideal position. Specifically, although the method based on the robot model prediction can achieve better results in theory, the method has a large amount of calculation, resulting in a high computer load and a large resource occupation. In addition, in practice, an additional solver is usually required to solve complex nonlinear optimization problems, which is difficult to apply to embedded systems with limited computing power. Based on this, the device moving method of some embodiments of the present disclosure can first determine the ideal posture of the target movable device, the ideal posture straight line corresponding to the above ideal posture, and the rotation direction during the movement process. Among them, the above movement process is the process of the above target movable device moving to the position corresponding to the above ideal posture. Here, the ideal posture, the ideal posture straight line and the rotation direction are determined to determine the target and direction of movement for the target movable device in the future. Then, according to the above ideal posture straight line and the coordinate information of the above target movable device, it is determined whether the above target movable device is facing the above ideal posture straight line. Here, by determining whether the target movable device is facing the above ideal posture straight line, the subsequent movement of the target movable device can be made more efficient and quick, and the target movable device can be prevented from moving around. Furthermore, in response to determining that the target movable device is oriented toward the ideal posture straight line, the curve transformation information of the target movable device is determined to subsequently determine the precise movement direction of the target movable device. Then, based on the curve transformation information and the rotation direction, the movement of the target movable device can be efficiently and accurately controlled. Finally, in response to determining that the target movable device has moved to the position corresponding to the ideal posture, the movement of the target movable device is terminated to efficiently complete the task of moving the target movable device to the position corresponding to the ideal posture.
[0139] Further references Figure 5 , shows a process 500 of another embodiment of the device moving method according to the present disclosure. The device moving method comprises the following steps:
[0140] Step 501 : determining an ideal posture of a target movable device, an ideal posture straight line corresponding to the ideal posture, and a rotation direction during movement.
[0141] Step 502, determining whether the target movable device is facing the ideal posture straight line based on the ideal posture straight line and the coordinate information of the target movable device.
[0142] Step 503, in response to determining that the target movable device is oriented toward the ideal posture straight line, determining curve transformation information of the target movable device.
[0143] In some embodiments, the specific implementation of steps 501-503 and the technical effects thereof can be referred to in Figure 2 The steps 201-203 in the corresponding embodiment are not described in detail here.
[0144] Step 504, in response to determining that the target mobile device is not facing the ideal posture straight line, determining the in-situ rotation amount of the target mobile device.
[0145] In some embodiments, in response to determining that the target mobile device is not oriented toward the ideal posture line, the execution body (eg Figure 1 The electronic device shown in FIG. 200 may determine the in-situ rotation amount of the target mobile device. The determination of the in-situ rotation amount of the target mobile device may refer to the determination of the rotation angle in step 202.
[0146] Step 505: According to the in-situ rotation amount and the rotation direction, the target movable device is controlled to rotate in-situ so that the target movable device faces the ideal posture straight line.
[0147] In some embodiments, the execution subject may control the target movable device to rotate in place according to the in-place rotation amount and the rotation direction so that the target movable device faces the ideal posture straight line. For the in-place rotation, the angular velocity information may be preset. For example, the angular velocity information may be 0.1 radians per second.
[0148] Step 506: Control the target movable device to move according to the curve transformation information and the rotation direction.
[0149] Step 507, in response to determining that the target movable device moves to the position corresponding to the ideal posture, ending the movement of the target movable device.
[0150] In some embodiments, the specific implementation of steps 506-507 and the technical effects thereof can be referred to in Figure 2 Steps 204-205 in the corresponding embodiment will not be repeated here.
[0151] from Figure 5 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 5 The process 500 of the device moving method in some corresponding embodiments further highlights the specific steps of controlling the above-mentioned target movable device to rotate in situ. Therefore, the schemes described in these embodiments can efficiently and conveniently realize the movement of the target movable device when the target movable device is not facing the ideal posture straight line.
[0152] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a device mobile device, and these device embodiments are Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0153] like Figure 6 As shown, a device moving device 600 includes: a first determining unit 601, a second determining unit 602, a third determining unit 603, a control unit 604 and an ending unit 605. The first determining unit 601 is configured to determine the ideal posture of the target movable device, the ideal posture line corresponding to the ideal posture and the rotation direction during the moving process, wherein the moving process is the process of the target movable device moving to the position corresponding to the ideal posture; the second determining unit 602 is configured to determine whether the target movable device is facing the ideal posture line according to the ideal posture line and the coordinate information of the target movable device; the third determining unit 603 is configured to determine the curve transformation information of the target movable device in response to determining that the target movable device is facing the ideal posture line; the control unit 604 is configured to control the movement of the target movable device according to the curve transformation information and the rotation direction; the ending unit 605 is configured to end the movement of the target movable device in response to determining that the target movable device moves to the position corresponding to the ideal posture.
[0154] In some optional implementations of some embodiments, the first determination unit 601 in the device moving device 600 can be configured to: obtain the ideal posture of the above-mentioned target movable device; determine the above-mentioned ideal posture straight line based on the above-mentioned ideal posture; determine the above-mentioned rotation direction using the rotation direction determination method based on the above-mentioned ideal posture and the above-mentioned ideal posture straight line.
[0155] In some optional implementations of some embodiments, the second determination unit 602 in the device moving device 600 can be configured to: determine the coordinate information of the above-mentioned coordinate information perpendicular to the above-mentioned ideal posture straight line as the target coordinate information; generate a first vector associated with the above-mentioned coordinate information and the above-mentioned target coordinate information; generate a second vector representing the current orientation of the above-mentioned target movable device; determine the angle between the above-mentioned first vector and the above-mentioned second vector; and determine whether the above-mentioned target movable device is facing the above-mentioned ideal posture straight line based on the above-mentioned angle.
[0156] In some optional implementations of some embodiments, the second determining unit 602 in the device moving device 600 may be configured to: in response to determining that the angle is greater than the target angle, determine that the target movable device is oriented toward the ideal posture straight line.
[0157] In some optional implementations of some embodiments, the device moving device 600 further includes: a fourth determination unit and a device control unit (not shown). The fourth determination unit may be configured to: determine the in-situ rotation amount of the target movable device in response to determining that the target movable device is not facing the ideal posture straight line. The device control unit may be configured to: control the target movable device to rotate in-situ according to the in-situ rotation amount and the rotation direction so that the target movable device faces the ideal posture straight line.
[0158] In some optional implementations of some embodiments, the first determination unit 601 in the device moving device 600 can be configured to: determine the coordinate information of the above-mentioned coordinate information perpendicular to the above-mentioned ideal posture straight line as the target coordinate information; generate a first vector associated with the above-mentioned coordinate information and the above-mentioned target coordinate information; generate a second vector representing the current orientation of the above-mentioned target movable device; determine the cross product value between the above-mentioned first vector and the above-mentioned second vector; and determine the above-mentioned rotation direction based on the above-mentioned cross product value.
[0159] In some optional implementations of some embodiments, the curve transformation information includes: linear velocity information and angular velocity information. The third determination unit 603 in the device moving device 600 may be configured to: obtain preset angular velocity information; and determine the linear velocity information of the target movable device according to the angular velocity information, the ideal posture, the coordinate information of the target movable device, and the ideal posture straight line.
[0160] It is understood that the units described in the device 600 are similar to those described in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 600 and the units included therein, and will not be described in detail here.
[0161] Reference below Figure 7 , which shows an electronic device (eg, Figure 1 A schematic diagram of the structure of an electronic device in (a) 700. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0162] like Figure 7As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0163] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 7 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0164] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0165] It should be noted that the computer-readable medium in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0166] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0167] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: determines the ideal posture of the target movable device, the ideal posture line corresponding to the ideal posture, and the rotation direction during the movement, wherein the movement process is the process of the target movable device moving to the position corresponding to the ideal posture; determines whether the target movable device is facing the ideal posture line according to the ideal posture line and the coordinate information of the target movable device; determines the curve transformation information of the target movable device in response to determining that the target movable device is facing the ideal posture line; controls the movement of the target movable device according to the curve transformation information and the rotation direction; and terminates the movement of the target movable device in response to determining that the target movable device moves to the position corresponding to the ideal posture.
[0168] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0169] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0170] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor comprising: a first determination unit, a second determination unit, a third determination unit, a control unit, and an end unit. Among them, the names of these units do not constitute limitations on the units themselves in certain circumstances, for example, the first determination unit may also be described as "a unit for determining the ideal posture of the target movable device, the ideal posture straight line corresponding to the above-mentioned ideal posture, and the rotation direction during the movement process".
[0171] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0172] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A device moving method, comprising: Determine an ideal posture of the target movable device, an ideal posture straight line corresponding to the ideal posture, and a rotation direction during the movement process, wherein the movement process is a process in which the target movable device moves to a position corresponding to the ideal posture; Determine the coordinate information of the foot of the coordinate information perpendicular to the ideal posture straight line as the target coordinate information; generating a first vector associated with the coordinate information and the target coordinate information; generating a second vector representing the current orientation of the target movable device; determining an angle between the first vector and the second vector; In response to determining that the angle is greater than a target angle, determining that the target movable device is oriented toward the ideal posture straight line; In response to determining that the target mobile device is oriented toward the ideal posture straight line, determining curve transformation information of the target mobile device; Controlling the target movable device to move according to the curve transformation information and the rotation direction; In response to determining that the target movable device moves to the position corresponding to the ideal posture, the movement of the target movable device is ended.
2. The method according to claim 1, wherein: The determining of the ideal posture of the target movable device, the ideal posture straight line corresponding to the ideal posture, and the rotation direction during the movement includes: Acquiring an ideal position and posture of the target movable device; According to the ideal posture, determining the ideal posture straight line; The rotation direction is determined according to the ideal posture and the ideal posture straight line using a rotation direction determination method.
3. The method according to claim 1, wherein: After determining the curve transformation information of the target mobile device in response to determining that the target mobile device is oriented toward the ideal posture straight line, the method further includes: In response to determining that the target mobile device is not oriented toward the ideal posture line, determining an in-situ rotation amount of the target mobile device; According to the in-situ rotation amount and the rotation direction, the target movable device is controlled to rotate in-situ so that the target movable device faces the ideal posture straight line.
4. The method according to claim 1, wherein: The step of determining the rotation direction by using a rotation direction determination method according to the ideal posture and the ideal posture straight line includes: Determine the coordinate information of the foot of the coordinate information perpendicular to the ideal posture straight line as the target coordinate information; generating a first vector associated with the coordinate information and the target coordinate information; generating a second vector representing the current orientation of the target movable device; determining a cross product value between the first vector and the second vector; The rotation direction is determined according to the cross product value.
5. The method according to claim 1, wherein: The curve transformation information includes: linear velocity information and angular velocity information; and The determining the curve transformation information of the target movable device includes: Get the preset angular velocity information; The linear velocity information of the target movable device is determined according to the angular velocity information, the ideal posture, the coordinate information of the target movable device and the ideal posture straight line.
6. A device moving device, comprising: A first determining unit is configured to determine an ideal posture of a target movable device, an ideal posture straight line corresponding to the ideal posture, and a rotation direction during a movement process, wherein the movement process is a process in which the target movable device moves to a position corresponding to the ideal posture; A second determining unit is configured to determine the coordinate information of the coordinate information perpendicular to the ideal posture straight line as the target coordinate information; generate a first vector associated with the coordinate information and the target coordinate information; generate a second vector representing the current orientation of the target movable device; determine the angle between the first vector and the second vector; in response to determining that the angle is greater than the target angle, determine that the target movable device is oriented toward the ideal posture straight line; A third determining unit is configured to determine curve transformation information of the target mobile device in response to determining that the target mobile device is oriented toward the ideal posture straight line; a control unit configured to control the target movable device to move according to the curve transformation information and the rotation direction; The ending unit is configured to end the movement of the target movable device in response to determining that the target movable device moves to the position corresponding to the ideal posture.
7. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Mobile robot
JP2004209562A