Multi-task state control system and method for cleaning robots

By using a hierarchical design of task finite state machines and peripheral linkages, the problem of mixed use of tasks and trajectories in toilet cleaning robots is solved, achieving efficient and independent processing of cleaning operations and accurate tool operation, and simplifying system maintenance.

CN123103645APending Publication Date: 2026-11-17LINGQIAO TECHNOLOGY (KUNSHAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611311069.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing bathroom cleaning robots suffer from problems such as mixed use of tasks and trajectories, hard-coded external timing, lack of tool semantic mapping, separation of opening the lid and cleaning, and unreasonable threshold settings, resulting in complex and inefficient systems.

Method used

The task finite state machine is used to receive operation type codes, and the task logic and motion instructions are processed in layers. The peripheral switch logic and time are decoupled through the peripheral linkage. The visual perception module generates a six-dimensional waypoint sequence to realize the independent processing of tool grasping, placement and cleaning operations.

Benefits of technology

It effectively avoids mixing task logic and motion commands, reduces system coupling, improves cleaning efficiency and tool operation accuracy, and simplifies the maintenance process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123103645A_ABST
    Figure CN123103645A_ABST
Patent Text Reader

Abstract

This invention discloses a multi-task state management system and method for cleaning robots, relating to the interdisciplinary fields of robot software control and computer vision. This application uses a task finite state machine to receive operation type codes, classify tasks, and queue them. In response to a lid-opening type I task, it sends a perception request to the visual perception module and locks the first mode code within a configured waiting timeout period. Based on the point cloud bounding box of the device to be processed and the parameterized process set, it generates a preset topology multipath sequence. In response to a cleaning task, after confirming the end effector holding tool index, it obtains a six-dimensional waypoint sequence that meets the quantity and timeliness thresholds, and constructs a surface-fitting operation pose sequence based on tool length, process distance, and safety backoff amount. It performs joint verification of the six-dimensional waypoint sequence for the number of waypoints, receiving timeliness, and task type consistency. Each six-dimensional waypoint is converted into an end effector pose, and after batch fusion and distribution, end-point blocking confirmation is performed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot software control and computer vision interdisciplinary technology, specifically to a multi-task state management system and method for cleaning robots. Background Technology

[0002] Bathroom cleaning services have always been a major concern. Inadequate cleaning can easily lead to the growth and cross-infection of germs. Furthermore, due to the complex environment of bathrooms—slippery floors, limited vertical space, and stubborn stains and hard-to-reach areas on toilets and sinks—traditional manual cleaning methods are labor-intensive and inefficient. Against this backdrop, bathroom cleaning robots, equipped with autonomous sensing, intelligent decision-making, and precise operation capabilities, have emerged as an important technological solution to these challenges.

[0003] A bathroom cleaning robot integrating AI and mechanical automation should possess intelligent movement capabilities, autonomously completing a composite process of "opening the lid—grabbing tools—visual planning—cleaning—placing tools." However, current technical solutions suffer from numerous problems, including mixed use of tasks and trajectories, hard-coded external timing, lack of tool semantic mapping, lack of time-based management, separation of lid opening and cleaning, and unreasonable threshold settings. Summary of the Invention

[0004] The purpose of this invention is to provide a multi-task state management system and method for cleaning robots, so as to solve the problems raised in the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a multi-task state management method for cleaning robots, the method comprising: The task finite state machine receives the operation type code, classifies the task into tool grabbing, tool placement, lid opening type I task or cleaning operation task and puts it into the queue. In traditional solutions, task logic and motion commands are often intertwined in the same code. For example, the task logic might be "open the lid first, then clean," while the motion command might be "move to point A, point B." This code logic leads to highly complex maintenance and reuse processes. In this application, the task gateway only receives operation type codes to drive the FSM state flow, completely disregarding specific coordinates. The motion actuator only receives seven-dimensional poses, completely unaware of the current task stage, simply sending the device to the specified locations. The task layer and trajectory layer communicate through a standardized interface of operation codes and poses, achieving a layered effect without intrusion. Furthermore, the logic code design avoids the traditional approach of directly controlling the switching sequence of water pumps and fans through hard coding. Instead, it uses peripheral actuators to decouple the switching logic of all peripherals (water pumps, fans) from time / phase, setting their trigger conditions to be defined by external configuration files, avoiding recompilation and deployment when adjusting parameters. Maintenance personnel can adjust the duration and action combinations of each stage online without modifying the source code. The actuator receives the current execution phase (provided by the task gateway), triggers peripherals in parallel according to the timeline, and decouples from the movement of the robotic arm.

[0006] In response to the opening type I task, a perception request is sent to the visual perception module and the first mode code is locked within the configured waiting timeout period. A preset topology multi-way point sequence is generated based on the point cloud directional bounding box of the device to be processed and the parameterized process set. The local coordinate system of the oriented bounding box is determined by orthogonalizing the principal directions and the plane normals through principal component analysis of the capping point cloud; camera system P cam With local system P loc Satisfy P loc =R T (P) cam -o), P cam =RP loc +o; where the twelve-way point sequence in the local coordinate system includes, in sequence: initial alignment point, left-side down-raise-pull-back sequence, central axis transition alignment point, right-side down-raise-pull-back sequence, and its coordinates are explicitly given by the top band extreme value and process parameters.

