You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(153) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(48) |
Feb
(46) |
Mar
(12) |
Apr
(4) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(263) |
Mar
(235) |
Apr
(66) |
May
(42) |
Jun
(270) |
Jul
(65) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Oliver O. <fr...@us...> - 2007-03-30 01:56:24
|
Update of /cvsroot/simspark/simspark/spark/kerosin/renderserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10241 Modified Files: Tag: projectx renderserver.cpp Log Message: changes due to split off of the baserenderserver Index: renderserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/renderserver.cpp,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.3.2.1 diff -C2 -d -r1.2.2.3 -r1.2.2.3.2.1 *** renderserver.cpp 23 Feb 2007 19:21:10 -0000 1.2.2.3 --- renderserver.cpp 30 Mar 2007 01:56:19 -0000 1.2.2.3.2.1 *************** *** 25,28 **** --- 25,29 ---- #include <oxygen/sceneserver/scene.h> #include <oxygen/sceneserver/camera.h> + #include <oxygen/physicsserver/spherecollider.h> #include <kerosin/openglserver/openglwrapper.h> #include <kerosin/sceneserver/staticmesh.h> *************** *** 36,95 **** using namespace zeitgeist; ! RenderServer::RenderServer() : Leaf() { mAmbientColor = RGBA(0.0,0.0,0.0,0.0); } - RenderServer::~RenderServer() - { - } - - void - RenderServer::OnLink() - { - // setup SceneServer reference - RegisterCachedPath(mSceneServer, "/sys/server/scene"); - - if (mSceneServer.expired()) - { - GetLog()->Error() - << "(RenderServer) ERROR: SceneServer not found\n"; - } - } - - void - RenderServer::OnUnlink() - { - mActiveScene.reset(); - Leaf::OnUnlink(); - } - - bool - RenderServer::GetActiveScene() - { - if (mSceneServer.expired()) - { - mActiveScene.reset(); - } - - mActiveScene = mSceneServer->GetActiveScene(); - - if (mActiveScene.get() == 0) - { - GetLog()->Error() << - "(RenderServer) ERROR: found no active scene\n"; - return false; - } - - return true; - } - void RenderServer::Render() { if (! GetActiveScene()) ! { ! return; ! } // get a camera to render with --- 37,52 ---- using namespace zeitgeist; ! RenderServer::RenderServer() : BaseRenderServer() { mAmbientColor = RGBA(0.0,0.0,0.0,0.0); } void RenderServer::Render() { if (! GetActiveScene()) ! { ! return; ! } // get a camera to render with *************** *** 98,106 **** if (camera.get() == 0) ! { ! GetLog()->Error() ! << "(RenderServer) ERROR: found no camera node in the active scene\n"; ! return; ! } glClearColor( --- 55,63 ---- if (camera.get() == 0) ! { ! GetLog()->Error() ! << "(RenderServer) ERROR: found no camera node in the active scene\n"; ! return; ! } glClearColor( *************** *** 129,150 **** if (lights.size() == 0) ! { ! // no lights in the scene, disable lighting ! glDisable(GL_LIGHTING); ! } else ! { ! glEnable(GL_LIGHTING); ! glShadeModel (GL_SMOOTH); ! // prepare all lights ! for ( ! TLeafList::iterator iter = lights.begin(); ! iter != lights.end(); ! ++iter ! ) ! { ! (shared_static_cast<Light>(*iter))->Prepare(); ! } ! } // standard rendering --- 86,108 ---- if (lights.size() == 0) ! { ! // no lights in the scene, disable lighting ! glDisable(GL_LIGHTING); ! } ! else ! { ! glEnable(GL_LIGHTING); ! glShadeModel (GL_SMOOTH); ! // prepare all lights ! for ( ! TLeafList::iterator iter = lights.begin(); ! iter != lights.end(); ! ++iter ! ) ! { ! (shared_static_cast<Light>(*iter))->Prepare(); ! } ! } // standard rendering *************** *** 158,184 **** RenderServer::RenderScene(boost::shared_ptr<BaseNode> node) { ! // test for and render using a RenderNode shared_ptr<RenderNode> renderNode = shared_dynamic_cast<RenderNode>(node); if (renderNode.get() != 0) ! { ! glPushMatrix(); ! glMultMatrixf(node->GetWorldTransform().m); ! renderNode->RenderInternal(); ! glPopMatrix(); ! } // traverse the the hierarchy for (TLeafList::iterator i = node->begin(); i!= node->end(); ++i) { ! shared_ptr<BaseNode> node = shared_dynamic_cast<BaseNode>(*i); ! if (node.get() == 0) ! { ! continue; ! } ! ! RenderScene(node); } } --- 116,148 ---- RenderServer::RenderScene(boost::shared_ptr<BaseNode> node) { ! #if 0 ! shared_ptr<SphereCollider> collider = shared_dynamic_cast<SphereCollider>(node); ! if (collider != 0) ! { ! std::cerr << "RenderScene (spherecollider radius: " << collider->GetRadius() << ")\n"; ! } ! #endif shared_ptr<RenderNode> renderNode = shared_dynamic_cast<RenderNode>(node); if (renderNode.get() != 0) ! { ! glPushMatrix(); ! glMultMatrixf(node->GetWorldTransform().m); ! renderNode->RenderInternal(); ! glPopMatrix(); ! } // traverse the the hierarchy for (TLeafList::iterator i = node->begin(); i!= node->end(); ++i) + { + shared_ptr<BaseNode> node = shared_dynamic_cast<BaseNode>(*i); + if (node.get() == 0) { ! continue; } + + RenderScene(node); + } } *************** *** 210,220 **** } ! void RenderServer::SetAmbientColor(const RGBA& ambient) { mAmbientColor = ambient; } - - void RenderServer::UpdateCached() - { - mActiveScene.reset(); - } --- 174,180 ---- } ! void ! RenderServer::SetAmbientColor(const RGBA& ambient) { mAmbientColor = ambient; } |
From: Oliver O. <fr...@us...> - 2007-03-30 01:55:21
|
Update of /cvsroot/simspark/simspark/spark/kerosin/renderserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9820 Modified Files: Tag: projectx rendercontrol_c.cpp Log Message: changes due to split off of the baserenderserver Index: rendercontrol_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/rendercontrol_c.cpp,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** rendercontrol_c.cpp 5 Dec 2005 21:38:23 -0000 1.1 --- rendercontrol_c.cpp 30 Mar 2007 01:55:17 -0000 1.1.4.1 *************** *** 19,22 **** --- 19,23 ---- */ #include "rendercontrol.h" + #include <oxygen/sceneserver/sceneserver.h> using namespace kerosin; |
From: Oliver O. <fr...@us...> - 2007-03-30 01:54:28
|
Update of /cvsroot/simspark/simspark/spark/kerosin/renderserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9415 Modified Files: Tag: projectx rendercontrol.h Log Message: changes due to split off of the baserenderserver Index: rendercontrol.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/rendercontrol.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** rendercontrol.h 16 Feb 2007 15:40:47 -0000 1.1.2.1 --- rendercontrol.h 30 Mar 2007 01:54:25 -0000 1.1.2.1.2.1 *************** *** 22,26 **** #include <oxygen/simulationserver/simcontrolnode.h> ! #include <kerosin/renderserver/renderserver.h> #include <kerosin/openglserver/openglserver.h> --- 22,26 ---- #include <oxygen/simulationserver/simcontrolnode.h> ! #include <kerosin/renderserver/baserenderserver.h> #include <kerosin/openglserver/openglserver.h> *************** *** 38,42 **** /** returns the total number of rendered frames */ ! int GetFramesRendered(); /** renders the scene at the end of each simulation cycle */ --- 38,42 ---- /** returns the total number of rendered frames */ ! int GetFramesRendered() const; /** renders the scene at the end of each simulation cycle */ *************** *** 49,53 **** protected: /** cached reference to the RenderServer */ ! CachedPath<kerosin::RenderServer> mRenderServer; /** cached reference to the OpenGLServer */ --- 49,53 ---- protected: /** cached reference to the RenderServer */ ! CachedPath<kerosin::BaseRenderServer> mRenderServer; /** cached reference to the OpenGLServer */ |
From: Oliver O. <fr...@us...> - 2007-03-30 01:54:04
|
Update of /cvsroot/simspark/simspark/spark/kerosin/renderserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9029 Modified Files: Tag: projectx rendercontrol.cpp Log Message: changes due to split off of the baserenderserver Index: rendercontrol.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/rendercontrol.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** rendercontrol.cpp 16 Feb 2007 15:40:47 -0000 1.1.2.1 --- rendercontrol.cpp 30 Mar 2007 01:53:58 -0000 1.1.2.1.2.1 *************** *** 21,24 **** --- 21,25 ---- #include "customrender.h" #include <zeitgeist/logserver/logserver.h> + #include <oxygen/sceneserver/sceneserver.h> using namespace kerosin; *************** *** 56,60 **** } ! void RenderControl::RenderCustom() { // get list of registered CustomMonitor objects --- 57,62 ---- } ! void ! RenderControl::RenderCustom() { // get list of registered CustomMonitor objects *************** *** 67,74 **** ++iter ) ! { ! shared_static_cast<CustomRender>((*iter)) ! ->Render(); ! } } --- 69,75 ---- ++iter ) ! { ! shared_static_cast<CustomRender>((*iter))->Render(); ! } } *************** *** 92,96 **** } ! int RenderControl::GetFramesRendered() { return mFramesRendered; --- 93,98 ---- } ! int ! RenderControl::GetFramesRendered() const { return mFramesRendered; |
From: Oliver O. <fr...@us...> - 2007-03-30 01:52:01
|
Update of /cvsroot/simspark/simspark/spark/kerosin/openglserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8473 Modified Files: Tag: projectx openglsystem.h Log Message: added a pure virtual method to get a handle for the window Index: openglsystem.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/openglserver/openglsystem.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** openglsystem.h 16 Feb 2007 15:40:46 -0000 1.1.2.1 --- openglsystem.h 30 Mar 2007 01:51:57 -0000 1.1.2.1.2.1 *************** *** 50,53 **** --- 50,56 ---- virtual void SwapBuffers() = 0; + //! get a handle for the active window. + virtual unsigned long int GetWindowHandle() const { return 0; } + protected: // |
From: Oliver O. <fr...@us...> - 2007-03-30 01:49:24
|
Update of /cvsroot/simspark/simspark/spark/kerosin/openglserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7597 Modified Files: Tag: projectx openglserver.h Log Message: added method to get a handle for the glwindow Index: openglserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/openglserver/openglserver.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.2.2.1 diff -C2 -d -r1.1.2.2 -r1.1.2.2.2.1 *** openglserver.h 23 Feb 2007 19:19:15 -0000 1.1.2.2 --- openglserver.h 30 Mar 2007 01:49:18 -0000 1.1.2.2.2.1 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 83,89 **** static void* GetExtension(const char* name); ! /** looksup and calls glActiveTextureARB extension if available */ static void glActiveTextureARB(unsigned int texture); protected: //! set up opengl viewport --- 83,92 ---- static void* GetExtension(const char* name); ! /** looks up and calls glActiveTextureARB extension if available */ static void glActiveTextureARB(unsigned int texture); + //! return the main window handle from the gl subsystem + std::string GetWindowHandleStr() const; + protected: //! set up opengl viewport |
From: Oliver O. <fr...@us...> - 2007-03-30 01:48:27
|
Update of /cvsroot/simspark/simspark/spark/kerosin/openglserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7201 Modified Files: Tag: projectx openglserver.cpp Log Message: added method to get a handle string for the glwindow Index: openglserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/openglserver/openglserver.cpp,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.3.2.1 diff -C2 -d -r1.1.2.3 -r1.1.2.3.2.1 *** openglserver.cpp 28 Feb 2007 04:33:22 -0000 1.1.2.3 --- openglserver.cpp 30 Mar 2007 01:48:20 -0000 1.1.2.3.2.1 *************** *** 26,29 **** --- 26,30 ---- #include <zeitgeist/fileserver/fileserver.h> #include <zeitgeist/logserver/logserver.h> + #include <sstream> using namespace std; *************** *** 85,109 **** } ! void OpenGLServer::Update() { if (mGLSystem.get() == 0) ! { ! return; ! } mGLSystem->Update(); } ! void OpenGLServer::SwapBuffers() const { if (mGLSystem.get() == 0) ! { ! return; ! } mGLSystem->SwapBuffers(); } ! bool OpenGLServer::Init(const string& openGLSysName) { GetLog()->Normal() << "(OpenGLServer) Init " << openGLSysName << "\n"; --- 86,113 ---- } ! void ! OpenGLServer::Update() { if (mGLSystem.get() == 0) ! { ! return; ! } mGLSystem->Update(); } ! void ! OpenGLServer::SwapBuffers() const { if (mGLSystem.get() == 0) ! { ! return; ! } mGLSystem->SwapBuffers(); } ! bool ! OpenGLServer::Init(const string& openGLSysName) { GetLog()->Normal() << "(OpenGLServer) Init " << openGLSysName << "\n"; *************** *** 111,134 **** if (! openGLSysName.empty()) ! { ! // create the OpenGLSystem ! mGLSystem = shared_dynamic_cast<OpenGLSystem> ! (GetCore()->New(openGLSysName)); ! if(mGLSystem.get() == 0) ! { ! // could not create OpenGLSystem ! GetLog()->Error() << "(OpenGLServer) ERROR: unable to create " ! << openGLSysName << "\n"; ! return false; ! } ! if (mGLSystem->Init() == false) ! { ! GetLog()->Error() << "(InputServer) ERROR: unable to initialize " ! << openGLSysName << "\n"; ! return false; ! } } mSupportsFancyLighting = false; --- 115,138 ---- if (! openGLSysName.empty()) ! { ! // create the OpenGLSystem ! mGLSystem = shared_dynamic_cast<OpenGLSystem> ! (GetCore()->New(openGLSysName)); ! if (mGLSystem.get() == 0) ! { ! // could not create OpenGLSystem ! GetLog()->Error() << "(OpenGLServer) ERROR: unable to create " ! << openGLSysName << "\n"; ! return false; ! } ! if (mGLSystem->Init() == false) ! { ! GetLog()->Error() << "(InputServer) ERROR: unable to initialize " ! << openGLSysName << "\n"; ! return false; } + } mSupportsFancyLighting = false; *************** *** 136,142 **** // prepare the set of available lights for (int i=0;i<GL_MAX_LIGHTS;++i) ! { ! mAvailableLights.insert(GL_LIGHT0+i); ! } return true; --- 140,146 ---- // prepare the set of available lights for (int i=0;i<GL_MAX_LIGHTS;++i) ! { ! mAvailableLights.insert(GL_LIGHT0+i); ! } return true; *************** *** 155,161 **** { if (mAvailableLights.size() == 0) ! { ! return -1; ! } TLightSet::iterator iter = mAvailableLights.begin(); --- 159,165 ---- { if (mAvailableLights.size() == 0) ! { ! return -1; ! } TLightSet::iterator iter = mAvailableLights.begin(); *************** *** 190,194 **** static _ptr proc = (_ptr) GetExtension(#_function); ! void OpenGLServer::glActiveTextureARB(unsigned int texture) { #ifdef __APPLE__ --- 194,199 ---- static _ptr proc = (_ptr) GetExtension(#_function); ! void ! OpenGLServer::glActiveTextureARB(unsigned int texture) { #ifdef __APPLE__ *************** *** 206,207 **** --- 211,226 ---- #endif } + + std::string + OpenGLServer::GetWindowHandleStr() const + { + long int handle = 0; + + if (mGLSystem.get() != 0) + { + handle = mGLSystem->GetWindowHandle(); + } + std::ostringstream ost; + ost << handle; + return ost.str(); + } |
From: Oliver O. <fr...@us...> - 2007-03-30 01:45:27
|
Update of /cvsroot/simspark/simspark/spark/kerosin/imageserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6083 Modified Files: Tag: projectx imageserver.h Log Message: changed config.h to sparkconfig.h Index: imageserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/imageserver/imageserver.h,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** imageserver.h 8 Mar 2006 09:18:56 -0000 1.2 --- imageserver.h 30 Mar 2007 01:45:24 -0000 1.2.4.1 *************** *** 24,28 **** #ifdef HAVE_CONFIG_H ! #include <config.h> #endif #ifdef HAVE_IL_IL_H --- 24,28 ---- #ifdef HAVE_CONFIG_H ! #include <sparkconfig.h> #endif #ifdef HAVE_IL_IL_H |
From: Oliver O. <fr...@us...> - 2007-03-30 01:44:30
|
Update of /cvsroot/simspark/simspark/spark/kerosin/imageserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5695 Modified Files: Tag: projectx image.h Log Message: changed config.h to sparkconfig.h Index: image.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/imageserver/image.h,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** image.h 8 Mar 2006 09:18:56 -0000 1.2 --- image.h 30 Mar 2007 01:44:27 -0000 1.2.4.1 *************** *** 33,37 **** */ #ifdef HAVE_CONFIG_H ! #include <config.h> #endif #ifdef HAVE_IL_IL_H --- 33,37 ---- */ #ifdef HAVE_CONFIG_H ! #include <sparkconfig.h> #endif #ifdef HAVE_IL_IL_H |
From: Oliver O. <fr...@us...> - 2007-03-30 01:43:53
|
Update of /cvsroot/simspark/simspark/spark/kerosin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5316 Modified Files: Tag: projectx kerosin.cpp Log Message: added baserenderserver Index: kerosin.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/kerosin.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** kerosin.cpp 10 Feb 2007 16:15:38 -0000 1.1.2.1 --- kerosin.cpp 30 Mar 2007 01:43:50 -0000 1.1.2.1.2.1 *************** *** 42,45 **** --- 42,46 ---- zg.GetCore()->RegisterClassObject(new CLASS(OpenGLServer), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(OpenGLSystem), "kerosin/"); + zg.GetCore()->RegisterClassObject(new CLASS(BaseRenderServer), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(RenderServer), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(RenderControl), "kerosin/"); *************** *** 61,64 **** --- 62,66 ---- zg.GetCore()->RegisterClassObject(new CLASS(Sphere), "kerosin/"); + // std::cerr << "Kerosin run init script\n"; // load default setting zg.GetCore()->GetRoot()->GetScript()->RunInitScript |
From: Oliver O. <fr...@us...> - 2007-03-30 01:42:32
|
Update of /cvsroot/simspark/simspark/spark/kerosin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv4285 Modified Files: Tag: projectx Makefile.am Log Message: added baserenderserver Index: Makefile.am =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/Makefile.am,v retrieving revision 1.6.2.2 retrieving revision 1.6.2.2.2.1 diff -C2 -d -r1.6.2.2 -r1.6.2.2.2.1 *** Makefile.am 28 Feb 2007 08:16:23 -0000 1.6.2.2 --- Makefile.am 30 Mar 2007 01:42:27 -0000 1.6.2.2.2.1 *************** *** 97,100 **** --- 97,102 ---- openglserver/openglserver_c.cpp \ openglserver/openglsystem_c.cpp \ + renderserver/baserenderserver.cpp \ + renderserver/baserenderserver_c.cpp \ renderserver/renderserver.cpp \ renderserver/renderserver_c.cpp \ *************** *** 148,151 **** --- 150,154 ---- openglserver/openglserver.h \ openglserver/glbase.h \ + renderserver/baserenderserver.h \ renderserver/renderserver.h \ renderserver/rendernode.h \ |
From: Oliver O. <fr...@us...> - 2007-03-30 01:39:52
|
Update of /cvsroot/simspark/simspark/spark In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3868 Modified Files: Tag: projectx Makefile.am Log Message: changed config.h to sparkconfig.h Index: Makefile.am =================================================================== RCS file: /cvsroot/simspark/simspark/spark/Makefile.am,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.2.2.1 diff -C2 -d -r1.1.2.2 -r1.1.2.2.2.1 *** Makefile.am 28 Feb 2007 09:16:51 -0000 1.1.2.2 --- Makefile.am 30 Mar 2007 01:39:49 -0000 1.1.2.2.2.1 *************** *** 3,7 **** pkginclude_HEADERS = \ ! config.h CLEANFILES = --- 3,7 ---- pkginclude_HEADERS = \ ! sparkconfig.h CLEANFILES = |
From: Oliver O. <fr...@us...> - 2007-03-30 01:38:45
|
Update of /cvsroot/simspark/simspark/spark/spark In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3477 Modified Files: Tag: projectx spark.h Log Message: changed config.h to sparkconfig.h Index: spark.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/spark/spark.h,v retrieving revision 1.3.2.1.2.1 retrieving revision 1.3.2.1.2.2 diff -C2 -d -r1.3.2.1.2.1 -r1.3.2.1.2.2 *** spark.h 7 Mar 2007 09:52:10 -0000 1.3.2.1.2.1 --- spark.h 30 Mar 2007 01:38:42 -0000 1.3.2.1.2.2 *************** *** 22,26 **** #if HAVE_CONFIG_H ! #include <config.h> #endif --- 22,26 ---- #if HAVE_CONFIG_H ! #include <sparkconfig.h> #endif |
From: Oliver O. <fr...@us...> - 2007-03-30 01:37:39
|
Update of /cvsroot/simspark/simspark/spark/test/coretest In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3086 Modified Files: Tag: projectx main.cpp Log Message: changed config.h to sparkconfig.h Index: main.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/test/coretest/main.cpp,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.1.2.1 diff -C2 -d -r1.2.2.1 -r1.2.2.1.2.1 *** main.cpp 9 Feb 2007 16:12:43 -0000 1.2.2.1 --- main.cpp 30 Mar 2007 01:37:36 -0000 1.2.2.1.2.1 *************** *** 21,25 **** */ #if HAVE_CONFIG_H ! #include <config.h> #endif --- 21,25 ---- */ #if HAVE_CONFIG_H ! #include <sparkconfig.h> #endif |
From: Oliver O. <fr...@us...> - 2007-03-30 01:36:50
|
Update of /cvsroot/simspark/simspark/spark/utility/rcssnet In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2680 Modified Files: Tag: projectx udpsocket.cpp Log Message: changed config.h to sparkconfig.h Index: udpsocket.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/rcssnet/udpsocket.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** udpsocket.cpp 9 Feb 2007 20:09:32 -0000 1.1.2.1 --- udpsocket.cpp 30 Mar 2007 01:36:47 -0000 1.1.2.1.2.1 *************** *** 21,26 **** #include "udpsocket.hpp" ! #ifdef HAVE_CONFIG_H ! #include "config.h" #endif --- 21,26 ---- #include "udpsocket.hpp" ! #if HAVE_CONFIG_H ! #include <sparkconfig.h> #endif |
From: Oliver O. <fr...@us...> - 2007-03-30 01:36:25
|
Update of /cvsroot/simspark/simspark/spark/utility/rcssnet In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2646 Modified Files: Tag: projectx tcpsocket.cpp Log Message: changed config.h to sparkconfig.h Index: tcpsocket.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/rcssnet/tcpsocket.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** tcpsocket.cpp 9 Feb 2007 20:09:32 -0000 1.1.2.1 --- tcpsocket.cpp 30 Mar 2007 01:36:22 -0000 1.1.2.1.2.1 *************** *** 21,26 **** #include "tcpsocket.hpp" ! #ifdef HAVE_CONFIG_H ! #include <config.h> #endif --- 21,26 ---- #include "tcpsocket.hpp" ! #if HAVE_CONFIG_H ! #include <sparkconfig.h> #endif |
From: Oliver O. <fr...@us...> - 2007-03-30 01:29:02
|
Update of /cvsroot/simspark/simspark/spark/utility/rcssnet In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31934 Modified Files: Tag: projectx socket.hpp Log Message: changed config.h to sparkconfig.h Index: socket.hpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/rcssnet/socket.hpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.2.2.1 diff -C2 -d -r1.1.2.2 -r1.1.2.2.2.1 *** socket.hpp 12 Feb 2007 23:57:18 -0000 1.1.2.2 --- socket.hpp 30 Mar 2007 01:28:58 -0000 1.1.2.2.2.1 *************** *** 22,27 **** #define RCSS_NET_SOCKET_HPP ! #ifdef HAVE_CONFIG_H ! #include <config.h> #endif --- 22,27 ---- #define RCSS_NET_SOCKET_HPP ! #if HAVE_CONFIG_H ! #include <sparkconfig.h> #endif |
From: Oliver O. <fr...@us...> - 2007-03-30 01:28:38
|
Update of /cvsroot/simspark/simspark/spark/utility/rcssnet In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31914 Modified Files: Tag: projectx socket.cpp Log Message: changed config.h to sparkconfig.h Index: socket.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/rcssnet/socket.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** socket.cpp 9 Feb 2007 20:09:32 -0000 1.1.2.1 --- socket.cpp 30 Mar 2007 01:28:36 -0000 1.1.2.1.2.1 *************** *** 19,24 **** #include "socket.hpp" ! #ifdef HAVE_CONFIG_H ! #include "config.h" #endif --- 19,24 ---- #include "socket.hpp" ! #if HAVE_CONFIG_H ! #include <sparkconfig.h> #endif |
From: Oliver O. <fr...@us...> - 2007-03-30 01:28:03
|
Update of /cvsroot/simspark/simspark/spark/utility/rcssnet In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31528 Modified Files: Tag: projectx exception.cpp Log Message: changed config.h to sparkconfig.h Index: exception.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/rcssnet/exception.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** exception.cpp 9 Feb 2007 20:09:32 -0000 1.1.2.1 --- exception.cpp 30 Mar 2007 01:28:00 -0000 1.1.2.1.2.1 *************** *** 19,24 **** ***************************************************************************/ ! #ifdef HAVE_CONFIG_H ! #include "config.h" #endif --- 19,24 ---- ***************************************************************************/ ! #if HAVE_CONFIG_H ! #include <sparkconfig.h> #endif |
From: Oliver O. <fr...@us...> - 2007-03-30 01:27:24
|
Update of /cvsroot/simspark/simspark/spark/utility/rcssnet In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31504 Modified Files: Tag: projectx addr.cpp Log Message: changed config.h to sparkconfig.h Index: addr.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/rcssnet/addr.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** addr.cpp 9 Feb 2007 20:09:32 -0000 1.1.2.1 --- addr.cpp 30 Mar 2007 01:27:19 -0000 1.1.2.1.2.1 *************** *** 21,26 **** #include "addr.hpp" ! #ifdef HAVE_CONFIG_H ! #include "config.h" #endif --- 21,26 ---- #include "addr.hpp" ! #if HAVE_CONFIG_H ! #include <sparkconfig.h> #endif |
From: Markus R. <rol...@us...> - 2007-03-19 04:06:31
|
Update of /cvsroot/simspark/simspark/contrib/plugin/soccer/soccernode In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6199/soccernode Added Files: soccernode.cpp soccernode.h soccernode_c.cpp Log Message: --- NEW FILE: soccernode.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2004 RoboCup Soccer Server 3D Maintenance Group $Id: soccernode.cpp,v 1.2 2007/03/17 06:48:38 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "soccernode.h" #include <oxygen/sceneserver/transform.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; using namespace boost; SoccerNode::SoccerNode() : BaseNode() { } SoccerNode::~SoccerNode() { } boost::shared_ptr<oxygen::Transform> SoccerNode::GetTransformParent() const { return mTransformParent; } void SoccerNode::UpdateCached() { BaseNode::UpdateCached(); mTransformParent = shared_dynamic_cast<Transform> (GetParentSupportingClass("Transform").lock()); if (mTransformParent.get() == 0) { GetLog()->Error() << "Error: (SoccerNode: " << GetName() << ") parent node is not derived from TransformNode\n"; } } void SoccerNode::OnLink() { BaseNode::OnLink(); UpdateCached(); } void SoccerNode::OnUnlink() { BaseNode::OnUnlink(); mTransformParent.reset(); } --- NEW FILE: soccernode_c.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: soccernode_c.cpp,v 1.2 2007/03/17 06:48:38 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "soccernode.h" using namespace boost; using namespace oxygen; using namespace std; void CLASS(SoccerNode)::DefineClass() { DEFINE_BASECLASS(oxygen/BaseNode); } --- NEW FILE: soccernode.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2004 RoboCup Soccer Server 3D Maintenance Group $Id: soccernode.h,v 1.2 2007/03/17 06:48:38 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef SOCCERNODE_H #define SOCCERNODE_H #include <oxygen/sceneserver/basenode.h> namespace oxygen { class Transform; } class SoccerNode : public oxygen::BaseNode { public: SoccerNode(); virtual ~SoccerNode(); boost::shared_ptr<oxygen::Transform> GetTransformParent() const; /** update variables from a script */ virtual void UpdateCached(); protected: virtual void OnLink(); virtual void OnUnlink(); /** reference to the parent transform node*/ boost::shared_ptr<oxygen::Transform> mTransformParent; }; DECLARE_CLASS(SoccerNode); #endif // SOCCERNODE_H |
Update of /cvsroot/simspark/simspark/contrib/agentspark In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7693 Added Files: .cvsignore behavior.h hoap2behavior.cpp hoap2behavior.h main.cpp soccerbotbehavior.cpp soccerbotbehavior.h Log Message: - readded agentspark files that got lost in the WIN32 merge --- NEW FILE: .cvsignore --- .deps .libs Makefile Makefile.in agentspark --- NEW FILE: main.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2003 Koblenz University $Id: main.cpp,v 1.2 2007/03/17 06:52:44 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <string> #include <iostream> #include <boost/scoped_ptr.hpp> #include <rcssnet/tcpsocket.hpp> #include <rcssnet/exception.hpp> #include "behavior.h" #ifdef __linux__ #include <netinet/in.h> #endif #include "hoap2behavior.h" #include "soccerbotbehavior.h" using namespace rcss::net; using namespace std; using namespace boost; TCPSocket gSocket; string gHost = "127.0.0.1"; int gPort = 3100; void PrintGreeting() { cout << "agentspark, a spark demo agent\n" << "Copyright (C) 2004 Koblenz University.\n" << "2004 RoboCup Soccer Server 3D Maintenance Group.\n\n"; } void PrintHelp() { cout << "\nusage: agentspark [options]" << endl; cout << "\noptions:" << endl; cout << " --help prints this message." << endl; cout << " --host=IP IP of the server." << endl; cout << "\n"; } void ReadOptions(int argc, char* argv[]) { for( int i = 0; i < argc; i++) { if ( strcmp( argv[i], "--help" ) == 0 ) { PrintHelp(); exit(0); } else if ( strncmp( argv[i], "--host", 6 ) == 0 ) { string tmp=argv[i]; if ( tmp.length() <= 7 ) // minimal sanity check { PrintHelp(); exit(0); } gHost = tmp.substr(7); } } } bool Init() { cout << "connecting to TCP " << gHost << ":" << gPort << endl; try { Addr local(INADDR_ANY,INADDR_ANY); gSocket.bind(local); } catch (BindErr error) { cerr << "failed to bind socket with '" << error.what() << "'" << endl; gSocket.close(); return false; } try { Addr server(gPort,gHost); gSocket.connect(server); } catch (ConnectErr error) { cerr << "connection failed with: '" << error.what() << "'" << endl; gSocket.close(); return false; } return true; } void Done() { gSocket.close(); cout << "closed connection to " << gHost << ":" << gPort << endl; } bool SelectInput() { fd_set readfds; FD_ZERO(&readfds); FD_SET(gSocket.getFD(),&readfds); #ifdef WIN32 int maxFd = 0; #else int maxFd = gSocket.getFD()+1; #endif return select(maxFd,&readfds, 0, 0, 0) > 0; } void PutMessage(const string& msg) { if (msg.empty()) { return; } // prefix the message with it's payload length unsigned int len = static_cast<unsigned int>(htonl(msg.size())); gSocket.send((const char*)&len, sizeof(unsigned int)); gSocket.send(msg.data(), msg.size()); } bool GetMessage(string& msg) { // try to read the first message segment if (! SelectInput()) { return false; } static char buffer[16 * 1024]; int bytesRead = gSocket.recv(buffer, sizeof(buffer)); //cerr << "buffer = |" << string(buffer+1) << "|\n"; //cerr << "bytesRead = |" << bytesRead << "|\n"; //cerr << "Size of buffer = |" << sizeof(buffer) << "|\n"; //cerr << "buffer = |" << buffer << "|\n"; //cerr << "buffer[5] = |" << buffer[5] << "|\n"; //printf ("xxx-%s\n", buffer+5); if (bytesRead < sizeof(unsigned int)) { return false; } // msg is prefixed with it's total length unsigned int msgLen = ntohl(*(unsigned int*)buffer); //cerr << "GM 6 / " << msgLen << "\n"; // read remaining message segments unsigned int msgRead = bytesRead - sizeof(unsigned int); //cerr << "msgRead = |" << msgRead << "|\n"; char *offset = buffer + bytesRead; while (msgRead < msgLen) { if (! SelectInput()) { return false; } msgRead += gSocket.recv(offset, sizeof(buffer) - msgRead); //cerr << "msgRead = |" << msgRead << "|\n"; offset += msgRead; } // zero terminate received data (*offset) = 0; msg = string(buffer+sizeof(unsigned int)); //cerr << msg << endl; return true; } void Run() { // scoped_ptr<Behavior> behavior(new Hoap2Behavior()); scoped_ptr<Behavior> behavior(new SoccerbotBehavior()); PutMessage(behavior->Init()); string msg; while (GetMessage(msg)) { PutMessage(behavior->Think(msg)); } } int main(int argc, char* argv[]) { PrintGreeting(); ReadOptions(argc,argv); if (! Init()) { return 1; } Run(); Done(); } --- NEW FILE: hoap2behavior.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Thu Nov 8 2005 Copyright (C) 2005 Koblenz University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "hoap2behavior.h" #include <iostream> #include <sstream> #include <cmath> using namespace oxygen; using namespace zeitgeist; using namespace std; using namespace boost; using namespace salt; Hoap2Behavior::Hoap2Behavior() : mZG("." PACKAGE_NAME) { } void Hoap2Behavior::SetupJointIDMap() { mJointIDMap.clear(); mJointIDMap["head_joint_2"] = JID_HEAD_2; mJointIDMap["head_joint_1"] = JID_HEAD_1; mJointIDMap["lleg_joint_1"] = JID_LLEG_1; mJointIDMap["rleg_joint_1"] = JID_RLEG_1; mJointIDMap["lleg_joint_2_3"] = JID_LLEG_2_3; mJointIDMap["rleg_joint_2_3"] = JID_RLEG_2_3; mJointIDMap["lleg_joint_4"] = JID_LLEG_4; mJointIDMap["rleg_joint_4"] = JID_RLEG_4; mJointIDMap["lleg_joint_5_6"] = JID_LLEG_5_6; mJointIDMap["rleg_joint_5_6"] = JID_RLEG_5_6; mJointIDMap["larm_joint_1_2"] = JID_LARM_1_2; mJointIDMap["rarm_joint_1_2"] = JID_RARM_1_2; mJointIDMap["larm_joint_3"] = JID_LARM_3; mJointIDMap["rarm_joint_3"] = JID_RARM_3; mJointIDMap["larm_joint_4"] = JID_LARM_4; mJointIDMap["rarm_joint_4"] = JID_RARM_4; mJointIDMap["larm_joint_5"] = JID_LARM_5; mJointIDMap["rarm_joint_5"] = JID_RARM_5; } string Hoap2Behavior::Init() { mZG.GetCore()->ImportBundle("sexpparser"); mParser = shared_static_cast<BaseParser> (mZG.GetCore()->New("SexpParser")); if (mParser.get() == 0) { cerr << "unable to create SexpParser instance." << endl; } SetupJointIDMap(); // use the scene effector to build the agent and beam to a // position near the center of the playing field return "(scene rsg/agent/hoap2.rsg)"; } void Hoap2Behavior::ParseHingeJointInfo(const oxygen::Predicate& predicate) { //cout << "(Hoap2Behavior) parsing HJ info" << endl; // read the object name string name; Predicate::Iterator iter(predicate); if (! predicate.GetValue(iter, "name", name)) { return; } // try to lookup the joint id TJointIDMap::iterator idIter = mJointIDMap.find(name); if (idIter == mJointIDMap.end()) { cerr << "(Hoap2Behavior) unknown joint id!" << endl; return; } JointID jid = (*idIter).second; // read the angle value HingeJointSense sense; if (! predicate.GetValue(iter,"axis", sense.angle)) { return; } // update the map mHingeJointSenseMap[jid] = sense; } void Hoap2Behavior::ParseUniversalJointInfo(const oxygen::Predicate& predicate) { // read the object name string name; Predicate::Iterator iter(predicate); if (! predicate.GetValue(iter, "name", name)) { return; } // try to lookup the joint id TJointIDMap::iterator idIter = mJointIDMap.find(name); if (idIter == mJointIDMap.end()) { cerr << "(Hoap2Behavior) unknown joint id!" << endl; return; } JointID jid = (*idIter).second; // record the angle and rate values UniversalJointSense sense; // try to read axis1 angle if (! predicate.GetValue(iter,"ax1", sense.angle1)) { cerr << "(Hoap2Behavior) could not parse universal joint angle1!" << endl; return; } // try to read axis2 angle if (! predicate.GetValue(iter,"ax2", sense.angle2)) { cerr << "(Hoap2Behavior) could not parse universal joint rate2!" << endl; return; } //cout << "(ParseUniversalJointInfo) got angles " << sense.angle1 // << " and " << sense.angle2 << endl; // update the map mUniversalJointSenseMap[jid] = sense; } string Hoap2Behavior::Think(const std::string& message) { //sleep(1); static const float gain = 0.1f; static BehaviorState state = ARM_UP; // parse message and extract joint angles //cout << "(Hoap2Behavior) received message " << message << endl; shared_ptr<PredicateList> predList = mParser->Parse(message); if (predList.get() != 0) { PredicateList& list = *predList; for ( PredicateList::TList::const_iterator iter = list.begin(); iter != list.end(); ++iter ) { const Predicate& predicate = (*iter); // check for a joint percept switch(predicate.name[0]) { case 'H': // hinge joint (HJ) ParseHingeJointInfo(predicate); break; case 'U': // universal joint (UJ) ParseUniversalJointInfo(predicate); break; default: break; } } } float curAngle = 0; float newAngle = 0; // string stream for the server commands stringstream ss(""); // curAngle = mUniversalJointSenseMap[JID_LLEG_5_6].angle1; // if (curAngle < 40.0) // { // newAngle = gain * (40.0 - curAngle); // ss << "(lleg_eff_5_6 0.0 " << newAngle << ")"; // } #if 1 switch(state) { case ARM_UP: curAngle = mUniversalJointSenseMap[JID_RARM_1_2].angle2; if (curAngle < 90.0) { newAngle = gain * (90.0f - curAngle); ss << "(rarm_eff_1_2 0.0 " << newAngle << ")"; } else { state = ARM_ROTATE; } break; case ARM_ROTATE: curAngle = mHingeJointSenseMap[JID_RARM_3].angle; if (curAngle > -90.0f) { newAngle = gain * (-90.0f - curAngle); ss << "(rarm_eff_3 " << newAngle << ")"; } else { state = ARM_WAVE_1; } break; case ARM_WAVE_1: curAngle = mHingeJointSenseMap[JID_RARM_4].angle; if (curAngle < 90.0) { newAngle = gain * (90.0f - curAngle); ss << "(rarm_eff_4 " << newAngle << ")"; } else { state = ARM_WAVE_2; } break; case ARM_WAVE_2: curAngle = mHingeJointSenseMap[JID_RARM_4].angle; if (curAngle > 60.0 || curAngle <= 59.5) { newAngle = gain * (60.0f - curAngle); ss << "(rarm_eff_4 " << newAngle << ")"; } else { state = ARM_WAVE_1; } break; default: break; } #endif // cout << "+++" << endl; // cout << "current angle: " << curAngle << endl; // cout << "desired angle: " << newAngle << endl; // cout << "(Behavior) sending string " << ss.str() << " to server" << endl; // cout << "State is " << state << endl; // cout << "---" << endl; return ss.str(); //return string(""); } --- NEW FILE: hoap2behavior.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Thu Mar 27 2006 Copyright (C) 2006 RoboCup Simulation League Maintenance Committee This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef HOAP2BEHAVIOR_H #define HOAP2BEHAVIOR_H #include "behavior.h" #include <oxygen/gamecontrolserver/baseparser.h> #include <oxygen/gamecontrolserver/predicate.h> #include <zeitgeist/zeitgeist.h> class Hoap2Behavior : public Behavior { public: struct HingeJointSense { /** joint angle */ float angle; HingeJointSense() : angle(0) {}; }; struct UniversalJointSense { /** joint angle axis 1*/ float angle1; /** joint angle axis 2*/ float angle2; UniversalJointSense() : angle1(0), angle2(0) {}; }; enum JointID { JID_HEAD_1 = 0, JID_HEAD_2 = 1, JID_LLEG_1 = 2, JID_RLEG_1 = 3, JID_LLEG_2_3 = 4, JID_RLEG_2_3 = 5, JID_LLEG_4 = 6, JID_RLEG_4 = 7, JID_LLEG_5_6 = 8, JID_RLEG_5_6 = 9, JID_LARM_1_2 = 10, JID_RARM_1_2 = 11, JID_LARM_3 = 12, JID_RARM_3 = 13, JID_LARM_4 = 14, JID_RARM_4 = 15, JID_LARM_5 = 16, JID_RARM_5 = 17 }; enum BehaviorState { ARM_UP = 0, ARM_ROTATE = 1, ARM_WAVE_1 = 2, ARM_WAVE_2 = 3 }; public: Hoap2Behavior(); virtual std::string Init(); virtual std::string Think(const std::string& message); protected: void SetupJointIDMap(); void ParseHingeJointInfo(const oxygen::Predicate& predicate); void ParseUniversalJointInfo(const oxygen::Predicate& predicate); protected: zeitgeist::Zeitgeist mZG; boost::shared_ptr<oxygen::BaseParser> mParser; // mapping from joint id to joint hinge sense object typedef std::map<JointID, HingeJointSense> THingeJointSenseMap; THingeJointSenseMap mHingeJointSenseMap; // mapping from joint id to joint hinge sense object typedef std::map<JointID, UniversalJointSense> TUniversalJointSenseMap; TUniversalJointSenseMap mUniversalJointSenseMap; // mapping from object name to joint id typedef std::map<std::string, JointID> TJointIDMap; TJointIDMap mJointIDMap; }; #endif // HOAP2BEHAVIOR_H --- NEW FILE: soccerbotbehavior.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Thu Nov 8 2005 Copyright (C) 2005 Koblenz University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "soccerbotbehavior.h" #include <iostream> #include <sstream> #include <cmath> using namespace oxygen; using namespace zeitgeist; using namespace std; using namespace boost; using namespace salt; SoccerbotBehavior::SoccerbotBehavior() : mZG("." PACKAGE_NAME) { } void SoccerbotBehavior::SetupJointIDMap() { mJointIDMap.clear(); mJointIDMap["head_joint_2"] = JID_HEAD_2; mJointIDMap["head_joint_1"] = JID_HEAD_1; mJointIDMap["lleg_joint_1"] = JID_LLEG_1; mJointIDMap["rleg_joint_1"] = JID_RLEG_1; mJointIDMap["lleg_joint_2_3"] = JID_LLEG_2_3; mJointIDMap["rleg_joint_2_3"] = JID_RLEG_2_3; mJointIDMap["lleg_joint_4"] = JID_LLEG_4; mJointIDMap["rleg_joint_4"] = JID_RLEG_4; mJointIDMap["lleg_joint_5_6"] = JID_LLEG_5_6; mJointIDMap["rleg_joint_5_6"] = JID_RLEG_5_6; mJointIDMap["larm_joint_1_2"] = JID_LARM_1_2; mJointIDMap["rarm_joint_1_2"] = JID_RARM_1_2; mJointIDMap["larm_joint_3"] = JID_LARM_3; mJointIDMap["rarm_joint_3"] = JID_RARM_3; mJointIDMap["larm_joint_4"] = JID_LARM_4; mJointIDMap["rarm_joint_4"] = JID_RARM_4; mJointIDMap["larm_joint_5"] = JID_LARM_5; mJointIDMap["rarm_joint_5"] = JID_RARM_5; } string SoccerbotBehavior::Init() { mZG.GetCore()->ImportBundle("sexpparser"); mParser = shared_static_cast<BaseParser> (mZG.GetCore()->New("SexpParser")); if (mParser.get() == 0) { cerr << "unable to create SexpParser instance." << endl; } SetupJointIDMap(); // use the scene effector to build the agent and beam to a // position near the center of the playing field return "(scene rsg/agent/soccerbot.rsg)"; } void SoccerbotBehavior::ParseHingeJointInfo(const oxygen::Predicate& predicate) { //cout << "(SoccerbotBehavior) parsing HJ info" << endl; // read the object name string name; Predicate::Iterator iter(predicate); if (! predicate.GetValue(iter, "name", name)) { return; } // try to lookup the joint id TJointIDMap::iterator idIter = mJointIDMap.find(name); if (idIter == mJointIDMap.end()) { cerr << "(SoccerbotBehavior) unknown joint id!" << endl; return; } JointID jid = (*idIter).second; // read the angle value HingeJointSense sense; if (! predicate.GetValue(iter,"ax", sense.angle)) { return; } // update the map mHingeJointSenseMap[jid] = sense; } void SoccerbotBehavior::ParseUniversalJointInfo(const oxygen::Predicate& predicate) { // read the object name string name; Predicate::Iterator iter(predicate); if (! predicate.GetValue(iter, "name", name)) { return; } // try to lookup the joint id TJointIDMap::iterator idIter = mJointIDMap.find(name); if (idIter == mJointIDMap.end()) { cerr << "(SoccerbotBehavior) unknown joint id!" << endl; return; } JointID jid = (*idIter).second; // record the angle and rate values UniversalJointSense sense; // try to read axis1 angle if (! predicate.GetValue(iter,"ax1", sense.angle1)) { cerr << "(SoccerbotBehavior) could not parse universal joint angle1!" << endl; return; } // try to read axis2 angle if (! predicate.GetValue(iter,"ax2", sense.angle2)) { cerr << "(SoccerbotBehavior) could not parse universal joint angle2!" << endl; return; } // update the map mUniversalJointSenseMap[jid] = sense; } static const float gain = 0.1f; static SoccerbotBehavior::BehaviorState state = SoccerbotBehavior::ARM_UP; float SoccerbotBehavior::ClampAngle(float angle) { if (angle >= 0.0) { if (angle < gain) { return gain; } } else { if (angle > - gain) { return -gain; } } return angle; } string SoccerbotBehavior::Think(const std::string& message) { // parse message and extract joint angles //cout << "(SoccerbotBehavior) received message " << message << endl; shared_ptr<PredicateList> predList = mParser->Parse(message); if (predList.get() != 0) { PredicateList& list = *predList; for ( PredicateList::TList::const_iterator iter = list.begin(); iter != list.end(); ++iter ) { const Predicate& predicate = (*iter); // check for a joint percept switch(predicate.name[0]) { case 'H': // hinge joint (HJ) ParseHingeJointInfo(predicate); break; case 'U': // universal joint (UJ) ParseUniversalJointInfo(predicate); break; default: break; } } } float curAngle = 0; float newAngle = 0; // string stream for the server commands stringstream ss(""); switch(state) { case ARM_UP: curAngle = mUniversalJointSenseMap[JID_RARM_1_2].angle2; if (curAngle < 90.0) { newAngle = ClampAngle(gain * (90.0f - curAngle)); ss << "(rarm_eff_1_2 0.0 " << newAngle << ")"; } else { state = ARM_ROTATE; } break; case ARM_ROTATE: curAngle = mHingeJointSenseMap[JID_RARM_3].angle; if (curAngle > -90.0f) { newAngle = ClampAngle(gain * (-90.0f - curAngle)); ss << "(rarm_eff_3 " << newAngle << ")"; } else { state = ARM_WAVE_1; } break; case ARM_WAVE_1: curAngle = mHingeJointSenseMap[JID_RARM_4].angle; if (curAngle < 90.0) { newAngle = ClampAngle(gain * (90.0f - curAngle)); ss << "(rarm_eff_4 " << newAngle << ")"; } else { state = ARM_WAVE_2; } break; case ARM_WAVE_2: curAngle = mHingeJointSenseMap[JID_RARM_4].angle; if (curAngle > 60.0 || curAngle <= 59.5) { newAngle = ClampAngle(gain * (60.0f - curAngle)); ss << "(rarm_eff_4 " << newAngle << ")"; } else { state = ARM_DOWN; } break; case ARM_DOWN: curAngle = mUniversalJointSenseMap[JID_RARM_1_2].angle2; if (curAngle > 0) { newAngle = ClampAngle(-gain * 20.0f); ss << "(rarm_eff_1_2 0.0 " << newAngle << ")"; } else { state = ARM_UP; } break; default: break; } // cout << "+++" << endl; // cout << "current angle: " << curAngle << endl; // cout << "desired angle: " << newAngle << endl; // cout << "(Behavior) sending string " << ss.str() << " to server" << endl; // cout << "State is " << state << endl; // cout << "---" << endl; return ss.str(); } --- NEW FILE: soccerbotbehavior.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Thu Mar 27 2006 Copyright (C) 2006 RoboCup Simulation League Maintenance Committee This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef SOCCERBOTBEHAVIOR_H #define SOCCERBOTBEHAVIOR_H #include "behavior.h" #include <oxygen/gamecontrolserver/baseparser.h> #include <oxygen/gamecontrolserver/predicate.h> #include <zeitgeist/zeitgeist.h> class SoccerbotBehavior : public Behavior { public: struct HingeJointSense { /** joint angle */ float angle; HingeJointSense() : angle(0) {}; }; struct UniversalJointSense { /** joint angle axis 1*/ float angle1; /** joint angle axis 2*/ float angle2; UniversalJointSense() : angle1(0), angle2(0) {}; }; enum JointID { JID_HEAD_1 = 0, JID_HEAD_2 = 1, JID_LLEG_1 = 2, JID_RLEG_1 = 3, JID_LLEG_2_3 = 4, JID_RLEG_2_3 = 5, JID_LLEG_4 = 6, JID_RLEG_4 = 7, JID_LLEG_5_6 = 8, JID_RLEG_5_6 = 9, JID_LARM_1_2 = 10, JID_RARM_1_2 = 11, JID_LARM_3 = 12, JID_RARM_3 = 13, JID_LARM_4 = 14, JID_RARM_4 = 15, JID_LARM_5 = 16, JID_RARM_5 = 17 }; enum BehaviorState { ARM_UP = 0, ARM_ROTATE = 1, ARM_WAVE_1 = 2, ARM_WAVE_2 = 3, ARM_DOWN = 4 }; public: SoccerbotBehavior(); virtual std::string Init(); virtual std::string Think(const std::string& message); protected: void SetupJointIDMap(); void ParseHingeJointInfo(const oxygen::Predicate& predicate); void ParseUniversalJointInfo(const oxygen::Predicate& predicate); float ClampAngle(float angle); protected: zeitgeist::Zeitgeist mZG; boost::shared_ptr<oxygen::BaseParser> mParser; // mapping from joint id to joint hinge sense object typedef std::map<JointID, HingeJointSense> THingeJointSenseMap; THingeJointSenseMap mHingeJointSenseMap; // mapping from joint id to joint hinge sense object typedef std::map<JointID, UniversalJointSense> TUniversalJointSenseMap; TUniversalJointSenseMap mUniversalJointSenseMap; // mapping from object name to joint id typedef std::map<std::string, JointID> TJointIDMap; TJointIDMap mJointIDMap; }; #endif // SOCCERBOTBEHAVIOR_H --- NEW FILE: behavior.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2003 Koblenz University $Id: behavior.h,v 1.2 2007/03/17 06:52:44 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef BEHAVIOR_H #define BEHAVIOR_H #include <string> class Behavior { public: /** called once when the initially connected to the server */ virtual std::string Init() = 0; /** called for every message received from the server; should return an action string */ virtual std::string Think(const std::string& message) = 0; }; #endif // BEHAVIOR_H |
From: Markus R. <rol...@us...> - 2007-03-19 02:10:15
|
Update of /cvsroot/simspark/simspark/contrib/plugin/soccer In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6199 Added Files: export.cpp Log Message: --- NEW FILE: export.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: export.cpp,v 1.2 2007/03/17 06:48:38 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <zeitgeist/zeitgeist.h> #include <soccer/soccernode/soccernode.h> #include <soccer/objectstate/objectstate.h> #include <soccer/agentstate/agentstate.h> #include <soccer/visionperceptor/visionperceptor.h> ZEITGEIST_EXPORT_BEGIN() ZEITGEIST_EXPORT(SoccerNode); ZEITGEIST_EXPORT(ObjectState); ZEITGEIST_EXPORT(AgentState); ZEITGEIST_EXPORT(VisionPerceptor); ZEITGEIST_EXPORT_END() |
From: Markus R. <rol...@us...> - 2007-03-19 01:43:47
|
Update of /cvsroot/simspark/simspark/contrib/plugin/soccer/agentstate In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6199/agentstate Added Files: agentstate.cpp agentstate.h agentstate_c.cpp Log Message: --- NEW FILE: agentstate.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: agentstate.h,v 1.2 2007/03/17 06:48:38 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef AGENTSTATE_H #define AGENTSTATE_H #include <soccer/soccerbase/soccertypes.h> #include <soccer/objectstate/objectstate.h> namespace oxygen { class Body; } class AgentState : public ObjectState { // // functions // public: AgentState(); virtual ~AgentState(); /** set the team index */ void SetTeamIndex(TTeamIndex idx); /** returns the team index */ TTeamIndex GetTeamIndex() const; /** Set the uniform number. * * This sets both the uniform number as well as the object id * (only the representation is different). */ void SetUniformNumber(int number); /** returns the uniform number as integer */ int GetUniformNumber() const; /** Set the object id for perceptors. * * This method is the same as SetUniformNumber for AgentState. * If id is not an integer, the object ID will not be changed. * * \param id a new ID, an integer represented as std::string. * \param pt the percept type for which the ID is set */ virtual void SetID(const std::string& id, TPerceptType pt = PT_Default); /** Get the battery state */ float GetBattery() const; /** Set the battery state */ void SetBattery(float battery); /** Get the motor temperature */ float GetTemperature() const; /** Set the temperature */ void SetTemperature(float temperature); /** reduce battery by the given amout. * \param consumption the amount by which the battery is reduced if possible * \return true if the battery if good enough for the given consumption */ bool ReduceBattery(float consumption); /** Add a new message to the list */ void AddMessage(const std::string& msg, float direction, bool teamMate); void AddSelfMessage(const std::string& msg); /** Get the first message from the list */ bool GetMessage(std::string& msg, float& direction, bool teamMate); bool GetSelfMessage(std::string& msg); protected: /** team index */ TTeamIndex mTeamIndex; /** uniform number */ int mUniformNumber; /** motor temperature */ float mTemperature; /** battery state */ float mBattery; /** self message */ std::string mSelfMsg; /** team-mate's message */ std::string mMateMsg; float mMateMsgDir; /** opponent's message */ std::string mOppMsg; float mOppMsgDir; /** max hear capacity units */ int mHearMax; /** hear capacity increase units when it's silent */ int mHearInc; /** hear capacity decrease units when player hears a message */ int mHearDecay; /** hear capacity for his team */ int mHearMateCap; /** hear capacity for opponent team */ int mHearOppCap; /** is there any message from myself */ bool mIfSelfMsg; /** is there any message from teammate */ bool mIfMateMsg; /** is there any message from oponnent */ bool mIfOppMsg; }; DECLARE_CLASS(AgentState); #endif // AGENTSTATE_H --- NEW FILE: agentstate.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: agentstate.cpp,v 1.2 2007/03/17 06:48:38 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "agentstate.h" #include <soccer/soccerbase/soccertypes.h> #include <sstream> using namespace oxygen; using namespace std; AgentState::AgentState() : ObjectState(), mTeamIndex(TI_NONE), mTemperature(20.0), mBattery(100.0), mHearMax(2), mHearInc(1), mHearDecay(2), mHearMateCap(2), mHearOppCap(2), mIfSelfMsg(false), mIfMateMsg(false), mIfOppMsg(false) { // set mID and mUniformNumber into a joint state SetUniformNumber(0); } AgentState::~AgentState() { } void AgentState::SetTeamIndex(TTeamIndex idx) { mTeamIndex = idx; } TTeamIndex AgentState::GetTeamIndex() const { return mTeamIndex; } void AgentState::SetUniformNumber(int number) { mUniformNumber = number; std::ostringstream ss; ss << number; ObjectState::SetID(ss.str()); } int AgentState::GetUniformNumber() const { return mUniformNumber; } void AgentState::SetID(const std::string& id, TPerceptType pt) { std::istringstream iss(id); iss >> mUniformNumber; if (!iss) { // conversion failed. mUniformNumber is not changed. return; } ObjectState::SetID(id,pt); } float AgentState::GetBattery() const { return mBattery; } void AgentState::SetBattery(float battery) { mBattery = battery; } float AgentState::GetTemperature() const { return 23.0; } void AgentState::SetTemperature(float temperature) { mTemperature = temperature; } bool AgentState::ReduceBattery(float consumption) { if (mBattery - consumption >= 0.0) { mBattery -= consumption; return true; } return false; } void AgentState::AddMessage(const string& msg, float direction, bool teamMate) { if (teamMate) { if (mHearMateCap < mHearDecay) { return; } mHearMateCap -= mHearDecay; mMateMsg = msg; mMateMsgDir = direction; mIfMateMsg = true; } else { if (mHearOppCap < mHearDecay) { return; } mHearOppCap -= mHearDecay; mOppMsg = msg; mOppMsgDir = direction; mIfOppMsg = true; } } void AgentState::AddSelfMessage(const string& msg) { mSelfMsg = msg; mIfSelfMsg = true; } bool AgentState::GetMessage(string& msg, float& direction, bool teamMate) { if (teamMate) { if (mHearMateCap < mHearMax) { mHearMateCap += mHearInc; } if (! mIfMateMsg) { return false; } msg = mMateMsg; direction = mMateMsgDir; mIfMateMsg = false; return true; } else { if (mHearOppCap < mHearMax) { mHearOppCap += mHearInc; } if (! mIfOppMsg) { return false; } msg = mOppMsg; direction = mOppMsgDir; mIfOppMsg = false; return true; } } bool AgentState::GetSelfMessage(string& msg) { if (! mIfSelfMsg) { return false; } msg = mSelfMsg; mIfSelfMsg = false; return true; } --- NEW FILE: agentstate_c.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: agentstate_c.cpp,v 1.2 2007/03/17 06:48:38 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "agentstate.h" using namespace boost; using namespace oxygen; void CLASS(AgentState)::DefineClass() { DEFINE_BASECLASS(ObjectState); } |
From: Markus R. <rol...@us...> - 2007-03-19 00:16:10
|
Update of /cvsroot/simspark/simspark/spark/zeitgeist/scriptserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10929 Modified Files: scriptserver.cpp Log Message: - fixed relative path for windows config.h inclusion Index: scriptserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/scriptserver/scriptserver.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** scriptserver.cpp 15 Mar 2007 07:26:31 -0000 1.3 --- scriptserver.cpp 17 Mar 2007 07:01:28 -0000 1.4 *************** *** 43,49 **** --- 43,54 ---- and the wrong one after.... :-( */ + #ifdef WIN32 + #include "../../win32/config.h" + #else #include "../config.h" #endif + #endif + using namespace boost; using namespace std; |