Guidance track generation method and system based on motion intention recognition
Patent Information
- Application Number
- CN202611535319.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-03
AI Technical Summary
The speed planning of existing painting robots fails to be dynamically adjusted according to the differences in the geometric characteristics of the trajectory and the requirements of the painting process, resulting in uneven coating thickness, especially at corners where sagging is prone to occur.
By collecting spatial position and attitude angle data of the operator holding the remote control gun through a three-axis wire sensor and gyroscope, and combining it with the operation intention recognition model, invalid hand tremors and trajectory deviation interference are identified and eliminated, while effective process pauses and attitude adjustment actions are retained, generating a smooth robot executable trajectory that meets the requirements of the spraying process.
It achieves precise identification based on trajectory geometric features and fusion of process constraints, ensuring consistent coating thickness, avoiding corner sagging and uneven edges, and achieving consistent coating thickness throughout the entire spraying path.
Smart Images

Figure CN123025310A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotic painting technology, and in particular to a method and system for generating guided trajectories based on motion intention recognition. Background Technology
[0002] The speed planning of existing painting robots mainly adopts a fixed S-curve acceleration and deceleration planning method. The speed planning is only based on the total length of the trajectory and the preset maximum speed and maximum acceleration parameters, without considering the differences in the geometric characteristics of the trajectory itself and the coating thickness requirements of the painting process.
[0003] In spraying operations, the movement speed of the robot's end-effector spray gun directly affects the amount of paint deposited per unit area. Excessive speed results in a thin coating, while insufficient speed leads to a thick coating or even sagging. The spraying trajectory includes straight sections, corner sections, and curved sections, each with different geometric characteristics requiring different spraying speeds. While a fixed S-curve design can maintain a constant speed on straight sections, it cannot reduce speed in advance based on the inflection angle and curvature at corners. The robot passes through corners at speeds close to those on straight sections, resulting in excessive paint buildup and sagging at the corners, and uneven coating thickness at the edges. Furthermore, a fixed S-curve design cannot dynamically adjust the speed based on changes in the curvature of the curved sections. The coating thickness on curved sections with greater curvature differs significantly from that on straight sections, resulting in poor consistency in coating thickness throughout the entire spraying path. Summary of the Invention
[0004] This application provides a method and system for generating guided trajectories based on motion intention recognition, aiming to solve the problems that even fixed S-curve planning cannot dynamically adjust the speed according to the curvature changes of the curve segment, the coating thickness of curve segments with large curvature is significantly different from that of straight segments, and the coating thickness consistency is poor throughout the entire path.
[0005] In a first aspect, embodiments of this application provide a method for generating a guided trajectory based on motion intention recognition, applied to a handheld remote-controlled spraying system including a three-axis wire sensor, a gyroscope, and a trajectory generation control module, comprising: Spatial position data of the operator holding the remote control gun is collected by a three-axis wire sensor, and attitude angle data of the handheld remote control gun is collected by a gyroscope. The spatial position data and attitude angle data are synchronized and fused together to obtain the spatial motion trajectory of the handheld remote control gun. Kinematic features are extracted from the spatial motion trajectory. These features include trajectory point velocity, trajectory point acceleration, pause duration, and attitude change rate. The kinematic features are then input into the operation intention recognition model, which classifies the trajectory segments in the spatial motion trajectory into effective process pauses, attitude adjustment actions, invalid hand tremors, and trajectory deviation interference. Adaptive filtering is performed to eliminate trajectory segments classified as invalid hand tremors and trajectory deviation interference, while trajectory segments classified as valid process pauses and posture adjustment actions are retained, and key trajectory feature points required for the spraying process are also retained. Smoothing and fitting processing is performed on the filtered trajectory data to generate a smooth robot executable trajectory that fits the requirements of the spraying process, and the robot executable trajectory is output to the spraying robot for trajectory reproduction.
[0006] In some embodiments, the step of acquiring spatial position data of the operator's handheld remote control via a three-axis cable sensor and acquiring attitude angle data of the handheld remote control via a gyroscope includes: fixing the ends of the three cables of the three-axis cable sensor to three preset positions on the handheld remote control, and fixing the base of the three-axis cable sensor to a fixed bracket; acquiring the extension and retraction length data of the three cables in real time via the three-axis cable sensor, calculating the three-dimensional spatial coordinates of the handheld remote control based on the extension and retraction length data of the three cables and the coordinates of the cable base to obtain spatial position data; fixing the gyroscope inside the handheld remote control, acquiring the angular velocity data of the handheld remote control around three orthogonal axes in real time via the gyroscope, and performing an integral operation on the angular velocity data to obtain the attitude angle data of the handheld remote control.
[0007] In some embodiments, the step of performing time synchronization and data fusion of spatial position data and attitude angle data to obtain the spatial motion trajectory of the handheld remote gun includes: resampling the spatial position data and attitude angle data at a preset sampling frequency so that the spatial position data and attitude angle data have the same timestamp sequence; pairing the spatial position data and attitude angle data at the same time according to the timestamp sequence; performing coordinate system transformation on the paired spatial position data and attitude angle data to obtain the spatial motion trajectory of the handheld remote gun containing position information and attitude information.
[0008] In some embodiments, extracting kinematic features from the spatial motion trajectory, including trajectory point velocity, trajectory point acceleration, pause duration, and attitude change rate, includes: performing a difference operation on the spatial position data of two adjacent trajectory points in the spatial motion trajectory to obtain the trajectory point velocity of each trajectory point; performing a difference operation on the trajectory point velocities of two adjacent trajectory points to obtain the trajectory point acceleration of each trajectory point; counting the continuous time periods in the spatial motion trajectory where the trajectory point velocity is lower than a preset velocity threshold to obtain the pause duration of each trajectory segment; and performing a difference operation on the attitude angle data of two adjacent trajectory points to obtain the attitude change rate of each trajectory point.
[0009] In some embodiments, inputting kinematic features into the operation intention recognition model, whereby the operation intention recognition model classifies trajectory segments in the spatial motion trajectory into valid process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference, includes: dividing the spatial motion trajectory into multiple trajectory segments according to a preset time window; organizing the kinematic features of each trajectory segment into a feature vector; inputting the feature vector into the operation intention recognition model; and having the operation intention recognition model classify the trajectory segments based on the numerical range and combination pattern of trajectory point velocity, trajectory point acceleration, pause duration, and posture change rate. When the duration of a pause in a trajectory segment exceeds a preset process pause duration threshold and the acceleration of the trajectory point is less than a preset jitter threshold, it is classified as a valid process pause. When the attitude change rate of a trajectory segment exceeds a preset attitude adjustment threshold and the change in spatial position is less than a preset displacement threshold, it is classified as an attitude adjustment action. When the acceleration of the trajectory point in a trajectory segment exceeds a preset jitter threshold and the frequency of change in the velocity direction of the trajectory point exceeds a preset frequency threshold, it is classified as invalid hand jitter. When the velocity direction of the trajectory point in a trajectory segment deviates from the main motion direction and the deviation angle exceeds a preset offset threshold, it is classified as trajectory offset interference.
[0010] In some embodiments, before inputting kinematic features into the operation intention recognition model, and before the operation intention recognition model classifies trajectory segments in the spatial motion trajectory into effective process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference, the method further includes: collecting historical spatial motion trajectories of multiple operators during the spraying operation; manually annotating the trajectory segments in the historical spatial motion trajectory, with the annotation categories including effective process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference; extracting historical kinematic features from the annotated historical spatial motion trajectories; forming a training sample set by combining the historical kinematic features with the corresponding annotation categories; training the model on the training sample set using a classification algorithm to obtain the model parameters of the operation intention recognition model; and storing the model parameters of the operation intention recognition model in the trajectory generation control module.
[0011] In some embodiments, the adaptive filtering and elimination of trajectory segments classified as invalid hand tremors and trajectory deviation interference, and the retention of trajectory segments classified as valid process pauses and attitude adjustment actions, includes: for trajectory segments classified as invalid hand tremors, adaptively adjusting the length of the filtering window based on the tremor amplitude of the trajectory point acceleration, and using a moving average filtering method to eliminate high-frequency tremor components; for trajectory segments classified as trajectory deviation interference, performing offset correction based on the deviation angle between the velocity direction of the trajectory point and the main motion direction, pulling the trajectory points that deviate from the main motion direction back to the main motion direction; for trajectory segments classified as valid process pauses, retaining the original pause duration and spatial position data, and for trajectory segments classified as attitude adjustment actions, retaining the original attitude angle data and spatial position data.
[0012] In some embodiments, retaining the key trajectory feature points required for the spraying process includes: identifying key trajectory feature points required for the spraying process from the filtered trajectory data, the key trajectory feature points including the spraying start point, spraying end point, corner feature points, and attitude switching points; setting the spatial position data and attitude angle data of the key trajectory feature points as unmodifiable anchor points, keeping the position and attitude of the key trajectory feature points unchanged during subsequent smoothing fitting processing; marking the trajectory points within a preset range before and after the key trajectory feature points as transition areas, and performing local smoothing processing on the trajectory points within the transition areas.
[0013] In some embodiments, performing smooth fitting processing on the filtered trajectory data to generate a smooth robot executable trajectory that meets the requirements of the spraying process, and outputting the robot executable trajectory to the spraying robot execution trajectory reproduction, includes: generating a continuous and smooth fitting trajectory by using spline curve fitting on the filtered trajectory data, ensuring that the fitting trajectory passes through key trajectory feature points as constraints during the fitting process; performing speed planning on the fitting trajectory to ensure that the robot executable trajectory maintains uniform speed on straight segments and smoothly decelerates on corner segments; converting the robot executable trajectory into the joint space trajectory corresponding to the spraying robot, and outputting the joint space trajectory to the spraying robot execution trajectory reproduction.
[0014] Secondly, this application provides a guidance trajectory generation system based on motion intention recognition, the system comprising: The data acquisition unit is used to acquire the spatial position data of the operator's handheld remote gun through a three-axis wire sensor, and to acquire the attitude angle data of the handheld remote gun through a gyroscope. The spatial position data and attitude angle data are synchronized and fused together to obtain the spatial motion trajectory of the handheld remote gun. The feature extraction unit is used to extract kinematic features from the spatial motion trajectory. The kinematic features include trajectory point velocity, trajectory point acceleration, pause duration and attitude change rate. The kinematic features are input into the operation intention recognition model. The operation intention recognition model classifies the trajectory segments in the spatial motion trajectory into effective process pauses, attitude adjustment actions, invalid hand tremors and trajectory deviation interference. The trajectory reproduction unit performs adaptive filtering to eliminate trajectory segments classified as invalid hand tremors and trajectory deviation interference, while retaining trajectory segments classified as valid process pauses and posture adjustment actions, and also retaining key trajectory feature points required for the spraying process. The filtered trajectory data is then subjected to smooth fitting processing to generate a smooth robot executable trajectory that meets the requirements of the spraying process, and the robot executable trajectory is output to the spraying robot execution trajectory reproduction unit.
[0015] The method provided in this application has the following beneficial effects: 1. Accurate geometric feature recognition: Extract the curvature of trajectory points, inflection point angles and line segment lengths from the trajectory sequence to be executed, and divide the trajectory into straight line segments, corner segments and curve segments according to the geometric feature parameters, with accurate identification of trajectory segment types.
[0016] 2. Integration of process constraints: A mapping model between trajectory features and motion speed is established based on trajectory geometric feature parameters and coating thickness constraints. Speed planning directly serves the goal of coating thickness consistency.
[0017] 3. Segmented speed strategy: The straight segment is matched with a uniform spraying speed strategy to ensure uniform coating; the corner segment is matched with a smooth deceleration strategy to avoid corner sagging; and the curved segment is matched with a variable speed spraying strategy that changes with curvature to adapt to curvature changes.
[0018] 4. Proactive speed adjustment: The painting robot reduces its speed before reaching a corner and resumes a uniform painting speed after entering a straight section, with smooth speed changes and no sudden changes.
[0019] 5. Consistent thickness throughout the entire path: Different speed planning is adopted for trajectory segments with different geometric features to avoid corner drips and uneven edge coating caused by fixed S-curve planning, thus ensuring consistent coating thickness throughout the entire path.
[0020] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic flowchart illustrating the steps of a guided trajectory generation method based on motion intention recognition, provided in an embodiment of this application. Figure 2 This is a schematic diagram illustrating the principle of a guidance trajectory generation method based on motion intention recognition provided in an embodiment of this application; Figure 3 This is a schematic block diagram of a guided trajectory generation system based on motion intention recognition provided in an embodiment of this application; Figure 4 This is a schematic block diagram of the structure of a computer device provided in an embodiment of this application.
[0023] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Detailed Implementation
[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0025] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0026] It should be understood that, in order to clearly describe the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.
[0027] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0028] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0029] The speed planning of existing painting robots mainly adopts a fixed S-curve acceleration and deceleration planning method. The speed planning is only based on the total length of the trajectory and the preset maximum speed and maximum acceleration parameters, without considering the differences in the geometric characteristics of the trajectory itself and the coating thickness requirements of the painting process.
[0030] In spraying operations, the movement speed of the robot's end-effector spray gun directly affects the amount of paint deposited per unit area. Excessive speed results in a thin coating, while insufficient speed leads to a thick coating or even sagging. The spraying trajectory includes straight sections, corner sections, and curved sections, each with different geometric characteristics requiring different spraying speeds. While a fixed S-curve design can maintain a constant speed on straight sections, it cannot reduce speed in advance based on the inflection angle and curvature at corners. The robot passes through corners at speeds close to those on straight sections, resulting in excessive paint buildup and sagging at the corners, and uneven coating thickness at the edges. Furthermore, a fixed S-curve design cannot dynamically adjust the speed based on changes in the curvature of the curved sections. The coating thickness on curved sections with greater curvature differs significantly from that on straight sections, resulting in poor consistency in coating thickness throughout the entire spraying path.
[0031] To solve the above problem, please refer to Figure 1 and Figure 2 This application provides a method for generating guided trajectories based on motion intention recognition, applied to a handheld remote-controlled spraying system including a three-axis wire sensor, a gyroscope, and a trajectory generation control module. The system composition, method steps, and specific implementation details of this application are described in detail below with reference to the accompanying drawings. It should also be noted that all information involved in the method provided in this application is extracted with the authorization of the relevant user and in accordance with relevant regulations, and will not infringe on user privacy.
[0032] Please refer to Figure 2 The handheld remote-controlled spraying system provided in this application includes a handheld remote-controlled gun, a three-axis wire sensor, a gyroscope, a trajectory generation and control module, and a spraying robot. The handheld remote-controlled gun is held by the operator and used to demonstrate spraying actions along the surface of the workpiece. The shape of the handheld remote-controlled gun is consistent with the spray gun used in the spraying operation, and a trigger for simulating the spray gun's on / off state is provided on the handheld remote-controlled gun. The three-axis wire sensor includes a sensor base and three wires. The sensor base is fixed to a fixed bracket, and the ends of the three wires are respectively fixed to three preset positions on the handheld remote-controlled gun. The three wires extend and retract synchronously with the spatial movement of the handheld remote-controlled gun, and the three-axis wire sensor outputs three channels of wire extension and retraction length data. The gyroscope is fixed inside the handheld remote-controlled gun and is used to collect angular velocity data of the handheld remote-controlled gun around three orthogonal axes. The trajectory generation and control module includes a processor, memory, and a communication interface. The memory stores the computer program and model parameters of the operation intent recognition model. When the processor executes the computer program, it performs time synchronization and data fusion, operation intent recognition, adaptive filtering, and smoothing fitting. Logically, the trajectory generation and control module includes a time synchronization and data fusion unit, an operation intent recognition model, an adaptive filtering module, and a smoothing fitting unit. The painting robot is a multi-jointed robot with a spray gun installed at its end effector. The painting robot communicates with the trajectory generation and control module, receiving the executable trajectory output by the module and reproducing that trajectory.
[0033] Please refer to Figure 2 The data stream of the handheld remote-controlled spraying system provided in this application embodiment is as follows: a three-axis cable sensor outputs spatial position data, a gyroscope outputs attitude angle data, and the spatial position data and attitude angle data are sent to a time synchronization and data fusion unit. After time synchronization and data fusion, the spatial motion trajectory of the handheld remote-controlled gun is obtained. The spatial motion trajectory is sent to an operation intention recognition model, which classifies the trajectory segments in the spatial motion trajectory into effective process pauses, attitude adjustment actions, invalid hand tremors, and trajectory deviation interference. Among them, effective process pauses and attitude adjustment actions are effective actions that need to be retained, while invalid hand tremors and trajectory deviation interference are invalid interferences that need to be eliminated. The classified trajectory data is sent to an adaptive filtering module, which eliminates invalid interferences and retains key feature points. The filtered data is sent to a smoothing fitting unit, which generates a robot-executable trajectory. The robot-executable trajectory is output to the spraying robot, which drives the end-effector spray gun to reproduce the demonstration trajectory.
[0034] like Figure 1 The guided trajectory generation method based on motion intent recognition provided includes steps S101 to S103. Details are as follows: Step S101. The spatial position data of the operator holding the remote control gun is collected by the three-axis cable sensor, and the attitude angle data of the handheld remote control gun is collected by the gyroscope. The spatial position data and attitude angle data are synchronized and fused together to obtain the spatial motion trajectory of the handheld remote control gun.
[0035] Specifically, step S101 is the teaching data acquisition and fusion stage. The operator holds the handheld remote control gun and performs a demonstration movement along the surface of the workpiece to be sprayed, according to the actual spraying process requirements at the teaching station. The demonstration movement includes linear movement along the workpiece surface, corner turning, surface following, process pauses, and posture adjustments. A three-axis cable sensor collects the extension and retraction length data of the three cables in real time at a preset sampling frequency. Since the ends of the three cables are fixed to three non-overlapping preset positions on the handheld remote control gun, and the coordinates of the exit anchor points of the three cables in the sensor base coordinate system are known, the trajectory generation control module calculates the spatial three-dimensional coordinates of the fixed points on the handheld remote control gun through spatial intersection based on the real-time extension and retraction lengths of the three cables and the known coordinates of the three exit anchor points, obtaining the spatial position data of the handheld remote control gun. A gyroscope collects the angular velocity data of the handheld remote control gun around three orthogonal axes in real time at a preset sampling frequency. The trajectory generation control module performs integration calculations on the angular velocity data to obtain the attitude angle data of the handheld remote control gun.
[0036] Since the triaxial cable sensor and the gyroscope are two independent types of sensors, with different sampling times, frequencies, and coordinate systems, the trajectory generation control module first performs time synchronization on the spatial position data and attitude angle data. The module timestamps both types of data using a unified clock, resamples them at a preset sampling frequency (e.g., 100Hz), and performs linear or spline interpolation on missing timestamps, ensuring a one-to-one correspondence between the spatial position data and attitude angle data with the same timestamp sequence. The trajectory generation control module then performs a coordinate system transformation: based on pre-calibrated sensor installation parameters, it transforms the position data in the triaxial cable sensor coordinate system and the attitude data in the gyroscope coordinate system to the same coordinate system (e.g., the base coordinate system of a painting robot). It then pairs and fuses the spatial position data and attitude angle data at the same timestamp to obtain a six-degree-of-freedom spatial motion trajectory containing both position and attitude information. The spatial motion trajectory is stored as a sequence of trajectory points, each point including a timestamp, three-dimensional position coordinates, and three-dimensional attitude angles.
[0037] Step S102. Extract kinematic features from the spatial motion trajectory. The kinematic features include trajectory point velocity, trajectory point acceleration, pause duration and attitude change rate. Input the kinematic features into the operation intention recognition model. The operation intention recognition model classifies the trajectory segments in the spatial motion trajectory into effective process pauses, attitude adjustment actions, invalid hand tremors and trajectory deviation interference.
[0038] Specifically, step S102 is the motion intent recognition stage. The trajectory generation control module performs differential operations on the spatial motion trajectory point by point to extract kinematic features that reflect the operator's motion state: the trajectory generation control module performs differential operations on the spatial position data of two adjacent trajectory points and divides it by the sampling period to obtain the trajectory point velocity of each trajectory point; the trajectory generation control module performs differential operations on the trajectory point velocities of two adjacent trajectory points and divides it by the sampling period to obtain the trajectory point acceleration of each trajectory point; the trajectory generation control module counts the continuous time periods when the trajectory point velocity is lower than a preset velocity threshold to obtain the pause duration of each trajectory segment; the trajectory generation control module performs differential operations on the attitude angle data of two adjacent trajectory points and divides it by the sampling period to obtain the attitude change rate of each trajectory point. To improve classification accuracy, the trajectory generation control module can also extract auxiliary features such as the frequency of trajectory point velocity direction change, local trajectory curvature, position change per unit time, and jitter frequency band energy.
[0039] The trajectory generation and control module divides the spatial motion trajectory into multiple trajectory segments according to a preset time window (e.g., a 0.5s time window, with overlap between adjacent windows). It organizes the kinematic statistics within each trajectory segment into feature vectors, including average velocity, maximum acceleration, acceleration variance, pause duration, maximum attitude change rate, frequency of velocity direction change, and deviation angle from the main motion direction. The trajectory generation and control module inputs these feature vectors into a pre-trained operation intent recognition model. The model classifies the trajectory segments into four categories based on the numerical range and combination patterns of the kinematic features: the first category is effective process pauses, i.e., the operator's active stopping action required for the spraying process; the second category is attitude adjustment actions, i.e., the operator's wrist rotation to adjust the spray gun's orientation without significantly moving the gun body; the third category is invalid hand tremors, i.e., high-frequency, small-amplitude, meaningless movements introduced by physiological hand tremors, muscle fatigue, or unstable gun holding; and the fourth category is trajectory deviation interference, i.e., trajectory deviations from the intended teaching caused by external factors such as cable pulling, touch from others, or body imbalance. The operation intent recognition model outputs the category label and category confidence for each trajectory segment, and the four-class classification results serve as the basis for the differential processing in step S103.
[0040] Step S103. Perform adaptive filtering to eliminate trajectory segments classified as invalid hand tremors and trajectory offset interference, and retain trajectory segments classified as valid process pauses and posture adjustment actions, while retaining key trajectory feature points required for the spraying process; perform smooth fitting processing on the filtered trajectory data to generate a smooth robot executable trajectory that fits the requirements of the spraying process, and output the robot executable trajectory to the spraying robot for trajectory reproduction.
[0041] Specifically, step S103 is the trajectory purification, fitting, and output stage. The trajectory generation control module performs differentiated processing on trajectory segments of different categories: For trajectory segments classified as invalid hand tremors, the trajectory generation control module uses adaptive moving average filtering or adaptive low-pass filtering to remove high-frequency jitter components. The length of the filtering window is adaptively adjusted according to the jitter amplitude of the trajectory segment; the larger the jitter amplitude, the longer the filtering window. For trajectory segments classified as trajectory offset interference, the trajectory generation control module first identifies the main motion direction of the trajectory segment, and then performs offset correction based on the deviation angle between the velocity direction of the trajectory point and the main motion direction, pulling the trajectory points that deviate from the main motion direction back to the main motion direction. For trajectory segments classified as valid process pauses, the trajectory generation control module retains the original pause position and the original pause duration, so that the spraying robot stops at the corresponding position and waits for the same amount of time when reproducing the action. For trajectory segments classified as posture adjustment actions, the trajectory generation control module retains the original posture angle data and spatial position data, so that the spraying robot synchronously completes the spray gun orientation adjustment when reproducing the action.
[0042] While performing differential filtering, the trajectory generation control module identifies and retains key trajectory feature points required for the spraying process from the trajectory data. These key feature points include the spraying start point, spraying end point, corner feature points, and attitude switching points. The trajectory generation control module sets the spatial position data and attitude angle data of the key trajectory feature points as unmodifiable anchor points to prevent filtering and fitting processing from altering the key process points. After filtering and anchor point retention, the trajectory generation control module performs spline curve smoothing fitting on the trajectory data. During the fitting process, key trajectory feature points are used as hard constraints to ensure that the fitted trajectory passes through all anchor points, resulting in a smooth trajectory with continuous position, velocity, and acceleration. The trajectory generation control module then performs velocity planning and coordinate transformation on the fitted trajectory, converting the fitted trajectory in Cartesian space into the joint space trajectory corresponding to the spraying robot, and outputs the joint space trajectory to the spraying robot. The spraying robot drives the end-effector spray gun according to the joint space trajectory to complete trajectory reproduction.
[0043] In some embodiments, the step of acquiring spatial position data of the operator's handheld remote control via a three-axis cable sensor and acquiring attitude angle data of the handheld remote control via a gyroscope includes: fixing the ends of the three cables of the three-axis cable sensor to three preset positions on the handheld remote control, and fixing the base of the three-axis cable sensor to a fixed bracket; acquiring the extension and retraction length data of the three cables in real time via the three-axis cable sensor, calculating the three-dimensional spatial coordinates of the handheld remote control based on the extension and retraction length data of the three cables and the coordinates of the cable base to obtain spatial position data; fixing the gyroscope inside the handheld remote control, acquiring the angular velocity data of the handheld remote control around three orthogonal axes in real time via the gyroscope, and performing an integral operation on the angular velocity data to obtain the attitude angle data of the handheld remote control.
[0044] Specifically, the triaxial wire sensor consists of three independent wire displacement sensors. Each wire displacement sensor includes a coiled wire winding mechanism, a measuring wire, and an angle encoder. When the measuring wire is pulled out, the angle encoder outputs a pulse signal proportional to the pulled-out length. The trajectory generation control module counts the pulse signals and converts them into the wire extension / retraction length. The coordinates of the exit anchor points of the three wire displacement sensors in the sensor base coordinate system are denoted as A1, A2, and A3, respectively. The coordinates of the three exit anchor points are determined by actual measurement and pre-stored after the sensor base is installed on the fixed bracket. The ends of the three wires are fixed to three preset positions on the handheld remote control gun. The coordinates of the three preset positions in the handheld remote control gun body coordinate system are denoted as B1, B2, and B3, respectively. The three preset positions are not collinear and are arranged as dispersed as possible to improve the geometric conditions for spatial intersection calculation.
[0045] During the teaching process, assuming the extension lengths of the three pull wires at a certain moment are l1, l2, and l3 respectively, the three fixed points on the handheld remote control gun are located at the intersection of three spheres with centers A1, A2, and A3 and radii l1, l2, and l3. The trajectory generation control module uses the trilateration method (spherical intersection method) to solve for the three-dimensional spatial coordinates of the three fixed points in the sensor base coordinate system. The trajectory generation control module takes the geometric center of the three fixed points as the spatial position of the handheld remote control gun and calculates the coarse attitude of the handheld remote control gun based on the geometric configuration formed by the three fixed points. This coarse attitude is used for cross-verification with the gyroscope attitude. To reduce the length error introduced by the self-weight of the measuring wires, tensile deformation, and exit friction, the three pull wires are arranged to avoid crossing each other and interference with the workpiece and operator. The rigidity of the fixed bracket meets the requirement that the sensor base does not experience visible shaking during the teaching process.
[0046] The gyroscope is a three-axis MEMS gyroscope or an inertial measurement unit containing a three-axis gyroscope. The gyroscope is fixed inside the handheld remote-controlled gun near the gun's center of gravity, and its three measurement axes are aligned with the three orthogonal axes of the gun's coordinate system. The gyroscope outputs the angular velocities around the roll, pitch, and yaw axes in real time. The trajectory generation and control module performs integral calculations on the angular velocities using quaternions as attitude descriptors. The attitude quaternions at the current moment are updated by the previous attitude quaternion and the current angular velocity increment. The attitude quaternions are then converted into roll, pitch, and yaw angles to obtain the handheld remote-controlled gun's attitude angle data. To suppress gyroscope zero-bias drift, the trajectory generation control module guides the operator to keep the handheld remote gun still for several seconds (e.g., 3 seconds) before each teaching session. During the still period, the trajectory generation control module collects the gyroscope output and calculates the average zero bias, which is then subtracted from the subsequent integration. During the teaching process, the trajectory generation control module also uses the coarse attitude calculated from the geometric configuration of the three fixed points of the three-axis wire sensor to periodically correct the gyroscope attitude and compensate for the cumulative drift of the gyroscope.
[0047] In some embodiments, the step of performing time synchronization and data fusion of spatial position data and attitude angle data to obtain the spatial motion trajectory of the handheld remote gun includes: resampling the spatial position data and attitude angle data at a preset sampling frequency so that the spatial position data and attitude angle data have the same timestamp sequence; pairing the spatial position data and attitude angle data at the same time according to the timestamp sequence; performing coordinate system transformation on the paired spatial position data and attitude angle data to obtain the spatial motion trajectory of the handheld remote gun containing position information and attitude information.
[0048] Specifically, the three-axis wire sensor and gyroscope each output data according to their own sampling frequency. The two types of sensors have different power-on times and data transmission delays, resulting in fixed and random deviations in position and attitude data corresponding to the same physical action along the time axis. The trajectory generation control module uses its system clock as the unified clock. Upon receiving each data stream, it timestamps the received data and corrects the timestamps using a pre-calibrated sensor transmission delay to obtain the actual acquisition time of the data. The trajectory generation control module establishes a unified time grid according to a preset sampling frequency (e.g., 100Hz, sampling period 10ms) and resamples the spatial position and attitude angle data separately. For unified time grid points falling between two actual sampling times, the trajectory generation control module uses linear interpolation to calculate the position and spherical linear interpolation to calculate the attitude, obtaining the position and attitude sequences on the unified time grid.
[0049] After resampling, the trajectory generation control module pairs the 3D position coordinates and 3D attitude angles at the same time according to the same timestamp, forming six-degree-of-freedom trajectory points. Since the measurement coordinate system of the three-axis wire sensor is the sensor base coordinate system, the measurement coordinate system of the gyroscope is the gun body coordinate system, and the painting robot uses the robot base coordinate system when executing the trajectory, the trajectory generation control module performs system calibration before teaching: the trajectory generation control module first calibrates the installation offset angle of the gyroscope measurement axis relative to the gun body coordinate system, and then calibrates the rotation matrix and translation vector of the sensor base coordinate system relative to the robot base coordinate system. The calibration method includes using a standard calibration block to guide the handheld remote gun to several known pose points in sequence, and the trajectory generation control module solving for the coordinate system transformation parameters. The trajectory generation control module transforms the paired position and attitude data to the robot's base coordinate system according to calibration parameters, and performs complementary filtering fusion on the position and attitude data: the position is mainly calculated by the three-axis cable sensor and supplemented by the position change calculated by the gyroscope integration; the attitude is mainly calculated by the gyroscope integration and periodically corrected by the coarse attitude calculated by the cable three-point configuration. After fusion, a spatial motion trajectory containing position and attitude information is obtained. The spatial motion trajectory is stored in the form of a trajectory point sequence, and each trajectory point includes a timestamp, three-dimensional position, three-dimensional attitude (quaternion or Euler angles), and a data validity flag.
[0050] In some embodiments, extracting kinematic features from the spatial motion trajectory, including trajectory point velocity, trajectory point acceleration, pause duration, and attitude change rate, includes: performing a difference operation on the spatial position data of two adjacent trajectory points in the spatial motion trajectory to obtain the trajectory point velocity of each trajectory point; performing a difference operation on the trajectory point velocities of two adjacent trajectory points to obtain the trajectory point acceleration of each trajectory point; counting the continuous time periods in the spatial motion trajectory where the trajectory point velocity is lower than a preset velocity threshold to obtain the pause duration of each trajectory segment; and performing a difference operation on the attitude angle data of two adjacent trajectory points to obtain the attitude change rate of each trajectory point.
[0051] Specifically, let the position of the i-th trajectory point in the spatial motion trajectory be p_i, the time be t_i, and the attitude be q_i, with a sampling period Δt = t_i - t_(i-1). The trajectory generation control module calculates the trajectory point velocity of the i-th trajectory point according to v_i = ||p_i - p_(i-1)|| / Δt, where || || represents the Euclidean norm of a three-dimensional vector; the trajectory generation control module calculates the trajectory point acceleration of the i-th trajectory point according to a_i=(v_i-v_(i-1)) / Δt, and the acceleration reflects the change in velocity magnitude. At the same time, the trajectory generation control module calculates the rate of change of velocity direction based on the angle between the velocity vectors of adjacent trajectory points. For the duration of the pause, the trajectory generation control module compares the trajectory point velocity with a preset velocity threshold (e.g., 5 mm / s), and judges the trajectory points that are continuously below the preset velocity threshold as stationary points. The duration of the pause for each consecutive stationary point is obtained by counting the time span of each segment of stationary points. In order to avoid the missegmentation of the pause segment caused by a single noise point, the trajectory generation control module performs morphological processing on the stationary point sequence, and merges the brief pauses with a duration less than the minimum pause time (e.g., 0.1s) into the adjacent motion segment.
[0052] For the attitude change rate, the trajectory generation control module calculates the relative rotation angle Δθ_i between the attitude quaternions of two adjacent trajectory points, and obtains the attitude change rate of the i-th trajectory point according to ω_i=Δθ_i / Δt. The attitude change rate reflects how quickly the operator adjusts the spray gun orientation by turning their wrist. The trajectory generation control module further extracts feature statistics within a preset time window (e.g., 0.5s) centered on the trajectory point. These feature statistics include average velocity, velocity variance, maximum acceleration, root mean square of acceleration, pause duration, maximum attitude change rate, cumulative angle of attitude change, frequency of velocity direction change, local trajectory curvature, and position change. These feature statistics together constitute the feature vector of the trajectory segment corresponding to the time window. The local trajectory curvature is calculated based on the reciprocal of the radius of the circle fitted by three adjacent trajectory points, the frequency of velocity direction change is calculated based on the number of times the velocity direction change exceeds a preset angle per unit time, and the root mean square of acceleration and the frequency of velocity direction change are used to quantitatively characterize the severity of hand tremors. All feature statistics are normalized before being input into the operational intent recognition model, mapping features of different dimensions to a unified numerical range and eliminating the impact of dimensional differences on classification results.
[0053] In some embodiments, inputting kinematic features into the operation intention recognition model, whereby the operation intention recognition model classifies trajectory segments in the spatial motion trajectory into valid process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference, includes: dividing the spatial motion trajectory into multiple trajectory segments according to a preset time window; organizing the kinematic features of each trajectory segment into a feature vector; inputting the feature vector into the operation intention recognition model; and having the operation intention recognition model classify the trajectory segments based on the numerical range and combination pattern of trajectory point velocity, trajectory point acceleration, pause duration, and posture change rate. When the duration of a pause in a trajectory segment exceeds a preset process pause duration threshold and the acceleration of the trajectory point is less than a preset jitter threshold, it is classified as a valid process pause. When the attitude change rate of a trajectory segment exceeds a preset attitude adjustment threshold and the change in spatial position is less than a preset displacement threshold, it is classified as an attitude adjustment action. When the acceleration of the trajectory point in a trajectory segment exceeds a preset jitter threshold and the frequency of change in the velocity direction of the trajectory point exceeds a preset frequency threshold, it is classified as invalid hand jitter. When the velocity direction of the trajectory point in a trajectory segment deviates from the main motion direction and the deviation angle exceeds a preset offset threshold, it is classified as trajectory offset interference.
[0054] Specifically, the trajectory generation control module uses a sliding time window to segment the spatial motion trajectory. The time window length is set to 0.3s to 1s (e.g., 0.5s), and adjacent time windows overlap by 30% to 50% to avoid the movement at the boundary of the trajectory segment being hard-cut off. For each time window, the trajectory generation control module calculates the kinematic feature statistics within the window according to the previous implementation method and organizes them into a feature vector of fixed dimensions. The operation intent recognition model adopts a multi-class supervised learning model. The operation intent recognition model can use decision trees, random forests, gradient boosting decision trees, support vector machines, or neural network classifiers. The operation intent recognition model outputs the probability of the feature vector belonging to 4 categories. The category with the highest probability is taken as the classification result of the trajectory segment. When the maximum probability is lower than a preset confidence threshold (e.g., 0.7), the trajectory segment is marked as a trajectory segment to be confirmed.
[0055] The rules for determining the four types of trajectory segments are as follows. For valid process pauses: when the duration of the pause in a trajectory segment exceeds a preset process pause duration threshold (e.g., 0.5s), and the root mean square acceleration of the trajectory points within the window is less than a preset jitter threshold (e.g., 0.2m / s²),... 2 When the pause location is within the workpiece's process area, the operation intention recognition model classifies the trajectory segment as a valid process pause. A valid process pause corresponds to the operator actively stopping the spray gun to wait for the coating to level, observe the spraying effect, switch the spraying surface, or operate the spray gun switch. For attitude adjustment actions: when the attitude change rate of the trajectory segment is greater than the preset attitude adjustment threshold (e.g., 30° / s), the cumulative attitude change angle within the window is greater than the preset angle (e.g., 15°), and the spatial position change is less than the preset displacement threshold (e.g., 10mm), the operation intention recognition model classifies the trajectory segment as an attitude adjustment action. An attitude adjustment action corresponds to the operator rotating their wrist, changing the spray gun's direction, or the spray distance while the gun body remains basically still. For invalid hand tremors: when the root mean square of the trajectory point acceleration of the trajectory segment is greater than the preset tremor threshold, the frequency of velocity direction change is greater than the preset frequency threshold (e.g., 5Hz), and the single-cycle position change is less than the preset tremor displacement (e.g., 2mm), the operation intention recognition model classifies the trajectory segment as invalid hand tremors. Invalid hand tremors are characterized by high-frequency, small-amplitude, and directionless reciprocating motion. For trajectory deviation interference: When the deviation angle between the velocity direction of the trajectory point and the local main motion direction of a trajectory segment is greater than a preset deviation threshold (e.g., 30°), the deviation duration is short, and the trajectory exhibits a return characteristic after the deviation, the operation intention recognition model classifies the trajectory segment as trajectory deviation interference. Trajectory deviation interference is usually caused by cable pulling, touch from bystanders, or operator imbalance, manifesting as a single, unidirectional, positional jump deviating from the teaching intention. The operation intention recognition model makes a judgment based on a combination of multiple features rather than a single threshold, reducing the probability of misjudgment based on a single feature.
[0056] In some embodiments, before inputting kinematic features into the operation intention recognition model, and before the operation intention recognition model classifies trajectory segments in the spatial motion trajectory into effective process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference, the method further includes: collecting historical spatial motion trajectories of multiple operators during the spraying operation; manually annotating the trajectory segments in the historical spatial motion trajectory, with the annotation categories including effective process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference; extracting historical kinematic features from the annotated historical spatial motion trajectories; forming a training sample set by combining the historical kinematic features with the corresponding annotation categories; training the model on the training sample set using a classification algorithm to obtain the model parameters of the operation intention recognition model; and storing the model parameters of the operation intention recognition model in the trajectory generation control module.
[0057] Specifically, the operation intent recognition model was trained offline under supervised supervision before formal use. During the training data collection phase, multiple operators were organized to complete a large number of teaching tasks at the teaching station while holding handheld remote control guns. The teaching tasks covered different workpiece shapes (planes, corners, curved surfaces, cavities), different spraying rhythms, and different operating habits. During the collection process, spatial position data and attitude angle data were recorded simultaneously and fused into historical spatial motion trajectories. During data collection, teaching processes containing typical invalid actions were also specially arranged. For example, actions such as hand shaking, pulling the cable, and touching the operator's arm were artificially introduced during the teaching process to ensure that the training samples covered various interferences in real working conditions.
[0058] The trajectory generation control module (or offline training device) segments the historical spatial motion trajectory according to a preset time window. Personnel familiar with the spraying process manually annotate each trajectory segment, categorizing them into four types: valid process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference. Annotation criteria (e.g., pause duration, tremor frequency, deviation angle) are recorded simultaneously during annotation. For trajectory segments with unclear category characteristics, multiple annotators independently annotate, and the majority category is selected. The trajectory generation control module extracts historical kinematic features from the annotated trajectory segments, combines these features with the corresponding annotation categories to form a training sample set, and divides the training sample set according to a preset ratio (e.g., 80% as the training set and 20% as the test set). The trajectory generation control module employs a classification algorithm to train the model on the training set. During training, model hyperparameters (e.g., number of decision trees, tree depth, kernel function type, and penalty coefficient) are adjusted through cross-validation. Classification accuracy, precision, recall, and confusion matrix are evaluated on the test set. Training terminates when the four-class classification accuracy meets preset requirements (e.g., overall accuracy not less than 95%, invalid action false negative rate lower than preset values). The trained model parameters are stored in the trajectory generation control module's memory. During teaching, the module loads these parameters to classify trajectory segments in real time. To improve the model's adaptability to new working conditions, the training sample library supports continuous expansion, and model parameters support version updates.
[0059] In some embodiments, the adaptive filtering and elimination of trajectory segments classified as invalid hand tremors and trajectory deviation interference, and the retention of trajectory segments classified as valid process pauses and attitude adjustment actions, includes: for trajectory segments classified as invalid hand tremors, adaptively adjusting the length of the filtering window based on the tremor amplitude of the trajectory point acceleration, and using a moving average filtering method to eliminate high-frequency tremor components; for trajectory segments classified as trajectory deviation interference, performing offset correction based on the deviation angle between the velocity direction of the trajectory point and the main motion direction, pulling the trajectory points that deviate from the main motion direction back to the main motion direction; for trajectory segments classified as valid process pauses, retaining the original pause duration and spatial position data, and for trajectory segments classified as attitude adjustment actions, retaining the original attitude angle data and spatial position data.
[0060] Specifically, for invalid hand tremor trajectory segments, the trajectory generation control module employs an adaptive moving average filter: the module uses the root mean square of acceleration of trajectory points within the trajectory segment as a measure of tremor amplitude. A larger tremor amplitude indicates more severe hand tremor, and the filter window length should be larger. The filter window length ranges linearly or piecewise with the tremor amplitude between the minimum window (e.g., 3 sampling points) and the maximum window (e.g., 15 sampling points). Within the moving window, the module performs a weighted average on the trajectory point positions (e.g., using triangular weighting or Gaussian weighting, with the center of the window having the largest weight), replacing the original positions with the filtered positions to filter out high-frequency reciprocating tremors. For trajectory segments where tremor energy is concentrated in a specific frequency band, the module can also use Butterworth low-pass filtering or wavelet thresholding for noise reduction. The low-pass cutoff frequency is set based on the main tremor frequency band and the normal spraying motion frequency band (e.g., a cutoff frequency of 3Hz to 6Hz), filtering out tremors while retaining the operator's intentional normal speed changes. The filtering strength is adaptive according to the category: a stronger filter is used for invalid hand tremor trajectory segments, and a weaker filter or no filter is used for adjacent normal motion trajectory segments to avoid the normal trajectory being over-smoothed and losing process details.
[0061] For trajectory segments with trajectory deviation interference, the trajectory generation control module first determines the main motion direction based on the trajectory segment before the deviation occurs (e.g., trajectory points 0.5s to 1s before the deviation) through principal component analysis or local linear fitting. The main motion direction is taken as the direction of the first principal component of the local trajectory point distribution. The trajectory generation control module then calculates the deviation angle between the velocity direction of each trajectory point in the deviation segment and the main motion direction. For trajectory points with deviation angles greater than a preset deviation threshold, deviation correction is performed: the trajectory generation control module decomposes the trajectory point displacement into a tangential component along the main motion direction and a normal component perpendicular to the main motion direction. The tangential component is retained, and the normal component is compressed or directly set to zero according to a correction coefficient (e.g., 0 to 0.3). The compressed components are then combined to form the correction position, thereby pulling the trajectory points that deviate from the main motion direction back to the main motion direction. For the return segment formed by the natural return of the trajectory after the deviation ends, the trajectory generation control module directly removes the return segment and fills it with an interpolated trajectory in the main motion direction, avoiding unnecessary back-and-forth movements by the painting robot during reproduction. Before and after deviation correction, the trajectory generation control module performs a continuity check on the trajectory points to ensure a smooth connection between the correction position and the adjacent retained trajectory segment.
[0062] For valid process pause trajectory segments, the trajectory generation control module does not perform filtering or position modification, but fully preserves the spatial position, attitude angle, and original pause duration of the pause center point. This ensures that the painting robot remains stationary at the pause position for the same amount of time during replication, meeting the needs of processes such as coating leveling, gun stacking, or observation. For attitude adjustment trajectory segments, the trajectory generation control module fully preserves the change process of the attitude angle over time and the gun position, only performing slight filtering on high-frequency jitter superimposed in the attitude data. This allows the painting robot to synchronously adjust the spray gun orientation and spray distance according to the operator's demonstration during replication. By processing differently according to intent categories, the trajectory generation control module fully preserves valid process information while eliminating invalid interference, avoiding the mistaken filtering of process pauses and attitude adjustments as jitter by traditional uniform filtering.
[0063] In some embodiments, retaining the key trajectory feature points required for the spraying process includes: identifying key trajectory feature points required for the spraying process from the filtered trajectory data, the key trajectory feature points including the spraying start point, spraying end point, corner feature points, and attitude switching points; setting the spatial position data and attitude angle data of the key trajectory feature points as unmodifiable anchor points, keeping the position and attitude of the key trajectory feature points unchanged during subsequent smoothing fitting processing; marking the trajectory points within a preset range before and after the key trajectory feature points as transition areas, and performing local smoothing processing on the trajectory points within the transition areas.
[0064] Specifically, key trajectory feature points are a few key poses that determine the quality of the spraying process. If the key trajectory feature points are deviated during filtering or fitting, it will lead to incorrect spraying start position, incomplete coating at corners, or incorrect spray gun orientation. The trajectory generation control module identifies key trajectory feature points from the filtered trajectory data according to the following rules: the spraying start point is the first trajectory point when the operator triggers the spray gun to open (or when the teaching trajectory transitions from stationary to stable spraying motion); the spraying end point is the last trajectory point when the operator triggers the spray gun to close (or when the teaching trajectory transitions from stable spraying motion to stationary); corner feature points are trajectory points where the local trajectory curvature is greater than a preset curvature threshold, or the trajectory direction change angle is greater than a preset corner angle threshold. The trajectory generation control module identifies corner feature points by calculating the angle between the tangent directions of adjacent trajectory segments, and takes the curvature extreme point of the rounded corner as the corner feature point; the attitude switching point is the boundary trajectory point where the attitude change rate changes from large to small and the attitude angle enters a new stable range. The attitude switching point corresponds to the boundary position where the spray gun changes from spraying one surface to spraying another surface.
[0065] The trajectory generation and control module sets the spatial position and attitude angle data of the identified key trajectory feature points as unmodifiable anchor points. These anchor points maintain their position and attitude throughout the subsequent offset correction, smoothing filtering, and spline fitting processes. During smoothing fitting, the fitted curve is forced to pass through all anchor points. To avoid angle bends or abrupt acceleration changes in the trajectory near anchor points due to forced interpolation, the trajectory generation and control module marks the trajectory points within a preset range before and after each anchor point (e.g., 0.1s to 0.3s before and after the anchor point) as a transition zone. Local smoothing is performed on the trajectory points within this transition zone: using the anchor point pose as the boundary condition, the module applies spline local fitting to the trajectory points within the transition zone, ensuring continuity in position, velocity, and acceleration between entering and leaving the anchor point. Regular smoothing is performed on ordinary trajectory segments outside the transition zone. By combining hard constraints on anchor points with local smoothing in the transition zone, both the accurate pose of key process points and the smooth movement of the robot when passing through these points, without impacts or jitter, are ensured.
[0066] In some embodiments, performing smooth fitting processing on the filtered trajectory data to generate a smooth robot executable trajectory that meets the requirements of the spraying process, and outputting the robot executable trajectory to the spraying robot execution trajectory reproduction, includes: generating a continuous and smooth fitting trajectory by using spline curve fitting on the filtered trajectory data, ensuring that the fitting trajectory passes through key trajectory feature points as constraints during the fitting process; performing speed planning on the fitting trajectory to ensure that the robot executable trajectory maintains uniform speed on straight segments and smoothly decelerates on corner segments; converting the robot executable trajectory into the joint space trajectory corresponding to the spraying robot, and outputting the joint space trajectory to the spraying robot execution trajectory reproduction.
[0067] Specifically, the trajectory points after filtering and anchor point retention are still discrete point sequences. Directly sending discrete point sequences will cause the painting robot's movement to become jerky. The trajectory generation control module performs spline curve fitting on the discrete trajectory points: the trajectory generation control module uses cubic spline curves or cubic B-spline curves to fit the position sequence and quaternion spline curves to fit the attitude sequence. During fitting, all key trajectory feature points are used as interpolation constraints to ensure that the fitted trajectory accurately passes through the anchor points. Approximation fitting is used for ordinary trajectory points to further smooth the noise. After fitting, the trajectory generation control module checks the continuity of the fitted trajectory to ensure that the fitted trajectory is continuous in position, velocity, and acceleration (i.e., second-order geometric continuity), and checks the maximum deviation of the fitted trajectory from the original effective trajectory. When the maximum deviation exceeds the preset deviation limit (e.g., 1 mm), the fitting smoothness is reduced and refitting is performed to achieve a balance between smoothness and teaching fidelity.
[0068] The fitted trajectory only provides the spatial path; the trajectory generation control module also needs to perform temporal velocity planning on the fitted trajectory. The trajectory generation control module calculates the maximum permissible speed of the robot's end effector based on the local curvature of the trajectory. The greater the curvature (the sharper the corner), the lower the permissible speed. The trajectory generation control module ensures that the robot's executable trajectory maintains uniform speed in straight segments, smoothly decelerates according to an S-shaped acceleration / deceleration curve when approaching corners, and smoothly accelerates back to the speed in straight segments after passing the corner. The velocity planning simultaneously satisfies the maximum speed, maximum acceleration, and maximum jerk constraints of the painting robot. For effective process pauses, the velocity in the velocity planning result is zero, and the original pause duration is maintained. For attitude adjustment segments, the position velocity in the velocity planning result is close to zero, and the attitude changes according to the demonstration speed. After velocity planning is completed, the trajectory generation control module obtains a Cartesian spatial trajectory containing the position, attitude, linear velocity, angular velocity, and acceleration at each planning moment.
[0069] The trajectory generation control module then performs a conversion from Cartesian space to joint space: based on the kinematic model of the painting robot, the trajectory generation control module performs inverse kinematics solution point by point on the Cartesian space trajectory to obtain the joint angles of each joint at each planning moment, and then obtains the joint velocity and joint acceleration through difference; the trajectory generation control module performs joint limit, velocity limit, acceleration limit and singular configuration check on the joint space trajectory, and gives prompts and adjusts the posture or velocity for trajectory points that exceed the limit or are close to the singular configuration. The joint space trajectory that passes the check is the robot's executable trajectory. The trajectory generation control module sends the robot's executable trajectory to the painting robot controller through the communication interface. The painting robot drives the end spray gun to reproduce the demonstration painting action according to the joint space trajectory; before the trajectory is sent, a no-load simulation can be performed in the simulation environment of the painting robot to confirm that there are no collisions and no exceedances before actual painting.
[0070] In some embodiments, please refer to Figure 2 This application provides a complete implementation method for completing handheld teaching to robot reproduction using the above-described method. The teaching station of the handheld remote-controlled spraying system includes a fixed bracket, a three-axis cable sensor, a handheld remote control gun, and a gyroscope. The reproduction station includes a spraying robot and a worktable. The trajectory generation and control module is located between the teaching station and the reproduction station and is communicatively connected to the three-axis cable sensor, the gyroscope, and the spraying robot, respectively.
[0071] Before the teaching begins, the operator fixes the sensor base of the three-axis wire sensor to the fixed bracket, connects the ends of the three wires to the three preset positions of the handheld remote gun, fixes the gyroscope inside the handheld remote gun and completes the gyroscope zero bias calibration; the operator guides the handheld remote gun to several standard pose points in sequence to complete the coordinate transformation calibration between the sensor base coordinate system, the gun body coordinate system and the painting robot base coordinate system. At the start of the demonstration, the operator stands at the demonstration station holding the handheld remote spray gun. The three cables of the handheld remote spray gun are kept taut by the spring winding mechanism. The three cables are distinguished by different colors for easy checking of the connection status. The operator performs a complete demonstration of the actual spraying process on the workpiece to be sprayed. During the demonstration, the operator moves the gun body at a constant speed along the workpiece surface to complete the spraying of straight sections. At the corners of the workpiece, the operator slows down in advance and rotates the wrist to complete the cornering. At curved surfaces, the operator continuously adjusts the gun body posture according to the shape of the curved surface to make the spray gun perpendicular to the workpiece surface. When it is necessary to stack guns, observe, or switch spraying surfaces, the operator actively stops the gun to form an effective process pause. When it is necessary to change the spraying direction, the operator rotates the wrist in place to form a posture adjustment action. During the demonstration, the operator's unavoidable slight hand tremors, as well as trajectory deviations caused by cable pulling or accidental touches, are all recorded.
[0072] During the teaching process, the three-axis cable sensor outputs three channels of cable extension / retraction length data in real time, and the gyroscope outputs angular velocity data around three orthogonal axes in real time. Both types of data are sent to the time synchronization and data fusion unit of the trajectory generation control module. The time synchronization and data fusion unit resamples, timestamps, and pairs the two types of data at a unified sampling frequency. Based on the cable extension / retraction length and the coordinates of the cable base, the three-dimensional coordinates of the gun body are calculated through trilateration. The attitude angle is obtained by integrating the gyroscope angular velocity and correcting it through the cable's three-point configuration period. The position data and attitude data are then uniformly transformed to the base coordinate system of the painting robot and fused to obtain the spatial motion trajectory of the handheld remote-controlled gun.
[0073] The spatial motion trajectory is fed into the operation intent recognition model. The model divides the spatial motion trajectory into multiple trajectory segments according to a preset time window, extracts kinematic features such as trajectory point velocity, trajectory point acceleration, pause duration, and attitude change rate for each segment, and organizes them into feature vectors. Based on the feature value range and combination pattern, the model classifies each trajectory segment into four categories: valid process pauses, attitude adjustment actions, invalid hand tremors, and trajectory deviation interference, and outputs the category confidence score. Please refer to [reference needed]. Figure 2 Among the four types of outputs of the operation intention recognition model, effective process pauses and posture adjustment actions are the effective actions that need to be retained, while invalid hand tremors and trajectory deviation interference are the invalid interferences that need to be eliminated.
[0074] The classification results are fed into the adaptive filtering module. For invalid hand tremor trajectory segments, the adaptive filtering module adaptively adjusts the filter window length according to the tremor amplitude and performs moving average filtering to remove high-frequency tremor components; for trajectory deviation interference segments, it identifies the main motion direction and performs offset correction according to the deviation angle, pulling the deviated trajectory points back to the main motion direction; for valid process pause trajectory segments, it retains the original pause position and pause duration; for posture adjustment action trajectory segments, it retains the original posture angle changes; the adaptive filtering module simultaneously identifies the spraying start point, spraying end point, corner feature points, and posture switching points and sets them as unmodifiable anchor points, performing local smoothing on the transition areas before and after the anchor points.
[0075] The filtered data is fed into the smoothing fitting unit. The smoothing fitting unit performs spline curve fitting on the position and attitude sequences respectively, using key trajectory feature points as constraints, to generate a second-order continuous fitted trajectory that passes through all anchor points. The smoothing fitting unit combines trajectory curvature with the painting robot's motion constraints to perform velocity planning, ensuring the robot's executable trajectory maintains a constant speed on straight sections, smoothly decelerates at corners, remains stationary at process pauses, and synchronously rotates its wrist during attitude adjustments. The smoothing fitting unit performs inverse kinematics solving and joint constraint and singular configuration checks on the fitted trajectory to generate the robot's executable trajectory.
[0076] The robot's executable trajectory is output to the painting robot. A spray gun is mounted at the end of the painting robot. The robot drives the spray gun to move along the executable trajectory above the worktable, activating the spray gun at the starting point and deactivating it at the ending point. It sprays at a constant speed on straight sections, slows down according to a plan on corner sections, maintains its posture at process pauses, and adjusts the spray gun's orientation during posture adjustment sections. This faithfully reproduces the operator's demonstrated painting actions as an automated painting operation. For trajectory segments to be confirmed that have a category confidence level lower than a preset confidence threshold, the trajectory generation control module highlights the segment and provides a suggested category on the confirmation interface. The operator then confirms or corrects the segment before filtering and fitting. For teaching segments with slack wires, wires exceeding their range, or abnormal gyroscope data, the trajectory generation control module prompts the operator to re-teach the corresponding segment. Through this complete implementation, effective process actions during handheld teaching are fully preserved, and invalid interference is automatically eliminated. The trajectory reproduced by the painting robot is smooth, accurate, and closely matches the painting process requirements.
[0077] In some embodiments, when generating a robot-executable trajectory, the trajectory generation control module combines the coating deposition model with the trajectory geometry to perform adaptive planning of the process speed, so that the coating thickness remains consistent throughout the entire path of the reproduced spraying.
[0078] Specifically, in spraying operations, the amount of paint received per unit area on the workpiece surface is approximately inversely proportional to the spray gun's moving speed. Under the condition that the spray gun flow rate, spray width, and spray distance remain constant, a faster spray gun moving speed results in a smaller paint deposition per unit area and a thinner coating; conversely, a slower spray gun moving speed results in a thicker coating. If the spray gun is moved at a straight-line speed at corners, adjacent trajectories overlap on the inside of the corner, leading to excessive paint accumulation and sagging. A coating deposition model is pre-established in the trajectory generation and control module. This model takes the spray gun flow rate, spray width, spray distance, spray gun moving speed, and paint transfer efficiency as inputs, and the coating thickness distribution on the workpiece surface as the output. The relationship between coating thickness and spray gun moving speed follows h=K Q / (v) The calculation is performed using the formula w), where h is the coating thickness, Q is the spray gun flow rate, v is the spray gun moving speed, w is the spray width, and K is a process coefficient related to the coating transfer efficiency and spraying distance.
[0079] The trajectory generation and control module calculates the geometric features of the fitted trajectory segment by segment: for straight segments, the process speed corresponding to the target coating thickness is taken as the constant speed segment speed; for corner segments and curved segments, the trajectory generation and control module calculates the maximum allowable speed for that segment based on the local radius of curvature, corner angle, and overlap with adjacent spraying trajectories. The smaller the radius of curvature, the larger the corner angle, and the more trajectory overlap, the lower the allowable speed. The trajectory generation and control module controls the spray gun to slow down in advance according to an S-shaped acceleration and deceleration curve before reaching the corner, and to accelerate smoothly after passing the curvature extreme point; for curved surface segments with continuously changing curvature, the trajectory generation and control module continuously adjusts the speed in real time according to the curvature, so that the speed of each trajectory point matches the coating deposition requirements at that point. While slowing down, the trajectory generation and control module can also adjust the spray gun flow rate or spraying distance in conjunction, for example, appropriately reducing the spray gun flow rate inside the corner and maintaining the rated flow rate in the constant speed segment on the large plane. Through coordinated adjustment of speed and flow rate, the corner paint buildup is further suppressed. The trajectory generation and control module superimposes the process speed planning results onto the time parameters of the spline fitted trajectory to generate a robot-executable trajectory that takes into account both motion smoothness and coating thickness consistency. This implementation method directly addresses the problem of uneven coating in corner and curved sections of fixed-speed planning, ensuring that the coating thickness deviation in straight sections, corner sections, and curved sections is controlled within a preset range.
[0080] In some embodiments, the operation intent recognition model performs personalized baseline collection and online incremental updates based on the different operating habits of different operators.
[0081] Specifically, there are significant differences in the gun-holding stability, natural pause time, and wrist rotation speed among different operators. Using a uniform threshold for operation intent recognition models can easily lead to misclassification of some operators. The trajectory generation control module performs personalized baseline acquisition when an operator uses the handheld remote spraying system for the first time: the module guides the operator to keep the handheld remote gun still for several seconds, collecting the amplitude and frequency of hand tremors in the still state as the operator's personalized tremor baseline; the module then guides the operator to complete several process pauses and posture adjustments at a natural rhythm, statistically analyzing the distribution of the operator's natural pause duration and posture change rate as the personalized process action baseline.
[0082] During formal teaching, the operation intent recognition model, based on general model parameters and biased by a personalized baseline, performs personalized adjustments to the jitter threshold, process pause duration threshold, and posture adjustment threshold. For example, for operators with poor hand stability, the jitter threshold is appropriately increased to avoid misclassifying normal gun-holding swaying as invalid hand tremors; for operators accustomed to quick, short pauses, the process pause duration threshold is appropriately shortened to avoid misclassifying effective pauses as normal movements. During teaching, for trajectory segments to be confirmed where the category confidence is lower than the preset confidence threshold, the trajectory generation control module provides suggested categories in the confirmation interface. The operator confirms these categories as valid actions or invalid interference, and the operator's confirmation results are added to the personal sample library as incremental samples. When the cumulative number of new samples in the personal sample library reaches a preset number, the trajectory generation control module performs online incremental training based on the general model, updating and storing the model parameters corresponding to that operator. Through personalized baselines and online incremental updates, the operation intent recognition model becomes increasingly aligned with the specific operator's operating habits with increasing usage, resulting in a continuous improvement in classification accuracy.
[0083] In some embodiments, the trajectory generation control module links the operation intent recognition result with the spray gun trigger action and spraying process parameters, so that the spraying switch status, spray gun flow rate and trajectory category are synchronized when the robot reproduces the process.
[0084] Specifically, the operator simulates the opening and closing of the spray gun using a trigger on a handheld remote-controlled gun. The state of the trigger and its spatial movement trajectory are recorded with the same timestamp. The trajectory generation control module aligns the spray gun trigger state with the trajectory category: for the spraying start point anchor, the trajectory generation control module sets a spray gun opening command in the robot's executable trajectory, and the spraying robot opens the spray gun when it moves to the spraying start point; for the spraying end point anchor, the trajectory generation control module sets a spray gun closing command, and the spraying robot closes the spray gun when it moves to the spraying end point. For effective process pause trajectory segments, the trajectory generation control module sets reproducible actions according to the process type: for pauses involving waiting for coating leveling or observation, the spraying robot closes the spray gun or reduces the spray gun flow at the pause position and remains stationary to achieve the original pause duration, avoiding localized paint buildup caused by static spraying; for pauses involving overlapping guns, the spraying robot keeps the spray gun open at the pause position and maintains the original pause duration. For the posture adjustment trajectory segment, the trajectory generation control module controls the painting robot to synchronously rotate the spray gun according to the demonstrated posture data. During the posture adjustment process, the spray gun is turned off or the spray gun flow rate is reduced, and spraying resumes after the adjustment is in place. For invalid hand tremor trajectory segments and trajectory deviation interference trajectory segments that are rejected, the trajectory generation control module keeps the spray gun off or does not schedule spraying during the corresponding reproduction period to avoid paint waste and workpiece contamination caused by the robot spraying invalid interference segments. Through the linkage between trajectory category and spray gun trigger and flow rate parameters, the robot reproduces not only the gun body movement trajectory, but also the movement intention. Figure 1 The complete spraying process.
[0085] In some embodiments, the handheld remote-controlled gun provides virtual rail-like guidance to the operator during the teaching and acquisition phase, suppressing invalid interference and prompting process actions at the acquisition end.
[0086] Specifically, the handheld remote-controlled spraying system also includes a guidance and prompting unit, which comprises a vibration prompting device mounted on the handheld remote-controlled gun and a display prompting device (or a force feedback device worn on the operator's wrist) mounted at the teaching station. During the teaching process, the trajectory generation and control module calculates the local main motion direction and allowable teaching range in real time based on the acquired trajectory, and overlays the workpiece outline, the planned guide line, and the real-time position of the handheld remote-controlled gun onto the display prompting device. When the handheld remote-controlled gun deviates from the allowable teaching range or deviates from the main motion direction by more than a preset offset threshold, the trajectory generation and control module controls the vibration prompting device to output differentiated vibrations in the direction of deviation, or controls the force feedback device to output a guiding force to pull the handheld remote-controlled gun back to the guide line, assisting the operator in teaching smoothly along the workpiece outline. When the handheld remote-controlled gun approaches a corner feature point, spraying start point, or spraying end point, the trajectory generation and control module controls the vibration prompt to output a short prompt or highlights the upcoming critical process point on the display prompt, prompting the operator to slow down in advance or prepare the operation trigger. When the operator's hand tremor is detected to continuously exceed the personalized tremor baseline, the trajectory generation and control module prompts the operator to relax their grip or take a short break via the display prompt. The virtual guide rail-style guidance reduces trajectory deviation and hand tremor during the data acquisition stage, alleviating the processing pressure of subsequent adaptive filtering and helping inexperienced operators quickly complete high-quality teaching.
[0087] In some embodiments, the trajectory generation control module performs quality quantification scoring on the generated robot-executable trajectory and supports the migration and reproduction of the same workpiece in different poses from a single taught trajectory.
[0088] Specifically, before trajectory output, the trajectory generation control module performs a quality quantification score on the robot's executable trajectory. The scoring indicators include trajectory smoothness, residual invalid interference rate, key feature point deviation, predicted coating thickness deviation, joint velocity and acceleration margin, and robot reachability. Trajectory smoothness is based on the acceleration and jerk statistics of the fitted trajectory; the residual invalid interference rate is based on the high-frequency jitter energy remaining in the filtered trajectory; the predicted coating thickness deviation is calculated point-by-point based on the coating deposition model to determine the difference between the thickness and the target thickness; and joint margin and reachability are checked based on the inverse kinematics solution results. The trajectory generation control module weights and sums the indicators to obtain a total trajectory quality score. When the total trajectory quality score is lower than the preset acceptable score or any single indicator exceeds the limit, the trajectory generation control module marks the unacceptable section and the reason for the unacceptance (e.g., excessive speed at corners, an anchor point exceeding the robot's workspace) on the confirmation interface, prompting the operator to re-teach the corresponding section or adjust the process parameters. A qualified trajectory can first undergo a no-load simulation in the simulation environment to confirm no collisions or exceeding limits before being sent to the painting robot.
[0089] To address the issue of inconsistent placement of similar workpieces during batch painting, the trajectory generation and control module also supports trajectory migration: After the taught trajectory is generated, the visual measurement device or manual calibration obtains the pose deviation of the target workpiece relative to the taught workpiece. The trajectory generation and control module treats the robot's executable trajectory as a whole and performs rigid body translation and rotation transformations according to the pose deviation. For curved workpieces, it further performs trajectory mapping according to the workpiece's surface parameters, ensuring the migrated trajectory conforms to the target workpiece surface. The trajectory generation and control module re-executes inverse kinematics solutions, collision checks, and process speed planning on the migrated trajectory, only prompting adjustments for local trajectories that exceed the robot's workspace or interfere with the tooling. Through a single teaching and trajectory migration, the same guiding trajectory can be reproduced on multiple similar workpieces with different poses in the same batch, reducing repetitive teaching workload and adapting to small-batch, multi-variety painting production scenarios.
[0090] In some embodiments, the trajectory generation control module performs process compliance checks on the attitude data and spray distance in the spatial motion trajectory, and automatically corrects attitudes and spray distances that do not meet the spraying process requirements in the reproduced trajectory.
[0091] Specifically, the spraying process requires the spray gun axis to be as perpendicular as possible to the workpiece surface, and the spray gun nozzle to maintain a set spraying distance from the workpiece surface. During operator instruction, the spray gun posture and spray distance may not meet the requirements for some trajectory segments due to obstructions from workpiece cavities, corners, or operating habits. The trajectory generation control module pre-stores the 3D model of the workpiece to be sprayed or obtains the workpiece surface geometry through a vision measurement device. The trajectory generation control module calculates the angle between the handheld remote control gun posture axis and the normal to the workpiece surface, as well as the distance from the gun reference point to the workpiece surface, point by point. For trajectory points where the posture angle exceeds the preset posture limit (e.g., 15°), the trajectory generation control module, while retaining the operator's instruction position, slowly corrects the spray gun posture in the reproduced trajectory towards the normal to the workpiece surface. The correction process is arranged to be completed continuously in the posture adjustment section or transition zone to avoid sudden posture changes. For trajectory points where the spray distance deviates from the set spraying distance by more than the preset distance limit (e.g., ±10mm), the trajectory generation control module adjusts the position of the reproduced trajectory along the normal to the workpiece surface, so that the spray gun nozzle returns to the set spraying distance. For positions where the robot cannot maintain a vertical posture, such as inside the workpiece cavity, the trajectory generation and control module combines the robot's workspace and interference check results to provide the optimal achievable posture and indicates the posture deviation at that position on the confirmation interface. Process compliance checks and automatic corrections ensure that the reproduced trajectory not only replicates the operator's motion intentions but also meets the process specifications of vertical and equidistant spraying, further improving coating uniformity and spraying quality stability.
[0092] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0093] Please see Figure 3 As shown, Figure 3 This is a schematic diagram of the structure of a motion intent recognition-based guidance trajectory generation system 200 provided in this application embodiment. The motion intent recognition-based guidance trajectory generation system 200 is used to execute the steps of the motion intent recognition-based guidance trajectory generation method shown in the above embodiments. The motion intent recognition-based guidance trajectory generation system 200 can be a single server or a server cluster, or it can be a terminal, such as a handheld terminal, a laptop computer, a wearable device, or a robot.
[0094] like Figure 3 As shown, the guided trajectory generation system 200 based on motion intention recognition includes: The data acquisition unit 201 is used to acquire the spatial position data of the operator's handheld remote gun through a three-axis wire sensor, acquire the attitude angle data of the handheld remote gun through a gyroscope, and synchronize and fuse the spatial position data and attitude angle data to obtain the spatial motion trajectory of the handheld remote gun. The feature extraction unit 202 is used to extract kinematic features from the spatial motion trajectory. The kinematic features include trajectory point velocity, trajectory point acceleration, pause duration and attitude change rate. The kinematic features are input into the operation intention recognition model. The operation intention recognition model classifies the trajectory segments in the spatial motion trajectory into effective process pauses, attitude adjustment actions, invalid hand tremors and trajectory deviation interference. The trajectory reproduction unit 203 is used to perform adaptive filtering and elimination on trajectory segments classified as invalid hand tremors and trajectory offset interference, and to retain trajectory segments classified as valid process pauses and posture adjustment actions, while retaining key trajectory feature points required for the spraying process; it performs smooth fitting processing on the filtered trajectory data to generate a smooth robot executable trajectory that fits the requirements of the spraying process, and outputs the robot executable trajectory to the spraying robot execution trajectory reproduction.
[0095] In some embodiments, the step of acquiring spatial position data of the operator's handheld remote control via a three-axis cable sensor and acquiring attitude angle data of the handheld remote control via a gyroscope includes: fixing the ends of the three cables of the three-axis cable sensor to three preset positions on the handheld remote control, and fixing the base of the three-axis cable sensor to a fixed bracket; acquiring the extension and retraction length data of the three cables in real time via the three-axis cable sensor, calculating the three-dimensional spatial coordinates of the handheld remote control based on the extension and retraction length data of the three cables and the coordinates of the cable base to obtain spatial position data; fixing the gyroscope inside the handheld remote control, acquiring the angular velocity data of the handheld remote control around three orthogonal axes in real time via the gyroscope, and performing an integral operation on the angular velocity data to obtain the attitude angle data of the handheld remote control.
[0096] In some embodiments, the step of performing time synchronization and data fusion of spatial position data and attitude angle data to obtain the spatial motion trajectory of the handheld remote gun includes: resampling the spatial position data and attitude angle data at a preset sampling frequency so that the spatial position data and attitude angle data have the same timestamp sequence; pairing the spatial position data and attitude angle data at the same time according to the timestamp sequence; performing coordinate system transformation on the paired spatial position data and attitude angle data to obtain the spatial motion trajectory of the handheld remote gun containing position information and attitude information.
[0097] In some embodiments, extracting kinematic features from the spatial motion trajectory, including trajectory point velocity, trajectory point acceleration, pause duration, and attitude change rate, includes: performing a difference operation on the spatial position data of two adjacent trajectory points in the spatial motion trajectory to obtain the trajectory point velocity of each trajectory point; performing a difference operation on the trajectory point velocities of two adjacent trajectory points to obtain the trajectory point acceleration of each trajectory point; counting the continuous time periods in the spatial motion trajectory where the trajectory point velocity is lower than a preset velocity threshold to obtain the pause duration of each trajectory segment; and performing a difference operation on the attitude angle data of two adjacent trajectory points to obtain the attitude change rate of each trajectory point.
[0098] In some embodiments, inputting kinematic features into the operation intention recognition model, whereby the operation intention recognition model classifies trajectory segments in the spatial motion trajectory into valid process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference, includes: dividing the spatial motion trajectory into multiple trajectory segments according to a preset time window; organizing the kinematic features of each trajectory segment into a feature vector; inputting the feature vector into the operation intention recognition model; and having the operation intention recognition model classify the trajectory segments based on the numerical range and combination pattern of trajectory point velocity, trajectory point acceleration, pause duration, and posture change rate. When the duration of a pause in a trajectory segment exceeds a preset process pause duration threshold and the acceleration of the trajectory point is less than a preset jitter threshold, it is classified as a valid process pause. When the attitude change rate of a trajectory segment exceeds a preset attitude adjustment threshold and the change in spatial position is less than a preset displacement threshold, it is classified as an attitude adjustment action. When the acceleration of the trajectory point in a trajectory segment exceeds a preset jitter threshold and the frequency of change in the velocity direction of the trajectory point exceeds a preset frequency threshold, it is classified as invalid hand jitter. When the velocity direction of the trajectory point in a trajectory segment deviates from the main motion direction and the deviation angle exceeds a preset offset threshold, it is classified as trajectory offset interference.
[0099] In some embodiments, before inputting kinematic features into the operation intention recognition model, and before the operation intention recognition model classifies trajectory segments in the spatial motion trajectory into effective process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference, the method further includes: collecting historical spatial motion trajectories of multiple operators during the spraying operation; manually annotating the trajectory segments in the historical spatial motion trajectory, with the annotation categories including effective process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference; extracting historical kinematic features from the annotated historical spatial motion trajectories; forming a training sample set by combining the historical kinematic features with the corresponding annotation categories; training the model on the training sample set using a classification algorithm to obtain the model parameters of the operation intention recognition model; and storing the model parameters of the operation intention recognition model in the trajectory generation control module.
[0100] In some embodiments, the adaptive filtering and elimination of trajectory segments classified as invalid hand tremors and trajectory deviation interference, and the retention of trajectory segments classified as valid process pauses and attitude adjustment actions, includes: for trajectory segments classified as invalid hand tremors, adaptively adjusting the length of the filtering window based on the tremor amplitude of the trajectory point acceleration, and using a moving average filtering method to eliminate high-frequency tremor components; for trajectory segments classified as trajectory deviation interference, performing offset correction based on the deviation angle between the velocity direction of the trajectory point and the main motion direction, pulling the trajectory points that deviate from the main motion direction back to the main motion direction; for trajectory segments classified as valid process pauses, retaining the original pause duration and spatial position data, and for trajectory segments classified as attitude adjustment actions, retaining the original attitude angle data and spatial position data.
[0101] In some embodiments, retaining the key trajectory feature points required for the spraying process includes: identifying key trajectory feature points required for the spraying process from the filtered trajectory data, the key trajectory feature points including the spraying start point, spraying end point, corner feature points, and attitude switching points; setting the spatial position data and attitude angle data of the key trajectory feature points as unmodifiable anchor points, keeping the position and attitude of the key trajectory feature points unchanged during subsequent smoothing fitting processing; marking the trajectory points within a preset range before and after the key trajectory feature points as transition areas, and performing local smoothing processing on the trajectory points within the transition areas.
[0102] In some embodiments, performing smooth fitting processing on the filtered trajectory data to generate a smooth robot executable trajectory that meets the requirements of the spraying process, and outputting the robot executable trajectory to the spraying robot execution trajectory reproduction, includes: generating a continuous and smooth fitting trajectory by using spline curve fitting on the filtered trajectory data, ensuring that the fitting trajectory passes through key trajectory feature points as constraints during the fitting process; performing speed planning on the fitting trajectory to ensure that the robot executable trajectory maintains uniform speed on straight segments and smoothly decelerates on corner segments; converting the robot executable trajectory into the joint space trajectory corresponding to the spraying robot, and outputting the joint space trajectory to the spraying robot execution trajectory reproduction.
[0103] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the guidance trajectory generation system and its modules based on motion intent recognition described above can be found in the corresponding contents of the various embodiments of the guidance trajectory generation method based on motion intent recognition, and will not be repeated here.
[0104] The aforementioned method for generating guiding trajectories based on motion intent recognition can be implemented as a computer program, which can be used in various ways, such as... Figure 3 It runs on the system shown.
[0105] Please see Figure 4 , Figure 4 This is a schematic block diagram of the structure of a computer device provided in an embodiment of this application. The computer device includes a processor, a memory, and a network interface connected via a device bus, wherein the memory may include a storage medium and internal memory.
[0106] The storage medium may store operating devices and computer programs. The computer program includes program instructions that, when executed, cause the processor to perform any method for generating a guided trajectory based on motion intent recognition.
[0107] The processor provides computing and control capabilities, supporting the operation of the entire computer device.
[0108] Internal memory provides an environment for the execution of computer programs in non-volatile storage media. When executed by a processor, the computer program can enable the processor to execute any method of generating a guided trajectory based on motion intent recognition.
[0109] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the terminal to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0110] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.
[0111] In one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps: Spatial position data of the operator holding the remote control gun is collected by a three-axis wire sensor, and attitude angle data of the handheld remote control gun is collected by a gyroscope. The spatial position data and attitude angle data are synchronized and fused together to obtain the spatial motion trajectory of the handheld remote control gun. Kinematic features are extracted from the spatial motion trajectory. These features include trajectory point velocity, trajectory point acceleration, pause duration, and attitude change rate. The kinematic features are then input into the operation intention recognition model, which classifies the trajectory segments in the spatial motion trajectory into effective process pauses, attitude adjustment actions, invalid hand tremors, and trajectory deviation interference. Adaptive filtering is performed to eliminate trajectory segments classified as invalid hand tremors and trajectory deviation interference, while trajectory segments classified as valid process pauses and posture adjustment actions are retained, and key trajectory feature points required for the spraying process are also retained. Smoothing and fitting processing is performed on the filtered trajectory data to generate a smooth robot executable trajectory that fits the requirements of the spraying process, and the robot executable trajectory is output to the spraying robot for trajectory reproduction.
[0112] In some embodiments, the step of acquiring spatial position data of the operator's handheld remote control via a three-axis cable sensor and acquiring attitude angle data of the handheld remote control via a gyroscope includes: fixing the ends of the three cables of the three-axis cable sensor to three preset positions on the handheld remote control, and fixing the base of the three-axis cable sensor to a fixed bracket; acquiring the extension and retraction length data of the three cables in real time via the three-axis cable sensor, calculating the three-dimensional spatial coordinates of the handheld remote control based on the extension and retraction length data of the three cables and the coordinates of the cable base to obtain spatial position data; fixing the gyroscope inside the handheld remote control, acquiring the angular velocity data of the handheld remote control around three orthogonal axes in real time via the gyroscope, and performing an integral operation on the angular velocity data to obtain the attitude angle data of the handheld remote control.
[0113] In some embodiments, the step of performing time synchronization and data fusion of spatial position data and attitude angle data to obtain the spatial motion trajectory of the handheld remote gun includes: resampling the spatial position data and attitude angle data at a preset sampling frequency so that the spatial position data and attitude angle data have the same timestamp sequence; pairing the spatial position data and attitude angle data at the same time according to the timestamp sequence; performing coordinate system transformation on the paired spatial position data and attitude angle data to obtain the spatial motion trajectory of the handheld remote gun containing position information and attitude information.
[0114] In some embodiments, extracting kinematic features from the spatial motion trajectory, including trajectory point velocity, trajectory point acceleration, pause duration, and attitude change rate, includes: performing a difference operation on the spatial position data of two adjacent trajectory points in the spatial motion trajectory to obtain the trajectory point velocity of each trajectory point; performing a difference operation on the trajectory point velocities of two adjacent trajectory points to obtain the trajectory point acceleration of each trajectory point; counting the continuous time periods in the spatial motion trajectory where the trajectory point velocity is lower than a preset velocity threshold to obtain the pause duration of each trajectory segment; and performing a difference operation on the attitude angle data of two adjacent trajectory points to obtain the attitude change rate of each trajectory point.
[0115] In some embodiments, inputting kinematic features into the operation intention recognition model, whereby the operation intention recognition model classifies trajectory segments in the spatial motion trajectory into valid process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference, includes: dividing the spatial motion trajectory into multiple trajectory segments according to a preset time window; organizing the kinematic features of each trajectory segment into a feature vector; inputting the feature vector into the operation intention recognition model; and having the operation intention recognition model classify the trajectory segments based on the numerical range and combination pattern of trajectory point velocity, trajectory point acceleration, pause duration, and posture change rate. When the duration of a pause in a trajectory segment exceeds a preset process pause duration threshold and the acceleration of the trajectory point is less than a preset jitter threshold, it is classified as a valid process pause. When the attitude change rate of a trajectory segment exceeds a preset attitude adjustment threshold and the change in spatial position is less than a preset displacement threshold, it is classified as an attitude adjustment action. When the acceleration of the trajectory point in a trajectory segment exceeds a preset jitter threshold and the frequency of change in the velocity direction of the trajectory point exceeds a preset frequency threshold, it is classified as invalid hand jitter. When the velocity direction of the trajectory point in a trajectory segment deviates from the main motion direction and the deviation angle exceeds a preset offset threshold, it is classified as trajectory offset interference.
[0116] In some embodiments, before inputting kinematic features into the operation intention recognition model, and before the operation intention recognition model classifies trajectory segments in the spatial motion trajectory into effective process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference, the method further includes: collecting historical spatial motion trajectories of multiple operators during the spraying operation; manually annotating the trajectory segments in the historical spatial motion trajectory, with the annotation categories including effective process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference; extracting historical kinematic features from the annotated historical spatial motion trajectories; forming a training sample set by combining the historical kinematic features with the corresponding annotation categories; training the model on the training sample set using a classification algorithm to obtain the model parameters of the operation intention recognition model; and storing the model parameters of the operation intention recognition model in the trajectory generation control module.
[0117] In some embodiments, the adaptive filtering and elimination of trajectory segments classified as invalid hand tremors and trajectory deviation interference, and the retention of trajectory segments classified as valid process pauses and attitude adjustment actions, includes: for trajectory segments classified as invalid hand tremors, adaptively adjusting the length of the filtering window based on the tremor amplitude of the trajectory point acceleration, and using a moving average filtering method to eliminate high-frequency tremor components; for trajectory segments classified as trajectory deviation interference, performing offset correction based on the deviation angle between the velocity direction of the trajectory point and the main motion direction, pulling the trajectory points that deviate from the main motion direction back to the main motion direction; for trajectory segments classified as valid process pauses, retaining the original pause duration and spatial position data, and for trajectory segments classified as attitude adjustment actions, retaining the original attitude angle data and spatial position data.
[0118] In some embodiments, retaining the key trajectory feature points required for the spraying process includes: identifying key trajectory feature points required for the spraying process from the filtered trajectory data, the key trajectory feature points including the spraying start point, spraying end point, corner feature points, and attitude switching points; setting the spatial position data and attitude angle data of the key trajectory feature points as unmodifiable anchor points, keeping the position and attitude of the key trajectory feature points unchanged during subsequent smoothing fitting processing; marking the trajectory points within a preset range before and after the key trajectory feature points as transition areas, and performing local smoothing processing on the trajectory points within the transition areas.
[0119] In some embodiments, performing smooth fitting processing on the filtered trajectory data to generate a smooth robot executable trajectory that meets the requirements of the spraying process, and outputting the robot executable trajectory to the spraying robot execution trajectory reproduction, includes: generating a continuous and smooth fitting trajectory by using spline curve fitting on the filtered trajectory data, ensuring that the fitting trajectory passes through key trajectory feature points as constraints during the fitting process; performing speed planning on the fitting trajectory to ensure that the robot executable trajectory maintains uniform speed on straight segments and smoothly decelerates on corner segments; converting the robot executable trajectory into the joint space trajectory corresponding to the spraying robot, and outputting the joint space trajectory to the spraying robot execution trajectory reproduction.
[0120] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the steps of the guidance trajectory generation method based on motion intention recognition as provided in any embodiment of this application.
[0121] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.
[0122] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for generating a guided trajectory based on motion intention recognition, applied to a handheld remote-controlled spraying system including a three-axis wire sensor, a gyroscope, and a trajectory generation control module, characterized in that, include: Spatial position data of the operator holding the remote control gun is collected by a three-axis wire sensor, and attitude angle data of the handheld remote control gun is collected by a gyroscope. The spatial position data and attitude angle data are synchronized and fused together to obtain the spatial motion trajectory of the handheld remote control gun. Kinematic features are extracted from the spatial motion trajectory. These features include trajectory point velocity, trajectory point acceleration, pause duration, and attitude change rate. The kinematic features are then input into the operation intention recognition model, which classifies the trajectory segments in the spatial motion trajectory into effective process pauses, attitude adjustment actions, invalid hand tremors, and trajectory deviation interference. Adaptive filtering is performed to eliminate trajectory segments classified as invalid hand tremors and trajectory deviation interference, while trajectory segments classified as valid process pauses and posture adjustment actions are retained, and key trajectory feature points required for the spraying process are also retained. Smoothing and fitting processing is performed on the filtered trajectory data to generate a smooth robot executable trajectory that fits the requirements of the spraying process, and the robot executable trajectory is output to the spraying robot for trajectory reproduction.
2. The method according to claim 1, characterized in that, The process of acquiring spatial position data of the operator holding the remote control gun via a three-axis cable sensor and acquiring attitude angle data of the handheld remote control gun via a gyroscope includes: The ends of the three pull wires of the triaxial pull-wire sensor are fixed to the three preset positions of the handheld remote control gun, and the base of the triaxial pull-wire sensor is fixed to the fixed bracket. The telescopic gun's spatial three-dimensional coordinates are calculated based on the telescopic length data of the three cables and the coordinates of the cable base, thereby obtaining spatial position data. A gyroscope is fixed inside the handheld remote gun. The gyroscope collects the angular velocity data of the handheld remote gun around three orthogonal axes in real time. The attitude angle data of the handheld remote gun is obtained by performing an integral operation on the angular velocity data.
3. The method according to claim 2, characterized in that, The process of synchronizing and fusing spatial position data and attitude angle data to obtain the spatial motion trajectory of the handheld remote-controlled gun includes: Resampling is performed on the spatial position data and attitude angle data at a preset sampling frequency so that the spatial position data and attitude angle data have the same timestamp sequence; Spatial location data and attitude angle data at the same time are paired based on the timestamp sequence; The paired spatial position data and attitude angle data are transformed using a coordinate system one transformation and fused to obtain the spatial motion trajectory of the handheld remote gun, which includes position and attitude information.
4. The method according to claim 1, characterized in that, The extraction of kinematic features from the spatial motion trajectory includes trajectory point velocity, trajectory point acceleration, pause duration, and attitude change rate, including: Perform a difference operation on the spatial position data of two adjacent trajectory points in the spatial motion trajectory to obtain the trajectory point velocity of each trajectory point; Perform a difference operation on the velocities of two adjacent trajectory points to obtain the trajectory acceleration of each trajectory point; The duration of pauses in each trajectory segment is obtained by analyzing the continuous time periods during which the velocity of trajectory points in the spatial motion trajectory is lower than a preset velocity threshold. Perform a difference operation on the attitude angle data of two adjacent trajectory points to obtain the attitude change rate of each trajectory point.
5. The method according to claim 1, characterized in that, The kinematic features are input into the operation intention recognition model, which classifies trajectory segments in the spatial motion trajectory into valid process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference, including: The spatial motion trajectory is divided into multiple trajectory segments according to a preset time window, and the kinematic features of each trajectory segment are organized into a feature vector. The feature vector is input into the operation intention recognition model, which classifies the trajectory segment based on the numerical range and combination pattern of trajectory point velocity, trajectory point acceleration, pause duration and attitude change rate. When the duration of the pause in the trajectory segment exceeds the preset process pause duration threshold and the acceleration of the trajectory point is less than the preset jitter threshold, it is classified as a valid process pause. When the attitude change rate of a trajectory segment is greater than a preset attitude adjustment threshold and the change in spatial position is less than a preset displacement threshold, it is classified as an attitude adjustment action. When the acceleration of the trajectory point in the trajectory segment is greater than the preset jitter threshold and the frequency of the change in the velocity direction of the trajectory point is greater than the preset frequency threshold, it is classified as invalid hand tremor. When the velocity direction of the trajectory points in a trajectory segment deviates from the main motion direction and the deviation angle is greater than the preset offset threshold, it is classified as trajectory offset interference.
6. The method according to claim 1, characterized in that, Before inputting kinematic features into the operation intention recognition model, and before the operation intention recognition model classifies trajectory segments in the spatial motion trajectory into valid process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference, the following steps are also included: Collect the historical spatial motion trajectories of multiple operators during the spraying operation, and manually annotate the trajectory segments in the historical spatial motion trajectory. The annotation categories include valid process pauses, posture adjustment actions, invalid hand tremors, and trajectory deviation interference. Historical kinematic features are extracted from the labeled historical spatial motion trajectories, and the historical kinematic features are combined with the corresponding labeled categories to form a training sample set. A classification algorithm is used to train the model on the training sample set to obtain the model parameters of the operation intention recognition model; The model parameters of the operation intent identification model are stored in the trajectory generation control module.
7. The method according to claim 1, characterized in that, The adaptive filtering and elimination of trajectory segments classified as invalid hand tremors and trajectory deviation interference, and the retention of trajectory segments classified as valid process pauses and posture adjustment actions, include: For trajectory segments classified as invalid hand tremors, the length of the filtering window is adaptively adjusted according to the tremor amplitude of the trajectory point acceleration, and the high-frequency tremor components are removed by using a moving average filtering method. For trajectory segments classified as trajectory offset interference, offset correction is performed based on the deviation angle between the velocity direction of the trajectory points and the main motion direction, pulling the trajectory points that deviated from the main motion direction back to the main motion direction; For trajectory segments classified as effective process pauses, the original pause duration and spatial location data are retained; for trajectory segments classified as attitude adjustment actions, the original attitude angle data and spatial location data are retained.
8. The method according to claim 7, characterized in that, The key trajectory feature points required for the retained spraying process include: The key trajectory feature points required for the spraying process are identified from the filtered trajectory data. These key trajectory feature points include the spraying start point, spraying end point, corner feature points, and attitude switching points. The spatial location data and attitude angle data of key trajectory feature points are set as unmodifiable anchor points, so that the position and attitude of key trajectory feature points remain unchanged during subsequent smooth fitting processes. The trajectory points within a preset range before and after the key trajectory feature points are marked as transition zones, and local smoothing processing is performed on the trajectory points within the transition zones.
9. The method according to claim 1, characterized in that, The process of performing smoothing and fitting on the filtered trajectory data to generate a smooth robot-executable trajectory that meets the requirements of the spraying process, and outputting the robot-executable trajectory to the spraying robot for trajectory reproduction, includes: The filtered trajectory data is fitted with spline curves to generate a continuous and smooth fitted trajectory. During the fitting process, key trajectory feature points are used as constraints to ensure that the fitted trajectory passes through the key trajectory feature points. Speed planning is performed on the fitted trajectory so that the robot's executable trajectory maintains a constant speed on straight sections and smoothly decelerates on corner sections; The robot's executable trajectory is converted into the joint space trajectory corresponding to the painting robot, and the joint space trajectory is output to the painting robot for trajectory reproduction.
10. A guided trajectory generation system based on motion intention recognition, used to implement the method as described in any one of claims 1-9, applied to a handheld remote-controlled spraying system including a three-axis wire sensor, a gyroscope, and a trajectory generation control module, characterized in that, include: The data acquisition unit is used to acquire the spatial position data of the operator's handheld remote gun through a three-axis wire sensor, and to acquire the attitude angle data of the handheld remote gun through a gyroscope. The spatial position data and attitude angle data are synchronized and fused together to obtain the spatial motion trajectory of the handheld remote gun. The feature extraction unit is used to extract kinematic features from the spatial motion trajectory. The kinematic features include trajectory point velocity, trajectory point acceleration, pause duration and attitude change rate. The kinematic features are input into the operation intention recognition model. The operation intention recognition model classifies the trajectory segments in the spatial motion trajectory into effective process pauses, attitude adjustment actions, invalid hand tremors and trajectory deviation interference. The trajectory reproduction unit performs adaptive filtering to eliminate trajectory segments classified as invalid hand tremors and trajectory deviation interference, while retaining trajectory segments classified as valid process pauses and posture adjustment actions, and also retaining key trajectory feature points required for the spraying process. The filtered trajectory data is then subjected to smooth fitting processing to generate a smooth robot executable trajectory that meets the requirements of the spraying process, and the robot executable trajectory is output to the spraying robot execution trajectory reproduction unit.
