Hey guys, Sorry it took so long for a reply. I'll take a look at putting your patch into gazebo. In case you're interested, sourceforge has a patch tracker. It's easy to upload patches through this mechanism, and it allows me to better track which patches have been applied.
-nate On 7/16/07, David Partouche <[EMAIL PROTECTED]> wrote: > Hi, > for loading the Ogre plugins under mac, I replaced the following line: > pluginStr = pathStr + "/" + pluginNode->GetValue(); > to > pluginStr = pluginNode->GetValue(); > in OgreAdaptor.cc (line 310) > and in the world files: > <plugins path="/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 à 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 '[EMAIL PROTECTED] <[EMAIL PROTECTED] <Ogre/[EMAIL > PROTECTED]' $i > $i.tmp; mv $i.tmp $i; > done > >> for i in $(find . -not -name "*svn*" -exec grep -q "<python2.4/" '{}' \; > -print); do sed -e '[EMAIL PROTECTED] <[EMAIL PROTECTED] <[EMAIL PROTECTED]' > $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: > > prefix=/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 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 > > > <gazebo_osx.patch> > > > On Jul 15, 2007, at 12:27 PM, Kevin Barry wrote: > > Okay I got past my previous problem by modifying libgazebo/SConstrict with: > > sharedLib = env.SharedLibrary('gazebo', sharedObjs + sources) > staticLib = env.StaticLibrary('gazebo', staticObjs + sources) > > (After adding sharedObjs and StaticObjs to the Import line, and modifying my > OIS.pc to use the .o files rather than the libois.a) > > So now 'gazebo' builds, but I get an error on player: > > g++ -o player/libgazeboplugin.dylib -dynamiclib player/GazeboDriver.os > player/GazeboClient.os player/GazeboInterface.os player/GazeboTime.os > player/SimulationInterface.os player/Position2dInterface.os > player/LaserInterface.os player/CameraInterface.os > server/physics/ode/ODEPhysics.os > server/physics/BallJoint.os server/physics/Body.os server/physics/BoxGeom.os > server/physics/ContactParams.os server/physics/CylinderGeom.os > server/physics/Geom.os server/physics/Hinge2Joint.os > server/physics/HingeJoint.os server/physics/Joint.os > server/physics/PhysicsEngine.os server/physics/PlaneGeom.os > server/physics/SliderJoint.os server/physics/SphereGeom.os > server/physics/UniversalJoint.os > server/physics/dCylinder.os server/physics/RayGeom.os > server/rendering/OgreAdaptor.os > server/rendering/OgreFrameListener.os > server/rendering/OgreDynamicRenderable.os > server/rendering/OgreDynamicLines.os > server/rendering/OgreSimpleShape.os > server/rendering/OgreHUD.os > server/sensors/camera/CameraSensor.os > server/sensors/camera/CameraManager.os > server/sensors/ray/RaySensor.os server/sensors/Sensor.os > server/sensors/SensorFactory.os > server/models/LightSource/LightSource.os > server/models/Model.os server/models/ModelFactory.os > server/controllers/position2d/pioneer2dx/Pioneer2dx_Position2d.os > server/controllers/laser/sicklms200/SickLMS200_Laser.os > server/controllers/camera/generic/Generic_Camera.os > server/controllers/Controller.os > server/controllers/ControllerFactory.os server/main.os > server/Vector3.os server/Quatern.os server/Pose3d.os server/World.os > server/XMLConfig.os server/Time.os server/Entity.os server/GazeboError.os > server/UpdateParams.os server/GazeboMessage.os -Llibgazebo > -L/Library/Frameworks/Ogre.framework -L/opt/local/lib > -L/usr/local/lib -lgazebo -lboost_python -lOgre -lxml2 -lz -liconv -lm > -lplayercore -lltdl -lpthread -lplayerxdr -lplayererror -lode > /Users/gorn/Desktop/Downloads/ois- > 1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/OISEffect.o > /Users/gorn/Desktop/Downloads/ois-1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/OISForceFeedback.o > /Users/gorn/Desktop/Downloads/ois- > 1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/OISInputManager.o > /Users/gorn/Desktop/Downloads/ois-1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/OISKeyboard.o > /Users/gorn/Desktop/Downloads/ois- > 1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/OISObject.o > /Users/gorn/Desktop/Downloads/ois-1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/MacHelpers.o > /Users/gorn/Desktop/Downloads/ois- > 1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/MacInputManager.o > /Users/gorn/Desktop/Downloads/ois-1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/MacKeyboard.o > /Users/gorn/Desktop/Downloads/ois- > 1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/MacMouse.o > -lwx_macud-2.5 -lpython -framework QuickTime -framework IOKit -framework > Carbon -framework Cocoa -framework System > ld: Undefined symbols: > __ZN6gazebo19Graphics3dInterfaceC1E14player_devaddrPNS_12GazeboDriverEP10ConfigFilei > /usr/bin/libtool: internal link edit command failed > scons: *** [player/libgazeboplugin.dylib] Error 1 > scons: building terminated because of errors. > > After I get through all this I'll document it and see if we can make it a > bit more straightforward to build on mac > > On 7/15/07, Kevin Barry < [EMAIL PROTECTED]> wrote: > > Okay I'm running on a Mac which requires a bit of work to get gazebo to > even try to build (If anyone else is trying this you'll have to create your > own pkg-config entries for Ogre and OIS). > > > > The only unresolved problem is at the very end of this, so you probably > can just read that, however I included the whole process I went through in > case I caused the problem fixing a different one. > > > > Anyway so I believe my build environment is setup mostly correct, on a > fresh svn checkout I get: > > > > senior-design-1s-computer:~/gazebo/gazebo_svn_virgin > root# scons install > > scons: Reading SConscript files ... > > /bin/sh: line 1: python-config: command not found > > Unable to parse config [python-config] > > senior-design-1s-computer:~/gazebo/gazebo_svn_virgin > root# > > > > I believe this is related to boost, but just to get things started I > modified SConscript to call "echo -lpython" in place of python-config > --libs, now: > > > > senior-design-1s-computer:~/gazebo/gazebo_svn_virgin > root# scons install > > scons: Reading SConscript files ... > > scons: done reading SConscript files. > > scons: Building targets ... > > g++ -o server/physics/ode/ODEPhysics.o -c -pthread -pipe -I. -Iserver > -Iserver/models -Ilibgazebo -Iserver/rendering -Iserver/sensors > -Iserver/sensors/camera -Iserver/sensors/ray -Iserver/physics > -Iserver/physics/ode -Iserver/controllers -Iserver/controllers/position2d > -Iserver/controllers/position2d/pioneer2dx > -I/usr/include/python2.4 > -I/Library/Frameworks/Ogre.framework/Headers > -I/opt/local/include/libxml2 -I/opt/local/include > -I/usr/local/include/player- 2.0 -I/usr/local/include > -I/usr/local/include/OIS server/physics/ode/ODEPhysics.cc > > i686-apple-darwin8-g++-4.0.1: unrecognized option '-pthread' > > > > ... # all looking good, the pthread thing is just a warning, it's okay. > > ... # until: > > > > g++ -o libgazebo/Server.o -c -pthread -pipe -I. -Iserver -Iserver/models > -Ilibgazebo -Iserver/rendering -Iserver/sensors -Iserver/sensors/camera > -Iserver/sensors/ray -Iserver/physics -Iserver/physics/ode > -Iserver/controllers -Iserver/controllers/position2d > -Iserver/controllers/position2d/pioneer2dx > -I/usr/include/python2.4 > -I/Library/Frameworks/Ogre.framework/Headers > -I/opt/local/include/libxml2 -I/opt/local/include > -I/usr/local/include/player- 2.0 -I/usr/local/include > -I/usr/local/include/OIS libgazebo/Server.cc > > i686-apple-darwin8-g++-4.0.1: unrecognized option '-pthread' > > libgazebo/Server.cc:47: error: redefinition of 'union semun' > > /usr/include/sys/sem.h:184: error: previous definition of 'union semun' > > > > The declarations in sem.h and Server.cc are the same, so I comment it out > of Server.cc, continue building: > > > > g++ -o gazebo server/physics/ode/ODEPhysics.o server/physics/BallJoint.o > server/physics/Body.o server/physics/BoxGeom.o > server/physics/ContactParams.o server/physics/CylinderGeom.o > server/physics/Geom.o server/physics/Hinge2Joint.o > server/physics/HingeJoint.o server/physics/Joint.o > server/physics/PhysicsEngine.o server/physics/PlaneGeom.o > server/physics/SliderJoint.o server/physics/SphereGeom.o > server/physics/UniversalJoint.o server/physics/dCylinder.o > server/physics/RayGeom.o server/rendering/OgreAdaptor.o > server/rendering/OgreFrameListener.o > server/rendering/OgreDynamicRenderable.o > server/rendering/OgreDynamicLines.o > server/rendering/OgreSimpleShape.o > server/rendering/OgreHUD.o > server/sensors/camera/CameraSensor.o > server/sensors/camera/CameraManager.o > server/sensors/ray/RaySensor.o server/sensors/Sensor.o > server/sensors/SensorFactory.o > server/models/LightSource/LightSource.o > server/models/Model.o server/models/ModelFactory.o > server/controllers/position2d/pioneer2dx/Pioneer2dx_Position2d.o > server/controllers/laser/sicklms200/SickLMS200_Laser.o > server/controllers/camera/generic/Generic_Camera.o > server/controllers/Controller.o > server/controllers/ControllerFactory.o server/main.o > server/Vector3.o server/Quatern.o server/Pose3d.o server/World.o > server/XMLConfig.o server/Time.o server/Entity.o server/GazeboError.o > server/UpdateParams.o server/GazeboMessage.o -Llibgazebo > -L/Library/Frameworks/Ogre.framework -L/opt/local/lib > -L/usr/local/lib -lgazebo -lboost_python -lOgre -lxml2 -lz -liconv -lm > -lplayercore -lltdl -lpthread -lplayerxdr -lplayererror -lode -lois -lpython > > /usr/bin/ld: Undefined symbols: > > _ActiveNonFloatingWindow > > _DisposeEventHandlerUPP > > _GetEventParameter > > _GetEventTime > > _GetWindowEventTarget > > _InstallEventHandler > > _NewEventHandlerUPP > > _RemoveEventHandler > > _CallNextEventHandler > > gazebo::GazeboError::GazeboError(char const*, int, > std::basic_string<char, std::char_traits<char>, std::allocator<char> > >)referenced from libgazebo expected to be defined in libgazebo > > gazebo::GazeboError::~GazeboError()referenced from > libgazebo expected to be defined in libgazebo > > typeinfo for gazebo::GazeboErrorreferenced from libgazebo expected to be > defined in libgazebo > > gazebo::GazeboMessage::Msg(int) referenced from > libgazebo expected to be defined in libgazebo > > gazebo::GazeboMessage::Instance() referenced from > libgazebo expected to be defined in libgazebo > > collect2: ld returned 1 exit status > > scons: *** [gazebo] Error 1 > > scons: building terminated because of errors. > > > > The first set seems to be from wxwindows, so I add wx-config2 --cflags > --libs to SConstruct with the other pkg-config lines, continue building, > sure enough the first errors are eliminated but the second ones remain. > > > > scons install > > ... > > g++ -o gazebo server/physics/ode/ODEPhysics.o server/physics/BallJoint.o > server/physics/Body.o server/physics/BoxGeom.o > server/physics/ContactParams.o server/physics/CylinderGeom.o > server/physics/Geom.o server/physics/Hinge2Joint.o > server/physics/HingeJoint.o server/physics/Joint.o > server/physics/PhysicsEngine.o server/physics/PlaneGeom.o > server/physics/SliderJoint.o server/physics/SphereGeom.o > server/physics/UniversalJoint.o server/physics/dCylinder.o > server/physics/RayGeom.o server/rendering/OgreAdaptor.o > server/rendering/OgreFrameListener.o > server/rendering/OgreDynamicRenderable.o > server/rendering/OgreDynamicLines.o > server/rendering/OgreSimpleShape.o > server/rendering/OgreHUD.o > server/sensors/camera/CameraSensor.o > server/sensors/camera/CameraManager.o > server/sensors/ray/RaySensor.o server/sensors/Sensor.o > server/sensors/SensorFactory.o > server/models/LightSource/LightSource.o > server/models/Model.o server/models/ModelFactory.o > server/controllers/position2d/pioneer2dx/Pioneer2dx_Position2d.o > server/controllers/laser/sicklms200/SickLMS200_Laser.o > server/controllers/camera/generic/Generic_Camera.o > server/controllers/Controller.o > server/controllers/ControllerFactory.o server/main.o > server/Vector3.o server/Quatern.o server/Pose3d.o server/World.o > server/XMLConfig.o server/Time.o server/Entity.o server/GazeboError.o > server/UpdateParams.o server/GazeboMessage.o -Llibgazebo > -L/Library/Frameworks/Ogre.framework -L/opt/local/lib > -L/usr/local/lib -lgazebo -lboost_python -lOgre -lxml2 -lz -liconv -lm > -lplayercore -lltdl -lpthread -lplayerxdr -lplayererror -lode -lois -lpython > -lwx_macud- 2.5 -framework QuickTime -framework IOKit -framework Carbon > -framework Cocoa -framework System > > /usr/bin/ld: Undefined symbols: > > gazebo::GazeboError::GazeboError(char const*, int, > std::basic_string<char, std::char_traits<char>, std::allocator<char> > >)referenced from libgazebo expected to be defined in libgazebo > > gazebo::GazeboError::~GazeboError()referenced from > libgazebo expected to be defined in libgazebo > > typeinfo for gazebo::GazeboErrorreferenced from libgazebo expected to be > defined in libgazebo > > gazebo::GazeboMessage::Msg(int) referenced from > libgazebo expected to be defined in libgazebo > > gazebo::GazeboMessage::Instance() referenced from > libgazebo expected to be defined in libgazebo > > collect2: ld returned 1 exit status > > scons: *** [gazebo] Error 1 > > scons: building terminated because of errors. > > > > > > Now server/GazeboError.o is mentioned in the g++ line, I've been trying > different things but I'm really at a loss here. Any ideas? > > > > Thanks, > > -Kevin > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/_______________________________________________ > Playerstage-gazebo mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/_______________________________________________ > Playerstage-gazebo mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > Playerstage-gazebo mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Playerstage-gazebo mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
