This package contains plugins that support the simulation of waves and surface vessels in Gazebo.
You will need a working installation of ROS and Gazebo in order to use this package.
- Ubuntu 18.04
- ROS Melodic Morenia
- Gazebo version 9.0.0
Install CGAL 4.13 libraries:
sudo apt-get install libcgal-dev
- OSX 10.11.6
- ROS Melodic Morenia
- Gazebo version 9.6.0
Install CGAL 4.13 libraries:
brew install cgal
Source your ROS installation:
source /opt/ros/melodic/setup.bash
source /usr/local/share/gazebo-9/setup.bash
Create a catkin workspace:
mkdir -p asv_ws/src
cd asv_ws
catkin init
Configure catkin:
catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo
Clone the asv_wave_sim
repository:
cd src
git clone https://github.com/srmainwaring/asv_wave_sim.git
Compile the packages:
catkin build
or with tests:
catkin build --catkin-make-args run_tests
The wiki has details about how to configure and use the plugins:
Manually run the tests:
./devel/lib/asv_wave_sim_gazebo_plugins/UNIT_Algorithm_TEST
./devel/lib/asv_wave_sim_gazebo_plugins/UNIT_Geometry_TEST
./devel/lib/asv_wave_sim_gazebo_plugins/UNIT_Grid_TEST
./devel/lib/asv_wave_sim_gazebo_plugins/UNIT_Physics_TEST
./devel/lib/asv_wave_sim_gazebo_plugins/UNIT_Wavefield_TEST
Launch a Gazebo session with roslaunch
:
roslaunch asv_wave_gazebo ocean_world.launch verbose:=true
Publish a wave parameters message:
./devel/lib/asv_wave_sim_gazebo_plugins/WaveMsgPublisher \
--number 3 \
--amplitude 1 \
--period 7 \
--direction 1 1 \
--scale 2 \
--angle 1 \
--steepness 1
Publish a hydrodynamics parameters message:
./devel/lib/asv_wave_sim_gazebo_plugins/HydrodynamicsMsgPublisher \
--model box \
--damping_on true \
--viscous_drag_on true \
--pressure_drag_on false \
--cDampL1 10 \
--cDampL2 1 \
--cDampR1 10 \
--cDampR2 1
For more detail see the Example page in the wiki.
Melodic | |
---|---|
asv_wave_sim |
Melodic | |
---|---|
asv_wave_sim |
This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
This project makes use of other open source software, for full details see the file LICENSE_THIRDPARTY.
- Jacques Kerner's two part blog describing boat physics for games: Water interaction model for boats in video games and Water interaction model for boats in video games: Part 2.
- The CGAL libraries are used for the wave field and model meshes.
- The UUV Simulator package for the orginal vertex shaders used in the wave field visuals.
- The VMRC package for textures and meshes used in the wave field visuals.