VIAM-USV2000: An Unmanned Surface Vessel with Novel Autonomous Capabilities in Confined Riverine Environments

Unmanned Surface Vessels (USVs) have witnessed an increasing growth in demand for development due to their compactness, mobility and maneuverability, which make them well-suited for environmental monitoring on narrow water in Vietnam in particular and in general at several similar tropical regions. However, current surface vessels are limited to operation on open water only. In this paper, we design a USV, namely, VIAM-USV2000, equipped with advanced autonomous capabilities to satisfactorily carry out missions in confined riverine environments. More specifically, our prototype is designed to follow a smooth B-Spline path that is self-planned to meet the limiting curvature and avoid static obstacles. Moreover, the vessel is capable of avoiding dynamic obstacles by an advanced Set-based Guidance mechanism. Simulated and experimental results at a local lake prove the effectiveness of the proposed capabilities, thereby paving the way for the extensive deployment of USVs in many real-world applications.


Introduction
The growing demand for water-based environmental monitoring, resource exploiting and hydrology surveying leads to an increasing interest in the development of innovative unmanned surface vessels [1][2][3]. In particular, USV shows enormous potential in leveraging the task of monitoring water quality at canals and narrow rivers due to its high compactness, mobility and maneuverability, thereby reducing the operating cost to a minimum.
In recent decades, several USV prototypes have been introduced [4,5], all of which are developed for open-sea operation, thus not satisfying the autonomous requirements in confined, complicated and dynamic environments. This fact is particularly held in the case of Vietnam and many tropical regions, making water sampling and monitoring tasks in those areas extremely difficult. Recently, some new prototypes such as Roboat [6] and Roboat II [7] succeed in maneuvering through narrow and crowded urban waterways for transportation of goods and passengers. This helps encourage USV to be more extensively deployed in other restricted regions such as riverine ones. This paper focuses on designing an unmanned surface vessel, namely, VIAM-USV2000, that inherits and enhances the mechanical and electrical design of VIAM-USV1000 [8]. USV2000 differs from its predecessor in its advanced autonomous capabilities: generate and follow a smooth parameterized curve, avoid dynamic obstacles. For path planning,

•
Design hardware-related and software-related components for an unmanned surface vessel, namely, USV2000, to realize advanced autonomous capabilities in confined riverine environments. • Enhance the B-Spline path planner so that it can automatically optimize the curve's shape to meet the limiting curvature and avoid static obstacles. • Develop a continuous LOS path follower for USV to smoothly follow any arbitrary parameterized curve.

•
Develop an advanced SBG law that generates a trapezium-like path for the vessel to avoid dynamic obstacles. • Provide extensive simulated and experimental results to verify the effectiveness of the proposed algorithms in USV2000.
This paper is structured as follows: Section 2 gives a brief overview of hardware specifications and software components, Section 3 gives a detailed description of the path planner, Section 4 explains the path follower in detail, Section 5 illustrates how the obstacle avoider works, Section 6 presents simulated and experimental results and Section 7 concludes the paper.

Hardware Construction
USV2000 features a catamaran design ( Figure 1). As shown in Figure 2, the vessel's actuators are composed of two rear thrusters for moving forward and two side ones for turning. A microcontroller is used to control these thrusters by exporting PWM signals and receive commands from a remote RC controller. An embedded computer plays a central role in realizing navigation, guidance and control strategies: each software component is modularized and exchanges messages in Robot Operating System (ROS) ecosystem. GNSS receiver, AHRS and LiDAR communicate with an embedded computer through UART interface. Data interchange of the embedded computer with a microcontroller is realized by CAN bus, with laptop by Wi-Fi protocol. Detail about each hardware component is mentioned in Table 1. realized by CAN bus, with laptop by Wi-Fi protocol. Detail about each hardware component is mentioned in Table 1.

Software Composition
As in Figure 3, the vessel's autopilot software suite in embedded computer, namely, VIAM-USV-VC, for USV2000 is composed of components that are modularized on the ground of the ROS platform. Each software is organized into a task-specific C++ ROS node