[0007] In response to the cleaning task, after confirming the end-point tool index, a six-dimensional waypoint sequence that meets the quantity and timeliness thresholds is obtained, and a mating operation pose sequence is constructed based on tool length, process distance and safety back-off amount; A joint verification of the number of waypoints, reception time, and task type consistency is performed on the six-dimensional waypoint sequence, wherein the time threshold is read from the configuration parameters; Each six-dimensional waypoint is converted into an end effector pose, and after batch fusion and distribution, end point blocking confirmation is performed.

[0008] According to the above technical solution, during cleaning operations, the tool index is mapped to the fan or water pump, and the corresponding peripheral is turned on when the first point is reached and turned off when the last point is reached, based on the phase index; the peripheral is forcibly turned off when the task is canceled, paused or in an error state.

[0009] According to the above technical solution, the six-dimensional waypoints are generated by a visual perception operator chain, which includes, in sequence: instance segmentation operator, dual point cloud construction operator, plane fitting operator, trajectory generation operator scheduled by category or forced mode code, hand-eye rigid body transformation operator, and validity gating operator.

[0010] The specific process includes: performing instance segmentation on the input color image, depth map, and camera intrinsic parameters; outputting a semantic mask, an upsampled mask, and class confidence; reconstructing the point cloud based on the mask and depth map; outputting the original point cloud and the upsampled / filtered point cloud; mapping pixel information to 3D space; performing RANSAC plane fitting and normal orientation on the point cloud; outputting fitting parameters and unit normal vectors; and establishing a geometric reference for the target surface. Based on the target category / pattern code and geometric parameters, a six-dimensional waypoint sequence for the surface-fitting operation is generated in the camera coordinate system. The waypoint sequence in the camera coordinate system is transformed to the robot base coordinate system using a hand-eye calibration matrix, enabling the visual perception results to be executed by the robotic arm. Finally, a validity-gated predicate check is performed, and the final waypoint sequence is output to subsequent modules to drive subsequent pose construction and motion execution.

[0011] According to the above technical solution, the conversion of each six-dimensional waypoint into the end effector pose specifically includes: taking the opposite direction of the surface normal as the tool axis, taking the position difference between adjacent waypoints after orthogonalization as the forward direction, and calculating the unit quaternion from the three axes; wherein the tangent of the end waypoint is taken from the difference with the previous point, and when the tangent is nearly parallel to the axis, the backup axis degradation processing is enabled.

[0012] According to the above technical solution, the confirmation of end-point blocking after batch fusion and distribution specifically includes: distributing each intermediate point except the end point in a non-blocking manner with trajectory connection and without registering suspension; waiting for a fixed buffer write window after all intermediate points are published; distributing the end point in a non-connecting and blocking manner and registering a unique suspension action; and advancing the phase index to the trajectory endpoint in one go after the end point is completed.

[0013] According to the above technical solution, the batch fusion mode and the point-to-point mode are mutually exclusive through configuration parameters; in the point-to-point mode, the peripherals are triggered to turn on and off when the first and last points are in place, respectively; in the batch fusion mode, the peripherals are turned on before the operation starts and turned off after all operations are completed.

