From: David P. <dav...@in...> - 2007-07-16 11:46:33
|
Hi, for loading the Ogre plugins under mac, I replaced the following line: pluginStr =3D pathStr + "/" + pluginNode->GetValue(); to pluginStr =3D pluginNode->GetValue(); in OgreAdaptor.cc (line 310) and in the world files: <plugins path=3D"/usr/local/lib/OGRE"> <plugin>RenderSystem_GL</plugin> <plugin>Plugin_ParticleFX</plugin> <plugin>Plugin_BSPSceneManager</plugin> <plugin>Plugin_OctreeSceneManager</plugin> </plugins> Let have a look if it also work for you. Regards David Le 15 juil. 07 =E0 20:52, Nathan Michael a =E9crit : > 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/=20 > playerstage/code/gazebo gazebo > >> cd gazebo > >> patch -p0 < gazebo.patch # Where the patch is attached (and =20 > 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 =20 > frameworks. To make this change reflected in the patch, I ran the =20 > following: > > >> for i in $(find . -not -name "*svn*" -exec grep -q "Ogre*.h>" =20 > '{}' \; -print); do sed -e 's@e <Ogre@e <Ogre/Ogre@g' $i > $i.tmp; =20 > mv $i.tmp $i; done > >> for i in $(find . -not -name "*svn*" -exec grep -q "<python2.4/" =20= > '{}' \; -print); do sed -e 's@e <python2.4@e <Python@g' $i > =20 > $i.tmp; mv $i.tmp $i; done > > These commands replace certain includes that don't work with =20 > frameworks so that they do work. > > I installed boost_python. I use MacPorts and the Portfile =20 > explicitly states not to build boost_python, so I changed the line =20 > for configure.args to just read: > > configure.args --without-icu > > and reinstall. > > In SConstruct, you'll see that I included environment variables and =20= > eliminated some pkg-config requests (and checks). I did this so =20 > that things would work with frameworks. I also had to add my info =20 > for ode since my ode-config spits out ode_path/ode and the source =20 > all refers to <ode/header>. I exported the following: > > >> export CPATH=3D$CPATH:/Developer/Ogre/Dependencies/include/OIS:/=20 > ode_path/include > > It seems like both <OIS*.h> and <OIS/OIS*.> are referenced (I may =20 > be wrong here) so I include both (above and below). I also made a =20 > pkg-config file OIS.pc which reads: > > prefix=3D/Developer/Ogre/Dependencies > Name: OIS > Description: Object oriented input system > Version: 1.0RC1 > Requires: > 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 =20 > objects. I ran into all of the bugs you mentioned and found that =20 > including the objects fixed some. The other problem was that =20 > SConscript for player wasn't including the Graphics3D interface =20 > file. It seems like the Camera.hh file was renamed to =20 > CameraSensor.hh which threw an error. I wasn't able to get all of =20 > the sensors compiled. I'll keep working on it. > > I think that was it. There may be a few things sneaking in the =20 > patch that I forgot to mention but they should be obvious. Almost =20 > 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 =20 > run gazebo but am unable to load the plugins. After looking at the =20 > Ogre source a bit it seems like they did some fancy stuff to handle =20= > the plugins in OSX which differ from how Nate has the plugin =20 > loading coded. I'll take a look at some point unless you can hack =20 > something up and beat me to it. It seems like it should be pretty =20 > straight forward, more or less copy and paste and shouldn't be a =20 > hard fix, just needs the attention. > > As a side, I gave a go at trying to compile Ogre and CEGUI from =20 > source in a more "Linux" style way (no frameworks, just good old =20 > shared libraries, pkg-config, etc.). It took a bit of coaxing but I =20= > was able to get everything compiled. They designed everything to =20 > work with XCode which I don't use, so I gave a go at using the GNU =20 > tools. It was a pain, lots of macro tweaking and source changes =20 > (especially in CEGUI) but it seems like it compiled. I was able to =20 > run some of the tests for the distributions. With that said, =20 > anybody trying to use the svn gazebo on OSX should download the pre-=20= > compiled binaries and go that route. It a lot easier to compile. > > Good luck, > > Nate Michael > |