gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.17k stars 477 forks source link

No sounds I heard, when I tried openal.world with gazebo5. #1984

Closed osrf-migration closed 8 years ago

osrf-migration commented 8 years ago

Original report (archived issue) by Masaru Shimizu (Bitbucket: Masaru Shimizu).


Hi. I tried to use openal.world with gazebo5 on Ubuntu 14.04, but I heard no sound, when a cube touched the ground plane. After I found some past gazebo tracker documents, I tried moving the sphere which has a microphone at several places around the cube. But it did not give me any effects.

Then I wrote a wrong sound filename in openal.world on purpose. But any error message did not appear from gazebo, although I run gazebo with verbose option.

......
    <audio_source>
      <uri>file://media/audio/cheer-.mp3</uri>
      <pitch>2.0</pitch>
      <gain>30.0</gain>
      <loop>1</loop>
      <contact>
        <collision>collision</collision>
      </contact>
    </audio_source>
......

Now I am guessing that the sound system is not working in gazebo5. If it is true, please tell me which version of gazebo I can use the sound system. Or does it require some additional package for the sound system with gazebo5?

Thanks.

osrf-migration commented 8 years ago

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


Are you sure you have OpenAL installed?

sudo apt-get install libopenal-dev

osrf-migration commented 8 years ago

Original comment by Masaru Shimizu (Bitbucket: Masaru Shimizu).


Thank you for your help.

I tried your suggestion, but it was no effect. I'm searching how to check OpenAL can work in my machine. Do you know some tools to check OpenAL?

Thank you.

osrf-migration commented 8 years ago

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


Did you install Gazebo from debian packages or did you build it from source?

osrf-migration commented 8 years ago

Original comment by Masaru Shimizu (Bitbucket: Masaru Shimizu).


No, I did not install Gazebo from debian packages , I did not build Gazebo from source. That is the point of this issue? Do I need one of them?

osrf-migration commented 8 years ago

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


OpenAL is an optional dependency for Gazebo, which means you might have a version of Gazebo which doesn't support it.

It may be the case that the debian packages distributed (the ones you get when you install gazebo using sudo apt-get), didn't include this optional dependency. So the only way to get it to work is to install OpenAL as I said before, and then build Gazebo from source, see this tutorial.

@j-rivero , do you know if OpenAL should work in Gazebo5 debs?

osrf-migration commented 8 years ago

Original comment by Masaru Shimizu (Bitbucket: Masaru Shimizu).


Thank you very much. I will build Gazebo from source.

osrf-migration commented 8 years ago

Original comment by Masaru Shimizu (Bitbucket: Masaru Shimizu).


Which version of gazebo do you recommend to use the openal library? Is version 5 builded from source enough?

osrf-migration commented 8 years ago

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


I recommend you install the latest long term support version, which is 7.

osrf-migration commented 8 years ago

Original comment by Masaru Shimizu (Bitbucket: Masaru Shimizu).


Building Gazebo7 was done.
And I need one more step. Now, I received an error : "No FFMPEG audio decoder. Missing FFMPEG libraries.".
Then I installed ffmepg with following commands:

sudo add-apt-repository ppa:mc3man/trusty-media  
sudo apt-get update  
sudo apt-get install ffmpeg  
sudo apt-get install libffmpegthumbnailer4 libffmpegthumbnailer-dev  

But the same error massage I got again.
Could you help me?

Thanks.

osrf-migration commented 8 years ago

Original comment by Masaru Shimizu (Bitbucket: Masaru Shimizu).


Thank you for your support, Dr.Louise.
(Arigatou gozaimasita. :-)

My issue was solved by your advices.
I heard sounds in openal.world.
It's very nice for my experiments.

Followings are my installation memo.
I hope that the installation memo will help someone.

Bye.

Building Gazebo from source

This document is a memo of installing of Gazebo7 on clean installed Ubuntu 14.04.

Installing Required packages

sudo apt-get -y install mercurial g++ libopenal-dev libogre-1.9-dev qt4-qmake qt4-dev-tools qt4-default libfreeimage-dev libprotobuf-dev libprotoc-dev libcurl4-openssl-dev libtinyxml-dev libtinyxml2-dev libtar-dev libtbb-dev  

Installing IGNITION-TRANSPORT-DEV

*Install libignition-transport-dev

sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'  
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -  
sudo apt-get update  
sudo apt-get -y install libignition-transport-dev  

Installing FFMPEG

*Download FFmpeg

*Compiling ffmpeg

*FFPLAY binary not getting generated on compilation

sudo apt-get install yasm libsdl1.2-dev libmp3lame-dev libx264-dev  
(Download ffmpeg-X.Y.Z.tar.gz2 from ffmpeg home page and unzip it on $HOME)  
cd ~/ffmpeg*  
cat INSTALL.md  
./configure --disable-static --enable-shared --enable-gpl  
make  
sudo make install  
echo 'export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}' >> ~/.bashrc  
hash -r  
cd  
\rm -r ffmpeg*  

Building Gazebo

*Install Gazebo from source

(Build And Install ignition math)  
(Build And Install SDFormat)  
(Download source of Gazebo with hg)  
cd /tmp/gazebo  
hg up gazebo7  
mkdir build  
cd build  
cmake ../ -DCMAKE_INSTALL_PREFIX=${HOME}/local  
make -j4  
make install  
echo 'export LD_LIBRARY_PATH=${HOME}/local/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH}' >> ~/.bashrc  
echo 'export PATH=${HOME}/local/bin:${PATH}' >> ~/.bashrc  
echo 'export PKG_CONFIG_PATH=${HOME}/local/lib/x86_64-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}' >> ~/.bashrc  
echo 'source ~/local/share/gazebo/setup.sh' >> ~/.bashrc  
source ~/.bashrc  
gazebo
osrf-migration commented 8 years ago

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


Glad it worked, dou itashimashite ;)

osrf-migration commented 8 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


osrf-migration commented 8 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).