Gazebo based USV SITL results in unwanted drift

Thanks to the USV SITL integration work by @Jaeyoung-Lim, I am able to work on the USV SITL although there is an unwanted drift in the direction of both yaw and sway (or, maybe pitch, roll, heave, and surge motions are all combined).

[Not desired trajectory happening at the moment]

[The desired trajectory what I am trying to achieve]

During the past couple of days, I am investigating the cause of this erratic motion and still trying to figure out the cause of this problem by performing basic trials and errors (in particular, I am looking at gazebo_usv_dynamics_plugin.cpp, boat_sitl.main.mix, and 1070_boat files).

Is there anyone who progressed ahead by fixing the error? In the below, I attached all related links to this problem.

[Previous work on PX4 based USV SITL on Gazebo]

[USV SITL on Gazebo in Virtual RoboX (VRX)]

[Six types of motion on a ship]

It might be due to the lack of WAM-V Thrust Articulation.

[Thrust Articulation is not available in current PX4 based USV SITL]
Screenshot from 2020-11-03 10-56-14

[Thrust Articulation is available in VRX based USV SITL]
Screenshot from 2020-11-03 11-00-36

[Effectiveness of Thrust Articulation]

@Sunghun_Jung Thanks for looking into this,

The usv_gazebo_plugin actually is part of the osrf/vrx project which I removed the ROS dependencies and simplified a bit (e.g. you can run it without the wave plugin)

One of the reasons of the erratic behavior is that because there is no feedback in yaw control. Therefore it oscillates around the setpoint. This is why I tried adding a body rate controller specifically for boats:

Regarding thrust articulation I have removed it completely intentionally, since articulation brings over actuation to boat control, which we would want in the future but we need to get differential thrust boats right first.

I will be happy to support you on getting the boat working.

Thank you very much for the info and now understand the status of the USV project.

I started to investigate deeper regarding the yaw rate controller for the USV which you started to implement in

I hope to be able to improve the controller for my USV HW soon. I will keep you be updated.
Thank you very much.

Hi @Sunghun_Jung where you able to run boat simulation reasonably well using PX4 SITL?
Also, where you able to integrate other boat models from vrx with PX4?


@Mzahana What is missing to get boats working is a rate controller: Add support for Acro mode on Rovers with Rates Control by Jaeyoung-Lim · Pull Request #18317 · PX4/PX4-Autopilot · GitHub

Otherwise the boat will not be able to control it’s heading in a stable manner