jhlenes / usv_simulator

USV simulator for ROS Melodic and Gazebo 9. Copied from an old version of https://github.com/osrf/vrx
57 stars 13 forks source link

Parameter descriptions #4

Closed Muhayyuddin closed 2 years ago

Muhayyuddin commented 2 years ago

Hi @jhlenes

@jhlenes Thank you for such a nice work. I was trying to adapt your controller for ROS2. I have some general questions regarding the parameters used, I am sorry for asking such a basic question. I would like to know what are mass_psi, damp_psi, mass_u, and damp_u. how did you obtain these values?

  // Heading controller
  double mass_psi = 10.0 - 1.0; // Iz - nDotR
  double damp_psi = 20.0; // nR

  // Speed controller
  double mass_u = 29 - 5.0; // m - xDotU: 29 - 5
  double damp_u = 20.0; // xU

Could you please refer to some article or book etc that explains it? I was trying to find it in your thesis pdf but I didn't found.

Looking for your early response.

Regards Gm

jhlenes commented 2 years ago

It has been some time since I did this, so I am not sure about the details.

It looks like both the speed and heading controller are based on a simple linear mass-damper-spring system. Relevant theory is described in Fossen, T.I., 2011. Handbook of marine craft hydrodynamics and motion control. John Wiley & Sons. chapter 7.1.

The actual values are just taken from usv_gazebo_dynamics_plugin.cc. This project is based on an early copy of https://github.com/osrf/vrx, they explain some of the theory behind the simulations in that project.

Muhayyuddin commented 2 years ago

@jhlenes, Thank you for the detailed answer much appreciated :-)