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
114 stars 31 forks source link

Fix out of sync linkPose and linkCoGPose in hydrodynamics update #38

Closed srmainwaring closed 2 years ago

srmainwaring commented 2 years ago

This PR fixes an issue where the linkPose and linkCoGPose are out of sync in PreUpdate which results in an object with an initial pose different from the origin having an invalid water patch.

Details

The issue is apparent after #36 because the collision pose calculation is now updated correctly.

The fix is to use the same worldPose() utility function to update the link and linkCoG pose rather than rely on the component values set on the entity (which appear to be sync'd in Update()).