Water surface garbage cleaning unmanned ship simulation method and system
Patent Information
- Application Number
- CN202610788765.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-03
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2046-06-03
AI Technical Summary
Existing unmanned surface vessel simulation technology lacks a closed-loop algorithm verification system integrating perception, mapping, planning, and control for garbage collection tasks. This results in problems such as sensor perception results being difficult to directly use for map updates and path planning, inconsistencies between 3D perception results and 2D navigation maps, and a lack of unified experimental index statistics and evaluation mechanisms, leading to complex, costly, and inefficient simulation experiments.
A simulation method and system for unmanned surface garbage cleaning vessels were constructed. The ROS2 system was used to establish a sensor data link, and multi-source sensor data was processed through a unified TF coordinate relationship to generate a 3D point cloud map and convert it into a 2D map. A coverage-based planning path was generated, and the vessel was driven by thruster propulsion. The simulation results were displayed for evaluation.
It achieves closed-loop simulation of perception, map building, path planning and motion control under a unified software architecture, which improves the reproducibility and engineering applicability of simulation experiments, reduces obstacle misjudgment and map holes, reduces path jitter, and improves R&D efficiency and safety.
Smart Images

Figure CN122333819B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent cleaning robot technology, and in particular to a simulation method and system for unmanned boats used for cleaning garbage on water surfaces. Background Technology
[0002] Floating debris on water surfaces can significantly impact navigation safety, aquatic ecosystems, and coastal landscapes. Traditional methods of cleaning up floating debris rely primarily on manual inspections and manned vessels, which suffer from low inspection efficiency, susceptibility to weather and wave conditions, high operating costs, and significant safety risks to personnel. With the development of unmanned systems technology, unmanned vessels for cleaning up floating debris in urban rivers, scenic lakes, industrial park waterways, and near-shore harbors are gradually becoming an important development direction.
[0003] In practical applications, unmanned surface vessels (USVs) for cleaning up surface debris typically need to complete the following workflow: First, a comprehensive inspection of the target water area is conducted; second, onboard sensors are used to detect and locate floating debris, shoreline obstacles, and surface obstructions; then, the cruise path is adjusted based on the detection results, and the vessel is controlled to approach the target area; finally, debris collection and subsequent operations are completed. Due to disturbances in the water environment such as wind, waves, and currents, and the characteristics of floating debris such as rapid positional changes, small size, and irregular appearance, coupled with complex constraints in the nearshore environment such as bridges, docks, fences, buoys, and shoals, the USV's perception, mapping, planning, and control algorithms need to be repeatedly verified and optimized under near-real-world conditions to provide reliable support for subsequent real-world trials and engineering applications.
[0004] However, relying directly on actual ship trials during the R&D phase typically faces challenges such as high testing costs, low debugging efficiency, significant experimental risks, and strong dependence on location and weather conditions. This is especially true for unmanned surface vessel systems involving multi-sensor perception, environmental mapping, full-coverage path planning, local obstacle avoidance, and trajectory tracking control; without a unified simulation testing platform, it is difficult to complete full closed-loop verification during the algorithm development phase.
[0005] In summary, the existing technology has the following defects and shortcomings:
[0006] (1) Existing unmanned surface vessel simulation technologies typically focus on building surface scenes, hull models, and virtual sensor algorithms, lacking an integrated closed-loop algorithm verification system for "perception-mapping-planning-control" for garbage collection tasks. In existing solutions, each module often uses different software interfaces, message formats, and coordinate system definitions. The perception results from multiple sensors such as cameras and lidar are difficult to directly use for subsequent map updates, path planning, and local obstacle avoidance. This results in a large amount of interface adaptation and intermediate layer encapsulation still being required in the simulation stage, making the simulation test process more complex, the development and maintenance costs higher, and the guidance for actual ship experiments limited.
[0007] (2) In the existing unmanned vessel simulation technology, there is often an inconsistency between the three-dimensional perception results and the two-dimensional navigation map, which can easily lead to obstacle position deviation, map holes, boundary distortion, and mismatch between the planning results and the actual passage space. At the same time, the coverage path usually lacks an adaptive generation mechanism that combines the shape of the work area and the distribution of obstacles. When the local environment changes, the overall replanning method is often used, which can easily lead to low path efficiency, repeated coverage, and path jitter.
[0008] (3) Existing simulation environments usually lack a unified statistical and evaluation mechanism for test indicators, making it difficult to conduct repeatable comparative tests on different perception algorithms, mapping algorithms, planning algorithms and control algorithms under the same conditions. It is also difficult to uniformly record and analyze key indicators such as regional coverage, garbage identification success rate, operation time, path length and control error, which is not conducive to the rapid selection and iterative optimization of unmanned vessel algorithms. Summary of the Invention
[0009] To address the problems existing in the prior art, this invention provides a simulation method and system for unmanned surface garbage cleaning vessels.
[0010] This invention provides a simulation method for unmanned surface garbage cleaning vessels, comprising:
[0011] A simulation scenario for water surface garbage cleaning operation is constructed, a sensor data link for the unmanned vessel model is established, and the data of the unmanned vessel model, the environmental information of the simulation scenario, and the multi-source sensor data are connected to the ROS2 system. A unified TF coordinate relationship is established for the multi-source sensor data, the hull pose, and the hull joint state.
[0012] After performing coordinate transformation on the lidar point cloud collected by the multi-source sensor from the simulation scene using the unified TF coordinate relationship, a three-dimensional point cloud map is constructed, and the three-dimensional point cloud map is converted into a two-dimensional map.
[0013] The operating area of the unmanned vessel model is determined, and a coverage planning path for the unmanned vessel model is generated based on the two-dimensional map and the operating area of the unmanned vessel model. Speed control commands for the unmanned vessel model are generated based on the planning path.
[0014] The speed control command is converted into the thrust of the unmanned vessel model, and the thrust is used to drive the hull movement of the unmanned vessel model.
[0015] The system displays the 3D point cloud map, 2D map, planned path, and unmanned vessel model, and statistically analyzes the indicators of the unmanned vessel simulation results to evaluate the simulation results.
[0016] This invention also provides a simulation system for unmanned surface garbage cleaning vessels, comprising:
[0017] The simulation module is used to construct a simulation scenario for water surface garbage cleaning operations, establish a sensor data link for the unmanned vessel model, connect the data of the unmanned vessel model, the environmental information of the simulation scenario, and the multi-source sensor data to the ROS2 system, and establish a unified TF coordinate relationship for the multi-source sensor data, hull pose, and hull joint state.
[0018] The module is used to construct a three-dimensional point cloud map by performing coordinate transformation on the lidar point cloud collected by the multi-source sensor from the simulation scene using the unified TF coordinate relationship, and then converting the three-dimensional point cloud map into a two-dimensional map.
[0019] The generation module is used to determine the operating area of the unmanned vessel model, generate a coverage planning path for the unmanned vessel model based on the two-dimensional map and the operating area of the unmanned vessel model, and generate speed control commands for the unmanned vessel model based on the planning path.
[0020] The drive module is used to convert the speed control command into the thrust of the unmanned boat model, and use the thrust of the thrust to drive the hull movement of the unmanned boat model;
[0021] The display module is used to display the 3D point cloud map, 2D map, planned path and unmanned vessel model, and to statistically analyze the indicators of the unmanned vessel simulation results in order to evaluate the unmanned vessel simulation results.
[0022] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the unmanned vessel simulation method for cleaning up surface garbage as described above.
[0023] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the unmanned vessel simulation method for cleaning surface garbage as described above.
[0024] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the unmanned vessel simulation method for cleaning up surface garbage as described above.
[0025] The present invention provides a simulation method and system for unmanned surface garbage cleaning vessels, which constructs a simulation test method and system based on ROS2 for unmanned surface garbage cleaning vessel tasks. It enables closed-loop simulation of perception, map construction, path planning and motion control under a unified software architecture, and allows for repeated testing and quantitative evaluation of algorithm performance, which has significant engineering significance.
[0026] In view of the shortcomings of the existing technology, the technical problems to be solved by the present invention and the corresponding technical effects mainly include:
[0027] (1) A simulation test method and system for unmanned surface garbage cleaning boat based on ROS2 is provided. Under a unified software architecture and communication mechanism, the closed-loop linkage of perception, map building, path planning and motion control modules is realized to improve the reproducibility, scalability and engineering applicability of the simulation test.
[0028] (2) A consistent mapping method for three-dimensional point cloud to two-dimensional occupied grid is provided for water surface garbage cleaning tasks, so that the sensor perception results can be reliably converted into a navigation map that can be directly called by the planning module, reducing obstacle misjudgment and map hole problems, and improving the accuracy of local obstacle avoidance and path correction of unmanned ships.
[0029] (3) A simulation test process combining full-coverage path planning and local online correction for water patrol and garbage collection tasks is provided, so that the unmanned vessel can make local adjustments to the path based on real-time perception results while performing full-coverage patrol, reducing path jitter caused by frequent overall replanning and improving the consistency between the simulation task process and the actual operation process.
[0030] (4) Provide a simulation system that can support algorithm verification and test evaluation, complete system debugging, algorithm tuning and performance comparison without relying on frequent real ship tests, improve R&D efficiency and reduce test risks. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0032] Figure 1 This is a flowchart illustrating the unmanned surface garbage cleaning simulation method provided by the present invention.
[0033] Figure 2 This is a schematic diagram of the overall architecture of the unmanned vessel simulation method for cleaning up surface garbage provided by the present invention;
[0034] Figure 3 This is a schematic diagram of the simulation test scenario of the unmanned garbage sweeping boat in the simulation method of unmanned garbage sweeping boat for water surface cleaning provided by the present invention;
[0035] Figure 4 This is a schematic diagram illustrating the consistent mapping principle from a 3D point cloud map to a 2D occupied grid map in the simulation method for unmanned surface garbage cleaning vessels provided by this invention.
[0036] Figure 5 This is a schematic diagram of the full-coverage path planning and local obstacle avoidance results of the unmanned garbage sweeping vessel in the water surface garbage sweeping unmanned vessel simulation method provided by the present invention;
[0037] Figure 6 This is a diagram showing the combined display effect of point cloud map, operation area and coverage path planning in the simulation method of unmanned surface garbage cleaning vessel provided by the present invention;
[0038] Figure 7 This is a schematic diagram of the closed loop of path planning, path tracking and propulsion execution in the simulation method of unmanned surface garbage cleaning vessel provided by the present invention;
[0039] Figure 8 This is a diagram of the simulation test operation and parameter control interface of the unmanned garbage sweeping vessel in the simulation method for unmanned surface garbage sweeping vessels provided by the present invention;
[0040] Figure 9 This is a schematic diagram of the unmanned surface garbage cleaning simulation system provided by the present invention. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0042] The following is combined with Figure 1 This invention describes a simulation method for unmanned surface vessel (USV) cleaning of debris, illustrating the complete process from scene construction, bridging, perception input, map building, path planning, path tracking to propulsion execution and evaluation output, including:
[0043] S1, construct a simulation scenario for surface garbage cleaning operations, and set parameters such as water boundary, shoreline, obstacles, floating targets, and wind, wave and current.
[0044] S2, establish sensor data links for the unmanned vessel model, bridge multiple sensors such as GPS, IMU, LiDAR, and cameras, and connect the data of the unmanned vessel model, environmental information of the simulation scene, and multi-source sensor data to the ROS2 system.
[0045] S3 establishes a unified TF coordinate relationship for multi-source sensor data, hull pose and hull joint status, and organizes the sensing input to form / tf, / tf_static and standardized data interfaces;
[0046] S4. After performing coordinate transformation on the lidar point cloud collected by the multi-source sensor from the simulation scene using the unified TF coordinate relationship, a three-dimensional point cloud map is constructed, and the three-dimensional point cloud map is converted into a two-dimensional map.
[0047] S5, determine the operating area of the unmanned vessel model, and generate a coverage planning path for the unmanned vessel model based on the two-dimensional map and the operating area of the unmanned vessel model;
[0048] S6, display the three-dimensional point cloud map, two-dimensional map, planned path, markers and unmanned vessel model;
[0049] S7, Execute path tracking and propulsion control, generate speed control commands for the unmanned vessel model according to the planned path; convert the speed control commands into the left and right thrusters of the unmanned vessel model, and use the thrusters to drive the hull movement of the unmanned vessel model;
[0050] S8. Record and evaluate the test results, and statistically analyze the indicators of the unmanned vessel simulation results to evaluate the unmanned vessel simulation results.
[0051] Figure 2 This is the overall architecture diagram of a ROS2-based unmanned garbage collection vessel simulation test system. It illustrates the structural relationships between the simulation environment and bridging module, state and coordinate transformation module, multi-source sensing input module, 3D point cloud map construction module, 2D occupancy grid map construction module, area coverage path planning module, path tracking control module, thruster thrust allocation execution module, and visualization and evaluation module. The simulation environment and bridging module is used to construct the target water area, shoreline, obstacles, floating targets, and environmental disturbance conditions such as wind, waves, and currents, and is responsible for the bidirectional data bridging between the simulation environment and the ROS2 system. A schematic diagram of the unmanned garbage collection vessel simulation test scenario is shown below. Figure 3 The diagram illustrates scene elements such as the test waters, shoreline, dock structure, shore-side buildings, unmanned vessel location, and operational area. The operational area can be pre-defined, for example, by specifying a particular area within the target waters. Alternatively, the operational area can be determined based on water quality and waste monitoring results.
[0052] In this embodiment, the module is implemented by the nodes / ros_gz_bridge and / wamv / ros_gz_bridge. The former is used to bridge the simulation clock, environmental information, and task information, while the latter is used to bridge the hull pose, joint states, GPS, IMU, LiDAR point cloud, multi-camera images, and left and right thruster control inputs. Through this module, the state and sensor data in the simulation environment can be fed into the ROS2 system in real time, and the thruster thrust commands generated in ROS2 can also be fed back to the simulated hull in real time, providing a unified experimental environment for subsequent mapping, planning, and control.
[0053] The state and coordinate transformation module is used to establish a unified coordinate relationship based on GPS, IMU, hull pose, and joint state information. In this embodiment, this module is implemented by nodes such as / gps_to_tf, / wamv / robot_state_publisher, and / wamv / frame_publisher. Specifically, / gps_to_tf publishes the dynamic TF transformation of the hull in the global coordinate system based on GPS and IMU data; / wamv / robot_state_publisher publishes the coordinate relationships of various hull components based on the robot model and joint states; and / wamv / frame_publisher supplements the static coordinate relationship between the hull and sensors. Through this module, the system establishes a unified map-base-link-sensor coordinate chain, enabling point cloud maps, 2D maps, planned paths, and unmanned vessel models to be superimposed and calculated in the same reference frame.
[0054] The multi-source sensing input module receives and organizes multi-source sensor data from unmanned surface vessel (USV) simulation experiments, including GPS, IMU, LiDAR point clouds, laser scanning, and multi-camera images. In this embodiment, relevant input topics include ` / wamv / sensors / gps / fix`, ` / wamv / sensors / imu / data`, ` / wamv / sensors / lidars / lidar_wamv_sensor / points`, ` / wamv / sensors / lidars / lidar_wamv_sensor / scan`, and multiple ` / wamv / sensors / cameras / image_raw` topics. The system also retains visual result display topics such as ` / vrx / yolo / annotated_image` for accessing external target detection or garbage identification results. The module's role is to provide a unified input interface for subsequent mapping, path planning, and experiment evaluation, rather than limiting it to specific visual recognition algorithms. Data from different sources, after bridging and coordinate unification, can be directly read and processed by subsequent nodes.
[0055] The 3D point cloud map construction module is used to construct a 3D point cloud map based on the LiDAR point cloud and coordinate transformation relationship. In this embodiment, this module is implemented by the ` / pc_map_builder` node, which subscribes to point cloud and TF-related topics and publishes the ` / map_cloud` 3D point cloud map. During the simulation process, the node first transforms the point cloud in the sensor coordinate system to the map coordinate system; then, it performs voxelization processing on the point cloud according to the `voxel_size` parameter to reduce the impact of repeated sampling and local noise points on map updates; when incremental updates are allowed, the node accumulates the effective point cloud at consecutive time points, gradually forming a global 3D environment representation. The ` / map_cloud` output by this module is used for environmental visualization and also provides obstacle geometry information for the subsequent construction of a 2D occupancy grid map.
[0056] The 2D occupied raster map construction module is used to further convert the 3D point cloud environment representation into a 2D occupied raster map that can be directly invoked for path planning and path execution. In this embodiment, this module is implemented by the / ogm_builder node, which subscribes to LiDAR point cloud and TF information, publishes the / map_2d occupied raster map, and provides the / reset_map service for map reset.
[0057] The area coverage path planning module generates a coverage path suitable for unmanned surface vessels (USVs) to perform inspection tasks based on a 2D occupancy grid map and a preset work area, and updates the path when local changes occur on the map. In this embodiment, this module is implemented by the ` / roi_mower` node, which subscribes to the ` / map_2d` topic and TF coordinate transformation relationships, and publishes the ` / planned_path`, ` / planned_path_full`, and work area visualization marker topics. This node also reads parameters such as `track_spacing`, `turn_round_m`, `corridor_half_width_m`, `roi_min_x`, `roi_max_x`, `roi_min_y`, `roi_max_y`, and `replan_period_s` to determine coverage spacing, turning connection scale, effective passageway width, work area boundaries, and path update cycle.
[0058] The path tracking control module generates unified speed control commands in real time based on the path results output by the area coverage path planning module, the 2D occupied grid map, and the current pose of the unmanned surface vessel (USV), enabling the USV to navigate stably along the planned trajectory. In this embodiment, this module is implemented by the ` / waypoint_follower` node, which subscribes to ` / planned_path_full`, ` / map_2d`, and TF coordinate transformation relationships, and publishes the ` / cmd_vel` speed control command.
[0059] The thruster distribution execution module converts the unified speed control commands generated by the path tracking control module into actual thrust inputs for the left and right thrusters of the unmanned surface vessel (USV), driving the simulated hull to generate corresponding motion responses. In this embodiment, this module is implemented collaboratively by the ` / twist_to_thrust` node and the ` / wamv / ros_gz_bridge` node. The former is responsible for mapping ` / cmd_vel` to the thrust of the left and right thrusters, while the latter is responsible for transmitting the thruster control quantities from the ROS2 side to the USV model in the simulation environment.
[0060] Specifically, the ` / twist_to_thrust` node subscribes to the ` / cmd_vel` topic. Upon receiving a speed control command, it reads the forward linear velocity component and the angular velocity component around the vertical axis, and decomposes them into forward drive requirements and steering drive requirements. The forward drive requirement corresponds to the common thrust component of the left and right thrusters, while the steering drive requirement corresponds to the differential thrust component between the left and right thrusters. Based on the preset thruster installation relationship and differential drive rules, the program combines these two components into left thruster thrust values and right thruster thrust values, and publishes them to ` / wamv / thrusters / left / thrust` and ` / wamv / thrusters / right / thrust`, respectively.
[0061] In actual calculations, to ensure smooth hull response, the node applies amplitude constraints to the thrust of the left and right thrusters to prevent the output from exceeding the upper limit allowed by the simulated thrusters. Simultaneously, a small thrust dead zone is set to eliminate frequent jitter caused by minor fluctuations in control parameters. For thrust changes between two adjacent moments, a rate-of-change limit or filtering is applied to prevent instantaneous thrust jumps that could lead to hull attitude instability. If no new / cmd_vel command is received within a set time limit, the node outputs a safe zero thrust to prevent the hull from continuing to move during communication interruptions.
[0062] When the ` / wamv / ros_gz_bridge` node receives thrust requests from the left and right thrusters, it converts them into propulsion commands that the simulation engine can recognize and applies them to the unmanned surface vessel (USV) dynamics model in VRX / Gazebo. The simulation model updates its position, velocity, and attitude based on the hull's stress state, and then generates new GPS, IMU, LiDAR, and camera data, which is then re-entered into the ROS2 system via the bridging link. Thus, upstream control commands, propulsion execution, and hull state feedback form a complete closed loop, enabling the system to realistically reflect the execution effect of the control link in the simulation environment.
[0063] The visualization and evaluation module is used to uniformly display the 3D environment map, 2D navigation map, coverage inspection path, robot model, and related test results, and to record and analyze key performance indicators during the test process. In this embodiment, this module is implemented by the / rviz2 node, subscribing to topics such as / map_cloud, / map_2d, / planned_path_full, / roi_marker, and visual result images. This module can be used to observe map construction results, path planning results, control output, propulsion execution, and trajectory tracking effects, and further statistically analyze indicators such as area coverage, path length, total operation time, obstacle avoidance success rate, trajectory tracking error, and garbage recognition success rate.
[0064] In terms of display logic, RViz's fixed reference coordinate system is first set to "map," enabling the overlay display of 3D point clouds, 2D grid maps, overlay paths, and robot models under a unified coordinate reference. ` / map_cloud` displays the 3D point cloud environment, ` / map_2d` displays the 2D obstacle distribution, ` / planned_path_full` displays the complete inspection path, ` / roi_marker` displays the work area boundaries and key path markers, and visual recognition images showcase the image results after external detection algorithms are integrated. Through the joint display of these layers, researchers can directly observe the correspondence between "environment representation—path generation—ship execution."
[0065] In terms of evaluation logic, the module records the start and end times of the task, the planned path, the actual trajectory, control commands, and execution results according to a unified time base. Area coverage can be obtained by statistically analyzing the proportion of free grid cells within the operational area that are effectively covered by the trajectory; path length can be obtained by accumulating the distances between adjacent trajectory points; the total operation time is determined by the time difference from the start to the end of the task; trajectory tracking error can be calculated using the minimum distance sequence between the actual trajectory and the reference path; obstacle avoidance success rate can be obtained based on statistics of collision-free passage after an obstacle avoidance event; when the system incorporates a target detection algorithm and has target ground truth or annotation information, the garbage identification success rate can be further calculated. The relevant evaluation results can be displayed in real time during the experiment or analyzed offline via ROS2 recording or log export to support repeated comparative experiments under different algorithm parameters, map configurations, or task scenarios.
[0066] This embodiment provides a simulation test method and system for unmanned surface garbage cleaning vessels based on ROS2. The system uses a simulated water environment as the test carrier. Through a simulation bridging module, the system connects the vessel's state, environmental information, and multi-source sensor data to the ROS2 system. A unified coordinate relationship is established through a state and coordinate transformation module. An environmental representation that can be called for path planning and path execution is formed through a 3D point cloud map construction module and a 2D occupancy grid map construction module. A coverage path planning module generates a coverage inspection path within the work area. Motion control and simulation execution are completed through a path tracking control module and a thruster thrust distribution execution module. Finally, a visualization and evaluation module uniformly displays, records, and analyzes the map, path, control, and test indicators, thereby forming a complete closed-loop test link of "sensory input - environmental mapping - path generation - path execution - propulsion feedback - result evaluation". The main link of this system can be composed of nodes such as / ros_gz_bridge, / wamv / ros_gz_bridge, / gps_to_tf, / pc_map_builder, / ogm_builder, / roi_mower, / waypoint_follower, / twist_to_thrust, and / rviz2.
[0067] Based on the above embodiments, the simulation scenario in this embodiment includes water boundaries, shorelines, bridge or pier structures, shoreline buildings, obstacles, floating targets, and environmental disturbance data;
[0068] The environmental disturbance data includes parameters for wind, waves, and currents.
[0069] Based on the above embodiments, the data collected by the multi-source sensors in this embodiment includes GPS, IMU, lidar point cloud and camera images.
[0070] Based on the above embodiments, this embodiment converts the three-dimensional point cloud map into a two-dimensional map, including:
[0071] The two-dimensional plane projected from the three-dimensional point cloud map is gridded according to the preset resolution of the two-dimensional map to generate a two-dimensional map grid.
[0072] The point cloud in the three-dimensional point cloud map is height filtered to retain obstacle points that affect water passage, and the obstacle points are projected onto the two-dimensional plane;
[0073] Based on the projection of obstacle points within each grid cell in the two-dimensional map grid, determine whether each grid cell is an occupied grid cell;
[0074] The obstacle region is determined based on the occupied grid, and the obstacle region is then expanded.
[0075] In the specific processing, the node first establishes a two-dimensional map grid based on the resolution, width, and height of the two-dimensional plane; then, it filters the input point cloud by height based on the minimum and maximum height values z_min and z_max, retaining only obstacle points that actually affect passage on the water surface; subsequently, the valid points are projected onto the two-dimensional plane, and each grid cell is determined to be occupied based on the threshold occ_threshold. Let the map origin be (x0, y0) and the resolution be r, then the grid index corresponding to the point (x, y) can be written as:
[0076] i=[(x-x0) / r)], j=[(y-y0) / r]
[0077] When the obstacle evidence within a given grid cell reaches a threshold, it is marked as occupied. Finally, the obstacle region is inflated based on `inflate_radius_cells`, so that the 2D map not only reflects the obstacle's location but also the safety boundaries required for ship passage. The resulting ` / map_2d` is no longer a simple planar compression of a 3D point cloud but can directly provide environmental constraint information for path planning and path tracking.
[0078] Based on the above embodiments, this embodiment generates a coverage-based planning path for the unmanned vessel model according to the two-dimensional map and the operating area of the unmanned vessel model, including:
[0079] The operating area of the unmanned vessel model is extracted from the two-dimensional map;
[0080] Based on the obstacle occupancy status of the grid in the work area and the safe passage width requirements of the unmanned vessel, areas where the distance to the obstacle is less than a preset threshold or do not meet the vessel passage conditions are deleted from the work area to form an effective work area.
[0081] Multiple parallel inspection baselines are generated within the effective working area according to a preset coverage direction;
[0082] If the inspection baseline crosses an obstacle or crosses a boundary, the inspection baseline shall be trimmed.
[0083] A smooth transition connection segment is generated between adjacent inspection baselines to obtain a coverage planning path.
[0084] During code execution, the node first receives the latest ` / map_2d`, parses the map resolution, origin, width, height, and grid occupancy status, and establishes the conversion relationship between map grid coordinates and world coordinates. Then, based on preset ROI boundary parameters, it extracts the corresponding work area from the globally occupied grid. For grids within the work area, it further filters out areas that are too close to obstacles or cannot meet the ship's passage requirements, combining obstacle occupancy status and safe passage width requirements, thus forming a valid work area that can be used for path generation. The purpose of this step is not to find garbage target points, but to extract continuous, passable space suitable for comprehensive inspection from the navigation map.
[0085] After the effective operating area is determined, the node generates multiple parallel inspection baselines according to the set coverage direction and track_spacing parameter. For each baseline, the program checks its intersection with obstacle areas or impassable areas; if there is any crossing of obstacles or boundary violations, the baseline is automatically trimmed, retaining only continuous segments within the free area. Subsequently, the effective segments are connected in a round-trip sequence, preferentially constructing a serpentine inspection path to reduce unnecessary empty travel distance. Between adjacent path segments, the node generates smooth transition connection segments according to the turn_round_m parameter to avoid forming sharp turns that are detrimental to ship tracking.
[0086] Based on the above embodiments, this embodiment calculates a comprehensive cost for several candidate coverage directions in terms of direction selection. The preset coverage direction is determined by the following formula:
[0087] J(θ) = αL(θ) + βN t (θ)+γC O (θ);
[0088] Where J(θ) is the comprehensive cost of any candidate coverage direction θ, L(θ) is the total coverage length of the planned path under any candidate coverage direction θ, and N t (θ) represents the number of turns of the planned path under any candidate coverage direction θ, C O (θ) represents the proximity of the planned path to the obstacle under any candidate coverage direction θ, and α, β and γ are weight parameters;
[0089] The candidate coverage direction θ with the smallest J(θ) is selected as the main coverage direction of the current working area.
[0090] The proximity of the planned path to each obstacle can be determined by the weighted sum of the shortest distance between the planned path and the edges of each obstacle, and the distance between the planned path and the center coordinates of each obstacle. Finally, the average of the weighted sums corresponding to all obstacles is taken to obtain the proximity of the planned path to the obstacles.
[0091] After the above processing, a complete coverage inspection path sequence is formed and published as / planned_path_full; if only the currently executing segment or a segment of local interest needs to be output, / planned_path is generated simultaneously. When the map is partially updated in subsequent cycles, the node does not necessarily recalculate the entire path. Instead, it first determines whether the updated area affects the current operation boundary, existing effective passageways, or the current executing path segment. Only when the affected area intersects with or blocks an existing path will the path refresh of the corresponding local segment be triggered, thereby reducing path jitter caused by frequent overall replanning and maintaining inspection continuity.
[0092] Based on the above embodiments, this embodiment generates speed control commands for the unmanned vessel model according to the planned path, including:
[0093] Search the planned path for the nearest path point to the current position of the unmanned vessel model;
[0094] Based on the current heading angle of the unmanned vessel model, determine the forward sight distance of the unmanned vessel model to the planned path;
[0095] Based on the nearest path point and the forward look-ahead distance, select the reference tracking point at the current moment;
[0096] Calculate the distance deviation, heading deviation, and lateral deviation relative to the current path segment between the current position of the unmanned vessel model and the reference tracking point;
[0097] The linear velocity control amount is determined based on the distance deviation and the path curvature of the current path segment;
[0098] The angular velocity control amount is determined based on the heading deviation and lateral deviation.
[0099] Based on the linear velocity control quantity and the angular velocity control quantity, a speed control command for the unmanned vessel model is generated.
[0100] Upon receiving ` / planned_path_full`, the node first caches the path point sequence in its internal tracking queue and records the current target segment index. When the timed control loop is triggered, the node queries the unmanned vessel's real-time position and heading angle in the map coordinate system via TF; then, based on the current pose, it searches for the nearest path point in the path queue and selects the reference tracking point for the current moment by combining the forward look distance. This avoids the lateral swaying caused by the vessel constantly chasing local nearest points, allowing it to move more smoothly along the path direction.
[0101] Based on the nearest path point and the forward look-ahead distance, a reference tracking point is selected at the current moment. Specifically, starting from the path point corresponding to the current distance, points between the path point corresponding to the current distance and the nearest path point are selected as reference tracking points in sequence, and finally the nearest path point is selected as the reference tracking point.
[0102] After determining the reference tracking point, the node calculates the distance deviation, heading deviation, and lateral deviation relative to the current path segment between the UAV's current position and the reference point, and generates linear and angular velocity control values accordingly. For linear velocity, adjustments are prioritized based on the target point distance, current yaw rate, and path curvature: a higher forward speed is output when the path is relatively straight and the deviation is small; the forward speed is reduced when the turning radius is small, the deviation increases, or when approaching an inflection point. For angular velocity, it is determined jointly based on the heading and lateral deviations, gradually aligning the UAV's bow with the path tangent and suppressing lateral drift.
[0103] Because this node also subscribes to ` / map_2d`, it can perform local safety checks during path tracking. Specifically, based on the current pose and heading, the program queries the occupied grid status within a certain range ahead of the unmanned vessel. If a new obstacle is detected blocking the forward path, the output speed is suppressed first, for example, by slowing down, limiting speed, or temporarily stopping, waiting for the upstream planning module to update the path in a subsequent cycle before continuing execution. In this way, the path tracking module not only completes the tracking of the predetermined path but also responds to local map changes, thus forming a closed loop with the planning module: "path generation—path execution—map feedback—local correction". When the vessel reaches the vicinity of the current reference point, the node advances the path index and switches to the next path segment; when the entire path queue has been executed, the node issues a zero-speed command, indicating that this round of coverage inspection task has ended.
[0104] This invention utilizes ROS2 to achieve modular communication and data organization. Its main data flow is as follows: the simulation environment publishes hull status, GPS, IMU, LiDAR point cloud, and camera images via a bridging module; the status and coordinate transformation module constructs a unified TF coordinate relationship based on the above data; the 3D point cloud map construction module generates / map_cloud based on the point cloud and TF; the 2D occupancy grid map construction module generates / map_2d based on the point cloud and TF; the area coverage path planning module generates / planned_path_full based on / map_2d; the path tracking control module generates / cmd_vel based on the path, map, and current pose; and the thruster thrust allocation execution module converts / cmd_vel into left and right thruster thrust and feeds it back to the simulated hull, thus forming a complete closed-loop control link. This link has already been established in the current system by real nodes and topics.
[0105] The publish / subscribe relationships for key topics are as follows: / map_2d is published by / ogm_builder and subscribed to by / roi_mower, / waypoint_follower, and / rviz2; / planned_path_full is published by / roi_mower and subscribed to by / waypoint_follower and / rviz2; / cmd_vel is published by / waypoint_follower and subscribed to by / twist_to_thrust; the left and right thruster thrust topic is published by / twist_to_thrust and received by / wamv / ros_gz_bridge.
[0106] In this embodiment, to ensure that the map and path results can still obtain the most recent valid data after the subsequent access node starts, / map_2d and / planned_path_full can adopt the RELIABLE + TRANSIENT_LOCAL QoS mode; while / cmd_vel and the left and right thruster thrust topics can adopt the RELIABLE + VOLATILE QoS mode to meet real-time control requirements. Through this communication organization method, the system ensures both the inheritability of map and path results and the real-time performance of the control link.
[0107] In summary, the simulation test method of the present invention includes the following steps:
[0108] 1. Construct a simulation scenario for cleaning up garbage on the water surface.
[0109] The target aquatic environment is constructed in the simulation platform, and water boundaries, shorelines, bridge or pier structures, shore buildings, static obstacles and floating target areas are added. At the same time, environmental disturbance conditions such as wind, waves and currents are set to form a water surface task scenario that is close to the real working conditions.
[0110] In this embodiment, the simulation environment is built based on the VRX project, and an unmanned vessel and test area are deployed on the Gazebo water surface simulation scene. It should be noted that VRX is only used as a non-limiting simulation implementation carrier in this embodiment. The present invention is not limited to a specific simulation platform. Any simulation platform that can provide an equivalent water surface environment, hull dynamics interface, and sensor interface can implement the technical solution of the present invention.
[0111] 2. Establish unmanned vessel model and data link for shipborne sensors.
[0112] An unmanned surface vessel (USV) model is loaded into the simulation scenario, and its hull pose, joint states, and multi-source sensor data are published via a bridging module. The multi-source sensors include at least GPS, IMU, LiDAR point clouds, and camera images; in this embodiment, the corresponding topics include / wamv / sensors / gps / gps / fix, / wamv / sensors / imu / imu / data, and / wamv / sensors /
[0113] lidars / lidar_wamv_sensor / points, multi-camera image topics, etc.
[0114] 3. Establish a unified coordinate relationship and organize sensory input.
[0115] A unified TF coordinate relationship is constructed based on GPS, IMU, hull pose, and joint state information to ensure that subsequent map building and path planning are performed within the same reference frame. In this embodiment, ` / gps_to_tf` publishes TF transformations based on GPS and IMU data, while ` / wamv / robot_state_publisher` and ` / wamv / frame_publisher` publish TF and static TF information related to the robot model, respectively, based on joint states and hull pose. Simultaneously, the multi-source perception input module organizes LiDAR point clouds, camera images, and possible visual detection results into a unified data interface, providing a foundation for subsequent environmental mapping and garbage identification algorithm integration.
[0116] 4. Perform 3D point cloud map construction and 2D occupancy grid conversion.
[0117] The 3D point cloud map construction module receives the LiDAR point cloud and TF transform relationship, accumulates and constructs the environmental point cloud, generating the / map_cloud 3D point cloud map. Subsequently, the 2D occupancy grid map construction module receives the LiDAR point cloud and TF information, projects environmental obstacles onto a 2D plane, and constructs the / map_2d occupancy grid map for path planning and obstacle avoidance. The schematic diagram of the consistent mapping principle from the 3D point cloud map to the 2D occupancy grid map is shown below. Figure 4The diagram illustrates the relationship between point cloud input, voxel processing, obstacle extraction, 2D projection, and raster update. In this embodiment, the ` / ogm_builder` node has parameters such as resolution, width, height, occ_threshold, inflate_radius_cells, z_min, z_max, and tf_lookup_mode, which can be used to control the resolution, spatial extent, obstacle inflation, effective height range, and TF matching method of the 2D map; the ` / pc_map_builder` node has parameters such as voxel_size, incremental_voxel, and publish_topic, which can be used to control point cloud voxelization and publishing methods.
[0118] 5. Generate inspection paths that cover the work area.
[0119] Figure 5 This diagram illustrates the full-coverage path planning and local obstacle avoidance results of the unmanned garbage sweeping vessel's operating area. It is used to demonstrate the visualization results of the full-coverage inspection path generated based on the boundary of the operating area and the distribution of internal obstacles under the simulation system of this invention, and the local obstacle avoidance correction achieved during the path execution process. This is to show that the present invention can support the joint verification of global coverage path planning and local obstacle avoidance algorithms for garbage sweeping tasks.
[0120] The area coverage path planning module generates coverage inspection paths based on the 2D map and work area settings. In this embodiment, the / roi_mower node subscribes to / map_2d and TF information and publishes / planned_path and / planned_path_full. Its parameters include track_spacing, turn_round_m, corridor_half_width_m, roi_min_x, roi_max_x, roi_min_y, roi_max_y, and replan_period_s, which can be used to control coverage spacing, turning radius, inspection corridor width, and work area range.
[0121] 6. Display map and route planning results.
[0122] The visualization module jointly displays the 3D point cloud map, 2D navigation area, coverage path, and robot model to intuitively present the simulation test results. In this embodiment, / rviz2 subscribes to / map_cloud, / map_2d, / planned_path_full, and visualization tag topics to achieve the joint display of the point cloud map and coverage path. Figure 6The provided RViz screenshots have shown the point cloud map, the work area, and the overlay path planning results. They can be directly used as the effect diagrams of this embodiment to illustrate the joint display effect of the three-dimensional point cloud map, the two-dimensional navigation area, and the overlay planning path.
[0123] 7. Execution trajectory tracking and motion control.
[0124] The path tracking control module generates speed control commands based on the covered path and the two-dimensional map; the thruster thrust distribution module then converts the speed control commands into thrust for the left and right thrusters, thereby driving the unmanned vessel to perform path tracking.
[0125] In this embodiment, ` / waypoint_follower` subscribes to ` / planned_path_full`, ` / map_2d`, and TF information, and publishes ` / cmd_vel`; ` / twist_to_thrust` subscribes to ` / cmd_vel` and publishes ` / wamv / thrusters / left / thrust` and ` / wamv / thrusters / right / thrust`; ` / wamv / ros_gz_bridge` receives the corresponding thrust topic and drives the simulated ship's motion, thereby generating new pose and sensor data feedback. This forms a closed-loop experimental chain of "planning—control—execution—feedback," as shown below. Figure 7 As shown.
[0126] 8. Record and evaluate the test results.
[0127] During simulation experiments, map building results, path planning results, control outputs, propulsion execution, and trajectory tracking performance can be recorded. Further statistical analysis can be performed on metrics such as area coverage, path length, total operation time, obstacle avoidance success rate, trajectory tracking error, and garbage identification success rate. These evaluation results can be used to compare system performance under different algorithm parameter settings or different task scenarios, thus providing a basis for algorithm optimization before real-ship trials. This evaluation module can be observed visually or analyzed offline using ROS2 topic recording.
[0128] This embodiment constructs an experimental scenario based on the water surface simulation environment provided by the VRX project and the Gazebo simulation platform. The scenario includes an unmanned vessel model, shoreline, dock, obstacles, and target area. Simulation clock, environmental information, vessel status, and multi-source sensor data are connected to the ROS2 system via a ROS2 bridging node. It should be noted that VRX is only one simulation platform in this embodiment, and the invention is not limited to VRX.
[0129] In this embodiment, the system first publishes GPS, IMU, LiDAR point cloud, and multi-camera image topics via ` / wamv / ros_gz_bridge`, and then uses ` / gps_to_tf`, ` / wamv / robot_state_publisher`, and ` / wamv / frame_publisher` to construct a unified TF coordinate relationship. Subsequently, ` / pc_map_builder` accumulates a 3D point cloud map ` / map_cloud` based on the point cloud and TF, and ` / ogm_builder` constructs a 2D occupancy grid map ` / map_2d` based on the point cloud and TF. Afterwards, ` / roi_mower` generates a ` / planned_path_full` coverage path based on ` / map_2d` and the operating area parameters, ` / waypoint_follower` outputs a ` / cmd_vel` speed control command based on the coverage path, and ` / twist_to_thrust` converts the speed command into thrust for the left and right thrusters, which is then fed back to the simulated hull via ` / wamv / ros_gz_bridge`, thus forming a closed loop.
[0130] In this embodiment, the communication relationships of key topics are as follows: / map_2d is input as a two-dimensional environment map to the path planning and path tracking module; / planned_path_full is input as a coverage inspection path to the path tracking control module; / cmd_vel is input as a unified speed control command to the thrust allocation module; and the thrust of the left and right thrusters is fed back to the simulated hull as an execution control quantity. Furthermore, / rviz2 is used to display the point cloud map, path planning results, and robot model, thereby facilitating researchers' observation of the experimental results.
[0131] The current system operation results show that the RViz interface can simultaneously display the point cloud map, work area, and coverage path in the map coordinate system, and the Gazebo scene can display the water environment, shoreline, pier, and unmanned vessel location. This indicates that this embodiment can complete the entire simulation test process from scene construction, data bridging, mapping, planning to control execution. The simulation test operation and parameter control interface of the unmanned garbage sweeper is shown in the figure below. Figure 8 As shown, the simulation system of the present invention is used to demonstrate the parameter configuration, task control and operation monitoring functions in a specific embodiment, so as to illustrate that the present invention can provide a comprehensive test environment with adjustable parameters, controllable process and visualized status feedback for the perception, mapping, planning and control algorithms of unmanned garbage sweeping vessels.
[0132] The following describes the unmanned surface garbage cleaning simulation system provided by the present invention. The unmanned surface garbage cleaning simulation system described below can be referred to in correspondence with the unmanned surface garbage cleaning simulation system method described above.
[0133] like Figure 9 As shown, the system includes a simulation module 901, a construction module 902, a generation module 903, a driving module 904, and a display module 905, wherein:
[0134] The simulation module 901 is used to construct a simulation scenario of water surface garbage cleaning operation, establish a sensor data link of the unmanned vessel model, connect the data of the unmanned vessel model, the environmental information of the simulation scenario and the multi-source sensor data to the ROS2 system, and establish a unified TF coordinate relationship for the multi-source sensor data, the hull pose and the hull joint state.
[0135] The construction module 902 is used to construct a three-dimensional point cloud map by performing coordinate transformation on the lidar point cloud collected by the multi-source sensor from the simulation scene using the unified TF coordinate relationship, and then converting the three-dimensional point cloud map into a two-dimensional map.
[0136] The generation module 903 is used to determine the operating area of the unmanned vessel model, generate a coverage planning path for the unmanned vessel model display module based on the two-dimensional map and the operating area of the unmanned vessel model, and generate speed control commands for the unmanned vessel model based on the planning path.
[0137] The drive module 904 is used to convert the speed control command into the thrust of the unmanned boat model, and use the thrust to drive the hull movement of the unmanned boat model;
[0138] The display module 905 is used to display the three-dimensional point cloud map, the two-dimensional map, the planned path and the unmanned vessel model, and to statistically analyze the indicators of the unmanned vessel simulation results in order to evaluate the unmanned vessel simulation results.
[0139] The advantages of this invention include:
[0140] (1) This invention realizes a closed-loop organization of simulation environment, state transformation, map construction, path planning, path tracking and propulsion execution under a unified ROS2 architecture. Compared with the existing simulation schemes that only provide scenarios and ship models, it can more directly serve the algorithm verification and engineering development of unmanned garbage sweeping boats.
[0141] (2) This invention establishes a consistent mapping link from a three-dimensional point cloud map to a two-dimensional occupied grid map, which enables the environmental point cloud to be stably converted into a two-dimensional navigation map, making it easy for the planning and control module to directly call it, thereby improving the consistency of the water surface task environment expression and the reliability of obstacle avoidance.
[0142] (3) The present invention adopts a combination of full-coverage inspection path and local online correction. On the basis of ensuring the integrity of the target water area inspection, the local path is adjusted according to the real-time garbage target and obstacle information, which reduces the overall replanning frequency, reduces path jitter, and improves the continuity and efficiency of garbage cleaning operation.
[0143] (4) The present invention can conduct controllable and repeatable simulation tests on the unmanned ship mission process under the constraints of wind, waves, current and complex near-shore obstacles, avoiding the high cost, high risk and weather dependence caused by frequent reliance on actual ship testing, thereby reducing the cost of algorithm development and debugging.
[0144] (5) This invention can uniformly evaluate indicators such as regional coverage, garbage identification success rate, operation time, path length and tracking error, which facilitates the comparison of different algorithm schemes under the same conditions and is beneficial to the engineering selection and rapid iteration of unmanned ship systems before actual ship experiments.
[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A simulation method for unmanned surface garbage cleaning boats, characterized in that, include: A simulation scenario for water surface garbage cleaning operation is constructed, a sensor data link for the unmanned vessel model is established, and the data of the unmanned vessel model, the environmental information of the simulation scenario, and the multi-source sensor data are connected to the ROS2 system. A unified TF coordinate relationship is established for the multi-source sensor data, the hull pose, and the hull joint state. After performing coordinate transformation on the lidar point cloud collected by the multi-source sensor from the simulation scene using the unified TF coordinate relationship, a three-dimensional point cloud map is constructed, and the three-dimensional point cloud map is converted into a two-dimensional map. The operating area of the unmanned vessel model is determined, and a coverage planning path for the unmanned vessel model is generated based on the two-dimensional map and the operating area of the unmanned vessel model. Speed control commands for the unmanned vessel model are generated based on the planning path. The speed control command is converted into the thrust of the unmanned vessel model, and the thrust is used to drive the hull movement of the unmanned vessel model. The system displays the 3D point cloud map, 2D map, planned path, and unmanned vessel model, and statistically analyzes the indicators of the unmanned vessel simulation results to evaluate the simulation results. Based on the two-dimensional map and the operating area of the unmanned vessel model, a coverage-based planning path for the unmanned vessel model is generated, including: The operating area of the unmanned vessel model is extracted from the two-dimensional map; Based on the obstacle occupancy status of the grid in the work area and the safe passage width requirements of the unmanned vessel, areas where the distance to the obstacle is less than a preset threshold or do not meet the vessel passage conditions are deleted from the work area to form an effective work area. Multiple parallel inspection baselines are generated within the effective working area according to a preset coverage direction; If the inspection baseline crosses an obstacle or exceeds the boundary, the inspection baseline shall be trimmed. A smooth transition connection segment is generated between adjacent inspection baselines to obtain a coverage planning path; The preset coverage direction is determined by the following formula: J(θ)= αL(θ)+βN t (θ)+γC O (i); Where J(θ) is the comprehensive cost of any candidate coverage direction θ, L(θ) is the total coverage length of the planned path under any candidate coverage direction θ, and N t (θ) represents the number of turns of the planned path under any candidate coverage direction θ, C O (θ) represents the proximity of the planned path to the obstacle under any candidate coverage direction θ, and α, β and γ are weight parameters; Select the candidate coverage direction θ with the smallest J(θ) as the main coverage direction of the current working area; Based on the planned path, speed control commands are generated for the unmanned vessel model, including: Search the planned path for the nearest path point to the current position of the unmanned vessel model; Based on the current heading angle of the unmanned vessel model, determine the forward sight distance of the unmanned vessel model to the planned path; Based on the nearest path point and the forward look distance, select the reference tracking point at the current moment; search for the nearest path point in the path queue based on the current pose, and select the reference tracking point at the current moment in combination with the forward look distance. Specifically, starting from the path point corresponding to the current distance, select the points between the path point corresponding to the current distance and the nearest path point in sequence as reference tracking points, and finally select the nearest path point as the reference tracking point. Calculate the distance deviation, heading deviation, and lateral deviation relative to the current path segment between the current position of the unmanned vessel model and the reference tracking point; The linear velocity control amount is determined based on the distance deviation and the path curvature of the current path segment; The angular velocity control amount is determined based on the heading deviation and lateral deviation. Based on the linear velocity control quantity and the angular velocity control quantity, a speed control command is generated for the unmanned vessel model.
2. The simulation method for unmanned surface garbage cleaning vessels according to claim 1, characterized in that, The simulation scenario includes water boundaries, shorelines, bridge or pier structures, shoreline buildings, obstacles, floating targets, and environmental disturbance data; The environmental disturbance data includes parameters for wind, waves, and currents.
3. The simulation method for unmanned surface garbage cleaning vessel according to claim 1, characterized in that, The data collected by the multi-source sensors includes GPS, IMU, lidar point cloud, and camera images.
4. The simulation method for unmanned surface garbage cleaning vessels according to claim 1, characterized in that, Converting the 3D point cloud map into a 2D map includes: The two-dimensional plane projected from the three-dimensional point cloud map is gridded according to the preset resolution of the two-dimensional map to generate a two-dimensional map grid. The point cloud in the three-dimensional point cloud map is height filtered to retain obstacle points that affect water passage, and the obstacle points are projected onto the two-dimensional plane; Based on the projection of obstacle points within each grid cell in the two-dimensional map grid, determine whether each grid cell is an occupied grid cell; The obstacle region is determined based on the occupied grid, and the obstacle region is then expanded.
5. A simulation system for unmanned surface garbage cleaning vessels, characterized in that, The simulation method for unmanned surface garbage cleaning vessels applied to any one of claims 1-4 includes: The simulation module is used to construct a simulation scenario for water surface garbage cleaning operations, establish a sensor data link for the unmanned vessel model, connect the data of the unmanned vessel model, the environmental information of the simulation scenario, and the multi-source sensor data to the ROS2 system, and establish a unified TF coordinate relationship for the multi-source sensor data, hull pose, and hull joint state. The module is used to construct a three-dimensional point cloud map by performing coordinate transformation on the lidar point cloud collected by the multi-source sensor from the simulation scene using the unified TF coordinate relationship, and then converting the three-dimensional point cloud map into a two-dimensional map. The generation module is used to determine the operating area of the unmanned vessel model, generate a coverage planning path for the unmanned vessel model based on the two-dimensional map and the operating area of the unmanned vessel model, and generate speed control commands for the unmanned vessel model based on the planning path. The drive module is used to convert the speed control command into the thrust of the unmanned boat model, and use the thrust of the thrust to drive the hull movement of the unmanned boat model; The display module is used to display the 3D point cloud map, 2D map, planned path and unmanned vessel model, and to statistically analyze the indicators of the unmanned vessel simulation results in order to evaluate the unmanned vessel simulation results.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the unmanned surface garbage cleaning simulation method as described in any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the unmanned vessel simulation method for cleaning up surface garbage as described in any one of claims 1 to 4.
