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
110 stars 29 forks source link

gazebo11 with fft_waves branch #92

Closed esharet closed 1 year ago

esharet commented 1 year ago

Hi, First, thank you for your projects! I am trying to clone your branch fft_waves with gazebo11. everything works ok but the ocean model is crushing. the error I get is libOceanVisualPlugin.so: undefined symbol: _ZN6gazebo9rendering10AttachMeshERNS0_6VisualERKNSt7__cxx111basic_stringIcSt11char_traitsIcESaIcEEESAbSA

when I check it with c++filt I get: gazebo::rendering::AttachMesh(gazebo::rendering::Visual&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)

can you please help me fix it?

srmainwaring commented 1 year ago

Hi @esharet, thanks for your interest. Support for Gazebo9 and Gazebo11 is maintenance only as the development focus is on the new gazebo versions available from https://gazebosim.org/home.

I have rebuilt this branch on an Ubuntu Bionic VM and it appears to be working. I did need to build using upgraded ROS and Gazebo packages so that may be the problem?

Gazebo9 and ROS Melodic are installed using the instructions here:

I then ran an upgrade on mesa-utils which upgraded my VM from 18.04.5 to 18.04.6

$ sudo apt-get install mesa-utils

After which the system is:

Ubuntu version:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:    18.04
Codename:   bionic

Gazebo version:

$ gazebo --version
Gazebo multi-robot simulator, version 9.0.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

Gazebo packages:

$ apt list --installed | grep -i gazebo
gazebo9/bionic,now 9.0.0+dfsg5-3ubuntu1+ppa2 amd64 [installed,automatic]
gazebo9-common/bionic,bionic,now 9.0.0+dfsg5-3ubuntu1+ppa2 all [installed,automatic]
gazebo9-plugin-base/bionic,now 9.0.0+dfsg5-3ubuntu1+ppa2 amd64 [installed,automatic]
libgazebo9/bionic,now 9.0.0+dfsg5-3ubuntu1+ppa2 amd64 [installed,automatic]
libgazebo9-dev/bionic,now 9.0.0+dfsg5-3ubuntu1+ppa2 amd64 [installed,automatic]
libignition-gazebo5/now 5.1.0-1~bionic amd64 [installed,local]
libignition-gazebo5-dev/now 5.1.0-1~bionic amd64 [installed,local]
libignition-gazebo5-plugins/now 5.1.0-1~bionic amd64 [installed,local]
ros-melodic-gazebo-dev/bionic,now 2.8.7-1bionic.20201015.050828 amd64 [installed,automatic]
ros-melodic-gazebo-msgs/bionic,now 2.8.7-1bionic.20221025.190757 amd64 [installed]
ros-melodic-gazebo-plugins/bionic,now 2.8.7-1bionic.20221025.195709 amd64 [installed,automatic]
ros-melodic-gazebo-ros/bionic,now 2.8.7-1bionic.20221025.195022 amd64 [installed,automatic]
ros-melodic-gazebo-ros-control/bionic,now 2.8.7-1bionic.20221025.202747 amd64 [installed]
ros-melodic-gazebo-ros-pkgs/bionic,now 2.8.7-1bionic.20221025.201835 amd64 [installed]

Wave sim branch:

~/Code/robotics/gz_waves_ws/src/asv_wave_sim$ git branch -a
* feature/fft_waves
  master
  remotes/origin/HEAD -> origin/master
  remotes/origin/demo/linear-wave-body
...

Built using:

cd ~/Code/robotics/gz_waves_ws
source /opt/ros/melodic/setup.bash
catkin init
catkin config --cmake-args ~/Code/robotics/gz_waves_ws/src/asv_wave_sim$ git branch -a
catkin build
catkin build --catkin-make-args run_tests

Then run:

source ./devel/setup.bash 
SVGA_VGPU10=0 roslaunch asv_wave_sim_gazebo ocean_world.launch

The SVGA_VGPU10=0 prefix is to disable hardware acceleration on the VM. You may need to reset the path to ignition fuel in ~/.ignition/fuel/config.yaml

ubuntu-bionic_gazebo9_fft-waves

esharet commented 1 year ago

It works, Thank you