Software Composition
As in Figure 3, the vessel's autopilot software suite in embedded computer, namely, VIAM-USV-VC, for USV2000 is composed of components that are modularized on the ground of the ROS platform. Each software is organized into a task-specific C++ ROS node  Figure 3, the vessel's autopilot software suite in embedded computer, namely, VIAM-USV-VC, for USV2000 is composed of components that are modularized on the ground of the ROS platform. Each software is organized into a task-specific C++ ROS node that communicates with one another via TCPROS protocol. While Navigator publishes the vessel's pose from GNSS receiver's and AHRS's data, Guider realizes a variety of guidance modes (straight-line path following, curve path following, SBG obstacle avoidance) and Controller exports PWM signal for each side thruster based on the current heading error. In addition, LiDAR Transceiver, STM Transceiver and GCS Transceiver are in charge of converting from packets of ROS-exterior protocols (UART, CAN, MAVLink) to that of ROS-interior ones (TCPROS). To maximize resource usage efficiency, we utilize two types of TCPROS connection: message (periodic update by a publish-subscribe mechanism) and service (temporarily available on demand by a request-respond mechanism). Machines 2021, 9, x FOR PEER REVIEW 4 of 20 that communicates with one another via TCPROS protocol. While Navigator publishes the vessel's pose from GNSS receiver's and AHRS's data, Guider realizes a variety of guidance modes (straight-line path following, curve path following, SBG obstacle avoidance) and Controller exports PWM signal for each side thruster based on the current heading error. In addition, LiDAR Transceiver, STM Transceiver and GCS Transceiver are in charge of converting from packets of ROS-exterior protocols (UART, CAN, MAVLink) to that of ROSinterior ones (TCPROS). To maximize resource usage efficiency, we utilize two types of TCPROS connection: message (periodic update by a publish-subscribe mechanism) and service (temporarily available on demand by a request-respond mechanism). The vessel's ground control station (GCS) (Figure 4), namely, VIAM-USV-GC, is a highly customized version of QGroundControl that features two programming layers: QML and C++. QML deals with the front-end part of GCS, offering user-friendly interaction via images, sound, notifications, data visualization, data plotting, etc. On the other hand, C++ makes up the back-end part of GCS, handling computer-intensive tasks such as database management, memory management, device drivers and threading. MAVLink is used to facilitate an efficient, reliable and remote data interchange between ROS-based autopilot and GCS for several advantages: tiny packet's length (max. 279 bytes); support for detecting packet drops, corruption and packet authentication; cross-platform compatibility. The vessel's ground control station (GCS) (Figure 4), namely, VIAM-USV-GC, is a highly customized version of QGroundControl that features two programming layers: QML and C++. QML deals with the front-end part of GCS, offering user-friendly interaction via images, sound, notifications, data visualization, data plotting, etc. On the other hand, C++ makes up the back-end part of GCS, handling computer-intensive tasks such as database management, memory management, device drivers and threading. MAVLink is used to facilitate an efficient, reliable and remote data interchange between ROS-based autopilot and GCS for several advantages: tiny packet's length (max. 279 bytes); support for detecting packet drops, corruption and packet authentication; cross-platform compatibility.

B-Spline Path Generation
B-Spline [10] is a combination of polynomial curves with a degree that goes through a set of + 1 pre-defined waypoints ∈ ℝ . It is parameterized by a variable ∈ 0; 1 as follows: where ∈ ℝ is the position vector at every curve's point, ∈ ℝ is the control vector and , is the normalized basis polynomial of a degree. Value of , at every is recursively calculated by the following formula [10]: Control vectors are derived from the solution of the following equation:

B-Spline Path Generation
B-Spline [10] is a combination of polynomial curves with a p degree that goes through a set of n + 1 pre-defined waypoints d i ∈ R 2 . It is parameterized by a variable u ∈ [0; 1] as follows: where c(u) ∈ R 2 is the position vector at every curve's point, p i ∈ R 2 is the control vector and N i,p (u) is the normalized basis polynomial of a p degree. Value of N i,p (u) at every u is recursively calculated by the following formula [10]: Control vectors are derived from the solution of the following equation: where an intermediate variable t for every waypoint is selected by the centripetal method [21]. From our observation, if the initial heading of the vessel is not taken into account, the generated B-Spline path may contain sharp turns that make it difficult for the vessel to track. Therefore, as in [22], we constrain the path to the desired initial and final velocity vectors of the vessel, denoted v init and v end , respectively, and extend (4) by two more equations as follows:

Genetic Algorithm for Optimal B-Spline Shaping
To adjust the curvature and avoid obstacles, we generate an additional waypoint between initially assigned ones and optimize their positions for minimum path length using a genetic algorithm (GA). Our method takes advantage of the B-Spline's locality: the shape of a B-Spline curve is only locally affected when adding, removing or altering waypoints. This property also helps boost the convergence rate when a heuristic search is performed to optimize the curve's shape.
GA [11] is a popular search-based technique for finding optimal or near-optimal solutions to multi-objective problems. Inspired by biological mechanisms such as mutation, crossover and selection, GA is particularly suited for path planning because of its efficiency when the search space is large and a large number of parameters is involved. In GA, each possible solution is termed an individual, and each search space at every iteration is called a population. By selectively performing crossover across members of the parental population, the descent one is expected to produce a higher number of fitter individuals, or in other words, solutions that are nearer to the optimum. In addition, mutation is employed to maintain genetic diversity from one generation to the next. Similar to [9], every individual a i in a population is encoded as follows: where d i ∈ R 2 is the added waypoint to reshape the curve and v init and v end are the initial and final velocity vectors.
To create the initial population, every added waypoint is randomly selected in a square region formed by two nearby original waypoints. Panmictic generalized intermediate recombination [23] is used for crossover. Inspired by [24], the cost function to evaluate each individual's fitness is as follows: where L(a i ) represents the path's length associated with each individual a i , L max is the maximum path's length in the current population and g(a i ) is the total penalty function as follows: If all individuals satisfy constraints, (7) only depends on the path's length. Otherwise, (7) depends on both the path's length and penalty function. The philosophy behind this cost function's design is to favor satisfying all constraints, which includes curvature limiting and obstacle avoidance to search for the shortest path.
After finding the vessel's radius of turning R turn through maneuvering test, the limiting curvature κ lim is defined as: Machines 2021, 9, 133 7 of 20 The penalty component of curvature g curv (·) is calculated using κ lim and the maximum curvature κ max of the curve associated with each individual a i : where κ max of a parameterized curve C = {x(θ), y(θ)} is calculated as follows: ..
To plan a collision-free path through static obstacles, we complement our former path planner [9] with an additional penalty term g obs i (·) in (8) that punishes the act of obstacle collision. Consider an obstacle i with center O in Figure 5: The penalty component of curvature • is calculated using and the maximum curvature of the curve associated with each individual : where of a parameterized curve = , is calculated as follows: To plan a collision-free path through static obstacles, we complement our former path planner [9] with an additional penalty term • in 8 that punishes the act of obstacle collision. Consider an obstacle i with center in Figure 5: The radius of avoidance is the summation of the obstacle's radius and radius of safety : For efficiency, instead of a brute-force search at every point on the curve for , we limit the searching region between two nearest original waypoints from . Then , which is the projection of onto the curve, can be found by an iterative procedure based on Newton-Raphson method in Section 4. After is found, we obtain and compare with to arrive at the penalty component relating to obstacle :

Path Following
Given a smooth parameterized curve as follows: Our task is to design a law that makes the vessel follow this curve as close as possible. As in Figure 6, instead of discretizing the curve and applying straight LOS law among The radius of avoidance R avoid is the summation of the obstacle's radius R obs and radius of safety R safe : For efficiency, instead of a brute-force search at every point on the curve for A, we limit the searching region between two nearest original waypoints from O. Then A, which is the projection of O onto the curve, can be found by an iterative procedure based on Newton-Raphson method in Section 4. After A is found, we obtain l OA and compare with R avoid to arrive at the penalty component relating to obstacle i:

