I do not really know if what I said would solve your problem (it does if it
is what I think it is). In fact I did not even compile gazebo with the patch
as the latest version of gazebo does not compile on my system.  Anyway I
send the patch (I think it is useful).

In GazeboConfig.cc you should change:

=========
void GazeboConfig::Load()
{
  std::ifstream cfgFile;

  std::string rcFilename = getenv("HOME");
  rcFilename += "/.gazeborc";

  cfgFile.open(rcFilename.c_str(), std::ios::in);
=========

to
=========
void GazeboConfig::Load()
{
  std::fstream cfgFile;

  std::string rcFilename = getenv("HOME");
  rcFilename += "/.gazeborc";

  cfgFile.open(rcFilename.c_str(), std::ios::in);
  if (!cfgFile.is_open())
  {
    cfgFile.open(rcFilename.c_str(), std::ios::out);
    cfgFile << "<?xml
version=\"1.0\"?>\n<gazeborc>\n<gazeboPath>/usr/local/share/gazebo</gazeboPath>\n<ogrePath>/usr/local/lib/OGRE</ogrePath>\n</gazeborc>\n";
    cfgFile.close();
    cfgFile.open(rcFilename.c_str(), std::ios::in);
  }
=========

The patch file is attached.

On Tue, Jan 12, 2010 at 3:43 PM, Andres Faiña <[email protected]> wrote:

> Hi,
>
> The symbol ~ represents your home directory in linux. Then  ~/.gazeborc
> is a file called ".gazeborc" in your home.
> In your case, ~/.gazeborc is the same that /home/pitiwut/.gazeborc
>
> Bye!
>
> pt523 escribió:
> > Hi,
> >
> > Thank you very much for your advise. Actually I've seen that archive
> already
> > but I'm not sure what exactly I have to do with the ~/.gazeborc file. I
> > assume that in my case ~/.gazeborc file wasn't automatically built so I
> have
> > to create it myself. Is that right?
> >
> > Anyway what I already done was I created files named gazeborc, .gazebo
> and
> > ~/.gazeborc and put them in my /home directory and also /home/pitiwut
> > directory. The content of the gazeborc files looks like this
> >
> ------------------------------------------------------------------------------------------------------------------
> > <?xml version="1.0"?>
> > <gazeborc>
> >   <gazeboPath>/usr/local/share/gazebo</gazeboPath>
> >   <gazeboPath>/home/pitiwut/share/gazebo</gazeboPath>
> >   <ogrePath>/usr/local/lib/OGRE</ogrePath>
> >   <gazeboPath>/home/pitiwut/local/lib/OGRE</gazeboPath>
> >   <RTTMode>PBuffer</RTTMode>
> > </gazeborc>
> >
> ------------------------------------------------------------------------------------------------------------------
> >
> > However, it still can't solve the problem. Am I misunderstand something?
> >
> > This is the output I get
> >
> >
> ------------------------------------------------------------------------------------------------------------------
> > Gazebo multi-robot simulator, version 0.8-pre3
> >
> > Part of the Player/Stage Project [http://playerstage.sourceforge.net].
> > Copyright (C) 2003 Nate Koenig, Andrew Howard, and contributors.
> > Released under the GNU General Public License.
> >
> > [server/GazeboConfig.cc:101]
> >   Unable to find the file ~/.gazeborc. Using default paths. This may
> cause
> > OGRE to fail.
> > gazebo: ../../../OgreMain/include/OgreSingleton.h:66:
> > Ogre::Singleton<T>::Singleton() [with T =
> > Ogre::TerrainPageSourceListenerManager]: Assertion `!ms_Singleton'
> failed.
> > Aborted
> >
> -----------------------------------------------------------------------------------------------------------------
> >
> > Apart from "Segmentation fault" I got last time, now it shows "Assertion
> > `!ms_Singleton' failed.". Is this error related to the ~/.gazeborc file
> or
> > it is another problem?
> >
> > Pitiwut
> >
> >
> > Andrés Faína Rodrí­guez-Vila wrote:
> >
> >> Hi,
> >>
> >> the solution to your problem is:
> >>
> >>
> http://www.mail-archive.com/[email protected]/msg00851.html
> >>
> >> Bye!
> >>
> >>
> >> pt523 escribió:
> >>
> >>> Hi
> >>>
> >>> I'm new to Linux and Gazebo but desperately need to use Gazebo on my
> >>> research.
> >>>
> >>> I've managed to solve some problems until finally Gazebo was installed
> on
> >>> my
> >>> computer. However, after spending several days looking at a problem of
> >>> ~/.gazeborc, I still can't solve it.
> >>>
> >>> I'm using Gazebo 0.8.pre3 on Ubuntu 9.10. I've also install OGRE V1.4.4
> >>> and
> >>> ODE V0.8. When I type
> >>>
> >>>
> -------------------------------------------------------------------------------------------
> >>> r...@pitiwut-desktop:/# gazebo
> /usr/local/share/gazebo/worlds/test.world
> >>>
> -------------------------------------------------------------------------------------------
> >>>
> >>> I get ,
> >>>
> >>>
> -------------------------------------------------------------------------------------------
> >>> Gazebo multi-robot simulator, version 0.8-pre3
> >>>
> >>> Part of the Player/Stage Project [http://playerstage.sourceforge.net].
> >>> Copyright (C) 2003 Nate Koenig, Andrew Howard, and contributors.
> >>> Released under the GNU General Public License.
> >>>
> >>> [server/GazeboConfig.cc:101]
> >>>   Unable to find the file ~/.gazeborc. Using default paths. This may
> >>> cause
> >>> OGRE to fail.
> >>> Segmentation fault
> >>>
> -------------------------------------------------------------------------------------------
> >>>
> >>> After looking in the archives, what I understand is ~/.gazeborc. should
> >>> be
> >>> automatically created by the builder and is placed in the user's home
> >>> directory. However I can't see it in my home directory.
> >>>
> >>> I think I might did something wrong but I have no idea what I did
> wrong.
> >>> If
> >>> you want some more information please tell me I'll try providing all
> >>> information for you.
> >>>
> >>> Any ideas and advices would be appreciated. Thanks in advance.
> >>>
> >>> Pitiwut
> >>>
> >>>
> >>>
> >>
> ------------------------------------------------------------------------------
> >> This SF.Net email is sponsored by the Verizon Developer Community
> >> Take advantage of Verizon's best-in-class app development support
> >> A streamlined, 14 day to market process makes app distribution fast and
> >> easy
> >> Join now and get one step closer to millions of Verizon customers
> >> http://p.sf.net/sfu/verizon-dev2dev
> >> _______________________________________________
> >> Playerstage-gazebo mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
> >>
> >>
> >>
> >
> >
>
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and
> easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Playerstage-gazebo mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
>
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Playerstage-gazebo mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo

Reply via email to