[0014] According to the above technical solution, it also includes tool crawling tasks, specifically: Based on the tool index, load the preset workstation pose and articulation points, and execute joint movements, retract the tool laterally along the workstation, align the workstation, activate the magnetic suction in a blocking manner, lift vertically and return to zero in a fixed sub-step sequence, and update the hand tool status flag and the index of the most recently grabbed tool.

[0015] According to the above technical solution, when the task queue simulation shows that the end already holds a tool, a placement task is automatically inserted before a new tool is grabbed.

[0016] According to the above technical solution, it also includes a tool placement task, specifically: After confirming that the end has a tool, select the workstation position according to the index of the most recently grabbed tool, and perform the following sub-steps that are symmetrical to and reversed from the grabbing process: lift, align, block the magnetic attraction, retract the tool and return to zero, and clear the status flag of the tool on hand.

[0017] According to the above technical solution, the cleaning operation trajectory can be obtained in real time from visual messages or from local trajectory file playback. Both sources use the same six-dimensional waypoint intermediate representation in the pose construction stage.

[0018] According to the above technical solution, during the tool grabbing and tool placement tasks, the magnetic attraction control uses a suspend action to block and wait for the result feedback, and determines failure when the command timeout threshold is exceeded.

[0019] A multi-task status management system for cleaning robots, comprising: a task gateway, a visual perception module, a trajectory planning module, a control execution module, a common module, and a peripheral linkage module; The task gateway receives external operation type codes, drives the finite state machine to flow, and realizes the start, pause, resumption, and termination of the cleaning robot's complex operation process. It can send instructions to the vision perception module, trajectory planning module, and peripheral linkage module based on the current state, collect execution status feedback from each module, and determine the next action. The vision perception module outputs six-dimensional waypoints with semantic tags based on computational processing. The trajectory planning module performs quantity verification, timeliness verification, and topological logic verification on the input six-dimensional waypoints, performs mathematical conversion from six-dimensional waypoints to seven-dimensional pose, and executes the surface distance formula and the complete calculation from the surface point to the tool center. The S-transformation converts spatial coordinates into operation commands with tool posture semantics. The control execution module receives the pose sequence generated by the trajectory planning module, issues motion commands to the motion device, realizes batch fusion issuance, and provides real-time feedback on the position, speed, and motion completion status of the motion device. The common module defines a global data structure, including operation type codes, a six-dimensional waypoint structure, and a seven-dimensional pose structure, and centrally manages all data thresholds. The peripheral linkage module receives the current phase signal from the task gateway, controls the fan and water pump according to predefined configurations, performs parameterized tool ID grabbing and placement, and handles magnetic blockage confirmation and timeout.

[0020] Compared with existing technologies, the beneficial effects of this invention are as follows: The pattern code output by the visual perception module of this invention is used to identify the target category and operation stage, and the waypoint sequence is accompanied by a topological predicate to mark its task type. The two are independent and cross-validated, eliminating semantic mismatch problems such as the misuse of the cover-opening trajectory for cleaning operations or the consumption of cleaning waypoints by the cover-opening process from the data contract level. Based on self-depth back-projection, mask set operation, dual point cloud construction, RANSAC plane fitting and normal orientation, to OBB local frame generation, each step is strictly defined in the form of set theory and linear algebra. All transformation matrices, projection equations and filtering predicates are fully disclosed. The system separates the scene point cloud and the target point cloud: the former is used for environment modeling and collision warning, and the latter is dedicated to the geometric reconstruction of the target surface. The normal orientation introduces consistency constraints, effectively suppressing ambiguity in plane fitting and significantly improving the numerical stability of the surface trajectory in the curved transition region. The peripheral phase linkage (fan / pump switching according to the cleaning stage) is incorporated into the timing scheduling, and the magnetic blockage confirmation and timeout judgment are incorporated into the tool state management. Both processes are handled in parallel through independent channels to avoid accidental triggering of peripheral actions during tool engagement, thus reducing system coupling. The six-dimensional waypoint is decoupled from the surface transformation and quaternion transformation at each stage, and the intermediate representation undergoes independent verification at each stage.