Path Following
Given a smooth parameterized curve C as follows: Machines 2021, 9, 133 8 of 20 Our task is to design a law that makes the vessel follow this curve as close as possible. As in Figure 6, instead of discretizing the curve and applying straight LOS law among infinitesimal displacements, we devise a new method to track the curve by first finding the projection O of the vessel's center of navigation O.
Machines 2021, 9, x FOR PEER REVIEW  8 of 20 infinitesimal displacements, we devise a new method to track the curve by first finding the projection ′ of the vessel's center of navigation . Then cross-track error (CTE) is calculated based on coordinates of the projection 〈 ′ , ′ 〉, coordinates of the vessel 〈 , 〉 and the tangent angle : where is continuously computed by trigonometric relation between partial derivatives: Finally, the desired heading sent to the controller is as follows: where ∆ determines how quickly the vessel returns to the path. If ∆ is set too high, the vessel returns quickly but can oscillate.
To find ′, we apply the Newton-Raphson iterative method. Our new scheme to find the projection 〈 , 〉 is as follows in Table 2: Table 2. Algorithm to find the projection of the vessel's center of navigation onto the curve.

Process
1. Initialize with the most recently found projection. 2. Iterate to update until the stopping criteria are met: End with coordinates of the projection: where γ is continuously computed by trigonometric relation between partial derivatives: Finally, the desired heading sent to the controller is as follows: where ∆ determines how quickly the vessel returns to the path. If ∆ is set too high, the vessel returns quickly but can oscillate.
To find O , we apply the Newton-Raphson iterative method. Our new scheme to find the projection x O , y O is as follows in Table 2: Table 2. Algorithm to find the projection of the vessel's center of navigation onto the curve.

Input
Vessel's current center of navigation Initialize θ with the most recently found projection.

2.
Iterate to update θ until the stopping criteria are met: ..

Obstacle Avoidance
According to Velocity Obstacle (VO) algorithm (Figure 7), in the obstacle's frame of reference, the obstacle can be considered static and the vessel moves with a relative velocity v uo = v u − v o , so we can simplify a dynamic obstacle avoidance problem into a static one.

Obstacle Avoidance
According to Velocity Obstacle (VO) algorithm (Figure 7), in the obstacle's frame of reference, the obstacle can be considered static and the vessel moves with a relative velocity = − , so we can simplify a dynamic obstacle avoidance problem into a static one. An obstacle is modeled by a single point with a radius of danger . The region bounded by the polygon UT OT is denoted ConeSpace T UT . When , anchored in the vessel, lies within ConeSpace T UT , it may collide. So to prevent collision, must satisfy: where = − is the relative displacement between the vessel and obstacle. Upon obstacle detection, the vessel must change direction so that the new relative velocity satisfies 18 . This is realized by making collide with UT or UT according to COL-OREGS law in Table 3, where is the current heading of the obstacle. Overtaking UT The final desired heading that the vessel must drive towards is as follows: where = − and is the desired velocity of the vessel. Advanced SBG (Figure 8) enhances the performance of SBG with four distinct modes: tracking (mode 1), avoiding (mode 2), distance keeping (mode 3) and homing (mode 4). Within modes 2-4, the vessel is commanded to track every trapezoid's side with desired headings auto-selected from VO to efficiently and safely avoid obstacles. An obstacle is modeled by a single point with a radius of danger R s . The region bounded by the polygon UT − OT + is denoted ConeSpace T − UT + . When v uo , anchored in the vessel, lies within ConeSpace T − UT + , it may collide. So to prevent collision, v uo must satisfy: where r uo = r u − r o is the relative displacement between the vessel and obstacle. Upon obstacle detection, the vessel must change direction so that the new relative velocity satisfies (18). This is realized by making v uo collide with UT + or UT − according to COLOREGS law in Table 3, where ψ o is the current heading of the obstacle.
The final desired heading ψ ud that the vessel must drive towards is as follows: where v uod = v ud − v o and v ud is the desired velocity of the vessel. Advanced SBG (Figure 8) enhances the performance of SBG with four distinct modes: tracking (mode 1), avoiding (mode 2), distance keeping (mode 3) and homing (mode 4). Within modes 2-4, the vessel is commanded to track every trapezoid's side with desired headings auto-selected from VO to efficiently and safely avoid obstacles. Machines 2021, 9, x FOR PEER REVIEW 10 of 20 To realize the advanced SBG, we need to find , and as follows: where is the slope of the global path, = in case of head-on and = in case of overtaking and crossing, is the moment to enter mode 2 when the distance between our vessel and the obstacle drops below a threshold. The moment to enter mode 3 and mode 4 is when meets 18 but with the assumption that equals and , respectively.

