srmainwaring / asv_wave_sim

This package contains plugins that support the simulation of waves and surface vessels in Gazebo.
GNU General Public License v3.0
122 stars 34 forks source link

Tugboat simulation #48

Closed mzahana closed 2 years ago

mzahana commented 2 years ago

Hi!

Thank you gor this great project.

I have a project where I need to simulate a tugboat with a propulsion system.

Is there any tutorial that could walk me through the required customization steps?

Would the the hydrodynamic plugin in this project be good enough to use in this case? Or I need to implement a different one?

I also believe that I would need to implement a thruster model, right? Would the one in the VRX project ( https://github.com/osrf/vrx/blob/master/usv_gazebo_plugins/src/usv_gazebo_thrust_plugin.cc ) work ?

Any hints are highly appreciated.

Thanks.

srmainwaring commented 2 years ago

Hi @mzahana, there is no separate tutorial as such, but there are some examples which may help.

For a guide on setting a model up with a thruster I'd suggest looking at the WAM-V model in the gz-ignition branch. (I'm planning to make this branch for Gazebo Garden the default ('master`) and put the current version for Gazebo 9 into archive).

The wam-v model uses the Gazebo thruster plugin. I've used ArduPilot for control, but you could use ROS if you prefer - they key is to have some system publishing to the required gz-transport topic.

The hydrodynamics plugin included in this project may be enough. Alternatively you can disable the drag components keeping only the buoyancy, then use the hydrodynamics plugin included in Gazebo Garden. I'd suggest experimenting with both to find the best fit for your requirements.

The other work required is simplifying the collision mesh for the model. I use Blender for this and there are some brief notes describing the procedure in the attached presentation here. The approach is to remove highly detailed mesh features then use the decimate modifier to reduce the vertex count. You could alternatively stack together a number of collision primitives to approximate the the vessel volume instead of using a mesh - I have not tried this but it may be a quicker method to get going.