[0021] After all work processes (including abnormal interruptions) are terminated, the control execution module drives the robotic arm to return to the preset initial joint angle in a point-by-point mode, ensuring that the robot posture can be restored and the tool rack is accurately aligned, providing a definite starting condition for the next work cycle. Attached Figure Description

[0022] Figure 1 This is a schematic diagram illustrating the steps of the multi-task state management method applied to cleaning robots in this application; Figure 2 This is a timing diagram for the perception request-pattern locking-way point verification method applied to the multi-task state management method of cleaning robots in this application. Figure 3 This is a schematic diagram of the opening-type I twelve-way point topology of the multi-task state control method for cleaning robots applied in this application; Figure 4 This is a schematic diagram of the face-fitting pose and tool extension amount of the multi-task state management method applied to cleaning robots in this application; Figure 5 This is a diagram showing the relationship between the multi-point trajectory peripheral switch and the phase in the multi-task state control method for cleaning robots applied in this application; Figure 6 This is a state machine diagram of the grasping / placement sub-step in the multi-task state management method for cleaning robots applied in this application. Detailed Implementation

[0023] Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0024] Example: Figures 1-6 As shown, this invention takes toilet cleaning as an example and constructs the following process: The task finite state machine receives the operation type code, classifies the task into tool grabbing, tool placement, lid opening type I task or cleaning operation task and puts it into the queue. In response to the opening type I task, a perception request is sent to the visual perception module and the first mode code is locked within the configured waiting timeout period. A preset topology multi-way point sequence is generated based on the point cloud directional bounding box of the device to be processed and the parameterized process set. The first mode code is 98, and the expected number of waypoints for the open-lid type I is always 12; the expected number of waypoints for cleaning operations is greater than the preset minimum number of waypoints and is not equal to 6 or 12; the freshness threshold for open-lid waypoints is 0.8 seconds by default, the freshness threshold for waiting for operations is 1.5 seconds by default, the rejection threshold for expired operations is 0.5 seconds by default, and the timeout for open-lid / operation perception waiting is 12.0 seconds by default. Timeliness verification: Record the message timestamp as t msg Then opening the lid requires t now -t msg ≤ Opening waypoint freshness threshold; Job waiting requirement ≤ Job waiting stage waypoint freshness; Job initiation requirement ≤ Job initiation expiration rejection threshold.

[0025] The local coordinate system of the oriented bounding box is determined by orthogonalizing the principal directions and the plane normals through principal component analysis of the capping point cloud; camera system P cam With local system P loc Satisfy P loc =R T (P) cam -o), P cam =RP loc +o; where the twelve-way point sequence in the local coordinate system includes, in sequence: initial alignment point, left-side down-up-pull-back sequence, central axis transition alignment point, and right-side down-up-pull-back sequence. Its coordinates are explicitly given by the top band extrema and process parameters. An example of the twelve-way point process parameters and coordinates is as follows: Process parameters (unit: m): d=0.23, p=0.15, k=0.09, c=0.07, z h = 0.40, y pull =0.30. Local system with twelve points P0, ..., P... 11 : P0=(0, 0, d), P1=(x0-0.06, ymax , d), P2=(x0-0.06, y max , p), P3=(x0-0.03, y max , p), P4=(x0-0.03, y max , z h ), P5=(x0-0.03, y max -y pull , z h ), P6=(0, 0, d), P7=(x1+k, y max , d), P8=(x1+k, y max , p), P9=(x1+c, y max , p), P 10 =(x1+c, y max , z h ), P 11 =(x1+c, y max -y pull , z h ). Semantics: P0 center axis alignment → left side cap lifting P1 to P5 → center axis transition P6 → right side P7 to P 11 x0 is the x-coordinate of the left limit point; x1 is the x-coordinate of the right limit point; y max Refers to the global maximum y-coordinate.

[0026] In response to the cleaning task, after confirming the end-point tool index, a six-dimensional waypoint sequence that meets the quantity and timeliness thresholds is obtained, and a mating operation pose sequence is constructed based on tool length, process distance and safety back-off amount; Among them, the effective contact distance satisfies L eff =max(L min , L tool + L proc -δ), where L min The minimum safe contact distance is 0.02 meters in this example; the tool center position e satisfies e=p-L. eff z is the unit vector in the opposite direction of the surface normal, and p is the waypoint position.