Simulated and Experimental Results
To verify the effectiveness of the proposed algorithms, we carry out computer simulations in MATLAB and experiments in a local lake. The B-Spline path planner is firstly implemented in MATLAB for ease of design and evaluation, then realized by C++ code in VIAM-USV-GC to facilitate user-friendly interaction. The continuous LOS path follower is validated by simulated MATLAB results before C++ realization in VIAM-USV-VC for experiments. We only provide experimental results of our advanced SBG scheme since simulated ones are extensively discussed in [20].

Simulated Result of B-Spline Path Planner and Continuous LOS Path Follower
As in Figure 9, we build a MATLAB/Simulink system to simulate the behavior of B-Spline path planner and continuous LOS path follower before real-world deployment. A PD heading controller is implemented to generate heading torque for a reduced 3-DOF USV model.  To realize the advanced SBG, we need to find γ 1 , γ 2 and γ 3 as follows: (20) where α k is the slope of the global path, µ = π 4 in case of head-on and µ = π 6 in case of overtaking and crossing, t 1 is the moment to enter mode 2 when the distance between our vessel and the obstacle σ drops below a threshold. The moment to enter mode 3 and mode 4 is when v uo meets (18) but with the assumption that ψ u equals γ 2 and γ 3 , respectively.

Simulated and Experimental Results
To verify the effectiveness of the proposed algorithms, we carry out computer simulations in MATLAB and experiments in a local lake. The B-Spline path planner is firstly implemented in MATLAB for ease of design and evaluation, then realized by C++ code in VIAM-USV-GC to facilitate user-friendly interaction. The continuous LOS path follower is validated by simulated MATLAB results before C++ realization in VIAM-USV-VC for experiments. We only provide experimental results of our advanced SBG scheme since simulated ones are extensively discussed in [20].

Simulated Result of B-Spline Path Planner and Continuous LOS Path Follower
As in Figure 9, we build a MATLAB/Simulink system to simulate the behavior of B-Spline path planner and continuous LOS path follower before real-world deployment. A PD heading controller is implemented to generate heading torque for a reduced 3-DOF USV model. To realize the advanced SBG, we need to find , and as follows: where is the slope of the global path, = in case of head-on and = in case of overtaking and crossing, is the moment to enter mode 2 when the distance between our vessel and the obstacle drops below a threshold. The moment to enter mode 3 and mode 4 is when meets 18 but with the assumption that equals and , respectively.

Simulated and Experimental Results
To verify the effectiveness of the proposed algorithms, we carry out computer simulations in MATLAB and experiments in a local lake. The B-Spline path planner is firstly implemented in MATLAB for ease of design and evaluation, then realized by C++ code in VIAM-USV-GC to facilitate user-friendly interaction. The continuous LOS path follower is validated by simulated MATLAB results before C++ realization in VIAM-USV-VC for experiments. We only provide experimental results of our advanced SBG scheme since simulated ones are extensively discussed in [20].

