Robot and control method thereof
Patent Information
- Application Number
- CN202611142660.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]本发明的一个目的在于,解决现有机器人的关节在当前接收的目标位姿与上一次执行的位姿存在极大差距时容易出现剧烈抖动的问题
[0016]基于前文的描述,本领域技术人员能够理解的是,在本发明前述的技术方案中,通过计算目标位姿数据与前一位姿数据之间的位姿差距,并在位姿差距超过预设阈值时对目标位姿数据进行插值平滑处理,以生成平滑后的关节角度数据,并驱动执行器执行相应动作,有效地避免了机器人的关节因目标位姿与前一位姿存在较大差距,而出现剧烈抖动。
Smart Images

Figure CN123000792A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of robotics technology, and specifically provides a robot and its control method. Background Technology
[0002] With the rapid development of automation technology, robots have been widely used in many scenarios such as industrial production, precision machining, and intelligent services. The motion control accuracy and motion stability of robots directly determine the quality of work, the service life of equipment, and the safety of operation. Posture control is the core of robot motion control. The controller continuously sends target posture commands to the robot, driving the actuators of the robot joints to complete the corresponding motion trajectory, thereby realizing the preset operation.
[0003] In actual operation, the continuous target pose data issued by the controller often experiences significant jumps due to factors such as controller command scheduling, external environmental interference, switching of working conditions, and sudden changes in manual control commands. This results in a large difference between the currently received target pose and the pose previously executed by the robot. When the target pose data exhibits such abrupt deviations, the actuators of the robot joints will instantly respond with large-scale pose adjustment commands, leading to severe joint vibration.
[0004] Severe vibration of robot joints can significantly reduce the stability of robot movement, leading to a substantial decrease in machining and operational accuracy in precision work scenarios, thus failing to meet the requirements of high-precision operations. Furthermore, it can exacerbate wear on reducers, motors, and transmission structures at the robot joints, increasing the probability of failure and shortening the robot's lifespan. Additionally, the mechanical impact generated by the vibration can cause workpiece displacement or damage, posing a safety hazard. Summary of the Invention
[0005] One objective of this invention is to solve the problem that existing robots' joints tend to vibrate violently when there is a significant difference between the currently received target pose and the pose executed previously.
[0006] To achieve the above objectives, the present invention provides a robot control method in a first aspect, comprising: In response to the robot receiving a control command from the controller, the target pose data contained in the control command is extracted; The robot acquires the pose data from the previous execution and records it as the previous pose data, and calculates the pose difference between the target pose data and the previous pose data. Determine whether the pose difference exceeds a preset threshold; If the pose difference does not exceed the preset threshold, the robot directly drives the actuator to perform the corresponding action based on the target pose data; If the pose difference exceeds the preset threshold, the robot performs interpolation smoothing on the target pose data to generate smoothed joint angle data and drives the actuator to perform the corresponding action.
[0007] Optionally, the interpolation smoothing process includes: Construct the pose difference vector between the previous pose data and the target pose data; The pose difference vector is input into the dynamic motion primitive model to obtain the transformation trajectory from the previous pose to the target pose; the previous pose corresponds to the previous pose data, and the target pose corresponds to the target pose data; The dynamic motion primitive model includes adjustable parameters, which include at least a time scaling parameter and a trajectory shape parameter. The time scaling parameter is used to control the transition time of the robot from the previous pose to the target pose, and the trajectory shape parameter is used to generate a smooth trajectory from the previous pose to the target pose.
[0008] Optionally, the trajectory shape parameter α = α min +(α max -α min )×e -λH ; Where, α min and α max These are the minimum and maximum values of the trajectory shape parameters, respectively; λ is the adjustment sensitivity coefficient; and H is the pose information entropy.
[0009] Optionally, Where n is the dimension of the pose vector, ΔP i The difference in each dimension between the i-th target pose and the previous pose.
[0010] Optionally, before the robot receives control commands from the controller, the control method further includes a network connection establishment step: The robot responds to a network connection request initiated by the controller and determines whether the controller and the robot are on the same network. If they are on the same network, the robot establishes a direct local area network connection with the controller; If they are on different networks, the robot attempts to establish a direct P2P connection with the controller; If the P2P direct connection fails to be established, the robot establishes a relay forwarding channel with the controller through the central server.
[0011] Optionally, after the robot receives control instructions from the controller, the control method further includes: The robot obtains the network status parameters of the local area network direct connection channel, the P2P direct connection channel, and the relay forwarding channel through its network digital twin; The robot parses the control instructions from the controller, extracts the control intent from the control instructions, and dynamically adjusts the weight coefficients of each network state parameter according to the control intent. The robot performs weighted calculations on each of the network state parameters according to the adjusted weight coefficients, and obtains the comprehensive quality scores of the LAN direct connection channel, the P2P direct connection channel and the relay forwarding channel respectively. The robot will switch the current connection mode to the connection mode with the highest overall quality score.
[0012] Optionally, the overall quality score Q of the i-th connection mode i for: ; Where, τ i ρ i β i δ i These represent the latency, packet loss rate, available bandwidth, and signal stability for the i-th connection mode, respectively. Where, τ max τ min These represent the maximum and minimum latency across all connection modes, respectively. Where, β max The maximum available bandwidth across all connection modes; Among them, w τ w ρ w β w δ Let w be the weight coefficient corresponding to each network state parameter. τ +w ρ +w β +w δ =1.
[0013] Optionally, the control instructions are carried in a data packet, the data packet containing a monotonically increasing sequence number; The step of responding to the robot receiving a control command from the controller and extracting the target pose data contained in the control command includes: After receiving the data packet, the robot checks the continuity of the sequence number; If the sequence numbers are consecutive, the robot immediately extracts the target pose data from the data packet; If the sequence numbers are not consecutive, the robot puts the data packet into the receiving buffer and waits for the missing data packet to arrive or for a timeout before performing out-of-order reordering.
[0014] Optionally, the control method further includes a video data transmission step: The robot acquires video signals through multiple cameras to obtain multiple video streams; The robot synchronizes and aligns the multiple video streams according to their timestamps; The robot combines the synchronized multi-channel video streams into a single video stream. The robot encodes and compresses the single-channel video stream; The robot sends the single video stream to the controller.
[0015] In a second aspect, the present invention provides a robot including a processor and a memory, wherein the memory stores a computer program, and the processor, when executing the computer program, is capable of implementing the control method described in any one of the first aspects.
[0016] Based on the foregoing description, those skilled in the art will understand that in the aforementioned technical solution of the present invention, by calculating the pose difference between the target pose data and the previous pose data, and by performing interpolation smoothing on the target pose data when the pose difference exceeds a preset threshold, smoothed joint angle data is generated, and the actuator is driven to perform corresponding actions, effectively avoiding severe shaking of the robot's joints due to a large difference between the target pose and the previous pose.
[0017] Furthermore, by introducing pose information entropy to quantify the distribution uncertainty of the differences between the target pose and the previous pose in each dimension, and dynamically adjusting the trajectory shape parameters of the dynamic motion primitive model based on pose information entropy with an exponential decay relationship, the trajectory shape parameters can adaptively adjust according to the distribution characteristics of pose jumps in each dimension. Specifically, when the pose differences are dispersed in each dimension (high entropy value), the trajectory shape parameters tend to the minimum value, and the trajectory is smoother; when the pose differences are concentrated in a certain dimension (low entropy value), the trajectory shape parameters tend to the maximum value, and the trajectory is crisper. Therefore, the adaptive adjustment mechanism based on information entropy in this invention allows the intensity of smoothing processing to automatically change with the statistical characteristics of the pose command, without the need for manual setting or online trial and error, which not only improves the automation level of the system but also ensures the optimal smoothing effect under various pose jump modes.
[0018] Furthermore, by establishing a direct LAN connection between the robot and controller when they are on the same network, and attempting to establish a P2P direct connection when they are on different networks, and establishing a relay forwarding channel through a central server when the P2P direct connection fails, the robot can automatically select the optimal communication path based on the network environment. It prioritizes direct connections to reduce communication latency, and automatically degrades to relay forwarding when direct connections are unavailable to ensure communication reliability. Therefore, the three-level adaptive network connection described above in this invention can significantly reduce the end-to-end transmission latency of control commands, improving the real-time performance and robustness of robot control.
[0019] Furthermore, by constructing a network digital twin to obtain network state parameters of various connection modes in real time, and parsing the control intent in the control commands to dynamically adjust the weight coefficients of each network state parameter, the comprehensive quality score of each connection mode is calculated and the current connection is switched to the connection mode with the highest score. This enables the robot to proactively optimize network connections based on real-time network status and control intent, further ensuring the real-time performance and reliability of control command transmission.
[0020] Other beneficial effects of the present invention will be described in detail below with reference to the accompanying drawings, so that those skilled in the art can more clearly understand the improved objectives, features and advantages of the present invention. Attached Figure Description
[0021] To more clearly illustrate the technical solution of the present invention, some embodiments of the present invention will be described below with reference to the accompanying drawings. Those skilled in the art should understand that the same reference numerals may indicate the same or similar parts or components in different drawings; the drawings of the present invention are not necessarily drawn to scale. In the drawings: Figure 1 This is a schematic diagram of an application scenario provided by the present invention; Figure 2 This is a block diagram of a robot provided by the present invention; Figure 3 This is a flowchart of the robot control method in the first embodiment of the present invention; Figure 4 yes Figure 3 Flowchart of the specific steps in step S110; Figure 5 This is a flowchart illustrating the steps involved in implementing interpolation smoothing using the cubic spline interpolation algorithm. Figure 6 This is a flowchart illustrating the steps involved in implementing interpolation smoothing using a dynamic motion primitive model. Figure 7 This is a flowchart of some steps of the robot control method in the first embodiment of the present invention; Figure 8This is a flowchart of some steps of the robot control method in the second embodiment of the present invention; Figure 9 This is a flowchart of some steps of the robot control method in the third embodiment of the present invention.
[0022] Explanation of reference numerals in the attached figures: 100. Robot; 110. Base; 120. Robotic arm; 121. Link; 122. Movable joint; 123. Gripper; 130. Camera; 140. Processor; 150. Memory; 151. Computer program; 200. Controller; 300. Central controller. Detailed Implementation
[0023] Those skilled in the art should understand that the embodiments described below are merely a part of the embodiments of the present invention, and not all of the embodiments of the present invention. These partial embodiments are intended to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Based on the embodiments provided by the present invention, all other embodiments obtained by those skilled in the art without creative effort should still fall within the scope of protection of the present invention.
[0024] It should be noted that in the description of this invention, terms such as "center," "upper," "lower," "top," "bottom," "left," "right," "vertical," "horizontal," "inner," and "outer," which indicate direction or positional relationships, are based on the direction or positional relationships shown in the accompanying drawings. These are used merely for ease of description and do not indicate or imply that the corresponding device or element must have a specific orientation, or be constructed and operated in a specific orientation; therefore, they should not be construed as limitations on this invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0025] Furthermore, it should be noted that, in the description of this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can also refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0026] Furthermore, it should be noted that in this invention, the flowchart is not intended to indicate that the operations of the method will be performed in any particular order, or that all operations of the method are included in all every case. Moreover, the method may include additional operations. Within the scope of the technical concept provided by the method of this embodiment, additional variations can be made to the following method.
[0027] Finally, it should be noted that in the description of this invention, each functional module can be a physical module composed of multiple structures, components, or electronic devices, or a virtual module composed of multiple programs; each functional module can be an independent module or a module divided from a whole module according to its function. Those skilled in the art should understand that, provided the technical solution described in this invention can be implemented, any changes in the configuration, implementation, or positional relationship of the functional modules will not deviate from the technical principles of this invention, and therefore should all fall within the protection scope of this invention.
[0028] Figure 1 An application scenario of the present invention is given. In this scenario, robot 100 includes a base 110 and a robotic arm 120. The robotic arm 120 is mounted on the base 110 and includes links 121, movable joints 122, and grippers 123. There can be multiple links 121 and multiple movable joints 122. Movable joints 122 are provided between adjacent links 121 to allow relative rotation between adjacent links 121. Movable joints 122 are also provided between the base 110 and its adjacent links 121 to allow rotation of the links 121 relative to the base 110. Grippers 123 are located at the end of the robotic arm 120 (the end of the robotic arm 120 away from the base 110).
[0029] It should be noted that the robot 100 of the present invention is not limited to... Figure 1 The robot 100 shown can also be any other feasible robot 100, such as a humanoid robot, a charging robot, or any robot 100 with a robotic arm 120.
[0030] like Figure 2 As shown, the robot 100 of the present invention also includes multiple cameras 130 to collect different images and videos in the working environment of the robot 100. For example, the multiple cameras 130 include a conventional camera 130 for collecting information about the environment around the robot 100, a robotic arm 120 camera 130 for collecting information about the working status of the robotic arm 120, a navigation camera 130 for guiding the robot 100 to move, etc. Each camera 130 may include one or more cameras 130.
[0031] Continue reading Figure 2 The robot 100 of the present invention also includes a processor 140 and a memory 150. The memory 150 stores a computer program 151. When the processor 140 executes the computer program 151, it can implement the dynamic loading method described in any of the following embodiments.
[0032] The processor 140 may be adapted to execute stored instructions, and the processor 140 may be a single-core processor, a multi-core processor, a computing cluster, or any number of other configurations.
[0033] The memory 150 can provide temporary storage space for the operation of the above instructions during operation. The memory 150 may include random access memory (RAM), read-only memory, flash memory, or any other suitable storage system. Furthermore, the memory 150 may be a separate physical memory or may belong to the same physical memory as the memory cache 120 or the disk cache 130.
[0034] The computer program 151 may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, integrated circuit configuration data, or source code or object code written in any combination of one or more programming languages and procedural programming languages. The computer program 151 may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, 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). In some embodiments, to perform aspects of the invention, electronic circuits, including, for example, programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), may execute computer-readable program instructions using status information from the computer-readable program instructions to personalize the electronic circuits.
[0035] The following reference Figures 3 to 9 The control method of the robot 100 in this invention will be described in detail below.
[0036] like Figure 3 As shown, in the first embodiment of the present invention, the control method of the robot 100 includes: Step S110: In response to the robot 100 receiving a control command from the controller 200, the target pose data contained in the control command is extracted.
[0037] The controller 200 is a device used to send control commands to the robot 100. It can be a dedicated remote control console, a computer with control software installed, a tablet computer, a smartphone, or other electronic devices with communication and computing capabilities.
[0038] The control command is a digital command generated by the controller 200 to instruct the robot 100 to perform specific actions. The control command can be in JSON (JavaScript Object Notation), XML (Extensible Markup Language), Protocol Buffers, or other structured data formats. Upon receiving the control command, the robot 100 parses it according to a preset protocol and extracts the target pose data field.
[0039] Among them, the target pose data is the data carried in the control command that instructs the robot 100 end effector or a specific joint to reach the target position and posture.
[0040] In this embodiment, the pose data includes position components and attitude components. The position component represents the position coordinates in three-dimensional space, which can be represented by x, y, and z coordinate values in a Cartesian coordinate system, typically in millimeters (mm) or meters (m). The attitude component represents the orientation in three-dimensional space, which can be represented by Euler angles (roll, pitch, yaw), or by quaternions or rotation matrices, typically in radians (rad) or degrees (°).
[0041] In step S120, robot 100 acquires the pose data from the previous execution and records it as the previous pose data, and calculates the pose difference between the target pose data and the previous pose data.
[0042] The previously executed pose data (i.e., the previous pose data) is the pose reached by the robot 100 during the most recent actual execution and actuator movement before executing the current control command. This data is stored in the robot 100's memory and updated after each action is performed.
[0043] In this embodiment, the pose difference is used to quantify the degree of difference between the target pose and the previous pose. This pose difference can include two components: position difference and attitude difference. The position difference is obtained by calculating the Euclidean distance between the target pose data and the previous pose data. The attitude difference is obtained by calculating the angular deviation between the target pose data and the previous pose data.
[0044] In this step, robot 100 can read the previous pose data from its memory 150 and then compare it dimension by dimension with the target pose data extracted in step S110 to calculate the pose difference.
[0045] Here, "dimension" refers to the independent components of the pose vector. In this embodiment, the pose data has six dimensions: the position component includes three translation dimensions (x, y, z), and the attitude component includes three rotation dimensions. The robot calculates the difference between the target pose value and the previous pose value in each dimension to obtain the pose difference for each dimension.
[0046] Step S130: Determine whether the pose difference exceeds a preset threshold.
[0047] The preset threshold is a pre-defined value used to determine whether the pose difference is large enough to trigger smoothing processing. This preset threshold can include two independent components: a position threshold and an attitude threshold. The position threshold ranges from 0.5mm to 100mm, and the attitude threshold ranges from 0.5° to 30°.
[0048] Furthermore, the preset threshold can be set according to the specific application scenario of the robot 100, its kinematic characteristics, and the user's requirements for motion smoothness. For example, for precision assembly scenarios that require high precision and high stability, the preset threshold can be set to a smaller value, such as a position threshold of 5mm and an attitude threshold of 2°; for handling scenarios that require fast response, the threshold can be set to a larger value, such as a position threshold of 20mm and an attitude threshold of 10°; for general scenarios, the threshold can be set to a position threshold of 10mm and an attitude threshold of 5°.
[0049] In step S140, if the pose difference does not exceed the preset threshold, the robot 100 directly drives the actuator to perform the corresponding action based on the target pose data.
[0050] The actuator is the driving component of the robot 100, and may include at least one of the following: a servo motor, a hydraulic cylinder, a pneumatic cylinder, etc., for driving joint movement.
[0051] When the pose difference is small, directly executing the target pose will not cause significant jitter or shock, thus eliminating the need for additional smoothing. Robot 100 converts the target pose data into drive signals for each joint, performs inverse kinematics calculations to convert the end effector pose into joint angles, and then drives the actuator to move to the target pose. At this point, the response delay of control commands is minimized, and the tracking performance of Robot 100 is optimal.
[0052] In step S150, if the pose difference exceeds a preset threshold, the robot 100 performs interpolation smoothing on the target pose data to generate smoothed joint angle data and drives the actuator to perform the corresponding action.
[0053] Interpolation smoothing generates a series of intermediate poses between the previous pose and the target pose, allowing the robot 100 to transition smoothly and continuously from the previous pose to the target pose, rather than jumping directly to the target pose. Interpolation smoothing effectively suppresses severe joint vibrations in the robot 100 caused by network transmission jitter or sudden changes in control commands.
[0054] In this embodiment, the interpolation smoothing process can be implemented in various ways, such as using cubic spline interpolation, dynamic motion primitive models, or other trajectory generation methods. The specific implementation methods of the interpolation smoothing process will be described in detail later.
[0055] Based on the foregoing description, those skilled in the art will understand that, through steps S110 to S150, the present invention achieves on-demand smooth control based on adaptive judgment of pose difference, which not only ensures rapid response of control commands, but also effectively suppresses motion jitter caused by abnormal pose jumps.
[0056] Further optionally, in the first embodiment of the present invention, the control instructions are carried in a data packet, and the data packet contains a monotonically increasing sequence number. Based on this, step S110 can be performed as follows: Figure 4 The illustrated further includes: In step S111, after receiving the data packet, the robot 100 checks the continuity of the sequence number in the data packet.
[0057] Each data packet carries a monotonically increasing sequence number, which is assigned by the controller 200 when sending the data packet. Specifically, the initial value of the sequence number is 0, and it is incremented by 1 for each subsequent data packet sent.
[0058] After receiving the data packet, robot 100 reads the sequence number in it and compares it with the sequence number of the most recently processed data packet to check whether the sequence numbers are consecutive.
[0059] In step S112, if the sequence numbers are consecutive, the robot 100 immediately extracts the target pose data from the data packet.
[0060] If the sequence number of the current data packet is equal to the sequence number of the most recently processed data packet plus 1, it is considered that the sequence numbers are consecutive, indicating that the data packet transmission is normal and no packet loss or out-of-order delivery has occurred. At this time, robot 100 immediately parses the data packet and extracts the target pose data from it.
[0061] In step S113, if the sequence number is not consecutive, the robot 100 puts the data packet into the receiving buffer and waits for the missing data packet to arrive or for the timeout to be processed for reorder reassembly.
[0062] If the sequence number of the current data packet is not equal to the sequence number of the previously received data packet plus 1, it is determined that the sequence numbers are discontinuous, indicating that there may be packet loss or out-of-order data packets. At this time, robot 100 stores the data packet in its receiving buffer and starts a timer.
[0063] If a missing data packet (i.e., a data packet whose sequence number is equal to the previously received sequence number plus 1) arrives before the timer expires, out-of-order reordering is performed, and all data packets are processed sequentially after being arranged in order of their sequence numbers.
[0064] If the missing data packet does not arrive after the timer expires, it is determined that the data packet has been lost. At this time, the robot 100 can take one of the following strategies: (1) discard the missing data packet and directly process the received data packet; (2) send a retransmission request to the controller 200, requesting the controller 200 to retransmit the data packet.
[0065] Those skilled in the art will understand that, through steps S111 to S113, the present invention can effectively address the problems of out-of-order packets and packet loss in UDP transmission, ensuring the reliability and sequential consistency of control command transmission.
[0066] like Figure 5 As shown, the "interpolation smoothing process" in step S150 can be implemented using a cubic spline interpolation algorithm, specifically including the following steps: Step S1511: Using a cubic spline interpolation algorithm, a series of intermediate path points are generated between the previous pose data and the target pose data.
[0067] Cubic spline interpolation is an interpolation method that constructs a smooth curve through a series of spline nodes. Its basic idea is to use a cubic polynomial for interpolation between every two adjacent nodes, and to ensure the continuity of function values, first derivatives and second derivatives at the nodes.
[0068] Specifically, the previous pose data is used as the starting point P0, and the target pose data is used as the ending point P. N N-1 intermediate nodes P1, P2, ..., P are selected uniformly or non-uniformly between the previous pose and the target pose. N-1 This forms the node sequence {P0, P1, ..., P} N Construct a cubic polynomial between every two adjacent nodes: P(t=a k t 3 +b k t 2 +c k t+d k , t∈[t k ,t k+1 ].
[0069] Where k = 0, 1, ..., N-1; a k b k c k d k Let be the coefficient vector to be determined; t be the time parameter. By ensuring the continuity of position, velocity, and acceleration at the nodes, all coefficients can be uniquely determined, thus obtaining a smooth path from the starting point to the ending point.
[0070] In this embodiment, the number of intermediate nodes N-1 can be dynamically adjusted according to the magnitude of the pose difference. For example, when the pose difference is large, more intermediate nodes can be set to make the trajectory smoother; when the pose difference is small, fewer intermediate nodes can be set to reduce the computational load. For example, when the position difference is between 10mm and 50mm, 5 to 10 intermediate nodes can be set; when the position difference is greater than 50mm, 10 to 20 intermediate nodes can be set.
[0071] Step S1512: Dynamically adjust the interpolation time interval according to the control cycle of robot 100, and output intermediate path points sequentially according to the time interval so that robot 100 transitions from the previous pose to the target pose with a smooth trajectory.
[0072] The control cycle of robot 100 is the time interval between the robot 100's control system performing a complete control operation and updating the drive signal, typically ranging from 1ms to 10ms. The interpolation time interval refers to the time difference between two adjacent intermediate path points. This time interval should match the control cycle of robot 100 to ensure that robot 100 can receive new path points in each control cycle.
[0073] Specifically, let the distance from the starting point P0 to the ending point P N The total transition time is T total The total transition time can be dynamically determined based on the magnitude of the pose difference. For example, when the position difference is 10mm, the total transition time can be set to 200ms; when the position difference is 50mm, the total transition time can be set to 500ms; and when the position difference is 100mm, the total transition time can be set to 800ms.
[0074] The time interval Δt is: Δt = T total ÷N. Robot 100 outputs intermediate path points P0, P1, ..., P1 sequentially according to time intervals Δt. N The actuator is then driven to move by converting each path point into joint angles through inverse kinematics calculations, thereby achieving a smooth trajectory transition.
[0075] like Figure 6As shown, the "interpolation smoothing process" in step S150 can also be implemented using a dynamic motion primitive model, specifically including the following steps: Step S1521: Construct the pose difference vector between the previous pose data and the target pose data.
[0076] The pose difference vector represents the difference between the previous pose and the target pose as a vector. Let the target pose be P. targe The previous pose is P prev Then the pose difference vector is: ΔP = P target -P prev This pose difference vector contains both position and orientation differences, and its dimensions are the same as the pose data.
[0077] Step S1522: Input the pose difference vector into the dynamic motion primitive model to obtain the transformation trajectory from the previous pose to the target pose.
[0078] Among them, the dynamic motion primitive model is a biomimetic model used for trajectory learning and generation. Its basic idea is to represent the motion trajectory as a dynamic system of a set of nonlinear differential equations. This model describes the shape, amplitude, and temporal characteristics of the trajectory through a set of adjustable parameters, and has good generalization ability and smoothness guarantee.
[0079] The core equation of the above dynamic motion primitive model is: ẏ=z.
[0080] ż=α z (β z (gy)-z)+f(x).
[0081] Where y is the current pose, ẏ is the first derivative of y with respect to time; z is the velocity, ż is the first derivative of z with respect to time, g is the target pose, and α is the velocity. z and β z Let f(x) be the damping coefficient, and f(x) be the forcing function. The expression for the forcing function f(x) is: in, Let w be the Gaussian kernel function. k The weights are adjustable, y0 is the initial pose, and x is the phase variable.
[0082] In this embodiment, the dynamic motion primitive model includes adjustable parameters, which include at least a time scaling parameter τ and a trajectory shape parameter α.
[0083] The time scaling parameter τ controls the transition time of robot 100 from the previous pose to the target pose; a larger value results in a slower transition. By adjusting the time scaling parameter τ, the transition speed can be controlled to adapt to the response speed requirements of different application scenarios. For example, in scenarios requiring rapid response, τ can be set to a smaller value (e.g., 0.5) to complete the transition in a shorter time; in scenarios requiring high smoothness, τ can be set to a larger value (e.g., 2.0) to make the transition smoother.
[0084] The trajectory shape parameter α is used to generate a smooth trajectory from the previous pose to the target pose, and its value determines the shape characteristics of the trajectory. By adjusting the trajectory shape parameter α, the "softness" or "crispness" of the trajectory can be controlled.
[0085] Furthermore, the trajectory shape parameter α = α min +(α max -α min )×e -λH .
[0086] Where, α min and α max These represent the minimum and maximum values of the trajectory shape parameter, respectively, and λ is the adjustment sensitivity coefficient. min The value range of α is from 0.1 to 1.0. max The value of λ ranges from 1.0 to 5.0, and the value of H ranges from 1.0 to 2.0. H is the pose information entropy, and its calculation method is described later.
[0087] For example, α min The value of α is 0.5. max The value of α is 2.0, and the value of λ is 0.5. When the pose information entropy H = 0 (the pose difference is completely concentrated in one dimension), α = 0.5 + (2.0 - 0.5) × 1.0 = 2.0, the trajectory shape parameter takes the maximum value, the trajectory is the "crisp" and the response speed is the fastest. When the pose information entropy H approaches infinity, α approaches 0.5, the trajectory is the "softest" and the smoothest.
[0088] The pose information entropy H is calculated using the following formula: Where n is the dimension of the pose vector, ΔP i The difference in each dimension between the i-th target pose and the previous pose.
[0089] In this embodiment, the pose information entropy H quantifies the degree of concentration of the pose difference vector in each dimension. When the pose difference vector is concentrated in a few dimensions (e.g., there is a large deviation only in the x-direction and a small deviation in other directions), the value of H is small, indicating that the pose difference is directional; when the pose difference vector is relatively dispersed in each dimension, the value of H is large, indicating that the pose difference is more complex.
[0090] For example, assume that the differences between the target pose and the previous pose in six dimensions are ΔP=[10,2,1,0.5,0.3,0.2] (the first three dimensions are position components in mm; the last three dimensions are attitude components in °). The absolute value of each dimension difference is [10,2,1,0.5,0.3,0.2], and the sum is 10+2+1+0.5+0.3+0.2=14.
[0091] Calculate the ratio Δp of each dimension. i : ΔP1=10÷14≈0.714, ΔP2=2÷14≈0.143, ΔP3=1÷14≈0.071, ΔP4=0.5÷14≈0.036, ΔP5=0.3÷14≈0.021, ΔP6=0.2÷14≈0.014.
[0092] Then, the pose information entropy H = -(0.714log220.714 + 0.143log220.143 + 0.071log220.071 + 0.036log220.036 + 0.021log220.021 + 0.014log220.014) ≈ 1.24.
[0093] Assume α min =0.5, α max =2.0, λ=0.5, then: α = 0.5 + (2.0 - 0.5) × e -0.5×1.24 ≈1.31.
[0094] In this example, the absolute value of ΔP1=10 is the largest, accounting for approximately 71.4% of the total absolute values of differences across all dimensions, indicating that the difference between the target pose and the previous pose is mainly concentrated in the first dimension. The calculated entropy value H≈1.24 is relatively low, and the corresponding trajectory shape parameter α≈1.31 is closer to its maximum value of 2.0. This suggests that the determined pose difference has strong directionality, thus a more "crucial" trajectory shape is adopted, enabling robot 100 to respond quickly along the main direction of difference.
[0095] like Figure 7 As shown, in the second embodiment of the present invention, compared with the first embodiment described above, before step S110, the control method further includes a network connection establishment step: Step S210: Robot 100 listens for network connection requests.
[0096] After robot 100 starts up, it listens for connection requests from controller 200 on a network port. The listening port can be a preset fixed port, such as port 8080 or port 443, or it can be a port that is dynamically assigned at startup and registered on the signaling server.
[0097] In step S220, robot 100 responds to the network connection request initiated by controller 200 and determines whether controller 200 and robot 100 are on the same network.
[0098] When robot 100 receives a connection request from controller 200, it obtains the network address information of controller 200 and compares this network address with its own network address. If the network numbers of the two IP addresses are the same, they are determined to be on the same network; otherwise, they are determined to be on different networks.
[0099] In step S230, if they are on the same network, the robot 100 establishes a direct local area network connection with the controller 200.
[0100] A direct LAN connection refers to a communication channel established directly between two devices within the same local area network (LAN), without passing through any intermediate servers or routing nodes (except for Layer 2 devices such as switches). Direct LAN connections have the lowest communication latency, typically between 5ms and 10ms, and are unaffected by internet bandwidth and congestion.
[0101] In step S240, if the network is different, the robot 100 attempts to establish a P2P direct connection channel with the controller 200.
[0102] In this context, a P2P direct connection refers to an end-to-end direct communication channel established between two devices on different networks using NAT traversal technologies (such as STUN, TURN, UPnP, or PCP protocols). Data in a P2P direct connection does not pass through a central server, and the communication latency is typically between 20ms and 50ms.
[0103] In step S250, if the P2P direct connection channel fails to be established, the robot 100 establishes a relay forwarding channel with the controller 200 through the central server.
[0104] In this context, a relay forwarding channel refers to a communication channel where control commands and data are relayed through a central server. When direct P2P connections are unavailable (e.g., both parties use symmetric NAT), the relay forwarding channel serves as a fallback solution to ensure communication reliability. The communication latency of a relay forwarding channel is typically between 50ms and 90ms.
[0105] Based on the foregoing description, those skilled in the art will understand that the present invention also implements a three-level adaptive network connection establishment mechanism through steps S210 to S250. Specifically, it prioritizes low-latency direct connection methods (LAN direct connection or P2P direct connection), and automatically degrades to relay forwarding when direct connection is unavailable. In this way, both low latency and reliable communication are guaranteed.
[0106] like Figure 8 As shown, in the third embodiment of the present invention, compared with any of the embodiments described above, after step S110, the control method further includes a network connection optimization step: In step S310, robot 100 obtains the network status parameters of the local area network direct connection channel, P2P direct connection channel and relay forwarding channel through its network digital twin.
[0107] The network digital twin is a real-time virtual mirror of the network environment. It is built locally on the robot 100 and continuously updated, reflecting the network status of various connection modes in the current network environment in real time. The network digital twin includes a latency monitoring module, a packet loss rate monitoring module, a bandwidth monitoring module, and a signal stability monitoring module. These monitoring modules are used to monitor and record the end-to-end latency, packet loss rate, available bandwidth, and signal stability of each connection mode, respectively.
[0108] In this embodiment, the network digital twin is updated more frequently than the control cycle of the robot 100. For example, it is updated every 1ms to ensure the real-time performance and accuracy of the network state parameters.
[0109] In step S320, robot 100 parses the control instructions of controller 200, extracts the control intent in the control instructions, and dynamically adjusts the weight coefficients of each network state parameter according to the control intent.
[0110] Control intent is information extracted from control commands that reflects the communication performance requirements of the current control task. Control intent includes at least a real-time level and a reliability level. The real-time level indicates the sensitivity of the current control task to communication latency, while the reliability level indicates the sensitivity of the current control task to packet loss and stability.
[0111] For example, for high-speed tracking tasks, the real-time performance level is high (e.g., 0.9) and the reliability level is low (e.g., 0.3); for precise positioning tasks, the real-time performance level is medium (e.g., 0.5) and the reliability level is high (e.g., 0.8); for ordinary mobile tasks, both the real-time performance level and the reliability level are medium (e.g., 0.5).
[0112] The dynamic adjustment method of the weighting coefficient will be explained in detail in step S330 with the help of the formula.
[0113] In step S330, robot 100 performs weighted calculations on each network status parameter according to the adjusted weight coefficients to obtain the comprehensive quality scores for the LAN direct connection channel, P2P direct connection channel and relay forwarding channel respectively.
[0114] In this embodiment, the overall quality score Q of the i-th connection mode is... i for: ; When the connection mode is a direct LAN connection, i=1; when the connection mode is a direct P2P connection, i=2; and when the connection mode is a relay forwarding, i=3.
[0115] Where, τ i This represents the end-to-end delay for the i-th connection mode, typically measured in milliseconds (ms). Lower delay indicates better communication performance.
[0116] Where, τ max τ min These represent the maximum and minimum latency across all connection modes, respectively.
[0117] Where, ρ i Let be the packet loss rate for the i-th connection mode, with a value ranging from 0 to 1. The lower the packet loss rate, the higher the communication reliability.
[0118] Where, β i This represents the available bandwidth for the i-th connection mode, typically measured in Mbps. A higher bandwidth indicates a stronger data transmission capability.
[0119] Where, δ i The signal stability is divided into the i-th connection mode, with a value ranging from 0 to 1. The larger the value, the more stable the signal.
[0120] Where, β max This represents the maximum available bandwidth across all connection modes.
[0121] Among them, w τ w ρ w β w δ Let w be the weight coefficient corresponding to each network state parameter. τ +w ρ +w β +w δ =1.
[0122] In this embodiment, the weighting coefficient w τ w ρ w β w δ This reflects the importance of each network state parameter in the overall quality score. In this embodiment, wτ and w ρ It is dynamically adjusted according to the real-time performance level and the reliability level, respectively, while w β and w δ Keep it at the preset base value.
[0123] For example, suppose w τ =0.4, w ρ =0.3, w β =0.2, w δ =0.1, the network status parameters for the three connection modes are as follows: LAN direct connection: τ1=8ms, ρ1=0.001, β1=100Mbps, δ1=0.99.
[0124] P2P direct connection: τ2=35ms, ρ2=0.01, β2=20Mbps, δ2=0.85.
[0125] Relay forwarding: τ3=70ms, ρ3=0.005, β3=10Mbps, δ3=0.90.
[0126] Normalized delay values for each connection mode The calculation is as follows: Direct LAN connection: (70-8)÷(70-8)=1.000; P2P direct connection: (70-35)÷(70-8)≈0.565; Relay forwarding: (70-70)÷(70-8)=0.
[0127] Bandwidth normalization values for each connection mode The calculation is as follows: Direct LAN connection: 100 ÷ 100 = 1.000; P2P direct connection: 20 ÷ 100 = 0.200; Relay forwarding: 10 ÷ 100 = 0.100.
[0128] Overall quality score Q for each connection mode i The calculation is as follows: Direct LAN connection: Q1 = 0.4 × 1.000 + 0.3 × (1 - 0.001) + 0.2 × 1.000 + 0.1 × 0.99 = 0.9987; P2P direct connection: Q2=0.4×0.565+0.3×(1-0.01)+0.2×0.200+0.1×0.85=0.648; Relay forwarding: Q3=0.4×0+0.3×(1-0.005)+0.2×0.100+0.1×0.90=0.4085.
[0129] The calculation results show that the overall quality score Q1 of the direct LAN connection is the highest (0.9987), therefore Robot100 prioritizes the direct LAN connection channel.
[0130] In step S340, robot 100 switches the currently used connection mode to the connection mode with the highest overall quality score.
[0131] In this process, robot 100 compares the comprehensive quality scores of each connection mode calculated in step S330 and selects the connection mode with the highest score as the currently used connection mode. If the currently used connection mode is already the highest-scoring mode, it remains unchanged; otherwise, a connection switch is triggered to switch the current connection to the connection mode with the highest score.
[0132] In this embodiment, a smooth switching strategy can be adopted during the connection switching process. That is, two connection channels are maintained at the same time during the switching process, and the old connection is disconnected after the new connection is stable, so as to avoid communication interruption during the switching process.
[0133] like Figure 9 As shown, in the fourth embodiment of the present invention, compared with any of the embodiments described above, the control method further includes a video data transmission step: In step S410, robot 100 acquires video signals through multi-channel cameras 130 to obtain multiple video streams.
[0134] As described above, the robot 100 is equipped with multiple cameras 130, which may include a conventional environment camera 130 (for capturing images of the environment around the robot 100), a robotic arm 120 operation camera 130 (for capturing detailed images of the robotic arm 120 performing its tasks), and a navigation camera 130 (for capturing images of the robot 100's direction of travel). Each camera 130 independently acquires video signals, forming multiple independent video streams.
[0135] In this embodiment, the resolutions of each camera 130 can be the same or different. For example, the conventional environment camera 130 can use a 1080p (1920×1080 pixels) resolution and a 30fps frame rate; the robotic arm 120 operation camera 130 can use a 720p (1280×720 pixels) resolution and a 30fps frame rate; and the navigation camera 130 can use a 480p (640×480 pixels) resolution and a 15fps frame rate.
[0136] In step S420, robot 100 synchronizes and aligns multiple video streams according to their timestamps.
[0137] Each video frame is accompanied by a timestamp during capture. Robot 100 groups video frames with the same or closest timestamps from different video streams into the same group, ensuring that the images from each perspective are captured at the same time during subsequent compositing, thus avoiding time misalignment between perspectives.
[0138] In step S430, robot 100 combines the synchronized multi-channel video streams into a single video stream.
[0139] The compositing method can employ a picture-in-picture layout, a split-screen layout, or other combinations thereof. In a picture-in-picture layout, one video stream serves as the main screen, while the other videos are displayed as small windows overlaid on the main screen. In a split-screen layout, the videos are arranged and displayed on the same screen according to a preset layout.
[0140] In step S440, robot 100 encodes and compresses the single-channel video stream.
[0141] Encoding compression can employ video coding standards such as H.264, H.265, VP8, and VP9. Encoding compression significantly reduces the data size of the video stream, thus saving network bandwidth.
[0142] In step S450, robot 100 sends a single video stream to controller 200.
[0143] In this process, robot 100 sends the encoded and compressed single-channel video stream to controller 200 through the currently used connection mode. After receiving the single-channel video stream, controller 200 decodes it and displays it on its operating interface, allowing the operator to view the perspectives of all cameras 130 simultaneously in one screen.
[0144] Furthermore, the controller 200 can also decode the received single video stream into multiple images with the same number of channels as the camera 130, so that each image corresponds to one camera 130.
[0145] Based on the foregoing description, those skilled in the art will understand that, through steps S410 to S450, the present invention can merge video streams that originally required multiple independent transmissions into a single transmission, significantly reducing the bandwidth consumption of video transmission. For example, the total bandwidth consumption of three independent video streams is approximately 3.2 Mbps, while the bandwidth consumption after merging into a single video stream is approximately 1.2 Mbps, resulting in a bandwidth saving of approximately 62.5%.
[0146] The technical solutions of the present invention have been described in conjunction with several embodiments above. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is not limited to these specific embodiments. Without departing from the technical principles of the present invention, those skilled in the art can disassemble and combine the technical solutions in the above embodiments, and can also make equivalent changes or substitutions to related technical features. Any changes, equivalent substitutions, improvements, etc., made within the technical concept and / or technical principles of the present invention will fall within the scope of protection of the present invention.
Claims
1. A method for controlling a robot, comprising: In response to the robot receiving a control command from the controller, the target pose data contained in the control command is extracted; The robot acquires the pose data from the previous execution and records it as the previous pose data, and calculates the pose difference between the target pose data and the previous pose data. Determine whether the pose difference exceeds a preset threshold; If the pose difference does not exceed the preset threshold, the robot directly drives the actuator to perform the corresponding action based on the target pose data; If the pose difference exceeds the preset threshold, the robot performs interpolation smoothing on the target pose data to generate smoothed joint angle data and drives the actuator to perform the corresponding action.
2. The control method according to claim 1, wherein, The interpolation smoothing process includes: Construct the pose difference vector between the previous pose data and the target pose data; The pose difference vector is input into the dynamic motion primitive model to obtain the transformation trajectory from the previous pose to the target pose; the previous pose corresponds to the previous pose data, and the target pose corresponds to the target pose data; The dynamic motion primitive model includes adjustable parameters, which include at least a time scaling parameter and a trajectory shape parameter. The time scaling parameter is used to control the transition time of the robot from the previous pose to the target pose, and the trajectory shape parameter is used to generate a smooth trajectory from the previous pose to the target pose.
3. The control method according to claim 2, wherein, The trajectory shape parameter α=α min +(α max -α min )×e -λH ; Where, α min and α max These are the minimum and maximum values of the trajectory shape parameters, respectively; λ is the adjustment sensitivity coefficient; and H is the pose information entropy.
4. The control method according to claim 3, wherein, Where n is the dimension of the pose vector, ΔP i The difference in each dimension between the i-th target pose and the previous pose.
5. The control method according to claim 1, wherein before the robot receives control instructions from the controller, the control method further includes a network connection establishment step: The robot responds to a network connection request initiated by the controller and determines whether the controller and the robot are on the same network. If they are on the same network, the robot establishes a direct local area network connection with the controller; If they are on different networks, the robot attempts to establish a direct P2P connection with the controller; If the P2P direct connection fails to be established, the robot establishes a relay forwarding channel with the controller through the central server.
6. The control method according to claim 5, wherein after the robot receives a control command from the controller, the control method further comprises: The robot obtains the network status parameters of the local area network direct connection channel, the P2P direct connection channel, and the relay forwarding channel through its network digital twin; The robot parses the control instructions from the controller, extracts the control intent from the control instructions, and dynamically adjusts the weight coefficients of each network state parameter according to the control intent. The robot performs weighted calculations on each of the network state parameters according to the adjusted weight coefficients, and obtains the comprehensive quality scores of the LAN direct connection channel, the P2P direct connection channel and the relay forwarding channel respectively. The robot will switch the current connection mode to the connection mode with the highest overall quality score.
7. The control method according to claim 6, wherein, The overall quality score Q for the i-th connection mode i for: ; Where, τ i ρ i β i δ i These represent the latency, packet loss rate, available bandwidth, and signal stability for the i-th connection mode, respectively. Where, τ max τ min These represent the maximum and minimum latency across all connection modes, respectively. Where, β max The maximum available bandwidth across all connection modes; Among them, w τ w ρ w β w δ Let w be the weight coefficient corresponding to each network state parameter. τ +w ρ +w β +w δ =1.
8. The control method according to claim 1, wherein, The control instructions are carried in a data packet, which contains a monotonically increasing sequence number; The step of responding to the robot receiving a control command from the controller and extracting the target pose data contained in the control command includes: After receiving the data packet, the robot checks the continuity of the sequence number; If the sequence numbers are consecutive, the robot immediately extracts the target pose data from the data packet; If the sequence numbers are not consecutive, the robot puts the data packet into the receiving buffer and waits for the missing data packet to arrive or for a timeout before performing out-of-order reordering.
9. The control method according to claim 1 further includes a video data transmission step: The robot acquires video signals through multiple cameras to obtain multiple video streams; The robot synchronizes and aligns the multiple video streams according to their timestamps; The robot combines the synchronized multi-channel video streams into a single video stream. The robot encodes and compresses the single-channel video stream; The robot sends the single video stream to the controller.
10. A robot comprising a processor and a memory, wherein the memory stores a computer program, and the processor, when executing the computer program, is capable of implementing the control method of any one of claims 1 to 9.