[0027] The fan and pump control adopts non-blocking semantics, which does not wait for the result after the command is issued; the magnetic attraction control adopts blocking semantics, which waits for the result after the command is issued; the default command timeout threshold is 20.0 seconds; the default dwell time after successful magnetic attraction is 0.5 seconds.

[0028] Real-time distribution of cleaning operation trajectories supports batch fusion mode: All intermediate points except the final point are connected by a trajectory and distributed in a non-blocking manner without registration or suspension; after all intermediate points have been distributed, wait... A fixed buffer write window is used, with a default window size of 10 milliseconds; a unique suspend action is issued and registered for the endpoint in a connectionless and blocking manner. After the final point is completed, advance the phase index to the trajectory endpoint in one go. A joint verification of the number of waypoints, reception time, and task type consistency is performed on the six-dimensional waypoint sequence, wherein the time threshold is read from the configuration parameters; Each six-dimensional waypoint is converted into an end effector pose, and after batch fusion and distribution, end point blocking confirmation is performed.

[0029] The six-dimensional waypoints are generated by a visual perception operator chain, which includes, in sequence: instance segmentation operator, dual point cloud construction operator, plane fitting operator, trajectory generation operator scheduled by category or forced pattern code, hand-eye rigid body transformation operator, and validity gating operator.

[0030] In this process, instance segmentation selects the preferred class mask based on the priority of seat ring, cover, edge, and basin; the full instance union mask is set when the pixel response is satisfied and greater than a preset threshold; the full mask point cloud is used for cleaning trajectory, and the preferred class point cloud is used for plane fitting and cover opening trajectory; the cover opening type I forced mode code is 98 and the number of path points is 12, and the cover opening forced mode code is 99 and the number of path points is 6. When the two conflict, 98 takes priority; among them, cover opening type I is the real-time vision mode; the cover opening forced mode is the teaching mode, so it can be specified by the user according to the specific scenario.

[0031] The cover trajectory is a planar grid serpentine scan with a fixed local height. The seat / along trajectory is a skeletonized closed loop with a lateral pixel offset applied. The basin trajectory is a multi-layer concentric etched ring with the local height of the j-th ring adjusted according to z. L (j) = h - jΔh decreases; the six-point trajectory of the open lid is formed by a fixed preparatory segment and the global minimum x-coordinate x. min Global maximum x-coordinate max The global maximum y-coordinate max The adaptive segment composition and specific data processing are shown in the examples below.

[0032] Hand-eye transformation satisfies T base←cam =T base←ee T ee←camPosition is transformed by rotation and translation, while the normal is rotated only and then normalized; visual gating includes predicates for mask pixel count, in-plane point count, and normal validity; base gating includes predicates for workspace box, angle between normal and vertical, and color field projection; waypoints are locked and latched when consecutive frame jumps do not exceed a threshold. The process of converting each six-dimensional waypoint into the end effector pose specifically includes: using the opposite direction of the surface normal as the tool axis, orthogonalizing the position difference between adjacent waypoints as the forward direction, and calculating the unit quaternion from the three axes; wherein the tangent of the end waypoint is taken from the difference with the previous point, and when the tangent is nearly parallel to the axis, the backup axis degradation processing is enabled.

[0033] The specific operating procedures include: Instance segmentation is performed on the input color image, depth map, and camera intrinsic parameters. The semantic mask, upsampled mask, and class confidence are output. Point cloud reconstruction is performed based on the mask and depth map. The original point cloud and the upsampled / filtered point cloud are output. Pixel information is mapped to 3D space. RANSAC plane fitting and normal orientation are performed on the point cloud. The fitting parameters and unit normal vector are output to establish a geometric reference for the target surface.

[0034] When the depth map resolution is inconsistent with the CameraInfo reference resolution, the intrinsic parameter matrix is ​​scaled. Let the soft mask of the j-th instance be... ∈[0,1], category c j ∈C cls Define a hard union mask (threshold of 0.8), then:

[0035] Category priority order (when there are multiple categories in the same frame): seat ring (1), cover (0), edge (6), basin (7).

[0036] Take the first instance mask that satisfies the highest priority as M up The corresponding category is denoted as c. * Morphological erosion (structural element B is 7×7 all-1 core, 1 iteration).