Simulated Result of B-Spline Path Planner and Continuous LOS Path Follower
As in Figure 9, we build a MATLAB/Simulink system to simulate the behavior of B-Spline path planner and continuous LOS path follower before real-world deployment. A PD heading controller is implemented to generate heading torque for a reduced 3-DOF USV model.  It is essential that the vessel go past every waypoint. To accomplish this mission, we examine how the vessel's physical turning capability affects the tracking performance by planning two paths, one satisfying (case 1) the limiting curvature and the other not (case 2) ( Figure 10). It is essential that the vessel go past every waypoint. To accomplish this mission, we examine how the vessel's physical turning capability affects the tracking performance by planning two paths, one satisfying (case 1) the limiting curvature and the other not (case 2) (Figure 10).  Figure 11 and Table 4 imply that although the length of the planned path in case 2 is shorter than that of case 1; the traveled distance is longer since the vessel cannot physically follow this path. In terms of heading tracking, according to Figure 12 and Table 4, the heading error in case 1 is smaller than that of case 2, resulting in the control signal in case 1 fluctuating less. This makes CTE in case 1 significantly smaller compared to that of case 2. Finally, the original objective to go past waypoints in case 1 is accomplished to a greater extent. A conclusion worth drawing from this simulated result is that designing a path that meets the limiting curvature plays an essential role in excelling the path following's performance in general.  Figure 11 and Table 4 imply that although the length of the planned path in case 2 is shorter than that of case 1; the traveled distance is longer since the vessel cannot physically follow this path. In terms of heading tracking, according to Figure 12 and Table 4, the heading error in case 1 is smaller than that of case 2, resulting in the control signal in case 1 fluctuating less. This makes CTE in case 1 significantly smaller compared to that of case 2. Finally, the original objective to go past waypoints in case 1 is accomplished to a greater extent. A conclusion worth drawing from this simulated result is that designing a path that meets the limiting curvature plays an essential role in excelling the path following's performance in general.
Machines 2021, 9, x FOR PEER REVIEW 11 of 20 It is essential that the vessel go past every waypoint. To accomplish this mission, we examine how the vessel's physical turning capability affects the tracking performance by planning two paths, one satisfying (case 1) the limiting curvature and the other not (case 2) (Figure 10).  Figure 11 and Table 4 imply that although the length of the planned path in case 2 is shorter than that of case 1; the traveled distance is longer since the vessel cannot physically follow this path. In terms of heading tracking, according to Figure 12 and Table 4, the heading error in case 1 is smaller than that of case 2, resulting in the control signal in case 1 fluctuating less. This makes CTE in case 1 significantly smaller compared to that of case 2. Finally, the original objective to go past waypoints in case 1 is accomplished to a greater extent. A conclusion worth drawing from this simulated result is that designing a path that meets the limiting curvature plays an essential role in excelling the path following's performance in general.

Maneuvering Test
The purpose of this test is to determine the USV2000 s radius of turning, whose inversion is the limiting curvature of the vessel. The procedure is as follows: we export a fixed PWM signal (40%) to two rear thrusters but a maximum (100%) PWM signal to two side ones. Given that the obtained GPS position is very noisy, approximate B-Spline interpolation [22] is chosen to interpolate a smooth parameterized curve from noisy GPS data in order to calculate the curvature at every point on the traveled trajectory. As in Figure 13, it is apparent that the estimated trajectory is very smooth and fits quite well with the original GPS one.
(b) (d) Figure 11. Simulated result of path follower: the traveled path and the corresponding curvature plot in case 1 (a,b) and case 2 (c,d).   From this estimated B-Spline path, we can easily plot the curvature at every point ( Figure 13) and pick the suitable curvature (Table 5) as a candidate for the calculation of the radius of turning. From now on, USV2000 s radius of turning is chosen as 4 m, resulting in the limiting curvature being 0.25 m −1 .  Figure 13. Approximately interpolate B-Spline curve from GPS data in (a); curvature analysis of USV2000 in (b).

