for loading the Ogre plugins under mac, I replaced the following line:
pluginStr =  pathStr + "/" +  pluginNode->GetValue();
pluginStr = pluginNode->GetValue();
in OgreAdaptor.cc (line 310)
and in the world files:
    <plugins path="/usr/local/lib/OGRE">
Let have a look if it also work for you.


Le 15 juil. 07 à 20:52, Nathan Michael a écrit :

Hi Kevin,

Read your email from this morning and thought I would give it a try.

I exported the source:

>> svn export https://playerstage.svn.sourceforge.net/svnroot/playerstage/code/gazebo gazebo
>> cd gazebo
>> patch -p0 < gazebo.patch # Where the patch is attached (and should be dropped in the directory).

I also downloaded the OSX Ogre3D SDK (v 1.4.2) and installed it.

I had to change a lot of includes to correctly work with frameworks. To make this change reflected in the patch, I ran the following:

>> for i in $(find . -not -name "*svn*" -exec grep -q "Ogre*.h>" '{}' \; -print); do sed -e 's@e <Ogre@e <Ogre/Ogre@g' $i > $i.tmp; mv $i.tmp $i; done
>> for i in $(find . -not -name "*svn*" -exec grep -q "<python2.4/" '{}' \; -print); do sed -e 's@e <python2.4@e <Python@g' $i > $i.tmp; mv $i.tmp $i; done

These commands replace certain includes that don't work with frameworks so that they do work.

I installed boost_python. I use MacPorts and the Portfile explicitly states not to build boost_python, so I changed the line for configure.args to just read:

configure.args --without-icu

and reinstall.

In SConstruct, you'll see that I included environment variables and eliminated some pkg-config requests (and checks). I did this so that things would work with frameworks. I also had to add my info for ode since my ode-config spits out ode_path/ode and the source all refers to <ode/header>. I exported the following:

>> export CPATH=$CPATH:/Developer/Ogre/Dependencies/include/OIS:/ode_path/include

It seems like both <OIS*.h> and <OIS/OIS*.> are referenced (I may be wrong here) so I include both (above and below). I also made a pkg-config file OIS.pc which reads:

Name: OIS
Description: Object oriented input system
Version: 1.0RC1
Libs: -L${prefix}/lib/Release -lois
Cflags: -I${prefix}/include

In the SConstruct file I also added the frameworks that were required.

I also made some changes to underlying SConscript files to include objects. I ran into all of the bugs you mentioned and found that including the objects fixed some. The other problem was that SConscript for player wasn't including the Graphics3D interface file. It seems like the Camera.hh file was renamed to CameraSensor.hh which threw an error. I wasn't able to get all of the sensors compiled. I'll keep working on it.

I think that was it. There may be a few things sneaking in the patch that I forgot to mention but they should be obvious. Almost forgot, I added a debug flag to deal with the semum redefine.

But ... It still doesn't work, it compiles but doesn't work. I can run gazebo but am unable to load the plugins. After looking at the Ogre source a bit it seems like they did some fancy stuff to handle the plugins in OSX which differ from how Nate has the plugin loading coded. I'll take a look at some point unless you can hack something up and beat me to it. It seems like it should be pretty straight forward, more or less copy and paste and shouldn't be a hard fix, just needs the attention.

As a side, I gave a go at trying to compile Ogre and CEGUI from source in a more "Linux" style way (no frameworks, just good old shared libraries, pkg-config, etc.). It took a bit of coaxing but I was able to get everything compiled. They designed everything to work with XCode which I don't use, so I gave a go at using the GNU tools. It was a pain, lots of macro tweaking and source changes (especially in CEGUI) but it seems like it compiled. I was able to run some of the tests for the distributions. With that said, anybody trying to use the svn gazebo on OSX should download the pre-compiled binaries and go that route. It a lot easier to compile.

Good luck,

Nate Michael