[0037]

[0038] Then, align the mask to the depth resolution using nearest neighbor interpolation:

[0039] in, Similarly.

[0040] Let the type I open lid / open lid request indication function be: The duration window is 8.0 s, and the effective categories are... :

[0041] When activating an open request, locking snapshot traces is prohibited, and the publication must meet the Validation requirement. 98 Or Valid 99 .

[0042] For pixels Depth scale For 1000 (mm→m), pinhole back projection:

[0043]

[0044]

[0045]

[0046] Define a two-point cloud: ; .

[0047] Radius outlier removal is performed, meaning that point r must have more than or equal to 200 neighbors in its spherical neighborhood B(r,ρ) (default ρ = 0.05 m), otherwise it is deleted.

[0048] in, Specifically designed for plane fitting and lid opening trajectory; Provides a cleaning trajectory, forming a "dual-surface" path.

[0049] exist Estimated point cloud mean normal RANSAC fitting plane The distance threshold is 0.01 m, the minimum number of interior points is 10, and the iteration count is N. ransac = 1000. Signed distance from a point to the plane: The interior point set is represented as: ; Make the plane normal and the point cloud average normal oriented in the same direction, and ensure that the z-component of the camera system is less than or equal to 0 (pointing towards the camera side). The unit normal further constrains the camera system normal component to be non-positive.

[0050] Downsampling of projected point cloud voxels, voxel side length v:

[0051] Based on planar projection and PCA, an OBB local frame is constructed, and the local coordinates are mapped to a binary raster to record the foreground set.

[0052] Based on different parts of the toilet, a part-adaptive trajectory generator is displayed: The cover is serpentine (c = 0), for After morphological processing, the outer contour convex hull CH is taken. Scan along the grid x with a step size ∆ = 6 pixels; for the valid y interval of the kth column. The upper and lower boundary pixels are taken alternately for odd and even values ​​to form a polyline, and the end point returns to the starting row.