Experimental Result of B-Spline Path Planner and Continuous LOS Path Follower
In this experiment, we design a mission as follows: first, USV2000 departs from a harbor with a minus-90-degree heading, then follows the planned path as close as possible and finally returns home with a 90-degree heading. The environment that our vessel must operate is a local lake, which is confined in space and small in size. This poses a huge challenge to vessels, since they can accidentally collide with the bank when making a sharp turn. This type of collision is uncontrollable and mainly stems from the fact that our vessel cannot physically follow those paths whose maximum curvature exceeds the vessel's limiting one. To solve the problem, our proposed path planner comes into play. Parameters of B-Spline path planner with GA optimization are listed in Table 6. As can be seen in Figure 14, the planned B-Spline path not only goes through all waypoints and avoids static obstacles but also meets the limiting curvature of USV2000 ( Figure 15). After path planning, the vessel needs to follow the pre-defined path as close as possible. A PD heading controller is implemented, and a constant PWM signal (40%) is exported to two rear thrusters. As in Figure 14, the fitness between the traveled and planned paths is acceptable in relation to the overall traveled distance. From Table 7 and Figure  16, it is noticeable that the heading error is quite small, resulting in the control signal exhibiting a slight fluctuation in amplitude. Our vessel tracks well through all waypoints with a maximum deviation of 0.47 m and does not violate prohibited regions.

Experimental Result of B-Spline Path Planner and Continuous LOS Path Follower
In this experiment, we design a mission as follows: first, USV2000 departs from a harbor with a minus-90-degree heading, then follows the planned path as close as possible and finally returns home with a 90-degree heading. The environment that our vessel must operate is a local lake, which is confined in space and small in size. This poses a huge challenge to vessels, since they can accidentally collide with the bank when making a sharp turn. This type of collision is uncontrollable and mainly stems from the fact that our vessel cannot physically follow those paths whose maximum curvature exceeds the vessel's limiting one. To solve the problem, our proposed path planner comes into play. Parameters of B-Spline path planner with GA optimization are listed in Table 6. As can be seen in Figure 14, the planned B-Spline path not only goes through all waypoints and avoids static obstacles but also meets the limiting curvature of USV2000 ( Figure 15). After path planning, the vessel needs to follow the pre-defined path as close as possible. A PD heading controller is implemented, and a constant PWM signal (40%) is exported to two rear thrusters. As in Figure 14, the fitness between the traveled and planned paths is acceptable in relation to the overall traveled distance. From Table 7 and Figure 16        In this experiment, USV2000 is planned to follow a straight line. During operation, the vessel must avoid any dynamic obstacle upon detection, then return along the original global path as fast as possible. The type of obstacle deployed is another moving vessel ( Figure 17), which is frequently encountered in practice. All vessels must obey COLOREGS law. Three typical situations are taken into consideration: head-on, overtaking and crossing. While in a head-on case, USV2000 encounters an obstacle moving straight towards; the overtaking situation requires that USV2000 bypass an obstacle moving away from it. In crossing cases, USV2000 is required to avoid an obstacle coming from the right. While USV2000 performs collision avoidance, according to COLOREGS law, the targeted obstacle must maintain its speed and heading. To measure the distance to the obstacle, LiDAR is used. Throughout the experiments, the obstacle's heading is given in advance. Parameters of the advanced SBG are listed in Table 8.

