osrf / vrx

Virtual RobotX (VRX) resources.
Apache License 2.0
421 stars 189 forks source link

Use a global synchronized wavefield #598

Closed caguero closed 1 year ago

caguero commented 1 year ago

Fixes #564 using Gazebo Transport.

Before this patch, all the plugins using a wave field needed to have the same <wavefield> SDF parameter block in its SDF plugin definition. This pull request changes this behavior by:

Our WaveVisual plugin is set to operate as the primary. All the instances of Surface and PolyhedreaBuoyancyDrag plugins are set to operate as secondary.

How to test it?

and verify that the buoys and the WAM-V move a bit up and down.

Recompile and launch the simulation again. You should verify now that the WAM-V and the buoys stay flat at the water surface. [Edit: updated test instructions]

caguero commented 1 year ago

@M1chaelM , as we discussed offline, I've created a PublishPlugin to publish the wave field parameters every 2 seconds. All worlds in this PR use this plugin now. This is good to go for a review.