Task recording and playback method and system for unmanned surface vehicle based on double-constraint simplification
By adopting a dual-constraint, real-time simplified method for recording and playing back unmanned surface vessels (USVs), the problems of complex operation, insufficient real-time trajectory optimization, and multi-vessel collaborative management are solved. This method simplifies operation, enables precise work, and allows for real-time monitoring of multiple USVs, all at a low hardware cost.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BLUEWATER PIONEER (DALIAN) INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2026-02-08
- Publication Date
- 2026-05-05
AI Technical Summary
Existing automated operation methods for unmanned surface vessels are complex to operate, lack real-time trajectory optimization, are prone to losing key operation nodes, and are difficult to manage in a collaborative manner among multiple vessels.
The system adopts a task recording and playback method based on real-time simplification of dual constraints. Through a hierarchical decision-making mechanism of business state constraints and geometric constraints, waypoints are optimized in real time. Combined with remote controller teaching and real-time simplification algorithms, the system simplifies operation steps while retaining key operation nodes, and supports multi-vessel collaborative management.
It significantly reduces operational complexity, decreases the number of redundant waypoints, achieves high-precision path tracking and accurate reproduction of operational status, supports real-time monitoring and management of multiple vessels, and has a hardware cost lower than industrial-grade teaching equipment.
Smart Images

