alexglzg / gym-usv

OpenAI gym environment of an Unmanned Surface Vehicle.
MIT License
41 stars 10 forks source link

accuracy #3

Open qululu615 opened 2 years ago

qululu615 commented 2 years ago

Hello, Alejandro Recently, I've been reading your code about USV path tracking of unmanned surface vehicle published on GitHub, which uses ddpg neural network architecture. However, no matter how I run it, I can track straight lines with great error, such as longitudinal displacement error Ye. If I track other paths (such as curves and sinusoidal function lines), the error will be even greater. I think the tracking effect in your paper is very good. Could you give me some suggestions, Thank you. A beginner who follows you

alexglzg commented 2 years ago

Hi @qululu615 Are you training the system or are you using some pre-trained weights? If it is the training case, it may be the environment you are using. The one that should work is usv_asmc_env.py. Otherwise, it might just require more training iterations to learn a better policy.

qululu615 commented 2 years ago

Hello, Alejandro how have you been? I have debugged the line tacking and found that it can be tracked more accurately. Now there is problems that I want to track the curve ,such as the arc curve and trigonometric function curve, but I cannot track it anyway and the error is very large, is it the problem that the code can only track the line? Curve tracking training is not possible Could you give me some suggestions, Thank you.

alexglzg commented 2 years ago

Hello @qululu615 How are you computing the angle ak and the cross-track error ye? The approach was tailored mostly for straight-line path-following, so there may be some adjustments required for curved path-following. Particularly, since the approach is not time-dependant (it is not trajectory tracking), the computation of the closest point to compute the angle ak and the cross-track error ye should be added, See for instance https://ieeexplore.ieee.org/document/9016254

qululu615 commented 2 years ago

Hello, Alejandro Since this code can only be used for straight-line path tracking, there is a scenario in your paper. The second is zig-zag path tracking . Can this code be applied to the zig-zag path tracking ? thank you

alexglzg commented 2 years ago

Hello @qululu615 Yes, the code can be used for the zig-zag path. When you have a zig-zag path, it is a series of straight-line paths. Then, once you are close enough (inside an arbitrary radius) of the second waypoint of the path, you change the objective waypoint and starting points. Hence, your second waypoint becomes your new starting coordinate, and the third waypoint becomes your new goal coordinate. The computation of the cross-track error will then be updated, and the guidance law will steer the vehicle in a new direction.

qululu615 commented 1 year ago

@alexglzg I'm sorry to bother you again. Would you like to share the discount program of unmanned craft path tracking with Github? I'd appreciate it