[0053] Seat ring / along the skeleton ring (c ∈ {1, 6}), for Skeletalization Skel ( Then take the convex hull closed loop CH(Skel( Apply a pixel offset of (0, +10) (approximately +50 mm) to avoid the cover edge, and close the loop to make the beginning and end meet.

[0054] Multiple concentric rings within the basin (c = 7), let 0 = CH( The outermost ring is formed by repeated erosion of the filling region. j+1 = j ⊖ B10 (10 × 10 cores). Stop condition: The local height of the j-th ring is h. clean -jΔh, where Δh = 0.04 m; each ring is connected in series to form a single trajectory.

[0055] In this embodiment, it also includes: Validity gated predicate; memorization Count pixels. Visual layer (default threshold): g1: c is defined; g2: |M|≥NM, NM=500; g3: |M up |≥N up , ; g4: Interior set ≥ 100, g5: ; (Unit normal) component is finite; g6: N≥1∧ i, p i ,n i limited; Base layer: Workspace box B = [-1, 1] × [-1, 1] × [0, 1.5] (m); g7: i, ; The direction of the law and the downward world e g =(0, 0, -1) T included angle g8: i, arccos(clip( *e g , -1, 1))≤θ max , θ max = 45°; Color field projection: p cam = R T (p base -t),

[0056]

[0057] Where z is greater than 10 -5 ; g9: i, 0≤u i <W d ∧0≤v i <H d ; If any point crosses the boundary, the entire trajectory is rejected: master gating. ; W is published only when g = 1 pub =W base .

[0058] In this embodiment, it also includes: locking, switching, and trajectory latching; Let q be the candidate representative point of the Lth frame. L (e.g., capturing a reference point or trajectory centroid). Locking condition: Three consecutive frames must satisfy the following:

[0059] If 5 consecutive frames fail, the system enters a lost state. When freeze_waypoints_on_lock is true and the system is in a locked / tracked state: W pub (t) ← W latch ; Among them W latch A snapshot of the base waypoint at the moment of locking; the latch is disabled during the opening request activation, allowing real-time recalculation by mode code 98 / 99.

[0060] This embodiment also includes: generating a six-dimensional waypoint sequence for the surface-fitting operation in the camera coordinate system based on the target category / pattern code and geometric parameters. The waypoint sequence in the camera coordinate system is transformed to the robot base coordinate system using a hand-eye calibration matrix, enabling the visual perception results to be executed by the robotic arm. Finally, a validity-gated predicate check is performed, and the final waypoint sequence is output to subsequent modules to drive subsequent pose construction and motion execution.

[0061] The process of confirming the blocking of the final path point after batch fusion distribution specifically includes: distributing all intermediate points except the final path point in a non-blocking manner with trajectory connections and without registering a suspension; waiting for a fixed buffer write window after all intermediate points have been distributed; distributing the final path point in a non-connecting and blocking manner and registering a unique suspension action; and advancing the phase index to the trajectory endpoint in one go after the final path point is completed. Batch fusion mode and point-by-point mode are mutually exclusive through configuration parameters; in point-by-point mode, peripherals are triggered to turn on and off when the first and final path points are in place, respectively; in batch fusion mode, peripherals are turned on before the job starts and turned off after all jobs are completed.

[0062] The embodiment also includes: a tool-grabbing task, specifically: Based on the tool index, load the preset workstation pose and articulation points, and execute joint movements, retract the tool laterally along the workstation, align the workstation, activate the magnetic suction in a blocking manner, lift vertically and return to zero in a fixed sub-step sequence, and update the hand tool status flag and the index of the most recently grabbed tool.

[0063] When the task queue deduction shows that the end already holds a tool, the placement task is automatically inserted before grabbing a new tool.

[0064] The embodiment also includes: a tool placement task, specifically: After confirming that the end has a tool, select the workstation position according to the index of the most recently grabbed tool, and perform the following sub-steps that are symmetrical to and reversed from the grabbing process: lift, align, block the magnetic attraction, retract the tool and return to zero, and clear the status flag of the tool on hand.

[0065] The cleaning operation trajectory can be obtained in real time from visual messages or from local trajectory file playback. Both sources use the same six-dimensional waypoint intermediate representation during the pose construction stage.

[0066] The embodiment also includes: during the tool grabbing and tool placement tasks, the magnetic suction control uses a suspend action to block and wait for the result feedback, and determines failure when the command timeout threshold is exceeded. The Cartesian target pose for grabbing and placement is calculated at runtime by superimposing the preset seven-dimensional pose of the workstation with configurable lateral feed offset and vertical lift offset, and the attitude quaternion keeps the workstation parameters unchanged.

[0067] The embodiment also includes: the task gateway polls the input every 50 control cycles, consumes the task queue in the idle state, and advances the phase index mutually exclusively based on the suspension action and the arrival determination in the running state.

[0068] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A multi-task state management method applied to cleaning robots, characterized in that: The method includes: The task finite state machine receives the operation type code, classifies the task into tool grabbing, tool placement, lid opening type I task or cleaning operation task and puts it into the queue. In response to the opening type I task, a perception request is sent to the visual perception module and the first mode code is locked within the configured waiting timeout period. A preset topology multi-way point sequence is generated based on the point cloud directional bounding box of the device to be processed and the parameterized process set. In response to the cleaning task, after confirming the end-effector tool index, a specified number of waypoints are generated based on the target area, these waypoints are sorted sequentially, and a mating operation pose sequence is constructed based on tool length, process distance, and safety back-off amount. Perform joint verification of the consistency of the number of waypoints, reception time, and task type for the six-dimensional waypoint sequence; Each six-dimensional waypoint is converted into an end effector pose, and after batch fusion and distribution, end point blocking confirmation is performed.

2. The multi-task state management method for cleaning robots according to claim 1, characterized in that: During cleaning tasks, the tool index is mapped to the fan or water pump, and the corresponding peripheral is turned on when the first point is reached and turned off when the last point is reached, based on the phase index; the peripheral is forcibly turned off when the task is canceled, paused or in an error state.

3. The multi-task state management method for cleaning robots according to claim 1, characterized in that: The six-dimensional waypoints are generated by a visual perception operator chain, which includes, in sequence: an instance segmentation operator, a dual point cloud construction operator, a plane fitting operator, a trajectory generation operator scheduled by category or forced pattern code, a hand-eye rigid body transformation operator, and an effectiveness gating operator.

4. The multi-task state management method for cleaning robots according to claim 1 or 3, characterized in that: The process of converting each six-dimensional waypoint into the end effector pose specifically includes: using the opposite direction of the surface normal as the tool axis, orthogonalizing the position difference between adjacent waypoints as the forward direction, and calculating the unit quaternion from the three axes; wherein the tangent of the end waypoint is taken from the difference with the previous point, and when the tangent is nearly parallel to the axis, the backup axis degradation processing is enabled.

5. The multi-task state management method for cleaning robots according to claim 1, characterized in that: The process of confirming the blocking of the final point after batch fusion and distribution specifically includes: distributing each intermediate point except the final point in a non-blocking manner with trajectory connection and without registering a suspension; waiting for a fixed buffer write window after all intermediate points have been distributed; distributing the final point in a non-connecting and blocking manner and registering a unique suspension action; and advancing the phase index to the trajectory endpoint in one go after the final point is completed.

6. The multi-task state management method for cleaning robots according to claim 1 or 2, characterized in that: Batch fusion mode and point-by-point mode are enabled mutually exclusively through configuration parameters; in point-by-point mode, peripherals are triggered to turn on and off when the first and last points are in place, respectively; in batch fusion mode, peripherals are turned on before the job starts and turned off after all jobs are completed.

7. The multi-task state management method for cleaning robots according to claim 1, characterized in that: This also includes tool-based data scraping tasks, specifically: Based on the tool index, load the preset workstation pose and articulation points, and execute joint movements, retract the tool laterally along the workstation, align the workstation, activate the magnetic suction in a blocking manner, lift vertically and return to zero in a fixed sub-step sequence, and update the hand tool status flag and the index of the most recently grabbed tool.

8. The multi-task state management method for cleaning robots according to claim 1 or 7, characterized in that: When the task queue deduction shows that the end already holds a tool, the placement task is automatically inserted before grabbing a new tool.

9. The multi-task state management method for cleaning robots according to claim 1, characterized in that: This also includes tool placement tasks, specifically: After confirming that the end has a tool, select the workstation position according to the index of the most recently grabbed tool, and perform the following sub-steps that are symmetrical to and reversed from the grabbing process: lift, align, block the magnetic attraction, retract the tool and return to zero, and clear the status flag of the tool on hand.

10. The multi-task state management method for cleaning robots according to claim 1 or 9, characterized in that: The cleaning operation trajectory can be obtained in real time from visual messages or from local trajectory file playback. Both sources use the same six-dimensional waypoint intermediate representation during the pose construction stage.

11. The multi-task state management method for cleaning robots according to claim 1, characterized in that: During the tool grabbing and tool placement tasks, the magnetic control uses a suspend action to block and wait for the result feedback, and determines failure when the command timeout threshold is exceeded.

12. A multi-task state management system for cleaning robots, used to implement the multi-task state management method for cleaning robots as described in claim 1, characterized in that: The system includes: a task gateway, a visual perception module, a trajectory planning module, a control execution module, a common module, and a peripheral linkage module; The task gateway receives external operation type codes, drives the finite state machine to flow, and realizes the start, pause, resumption, and termination of the cleaning robot's complex operation process. It can send instructions to the vision perception module, trajectory planning module, and peripheral linkage module based on the current state, collect execution status feedback from each module, and determine the next action. The vision perception module outputs six-dimensional waypoints with semantic tags based on computational processing. The trajectory planning module performs quantity verification, timeliness verification, and topological logic verification on the input six-dimensional waypoints, performs mathematical conversion from six-dimensional waypoints to seven-dimensional pose, and executes the surface distance formula and the complete calculation from the surface point to the tool center. The S-transformation converts spatial coordinates into operation commands with tool posture semantics. The control execution module receives the pose sequence generated by the trajectory planning module, issues motion commands to the motion device, realizes batch fusion issuance, and provides real-time feedback on the position, speed, and motion completion status of the motion device. The common module defines a global data structure, including operation type codes, a six-dimensional waypoint structure, and a seven-dimensional pose structure, and centrally manages all data thresholds. The peripheral linkage module receives the current phase signal from the task gateway, controls the fan and water pump according to predefined configurations, performs parameterized tool ID grabbing and placement, and handles magnetic blockage confirmation and timeout.