Experimental Result of Advanced SBG for Obstacle Avoidance
In this experiment, USV2000 is planned to follow a straight line. During operation, the vessel must avoid any dynamic obstacle upon detection, then return along the original global path as fast as possible. The type of obstacle deployed is another moving vessel (Figure 17), which is frequently encountered in practice. All vessels must obey COL-OREGS law. Three typical situations are taken into consideration: head-on, overtaking and crossing. While in a head-on case, USV2000 encounters an obstacle moving straight towards; the overtaking situation requires that USV2000 bypass an obstacle moving away from it. In crossing cases, USV2000 is required to avoid an obstacle coming from the right. While USV2000 performs collision avoidance, according to COLOREGS law, the targeted obstacle must maintain its speed and heading. To measure the distance to the obstacle, LiDAR is used. Throughout the experiments, the obstacle's heading is given in advance. Parameters of the advanced SBG are listed in Table 8.  Experimental results in all three situations (Figures 18-20) show that the vessel manages to avoid obstacles and maintain a safe distance during operation. After successful obstacle avoidance, the vessel immediately returns to the original global path, implying Experimental results in all three situations (Figures 18-20) show that the vessel manages to avoid obstacles and maintain a safe distance during operation. After successful obstacle avoidance, the vessel immediately returns to the original global path, implying that the algorithm does not affect the path following's performance. It is noticeable that the path's length in the overtaking case is longer than that of other cases because the relative velocity between vessel and obstacle is smaller. There are abrupt changes in the desired heading's plot, but USV2000 is flexible enough to perform heading tracking at an acceptable degree, thereby elegantly accomplishing those missions.
Machines 2021, 9, x FOR PEER REVIEW 17 of 20 that the algorithm does not affect the path following's performance. It is noticeable that the path's length in the overtaking case is longer than that of other cases because the relative velocity between vessel and obstacle is smaller. There are abrupt changes in the desired heading's plot, but USV2000 is flexible enough to perform heading tracking at an acceptable degree, thereby elegantly accomplishing those missions. that the algorithm does not affect the path following's performance. It is noticeable that the path's length in the overtaking case is longer than that of other cases because the relative velocity between vessel and obstacle is smaller. There are abrupt changes in the desired heading's plot, but USV2000 is flexible enough to perform heading tracking at an acceptable degree, thereby elegantly accomplishing those missions.

Conclusions
In this paper, we embed into our newly built USV prototype, namely, VIAM-USV2000, various advanced autonomous capabilities to satisfactorily carry out missions in confined riverine environments in Vietnam and other similar tropical regions. First, a B-Spline path planner is enhanced in that it not only meets the limiting curvature but also exhibits enough flexibility to avoid static obstacles. To smoothly track any arbitrary parameterized curve, we propose a continuous LOS path follower based on a Newton-Raphson iterative procedure that features a continuous projection of the vessel's center of navigation onto the curve. An advanced SBG law is also proposed to plan a trapezium-like local path for avoiding dynamic obstacles on the fly. Simulated and experimental results show that the proposed B-

Conclusions
In this paper, we embed into our newly built USV prototype, namely, VIAM-USV2000, various advanced autonomous capabilities to satisfactorily carry out missions in confined riverine environments in Vietnam and other similar tropical regions. First, a B-Spline path planner is enhanced in that it not only meets the limiting curvature but also exhibits enough flexibility to avoid static obstacles. To smoothly track any arbitrary parameterized curve, we propose a continuous LOS path follower based on a Newton-Raphson iterative procedure that features a continuous projection of the vessel's center of navigation onto the curve. An advanced SBG law is also proposed to plan a trapezium-like local path for avoiding dynamic obstacles on the fly. Simulated and experimental results show that the proposed B-

Conclusions
In this paper, we embed into our newly built USV prototype, namely, VIAM-USV2000, various advanced autonomous capabilities to satisfactorily carry out missions in confined riverine environments in Vietnam and other similar tropical regions. First, a B-Spline path planner is enhanced in that it not only meets the limiting curvature but also exhibits enough flexibility to avoid static obstacles. To smoothly track any arbitrary parameterized curve, we propose a continuous LOS path follower based on a Newton-Raphson iterative procedure that features a continuous projection of the vessel's center of navigation onto the curve. An advanced SBG law is also proposed to plan a trapezium-like local path for avoiding dynamic obstacles on the fly. Simulated and experimental results show that the proposed B-Spline path planner and continuous LOS path follower enable the vessel to smoothly maneuver with moderate CTE through consecutive, sharp bends. During operation, the safety issue is guaranteed when the vessel always succeeds in avoiding and maintaining a minimum distance from any dynamic obstacle in various circumstances. It is also important to restate that all algorithms are realized by an efficient implementation of hardware-software infrastructure, thereby maintaining modularity, specialty and parallelity to maximize resource usage and facilitate simple maintenance, replacement and upgrade. To our belief, this USV model can open up many real-world applications such as environmental monitoring in a variety of remote areas all around the world.