Figure CN121979221A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aquaculture equipment control technology, specifically to an automatic task execution method for unmanned surface vessels. Background Technology
[0002] In the field of unmanned surface vessel (USV) technology for aquaculture, existing automated operation methods mainly fall into the following two categories: I. Automatic Navigation Methods Based on Pre-planned Routes This type of method requires users to manually mark waypoint coordinates on ground station software or electronic maps, generate the operational path, and then import it into the unmanned surface vessel for execution. However, this method has the following technical drawbacks: 1. High operational complexity: Operators need to be proficient in map software operation and latitude and longitude coordinate annotation, which requires a high level of professional knowledge from farmers; 2. Poor environmental adaptability: For irregularly shaped aquaculture ponds, it is difficult to accurately plan navigation routes that conform to the actual shoreline; 3. Difficulty in dynamic adjustment: When the position of obstacles in the aquaculture environment changes, the flight path needs to be replanned and edited, which lacks flexibility.
[0003] II. Existing teaching recording methods based on real-time sampling employ either sampling GPS coordinates at fixed time intervals (e.g., every second or every two seconds) to generate waypoint sequences, or post-processing methods that first record the raw data completely and then perform geometric optimization (e.g., the Douglas-Peucker algorithm) after recording. These methods have the following technical drawbacks: 1. Data redundancy and missing key information coexist: Fixed-interval sampling generates a large number of redundant waypoints during straight navigation, while important waypoints may be missed due to sampling intervals at key locations such as turns; the post-processing optimization algorithm is based solely on geometric distance judgment and cannot identify business semantics such as changes in the status of operating equipment, which can easily lead to the erroneous deletion of key nodes such as feeding status switching, resulting in distortion of the operation process during automatic playback. 2. Insufficient real-time performance: Post-processing optimization requires batch calculations after recording, with a time complexity of O(n²). Processing hundreds of waypoints on embedded devices takes several seconds to several minutes, and operators cannot know the optimized waypoint distribution in real time during the recording process. 3. Limited collaborative management capabilities: The post-processing mode cannot synchronize the optimized waypoints to the remote management terminal in real time, making it difficult to support the parallel monitoring and unified management of multiple unmanned surface vessels.
[0004] Furthermore, teach pendant methods in industrial automation (such as robot teach pendants) employ a jog-record-jog mode, achieving millimeter-level positioning accuracy and suitable for fixed workspaces. In contrast, unmanned surface vessels (USVs) rely on GPS positioning with an accuracy of 2-5 meters, and are susceptible to interference from water flow, wind, and other environmental factors, making precise hovering impossible. Therefore, the aforementioned industrial teach pendant methods are difficult to directly apply to USV scenarios. Consequently, there is an urgent need for a simple-to-operate method for recording and replaying USV missions that can optimize trajectories in real time, retain key operational nodes, and support multi-vessel collaborative management. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to overcome the technical defects of the prior art, such as complex operation, insufficient real-time trajectory optimization, easy loss of key operation nodes and difficulty in multi-vessel collaborative management, and to provide a method and system for recording and playing back unmanned surface vessels in real time based on dual constraints.
[0006] This invention provides a real-time simplified method for recording and playing back unmanned surface vessels (USVs) missions based on dual constraints. The dual constraints include operational state constraints and geometric constraints, with the operational state constraints having a higher priority than the geometric constraints. The method includes the following steps: Establish a dual-constraint judgment mechanism, setting business status constraints and geometric constraints; During the teaching recording stage: Step S1: Receive the recording command, enter the recording mode, and initialize the task data structure; Step S2: Collect the position coordinates and operating equipment status of the unmanned surface vessel at fixed intervals to construct candidate waypoints C; Step S3: Determine the number of stored waypoints. If it is less than 2, store the candidate waypoint C as waypoint A and return to step S2. If it is greater than or equal to 2, extract the second-to-last stored waypoint A and the last waypoint B, and form a three-point sequence with the candidate waypoint C. Then execute step S4. Step S4: Perform business status constraint determination: If the operating equipment status of waypoint B is different from that of waypoint A, then waypoint B is determined to be a critical business node, and step S6 is executed; if they are the same, then step S5 is executed. Step S5: Perform geometric constraint determination: Calculate the heading angle changes from waypoint A to B and from waypoint B to C, as well as the spatial distance from waypoint A to C; when the heading angle change exceeds a first threshold or the spatial distance exceeds a second threshold, determine that waypoint B is a geometrically critical point and proceed to step S6; otherwise, determine that waypoint B is a redundant point and proceed to step S7. Step S6: Retain waypoint B, append candidate waypoint C to the storage, and send a new message to the remote management terminal; Step S7: Replace waypoint B with candidate waypoint C, keeping the total number of waypoints unchanged, and send a replacement message to the remote management terminal; Step S8: Determine whether a stop recording command has been received. If yes, proceed to step S9; otherwise, return to step S2. Step S9: Save the optimized waypoint sequence to local storage and upload it to the cloud server via communication protocol; During the mission replay phase: Step S10: Receive the task execution instruction and load the optimized waypoint sequence; Step S11: Calculate the azimuth and distance based on the current position coordinates and the target waypoint coordinates, adjust the heading and speed through the PID control algorithm, and automatically navigate to the target waypoint; Step S12: When arriving at a waypoint marked with a change in the status of the working equipment, automatically perform the corresponding equipment status switching operation; Step S13: Traverse all waypoints in sequence until the mission is completed.
[0007] The business status constraint refers to the forced retention of waypoints based on changes in the working status of the operating equipment; the geometric constraint refers to the determination of the geometric necessity of waypoints based on changes in heading angle and spatial distance.
[0008] The step of sending a replacement message to the remote management terminal includes sending a replacement message containing the index of the waypoint to be replaced, the coordinates of the candidate waypoints, and the status of the operating equipment via the MQTT protocol, so that the remote management terminal can synchronously update the corresponding waypoint data instead of adding new waypoints.
[0009] This invention also provides a dual-constraint, real-time simplified unmanned surface vessel mission recording and playback system, comprising: The trajectory acquisition module, configured on the end of the unmanned surface vessel, is used to periodically collect position coordinates and the status of operating equipment; The dual-constraint decision module, configured on the unmanned surface vessel, is used to extract the three most recent waypoints and sequentially perform business state constraint decision and geometric constraint decision. The waypoint management module is configured on the unmanned surface vessel and connected to the dual-constraint judgment module. It is used to perform waypoint replacement or addition operations according to the judgment result and send the corresponding replacement message or addition message to the remote management terminal through the communication protocol. The task storage module, configured on the unmanned surface vessel and connected to the waypoint management module, is used to persistently store the optimized waypoint sequence; An automatic execution module, configured on the end of the unmanned surface vessel, is used to perform automatic navigation and control the status of operating equipment based on a simplified waypoint sequence; The cloud collaboration module is configured on the cloud server and remote management terminal. It communicates with the waypoint management module through a communication protocol to receive real-time messages, update the map display, and issue task execution instructions. Beneficial effects
[0010] Compared with the prior art, the present invention has the following technical effects: This invention combines remote control manual teaching with a real-time simplification algorithm to simplify the operation steps from multiple steps in the traditional route planning method to three steps: start recording, manual driving, and stop recording. This significantly reduces the complexity of operation and eliminates the need for professional map planning software operation skills. By adopting a hierarchical decision-making mechanism based on business status constraints and geometric constraints, the number of redundant waypoints is effectively reduced, and the amount of data storage and communication bandwidth consumption is reduced, while ensuring that no changes in the status of the operating equipment are missed. By using a real-time message replacement mechanism, waypoint optimization and cloud data updates are completed simultaneously during the recording process, enabling real-time monitoring of the recording process of multiple unmanned surface vessels by the remote management terminal and supporting multi-task parallel management. Automatic playback based on the simplified waypoint sequence, combined with the PID heading control algorithm, achieves high-precision path tracking and accurate reproduction of the status of operating equipment. The track deviation can be controlled within 1 meter, and the timing of switching of operating status is accurate. The method of this invention can run on a low-cost embedded platform, with a constant-order algorithm complexity and a single calculation time of less than 5 milliseconds. The hardware cost is significantly lower than that of industrial-grade teaching devices. Attached Figure Description
[0011] Figure 1 The diagram shows the overall system architecture of the present invention, illustrating the communication topology of the unmanned surface vessel (100), remote controller (300), cloud server (400), and remote management terminal (500); the unmanned surface vessel (100) includes a main control module (101), a GPS positioning module (102), an electronic compass module (103), a motor drive module (104), an operating equipment control module (105), and a communication module (107). Figure 2 The flowchart for the task recording phase shows the processing flow of starting recording, manual teaching, real-time simplification and optimization of double constraints, and stopping recording, as well as the timing of sending replacement messages and new messages; Figure 3 The flowchart for the task playback execution phase shows the processing flow of task loading, automatic navigation execution, work equipment status control, and remote control takeover. Figure 4 The flowchart of the real-time simplified algorithm for dual constraints shows the decision logic for business state constraint judgment and geometric constraint judgment, as well as the branch processing for waypoint replacement and addition. Figure 5 The real-time replacement message mechanism timing diagram shows the message interaction timing between the onboard terminal (100), the MQTT server (400), and the remote management terminal (500); Figure 6The diagram illustrates the optimization effect of waypoints, showing the distribution relationship between the fixed-interval sampling trajectory, the trajectory optimized by the dual-constraint algorithm of this invention, and the actual playback trajectory. The fixed-interval sampling trajectory represents the original teaching trajectory with dense scattered points, the dual-constraint algorithm optimized trajectory represents the simplified key waypoints with sparse markers, and the actual playback trajectory represents the actual navigation path during the automatic execution phase with dashed lines. The diagram also shows the location markers of the start point, end point, and operation status switching points (start baiting, end baiting).
[0012] Figure 7 This is a block diagram of the onboard hardware connection, showing the electrical connection topology and power supply relationship of the main control unit, remote control receiver unit, positioning unit, motor drive unit, relay control unit, and operating equipment. The main control unit is connected to the relay module through a digital output interface to control the baiting machine and status indicator lights, and is connected to the remote control receiver and GPS module through a UART interface. It is connected to the motor drive board through a PWM interface and a level conversion module. The power supply unit uses a 12V battery with multiple voltage reduction stages to power the propulsion motor, control circuit, and communication module. Figure 8 This is a schematic diagram of the remote management interface, showing the layout of the map display area, waypoint list area, recording control area, task management area, and status indicator area. The map display area is used to overlay and display the real-time position, teaching trajectory, and waypoint markers of the unmanned surface vessel. The waypoint list area is used to display the coordinates, operational status, and simplified markers of each waypoint. The recording control area includes start recording, stop recording, and emergency takeover buttons. The status indicator area is used to display the local and cloud data synchronization status, network signal strength, and remote controller online status. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to specific embodiments. Example 1
[0014] This embodiment provides a dual-constraint real-time simplified unmanned surface vessel mission recording system, including a main control module, a positioning module, a heading perception module, a remote control receiving module, a motor drive module, a task execution module, and a communication module.
[0015] The main control module uses an ESP32 series or equivalent embedded processor with a main frequency of 240MHz, and is equipped with 512KB RAM and 16MB Flash memory for running control algorithms and storing task data.
[0016] The positioning module uses a satellite positioning module that supports both GPS and BeiDou dual-mode positioning, with a positioning accuracy of 2.5 meters and an update frequency of 1Hz. It communicates with the main control module via a UART interface.
[0017] The heading sensing module uses a three-axis magnetometer with a heading accuracy of ±2 degrees and is connected to the main control module via an I2C interface.
[0018] The remote control receiver module uses a 2.4GHz wireless communication protocol, supports CRSF or SBUS protocols, and has a latency of less than 10 milliseconds.
[0019] The motor drive module includes a brushless ESC and a digital servo motor, which are connected to the main control module via PWM signals.
[0020] The job execution module includes a relay unit for controlling the status of the work equipment.
[0021] The power management module is used for voltage conversion and power management.
[0022] The above hardware configuration is only one implementation of the present invention, and those skilled in the art can choose alternative hardware with equivalent functions according to actual needs.
[0023] The system software adopts a modular design, including a task recording module, a dual-constraint judgment module, a waypoint management module, an automatic execution module, and a communication module. Each module runs on an embedded real-time operating system or a bare-metal environment, and achieves data interaction through function calls.
[0024] The dual-constraint real-time simplification algorithm is based on the following mathematical principle: For three consecutive GPS sampling points A, B, and C, first determine whether point B is a point of change in business status. If so, it is forcibly retained; otherwise, calculate the change in heading angle and distance span. If the change in heading angle is less than the threshold and the distance span is less than the threshold, then point B is determined to be a redundant point and point B is replaced by point C.
[0025] The specific determination process is as follows: (1) Calculate the coordinates and operational status of candidate waypoint C; (2) Extract the second-to-last waypoint A and the last waypoint B that have been stored; (3) Determine whether the operational status of waypoint B is the same as that of waypoint A. If they are different, retain waypoint B. (4) If they are the same, calculate the change in heading angle from waypoint A to B and from waypoint B to C, as well as the spatial distance from waypoint A to C; (5) If the heading angle changes beyond the first threshold or the spatial distance exceeds the second threshold, then waypoint B is retained; otherwise, waypoint C is used to replace waypoint B.
[0026] A field test was conducted at a pond aquaculture farm with an area of approximately 2000 square meters. The test results showed that for an 8-minute and 35-second recording task, a fixed 1-second sampling generated 515 waypoints. After optimization using the dual-constraint algorithm of this invention, this was reduced to 78 waypoints, achieving an optimization rate of 84.9%. All six operation state switching points were retained. During playback, the average trajectory deviation was 0.9 meters, and the operation state switching timing was accurate.
[0027] The multi-vessel parallel management test showed that one operator can simultaneously monitor the recording tasks of 6 unmanned vessels through a remote management terminal, and the total time for the 6 unmanned vessels to complete the recording at the same time is 12 minutes. Example 2
[0028] This embodiment describes the implementation of the remote management terminal. The remote management terminal runs on a mobile terminal and communicates with the unmanned surface vessel via the MQTT protocol.
[0029] The remote management terminal includes a map display module, a task management module, and a real-time status monitoring module. The map display module is used to display the current position and waypoint trajectory of the unmanned surface vessel; the task management module is used to store, select, and issue task commands; and the real-time status monitoring module is used to receive and display the number of waypoints, optimization rate, and recording progress.
[0030] The remote management terminal receives waypoint data reported by the onboard controller by subscribing to MQTT topics: when a new waypoint message is received, a marker is added to the corresponding location on the map; when a waypoint replacement message is received, the waypoint position of the specified index is updated.
[0031] Operators can monitor the recording tasks of multiple unmanned surface vessels simultaneously through a remote management terminal and switch between the unmanned surface vessels to view their real-time status.
Claims
1. A method for recording and playing back unmanned surface vessels (USVs) missions in real time based on dual constraints, characterized in that, include: A dual-constraint decision mechanism is established, wherein the dual constraints include business state constraints and geometric constraints, and the priority of the business state constraints is higher than that of the geometric constraints. During the teaching and recording phase, the position coordinates and operational equipment status of the unmanned surface vessel are collected at fixed intervals to construct candidate waypoints. When the number of stored waypoints is greater than or equal to 2, extract the second-to-last waypoint A, the last waypoint B, and the candidate waypoint C, and perform the following determinations in sequence: If the status of the operating equipment at waypoint B is different from that at waypoint A, then waypoint B is determined to be a critical business node and is forcibly retained, and geometric constraint determination is no longer performed. If the operating equipment is in the same state, calculate the change in heading angle from waypoint A to B and from waypoint B to C, as well as the spatial distance from waypoint A to C; when the change in heading angle exceeds a first threshold or the spatial distance exceeds a second threshold, determine waypoint B as a geometric key point and retain it; Otherwise, waypoint B is considered a redundant point; Waypoint management is performed based on the determination results: when a point is determined to be redundant, waypoint B is replaced with candidate waypoint C, keeping the total number of waypoints unchanged, and a replacement message is sent to the remote management terminal; when a point is determined to be a critical business node or geometric critical point, candidate waypoint C is added to the storage, and an addition message is sent to the remote management terminal. During the mission replay phase, automatic navigation is performed based on the simplified waypoint sequence, and when a waypoint marked with a change in the status of the operating equipment is reached, the corresponding equipment status switching operation is automatically executed.
2. The method according to claim 1, characterized in that, The operational status constraint refers to the forced retention of waypoints based on changes in the working status of the operating equipment; the geometric constraint refers to the determination of the geometric necessity of waypoints based on changes in heading angle and spatial distance.
3. The method according to claim 1, characterized in that, Sending a replacement message to the remote management terminal includes sending a replacement message containing the index of the waypoint to be replaced, the coordinates of the candidate waypoints, and the status of the operating equipment via the MQTT protocol, so that the remote management terminal can synchronously update the corresponding waypoint data instead of adding a new waypoint.
4. The method according to claim 1, characterized in that, The method also includes multi-task cloud collaborative management: waypoint data during the recording process is uploaded to the cloud server in real time via the MQTT protocol, supporting the storage of multiple tasks on a single vessel and the cloud sharing of task libraries across multiple vessels; the remote management terminal can simultaneously monitor the recording progress and task execution status of multiple unmanned vessels.
5. The method according to claim 1, characterized in that, The automatic navigation includes: calculating the azimuth and distance based on the current position coordinates and the target waypoint coordinates, adjusting the heading and speed through a PID control algorithm, and determining arrival and switching to the next waypoint when the distance to the target waypoint is less than the arrival threshold.
6. A real-time simplified mission recording and playback system for unmanned surface vessels based on dual constraints, characterized in that, include: The trajectory acquisition module, configured on the end of the unmanned surface vessel, is used to periodically collect position coordinates and the status of operating equipment; The dual-constraint decision module, configured on the unmanned surface vessel, is used to establish a sliding window to extract the three most recent waypoints and sequentially perform business state constraint decision and geometric constraint decision. The waypoint management module, configured on the unmanned surface vessel, is connected to the dual-constraint judgment module. It is used to perform waypoint replacement or addition operations based on the judgment result, and send the corresponding replacement message or addition message to the remote management terminal via the MQTT protocol. The task storage module, configured on the unmanned surface vessel and connected to the waypoint management module, is used to persistently store the optimized waypoint sequence; An automatic execution module, configured on the end of the unmanned surface vessel, is used to perform automatic navigation and control the status of operating equipment based on a simplified waypoint sequence; The cloud collaboration module is configured on the cloud server and remote management terminal. It communicates with the waypoint management module via the MQTT protocol to receive real-time messages, update the map display, and issue task execution instructions.