From: <he...@us...> - 2013-06-09 18:35:19
|
Revision: 356 http://sourceforge.net/p/simspark/svn/356 Author: hedayat Date: 2013-06-09 18:35:13 +0000 (Sun, 09 Jun 2013) Log Message: ----------- Merge (except renderserver.cpp) with trunk Modified Paths: -------------- branches/gui-bullet/rcssserver3d/CMakeLists.txt branches/gui-bullet/rcssserver3d/ChangeLog branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoarm.rsg branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoleg.rsg branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg branches/gui-bullet/rcssserver3d/plugin/soccer/CMakeLists.txt branches/gui-bullet/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.h branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate_c.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/agentstateperceptor/agentstateperceptor.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/ball/ball.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/beameffector/beameffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/catcheffector/catcheffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/createeffector/createeffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/driveeffector/driveeffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/export.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h branches/gui-bullet/rcssserver3d/plugin/soccer/gametimeperceptor/gametimeperceptor.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/initeffector/initeffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/initeffector/singlematiniteffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/initeffector/staticmeshiniteffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/internalsoccermonitor/internalsoccerinput.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/internalsoccermonitor/internalsoccerrender.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/kickeffector/kickeffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/pantilteffector/pantilteffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h branches/gui-bullet/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor_c.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/sayeffector/sayeffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/soccerbase/soccerbase.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/soccercontrolaspect/soccercontrolaspect.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/soccernode/soccernode.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h branches/gui-bullet/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/visionperceptor/visionperceptor.cpp branches/gui-bullet/rcssserver3d/plugin/soccermonitor/soccerinput.cpp branches/gui-bullet/rcssserver3d/plugin/soccermonitor/soccerinputlogplayer.cpp branches/gui-bullet/rcssserver3d/plugin/soccermonitor/soccerrender.cpp branches/gui-bullet/rcssserver3d/rcssagent3d/hoap2behavior.cpp branches/gui-bullet/rcssserver3d/rcssagent3d/naobehavior.cpp branches/gui-bullet/rcssserver3d/rcssagent3d/soccerbehavior.cpp branches/gui-bullet/rcssserver3d/rcssagent3d/soccerbotbehavior.cpp branches/gui-bullet/rcssserver3d/rcssmonitor3d/CMakeLists.txt branches/gui-bullet/rcssserver3d/rcssserver3d/CMakeLists.txt branches/gui-bullet/rcssserver3d/rcssserver3d/naosoccersim.rb branches/gui-bullet/spark/CMakeLists.txt branches/gui-bullet/spark/ChangeLog branches/gui-bullet/spark/lib/kerosin/fontserver/glyph.cpp branches/gui-bullet/spark/lib/kerosin/imageserver/imageserver.cpp branches/gui-bullet/spark/lib/kerosin/inputserver/inputcontrol.cpp branches/gui-bullet/spark/lib/kerosin/inputserver/inputserver.cpp branches/gui-bullet/spark/lib/kerosin/materialserver/material2dtexture.cpp branches/gui-bullet/spark/lib/kerosin/materialserver/materialserver.cpp branches/gui-bullet/spark/lib/kerosin/openglserver/openglserver.cpp branches/gui-bullet/spark/lib/kerosin/renderserver/rendercontrol.cpp branches/gui-bullet/spark/lib/kerosin/renderserver/renderserver.cpp branches/gui-bullet/spark/lib/kerosin/sceneserver/singlematnode.cpp branches/gui-bullet/spark/lib/kerosin/sceneserver/staticmesh.cpp branches/gui-bullet/spark/lib/kerosin/soundserver/soundserver.cpp branches/gui-bullet/spark/lib/oxygen/agentaspect/agentaspect.cpp branches/gui-bullet/spark/lib/oxygen/agentaspect/effector.cpp branches/gui-bullet/spark/lib/oxygen/controlaspect/controlaspect.cpp branches/gui-bullet/spark/lib/oxygen/gamecontrolserver/gamecontrolserver.cpp branches/gui-bullet/spark/lib/oxygen/geometryserver/geometryserver.cpp branches/gui-bullet/spark/lib/oxygen/geometryserver/indexbuffer.cpp branches/gui-bullet/spark/lib/oxygen/monitorserver/monitorserver.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/angularmotor.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/balljoint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/body.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/bodycontroller.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/boxcollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/capsulecollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/collider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/collisionhandler.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/compoundcollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/concavecollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/conecollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/conetwistjoint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/contactjointhandler.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/convexcollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/cylindercollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/dynamicbody.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/emptycollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/fixedjoint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/hinge2joint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/hingejoint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/joint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/physicsobject.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/physicsserver.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/planecollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/raycollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/rigidbody.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/sliderjoint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/softbody.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/space.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/spherecollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/staticbody.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/transformcollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/universaljoint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/world.cpp branches/gui-bullet/spark/lib/oxygen/sceneserver/basenode.cpp branches/gui-bullet/spark/lib/oxygen/sceneserver/fpscontroller.cpp branches/gui-bullet/spark/lib/oxygen/sceneserver/sceneserver.cpp branches/gui-bullet/spark/lib/oxygen/sceneserver/transform.cpp branches/gui-bullet/spark/lib/oxygen/simulationserver/simcontrolnode.cpp branches/gui-bullet/spark/lib/oxygen/simulationserver/simulationserver.cpp branches/gui-bullet/spark/lib/oxygen/spadesserver/spadesserver.cpp branches/gui-bullet/spark/lib/zeitgeist/class.cpp branches/gui-bullet/spark/lib/zeitgeist/core.cpp branches/gui-bullet/spark/lib/zeitgeist/core.h branches/gui-bullet/spark/lib/zeitgeist/corecontext.cpp branches/gui-bullet/spark/lib/zeitgeist/fileserver/fileserver.cpp branches/gui-bullet/spark/lib/zeitgeist/leaf.cpp branches/gui-bullet/spark/lib/zeitgeist/leaf.h branches/gui-bullet/spark/lib/zeitgeist/node.cpp branches/gui-bullet/spark/lib/zeitgeist/node.h branches/gui-bullet/spark/plugin/accelerometer/accelerometer.cpp branches/gui-bullet/spark/plugin/collisionperceptor/forceresistanceperceptor.cpp branches/gui-bullet/spark/plugin/collisionperceptor/perceptorhandler.cpp branches/gui-bullet/spark/plugin/collisionperceptor/touchperceptorhandler.cpp branches/gui-bullet/spark/plugin/filesystemrar/filesystemrar.cpp branches/gui-bullet/spark/plugin/forceeffector/forceeffector.cpp branches/gui-bullet/spark/plugin/gyrorateperceptor/gyrorateperceptor.cpp branches/gui-bullet/spark/plugin/imageperceptor/imageperceptor.cpp branches/gui-bullet/spark/plugin/inputsdl/inputsystemsdl.cpp branches/gui-bullet/spark/plugin/objimporter/objimporter.cpp branches/gui-bullet/spark/plugin/perfectvisionperceptor/perfectvisionperceptor.cpp branches/gui-bullet/spark/plugin/rosimporter/rosimporter.cpp branches/gui-bullet/spark/plugin/rubysceneimporter/rubysceneimporter.cpp branches/gui-bullet/spark/plugin/sceneeffector/sceneaction.h branches/gui-bullet/spark/plugin/sceneeffector/sceneeffector.cpp branches/gui-bullet/spark/plugin/sparkagent/hinge2effector.cpp branches/gui-bullet/spark/plugin/sparkagent/hingeeffector.cpp branches/gui-bullet/spark/plugin/sparkagent/timeperceptor.cpp branches/gui-bullet/spark/plugin/sparkagent/universaljointeffector.cpp branches/gui-bullet/spark/plugin/sparkmonitor/sparkmonitor.cpp branches/gui-bullet/spark/plugin/sparkmonitor/sparkmonitorclient.cpp branches/gui-bullet/spark/plugin/sparkmonitor/sparkmonitorlogfileserver.cpp branches/gui-bullet/spark/spark/spark.cpp branches/gui-bullet/spark/test/coretest/main.cpp branches/gui-bullet/spark/test/fonttest/main.cpp branches/gui-bullet/spark/test/inputtest/main.cpp branches/gui-bullet/spark/test/scenetest/main.cpp branches/gui-bullet/spark/test/scenetest/md5mesh.cpp Added Paths: ----------- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.h branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem_c.cpp branches/gui-bullet/rcssserver3d/rcssserver3d/naorobottypes.rb branches/gui-bullet/spark/doc/papers/2013/ Removed Paths: ------------- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg Property Changed: ---------------- branches/gui-bullet/rcssserver3d/ branches/gui-bullet/spark/ Index: branches/gui-bullet/rcssserver3d =================================================================== --- branches/gui-bullet/rcssserver3d 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d 2013-06-09 18:35:13 UTC (rev 356) Property changes on: branches/gui-bullet/rcssserver3d ___________________________________________________________________ Added: svn:mergeinfo ## -0,0 +1 ## +/trunk/rcssserver3d:329-355 \ No newline at end of property Modified: branches/gui-bullet/rcssserver3d/CMakeLists.txt =================================================================== --- branches/gui-bullet/rcssserver3d/CMakeLists.txt 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/CMakeLists.txt 2013-06-09 18:35:13 UTC (rev 356) @@ -26,7 +26,7 @@ find_package(Spark REQUIRED) find_package(Freetype REQUIRED) -find_package(Boost REQUIRED) +find_package(Boost REQUIRED system) find_package(SDL REQUIRED) find_package(DevIL REQUIRED) find_package(ODE REQUIRED) Modified: branches/gui-bullet/rcssserver3d/ChangeLog =================================================================== --- branches/gui-bullet/rcssserver3d/ChangeLog 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/ChangeLog 2013-06-09 18:35:13 UTC (rev 356) @@ -1,3 +1,50 @@ +2013-06-09 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/gamestateaspect/gamestateaspect.h: + * plugin/soccer/gamestateaspect/gamestateaspect.cpp: + * plugin/soccer/agentstate/agentstate.cpp (AgentState::OnUnlink): + * rcssserver3d/naosoccersim.rb: + - control the number of heterogeneous players each team can use. It limits + both the total number of heterogeneous players of each team + (MaxTotalHeteroCount variable in naosoccersim.rb), and the number of + heterogeneous players of each type (MaxHeteroTypeCount variable) + +2013-06-06 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h: + * plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp: + * plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor_c.cpp: + * data/rsg/agent/nao/naoneckhead.rsg: + - added MyOrientation sensing by Patrick (setSenseMyOrien in rsg file) + +2013-04-25 Hedayat Vatankhah <hed...@gm...> + + * data/rsg/agent/nao/nao_hetero.rsg: + * plugin/soccer/agentstate/agentstate.h: + * plugin/soccer/agentstate/agentstate.cpp: + * plugin/soccer/agentstate/agentstate_c.cpp: + - added robot type to agent state + +2012-11-25 Hedayat Vatankhah <hed...@gm...> + + * data/rsg/agent/nao/nao_hetero.rsg: + - nao_hetero.rsg can be used to create different variants of Nao robot + - nao.rsg a compatbility scene to create default Nao type (type 0) + + * rcssserver3d/naorobottypes.rb: + * rcssserver3d/naosoccersim.rb: + * rcssserver3d/CMakeLists.txt: + - added naorobottypes.rb to initialize Nao heterogeneous robot parameters + +2012-06-21 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp: + - let a player kick the ball more than once in kickoff if there are not + more than 2 players inside the game. Should be removed when a proper + "Penalty mode" is added to the simulator + - small cleanup: call SoccerBase::GetGameControlServer() to access + game control server + 2012-05-23 Hedayat Vatankhah <hed...@gm...> * NEWS: Modified: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -6,14 +6,9 @@ $Path_Body1 $Path_Body2 $Anchor_X $Anchor_Y $Anchor_Z $Axis_X $Axis_Y $Axis_Z - $Min $Max + $MinDeg $MaxDeg + $MaxAbsSpeed ) - - (def $PI 3.14159265) - ;(def $MinDeg (eval $Min * (eval 180.0 / $PI))) - ;(def $MaxDeg (eval $Max * (eval 180.0 / $PI))) - (def $MinDeg $Min) - (def $MaxDeg $Max) ; There are 2 types of motor installed on the real Nao, each type has ; 2 types of "Reduction ratio". @@ -23,7 +18,7 @@ ; We don't need to follow them totally that different hingeeffector is using ; different types of motor. ; All the hingeeffector uses the 351.77 - (def $MaxAbsSpeed (eval $PI * (eval 351.77 / 180.0))) + ; (def $MaxAbsSpeed (eval $PI * (eval 351.77 / 180.0))) ; ;Hinge Joint Parameters Deleted: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -1,138 +0,0 @@ -; -*- mode: lisp; -*- - -; -; nao robot description file. -; - -(RSG 0 1) -( - -; -; The torso parameters -; - -(def $TorsoLength 0.1) -(def $TorsoWidth 0.1) -(def $TorsoHeight 0.18) -(def $TorsoMass 1.2171) - -(def $TorsoInitX 0) -(def $TorsoInitY -1) -(def $TorsoInitZ 1.5) - -(def $loadObj (eval Nao.UseTexture)) -; -;Begin Construct of Nao -; -(nd Space - (setName spacenao) - (disableInnerCollision true) - - ; - ;The torso part - ; - (nd AgentAspect - (setName body) - (setLocalPos $TorsoInitX $TorsoInitY $TorsoInitZ) - - (switch $loadObj - (true - (nd Transform - (setLocalRotation -90 0 180) - (nd StaticMesh - (load 'models/naobody.obj') - (setScale $TorsoLength $TorsoLength $TorsoLength) - ) - ) - ) - - (false - (importScene rsg/agent/nao/box_appearance.rsg $TorsoLength $TorsoWidth $TorsoHeight matGrey) - ) - ) - - ;(importScene rsg/agent/nao/box_physics.rsg $TorsoLength $TorsoWidth $TorsoHeight $TorsoMass) - (importScene rsg/agent/nao/box_physics_nocollider.rsg $TorsoLength $TorsoWidth $TorsoHeight $TorsoMass) - (nd BoxCollider - (setName TorsoCollider) - (setBoxLengths $TorsoLength $TorsoWidth $TorsoHeight) - (importScene rsg/agent/nao/contactjointhandler.rsg) - ) - - ;Install effectors and perceptors - (nd StaticMeshInitEffector) - - (nd TimePerceptor) - - (nd AgentState - (setName AgentState) - (nd GameStatePerceptor) - (nd HearPerceptor) - (nd Transform - (nd Cylinder - (setName SelectionMarker) - (setParams 1.0 1.0) - (setScale 0.2 0.2 0.02) - (setMaterial matSelect) - (setTransparent) - ) - ) - ) - - (nd GyroRatePerceptor (setName torso)) - (nd Accelerometer (setName torso)) - - ;(nd HMDPPerceptor) - ;(nd HMDPEffector) - - (nd BeamEffector) - - (nd SayEffector) - - ;(nd VisionPerceptor - ; (setSenseMyPos false) - ; (setStaticSenseAxis false) - ; (addNoise false)) - - (nd AgentSyncEffector) - - );end of AgentAspect - - - ; - ;The neck and head part - ; - (importScene rsg/agent/nao/naoneckhead.rsg $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) - - - ; - ;The Right Arm - ; - (importScene rsg/agent/nao/naoarm.rsg - 1 r - $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) - - ; - ;The Left Arm - ; - (importScene rsg/agent/nao/naoarm.rsg - -1 l - $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) - - ; - ;The Right Leg - ; - (importScene rsg/agent/nao/naoleg.rsg - 1 r - $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) - - ; - ;The Left Leg - ; - (importScene rsg/agent/nao/naoleg.rsg - -1 l - $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) - -);end of nd Space - -);end of RSG 0 1 Copied: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg (from rev 355, trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg) =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg (rev 0) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -0,0 +1,7 @@ +; -*- mode: lisp; -*- + +(RSG 0 1) +( + (importScene rsg/agent/nao/nao_hetero.rsg 0) +) + \ No newline at end of file Copied: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg (from rev 355, trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg) =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg (rev 0) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -0,0 +1,149 @@ +; -*- mode: lisp; -*- + +; +; nao robot description file. +; + +(RSG 0 1) +( + +(templ $type) + +; +; The torso parameters +; + +;(def $TorsoLength (eval "NaoType["$type"]['tl']")) + +(def $TorsoLength 0.1) +(def $TorsoWidth 0.1) +(def $TorsoHeight 0.18) +(def $TorsoMass 1.2171) + +(def $TorsoInitX 0) +(def $TorsoInitY -1) +(def $TorsoInitZ 1.5) + +(def $loadObj (eval Nao.UseTexture)) +; +;Begin Construct of Nao +; +(nd Space + (setName spacenao) + (disableInnerCollision true) + + ; + ;The torso part + ; + (nd AgentAspect + (setName body) + (setLocalPos $TorsoInitX $TorsoInitY $TorsoInitZ) + + (switch $loadObj + (true + (nd Transform + (setLocalRotation -90 0 180) + (nd StaticMesh + (load 'models/naobody.obj') + (setScale $TorsoLength $TorsoLength $TorsoLength) + ) + ) + ) + + (false + (importScene rsg/agent/nao/box_appearance.rsg $TorsoLength $TorsoWidth $TorsoHeight matGrey) + ) + ) + + ;(importScene rsg/agent/nao/box_physics.rsg $TorsoLength $TorsoWidth $TorsoHeight $TorsoMass) + (importScene rsg/agent/nao/box_physics_nocollider.rsg $TorsoLength $TorsoWidth $TorsoHeight $TorsoMass) + (nd BoxCollider + (setName TorsoCollider) + (setBoxLengths $TorsoLength $TorsoWidth $TorsoHeight) + (importScene rsg/agent/nao/contactjointhandler.rsg) + ) + + ;Install effectors and perceptors + (nd StaticMeshInitEffector) + + (nd TimePerceptor) + + (nd AgentState + (setName AgentState) + (setRobotType $type) + (nd GameStatePerceptor) + (nd HearPerceptor) + (nd Transform + (nd Cylinder + (setName SelectionMarker) + (setParams 1.0 1.0) + (setScale 0.2 0.2 0.02) + (setMaterial matSelect) + (setTransparent) + ) + ) + ) + + (nd GyroRatePerceptor (setName torso)) + (nd Accelerometer (setName torso)) + + ;(nd HMDPPerceptor) + ;(nd HMDPEffector) + + (nd BeamEffector) + + (nd SayEffector) + + ;(nd VisionPerceptor + ; (setSenseMyPos false) + ; (setStaticSenseAxis false) + ; (addNoise false)) + + (nd AgentSyncEffector) + + );end of AgentAspect + + + ; + ;The neck and head part + ; + (importScene rsg/agent/nao/naoneckhead.rsg + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) + + + ; + ;The Right Arm + ; + (importScene rsg/agent/nao/naoarm.rsg + 1 r + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) + + ; + ;The Left Arm + ; + (importScene rsg/agent/nao/naoarm.rsg + -1 l + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) + + ; + ;The Right Leg + ; + (importScene rsg/agent/nao/naoleg.rsg + 1 r + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) + + ; + ;The Left Leg + ; + (importScene rsg/agent/nao/naoleg.rsg + -1 l + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) + +);end of nd Space + +);end of RSG 0 1 Modified: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoarm.rsg =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoarm.rsg 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoarm.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -8,6 +8,7 @@ ; (templ $LRFactor $LeftOrRight $Torso_X $Torso_Y $Torso_Z $loadObj + $type ) ; @@ -45,7 +46,8 @@ (def $UpperarmRelShoulderZ 0) (def $ElbowRelUpperArm_X (eval $LRFactor * -0.01)) - (def $ElbowRelUpperArm_Y 0.07) + ;(def $ElbowRelUpperArm_Y 0.07) + (def $ElbowRelUpperArm_Y (eval "NaoType["$type"]['ElbowRelUpperArm_Y']")) (def $ElbowRelUpperArm_Z 0.009) (def $LowerarmRelElbow_X 0) @@ -91,8 +93,12 @@ ; ;Joint Parameters ; + (def $PI 3.14159265) + (def $MaxAbsJointSpeed (eval $PI * (eval 351.77 / 180.0))) + (def $aj1_min -120) (def $aj1_max 120) + (def $aj1_max_abs_speed $MaxAbsJointSpeed) (def $right_aj2_min -95) (def $left_aj2_min -1) @@ -105,9 +111,11 @@ (def $aj2_max_c1 (eval (eval $right_aj2_max + $left_aj2_max) * 0.5)) (def $aj2_max_c2 (eval (eval $right_aj2_max - $left_aj2_max) * 0.5)) (def $aj2_max (eval $aj2_max_c1 + (eval $LRFactor * $aj2_max_c2))) + (def $aj2_max_abs_speed $MaxAbsJointSpeed) (def $aj3_min -120) (def $aj3_max 120) + (def $aj3_max_abs_speed $MaxAbsJointSpeed) (def $right_aj4_min -1) (def $left_aj4_min -90) @@ -120,6 +128,7 @@ (def $aj4_max_c1 (eval (eval $right_aj4_max + $left_aj4_max) * 0.5)) (def $aj4_max_c2 (eval (eval $right_aj4_max - $left_aj4_max) * 0.5)) (def $aj4_max (eval $aj4_max_c1 + (eval $LRFactor * $aj4_max_c2))) + (def $aj4_max_abs_speed $MaxAbsJointSpeed) (def $aj2_Anchor_X (eval -1 * $UpperarmRelShoulderX)) @@ -152,7 +161,8 @@ ../sphereBody ../../body/boxBody 0 0 0 1 0 0 ;1 -1 -1 - $aj1_min $aj1_max) + $aj1_min $aj1_max + $aj1_max_abs_speed) ) ; @@ -175,11 +185,12 @@ (importScene rsg/agent/nao/box_physics.rsg $UpperArmSizeX $UpperArmSizeY $UpperArmSizeZ $UpperArmMass) (importScene rsg/agent/nao/hingejoint.rsg - $Joint2PerName $Joint2EffName - ../boxBody $ShoulderBodyPath - $aj2_Anchor_X $aj2_Anchor_Y $aj2_Anchor_Z - 0 0 1 ;2 -1 -1 - $aj2_min $aj2_max) + $Joint2PerName $Joint2EffName + ../boxBody $ShoulderBodyPath + $aj2_Anchor_X $aj2_Anchor_Y $aj2_Anchor_Z + 0 0 1 ;2 -1 -1 + $aj2_min $aj2_max + $aj2_max_abs_speed) ) ; @@ -195,11 +206,12 @@ (importScene rsg/agent/nao/sphere_physics_nocollider.rsg $ElbowRadius $ElbowMass) (importScene rsg/agent/nao/hingejoint.rsg - $Joint3PerName $Joint3EffName - ../sphereBody $UpperarmBodyPath - 0 0 0 - 0 1 0 ;1 -1 -1 - $aj3_min $aj3_max) + $Joint3PerName $Joint3EffName + ../sphereBody $UpperarmBodyPath + 0 0 0 + 0 1 0 ;1 -1 -1 + $aj3_min $aj3_max + $aj3_max_abs_speed) ) ; @@ -221,11 +233,12 @@ (importScene rsg/agent/nao/box_physics.rsg $LowerArmSizeX $LowerArmSizeY $LowerArmSizeZ $LowerArmMass) (importScene rsg/agent/nao/hingejoint.rsg - $Joint4PerName $Joint4EffName - ../boxBody $ElbowBodyPath - $aj4_Anchor_X $aj4_Anchor_Y $aj4_Anchor_Z - 0 0 1 ;2 -1 -1 - $aj4_min $aj4_max) + $Joint4PerName $Joint4EffName + ../boxBody $ElbowBodyPath + $aj4_Anchor_X $aj4_Anchor_Y $aj4_Anchor_Z + 0 0 1 ;2 -1 -1 + $aj4_min $aj4_max + $aj4_max_abs_speed) (nd ObjectState (setID $LowerarmName) Modified: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoleg.rsg =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoleg.rsg 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoleg.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -8,6 +8,7 @@ ; (templ $LRFactor $LeftOrRight $Torso_X $Torso_Y $Torso_Z $loadObj + $type ) ; @@ -56,7 +57,8 @@ (def $ThighRelHip2_X 0) (def $ThighRelHip2_Y 0.01) - (def $ThighRelHip2_Z -0.04) + ;(def $ThighRelHip2_Z -0.04) + (def $ThighRelHip2_Z (eval "NaoType["$type"]['ThighRelHip2_Z']")) (def $ShankRelThigh_X 0) (def $ShankRelThigh_Y 0.005) @@ -64,7 +66,8 @@ (def $AnkleRelShank_X 0) (def $AnkleRelShank_Y -0.01) - (def $AnkleRelShank_Z -0.055) + ;(def $AnkleRelShank_Z -0.055) + (def $AnkleRelShank_Z (eval "NaoType["$type"]['AnkleRelShank_Z']")) (def $FootRelAnkle_X 0) (def $FootRelAnkle_Y 0.03) @@ -125,8 +128,12 @@ ; ;Joint Parameters ; + (def $PI 3.14159265) + (def $MaxAbsJointSpeed (eval $PI * (eval 351.77 / 180.0))) + (def $lj1_min -90) (def $lj1_max 1) + (def $lj1_max_abs_speed $MaxAbsJointSpeed) (def $right_lj2_min -45) (def $left_lj2_min -25) @@ -139,15 +146,19 @@ (def $lj2_max_c1 (eval (eval $right_lj2_max + $left_lj2_max) * 0.5)) (def $lj2_max_c2 (eval (eval $right_lj2_max - $left_lj2_max) * 0.5)) (def $lj2_max (eval $lj2_max_c1 + (eval $LRFactor * $lj2_max_c2))) + (def $lj2_max_abs_speed $MaxAbsJointSpeed) (def $lj3_min -25) (def $lj3_max 100) + (def $lj3_max_abs_speed $MaxAbsJointSpeed) (def $lj4_min -130) (def $lj4_max 1) + (def $lj4_max_abs_speed $MaxAbsJointSpeed) (def $lj5_min -45) (def $lj5_max 75) + (def $lj5_max_abs_speed (eval "NaoType["$type"]['lj5_max_abs_speed']")) (def $right_lj6_min -25) (def $left_lj6_min -45) @@ -160,6 +171,7 @@ (def $lj6_max_c1 (eval (eval $right_lj6_max + $left_lj6_max) * 0.5)) (def $lj6_max_c2 (eval (eval $right_lj6_max - $left_lj6_max) * 0.5)) (def $lj6_max (eval $lj6_max_c1 + (eval $LRFactor * $lj6_max_c2))) + (def $lj6_max_abs_speed (eval "NaoType["$type"]['lj6_max_abs_speed']")) (def $lj1_axis_x -0.7071) (def $lj1_axis_y 0) @@ -193,7 +205,8 @@ ../sphereBody ../../body/boxBody 0 0 0 $lj1_axis_x $lj1_axis_y $lj1_axis_z - $lj1_min $lj1_max) + $lj1_min $lj1_max + $lj1_max_abs_speed) ) ; @@ -212,7 +225,8 @@ ../sphereBody $Hip1BodyPath 0 0 0 ;anchor 0 1 0 ;axis - $lj2_min $lj2_max) + $lj2_min $lj2_max + $lj2_max_abs_speed) ) ; @@ -243,11 +257,12 @@ (importScene rsg/agent/nao/hingejoint.rsg - $Joint3PerName $Joint3EffName - ../boxBody $Hip2BodyPath - $lj3_Anchor_X $lj3_Anchor_Y $lj3_Anchor_Z - 1 0 0 ;1 -1 -1 - $lj3_min $lj3_max) + $Joint3PerName $Joint3EffName + ../boxBody $Hip2BodyPath + $lj3_Anchor_X $lj3_Anchor_Y $lj3_Anchor_Z + 1 0 0 ;1 -1 -1 + $lj3_min $lj3_max + $lj3_max_abs_speed) ) @@ -277,11 +292,12 @@ ) (importScene rsg/agent/nao/hingejoint.rsg - $Joint4PerName $Joint4EffName - ../boxBody $ThighBodyPath - 0 -0.01 0.045 - 1 0 0 ;0 -1 -1 - $lj4_min $lj4_max) + $Joint4PerName $Joint4EffName + ../boxBody $ThighBodyPath + 0 -0.01 0.045 + 1 0 0 ;0 -1 -1 + $lj4_min $lj4_max + $lj4_max_abs_speed) ) @@ -301,7 +317,8 @@ ../sphereBody $ShankBodyPath 0 0 0 1 0 0 ;0 -1 -1 - $lj5_min $lj5_max) + $lj5_min $lj5_max + $lj5_max_abs_speed) ) @@ -336,11 +353,12 @@ ) (importScene rsg/agent/nao/hingejoint.rsg - $Joint6PerName $Joint6EffName - ../boxBody $AnkleBodyPath - 0 -0.03 0.035 - 0 1 0 ;1 -1 -1 - $lj6_min $lj6_max) + $Joint6PerName $Joint6EffName + ../boxBody $AnkleBodyPath + 0 -0.03 0.035 + 0 1 0 ;1 -1 -1 + $lj6_min $lj6_max + $lj6_max_abs_speed) (nd ObjectState (setID $FootName) Modified: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -2,7 +2,9 @@ (RSG 0 1) ( - (templ $Torso_X $Torso_Y $Torso_Z $loadObj) + (templ $Torso_X $Torso_Y $Torso_Z $loadObj + $type + ) ; ;neck parameter @@ -27,14 +29,19 @@ ; ;Head effector 1 parameter ; + (def $PI 3.14159265) + (def $MaxAbsJointSpeed (eval $PI * (eval 351.77 / 180.0))) + (def $he1_min -120) (def $he1_max 120) + (def $he1_max_abs_speed $MaxAbsJointSpeed) ; ;Head effector 2 parameter ; (def $he2_min -45) (def $he2_max 45) + (def $he2_max_abs_speed $MaxAbsJointSpeed) ; ;Begin construct neck @@ -51,7 +58,8 @@ ../capsuleBody ../../body/boxBody 0 0 0 0 0 1 - $he1_min $he1_max) + $he1_min $he1_max + $he1_max_abs_speed) ) ; @@ -84,11 +92,13 @@ ;../boxBody ../../body/boxBody 0 0 -0.005 1 0 0 - $he2_min $he2_max) + $he2_min $he2_max + $he2_max_abs_speed) (nd RestrictedVisionPerceptor (setViewCones 120 120) (setSenseMyPos false) + (setSenseMyOrien false) (setSenseBallPos false) (setStaticSenseAxis false) (addNoise true) Modified: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -9,6 +9,7 @@ $Axis2_X $Axis2_Y $Axis2_Z $Min0 $Max0 $Min1 $Max1 + $MaxAbsSpeed ) (def $PI 3.14159265) @@ -26,7 +27,6 @@ (def $Stop_ERP 0.8) (def $FudgeFactor 1e-5) (def $Bounce 1) - (def $MaxAbsSpeed (eval $PI * (eval 351.77 / 180.0))) (nd UniversalJoint (attach $Path_Body1 $Path_Body2) Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/CMakeLists.txt =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/CMakeLists.txt 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/CMakeLists.txt 2013-06-09 18:35:13 UTC (rev 356) @@ -37,6 +37,7 @@ soccercontrolaspect/soccercontrolaspect.h soccernode/soccernode.h soccerruleaspect/soccerruleaspect.h + soccerruleaspect/soccerruleitem.h trainercommandparser/trainercommandparser.h gametimeperceptor/gametimeperceptor.h visionperceptor/visionperceptor.h @@ -106,6 +107,8 @@ soccernode/soccernode_c.cpp soccerruleaspect/soccerruleaspect.cpp soccerruleaspect/soccerruleaspect_c.cpp + soccerruleaspect/soccerruleitem.cpp + soccerruleaspect/soccerruleitem_c.cpp trainercommandparser/trainercommandparser.cpp trainercommandparser/trainercommandparser_c.cpp visionperceptor/visionperceptor.cpp Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -56,5 +56,5 @@ return boost::shared_ptr<AgentState>(); } - return boost::shared_static_cast<AgentState>(agentAspect->FindChildSupportingClass<AgentState>(true)); + return boost::static_pointer_cast<AgentState>(agentAspect->FindChildSupportingClass<AgentState>(true)); } Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -76,6 +76,18 @@ } void +AgentState::SetRobotType(int type) +{ + mRobotType = type; +} + +int +AgentState::GetRobotType() const +{ + return mRobotType; +} + +void AgentState::SetID(const std::string& id, TPerceptType pt) { std::istringstream iss(id); @@ -217,7 +229,7 @@ void AgentState::UpdateHierarchyInternal() { - boost::shared_ptr<RenderNode> node = boost::shared_dynamic_cast<RenderNode>(GetChild("SelectionMarker", true)); + boost::shared_ptr<RenderNode> node = boost::dynamic_pointer_cast<RenderNode>(GetChild("SelectionMarker", true)); if (!node) { GetLog()->Error() << "ERROR: (AgentState::UpdateHierarchyInternal) could not find selection marker\n"; @@ -238,8 +250,9 @@ GetLog()->Error() << "ERROR: (AgentState::OnUnlink) could not get game state\n"; return; } - - game_state->ReturnUniform(GetTeamIndex(), GetUniformNumber()); + + game_state->ReturnUniform(GetTeamIndex(), GetUniformNumber(), + GetRobotType()); } bool Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.h =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.h 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.h 2013-06-09 18:35:13 UTC (rev 356) @@ -59,6 +59,12 @@ /** returns the uniform number as integer */ int GetUniformNumber() const; + /** Set the robot type. */ + void SetRobotType(int type); + + /** returns the robot type */ + int GetRobotType() const; + /** Set the object id for perceptors. * * This method is the same as SetUniformNumber for AgentState. @@ -97,25 +103,25 @@ /** Whether agent is selected */ bool IsSelected() const; - + /** Select agent */ void Select(bool s = true); - + /** Unselect agent */ void UnSelect(); - + /** Backup old touch group and create new empty one */ void NewTouchGroup(); - + /** Get the touch group of the previous step */ boost::shared_ptr<TouchGroup> GetOldTouchGroup(); - + /** Get the current touch group */ boost::shared_ptr<TouchGroup> GetTouchGroup(); - + /** Set the current touch group */ void SetTouchGroup(boost::shared_ptr<TouchGroup> group); - + protected: /** team index */ TTeamIndex mTeamIndex; @@ -123,6 +129,9 @@ /** uniform number */ int mUniformNumber; + /** robot type */ + int mRobotType; + /** motor temperature */ float mTemperature; @@ -161,7 +170,7 @@ /** is this agent selected */ bool mSelected; - + boost::shared_ptr<TouchGroup> mOldTouchGroup; boost::shared_ptr<TouchGroup> mTouchGroup; Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate_c.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate_c.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate_c.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -25,8 +25,25 @@ using namespace boost; using namespace oxygen; +FUNCTION(AgentState,setRobotType) +{ + int inType; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in.begin(), inType)) + ) + { + return false; + } + + obj->SetRobotType(inType); + return true; +} + void CLASS(AgentState)::DefineClass() { DEFINE_BASECLASS(ObjectState); + DEFINE_FUNCTION(setRobotType); } Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/agentstateperceptor/agentstateperceptor.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/agentstateperceptor/agentstateperceptor.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/agentstateperceptor/agentstateperceptor.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -61,7 +61,7 @@ predicate.parameter.Clear(); boost::shared_ptr<BaseNode> parent = - shared_dynamic_cast<BaseNode>(GetParent().lock()); + dynamic_pointer_cast<BaseNode>(GetParent().lock()); if (parent.get() == 0) { Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/ball/ball.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/ball/ball.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/ball/ball.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -46,7 +46,7 @@ if (mBody.get() == 0) { - mBody = shared_dynamic_cast<RigidBody>(GetChildOfClass("RigidBody")); + mBody = dynamic_pointer_cast<RigidBody>(GetChildOfClass("RigidBody")); } } @@ -60,7 +60,7 @@ // mBallStateAspect during OnLink if (mBallStateAspect.get() == 0) { - mBallStateAspect = shared_dynamic_cast<BallStateAspect> + mBallStateAspect = dynamic_pointer_cast<BallStateAspect> (GetCore()->Get("/sys/server/gamecontrol/BallStateAspect")); if (mBallStateAspect.get() == 0) return; } Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -74,7 +74,7 @@ if (agents.size() > 0) { - mLastCollidingAgent = shared_static_cast<AgentAspect> + mLastCollidingAgent = static_pointer_cast<AgentAspect> (agents.front().lock()); mLastAgentCollisionTime = mGameState->GetTime(); Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/beameffector/beameffector.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/beameffector/beameffector.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/beameffector/beameffector.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -61,7 +61,7 @@ } boost::shared_ptr<BeamAction> beamAction = - shared_dynamic_cast<BeamAction>(mAction); + dynamic_pointer_cast<BeamAction>(mAction); mAction.reset(); Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/catcheffector/catcheffector.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/catcheffector/catcheffector.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/catcheffector/catcheffector.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -83,7 +83,7 @@ } boost::shared_ptr<CatchAction> catchAction = - shared_dynamic_cast<CatchAction>(mAction); + dynamic_pointer_cast<CatchAction>(mAction); mAction.reset(); if (catchAction.get() == 0) { @@ -177,7 +177,7 @@ SoccerBase::GetSoccerRuleAspect(*this,mSoccerRule); - mAgent = shared_dynamic_cast<AgentAspect>(GetParent().lock()); + mAgent = dynamic_pointer_cast<AgentAspect>(GetParent().lock()); if (mAgent.get() == 0) { @@ -188,7 +188,7 @@ } boost::shared_ptr<SphereCollider> geom = - shared_dynamic_cast<SphereCollider>(mAgent->GetChild("geometry")); + dynamic_pointer_cast<SphereCollider>(mAgent->GetChild("geometry")); if (geom.get() == 0) { GetLog()->Error() Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/createeffector/createeffector.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/createeffector/createeffector.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/createeffector/createeffector.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -42,7 +42,7 @@ return; boost::shared_ptr<CreateAction> createAction = - shared_dynamic_cast<CreateAction>(mAction); + dynamic_pointer_cast<CreateAction>(mAction); mAction.reset(); if (createAction.get() == 0) { Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/driveeffector/driveeffector.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/driveeffector/driveeffector.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/driveeffector/driveeffector.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -50,7 +50,7 @@ } boost::shared_ptr<BaseNode> parent = - shared_dynamic_cast<BaseNode>(GetParent().lock()); + dynamic_pointer_cast<BaseNode>(GetParent().lock()); if (parent.get() == 0) { @@ -59,7 +59,7 @@ return false; } - boost::shared_ptr<DriveAction> driveAction = shared_dynamic_cast<DriveAction>(action); + boost::shared_ptr<DriveAction> driveAction = dynamic_pointer_cast<DriveAction>(action); if (driveAction.get() == 0) { @@ -117,7 +117,7 @@ SoccerBase::GetAgentState(*this,mAgentState); boost::shared_ptr<SphereCollider> geom = - shared_dynamic_cast<SphereCollider>(mTransformParent->GetChild("geometry")); + dynamic_pointer_cast<SphereCollider>(mTransformParent->GetChild("geometry")); mMaxDistance = 0.001; if (geom.get() == 0) Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/export.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/export.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/export.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -36,6 +36,7 @@ #include "gamestateaspect/gamestateitem.h" #include "ballstateaspect/ballstateaspect.h" #include "soccerruleaspect/soccerruleaspect.h" +#include "soccerruleaspect/soccerruleitem.h" #include "agentstate/agentstate.h" #include "sexpmonitor/sexpmonitor.h" #include "internalsoccermonitor/internalsoccerrender.h" @@ -63,6 +64,7 @@ ZEITGEIST_EXPORT(GameStateItem); ZEITGEIST_EXPORT(BallStateAspect); ZEITGEIST_EXPORT(SoccerRuleAspect); + ZEITGEIST_EXPORT(SoccerRuleItem); ZEITGEIST_EXPORT(BeamEffector); ZEITGEIST_EXPORT(CatchEffector); ZEITGEIST_EXPORT(CreateEffector); Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -38,14 +38,21 @@ mFupTime = 0; mLastModeChange = 0; mGameHalf = GH_FIRST; + mRobotTypeCount[0].push_back(0); // add count for type 0 (default type) + mRobotTypeCount[1].push_back(0); + mHeteroCount[0] = 0; + mHeteroCount[1] = 0; mScore[0] = 0; mScore[1] = 0; mLastKickOffGameHalf = GH_NONE; mNextHalfKickOff = TI_NONE; mLeftInit = Vector3f(0,0,0); mRightInit = Vector3f(0,0,0); + mAgentRadius = 3.5; mFinished = false; mGamePaused = true; + mMaxHeteroTypeCount = 3; + mMaxTotalHeteroCount = 9; } GameStateAspect::~GameStateAspect() @@ -266,6 +273,82 @@ } bool +GameStateAspect::InsertRobotType(TTeamIndex idx, int type) +{ + int i; + + switch (idx) + { + case TI_LEFT: + i = 0; + break; + case TI_RIGHT: + i = 1; + break; + default: + return false; + } + + if (type) // heterogeneous player + { + if (mHeteroCount[i] == mMaxTotalHeteroCount) + { + GetLog()->Error() + << "ERROR: (GameStateAspect::InsertRobotType) Hetero player" + " count limit reached.\n"; + return false; + } + + ++mHeteroCount[i]; + + if (mRobotTypeCount[i].size() <= type) + mRobotTypeCount[i].resize(type+1); + + if (mRobotTypeCount[i][type] == mMaxHeteroTypeCount) + { + GetLog()->Error() + << "ERROR: (GameStateAspect::InsertRobotType) No more robots " + "of type " << type << " are allowed.\n"; + return false; + } + } + + ++mRobotTypeCount[i][type]; + + return true; +} + +bool +GameStateAspect::EraseRobotType(TTeamIndex idx, int type) +{ + int i; + + switch (idx) + { + case TI_LEFT: + i = 0; + break; + case TI_RIGHT: + i = 1; + break; + default: + return false; + } + + if (mRobotTypeCount[i].size() <= type || !mRobotTypeCount[i][type]) + { + return false; + } + + if (type) // heterogeneous player + --mHeteroCount[i]; + + --mRobotTypeCount[i][type]; + + return true; +} + +bool GameStateAspect::RequestUniform(boost::shared_ptr<AgentState> agentState, std::string teamName, unsigned int unum) { @@ -297,6 +380,15 @@ return false; } + if (!InsertRobotType(idx, agentState->GetRobotType())) + { + GetLog()->Error() + << "ERROR: (GameStateAspect::RequestUniform) cannot insert robot" + " of type " << agentState->GetRobotType() << " to team " + << teamName << "\n"; + return false; + } + agentState->SetUniformNumber(unum); agentState->SetTeamIndex(idx); //agentState->SetPerceptName(teamName, ObjectState::PT_Default); @@ -311,7 +403,7 @@ } bool -GameStateAspect::ReturnUniform(TTeamIndex ti, unsigned int unum) +GameStateAspect::ReturnUniform(TTeamIndex ti, unsigned int unum, int type) { if (! EraseUnum(ti,unum)) { @@ -321,6 +413,14 @@ return false; } + if (!EraseRobotType(ti, type)) + { + GetLog()->Error() + << "ERROR: (GameStateAspect::ReturnUniform) cannot erase robot " + " type " << type << " from team " << ti << "\n"; + return false; + } + return true; } @@ -445,6 +545,9 @@ SoccerBase::GetSoccerVar(*this, "CoinTossForKickOff", coinTossKickOff); if (!coinTossKickOff) mNextHalfKickOff = TI_LEFT; + + SoccerBase::GetSoccerVar(*this, "MaxHeteroTypeCount", mMaxHeteroTypeCount); + SoccerBase::GetSoccerVar(*this, "MaxTotalHeteroCount", mMaxTotalHeteroCount); } int Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h 2013-06-09 18:35:13 UTC (rev 356) @@ -24,6 +24,7 @@ #include <soccercontrolaspect/soccercontrolaspect.h> #include <set> +#include <vector> class AgentState; @@ -87,7 +88,7 @@ std::string teamName, unsigned int unum); /** notifies that a uniform number is free again */ - bool ReturnUniform(TTeamIndex ti, unsigned int unum); + bool ReturnUniform(TTeamIndex ti, unsigned int unum, int type); /** returns the next uniform number not taken for the given team */ int RequestUniformNumber(TTeamIndex ti) const; @@ -133,6 +134,18 @@ contain a uniform number unum and erases it. */ bool EraseUnum(TTeamIndex idx, int unum); + /** + * Adds a robot of the given type to the given team if permitted. + * @return true if permitted + */ + bool InsertRobotType(TTeamIndex idx, int type); + + /** + * Removes a robot of the given type from the given team if exists. + * @return true on success + */ + bool EraseRobotType(TTeamIndex idx, int type); + /** returns the team index corresponding to the given teamName. If the teamname does not exist and less than two teams are registered, the given team name is registered. @@ -170,6 +183,12 @@ /** the set of uniform number for each team */ TUnumSet mUnumSet[2]; + /** the array of robot type counts for each team */ + std::vector<int> mRobotTypeCount[2]; + + /** the number of heterogeneous players for each team */ + int mHeteroCount[2]; + /** the scores of two teams */ int mScore[2]; @@ -187,6 +206,12 @@ /** flag if the game is running or paused (e.g. in goal_left/right state) */ bool mGamePaused; + + /** the maximum number of heterogeneous players of a single type per team */ + int mMaxHeteroTypeCount; + + /** the maximum number of total heterogeneous players for a team */ + int mMaxTotalHeteroCount; }; DECLARE_CLASS(GameStateAspect); Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/gametimeperceptor/gametimeperceptor.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/gametimeperceptor/gametimeperceptor.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/gametimeperceptor/gametimeperceptor.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -65,7 +65,7 @@ void GameTimePerceptor::OnLink() { - mGameState = shared_dynamic_cast<GameStateAspect> + mGameState = dynamic_pointer_cast<GameStateAspect> (GetCore()->Get("/sys/server/gamecontrol/GameStateAspect")); if (mGameState.get() == 0) Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -85,7 +85,7 @@ return; } - boost::shared_ptr<HMDPAction> hMDPAction = shared_dynamic_cast<HMDPAction>(mAction); + boost::shared_ptr<HMDPAction> hMDPAction = dynamic_pointer_cast<HMDPAction>(mAction); mAction.reset(); if (hMDPAction.get() == 0) { @@ -141,7 +141,7 @@ // parent should be a transform, or some other node, which has a // Body-child - mBody = shared_dynamic_cast<RigidBody>(parent->GetChildOfClass("RigidBody")); + mBody = dynamic_pointer_cast<RigidBody>(parent->GetChildOfClass("RigidBody")); if (mBody.get() == 0) { @@ -216,7 +216,7 @@ boost::shared_ptr<Leaf> join = *j_it; boost::shared_ptr<BaseNode> jparent = - shared_dynamic_cast<BaseNode>(join->GetParent().lock()); + dynamic_pointer_cast<BaseNode>(join->GetParent().lock()); std::cout << i << " " << jparent->GetName() << std::endl; i++; @@ -259,7 +259,7 @@ for (TLeafList::iterator j_it = jointList.begin(); j_it != jointList.end(); j_it++) { - boost::shared_ptr<HingeJoint> joint = shared_static_cast<HingeJoint> (*j_it); + boost::shared_ptr<HingeJoint> joint = static_pointer_cast<HingeJoint> (*j_it); servo_angle[i] = joint->GetAngle() - zeroPosServo(i); double tpos = servo_target_pos[i]; float err = servo_gain[i] * (tpos - servo_angle[i]); Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -48,10 +48,10 @@ { messageOut = ""; - boost::shared_ptr<Transform> transformParent = shared_static_cast<Transform> ( + boost::shared_ptr<Transform> transformParent = static_pointer_cast<Transform> ( FindParentSupportingClass<Transform> ().lock()); - mBody = shared_static_cast<RigidBody> (transf... [truncated message content] |
From: <he...@us...> - 2013-06-12 11:44:21
|
Revision: 361 http://sourceforge.net/p/simspark/svn/361 Author: hedayat Date: 2013-06-12 11:44:17 +0000 (Wed, 12 Jun 2013) Log Message: ----------- Fix compilation errors for rcssserver3d under GNU/Linux+GCC for the new GUI project Modified Paths: -------------- branches/gui-bullet/rcssserver3d/CMakeLists.txt branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.cpp branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.h branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp branches/gui-bullet/rcssserver3d/sparkgui/CMakeLists.txt branches/gui-bullet/rcssserver3d/sparkgui/main.cpp branches/gui-bullet/spark/ChangeLog branches/gui-bullet/spark/carbon/CMakeLists.txt branches/gui-bullet/spark/carbon/signalplugin.cpp branches/gui-bullet/spark/lib/salt/gmath.h Modified: branches/gui-bullet/rcssserver3d/CMakeLists.txt =================================================================== --- branches/gui-bullet/rcssserver3d/CMakeLists.txt 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/CMakeLists.txt 2013-06-12 11:44:17 UTC (rev 361) @@ -46,7 +46,7 @@ link_directories(${Boost_LIBRARY_DIRS}) if (UNIX) - set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE + set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS} "--std=gnu++11" CACHE STRING "Common C++ compiler flags" FORCE) set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -W -Wall -Woverloaded-virtual" CACHE STRING "C++ compiler flags for Debug builds" FORCE) Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp 2013-06-12 11:44:17 UTC (rev 361) @@ -36,17 +36,17 @@ #include <settings.h> //SimSpark -#include <oxygen\gamecontrolserver\gamecontrolserver.h> -#include <zeitgeist\leaf.h> +#include <oxygen/gamecontrolserver/gamecontrolserver.h> +#include <zeitgeist/leaf.h> //Soccer -#include "soccer\gamestateaspect\gamestateaspect.h" -#include "soccer\soccerruleaspect\soccerruleaspect.h" -#include "soccer\ballstateaspect\ballstateaspect.h" -//#include <agentstate\agentstate.h> +#include "soccer/gamestateaspect/gamestateaspect.h" +#include "soccer/soccerruleaspect/soccerruleaspect.h" +#include "soccer/ballstateaspect/ballstateaspect.h" +//#include <agentstate/agentstate.h> //Boost -#include <boost\make_shared.hpp> +#include <boost/make_shared.hpp> //Qt #include <QValidator> Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h 2013-06-12 11:44:17 UTC (rev 361) @@ -31,11 +31,11 @@ #include "isimcontrol.h" #include "sparkcommandqueue.h" -#include <boost\shared_ptr.hpp> +#include <boost/shared_ptr.hpp> #include <QObject> #include <QTimer> -#include <soccer\soccertypes.h> +#include <soccer/soccertypes.h> class ServerThread; class SimSpark; Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.cpp 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.cpp 2013-06-12 11:44:17 UTC (rev 361) @@ -23,11 +23,11 @@ #include <sparkcommandqueue.h> #include <simspark.h> -#include <cutelogger\logger.h> +#include <cutelogger/logger.h> -#include <gamestateaspect\gamestateaspect.h> -#include <ballstateaspect\ballstateaspect.h> -#include <soccerruleaspect\soccerruleaspect.h> +#include <gamestateaspect/gamestateaspect.h> +#include <ballstateaspect/ballstateaspect.h> +#include <soccerruleaspect/soccerruleaspect.h> using namespace boost; using namespace zeitgeist; Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.h =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.h 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.h 2013-06-12 11:44:17 UTC (rev 361) @@ -26,13 +26,13 @@ * \brief Contains SoccerControlFrameUtil::SoccerCommand and derived command classes. */ -#include <boost\shared_ptr.hpp> +#include <boost/shared_ptr.hpp> #include <isimcontrol.h> -#include <cutelogger\logger.h> +#include <cutelogger/logger.h> #include <sparkcommands.h> -#include <soccer\soccertypes.h> +#include <soccer/soccertypes.h> class SparkController; class GameStateAspect; Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-06-12 11:44:17 UTC (rev 361) @@ -812,7 +812,7 @@ if (time > mGameState->GetLastModeChange()) { mLastKickOffKickTime = time; - mCheckKickOffKickerFault = true; + mCheckKickOffKickerFoul = true; mLastKickOffTaker = agent; mGameState->SetPlayMode(PM_PlayOn); } Modified: branches/gui-bullet/rcssserver3d/sparkgui/CMakeLists.txt =================================================================== --- branches/gui-bullet/rcssserver3d/sparkgui/CMakeLists.txt 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/sparkgui/CMakeLists.txt 2013-06-12 11:44:17 UTC (rev 361) @@ -52,7 +52,7 @@ target_link_libraries(sparkgui optimized ${LIB}) ENDFOREACH(LIB) -target_link_libraries(sparkgui ) +target_link_libraries(sparkgui ${Boost_LIBRARIES}) set_target_properties(sparkgui PROPERTIES INSTALL_RPATH "${RPATH_DIRECTORIES}") install(TARGETS sparkgui DESTINATION ${BINDIR}) Modified: branches/gui-bullet/rcssserver3d/sparkgui/main.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/sparkgui/main.cpp 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/sparkgui/main.cpp 2013-06-12 11:44:17 UTC (rev 361) @@ -31,7 +31,7 @@ #include <QLibrary> #include <QMainWindow> -#include "sparkgui\sparkgui_config.h" +#include "sparkgui/sparkgui_config.h" void PrintGreeting() { Modified: branches/gui-bullet/spark/ChangeLog =================================================================== --- branches/gui-bullet/spark/ChangeLog 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/spark/ChangeLog 2013-06-12 11:44:17 UTC (rev 361) @@ -1,3 +1,17 @@ +2013-06-12 Hedayat Vatankhah <hed...@gm...> + + * carbon/ + * guiplugin/ + * guilayout/ + * data/guisetups/ + * plugin/inputsysqt/ + * plugin/openglsysqt/ + - fixed compilation issues under GNU/Linux+GCC. + + * lib/salt/gmath.h: + - removed type specifier for std::isnan, since not all overloads are + templates + 2012-11-24 Hedayat Vatankhah <hed...@gm...> * plugin/sceneeffector/sceneaction.h: Modified: branches/gui-bullet/spark/carbon/CMakeLists.txt =================================================================== --- branches/gui-bullet/spark/carbon/CMakeLists.txt 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/spark/carbon/CMakeLists.txt 2013-06-12 11:44:17 UTC (rev 361) @@ -6,6 +6,7 @@ simulationprocess.h simulationmanager.h serverthread.h + signalplugin.h simulationsetup.h simulation.h simulationthread.h @@ -281,7 +282,7 @@ ${OPENGL_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) #intermediate directory -add_library(carbon STATIC +add_library(carbon ${carbon_SOURCES} ${carbon_QOBJECT_HEADERS_MOC} ${carbon_HEADERS} @@ -289,7 +290,7 @@ ${carbon_RESOURCES_RCC} ) -target_link_libraries(carbon +target_link_libraries(carbon ${FREETYPE_LIBRARIES} ${IL_LIBRARIES} ${OPENGL_LIBRARIES} Modified: branches/gui-bullet/spark/carbon/signalplugin.cpp =================================================================== --- branches/gui-bullet/spark/carbon/signalplugin.cpp 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/spark/carbon/signalplugin.cpp 2013-06-12 11:44:17 UTC (rev 361) @@ -63,7 +63,7 @@ // Public //-------------------------------------------------------------- -SignalPluginInstantiator::SignalPluginInstantiator(int id, const QString& name, const QString& caption, SignalPlugin* (*instantiateFunc)(void), +SignalPluginInstantiator::SignalPluginInstantiator(int id, const QString& name, const QString& caption, SignalPlugin* (*instantiateFunc)(void), int maxInstanceCount, const char* library) : AbstractPluginInstantiator(id, name, caption, PT_SIGNAL, maxInstanceCount, library), mInstantiateFunc(instantiateFunc) Modified: branches/gui-bullet/spark/lib/salt/gmath.h =================================================================== --- branches/gui-bullet/spark/lib/salt/gmath.h 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/spark/lib/salt/gmath.h 2013-06-12 11:44:17 UTC (rev 361) @@ -214,7 +214,7 @@ #ifdef WIN32 return _isnan(static_cast<double>(f)) != 0; #else - return std::isnan<TYPE>(f); + return std::isnan(f); #endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2013-06-12 20:48:39
|
Revision: 365 http://sourceforge.net/p/simspark/svn/365 Author: hedayat Date: 2013-06-12 20:48:36 +0000 (Wed, 12 Jun 2013) Log Message: ----------- Added Patrick changes to spark/ to ChangeLog and README files in proper format. Brought a change from trunk/ which I mistakenly removed. Modified Paths: -------------- branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp branches/gui-bullet/spark/ChangeLog branches/gui-bullet/spark/README Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-06-12 19:49:24 UTC (rev 364) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-06-12 20:48:36 UTC (rev 365) @@ -738,18 +738,11 @@ SoccerRuleAspect::UpdateBeforeKickOff() { // get game control server to check agent count - static boost::shared_ptr<GameControlServer> game_control; + boost::shared_ptr<GameControlServer> game_control; - if (game_control.get() == 0) + if (!SoccerBase::GetGameControlServer(*this, game_control)) { - game_control = shared_dynamic_cast<GameControlServer> - (GetCore()->Get("/sys/server/gamecontrol")); - - if (game_control.get() == 0) - { - GetLog()->Error() << "(SoccerRuleAspect) Error: can't get GameControlServer.\n"; - return; - } + return; } // if no players are connected, just return Modified: branches/gui-bullet/spark/ChangeLog =================================================================== --- branches/gui-bullet/spark/ChangeLog 2013-06-12 19:49:24 UTC (rev 364) +++ branches/gui-bullet/spark/ChangeLog 2013-06-12 20:48:36 UTC (rev 365) @@ -1,3 +1,9 @@ +2013-06-13 Hedayat Vatankhah <hed...@gm...> + + * README: + * ChangeLog: + - added Patrick changes and documentation about the new parts + 2013-06-12 Hedayat Vatankhah <hed...@gm...> * carbon/ @@ -18,6 +24,105 @@ * plugin/sceneeffector/sceneeffector.cpp: - added the ability to receive and apply scene parameters +2012-06-23 Patrick Geib <Pat...@on...> + + * carbon/ + - the Carbon library + + * guiplugin/ + - generic (not soccer related) plugins for the carbon gui + + * guilayout/ + - layout projects for the Gui + + * data/guisetups/ + - image resources for the carbon gui. + + * plugin/inputsysqt/ + - a new spark plugin which handles inputs to a spark simulation by + converting from qt to spark defines. + + * plugin/openglsysqt/ + - empty placeholder openglsystem to be used in simspark when an external + rendering by carbon is used. + + * spark/spark.h: + * spark/spark.cpp: + - relative path prefix can now be given in constructor as optional + parameter. Needed by carbon. + + * spark.rb: + - the spark script now contains logging functions and other functions + needed by the carbon gui + + * plugin/odeimps/odecollider.cpp: + - fixed bug where body was deleted twice + + * lib/zeitgeist/core.h: + * lib/zeitgeist/core.cpp: + - added function to reset the self pointer. Needed by carbon. + + * lib/zeitgeist/leaf_c.cpp: + - added unlinkLeaf() function to ruby interface. + + * lib/zeitgeist/logserver/logserverstreambuf.h: + * lib/zeitgeist/logserver/logserverstreambuf.cpp: + - replaced typedef TMaskStream with struct MaskStream. Now it not only + contains the integer mask and stream pointer, but also a synchronization + flag. If the flag is true, the stream will by sync()'ed every time the + input stream flushes a message. This is needed for carbons message stream + appenders, so it can receive the logservers messages immediately when the + simulation thread sends them. + + * lib/zeitgeist/logserver/logserver.h: + * lib/zeitgeist/logserver/logserver.cpp: + * lib/zeitgeist/logserver/logserver_c.cpp: + - streams can now be added with an optional synchronization flag. + - updated the script interface for AddStream too. + + * lib/zeitgeist/scriptserver/scriptserver.cpp: + - ruby error messages are now sent to ->Error() instead of ->Debug(). + + * lib/oxygen/simulationserver/simulationserver.h: + * lib/oxygen/simulationserver/simulationserver.cpp: + - the Simulation can now be paused. There is a flag in the simulation + server and a pause/unpause function. When a simulation is paused, the next + simulation cycle will not call StartCycle, SenseAgent, ActAgent and + EndCycle, but a new control event CE_WaitCycle. + When a simulation is paused, the simulation time does not advance and + agents are not notified about changed time. The wait cycle lasts as long + as a normal simulation cycle. Calling pause(false) will resume the normal + simulation cycle after the current wait cycle and agents are + notified again. + The pausing function is meant to pause and observe the state of the + simulation using the carbon library and the gui. It was tested with + several agent implementations and seemed to work perfectly. + + * lib/oxygen/simulationserver/simcontrolnode.h: + - the new control event CE_WaitCycle calls a new interface function + WaitCycle() in simcontrolnodes. This way control nodes can be notified + about running and paused simulation steps. This is used by carbon. + WaitCycle() and EndCycle() are used for SimControlNodes which act as + interface between carbon and spark. + + * lib/kerosin/inputsystem/inputsystem.h: + * lib/kerosin/inputsystem/inputsystem.cpp: + - AddInput() and GetInput() now use a boost::shared_mutex to make the + access thread safe. This is neccessary because there may be simulatneous + access from different threads in a carbon simulation. + + * lib/kerosin/renderserver/renderserver.cpp: + - added OpenGlError-code checking between rendering stages. Removed double + picking-end-bracket glPopName() which caused picking to fail. + + * lib/kerosin/renderserver/rendercontrol.cpp: + * lib/kerosin/renderserver/rendercontrol.h: + * lib/kerosin/renderserver/rendercontrol_c.cpp: + - RenderControlNodes can no be activated or deactivated. Carbon uses this + feature to deactivate them in the spark simulation if the rendering is + done in the gui thread or any other than the server thread. + - Added setActive() function to ruby interface. + 2012-05-23 Hedayat Vatankhah <hed...@gm...> * lib/kerosin/CMakeLists.txt: Modified: branches/gui-bullet/spark/README =================================================================== --- branches/gui-bullet/spark/README 2013-06-12 19:49:24 UTC (rev 364) +++ branches/gui-bullet/spark/README 2013-06-12 20:48:36 UTC (rev 365) @@ -83,7 +83,50 @@ for creating simulations using simspark ./test applications for testing different subsystems of the simulator. +./carbon The carbon library contains a gui-framework and a + simulation-framework which wraps simspark using qt. + Its main features are: + - Offering a graphical user interface which can be extended + by visual and functional plugins. The plugins can be used + to write easy-to-use interfaces to simspark simulations. + - Creating, managing and executing simspark-simulations + alongside with any additional threads and processes. + - The gui can be altered flexibly. Its main window with + "attachment points" is loaded from a shared library, and + its used plugins are loaded from shared libraries too. + Plugins with visual representation can be attached to the + Gui. +./guilayout Layout projects for the Gui. They export main windows for + the carbon gui from a shared library. You can easily and + quickly create a new layout for the gui by creating a new + layout project. A gui-layout (main window) may define + attachment points for gui-plugins. + Initial layout projects: + - guigridlayout: Contains 4 attachment points (left, center, + right, bottom) + - guisimplelayout: Contains 2 attachment points (left, right) +./guiplugin Generic (not soccer related) plugins for the carbon gui. + Plugins can be anything to extend the gui with. There are + three types: Simple Plugins (can be executed), Signal + Plugins (can communicate), and AttachableFrame Plugins (can + be embedded into the Gui). Examples which can be created + really easily and quickly, are: executable plugins running in + a new thread, function libraries, toolboxes or menu entries, + or visual plugins made for user interaction. + + Initial plugins (all of them are plugins that can be attached + to attachment points): + - logframe: logs and displays messages + - setupframe: creates simulation setups for the gui + - simulationframe: displays and controls simulation tasks and + processes in the gui + - scenegraphframe: displays and controls the whole scene graph + of a spark simulation. The user can freely change the values + of several types of nodes. + This interaction can be extended with additional plugins. + - monitorframe: renders a spark simulation + Literature: [1] Marco Kögler and Oliver Obst. Simulation League: The Next Generation. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2013-06-12 20:53:34
|
Revision: 366 http://sourceforge.net/p/simspark/svn/366 Author: hedayat Date: 2013-06-12 20:53:27 +0000 (Wed, 12 Jun 2013) Log Message: ----------- Replace all Windows new lines with Unix ones for consistency Modified Paths: -------------- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/export.h branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.cpp branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.h branches/gui-bullet/rcssserver3d/sparkgui/main.cpp branches/gui-bullet/spark/carbon/aboutdialog.cpp branches/gui-bullet/spark/carbon/aboutdialog.h branches/gui-bullet/spark/carbon/abstractcommand.cpp branches/gui-bullet/spark/carbon/abstractcommand.h branches/gui-bullet/spark/carbon/abstractcommandqueue.cpp branches/gui-bullet/spark/carbon/abstractcommandqueue.h branches/gui-bullet/spark/carbon/abstractplugin.cpp branches/gui-bullet/spark/carbon/abstractplugin.h branches/gui-bullet/spark/carbon/attachableframe.cpp branches/gui-bullet/spark/carbon/attachableframe.h branches/gui-bullet/spark/carbon/carbon.cpp branches/gui-bullet/spark/carbon/carbon.h branches/gui-bullet/spark/carbon/communicationmanager.cpp branches/gui-bullet/spark/carbon/communicationmanager.h branches/gui-bullet/spark/carbon/cutelogger/debugappender.cpp branches/gui-bullet/spark/carbon/cutelogger/debugappender.h branches/gui-bullet/spark/carbon/cutelogger/functionappender.cpp branches/gui-bullet/spark/carbon/cutelogger/functionappender.h branches/gui-bullet/spark/carbon/cutelogger/imessagereceiver.cpp branches/gui-bullet/spark/carbon/cutelogger/imessagereceiver.h branches/gui-bullet/spark/carbon/cutelogger/logger.cpp branches/gui-bullet/spark/carbon/cutelogger/logmessage.cpp branches/gui-bullet/spark/carbon/cutelogger/logmessage.h branches/gui-bullet/spark/carbon/cutelogger/logstream.cpp branches/gui-bullet/spark/carbon/cutelogger/logstream.h branches/gui-bullet/spark/carbon/cutelogger/logstreambuffer.cpp branches/gui-bullet/spark/carbon/cutelogger/logstreambuffer.h branches/gui-bullet/spark/carbon/cutelogger/messageobjectappender.cpp branches/gui-bullet/spark/carbon/cutelogger/messageobjectappender.h branches/gui-bullet/spark/carbon/cutelogger/messagereceiverappender.cpp branches/gui-bullet/spark/carbon/cutelogger/messagereceiverappender.h branches/gui-bullet/spark/carbon/frameattachmentpoint.cpp branches/gui-bullet/spark/carbon/frameattachmentpoint.h branches/gui-bullet/spark/carbon/glwidget.cpp branches/gui-bullet/spark/carbon/glwidget.h branches/gui-bullet/spark/carbon/guisettings_pluginsettings.cpp branches/gui-bullet/spark/carbon/guisettings_pluginsettings.h branches/gui-bullet/spark/carbon/guisettings_simulationsettings.cpp branches/gui-bullet/spark/carbon/guisettings_simulationsettings.h branches/gui-bullet/spark/carbon/guisimcontrol.cpp branches/gui-bullet/spark/carbon/guisimcontrol.h branches/gui-bullet/spark/carbon/guisimcontrol_c.cpp branches/gui-bullet/spark/carbon/inputqt.cpp branches/gui-bullet/spark/carbon/inputqt.h branches/gui-bullet/spark/carbon/isimcontrol.cpp branches/gui-bullet/spark/carbon/isimcontrol.h branches/gui-bullet/spark/carbon/libraryloader.cpp branches/gui-bullet/spark/carbon/libraryloader.h branches/gui-bullet/spark/carbon/main.cpp branches/gui-bullet/spark/carbon/matrixwidget.cpp branches/gui-bullet/spark/carbon/matrixwidget.h branches/gui-bullet/spark/carbon/menumanager.cpp branches/gui-bullet/spark/carbon/menumanager.h branches/gui-bullet/spark/carbon/menuobject.cpp branches/gui-bullet/spark/carbon/menuobject.h branches/gui-bullet/spark/carbon/menuobjectcall.cpp branches/gui-bullet/spark/carbon/menuobjectcall.h branches/gui-bullet/spark/carbon/menuobjectconnection.cpp branches/gui-bullet/spark/carbon/menuobjectconnection.h branches/gui-bullet/spark/carbon/menuobjectfile.cpp branches/gui-bullet/spark/carbon/menuobjectfile.h branches/gui-bullet/spark/carbon/menuobjectmenu.cpp branches/gui-bullet/spark/carbon/menuobjectmenu.h branches/gui-bullet/spark/carbon/menuobjectmenuaction.cpp branches/gui-bullet/spark/carbon/menuobjectmenuaction.h branches/gui-bullet/spark/carbon/menuobjecttoolbar.cpp branches/gui-bullet/spark/carbon/menuobjecttoolbar.h branches/gui-bullet/spark/carbon/namedactionreceiver.cpp branches/gui-bullet/spark/carbon/namedactionreceiver.h branches/gui-bullet/spark/carbon/numberedactionreceiver.cpp branches/gui-bullet/spark/carbon/numberedactionreceiver.h branches/gui-bullet/spark/carbon/openglmanager.cpp branches/gui-bullet/spark/carbon/openglmanager.h branches/gui-bullet/spark/carbon/plugin.cpp branches/gui-bullet/spark/carbon/plugin.h branches/gui-bullet/spark/carbon/plugindefinition.cpp branches/gui-bullet/spark/carbon/plugindefinition.h branches/gui-bullet/spark/carbon/plugindialog.cpp branches/gui-bullet/spark/carbon/plugindialog.h branches/gui-bullet/spark/carbon/plugininstantiatormodel.cpp branches/gui-bullet/spark/carbon/plugininstantiatormodel.h branches/gui-bullet/spark/carbon/pluginmanager.cpp branches/gui-bullet/spark/carbon/pluginmanager.h branches/gui-bullet/spark/carbon/pluginthread.cpp branches/gui-bullet/spark/carbon/pluginthread.h branches/gui-bullet/spark/carbon/plugintype.cpp branches/gui-bullet/spark/carbon/plugintype.h branches/gui-bullet/spark/carbon/process.cpp branches/gui-bullet/spark/carbon/process.h branches/gui-bullet/spark/carbon/serverthread.cpp branches/gui-bullet/spark/carbon/serverthread.h branches/gui-bullet/spark/carbon/settings.cpp branches/gui-bullet/spark/carbon/settings.h branches/gui-bullet/spark/carbon/settingsdialog.cpp branches/gui-bullet/spark/carbon/settingsdialog.h branches/gui-bullet/spark/carbon/settingstreeview.cpp branches/gui-bullet/spark/carbon/settingstreeview.h branches/gui-bullet/spark/carbon/settingswidget.cpp branches/gui-bullet/spark/carbon/settingswidget.h branches/gui-bullet/spark/carbon/setupdialog.cpp branches/gui-bullet/spark/carbon/setupdialog.h branches/gui-bullet/spark/carbon/setupframe.cpp branches/gui-bullet/spark/carbon/setupframe.h branches/gui-bullet/spark/carbon/signalplugin.cpp branches/gui-bullet/spark/carbon/signalplugin.h branches/gui-bullet/spark/carbon/simspark.cpp branches/gui-bullet/spark/carbon/simspark.h branches/gui-bullet/spark/carbon/simulation.cpp branches/gui-bullet/spark/carbon/simulation.h branches/gui-bullet/spark/carbon/simulationmanager.cpp branches/gui-bullet/spark/carbon/simulationmanager.h branches/gui-bullet/spark/carbon/simulationprocess.cpp branches/gui-bullet/spark/carbon/simulationprocess.h branches/gui-bullet/spark/carbon/simulationsetup.cpp branches/gui-bullet/spark/carbon/simulationsetup.h branches/gui-bullet/spark/carbon/simulationtask.cpp branches/gui-bullet/spark/carbon/simulationtask.h branches/gui-bullet/spark/carbon/simulationthread.cpp branches/gui-bullet/spark/carbon/simulationthread.h branches/gui-bullet/spark/carbon/sparkcommandqueue.cpp branches/gui-bullet/spark/carbon/sparkcommandqueue.h branches/gui-bullet/spark/carbon/sparkcommands.cpp branches/gui-bullet/spark/carbon/sparkcommands.h branches/gui-bullet/spark/carbon/sparkcontext.cpp branches/gui-bullet/spark/carbon/sparkcontext.h branches/gui-bullet/spark/carbon/sparkcontroller.cpp branches/gui-bullet/spark/carbon/sparkcontroller.h branches/gui-bullet/spark/carbon/sparkprocess.cpp branches/gui-bullet/spark/carbon/sparkprocess.h branches/gui-bullet/spark/carbon/sparkproperty.cpp branches/gui-bullet/spark/carbon/sparkproperty.h branches/gui-bullet/spark/carbon/sparkpropertycontrol.cpp branches/gui-bullet/spark/carbon/sparkpropertycontrol.h branches/gui-bullet/spark/carbon/sparkpropertycontrolbasic.cpp branches/gui-bullet/spark/carbon/sparkpropertycontrolbasic.h branches/gui-bullet/spark/carbon/sparkpropertydata.cpp branches/gui-bullet/spark/carbon/sparkpropertydata.h branches/gui-bullet/spark/carbon/sparkpropertyexecuter.cpp branches/gui-bullet/spark/carbon/sparkpropertyexecuter.h branches/gui-bullet/spark/carbon/sparkpropertylist.cpp branches/gui-bullet/spark/carbon/sparkpropertylist.h branches/gui-bullet/spark/carbon/sparkpropertymanager.cpp branches/gui-bullet/spark/carbon/sparkpropertymanager.h branches/gui-bullet/spark/carbon/sparkpropertytablewidget.cpp branches/gui-bullet/spark/carbon/sparkpropertytablewidget.h branches/gui-bullet/spark/carbon/sparkpropertywidget.cpp branches/gui-bullet/spark/carbon/sparkpropertywidget.h branches/gui-bullet/spark/carbon/sparksimulationthread.cpp branches/gui-bullet/spark/carbon/sparksimulationthread.h branches/gui-bullet/spark/carbon/sparktreemodel.cpp branches/gui-bullet/spark/carbon/sparktreemodel.h branches/gui-bullet/spark/carbon/sparktreeview.cpp branches/gui-bullet/spark/carbon/sparktreeview.h branches/gui-bullet/spark/carbon/taskdefinition.cpp branches/gui-bullet/spark/carbon/taskdefinition.h branches/gui-bullet/spark/carbon/toolseparatorbutton.cpp branches/gui-bullet/spark/carbon/toolseparatorbutton.h branches/gui-bullet/spark/carbon/topic.cpp branches/gui-bullet/spark/carbon/topic.h branches/gui-bullet/spark/carbon/topicregistration.cpp branches/gui-bullet/spark/carbon/topicregistration.h branches/gui-bullet/spark/carbon/treeitem.cpp branches/gui-bullet/spark/carbon/treeitem.h branches/gui-bullet/spark/carbon/typedlineedit.cpp branches/gui-bullet/spark/carbon/typedlineedit.h branches/gui-bullet/spark/carbon/vector2x3widget.cpp branches/gui-bullet/spark/carbon/vector2x3widget.h branches/gui-bullet/spark/carbon/vector3widget.cpp branches/gui-bullet/spark/carbon/vector3widget.h branches/gui-bullet/spark/carbon/vector4widget.cpp branches/gui-bullet/spark/carbon/vector4widget.h branches/gui-bullet/spark/carbon/windowdefinition.cpp branches/gui-bullet/spark/carbon/windowdefinition.h branches/gui-bullet/spark/carbon/windowmanager.cpp branches/gui-bullet/spark/carbon/windowmanager.h branches/gui-bullet/spark/guilayout/guigridlayout/export.h branches/gui-bullet/spark/guilayout/guigridlayout/guigridlayout.cpp branches/gui-bullet/spark/guilayout/guigridlayout/guigridlayout.h branches/gui-bullet/spark/guilayout/guisimplelayout/export.h branches/gui-bullet/spark/guilayout/guisimplelayout/guisimplelayout.cpp branches/gui-bullet/spark/guilayout/guisimplelayout/guisimplelayout.h branches/gui-bullet/spark/guiplugin/logframe/export.h branches/gui-bullet/spark/guiplugin/logframe/logframe.cpp branches/gui-bullet/spark/guiplugin/logframe/logframe.h branches/gui-bullet/spark/guiplugin/logframe/logframe_logsettings.cpp branches/gui-bullet/spark/guiplugin/logframe/logframe_logsettings.h branches/gui-bullet/spark/guiplugin/monitorframe/export.h branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe.cpp branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe.h branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_glconstants.cpp branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_glconstants.h branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglrender.cpp branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglrender.h branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglwidget.cpp branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglwidget.h branches/gui-bullet/spark/guiplugin/scenegraphframe/export.h branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe.cpp branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe.h branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_propertyframe.cpp branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_propertyframe.h branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_scenegraphwidget.cpp branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_scenegraphwidget.h branches/gui-bullet/spark/guiplugin/setupframe/export.h branches/gui-bullet/spark/guiplugin/setupframe/setupframe.cpp branches/gui-bullet/spark/guiplugin/setupframe/setupframe.h branches/gui-bullet/spark/guiplugin/simulationframe/export.h branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe.cpp branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe.h branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe_taskwidget.cpp branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe_taskwidget.h branches/gui-bullet/spark/plugin/inputqt/export.cpp branches/gui-bullet/spark/plugin/inputqt/inputqt.cpp branches/gui-bullet/spark/plugin/inputqt/inputqt.h branches/gui-bullet/spark/plugin/inputqt/inputsystemqt.cpp branches/gui-bullet/spark/plugin/inputqt/inputsystemqt.h branches/gui-bullet/spark/plugin/inputqt/inputsystemqt_c.cpp Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/export.h =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/export.h 2013-06-12 20:48:36 UTC (rev 365) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/export.h 2013-06-12 20:53:27 UTC (rev 366) @@ -1,14 +1,14 @@ -#ifndef EXPORT_LIB -#define EXPORT_LIB -/** - * \file soccercontrolframe/export.h - * \brief Exports the SoccerControlFrame class as a plugin from a shared library. - */ - -#include "soccercontrolframe.h" - -PLUGINS_EXPORT_BEGIN() -PLUGIN_EXPORT(SoccerControlFrame) -PLUGINS_EXPORT_END() - +#ifndef EXPORT_LIB +#define EXPORT_LIB +/** + * \file soccercontrolframe/export.h + * \brief Exports the SoccerControlFrame class as a plugin from a shared library. + */ + +#include "soccercontrolframe.h" + +PLUGINS_EXPORT_BEGIN() +PLUGIN_EXPORT(SoccerControlFrame) +PLUGINS_EXPORT_END() + #endif \ No newline at end of file Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp 2013-06-12 20:48:36 UTC (rev 365) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp 2013-06-12 20:53:27 UTC (rev 366) @@ -1,610 +1,610 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - - this file is part of rcssserver3D - Author: Patrick Geib - Copyright (C) 2012 RoboCup Soccer Server 3D Maintenance Group - $Id$ - - 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. -*/ - -//Local -#include "soccercontrolframe.h" -#include "soccercontrolframe_soccercommands.h" -#include "export.h" - -//Carbon -#include <pluginmanager.h> -#include <carbon.h> -#include <simulationmanager.h> -#include <simulation.h> -#include <sparkcontroller.h> -#include <guisimcontrol.h> -#include <serverthread.h> -#include <simspark.h> -#include <settings.h> - -//SimSpark -#include <oxygen/gamecontrolserver/gamecontrolserver.h> -#include <zeitgeist/leaf.h> - -//Soccer -#include "soccer/gamestateaspect/gamestateaspect.h" -#include "soccer/soccerruleaspect/soccerruleaspect.h" -#include "soccer/ballstateaspect/ballstateaspect.h" -//#include <agentstate/agentstate.h> - -//Boost -#include <boost/make_shared.hpp> - -//Qt -#include <QValidator> - -using namespace boost; -using namespace oxygen; -using namespace SoccerControlFrameUtil; - -//-------------------------------------------------------------- -// Static -//-------------------------------------------------------------- - -//Factory registration -REGISTER_EXPORT_FRAME(SoccerControlFrame, "soccercontrolframe", "Soccer", 1000) - -//Static class information -void SoccerControlFrame::saveClassInfo() -{ - //Description - setClassInfo(mClassId, AbstractPlugin::PI_DESCRIPTION, - tr("The soccer control frame can be used to monitor and control the state of a simspark soccer simulation.")); - - //Icon - setClassInfo(mClassId, AbstractPlugin::PI_ICON_NAME, ":soccer"); - - //Tags - QStringList tags; - tags << "soccer" << "spark" << "rcssserver3d"; - setClassInfo(mClassId, AbstractPlugin::PI_TAGS, tags); -} - -//-------------------------------------------------------------- -// SoccerFrameUpdateControl -//-------------------------------------------------------------- - -SoccerFrameUpdateControl::SoccerFrameUpdateControl(SoccerControlFrame* parent) - : mParent(parent), CommandQueue(0) -{ -} -SoccerFrameUpdateControl::~SoccerFrameUpdateControl() -{ -} - -void SoccerFrameUpdateControl::startCycle() -{ - emit stateStartCycle(); -} - -void SoccerFrameUpdateControl::endCycle() -{ - SparkCommand::CommandQueue::endCycle(); - emit stateEndCycle(); -} - -void SoccerFrameUpdateControl::waitCycle() -{ - SparkCommand::CommandQueue::waitCycle(); - emit stateWaitCycle(); -} - -//-------------------------------------------------------------- -// SoccerFrame -//-------------------------------------------------------------- -// Public -//-------------------------------------------------------------- - -SoccerControlFrame::SoccerControlFrame() : - mSettings(getCarbon()->getSettings()) -{ - //---------------- - //Layout - ui.setupUi(this); - loadFrameDesign(); - - //---------------- - //Variables - mInit = false; - mLastInitState = true; //--> 1 display update during initialization - mReadyUpdate = true; - mSelectedPlayer = -1; - mSelectedPlayMode = PM_NONE; - mUpdateTimer.setInterval(100); - - //---------------- - //Gui-Field init - ui.gameTimeEdit->setValidator(new QDoubleValidator(0.0, INT_MAX, 4, ui.gameTimeEdit)); - ui.team1GoalsEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team1GoalsEdit)); - ui.team2GoalsEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team2GoalsEdit)); - ui.team1PenaltiesEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team1PenaltiesEdit)); - ui.team2PenaltiesEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team2PenaltiesEdit)); - ui.batteryEdit->setValidator(new QDoubleValidator(0.0, INT_MAX, 4, ui.batteryEdit)); - - //---------------- - //Settings - - loadDefaultSettings(); - loadSettings(); - - //---------------- - //Menu Entries - - //---------------- - //Connections - Simulation* simulation = &*getCarbon()->getSimulationManager()->getSimulation(); - connect(simulation, SIGNAL(serverCreated(boost::shared_ptr<ServerThread>)), this, SLOT(updateServerCreated(boost::shared_ptr<ServerThread>))); - - connect(&mUpdateTimer, SIGNAL(timeout()), this, SLOT(readyUpdate())); -} - -SoccerControlFrame::~SoccerControlFrame() -{ - -} - -void SoccerControlFrame::init(const QStringList& parameters) -{ - //Combo box entries - mGameModes.clear(); - ui.playModeComboBox->clear(); - - mGameModes.insert(PM_BeforeKickOff, GameMode(0, PM_BeforeKickOff, true, tr("Before Kickoff"))); - mGameModes.insert(PM_KickOff_Left, GameMode(0, PM_KickOff_Left, true, tr("KickOff Left"))); - mGameModes.insert(PM_KickOff_Right, GameMode(0, PM_KickOff_Right, true, tr("KickOff Right"))); - mGameModes.insert(PM_PlayOn, GameMode(0, PM_PlayOn, true, tr("Play On"))); - mGameModes.insert(PM_KickIn_Left, GameMode(0, PM_KickIn_Left, true, tr("Kick-In Left"))); - mGameModes.insert(PM_KickIn_Right, GameMode(0, PM_KickIn_Right, true, tr("Kick-In Right"))); - mGameModes.insert(PM_CORNER_KICK_LEFT, GameMode(0, PM_CORNER_KICK_LEFT, true, tr("Corner Kick Left"))); - mGameModes.insert(PM_CORNER_KICK_RIGHT, GameMode(0, PM_CORNER_KICK_RIGHT, true, tr("Corner Kick Right"))); - mGameModes.insert(PM_GOAL_KICK_LEFT, GameMode(0, PM_GOAL_KICK_LEFT, true, tr("Goal Kick Left"))); - mGameModes.insert(PM_GOAL_KICK_RIGHT, GameMode(0, PM_GOAL_KICK_RIGHT, true, tr("Goal Kick Right"))); - mGameModes.insert(PM_OFFSIDE_LEFT, GameMode(0, PM_OFFSIDE_LEFT, true, tr("Offside Left"))); - mGameModes.insert(PM_OFFSIDE_RIGHT, GameMode(0, PM_OFFSIDE_RIGHT, true, tr("Offside Right"))); - mGameModes.insert(PM_GameOver, GameMode(0, PM_GameOver, true, tr("Game Over"))); - mGameModes.insert(PM_Goal_Left, GameMode(0, PM_Goal_Left, true, tr("Goal Left"))); - mGameModes.insert(PM_Goal_Right, GameMode(0, PM_Goal_Right, true, tr("Goal Right"))); - mGameModes.insert(PM_FREE_KICK_LEFT, GameMode(0, PM_FREE_KICK_LEFT, true, tr("Free Kick Left"))); - mGameModes.insert(PM_FREE_KICK_RIGHT, GameMode(0, PM_FREE_KICK_RIGHT, true, tr("Free Kick Right"))); - - int run = 0; - for (auto it = mGameModes.begin(); it != mGameModes.end(); it++) - { - it->mIndex = run; - ui.playModeComboBox->addItem(it->mName); - run++; - } - mSelectedPlayMode = PM_BeforeKickOff; - - tryInitSpark(); - updateDisplay(); -} - -bool SoccerControlFrame::initialized() -{ - return mInit; -} - -void SoccerControlFrame::loadSettings() -{ - -} - -void SoccerControlFrame::saveSettings() -{ - -} - -void SoccerControlFrame::loadDefaultSettings() -{ - mGameControlServerPath = "/sys/server/gamecontrol/"; - mGameStateAspectPath = "/sys/server/gamecontrol/GameStateAspect/"; - mSoccerRuleAspectPath = "/sys/server/gamecontrol/SoccerRuleAspect/"; - mBallStateAspectPath = "/sys/server/gamecontrol/BallStateAspect/"; -} - -//-------------------------------------------------------------- -// Protected -//-------------------------------------------------------------- - -bool SoccerControlFrame::tryInitSpark() -{ - //If already initialized, simply update - if (mInit) - updateDisplay(); - - //If there is no spark controller, try to get it - if (mSparkController.get() == 0) - { - mServerThread = getCarbon()->getSimulationManager()->getSparkServerThread(); - - if (mServerThread.get() == 0) - return false; - else - { - mSparkController = mServerThread->getSparkController(); - connect(&*mSparkController, SIGNAL(sparkRunning(SparkController*)), this, SLOT(updateSparkRunning(SparkController*))); - } - } - - //If there is a spark controller, check for SimSpark - if (mSparkController->getSpark().get() != 0) - { - //There is a controller and simspark-> initialize - - QString gameControlServer = mGameControlServerPath; - QString gameStateAspect = mGameStateAspectPath; - QString soccerRuleAspect = mSoccerRuleAspectPath; - QString ballStateAspect = mBallStateAspectPath; - - //Try to find soccer aspects - if (mSettings->beginGroup(this, true, 1000)) //lock - { - gameControlServer = mSettings->value("mGameControlServerPath", mGameControlServerPath).toString(); - gameStateAspect = mSettings->value("mGameStateAspectPath", mGameStateAspectPath).toString(); - soccerRuleAspect = mSettings->value("mSoccerRuleAspectPath", mSoccerRuleAspectPath).toString(); - ballStateAspect = mSettings->value("mBallStateAspectPath", mBallStateAspectPath).toString(); - mSettings->endGroup(true); //unlock - } - else - { - LOG_WARNING() << "Could not read Settings object in SoccerControlFrame. Using default values for control node paths."; - } - - SimSpark* spark = &*mSparkController->getSpark(); - boost::shared_ptr<GameControlServer> gameControl(shared_dynamic_cast<GameControlServer>(spark->GetCore()->Get(gameControlServer.toStdString()))); - boost::shared_ptr<GameStateAspect> gameState (shared_dynamic_cast<GameStateAspect> (spark->GetCore()->Get(gameStateAspect.toStdString()))); - boost::shared_ptr<SoccerRuleAspect> soccerRule (shared_dynamic_cast<SoccerRuleAspect> (spark->GetCore()->Get(soccerRuleAspect.toStdString()))); - boost::shared_ptr<BallStateAspect> ballState (shared_dynamic_cast<BallStateAspect> (spark->GetCore()->Get(ballStateAspect.toStdString()))); - - bool success = true; - if (!gameControl.get()) - { - LOG_ERROR() << "Soccer GameControlServer not found. Expected it to be at " << gameControlServer << "."; - success = false; - } - if (!gameState.get()) - { - LOG_ERROR() << "Soccer GameStateAspect not found. Expected it to be at " << gameStateAspect << "."; - success = false; - } - if (!soccerRule.get()) - { - LOG_ERROR() << "Soccer SoccerRuleAspect not found. Expected it to be at " << soccerRuleAspect << "."; - success = false; - } - if (!ballState.get()) - { - LOG_ERROR() << "Soccer BallStateAspect not found. Expected it to be at " << ballStateAspect << "."; - success = false; - } - - if (success == false) - { - //Init failed, return - mGameControlServer.reset(); - mRuleAspect.reset(); - mBallAspect.reset(); - mGameAspect.reset(); - return false; - } - - //All nodes found, init successful - mGameControlServer = gameControl; - mRuleAspect = soccerRule; - mBallAspect = ballState; - mGameAspect = gameState; - - //Register control node that polls an update every time a cycle ended - registerUpdater(); - - mInit = true; - updateDisplay(); - return true; - } - return false; -} - -void SoccerControlFrame::registerUpdater() -{ - shared_ptr<GuiSimControl> simControl = mSparkController->getSimulationControl().lock(); - if (simControl.get() == 0) - { - LOG_ERROR() << "No gui simulation control node found to register updater in."; - return; - } - - //Remove old updater (should happen automatically, just to be safe) - if (mUpdater.get() != 0) - { - simControl->unregisterSimControl(mUpdater); - mUpdater.reset(); - } - - //Create new updater - mUpdater = shared_ptr<SoccerFrameUpdateControl>(new SoccerFrameUpdateControl(this)); - simControl->registerSimControl(mUpdater); - connect(&*mUpdater, SIGNAL(stateEndCycle()), this, SLOT(onCycleFinished())); //Queued connection - connect(&*mUpdater, SIGNAL(stateWaitCycle()), this, SLOT(onCycleFinished())); //Queued connection - - //Start update timer - mUpdateTimer.start(); -} - -//-------------------------------------------------------------- -// Private -//-------------------------------------------------------------- - -//-------------------------------------------------------------- -// Protected Slots -//-------------------------------------------------------------- - -void SoccerControlFrame::updateServerCreated(boost::shared_ptr<ServerThread> server) -{ - mSparkController = server->getSparkController(); - connect(&*mSparkController, SIGNAL(sparkRunning(SparkController*)), this, SLOT(updateSparkRunning(SparkController*))); - tryInitSpark(); -} - -void SoccerControlFrame::updateSparkRunning(SparkController* controller) -{ - if (mSparkController.get() != 0) - { - if (mSparkController->getSpark().get() == controller->getSpark().get()) - { - tryInitSpark(); - } - } -} - -void SoccerControlFrame::onCycleFinished() -{ - updateDisplay(); - mReadyUpdate = false; -} - -//-------------------------------------------------------------- -// Public Slots -//-------------------------------------------------------------- - -void SoccerControlFrame::readyUpdate() -{ - mReadyUpdate = true; -} - -void SoccerControlFrame::updateDisplay() -{ - if (mLastInitState != mInit) - { - mLastInitState = mInit; - mUpdateCount = 0; - - ui.batteryEdit->setEnabled(mInit); - ui.temperatureEdit->setEnabled(mInit); - ui.gameTimeEdit->setEnabled(mInit); - ui.team1GoalsEdit->setEnabled(mInit); - ui.team2GoalsEdit->setEnabled(mInit); - ui.team1PenaltiesEdit->setEnabled(mInit); - ui.team2PenaltiesEdit->setEnabled(mInit); - - ui.gameTimeResetButton->setEnabled(mInit); - ui.resetBatteryButton->setEnabled(mInit); - ui.resetTemperatureButton->setEnabled(mInit); - ui.kickOffButton->setEnabled(mInit); - ui.playModeButton->setEnabled(mInit); - ui.playModeComboBox->setEnabled(mInit); - - mSelectedPlayer = -1; - } - - if (!mInit) - { - ui.batteryEdit->setText(""); - ui.temperatureEdit->setText(""); - ui.gameTimeEdit->setText(""); - ui.team1GoalsEdit->setText(""); - ui.team2GoalsEdit->setText(""); - ui.team1PenaltiesEdit->setText(""); - ui.team2PenaltiesEdit->setText(""); - ui.team1NameLabel->setText(tr("Left")); - ui.team2NameLabel->setText(tr("Right")); - ui.agentNameLabel->setText(""); - ui.agentTeamLabel->setText(""); - ui.playModeLabel->setText(tr("Not initialized.")); - } - - if (mInit && mReadyUpdate) - { - //Read and display non-changing values - if (mUpdateCount == 0) - { - } - - //Read and update changing values - ui.team1NameLabel->setText(mGameAspect->GetTeamName(TI_LEFT).c_str()); - ui.team2NameLabel->setText(mGameAspect->GetTeamName(TI_RIGHT).c_str()); - if (!ui.team1GoalsEdit->hasFocus()) ui.team1GoalsEdit->setText(QString::number(mGameAspect->GetScore(TI_LEFT))); - if (!ui.team2GoalsEdit->hasFocus()) ui.team2GoalsEdit->setText(QString::number(mGameAspect->GetScore(TI_RIGHT))); - if (!ui.team1PenaltiesEdit->hasFocus()) ui.team1PenaltiesEdit->setText("0"); - if (!ui.team2PenaltiesEdit->hasFocus()) ui.team2PenaltiesEdit->setText("0"); - - if (!ui.gameTimeEdit->hasFocus()) ui.gameTimeEdit->setText(QString::number(mGameAspect->GetTime())); - - auto pos = mGameModes.find((int)mGameAspect->GetPlayMode()); - if (pos == mGameModes.end()) - { - LOG_WARNING() << "Current game mode " << mGameAspect->GetPlayMode() << " is unknown."; - } - else - { - if (mUpdateCount == 0) - ui.playModeComboBox->setCurrentIndex(pos->mIndex); - ui.playModeLabel->setText(pos->mName); - } - - updatePlayerDisplay(); - } - - mUpdateCount++; -} - -void SoccerControlFrame::updatePlayerDisplay() -{ - if (mSelectedPlayer == -1) - return; - - if (!mInit) - return; -} - -void SoccerControlFrame::editGameTime() -{ - if (!mInit) - return; - - mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTime>(mGameAspect, ui.gameTimeEdit->text().toFloat())); -} - -void SoccerControlFrame::resetGameTime() -{ - if (!mInit) - return; - - mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTime>(mGameAspect, 0.0)); -} - -void SoccerControlFrame::editTeam1Goals() -{ - if (!mInit) - return; - - mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTeamGoals>(mGameAspect, TI_LEFT, ui.team1GoalsEdit->text().toInt())); -} - -void SoccerControlFrame::editTeam2Goals() -{ - if (!mInit) - return; - - mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTeamGoals>(mGameAspect, TI_LEFT, ui.team2GoalsEdit->text().toInt())); -} - -void SoccerControlFrame::editTeam1Penalties() -{ - if (!mInit) - return; -} - -void SoccerControlFrame::editTeam2Penalties() -{ - if (!mInit) - return; -} - -void SoccerControlFrame::selectPlayMode(int index) -{ - if (!mInit) - return; - - ui.playModeButton->setEnabled(false); - - for (auto it = mGameModes.begin(); it != mGameModes.end(); it++) - { - if (it->mIndex == index) - { - mSelectedPlayMode = it->mMode; - ui.playModeButton->setEnabled(it->mManual); - } - } -} - -void SoccerControlFrame::changePlayMode() -{ - if (!mInit) - return; - - mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::ChangePlayMode>(mGameAspect, mSelectedPlayMode)); -} - -void SoccerControlFrame::kickOff() -{ - if (!mInit) - return; - - mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::KickOff>(mGameAspect)); -} - -void SoccerControlFrame::clearPlayers() -{ - if (!mInit) - return; -} - - -void SoccerControlFrame::selectPlayer(int index) -{ - if (!mInit) - return; - - mSelectedPlayer = -1; - updatePlayerDisplay(); -} - -void SoccerControlFrame::editBattery() -{ - if (!mInit) - return; - - if (mSelectedPlayer == -1) - return; - -} - -void SoccerControlFrame::editTemperature() -{ - if (!mInit) - return; - - if (mSelectedPlayer == -1) - return; - -} - -void SoccerControlFrame::resetBattery() -{ - if (!mInit) - return; - - if (mSelectedPlayer == -1) - return; - -} - -void SoccerControlFrame::resetTemperature() -{ - if (!mInit) - return; - - if (mSelectedPlayer == -1) - return; - - +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Author: Patrick Geib + Copyright (C) 2012 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + 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. +*/ + +//Local +#include "soccercontrolframe.h" +#include "soccercontrolframe_soccercommands.h" +#include "export.h" + +//Carbon +#include <pluginmanager.h> +#include <carbon.h> +#include <simulationmanager.h> +#include <simulation.h> +#include <sparkcontroller.h> +#include <guisimcontrol.h> +#include <serverthread.h> +#include <simspark.h> +#include <settings.h> + +//SimSpark +#include <oxygen/gamecontrolserver/gamecontrolserver.h> +#include <zeitgeist/leaf.h> + +//Soccer +#include "soccer/gamestateaspect/gamestateaspect.h" +#include "soccer/soccerruleaspect/soccerruleaspect.h" +#include "soccer/ballstateaspect/ballstateaspect.h" +//#include <agentstate/agentstate.h> + +//Boost +#include <boost/make_shared.hpp> + +//Qt +#include <QValidator> + +using namespace boost; +using namespace oxygen; +using namespace SoccerControlFrameUtil; + +//-------------------------------------------------------------- +// Static +//-------------------------------------------------------------- + +//Factory registration +REGISTER_EXPORT_FRAME(SoccerControlFrame, "soccercontrolframe", "Soccer", 1000) + +//Static class information +void SoccerControlFrame::saveClassInfo() +{ + //Description + setClassInfo(mClassId, AbstractPlugin::PI_DESCRIPTION, + tr("The soccer control frame can be used to monitor and control the state of a simspark soccer simulation.")); + + //Icon + setClassInfo(mClassId, AbstractPlugin::PI_ICON_NAME, ":soccer"); + + //Tags + QStringList tags; + tags << "soccer" << "spark" << "rcssserver3d"; + setClassInfo(mClassId, AbstractPlugin::PI_TAGS, tags); +} + +//-------------------------------------------------------------- +// SoccerFrameUpdateControl +//-------------------------------------------------------------- + +SoccerFrameUpdateControl::SoccerFrameUpdateControl(SoccerControlFrame* parent) + : mParent(parent), CommandQueue(0) +{ +} +SoccerFrameUpdateControl::~SoccerFrameUpdateControl() +{ +} + +void SoccerFrameUpdateControl::startCycle() +{ + emit stateStartCycle(); +} + +void SoccerFrameUpdateControl::endCycle() +{ + SparkCommand::CommandQueue::endCycle(); + emit stateEndCycle(); +} + +void SoccerFrameUpdateControl::waitCycle() +{ + SparkCommand::CommandQueue::waitCycle(); + emit stateWaitCycle(); +} + +//-------------------------------------------------------------- +// SoccerFrame +//-------------------------------------------------------------- +// Public +//-------------------------------------------------------------- + +SoccerControlFrame::SoccerControlFrame() : + mSettings(getCarbon()->getSettings()) +{ + //---------------- + //Layout + ui.setupUi(this); + loadFrameDesign(); + + //---------------- + //Variables + mInit = false; + mLastInitState = true; //--> 1 display update during initialization + mReadyUpdate = true; + mSelectedPlayer = -1; + mSelectedPlayMode = PM_NONE; + mUpdateTimer.setInterval(100); + + //---------------- + //Gui-Field init + ui.gameTimeEdit->setValidator(new QDoubleValidator(0.0, INT_MAX, 4, ui.gameTimeEdit)); + ui.team1GoalsEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team1GoalsEdit)); + ui.team2GoalsEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team2GoalsEdit)); + ui.team1PenaltiesEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team1PenaltiesEdit)); + ui.team2PenaltiesEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team2PenaltiesEdit)); + ui.batteryEdit->setValidator(new QDoubleValidator(0.0, INT_MAX, 4, ui.batteryEdit)); + + //---------------- + //Settings + + loadDefaultSettings(); + loadSettings(); + + //---------------- + //Menu Entries + + //---------------- + //Connections + Simulation* simulation = &*getCarbon()->getSimulationManager()->getSimulation(); + connect(simulation, SIGNAL(serverCreated(boost::shared_ptr<ServerThread>)), this, SLOT(updateServerCreated(boost::shared_ptr<ServerThread>))); + + connect(&mUpdateTimer, SIGNAL(timeout()), this, SLOT(readyUpdate())); +} + +SoccerControlFrame::~SoccerControlFrame() +{ + +} + +void SoccerControlFrame::init(const QStringList& parameters) +{ + //Combo box entries + mGameModes.clear(); + ui.playModeComboBox->clear(); + + mGameModes.insert(PM_BeforeKickOff, GameMode(0, PM_BeforeKickOff, true, tr("Before Kickoff"))); + mGameModes.insert(PM_KickOff_Left, GameMode(0, PM_KickOff_Left, true, tr("KickOff Left"))); + mGameModes.insert(PM_KickOff_Right, GameMode(0, PM_KickOff_Right, true, tr("KickOff Right"))); + mGameModes.insert(PM_PlayOn, GameMode(0, PM_PlayOn, true, tr("Play On"))); + mGameModes.insert(PM_KickIn_Left, GameMode(0, PM_KickIn_Left, true, tr("Kick-In Left"))); + mGameModes.insert(PM_KickIn_Right, GameMode(0, PM_KickIn_Right, true, tr("Kick-In Right"))); + mGameModes.insert(PM_CORNER_KICK_LEFT, GameMode(0, PM_CORNER_KICK_LEFT, true, tr("Corner Kick Left"))); + mGameModes.insert(PM_CORNER_KICK_RIGHT, GameMode(0, PM_CORNER_KICK_RIGHT, true, tr("Corner Kick Right"))); + mGameModes.insert(PM_GOAL_KICK_LEFT, GameMode(0, PM_GOAL_KICK_LEFT, true, tr("Goal Kick Left"))); + mGameModes.insert(PM_GOAL_KICK_RIGHT, GameMode(0, PM_GOAL_KICK_RIGHT, true, tr("Goal Kick Right"))); + mGameModes.insert(PM_OFFSIDE_LEFT, GameMode(0, PM_OFFSIDE_LEFT, true, tr("Offside Left"))); + mGameModes.insert(PM_OFFSIDE_RIGHT, GameMode(0, PM_OFFSIDE_RIGHT, true, tr("Offside Right"))); + mGameModes.insert(PM_GameOver, GameMode(0, PM_GameOver, true, tr("Game Over"))); + mGameModes.insert(PM_Goal_Left, GameMode(0, PM_Goal_Left, true, tr("Goal Left"))); + mGameModes.insert(PM_Goal_Right, GameMode(0, PM_Goal_Right, true, tr("Goal Right"))); + mGameModes.insert(PM_FREE_KICK_LEFT, GameMode(0, PM_FREE_KICK_LEFT, true, tr("Free Kick Left"))); + mGameModes.insert(PM_FREE_KICK_RIGHT, GameMode(0, PM_FREE_KICK_RIGHT, true, tr("Free Kick Right"))); + + int run = 0; + for (auto it = mGameModes.begin(); it != mGameModes.end(); it++) + { + it->mIndex = run; + ui.playModeComboBox->addItem(it->mName); + run++; + } + mSelectedPlayMode = PM_BeforeKickOff; + + tryInitSpark(); + updateDisplay(); +} + +bool SoccerControlFrame::initialized() +{ + return mInit; +} + +void SoccerControlFrame::loadSettings() +{ + +} + +void SoccerControlFrame::saveSettings() +{ + +} + +void SoccerControlFrame::loadDefaultSettings() +{ + mGameControlServerPath = "/sys/server/gamecontrol/"; + mGameStateAspectPath = "/sys/server/gamecontrol/GameStateAspect/"; + mSoccerRuleAspectPath = "/sys/server/gamecontrol/SoccerRuleAspect/"; + mBallStateAspectPath = "/sys/server/gamecontrol/BallStateAspect/"; +} + +//-------------------------------------------------------------- +// Protected +//-------------------------------------------------------------- + +bool SoccerControlFrame::tryInitSpark() +{ + //If already initialized, simply update + if (mInit) + updateDisplay(); + + //If there is no spark controller, try to get it + if (mSparkController.get() == 0) + { + mServerThread = getCarbon()->getSimulationManager()->getSparkServerThread(); + + if (mServerThread.get() == 0) + return false; + else + { + mSparkController = mServerThread->getSparkController(); + connect(&*mSparkController, SIGNAL(sparkRunning(SparkController*)), this, SLOT(updateSparkRunning(SparkController*))); + } + } + + //If there is a spark controller, check for SimSpark + if (mSparkController->getSpark().get() != 0) + { + //There is a controller and simspark-> initialize + + QString gameControlServer = mGameControlServerPath; + QString gameStateAspect = mGameStateAspectPath; + QString soccerRuleAspect = mSoccerRuleAspectPath; + QString ballStateAspect = mBallStateAspectPath; + + //Try to find soccer aspects + if (mSettings->beginGroup(this, true, 1000)) //lock + { + gameControlServer = mSettings->value("mGameControlServerPath", mGameControlServerPath).toString(); + gameStateAspect = mSettings->value("mGameStateAspectPath", mGameStateAspectPath).toString(); + soccerRuleAspect = mSettings->value("mSoccerRuleAspectPath", mSoccerRuleAspectPath).toString(); + ballStateAspect = mSettings->value("mBallStateAspectPath", mBallStateAspectPath).toString(); + mSettings->endGroup(true); //unlock + } + else + { + LOG_WARNING() << "Could not read Settings object in SoccerControlFrame. Using default values for control node paths."; + } + + SimSpark* spark = &*mSparkController->getSpark(); + boost::shared_ptr<GameControlServer> gameControl(shared_dynamic_cast<GameControlServer>(spark->GetCore()->Get(gameControlServer.toStdString()))); + boost::shared_ptr<GameStateAspect> gameState (shared_dynamic_cast<GameStateAspect> (spark->GetCore()->Get(gameStateAspect.toStdString()))); + boost::shared_ptr<SoccerRuleAspect> soccerRule (shared_dynamic_cast<SoccerRuleAspect> (spark->GetCore()->Get(soccerRuleAspect.toStdString()))); + boost::shared_ptr<BallStateAspect> ballState (shared_dynamic_cast<BallStateAspect> (spark->GetCore()->Get(ballStateAspect.toStdString()))); + + bool success = true; + if (!gameControl.get()) + { + LOG_ERROR() << "Soccer GameControlServer not found. Expected it to be at " << gameControlServer << "."; + success = false; + } + if (!gameState.get()) + { + LOG_ERROR() << "Soccer GameStateAspect not found. Expected it to be at " << gameStateAspect << "."; + success = false; + } + if (!soccerRule.get()) + { + LOG_ERROR() << "Soccer SoccerRuleAspect not found. Expected it to be at " << soccerRuleAspect << "."; + success = false; + } + if (!ballState.get()) + { + LOG_ERROR() << "Soccer BallStateAspect not found. Expected it to be at " << ballStateAspect << "."; + success = false; + } + + if (success == false) + { + //Init failed, return + mGameControlServer.reset(); + mRuleAspect.reset(); + mBallAspect.reset(); + mGameAspect.reset(); + return false; + } + + //All nodes found, init successful + mGameControlServer = gameControl; + mRuleAspect = soccerRule; + mBallAspect = ballState; + mGameAspect = gameState; + + //Register control node that polls an update every time a cycle ended + registerUpdater(); + + mInit = true; + updateDisplay(); + return true; + } + return false; +} + +void SoccerControlFrame::registerUpdater() +{ + shared_ptr<GuiSimControl> simControl = mSparkController->getSimulationControl().lock(); + if (simControl.get() == 0) + { + LOG_ERROR() << "No gui simulation control node found to register updater in."; + return; + } + + //Remove old updater (should happen automatically, just to be safe) + if (mUpdater.get() != 0) + { + simControl->unregisterSimControl(mUpdater); + mUpdater.reset(); + } + + //Create new updater + mUpdater = shared_ptr<SoccerFrameUpdateControl>(new SoccerFrameUpdateControl(this)); + simControl->registerSimControl(mUpdater); + connect(&*mUpdater, SIGNAL(stateEndCycle()), this, SLOT(onCycleFinished())); //Queued connection + connect(&*mUpdater, SIGNAL(stateWaitCycle()), this, SLOT(onCycleFinished())); //Queued connection + + //Start update timer + mUpdateTimer.start(); +} + +//-------------------------------------------------------------- +// Private +//-------------------------------------------------------------- + +//-------------------------------------------------------------- +// Protected Slots +//-------------------------------------------------------------- + +void SoccerControlFrame::updateServerCreated(boost::shared_ptr<ServerThread> server) +{ + mSparkController = server->getSparkController(); + connect(&*mSparkController, SIGNAL(sparkRunning(SparkController*)), this, SLOT(updateSparkRunning(SparkController*))); + tryInitSpark(); +} + +void SoccerControlFrame::updateSparkRunning(SparkController* controller) +{ + if (mSparkController.get() != 0) + { + if (mSparkController->getSpark().get() == controller->getSpark().get()) + { + tryInitSpark(); + } + } +} + +void SoccerControlFrame::onCycleFinished() +{ + updateDisplay(); + mReadyUpdate = false; +} + +//-------------------------------------------------------------- +// Public Slots +//-------------------------------------------------------------- + +void SoccerControlFrame::readyUpdate() +{ + mReadyUpdate = true; +} + +void SoccerControlFrame::updateDisplay() +{ + if (mLastInitState != mInit) + { + mLastInitState = mInit; + mUpdateCount = 0; + + ui.batteryEdit->setEnabled(mInit); + ui.temperatureEdit->setEnabled(mInit); + ui.gameTimeEdit->setEnabled(mInit); + ui.team1GoalsEdit->setEnabled(mInit); + ui.team2GoalsEdit->setEnabled(mInit); + ui.team1PenaltiesEdit->setEnabled(mInit); + ui.team2PenaltiesEdit->setEnabled(mInit); + + ui.gameTimeResetButton->setEnabled(mInit); + ui.resetBatteryButton->setEnabled(mInit); + ui.resetTemperatureButton->setEnabled(mInit); + ui.kickOffButton->setEnabled(mInit); + ui.playModeButton->setEnabled(mInit); + ui.playModeComboBox->setEnabled(mInit); + + mSelectedPlayer = -1; + } + + if (!mInit) + { + ui.batteryEdit->setText(""); + ui.temperatureEdit->setText(""); + ui.gameTimeEdit->setText(""); + ui.team1GoalsEdit->setText(""); + ui.team2GoalsEdit->setText(""); + ui.team1PenaltiesEdit->setText(""); + ui.team2PenaltiesEdit->setText(""); + ui.team1NameLabel->setText(tr("Left")); + ui.team2NameLabel->setText(tr("Right")); + ui.agentNameLabel->setText(""); + ui.agentTeamLabel->setText(""); + ui.playModeLabel->setText(tr("Not initialized.")); + } + + if (mInit && mReadyUpdate) + { + //Read and display non-changing values + if (mUpdateCount == 0) + { + } + + //Read and update changing values + ui.team1NameLabel->setText(mGameAspect->GetTeamName(TI_LEFT).c_str()); + ui.team2NameLabel->setText(mGameAspect->GetTeamName(TI_RIGHT).c_str()); + if (!ui.team1GoalsEdit->hasFocus()) ui.team1GoalsEdit->setText(QString::number(mGameAspect->GetScore(TI_LEFT))); + if (!ui.team2GoalsEdit->hasFocus()) ui.team2GoalsEdit->setText(QString::number(mGameAspect->GetScore(TI_RIGHT))); + if (!ui.team1PenaltiesEdit->hasFocus()) ui.team1PenaltiesEdit->setText("0"); + if (!ui.team2PenaltiesEdit->hasFocus()) ui.team2PenaltiesEdit->setText("0"); + + if (!ui.gameTimeEdit->hasFocus()) ui.gameTimeEdit->setText(QString::number(mGameAspect->GetTime())); + + auto pos = mGameModes.find((int)mGameAspect->GetPlayMode()); + if (pos == mGameModes.end()) + { + LOG_WARNING() << "Current game mode " << mGameAspect->GetPlayMode() << " is unknown."; + } + else + { + if (mUpdateCount == 0) + ui.playModeComboBox->setCurrentIndex(pos->mIndex); + ui.playModeLabel->setText(pos->mName); + } + + updatePlayerDisplay(); + } + + mUpdateCount++; +} + +void SoccerControlFrame::updatePlayerDisplay() +{ + if (mSelectedPlayer == -1) + return; + + if (!mInit) + return; +} + +void SoccerControlFrame::editGameTime() +{ + if (!mInit) + return; + + mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTime>(mGameAspect, ui.gameTimeEdit->text().toFloat())); +} + +void SoccerControlFrame::resetGameTime() +{ + if (!mInit) + return; + + mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTime>(mGameAspect, 0.0)); +} + +void SoccerControlFrame::editTeam1Goals() +{ + if (!mInit) + return; + + mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTeamGoals>(mGameAspect, TI_LEFT, ui.team1GoalsEdit->text().toInt())); +} + +void SoccerControlFrame::editTeam2Goals() +{ + if (!mInit) + return; + + mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTeamGoals>(mGameAspect, TI_LEFT, ui.team2GoalsEdit->text().toInt())); +} + +void SoccerControlFrame::editTeam1Penalties() +{ + if (!mInit) + return; +} + +void SoccerControlFrame::editTeam2Penalties() +{ + if (!mInit) + return; +} + +void SoccerControlFrame::selectPlayMode(int index) +{ + if (!mInit) + return; + + ui.playModeButton->setEnabled(false); + + for (auto it = mGameModes.begin(); it != mGameModes.end(); it++) + { + if (it->mIndex == index) + { + mSelectedPlayMode = it->mMode; + ui.playModeButton->setEnabled(it->mManual); + } + } +} + +void SoccerControlFrame::changePlayMode() +{ + if (!mInit) + return; + + mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::ChangePlayMode>(mGameAspect, mSelectedPlayMode)); +} + +void SoccerControlFrame::kickOff() +{ + if (!mInit) + return; + + mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::KickOff>(mGameAspect)); +} + +void SoccerControlFrame::clearPlayers() +{ + if (!mInit) + return; +} + + +void SoccerControlFrame::selectPlayer(int index) +{ + if (!mInit) + return; + + mSelectedPlayer = -1; + updatePlayerDisplay(); +} + +void SoccerControlFrame::editBattery() +{ + if (!mInit) + return; + + if (mSelectedPlayer == -1) + return; + +} + +void SoccerControlFrame::editTemperature() +{ + if (!mInit) + return; + + if (mSelectedPlayer == -1) + return; + +} + +void SoccerControlFrame::resetBattery() +{ + if (!mInit) + return; + + if (mSelectedPlayer == -1) + return; + +} + +void SoccerControlFrame::resetTemperature() +{ + if (!mInit) + return; + + if (mSelectedPlayer == -1) + return; + + } \ No newline at end of file Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h 2013-06-12 20:48:36 UTC (rev 365) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h 2013-06-12 20:53:27 UTC (rev 366) @@ -1,391 +1,391 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - - this file is part of rcssserver3D - Author: Patrick Geib - Copyright (C) 2012 RoboCup Soccer Server 3D Maintenance Group - $Id$ - - 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 SOCCERCONTROLFRAME_H -#define SOCCERCONTROLFRAME_H -/** - * \file soccercontrolframe.h - * \brief Contains SoccerControlFrame and SoccerFrameUpdateControl classes. - */ - -#include "ui_soccercontrolframe.h" -#include "attachableframe.h" -#include "isimcontrol.h" -#include "sparkcommandqueue.h" - -#include <boost/shared_ptr.hpp> -#include <QObject> -#include <QTimer> - -#include <soccer/soccertypes.h> - -class ServerThread; -class SimSpark; -class Settings; - -class SoccerFrameUpdateControl; -class SoccerControlFrame; - -class GameStateAspect; -class SoccerRuleAspect; -class BallStateAspect; - -namespace oxygen -{ - class GameControlServer; -} - -/*! - \brief Update command queue read and set soccer variables and settings in the SimSpark simulation. -*/ -class SoccerFrameUpdateControl : public QObject, public SparkCommand::CommandQueue // is ISimControl -{ - Q_OBJECT - -public: - //public functions - - /*! - \brief Constructor. - */ - SoccerFrameUpdateControl(SoccerControlFrame* parent); - /*! - \brief Destructor. - */ - ~SoccerFrameUpdateControl(); - - /*! - \brief Called when the simulation cycle starts. - - Emits stateStartCycle() - */ - virtual void startCycle(); - /*! - \brief Called when the simulation cycle ends. - - Executes update commands. - Emits stateEndCycle() - */ - virtual void endCycle(); - /*! - \brief Called when the simulation executes a wait-cycle. - - Executes update commands. - Emits stateWaitCycle() - */ - virtual void waitCycle(); - -public: signals: - //public signals - - /*! - \brief Emittet when simualtion cycle starts. - - Calls update function. - */ - void stateStartCycle(); - /*! - \brief Emitted when simulation cycle ends. - - Calls update function. - */ - void stateEndCycle(); - /*! - \brief Emitted when simulation executes a wait-cycle. - - Calls update function. - */ - void stateWaitCycle(); - -public: - //public members - - SoccerControlFrame* mParent; /*!< Parent frame. */ -}; - -/*! - \brief AttachableFrame plugin that displays the state of a Ssoccer simulation and can control it. - - The SoccerControlFrame will wait and try to identify a soccer simulation in every Spark ServerThread that is started. - When it has found a ServerThread that runs a soccer simulation, the frame will register an updater to the SparkController and repeatedly update the - view on soccer variables like the team names, goals and the game time. - - The soccer values can be changed. - A List of SoccerFrameUtil::SoccerCommand derived classes can queue update calls for soccer variables and safely change the current game state. - - \todo Player control not implemented yet. Anyway, for player control to be effective there need to be additional functions to control them. - At the moment the only available functions would be battery state and temperature. - - \todo Currently the frame only controls basic soccer game control with the GameStateAspect and GameControlServer. - Additional control with the BallStateAspect, SoccerRuleAspect and the trainer command parser could be added. -*/ -class SoccerControlFrame : public AttachableFrame -{ - Q_OBJECT - GUI_FRAME - -public: - //public types - - /*! - \brief Description of the current game mode. - - Contains all the soccer game modes (BeforeKickoff, GoalLeft, FreekickRight and so on) and is robust to extension of the game modes. - */ - struct GameMode - { - public: - //public functions - - /*! - \brief full constructor. - - \param index index of the game mode in the combobox - \param mode spark game mode id - \param manual can it be selected by the user - \param name name string of the game mode - */ - GameMode(int index, TPlayMode mode, bool manual, QString name) - : mIndex(index), mMode(mode), mName(name), mManual(manual) {} - - TPlayMode mMode; /*!< spark game mode id */ - QString mName; /*!< name string of the game mode */ - int mIndex; /*!< index of the game mode in the combobox */ - bool mManual; /*!< can it be selected by the user */ - }; - -public: - // public functions - - /*! - \brief Constructor. - */ - SoccerControlFrame(); - /*! - \brief Destructor. - */ - ~SoccerControlFrame(); - -public: - //public virtual functions - - /*! - \brief Initialization function. - - \param parameters parameter list (not used) - */ - virtual void init(const QStringList& parameters); - - /*! - \brief Loads settings from global settings object. - */ - virtual void loadSettings(); - /*! - \brief Saves settings to global settings object. - */ - virtual void saveSettings(); - /*! - \brief Initializes settings with default values. - */ - virtual void loadDefaultSettings(); - - /*! - \brief Returns true after initialization of SimSpark simulation access. - */ - bool initialized(); - -protected: - //protected functions - - /*! - \brief Tries to initialize spark simulation access. - - Will fail if there is no Spark-Server, if the server has no SparkController, if the controller has not initialized SimSpark, or - if the Simulation doe... [truncated message content] |
From: <he...@us...> - 2013-06-12 20:55:40
|
Revision: 367 http://sourceforge.net/p/simspark/svn/367 Author: hedayat Date: 2013-06-12 20:55:37 +0000 (Wed, 12 Jun 2013) Log Message: ----------- Replaced endlines for CMakeLists.txt files too. :P Modified Paths: -------------- branches/gui-bullet/rcssserver3d/sparkgui/CMakeLists.txt branches/gui-bullet/spark/carbon/CMakeLists.txt Modified: branches/gui-bullet/rcssserver3d/sparkgui/CMakeLists.txt =================================================================== --- branches/gui-bullet/rcssserver3d/sparkgui/CMakeLists.txt 2013-06-12 20:53:27 UTC (rev 366) +++ branches/gui-bullet/rcssserver3d/sparkgui/CMakeLists.txt 2013-06-12 20:55:37 UTC (rev 367) @@ -1,75 +1,75 @@ -########### target files ############### - -set(sparkgui_SOURCES - main.cpp -) - -########### qt properties ############### - -#Additional used libraries -set(QT_USE_QTOPENGL TRUE) -set(QT_USE_QTXML TRUE) - -#Include qt properties -include(${QT_USE_FILE}) -add_definitions(${QT_DEFINITIONS}) - -########### definitions for config file ############### - -set(GUI_LAYOUT_DIR ${carbonlayoutlibdir}) -set(GUI_PLUGIN_DIR_1 ${carbonpluginlibdir}) -set(GUI_PLUGIN_DIR_2 ${guipluginlibdir}) -set(GUI_SETUP_DIR ${carbonsetupdir}) -set(EXECUTABLE_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/${BINDIR}) -set(SCRIPT_INCLUDE_DIR_1 ${sparkscriptdir}) -set(SCRIPT_INCLUDE_DIR_2 ${CMAKE_INSTALL_PREFIX}/${DATADIR}/${CMAKE_PROJECT_NAME}) - -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sparkgui_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/sparkgui_config.h) - -########### create executable ############### - -add_executable(sparkgui ${sparkgui_SOURCES}) - -if (APPLE) - set(SDL_LINK_LIBS ${SDLMAIN_LIBRARY} ${SDL_LIBRARY_TEMP}) -endif (APPLE) - -include_directories(${SDL_INCLUDE_DIR} ) - -set(sparkgui_LIBS ${OPENGL_LIBRARIES} ${QT_LIBRARIES} ${SDL_LINK_LIBS} ${RCSSNET3D_LIBRARY}) -set(sparkgui_DEBUG_LIBS ${SPARK_LIBRARY_DEBUG} ${SALT_LIBRARY_DEBUG} - ${ZEITGEIST_LIBRARY_DEBUG} ${OXYGEN_LIBRARY_DEBUG} ${KEROSIN_LIBRARY_DEBUG} - ${CARBON_LIBRARY_DEBUG}) -set(sparkgui_RELEASE_LIBS ${SPARK_LIBRARY_RELEASE} ${SALT_LIBRARY_RELEASE} - ${ZEITGEIST_LIBRARY_RELEASE} ${OXYGEN_LIBRARY_RELEASE} ${KEROSIN_LIBRARY_RELEASE} - ${CARBON_LIBRARY_RELEASE}) - -target_link_libraries(sparkgui ${sparkgui_LIBS}) -FOREACH(LIB ${sparkgui_DEBUG_LIBS}) - target_link_libraries(sparkgui debug ${LIB}) -ENDFOREACH(LIB) -FOREACH(LIB ${sparkgui_RELEASE_LIBS}) - target_link_libraries(sparkgui optimized ${LIB}) -ENDFOREACH(LIB) - -target_link_libraries(sparkgui ${Boost_LIBRARIES}) - -set_target_properties(sparkgui PROPERTIES INSTALL_RPATH "${RPATH_DIRECTORIES}") -install(TARGETS sparkgui DESTINATION ${BINDIR}) - -execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink - sparkgui ${CMAKE_CURRENT_BINARY_DIR}/simspark) - -########### install files ############### - -#install script files -install(DIRECTORY ./ - DESTINATION ${DATADIR}/${CMAKE_PROJECT_NAME} - FILES_MATCHING PATTERN "*.rb" PATTERN ".svn" EXCLUDE) - -#if (NOT WIN32) -# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rcsoccersim3d -# ${CMAKE_CURRENT_BINARY_DIR}/simspark DESTINATION ${BINDIR} -# PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ -# GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) -#endif (NOT WIN32) +########### target files ############### + +set(sparkgui_SOURCES + main.cpp +) + +########### qt properties ############### + +#Additional used libraries +set(QT_USE_QTOPENGL TRUE) +set(QT_USE_QTXML TRUE) + +#Include qt properties +include(${QT_USE_FILE}) +add_definitions(${QT_DEFINITIONS}) + +########### definitions for config file ############### + +set(GUI_LAYOUT_DIR ${carbonlayoutlibdir}) +set(GUI_PLUGIN_DIR_1 ${carbonpluginlibdir}) +set(GUI_PLUGIN_DIR_2 ${guipluginlibdir}) +set(GUI_SETUP_DIR ${carbonsetupdir}) +set(EXECUTABLE_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/${BINDIR}) +set(SCRIPT_INCLUDE_DIR_1 ${sparkscriptdir}) +set(SCRIPT_INCLUDE_DIR_2 ${CMAKE_INSTALL_PREFIX}/${DATADIR}/${CMAKE_PROJECT_NAME}) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sparkgui_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/sparkgui_config.h) + +########### create executable ############### + +add_executable(sparkgui ${sparkgui_SOURCES}) + +if (APPLE) + set(SDL_LINK_LIBS ${SDLMAIN_LIBRARY} ${SDL_LIBRARY_TEMP}) +endif (APPLE) + +include_directories(${SDL_INCLUDE_DIR} ) + +set(sparkgui_LIBS ${OPENGL_LIBRARIES} ${QT_LIBRARIES} ${SDL_LINK_LIBS} ${RCSSNET3D_LIBRARY}) +set(sparkgui_DEBUG_LIBS ${SPARK_LIBRARY_DEBUG} ${SALT_LIBRARY_DEBUG} + ${ZEITGEIST_LIBRARY_DEBUG} ${OXYGEN_LIBRARY_DEBUG} ${KEROSIN_LIBRARY_DEBUG} + ${CARBON_LIBRARY_DEBUG}) +set(sparkgui_RELEASE_LIBS ${SPARK_LIBRARY_RELEASE} ${SALT_LIBRARY_RELEASE} + ${ZEITGEIST_LIBRARY_RELEASE} ${OXYGEN_LIBRARY_RELEASE} ${KEROSIN_LIBRARY_RELEASE} + ${CARBON_LIBRARY_RELEASE}) + +target_link_libraries(sparkgui ${sparkgui_LIBS}) +FOREACH(LIB ${sparkgui_DEBUG_LIBS}) + target_link_libraries(sparkgui debug ${LIB}) +ENDFOREACH(LIB) +FOREACH(LIB ${sparkgui_RELEASE_LIBS}) + target_link_libraries(sparkgui optimized ${LIB}) +ENDFOREACH(LIB) + +target_link_libraries(sparkgui ${Boost_LIBRARIES}) + +set_target_properties(sparkgui PROPERTIES INSTALL_RPATH "${RPATH_DIRECTORIES}") +install(TARGETS sparkgui DESTINATION ${BINDIR}) + +execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink + sparkgui ${CMAKE_CURRENT_BINARY_DIR}/simspark) + +########### install files ############### + +#install script files +install(DIRECTORY ./ + DESTINATION ${DATADIR}/${CMAKE_PROJECT_NAME} + FILES_MATCHING PATTERN "*.rb" PATTERN ".svn" EXCLUDE) + +#if (NOT WIN32) +# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rcsoccersim3d +# ${CMAKE_CURRENT_BINARY_DIR}/simspark DESTINATION ${BINDIR} +# PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ +# GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) +#endif (NOT WIN32) Modified: branches/gui-bullet/spark/carbon/CMakeLists.txt =================================================================== --- branches/gui-bullet/spark/carbon/CMakeLists.txt 2013-06-12 20:53:27 UTC (rev 366) +++ branches/gui-bullet/spark/carbon/CMakeLists.txt 2013-06-12 20:55:37 UTC (rev 367) @@ -1,324 +1,324 @@ -########### moc target files ############### -set(carbon_QOBJECT_HEADERS - cutelogger/imessagereceiver.h - process.h - pluginthread.h - simulationprocess.h - simulationmanager.h - serverthread.h - signalplugin.h - simulationsetup.h - simulation.h - simulationthread.h - sparksimulationthread.h - simulationtask.h - taskdefinition.h - menumanager.h - menuobjectconnection.h - plugininstantiatormodel.h - plugindefinition.h - pluginmanager.h - attachableframe.h - windowdefinition.h - frameattachmentpoint.h - numberedactionreceiver.h - guisettings_pluginsettings.h - guisettings_simulationsettings.h - namedactionreceiver.h - matrixwidget.h - toolseparatorbutton.h - vector3widget.h - vector4widget.h - vector2x3widget.h - typedlineedit.h - carbon.h - settingsdialog.h - settingswidget.h - plugindialog.h - settings.h - setupdialog.h - abstractcommand.h - sparkcontroller.h - sparkcommands.h - sparktreemodel.h - sparktreeview.h - sparkpropertylist.h - sparkpropertywidget.h - sparkpropertycontrol.h - sparkpropertyexecuter.h - sparkpropertymanager.h - glwidget.h - openglmanager.h - communicationmanager.h - topic.h - ) - -set(carbon_HEADERS - cutelogger/abstractappender.h - cutelogger/abstractstringappender.h - cutelogger/consoleappender.h - cutelogger/debugappender.h - cutelogger/fileappender.h - cutelogger/functionappender.h - cutelogger/logger.h - cutelogger/logmessage.h - cutelogger/logstream.h - cutelogger/logstreambuffer.h - cutelogger/messageobjectappender.h - cutelogger/messagereceiverappender.h - cutelogger/imessagereceiver.h - sparkprocess.h - process.h - pluginthread.h - simulationprocess.h - simulationmanager.h - serverthread.h - simulationsetup.h - simulation.h - simulationthread.h - sparksimulationthread.h - simulationtask.h - taskdefinition.h - menuobject.h - menuobjectcall.h - menuobjectfile.h - menuobjectmenu.h - menuobjectmenuaction.h - menuobjecttoolbar.h - menumanager.h - menuobjectconnection.h - plugin.h - plugintype.h - signalplugin.h - abstractplugin.h - plugininstantiatormodel.h - plugindefinition.h - pluginmanager.h - attachableframe.h - windowmanager.h - windowdefinition.h - frameattachmentpoint.h - aboutdialog.h - treeitem.h - numberedactionreceiver.h - guisettings_pluginsettings.h - guisettings_simulationsettings.h - namedactionreceiver.h - matrixwidget.h - toolseparatorbutton.h - vector3widget.h - vector4widget.h - vector2x3widget.h - typedlineedit.h - libraryloader.h - carbon.h - settingsdialog.h - settingswidget.h - plugindialog.h - settings.h - setupdialog.h - abstractcommandqueue.h - guisimcontrol.h - isimcontrol.h - sparkcontext.h - simspark.h - sparkproperty.h - sparkpropertycontrolbasic.h - sparkpropertydata.h - sparkpropertytablewidget.h - abstractcommand.h - sparkcontroller.h - sparkcommands.h - sparkcommandqueue.h - sparktreemodel.h - sparktreeview.h - sparkpropertylist.h - sparkpropertywidget.h - sparkpropertycontrol.h - sparkpropertyexecuter.h - sparkpropertymanager.h - inputqt.h - glwidget.h - openglmanager.h - topicregistration.h - communicationmanager.h - topic.h - ) - -set(carbon_SOURCES - cutelogger/abstractappender.cpp - cutelogger/abstractstringappender.cpp - cutelogger/consoleappender.cpp - cutelogger/debugappender.cpp - cutelogger/fileappender.cpp - cutelogger/functionappender.cpp - cutelogger/imessagereceiver.cpp - cutelogger/logger.cpp - cutelogger/logmessage.cpp - cutelogger/logstream.cpp - cutelogger/logstreambuffer.cpp - cutelogger/messageobjectappender.cpp - cutelogger/messagereceiverappender.cpp - pluginthread.cpp - process.cpp - sparkprocess.cpp - simulationprocess.cpp - serverthread.cpp - simulationmanager.cpp - simulationsetup.cpp - simulation.cpp - simulationtask.cpp - simulationthread.cpp - sparksimulationthread.cpp - taskdefinition.cpp - menumanager.cpp - menuobject.cpp - menuobjectcall.cpp - menuobjectconnection.cpp - menuobjectfile.cpp - menuobjectmenu.cpp - menuobjectmenuaction.cpp - menuobjecttoolbar.cpp - abstractplugin.cpp - attachableframe.cpp - plugininstantiatormodel.cpp - plugindefinition.cpp - plugin.cpp - pluginmanager.cpp - plugintype.cpp - signalplugin.cpp - frameattachmentpoint.cpp - windowdefinition.cpp - windowmanager.cpp - aboutdialog.cpp - guisettings_pluginsettings.cpp - matrixwidget.cpp - namedactionreceiver.cpp - guisettings_simulationsettings.cpp - numberedactionreceiver.cpp - toolseparatorbutton.cpp - treeitem.cpp - typedlineedit.cpp - vector2x3widget.cpp - vector3widget.cpp - vector4widget.cpp - libraryloader.cpp - carbon.cpp - plugindialog.cpp - settings.cpp - settingsdialog.cpp - settingswidget.cpp - setupdialog.cpp - abstractcommand.cpp - abstractcommandqueue.cpp - guisimcontrol.cpp - guisimcontrol_c.cpp - isimcontrol.cpp - sparkcontext.cpp - sparkcontroller.cpp - sparkcommandqueue.cpp - sparkcommands.cpp - simspark.cpp - sparkproperty.cpp - sparkpropertycontrol.cpp - sparkpropertycontrolbasic.cpp - sparkpropertydata.cpp - sparkpropertyexecuter.cpp - sparkpropertylist.cpp - sparkpropertymanager.cpp - sparkpropertytablewidget.cpp - sparkpropertywidget.cpp - sparktreemodel.cpp - sparktreeview.cpp - glwidget.cpp - inputqt.cpp - openglmanager.cpp - communicationmanager.cpp - topic.cpp - topicregistration.cpp - ) - -set(carbon_FORMS - guisettings_simulationsettings.ui - matrixwidget.ui - guisettings_pluginsettings.ui - about.ui - plugindialog.ui - settingsdialog.ui - setupdialog.ui - sparkpropertywidget.ui - vector3widget.ui - vector4widget.ui - ) - -set(carbon_RESOURCES - imageresources.qrc - ) - -########### Qt properties ############### - -#Additional used libraries -set(QT_USE_QTOPENGL TRUE) -set(QT_USE_QTXML TRUE) - -#Include qt properties -include(${QT_USE_FILE}) -add_definitions(${QT_DEFINITIONS}) - -########### includes and library creation ############### - -#Meta object compiler wrapping of header files, forms and resources -QT4_WRAP_CPP(carbon_QOBJECT_HEADERS_MOC ${carbon_QOBJECT_HEADERS}) -QT4_WRAP_UI(carbon_FORMS_HEADERS ${carbon_FORMS}) -QT4_ADD_RESOURCES(carbon_RESOURCES_RCC ${carbon_RESOURCES}) - -include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/lib - ${CMAKE_SOURCE_DIR}/utility - ${CMAKE_CURRENT_SOURCE_DIR} - ${FREETYPE_INCLUDE_DIRS} - ${IL_INCLUDE_DIR} - ${OPENGL_INCLUDE_DIR} - ${CMAKE_CURRENT_BINARY_DIR}) #intermediate directory - -add_library(carbon - ${carbon_SOURCES} - ${carbon_QOBJECT_HEADERS_MOC} - ${carbon_HEADERS} - ${carbon_FORMS_HEADERS} - ${carbon_RESOURCES_RCC} - ) - -target_link_libraries(carbon - ${FREETYPE_LIBRARIES} - ${IL_LIBRARIES} - ${OPENGL_LIBRARIES} - ${QT_LIBRARIES} - spark salt zeitgeist oxygen kerosin - ) - -add_definitions(-D_SCL_SECURE_NO_WARNINGS) - -set_target_properties(carbon PROPERTIES VERSION ${CARBON_VERSION} - SOVERSION ${CARBON_SO_VERSION} DEBUG_POSTFIX _debug) -install(TARGETS carbon DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) - -#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/carbon-config.in ${CMAKE_CURRENT_BINARY_DIR}/carbon-config) - -########### install files ############### - -#install header files from actual directory -install(DIRECTORY ./ - DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/carbon - FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE) - -#install generated header files (ui_*.h files) -install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ - DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/carbon - FILES_MATCHING PATTERN "*.h" - PATTERN ".svn" EXCLUDE - PATTERN "carbon.dir" EXCLUDE - PATTERN "CMakeFiles" EXCLUDE - PATTERN "Debug" EXCLUDE - PATTERN "Release" EXCLUDE) +########### moc target files ############### +set(carbon_QOBJECT_HEADERS + cutelogger/imessagereceiver.h + process.h + pluginthread.h + simulationprocess.h + simulationmanager.h + serverthread.h + signalplugin.h + simulationsetup.h + simulation.h + simulationthread.h + sparksimulationthread.h + simulationtask.h + taskdefinition.h + menumanager.h + menuobjectconnection.h + plugininstantiatormodel.h + plugindefinition.h + pluginmanager.h + attachableframe.h + windowdefinition.h + frameattachmentpoint.h + numberedactionreceiver.h + guisettings_pluginsettings.h + guisettings_simulationsettings.h + namedactionreceiver.h + matrixwidget.h + toolseparatorbutton.h + vector3widget.h + vector4widget.h + vector2x3widget.h + typedlineedit.h + carbon.h + settingsdialog.h + settingswidget.h + plugindialog.h + settings.h + setupdialog.h + abstractcommand.h + sparkcontroller.h + sparkcommands.h + sparktreemodel.h + sparktreeview.h + sparkpropertylist.h + sparkpropertywidget.h + sparkpropertycontrol.h + sparkpropertyexecuter.h + sparkpropertymanager.h + glwidget.h + openglmanager.h + communicationmanager.h + topic.h + ) + +set(carbon_HEADERS + cutelogger/abstractappender.h + cutelogger/abstractstringappender.h + cutelogger/consoleappender.h + cutelogger/debugappender.h + cutelogger/fileappender.h + cutelogger/functionappender.h + cutelogger/logger.h + cutelogger/logmessage.h + cutelogger/logstream.h + cutelogger/logstreambuffer.h + cutelogger/messageobjectappender.h + cutelogger/messagereceiverappender.h + cutelogger/imessagereceiver.h + sparkprocess.h + process.h + pluginthread.h + simulationprocess.h + simulationmanager.h + serverthread.h + simulationsetup.h + simulation.h + simulationthread.h + sparksimulationthread.h + simulationtask.h + taskdefinition.h + menuobject.h + menuobjectcall.h + menuobjectfile.h + menuobjectmenu.h + menuobjectmenuaction.h + menuobjecttoolbar.h + menumanager.h + menuobjectconnection.h + plugin.h + plugintype.h + signalplugin.h + abstractplugin.h + plugininstantiatormodel.h + plugindefinition.h + pluginmanager.h + attachableframe.h + windowmanager.h + windowdefinition.h + frameattachmentpoint.h + aboutdialog.h + treeitem.h + numberedactionreceiver.h + guisettings_pluginsettings.h + guisettings_simulationsettings.h + namedactionreceiver.h + matrixwidget.h + toolseparatorbutton.h + vector3widget.h + vector4widget.h + vector2x3widget.h + typedlineedit.h + libraryloader.h + carbon.h + settingsdialog.h + settingswidget.h + plugindialog.h + settings.h + setupdialog.h + abstractcommandqueue.h + guisimcontrol.h + isimcontrol.h + sparkcontext.h + simspark.h + sparkproperty.h + sparkpropertycontrolbasic.h + sparkpropertydata.h + sparkpropertytablewidget.h + abstractcommand.h + sparkcontroller.h + sparkcommands.h + sparkcommandqueue.h + sparktreemodel.h + sparktreeview.h + sparkpropertylist.h + sparkpropertywidget.h + sparkpropertycontrol.h + sparkpropertyexecuter.h + sparkpropertymanager.h + inputqt.h + glwidget.h + openglmanager.h + topicregistration.h + communicationmanager.h + topic.h + ) + +set(carbon_SOURCES + cutelogger/abstractappender.cpp + cutelogger/abstractstringappender.cpp + cutelogger/consoleappender.cpp + cutelogger/debugappender.cpp + cutelogger/fileappender.cpp + cutelogger/functionappender.cpp + cutelogger/imessagereceiver.cpp + cutelogger/logger.cpp + cutelogger/logmessage.cpp + cutelogger/logstream.cpp + cutelogger/logstreambuffer.cpp + cutelogger/messageobjectappender.cpp + cutelogger/messagereceiverappender.cpp + pluginthread.cpp + process.cpp + sparkprocess.cpp + simulationprocess.cpp + serverthread.cpp + simulationmanager.cpp + simulationsetup.cpp + simulation.cpp + simulationtask.cpp + simulationthread.cpp + sparksimulationthread.cpp + taskdefinition.cpp + menumanager.cpp + menuobject.cpp + menuobjectcall.cpp + menuobjectconnection.cpp + menuobjectfile.cpp + menuobjectmenu.cpp + menuobjectmenuaction.cpp + menuobjecttoolbar.cpp + abstractplugin.cpp + attachableframe.cpp + plugininstantiatormodel.cpp + plugindefinition.cpp + plugin.cpp + pluginmanager.cpp + plugintype.cpp + signalplugin.cpp + frameattachmentpoint.cpp + windowdefinition.cpp + windowmanager.cpp + aboutdialog.cpp + guisettings_pluginsettings.cpp + matrixwidget.cpp + namedactionreceiver.cpp + guisettings_simulationsettings.cpp + numberedactionreceiver.cpp + toolseparatorbutton.cpp + treeitem.cpp + typedlineedit.cpp + vector2x3widget.cpp + vector3widget.cpp + vector4widget.cpp + libraryloader.cpp + carbon.cpp + plugindialog.cpp + settings.cpp + settingsdialog.cpp + settingswidget.cpp + setupdialog.cpp + abstractcommand.cpp + abstractcommandqueue.cpp + guisimcontrol.cpp + guisimcontrol_c.cpp + isimcontrol.cpp + sparkcontext.cpp + sparkcontroller.cpp + sparkcommandqueue.cpp + sparkcommands.cpp + simspark.cpp + sparkproperty.cpp + sparkpropertycontrol.cpp + sparkpropertycontrolbasic.cpp + sparkpropertydata.cpp + sparkpropertyexecuter.cpp + sparkpropertylist.cpp + sparkpropertymanager.cpp + sparkpropertytablewidget.cpp + sparkpropertywidget.cpp + sparktreemodel.cpp + sparktreeview.cpp + glwidget.cpp + inputqt.cpp + openglmanager.cpp + communicationmanager.cpp + topic.cpp + topicregistration.cpp + ) + +set(carbon_FORMS + guisettings_simulationsettings.ui + matrixwidget.ui + guisettings_pluginsettings.ui + about.ui + plugindialog.ui + settingsdialog.ui + setupdialog.ui + sparkpropertywidget.ui + vector3widget.ui + vector4widget.ui + ) + +set(carbon_RESOURCES + imageresources.qrc + ) + +########### Qt properties ############### + +#Additional used libraries +set(QT_USE_QTOPENGL TRUE) +set(QT_USE_QTXML TRUE) + +#Include qt properties +include(${QT_USE_FILE}) +add_definitions(${QT_DEFINITIONS}) + +########### includes and library creation ############### + +#Meta object compiler wrapping of header files, forms and resources +QT4_WRAP_CPP(carbon_QOBJECT_HEADERS_MOC ${carbon_QOBJECT_HEADERS}) +QT4_WRAP_UI(carbon_FORMS_HEADERS ${carbon_FORMS}) +QT4_ADD_RESOURCES(carbon_RESOURCES_RCC ${carbon_RESOURCES}) + +include_directories( + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib + ${CMAKE_SOURCE_DIR}/utility + ${CMAKE_CURRENT_SOURCE_DIR} + ${FREETYPE_INCLUDE_DIRS} + ${IL_INCLUDE_DIR} + ${OPENGL_INCLUDE_DIR} + ${CMAKE_CURRENT_BINARY_DIR}) #intermediate directory + +add_library(carbon + ${carbon_SOURCES} + ${carbon_QOBJECT_HEADERS_MOC} + ${carbon_HEADERS} + ${carbon_FORMS_HEADERS} + ${carbon_RESOURCES_RCC} + ) + +target_link_libraries(carbon + ${FREETYPE_LIBRARIES} + ${IL_LIBRARIES} + ${OPENGL_LIBRARIES} + ${QT_LIBRARIES} + spark salt zeitgeist oxygen kerosin + ) + +add_definitions(-D_SCL_SECURE_NO_WARNINGS) + +set_target_properties(carbon PROPERTIES VERSION ${CARBON_VERSION} + SOVERSION ${CARBON_SO_VERSION} DEBUG_POSTFIX _debug) +install(TARGETS carbon DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) + +#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/carbon-config.in ${CMAKE_CURRENT_BINARY_DIR}/carbon-config) + +########### install files ############### + +#install header files from actual directory +install(DIRECTORY ./ + DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/carbon + FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE) + +#install generated header files (ui_*.h files) +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ + DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/carbon + FILES_MATCHING PATTERN "*.h" + PATTERN ".svn" EXCLUDE + PATTERN "carbon.dir" EXCLUDE + PATTERN "CMakeFiles" EXCLUDE + PATTERN "Debug" EXCLUDE + PATTERN "Release" EXCLUDE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2014-05-13 15:21:16
|
Revision: 373 http://sourceforge.net/p/simspark/svn/373 Author: hedayat Date: 2014-05-13 15:21:12 +0000 (Tue, 13 May 2014) Log Message: ----------- Fix compatibility with recent Boost versions Modified Paths: -------------- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp branches/gui-bullet/spark/carbon/libraryloader.cpp branches/gui-bullet/spark/carbon/simspark.cpp branches/gui-bullet/spark/carbon/simulation.cpp branches/gui-bullet/spark/carbon/simulationmanager.cpp branches/gui-bullet/spark/carbon/sparkcommands.cpp branches/gui-bullet/spark/carbon/sparkcontroller.cpp branches/gui-bullet/spark/carbon/sparkpropertycontrolbasic.cpp branches/gui-bullet/spark/carbon/sparkpropertymanager.cpp branches/gui-bullet/spark/carbon/sparkpropertywidget.cpp branches/gui-bullet/spark/carbon/sparksimulationthread.cpp branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglrender.cpp branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe.cpp branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_scenegraphwidget.cpp branches/gui-bullet/spark/guiplugin/setupframe/setupframe.cpp branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe.cpp Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -270,10 +270,10 @@ } SimSpark* spark = &*mSparkController->getSpark(); - boost::shared_ptr<GameControlServer> gameControl(shared_dynamic_cast<GameControlServer>(spark->GetCore()->Get(gameControlServer.toStdString()))); - boost::shared_ptr<GameStateAspect> gameState (shared_dynamic_cast<GameStateAspect> (spark->GetCore()->Get(gameStateAspect.toStdString()))); - boost::shared_ptr<SoccerRuleAspect> soccerRule (shared_dynamic_cast<SoccerRuleAspect> (spark->GetCore()->Get(soccerRuleAspect.toStdString()))); - boost::shared_ptr<BallStateAspect> ballState (shared_dynamic_cast<BallStateAspect> (spark->GetCore()->Get(ballStateAspect.toStdString()))); + boost::shared_ptr<GameControlServer> gameControl(dynamic_pointer_cast<GameControlServer>(spark->GetCore()->Get(gameControlServer.toStdString()))); + boost::shared_ptr<GameStateAspect> gameState (dynamic_pointer_cast<GameStateAspect> (spark->GetCore()->Get(gameStateAspect.toStdString()))); + boost::shared_ptr<SoccerRuleAspect> soccerRule (dynamic_pointer_cast<SoccerRuleAspect> (spark->GetCore()->Get(soccerRuleAspect.toStdString()))); + boost::shared_ptr<BallStateAspect> ballState (dynamic_pointer_cast<BallStateAspect> (spark->GetCore()->Get(ballStateAspect.toStdString()))); bool success = true; if (!gameControl.get()) Modified: branches/gui-bullet/spark/carbon/libraryloader.cpp =================================================================== --- branches/gui-bullet/spark/carbon/libraryloader.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/carbon/libraryloader.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -451,7 +451,7 @@ else { LOG_INFO() << "Failed to access export plugin function in library " << lib.mLibrary->fileName() << ": " << lib.mLibrary->errorString().toStdString().c_str(); - return false; + return 0; } //Set exported flag Modified: branches/gui-bullet/spark/carbon/simspark.cpp =================================================================== --- branches/gui-bullet/spark/carbon/simspark.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/carbon/simspark.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -281,7 +281,7 @@ std::string pathStr; path.GetString(pathStr); boost::shared_ptr<zeitgeist::Leaf> leaf(GetCore()->Get(pathStr)); - boost::shared_ptr<oxygen::Scene> scene = boost::shared_ptr<oxygen::Scene>(boost::shared_static_cast<oxygen::Scene>(leaf)); + boost::shared_ptr<oxygen::Scene> scene = boost::shared_ptr<oxygen::Scene>(boost::static_pointer_cast<oxygen::Scene>(leaf)); boost::shared_ptr<oxygen::World> world; boost::shared_ptr<oxygen::Space> space; @@ -289,7 +289,7 @@ { if (it->get()->GetName().compare("world") == 0) { - world = boost::shared_static_cast<oxygen::World>(*it); + world = boost::static_pointer_cast<oxygen::World>(*it); scene->RemoveChildReference(*it); break; } @@ -298,13 +298,13 @@ { if (it->get()->GetName().compare("space") == 0) { - space = boost::shared_static_cast<oxygen::Space>(*it); + space = boost::static_pointer_cast<oxygen::Space>(*it); scene->RemoveChildReference(*it); break; } } - //boost::shared_ptr<oxygen::GameControlServer> gc = boost::shared_static_cast<oxygen::GameControlServer>(GetCore()->Get("/sys/server/gamecontrol/")); + //boost::shared_ptr<oxygen::GameControlServer> gc = boost::static_pointer_cast<oxygen::GameControlServer>(GetCore()->Get("/sys/server/gamecontrol/")); //boost::shared_ptr<zeitgeist::Leaf> gc_state = gc->GetChild("GameStateAspect"); //boost::shared_ptr<zeitgeist::Leaf> gc_ball = gc->GetChild("BallStateAspect"); //boost::shared_ptr<zeitgeist::Leaf> gc_rule = gc->GetChild("SoccerRuleAspect"); @@ -316,7 +316,7 @@ //gc_rule.reset(); //gc.reset(); - boost::shared_ptr<zeitgeist::Node> root = boost::shared_static_cast<zeitgeist::Node>(GetCore()->GetRoot()); + boost::shared_ptr<zeitgeist::Node> root = boost::static_pointer_cast<zeitgeist::Node>(GetCore()->GetRoot()); boost::shared_ptr<zeitgeist::Leaf> root_leaf(GetCore()->GetRoot()); scene->UnlinkChildren(); Modified: branches/gui-bullet/spark/carbon/simulation.cpp =================================================================== --- branches/gui-bullet/spark/carbon/simulation.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/carbon/simulation.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -279,7 +279,7 @@ { //Do not stop the main spark server if not explicitly ordered to, reset it instead skipServer = true; - shared_dynamic_cast<SparkSimulationThread>(*it)->reset(); + dynamic_pointer_cast<SparkSimulationThread>(*it)->reset(); } else*/ { @@ -706,7 +706,7 @@ } - task = shared_ptr<SimulationTask>(shared_dynamic_cast<SimulationTask>(server)); + task = shared_ptr<SimulationTask>(dynamic_pointer_cast<SimulationTask>(server)); } else { @@ -742,7 +742,7 @@ if (taskDefinition->getType() == TaskDefinition::TT_SERVERTHREAD) { - emit serverCreated(shared_static_cast<ServerThread>(task)); + emit serverCreated(static_pointer_cast<ServerThread>(task)); } //If a existing spark server reinitialized, leave it paused. Otherwise initialize the task. Modified: branches/gui-bullet/spark/carbon/simulationmanager.cpp =================================================================== --- branches/gui-bullet/spark/carbon/simulationmanager.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/carbon/simulationmanager.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -658,7 +658,7 @@ QString abs = entries.at(i).absoluteFilePath(); LOG_DEBUG() << "Loading contained Setup Definition file " << abs; - bool success = loadSimulationSetup(abs, false); + bool success = static_cast<bool>(loadSimulationSetup(abs, false)); if (!success) LOG_WARNING() << "Loading contained Setup Definition " << abs << " failed."; } Modified: branches/gui-bullet/spark/carbon/sparkcommands.cpp =================================================================== --- branches/gui-bullet/spark/carbon/sparkcommands.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/carbon/sparkcommands.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -121,7 +121,7 @@ } boost::shared_ptr<oxygen::SceneImporter> sceneImporter = - boost::shared_static_cast<oxygen::SceneImporter>(getController()->getSpark()->GetCore()->Get("sys/server/scene/RubySceneImporter")); + boost::static_pointer_cast<oxygen::SceneImporter>(getController()->getSpark()->GetCore()->Get("sys/server/scene/RubySceneImporter")); sceneImporter->SetSceneDict(&oxygen::SceneDict::GetInstance()); if (sceneImporter.get() == 0) { Modified: branches/gui-bullet/spark/carbon/sparkcontroller.cpp =================================================================== --- branches/gui-bullet/spark/carbon/sparkcontroller.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/carbon/sparkcontroller.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -301,7 +301,7 @@ //Initialize SimControl node and store weak ptr boost::shared_ptr<zeitgeist::Leaf> leaf( mSpark->GetCore()->CreateContext()->New("gui/GuiSimControl", "sys/server/simulation/GuiControl")); - mSimControl = boost::weak_ptr<GuiSimControl>(boost::shared_dynamic_cast<GuiSimControl>(leaf)); + mSimControl = boost::weak_ptr<GuiSimControl>(boost::dynamic_pointer_cast<GuiSimControl>(leaf)); //Init Command queue initCommandQueue(); Modified: branches/gui-bullet/spark/carbon/sparkpropertycontrolbasic.cpp =================================================================== --- branches/gui-bullet/spark/carbon/sparkpropertycontrolbasic.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/carbon/sparkpropertycontrolbasic.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -57,7 +57,7 @@ list.push_back(boost::shared_ptr<Property>(new Property(leaf, descriptor, NAME, QObject::tr(CAPTION), DATA, true, VALIDATOR, ##__VA_ARGS__))) #define SET_VALUE(DATAPTR) setPropertyValueProtected(prop, DATAPTR) -#define GET_VALUE(TYPE) boost::shared_static_cast<const TYPE>(prop.getTempValue())->mValue +#define GET_VALUE(TYPE) boost::static_pointer_cast<const TYPE>(prop.getTempValue())->mValue #define FORMAT_FLAG(VALUE, FLAG)\ QString((VALUE & FLAG) ? QString(#FLAG" ") : QString("")) @@ -351,7 +351,7 @@ bool BasicControl::updateClass(TLeafPtr leaf, Property& prop) const { - const Class& cl = *shared_static_cast<Class>(leaf); + const Class& cl = *static_pointer_cast<Class>(leaf); if (prop.getName().compare("GetBundle") == 0) { @@ -401,14 +401,14 @@ bool BasicControl::genBaseNode(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const { - boost::shared_ptr<BaseNode> baseNode = boost::shared_static_cast<BaseNode>(leaf); + boost::shared_ptr<BaseNode> baseNode = boost::static_pointer_cast<BaseNode>(leaf); ADD_READ_PROPERTY("GetWorldBoundingBox", "WorldBoundingBox", new DAABB3()); return true; } bool BasicControl::updateBaseNode(TLeafPtr leaf, Property& prop) const { - boost::shared_ptr<BaseNode> baseNode = boost::shared_static_cast<BaseNode>(leaf); + boost::shared_ptr<BaseNode> baseNode = boost::static_pointer_cast<BaseNode>(leaf); if (prop.getName().compare("GetWorldBoundingBox") == 0) {SET_VALUE(new DAABB3(baseNode->GetWorldBoundingBox()));} else return false; //Getter not supported return true; @@ -425,7 +425,7 @@ bool BasicControl::genTransform(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const { - const Transform& trans = *shared_static_cast<Transform>(leaf); + const Transform& trans = *static_pointer_cast<Transform>(leaf); ADD_READ_PROPERTY("GetChangedMark" , "ChangedMark", new DInt()); ADD_READWRITE_PROPERTY("GetLocalTransform", "LocalTransform", new DMat4x4(), Data::doubleMatrixValidator(), QObject::tr("Local transformation matrix")); ADD_READWRITE_PROPERTY("GetWorldTransform", "WorldTransform", new DMat4x4(), Data::doubleMatrixValidator(), QObject::tr("World transformation matrix")); @@ -434,7 +434,7 @@ bool BasicControl::updateTransform(TLeafPtr leaf, Property& prop) const { - const Transform& trans = *shared_static_cast<Transform>(leaf); + const Transform& trans = *static_pointer_cast<Transform>(leaf); if (prop.getName().compare("GetChangedMark") == 0) {SET_VALUE(new DInt(trans.GetChangedMark()));} else if (prop.getName().compare("GetLocalTransform") == 0) {SET_VALUE(new DMat4x4(trans.GetLocalTransform()));} else if (prop.getName().compare("GetWorldTransform") == 0) {SET_VALUE(new DMat4x4(trans.GetWorldTransform()));} @@ -444,7 +444,7 @@ bool BasicControl::applyChangeTransform(TLeafPtr leaf, Property& prop) const { - Transform& trans = *shared_static_cast<Transform>(leaf); + Transform& trans = *static_pointer_cast<Transform>(leaf); //Supported setters if (prop.getName().compare("GetLocalTransform") == 0) {trans.SetLocalTransform(GET_VALUE(DMat4x4));} else if (prop.getName().compare("GetWorldTransform") == 0) {trans.SetWorldTransform(GET_VALUE(DMat4x4));} @@ -457,7 +457,7 @@ bool BasicControl::genRigidBody(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const { - const RigidBody& body = *shared_static_cast<RigidBody>(leaf); + const RigidBody& body = *static_pointer_cast<RigidBody>(leaf); ADD_READWRITE_PROPERTY("GetMass", "Mass", new DFloat (), Data::doubleValidator(0)); ADD_READWRITE_PROPERTY("GetVelocity", "Velocity", new DVector3f(), Data::vector3fValidator()); ADD_READWRITE_PROPERTY("GetAngularVelocity", "AngularVelocity", new DVector3f(), Data::vector3fValidator()); @@ -467,7 +467,7 @@ bool BasicControl::updateRigidBody(TLeafPtr leaf, Property& prop) const { - const RigidBody& body = *shared_static_cast<RigidBody>(leaf); + const RigidBody& body = *static_pointer_cast<RigidBody>(leaf); if (prop.getName().compare("GetMass") == 0) {SET_VALUE(new DFloat (body.GetMass()) );} else if (prop.getName().compare("GetVelocity") == 0) {SET_VALUE(new DVector3f(body.GetVelocity()) );} else if (prop.getName().compare("GetAngularVelocity") == 0) {SET_VALUE(new DVector3f(body.GetAngularVelocity()));} @@ -478,7 +478,7 @@ bool BasicControl::applyChangeRigidBody(TLeafPtr leaf, Property& prop) const { - RigidBody& body = *shared_static_cast<RigidBody>(leaf); + RigidBody& body = *static_pointer_cast<RigidBody>(leaf); if (prop.getName().compare("GetMass") == 0) {body.SetMass (GET_VALUE(DFloat));} else if (prop.getName().compare("GetVelocity") == 0) {body.SetVelocity (GET_VALUE(DVector3f));} else if (prop.getName().compare("GetAngularVelocity") == 0) {body.SetAngularVelocity(GET_VALUE(DVector3f));} @@ -527,7 +527,7 @@ bool BasicControl::updateJoint(TLeafPtr leaf, Property& prop) const { - const Joint& joint = *shared_static_cast<Joint>(leaf); + const Joint& joint = *static_pointer_cast<Joint>(leaf); if (prop.getName().compare("FeedBackEnabled") == 0) {SET_VALUE(new DFloat(joint.FeedBackEnabled()));} else { @@ -570,7 +570,7 @@ bool BasicControl::genHingeJoint(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const { - const HingeJoint& hinge = *shared_static_cast<HingeJoint>(leaf); + const HingeJoint& hinge = *static_pointer_cast<HingeJoint>(leaf); ADD_READ_PROPERTY("GetAngle", "Angle", new DFloat()); //todo ADD_READ_PROPERTY("GetAngleRate", "AngleRate", new DFloat()); //todo return true; @@ -578,7 +578,7 @@ bool BasicControl::updateHingeJoint(TLeafPtr leaf, Property& prop) const { - const HingeJoint& hinge = *shared_static_cast<HingeJoint>(leaf); + const HingeJoint& hinge = *static_pointer_cast<HingeJoint>(leaf); if (prop.getName().compare("GetAngle") == 0) {SET_VALUE(new DFloat(hinge.GetAngle()));} else if (prop.getName().compare("GetAngleRate") == 0) {SET_VALUE(new DFloat(hinge.GetAngleRate()));} else return false; //Getter not supported @@ -596,7 +596,7 @@ bool BasicControl::genUniversalJoint(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const { - const UniversalJoint& univ = *shared_static_cast<UniversalJoint>(leaf); + const UniversalJoint& univ = *static_pointer_cast<UniversalJoint>(leaf); ADD_READ_PROPERTY("GetAngle(0)", "Angle(0)", new DFloat()); //todo ADD_READ_PROPERTY("GetAngle(1)", "Angle(1)", new DFloat()); //todo ADD_READ_PROPERTY("GetAngleRate(0)", "AngleRate(0)", new DFloat()); //todo @@ -606,7 +606,7 @@ bool BasicControl::updateUniversalJoint(TLeafPtr leaf, Property& prop) const { - const UniversalJoint& univ = *shared_static_cast<UniversalJoint>(leaf); + const UniversalJoint& univ = *static_pointer_cast<UniversalJoint>(leaf); if (prop.getName().compare("GetAngle(0)") == 0) {SET_VALUE(new DFloat(univ.GetAngle(Joint::AI_FIRST)));} else if (prop.getName().compare("GetAngle(1)") == 0) {SET_VALUE(new DFloat(univ.GetAngle(Joint::AI_SECOND)));} else if (prop.getName().compare("GetAngleRate(0)") == 0) {SET_VALUE(new DFloat(univ.GetAngleRate(Joint::AI_FIRST)));} @@ -626,7 +626,7 @@ bool BasicControl::genContactJointHandler(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const { - const ContactJointHandler& cjh = *shared_static_cast<ContactJointHandler>(leaf); + const ContactJointHandler& cjh = *static_pointer_cast<ContactJointHandler>(leaf); ADD_READ_PROPERTY ("GetContactMode", "ContactMode", new DString()); ADD_READWRITE_PROPERTY("GetBounceValue", "BounceValue", new DFloat(), Data::doubleValidator()); ADD_READWRITE_PROPERTY("GetMinBounceVel", "MinBounceVel", new DFloat(), Data::doubleValidator()); @@ -640,7 +640,7 @@ bool BasicControl::updateContactJointHandler(TLeafPtr leaf, Property& prop) const { - const ContactJointHandler& cjh = *shared_static_cast<ContactJointHandler>(leaf); + const ContactJointHandler& cjh = *static_pointer_cast<ContactJointHandler>(leaf); if (prop.getName().compare("GetContactMode" ) == 0) { @@ -675,7 +675,7 @@ bool BasicControl::applyChangeContactJointHandler(TLeafPtr leaf, Property& prop) const { - ContactJointHandler& cjh = *shared_static_cast<ContactJointHandler>(leaf); + ContactJointHandler& cjh = *static_pointer_cast<ContactJointHandler>(leaf); //Supported setters if (prop.getName().compare("GetBounceValue") == 0) {cjh.SetBounceValue (GET_VALUE(DFloat));} @@ -692,7 +692,7 @@ bool BasicControl::genWorld(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const { - const World& world = *shared_static_cast<World>(leaf); + const World& world = *static_pointer_cast<World>(leaf); ADD_READWRITE_PROPERTY("GetGravity", "Gravity", new DVector3f(), Data::vector3fValidator(), "Gravity Vector"); ADD_READWRITE_PROPERTY("GetERP", "ERP", new DFloat(), Data::doubleValidator(0.0, 1.0), @@ -708,7 +708,7 @@ bool BasicControl::updateWorld(TLeafPtr leaf, Property& prop) const { - const World& world = *shared_static_cast<World>(leaf); + const World& world = *static_pointer_cast<World>(leaf); if (prop.getName().compare("GetGravity") == 0) {SET_VALUE(new DVector3f(world.GetGravity()));} else if (prop.getName().compare("GetERP") == 0) {SET_VALUE(new DFloat (world.GetERP()));} else if (prop.getName().compare("GetCFM") == 0) {SET_VALUE(new DFloat (world.GetCFM()));} @@ -718,7 +718,7 @@ bool BasicControl::applyChangeWorld(TLeafPtr leaf, Property& prop) const { - World& world = *shared_static_cast<World>(leaf); + World& world = *static_pointer_cast<World>(leaf); if (prop.getName().compare("GetGravity") == 0) {world.SetGravity(GET_VALUE(DVector3f));} else if (prop.getName().compare("GetERP") == 0) {world.SetERP (GET_VALUE(DFloat));} else if (prop.getName().compare("GetCFM") == 0) {world.SetCFM (GET_VALUE(DFloat));} @@ -731,14 +731,14 @@ bool BasicControl::genCollisionHandler(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const { - boost::shared_ptr<CollisionHandler> ch = shared_static_cast<CollisionHandler>(leaf); + boost::shared_ptr<CollisionHandler> ch = static_pointer_cast<CollisionHandler>(leaf); ADD_READ_PROPERTY("IsSymmetricHandler", "SymmetricHandler", new DBool()); return true; } bool BasicControl::updateCollisionHandler(TLeafPtr leaf, Property& prop) const { - boost::shared_ptr<CollisionHandler> ch = shared_static_cast<CollisionHandler>(leaf); + boost::shared_ptr<CollisionHandler> ch = static_pointer_cast<CollisionHandler>(leaf); if (prop.getName().compare("IsSymmetricHandler") == 0) {SET_VALUE(new DBool(ch->IsSymmetricHandler()));} else return false; //Getter not supported return true; @@ -755,7 +755,7 @@ bool BasicControl::genDragController(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const { - const DragController& dc = *shared_static_cast<DragController>(leaf); + const DragController& dc = *static_pointer_cast<DragController>(leaf); ADD_READWRITE_PROPERTY("GetLinearDrag", "LinearDrag", new DFloat(dc.GetLinearDrag()), Data::doubleValidator()); ADD_READWRITE_PROPERTY("GetAngularDrag", "AngularDrag", new DFloat(dc.GetAngularDrag()), Data::doubleValidator()); return true; @@ -763,7 +763,7 @@ bool BasicControl::updateDragController(TLeafPtr leaf, Property& prop) const { - const DragController& dc = *shared_static_cast<DragController>(leaf); + const DragController& dc = *static_pointer_cast<DragController>(leaf); if (prop.getName().compare("GetLinearDrag") == 0) {SET_VALUE(new DFloat(dc.GetLinearDrag()));} else if (prop.getName().compare("GetAngularDrag") == 0) {SET_VALUE(new DFloat(dc.GetAngularDrag()));} else return false; //Getter not supported @@ -772,7 +772,7 @@ bool BasicControl::applyChangeDragController(TLeafPtr leaf, Property& prop) const { - DragController& dc = *shared_static_cast<DragController>(leaf); + DragController& dc = *static_pointer_cast<DragController>(leaf); if (prop.getName().compare("GetLinearDrag") == 0) {dc.SetLinearDrag (GET_VALUE(DFloat));} else if (prop.getName().compare("GetAngularDrag") == 0) {dc.SetAngularDrag(GET_VALUE(DFloat));} else return false; //Setter not supported @@ -784,7 +784,7 @@ bool BasicControl::genMaterialSolid(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const { - const MaterialSolid& mat = *shared_static_cast<MaterialSolid>(leaf); + const MaterialSolid& mat = *static_pointer_cast<MaterialSolid>(leaf); ADD_READWRITE_PROPERTY("GetAmbient", "Ambient", new DRGBA(), Data::rgbaValidator()); ADD_READWRITE_PROPERTY("GetDiffuse", "Diffuse", new DRGBA(), Data::rgbaValidator()); ADD_READWRITE_PROPERTY("GetSpecular", "Specular", new DRGBA(), Data::rgbaValidator()); @@ -793,7 +793,7 @@ bool BasicControl::updateMaterialSolid(TLeafPtr leaf, Property& prop) const { - const MaterialSolid& mat = *shared_static_cast<MaterialSolid>(leaf); + const MaterialSolid& mat = *static_pointer_cast<MaterialSolid>(leaf); if (prop.getName().compare("GetAmbient") == 0) {SET_VALUE(new DRGBA(mat.GetAmbient()));} else if (prop.getName().compare("GetDiffuse") == 0) {SET_VALUE(new DRGBA(mat.GetDiffuse()));} else if (prop.getName().compare("GetSpecular") == 0) {SET_VALUE(new DRGBA(mat.GetSpecular()));} @@ -803,7 +803,7 @@ bool BasicControl::applyChangeMaterialSolid(TLeafPtr leaf, Property& prop) const { - MaterialSolid& mat = *shared_static_cast<MaterialSolid>(leaf); + MaterialSolid& mat = *static_pointer_cast<MaterialSolid>(leaf); //Supported setters if (prop.getName().compare("GetAmbient") == 0) {mat.SetAmbient (GET_VALUE(DRGBA));} else if (prop.getName().compare("GetDiffuse") == 0) {mat.SetDiffuse (GET_VALUE(DRGBA));} Modified: branches/gui-bullet/spark/carbon/sparkpropertymanager.cpp =================================================================== --- branches/gui-bullet/spark/carbon/sparkpropertymanager.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/carbon/sparkpropertymanager.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -265,7 +265,7 @@ std::string basePath = "/classes/" + (*base_it); //Convert base class string to class object - boost::shared_ptr<zeitgeist::Class> base = shared_dynamic_cast<Class> + boost::shared_ptr<zeitgeist::Class> base = dynamic_pointer_cast<Class> (spark->GetCore()->Get(basePath)); if (base.get() == 0) Modified: branches/gui-bullet/spark/carbon/sparkpropertywidget.cpp =================================================================== --- branches/gui-bullet/spark/carbon/sparkpropertywidget.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/carbon/sparkpropertywidget.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -339,20 +339,20 @@ case SparkProperty::DT_BOOL : //no edit window for bool break; case SparkProperty::DT_VEC3F : - vec3 = &boost::shared_static_cast<const DVector3f>(prop->getCurrentValue())->mValue; + vec3 = &boost::static_pointer_cast<const DVector3f>(prop->getCurrentValue())->mValue; ((Vector3Widget*)mPropertyEditWidget)->setVector(vec3->x(), vec3->y(), vec3->z()); break; case SparkProperty::DT_RGBA : - rgba = &boost::shared_static_cast<const DRGBA>(prop->getCurrentValue())->mValue; + rgba = &boost::static_pointer_cast<const DRGBA>(prop->getCurrentValue())->mValue; ((Vector4Widget*)mPropertyEditWidget)->setVector(rgba->r(), rgba->g(), rgba->b(), rgba->a()); break; case SparkProperty::DT_AABB3 : - aabb3 = &boost::shared_static_cast<const DAABB3>(prop->getCurrentValue())->mValue; + aabb3 = &boost::static_pointer_cast<const DAABB3>(prop->getCurrentValue())->mValue; ((Vector2x3Widget*)mPropertyEditWidget)->getWidget1().setVector(aabb3->minVec.x(), aabb3->minVec.y(), aabb3->minVec.z()); ((Vector2x3Widget*)mPropertyEditWidget)->getWidget2().setVector(aabb3->maxVec.x(), aabb3->maxVec.y(), aabb3->maxVec.z()); break; case SparkProperty::DT_MAT4X4: - mat = &boost::shared_static_cast<const DMat4x4>(prop->getCurrentValue())->mValue; + mat = &boost::static_pointer_cast<const DMat4x4>(prop->getCurrentValue())->mValue; ((MatrixWidget*)mPropertyEditWidget)->setMatrix( mat->m[0], mat->m[4], mat->m[ 8], mat->m[12], mat->m[1], mat->m[5], mat->m[ 9], mat->m[13], Modified: branches/gui-bullet/spark/carbon/sparksimulationthread.cpp =================================================================== --- branches/gui-bullet/spark/carbon/sparksimulationthread.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/carbon/sparksimulationthread.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -77,7 +77,7 @@ if (index == -1) LOG_ERROR() << "Current thread not found in SimulationManagers thread list."; else - return boost::shared_static_cast<SparkSimulationThread>(manager->getThreadList().at(index)); + return boost::static_pointer_cast<SparkSimulationThread>(manager->getThreadList().at(index)); } else { Modified: branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglrender.cpp =================================================================== --- branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglrender.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglrender.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -90,7 +90,7 @@ } //Search camera - mCamera = shared_dynamic_cast<Camera> + mCamera = dynamic_pointer_cast<Camera> (mSpark->GetCore()->Get(mCameraPath)); if (mCamera.get() == 0) @@ -100,7 +100,7 @@ } //Search RenderServer - mRenderServer = shared_dynamic_cast<RenderServer> + mRenderServer = dynamic_pointer_cast<RenderServer> (mSpark->GetCore()->Get(mRenderServerPath)); if (mRenderServer.get() == 0) @@ -110,7 +110,7 @@ } //Search RenderControl node - mRenderControl = shared_dynamic_cast<RenderControl> + mRenderControl = dynamic_pointer_cast<RenderControl> (mSpark->GetCore()->Get(mRenderControlPath)); if (mRenderControl.get() == 0) @@ -120,7 +120,7 @@ } //Search SceneServer - mSceneServer = shared_dynamic_cast<SceneServer> + mSceneServer = dynamic_pointer_cast<SceneServer> (mSpark->GetCore()->Get(mSceneServerPath)); if (mSceneServer.get() == 0) Modified: branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe.cpp =================================================================== --- branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -211,8 +211,8 @@ { if (thread->getTaskDefinition().isSpark()) { - connect(boost::shared_static_cast<SparkSimulationThread>(thread).get(), SIGNAL(sparkRunning(SparkController*)), this, SLOT(updateSparkRunning(SparkController*))); - connect(boost::shared_static_cast<SparkSimulationThread>(thread).get(), SIGNAL(sparkFinished(SparkController*)), this, SLOT(updateSparkFinished(SparkController*))); + connect(boost::static_pointer_cast<SparkSimulationThread>(thread).get(), SIGNAL(sparkRunning(SparkController*)), this, SLOT(updateSparkRunning(SparkController*))); + connect(boost::static_pointer_cast<SparkSimulationThread>(thread).get(), SIGNAL(sparkFinished(SparkController*)), this, SLOT(updateSparkFinished(SparkController*))); } } @@ -222,7 +222,7 @@ if (task->getTaskDefinition().isSpark() && task->getTaskDefinition().isThread()) { //Has scene graph - return boost::shared_static_cast<SparkSimulationThread>(task)->getSparkController(); + return boost::static_pointer_cast<SparkSimulationThread>(task)->getSparkController(); } else { @@ -260,7 +260,7 @@ //We can only create scene graph widgets for tasks with scene graph if (task->getTaskDefinition().getType() == TaskDefinition::TT_SERVERTHREAD) { - boost::shared_ptr<SparkSimulationThread> thread(boost::shared_static_cast<SparkSimulationThread>(task)); + boost::shared_ptr<SparkSimulationThread> thread(boost::static_pointer_cast<SparkSimulationThread>(task)); //Create widget SceneGraphFrameUtil::SceneGraphWidget* newWidget = new SceneGraphFrameUtil::SceneGraphWidget(thread, this); @@ -475,7 +475,7 @@ if (getSparkController(currentTask).get() == controller) { //Update current view - mSceneGraphWidgets.at(mCurrentTask)->updateDisplay(boost::shared_static_cast<SparkSimulationThread>(currentTask)); + mSceneGraphWidgets.at(mCurrentTask)->updateDisplay(boost::static_pointer_cast<SparkSimulationThread>(currentTask)); } //Init/update property frame @@ -500,7 +500,7 @@ } //Update scene graph - mSceneGraphWidgets.at(mCurrentTask)->updateDisplay(boost::shared_static_cast<SparkSimulationThread>(updateTask)); + mSceneGraphWidgets.at(mCurrentTask)->updateDisplay(boost::static_pointer_cast<SparkSimulationThread>(updateTask)); } void SceneGraphFrame::updatePropertyFrame() Modified: branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_scenegraphwidget.cpp =================================================================== --- branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_scenegraphwidget.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_scenegraphwidget.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -376,7 +376,7 @@ if (leaf.get() == 0) return false; - boost::shared_ptr<oxygen::BaseNode> bn(boost::shared_dynamic_cast<oxygen::BaseNode>(leaf)); + boost::shared_ptr<oxygen::BaseNode> bn(boost::dynamic_pointer_cast<oxygen::BaseNode>(leaf)); if (bn.get() == 0) { // Can only load in base nodes @@ -493,7 +493,7 @@ return; } - boost::shared_ptr<oxygen::BaseNode> bn(boost::shared_dynamic_cast<oxygen::BaseNode>(leaf)); + boost::shared_ptr<oxygen::BaseNode> bn(boost::dynamic_pointer_cast<oxygen::BaseNode>(leaf)); if (bn.get() == 0) { // Can only load in base nodes Modified: branches/gui-bullet/spark/guiplugin/setupframe/setupframe.cpp =================================================================== --- branches/gui-bullet/spark/guiplugin/setupframe/setupframe.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/guiplugin/setupframe/setupframe.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -1522,7 +1522,7 @@ { mSaving = true; - bool saved = mSimulationManager->saveSimulationSetup(mCurrentSetup); + bool saved = static_cast<bool>(mSimulationManager->saveSimulationSetup(mCurrentSetup)); mSaving = false; if (!saved) { Modified: branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe.cpp =================================================================== --- branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe.cpp 2014-05-13 14:54:02 UTC (rev 372) +++ branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe.cpp 2014-05-13 15:21:12 UTC (rev 373) @@ -178,7 +178,7 @@ { boost::shared_ptr<TaskDefinition> newDefinition(mSimulationManager->newTaskDefinition(TaskDefinition::mTypes[mChosenTask])); - bool success = mSimulationManager->getSimulation()->addNewTask(*newDefinition); + bool success = static_cast<bool>(mSimulationManager->getSimulation()->addNewTask(*newDefinition)); if (!success) LOG_INFO() << "Could not initialize task " << newDefinition->getName() << " (" << TaskDefinition::getTypeString(newDefinition->getType()) << ")"; else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2015-03-27 19:39:58
|
Revision: 387 http://sourceforge.net/p/simspark/svn/387 Author: hedayat Date: 2015-03-27 19:39:48 +0000 (Fri, 27 Mar 2015) Log Message: ----------- Merge trunk/ with gui-bullet branch Modified Paths: -------------- branches/gui-bullet/rcssserver3d/CMakeLists.txt branches/gui-bullet/rcssserver3d/ChangeLog branches/gui-bullet/rcssserver3d/NEWS branches/gui-bullet/rcssserver3d/RELEASE branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoleg.rsg branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h branches/gui-bullet/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.h branches/gui-bullet/rcssserver3d/rcssserver3d/naorobottypes.rb branches/gui-bullet/rcssserver3d/rcssserver3d/naosoccersim.rb branches/gui-bullet/spark/ChangeLog Added Paths: ----------- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naolegtoe.rsg Property Changed: ---------------- branches/gui-bullet/ branches/gui-bullet/rcssserver3d/ Index: branches/gui-bullet =================================================================== --- branches/gui-bullet 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet 2015-03-27 19:39:48 UTC (rev 387) Property changes on: branches/gui-bullet ___________________________________________________________________ Added: svn:mergeinfo ## -0,0 +1 ## +/trunk:358-386 \ No newline at end of property Index: branches/gui-bullet/rcssserver3d =================================================================== --- branches/gui-bullet/rcssserver3d 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet/rcssserver3d 2015-03-27 19:39:48 UTC (rev 387) Property changes on: branches/gui-bullet/rcssserver3d ___________________________________________________________________ Modified: svn:mergeinfo ## -1 +1 ## -/trunk/rcssserver3d:329-355,360-372 +/trunk/rcssserver3d:329-355,358-386 \ No newline at end of property Modified: branches/gui-bullet/rcssserver3d/CMakeLists.txt =================================================================== --- branches/gui-bullet/rcssserver3d/CMakeLists.txt 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet/rcssserver3d/CMakeLists.txt 2015-03-27 19:39:48 UTC (rev 387) @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(rcssserver3d CXX C) -set(PACKAGE_VERSION "0.6.7") +set(PACKAGE_VERSION "0.6.8.1") ########## check for headerfiles/libraries ########## include(CheckIncludeFile) Modified: branches/gui-bullet/rcssserver3d/ChangeLog =================================================================== --- branches/gui-bullet/rcssserver3d/ChangeLog 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet/rcssserver3d/ChangeLog 2015-03-27 19:39:48 UTC (rev 387) @@ -1,3 +1,26 @@ +2014-06-25 Hedayat Vatankhah <hed...@gm...> + + * NEWS: + * RELEASE: + * CMakeLists.txt: + - prepared for 0.6.8.1 release + + * data/rsg/agent/nao/nao_hetero.rsg: + * data/rsg/agent/nao/naoleg.rsg: + * data/rsg/agent/nao/naolegtoe.rsg: + * rcssserver3d/naorobottypes.rb: + - Update robot types for RoboCup 2014 including two new types, one of which + has toes! Thanks to Patrick, Stefan and Klaus. + +2014-05-30 Hedayat Vatankhah <hed...@gm...> + + * NEWS: + * RELEASE: + * CMakeLists.txt: + - prepared for 0.6.8 release; including changes in this release like hear + message labeling, score reporting and bug fixes not documented in + ChangeLog + 2013-06-20 Hedayat Vatankhah <hed...@gm...> * plugin/soccermonitor/CMakeLists.txt: Modified: branches/gui-bullet/rcssserver3d/NEWS =================================================================== --- branches/gui-bullet/rcssserver3d/NEWS 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet/rcssserver3d/NEWS 2015-03-27 19:39:48 UTC (rev 387) @@ -1,6 +1,42 @@ +[0.6.8.1] +This is a bug-fix release for 0.6.8, which had a bug in labeling hear messages. +It also includes few other changes: a small bug fix, and new hetero robot types +for RoboCup 2014. Now, our Nao robots can have toe! :) + +[0.6.8] +This release mainly comes with 2 new features: 1. labeling hear messages with +team names so that it is clear which team the message comes from. 2. Score +reporting. A few bug fixes are also included. + +* Hear message labeling: + - Now hear messages include team names - Ex: (hear teamName 9 10 text) + +* Score Reporting: + - Example: (GS (unum 8) (team left) (sl 1) (sr 2) (t 0.00) (pm BeforeKickOff)) + +* New Options in naosoccersim.rb: + - LabelMessages - Toggles on/off labeling of messages (default on) + - ReportScores - Toggles on/off score reporting (default on) + - MaxRobotTypeCount - Maximum number of any one robot type that may be + used (default 7 and can be set to 11 to preserve 2013 competition behavior) + - MinRobotTypesCount - Minimum number of robot types that must be used for a + full team (default 3 and can be set to 1 to preserve 2013 competition + behavior) + - MaxSumTwoRobotTypes - The maximum sum of robots for any two robot types + (default 9 but can be set to 11 to preserve 2013 competition behavior) + +* Other changes: + - Robot type checking to ensure that enough robot types (3) are used and that + not too many of any one (7) or two (9) types is used. + - Updating naorobottypes.rb with robot types used in 2013 competitions + - Clear Players in GoalLeft/Right before kickoff to make sure that opponent + doesn't touch ball at the middle of the field. + - Don't enforce crowding rules on kickoff, since opponent should not come + near the ball + [0.6.7] This is the RoboCup 2013 release. It comes with some bug fixes, and also -compatibility with latest Boost libraries. New foulds and new debugging +compatibility with latest Boost libraries. New fouls and new debugging facility are provided. Now, fouls are sent to the monitor so that it can provide visual feedback about them. Finally, support for heterogeneous robots is added and two sample types are provided. Modified: branches/gui-bullet/rcssserver3d/RELEASE =================================================================== --- branches/gui-bullet/rcssserver3d/RELEASE 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet/rcssserver3d/RELEASE 2015-03-27 19:39:48 UTC (rev 387) @@ -1,49 +1,39 @@ -RELEASE News of rcssserver3d-0.6.7 +RELEASE News of rcssserver3d-0.6.8.1 -This is the RoboCup 2013 release. It comes with some bug fixes, and also -compatibility with latest Boost libraries. New foulds and new debugging -facility are provided. Now, fouls are sent to the monitor so that it can -provide visual feedback about them. Finally, support for heterogeneous robots -is added and two sample types are provided. +This is a bug-fix release for 0.6.8, which had a bug in labeling hear messages. +It also includes few other changes: a small bug fix, and new hetero robot types +for RoboCup 2014. Now, our Nao robots can have toe! :) -* Heterogeneous Players: - This release supports heterogeneous players. Currently, two extra Nao robots - are provided beside the standard Nao (thanks Stefan and Klaus). +And this is the release news for 0.6.8: +This release mainly comes with 2 new features: 1. labeling hear messages with +team names so that it is clear which team the message comes from. 2. Score +reporting. A few bug fixes are also included. + +* Hear message labeling: + - Now hear messages include team names - Ex: (hear teamName 9 10 text) - - Usage: to use the new heterogeneous players, a new scene command should be - used. While the old style scene commands work, for using hetero players you - should send "(scene rsg/agent/nao/nao_hetero.rsg TYPE_NO)", in which TYPE_NO - is the type number of the player type. Type 0 is the standard type, and - hetero types start from 1. Therefore, to load Nao type 1 the following - command should be sent: (scene rsg/agent/nao/nao_hetero.rsg 1). Notice that - you can use the new style command for loading standard Nao, using 0 as - TYPE_NO. - - - Heterogeneous Robot Parameters: The robot parameters for different types - are defined in a new file: "naorobottypes.rb". New types can be added to the - array. But to define new parameters, corresponding .rsg files should be - modified. - - - Rules: Each team can use a limited number of hetero players. The limits - can be configured in naosoccersim.rb using "MaxTotalHeteroCount" and - "MaxHeteroTypeCount" variables. The former limits the total number of hetero - players for each team, and the latter specifies the maximum number of players - of a single hetero player type. +* Score Reporting: + - Example: (GS (unum 8) (team left) (sl 1) (sr 2) (t 0.00) (pm BeforeKickOff)) -* Other Features/Changes: - - Charging fouls rules are added (thanks Patrick). These fouls are not - penalized, but recorded and sent to the monitor. New rules can be configured - in naosoccersim.rb. - - Fouls are added to the monitor protocol to provide visual feedback about - them to viewers. - - For debugging purposes, sensing the orientation of the agent can be - enabled using "setSenseMyOrien" option in the .rsg file of an agent (added - by Patrick) - - A player can kick the ball in kickoff if there are only 2 players in - the field to support current penalty mode. - - Fixed bugs in goal counting when changing team sides in the second half. - Now, this feature should work fine. However, it is disabled by default now - since we don't use it currently in the competitions. +* New Options in naosoccersim.rb: + - LabelMessages - Toggles on/off labeling of messages (default on) + - ReportScores - Toggles on/off score reporting (default on) + - MaxRobotTypeCount - Maximum number of any one robot type that may be + used (default 7 and can be set to 11 to preserve 2013 competition behavior) + - MinRobotTypesCount - Minimum number of robot types that must be used for a + full team (default 3 and can be set to 1 to preserve 2013 competition + behavior) + - MaxSumTwoRobotTypes - The maximum sum of robots for any two robot types + (default 9 but can be set to 11 to preserve 2013 competition behavior) + +* Other changes: + - Robot type checking to ensure that enough robot types (3) are used and that + not too many of any one (7) or two (9) types is used. + - Updating naorobottypes.rb with robot types used in 2013 competitions + - Clear Players in GoalLeft/Right before kickoff to make sure that opponent + doesn't touch ball at the middle of the field. + - Don't enforce crowding rules on kickoff, since opponent should not come + near the ball You can get the package on the Simspark page on SourceForge at http://sourceforge.net/projects/simspark/ Modified: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg 2015-03-27 19:39:48 UTC (rev 387) @@ -25,6 +25,9 @@ (def $TorsoInitZ 1.5) (def $loadObj (eval Nao.UseTexture)) + +(def $useToe (eval "NaoType["$type"]['UseToe']")) + ; ;Begin Construct of Nao ; @@ -131,18 +134,38 @@ ; ;The Right Leg ; - (importScene rsg/agent/nao/naoleg.rsg - 1 r - $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj - $type) - + (switch $useToe + (true + (importScene rsg/agent/nao/naolegtoe.rsg + 1 r + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) + ) + (false + (importScene rsg/agent/nao/naoleg.rsg + 1 r + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) + ) + ) + ; ;The Left Leg ; - (importScene rsg/agent/nao/naoleg.rsg - -1 l - $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj - $type) + (switch $useToe + (true + (importScene rsg/agent/nao/naolegtoe.rsg + -1 l + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) + ) + (false + (importScene rsg/agent/nao/naoleg.rsg + -1 l + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) + ) + ) );end of nd Space Modified: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoleg.rsg =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoleg.rsg 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoleg.rsg 2015-03-27 19:39:48 UTC (rev 387) @@ -47,9 +47,11 @@ ; ;Position Parameters ; - (def $Hip1RelTorso_X (eval $LRFactor * 0.055)) + ;(def $Hip1RelTorso_X (eval $LRFactor * 0.055)) + (def $Hip1RelTorso_X (eval $LRFactor * (eval "NaoType["$type"]['Hip1RelTorso_X']"))) (def $Hip1RelTorso_Y -0.01) - (def $Hip1RelTorso_Z -0.115) + ;(def $Hip1RelTorso_Z -0.115) + (def $Hip1RelTorso_Z (eval "NaoType["$type"]['Hip1RelTorso_Z']")) (def $Hip2RelHip1_X 0) (def $Hip2RelHip1_Y 0) Copied: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naolegtoe.rsg (from rev 386, trunk/rcssserver3d/data/rsg/agent/nao/naolegtoe.rsg) =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naolegtoe.rsg (rev 0) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naolegtoe.rsg 2015-03-27 19:39:48 UTC (rev 387) @@ -0,0 +1,447 @@ +; -*- mode: lisp; -*- + +(RSG 0 1) +( + ; + ;Template + ;@param LRFactor is (left_leg ? -1 : 1) + ; + (templ $LRFactor $LeftOrRight + $Torso_X $Torso_Y $Torso_Z $loadObj + $type + ) + + ; + ;The Names + ; + (def $Hip1Name (join $LeftOrRight hip1)) + (def $Hip2Name (join $LeftOrRight hip2)) + (def $ThighName (join $LeftOrRight thigh)) + (def $ShankName (join $LeftOrRight shank)) + (def $AnkleName (join $LeftOrRight ankle)) + (def $FootName (join $LeftOrRight foot)) + (def $ToeName (join $LeftOrRight toe)) + + (def $Hip1BodyPath (join ../../ $Hip1Name /sphereBody)) + (def $Hip2BodyPath (join ../../ $Hip2Name /sphereBody)) + (def $ThighBodyPath (join ../../ $ThighName /boxBody)) + (def $ShankBodyPath (join ../../ $ShankName /boxBody)) + (def $AnkleBodyPath (join ../../ $AnkleName /sphereBody)) + (def $FootBodyPath (join ../../ $FootName /boxBody)) + (def $ToeBodyPath (join ../../ $ToeName /boxBody)) + + (def $Joint1PerName (join $LeftOrRight lj1)) + (def $Joint2PerName (join $LeftOrRight lj2)) + (def $Joint3PerName (join $LeftOrRight lj3)) + (def $Joint4PerName (join $LeftOrRight lj4)) + (def $Joint5PerName (join $LeftOrRight lj5)) + (def $Joint6PerName (join $LeftOrRight lj6)) + (def $Joint7PerName (join $LeftOrRight lj7)) + + (def $Joint1EffName (join $LeftOrRight le1)) + (def $Joint2EffName (join $LeftOrRight le2)) + (def $Joint3EffName (join $LeftOrRight le3)) + (def $Joint4EffName (join $LeftOrRight le4)) + (def $Joint5EffName (join $LeftOrRight le5)) + (def $Joint6EffName (join $LeftOrRight le6)) + (def $Joint7EffName (join $LeftOrRight le7)) + + (def $FRPName (join $LeftOrRight f)) + (def $FRPToeName (join $LeftOrRight f1)) + + ; + ;Size and Mass Parameters + ; + (def $Hip1Radius 0.01) + (def $Hip1Mass 0.09) + + (def $Hip2Radius 0.01) + (def $Hip2Mass 0.125) + + (def $ThighSizeX 0.07) + (def $ThighSizeY 0.07) + (def $ThighSizeZ 0.14) + (def $ThighMass 0.275) + + (def $ShankSizeX 0.08) + (def $ShankSizeY 0.07) + (def $ShankSizeZ 0.11) + (def $ShankMass 0.225) + + (def $AnkleRadius 0.01) + (def $AnkleMass 0.125) + + (def $ToeLength (eval "NaoType["$type"]['ToeLength']")) + (def $TotalFootLength 0.16) + (def $FootToeMassRatio (eval (eval $ToeLength / $TotalFootLength) * 0.5)) + (def $FootTotalMass 0.2) + + (def $FootSizeX 0.08) + (def $FootSizeY (eval $TotalFootLength - $ToeLength)) + (def $FootSizeZ 0.02) + (def $FootMass (eval (eval 1 - $FootToeMassRatio) * $FootTotalMass)) + + (def $ToeSizeX 0.08) + (def $ToeSizeY $ToeLength) + (def $ToeSizeZ 0.01) + (def $ToeMass (eval $FootToeMassRatio * $FootTotalMass)) + + + ; + ;Position Parameters + ; + ;(def $Hip1RelTorso_X (eval $LRFactor * 0.055)) + (def $Hip1RelTorso_X (eval $LRFactor * (eval "NaoType["$type"]['Hip1RelTorso_X']"))) + (def $Hip1RelTorso_Y -0.01) + ;(def $Hip1RelTorso_Z -0.115) + (def $Hip1RelTorso_Z (eval "NaoType["$type"]['Hip1RelTorso_Z']")) + + (def $Hip2RelHip1_X 0) + (def $Hip2RelHip1_Y 0) + (def $Hip2RelHip1_Z 0) + + (def $ThighRelHip2_X 0) + (def $ThighRelHip2_Y 0.01) + ;(def $ThighRelHip2_Z -0.04) + (def $ThighRelHip2_Z (eval "NaoType["$type"]['ThighRelHip2_Z']")) + + (def $ShankRelThigh_X 0) + (def $ShankRelThigh_Y 0.005) + (def $ShankRelThigh_Z -0.125) + + (def $AnkleRelShank_X 0) + (def $AnkleRelShank_Y -0.01) + ;(def $AnkleRelShank_Z -0.055) + (def $AnkleRelShank_Z (eval "NaoType["$type"]['AnkleRelShank_Z']")) + + (def $FootRelAnkle_X 0) + (def $FootRelAnkle_Y (eval (eval $FootSizeY * 0.5) - 0.05)) + (def $FootRelAnkle_Z -0.04) + + (def $ToeRelFoot_X 0) + (def $ToeRelFoot_Y (eval $TotalFootLength * 0.5)) + (def $ToeRelFoot_Z -0.005) + + (def $Hip1_X (eval $Torso_X + $Hip1RelTorso_X)) + (def $Hip1_Y (eval $Torso_Y + $Hip1RelTorso_Y)) + (def $Hip1_Z (eval $Torso_Z + $Hip1RelTorso_Z)) + + (def $Hip2_X (eval $Hip1_X + $Hip2RelHip1_X)) + (def $Hip2_Y (eval $Hip1_Y + $Hip2RelHip1_Y)) + (def $Hip2_Z (eval $Hip1_Z + $Hip2RelHip1_Z)) + + (def $Thigh_X (eval $Hip2_X + $ThighRelHip2_X)) + (def $Thigh_Y (eval $Hip2_Y + $ThighRelHip2_Y)) + (def $Thigh_Z (eval $Hip2_Z + $ThighRelHip2_Z)) + + (def $Shank_X (eval $Thigh_X + $ShankRelThigh_X)) + (def $Shank_Y (eval $Thigh_Y + $ShankRelThigh_Y)) + (def $Shank_Z (eval $Thigh_Z + $ShankRelThigh_Z)) + + (def $Ankle_X (eval $Shank_X + $AnkleRelShank_X)) + (def $Ankle_Y (eval $Shank_Y + $AnkleRelShank_Y)) + (def $Ankle_Z (eval $Shank_Z + $AnkleRelShank_Z)) + + (def $Foot_X (eval $Ankle_X + $FootRelAnkle_X)) + (def $Foot_Y (eval $Ankle_Y + $FootRelAnkle_Y)) + (def $Foot_Z (eval $Ankle_Z + $FootRelAnkle_Z)) + + (def $Toe_X (eval $Foot_X + $ToeRelFoot_X)) + (def $Toe_Y (eval $Foot_Y + $ToeRelFoot_Y)) + (def $Toe_Z (eval $Foot_Z + $ToeRelFoot_Z)) + + ; + ;Joint Parameters + ; + (def $PI 3.14159265) + (def $MaxAbsJointSpeed (eval $PI * (eval 351.77 / 180.0))) + + (def $lj1_min -90) + (def $lj1_max 1) + (def $lj1_max_abs_speed $MaxAbsJointSpeed) + + (def $right_lj2_min -45) + (def $left_lj2_min -25) + (def $lj2_min_c1 (eval (eval $right_lj2_min + $left_lj2_min) * 0.5)) + (def $lj2_min_c2 (eval (eval $right_lj2_min - $left_lj2_min) * 0.5)) + (def $lj2_min (eval $lj2_min_c1 + (eval $LRFactor * $lj2_min_c2))) + + (def $right_lj2_max 25) + (def $left_lj2_max 45) + (def $lj2_max_c1 (eval (eval $right_lj2_max + $left_lj2_max) * 0.5)) + (def $lj2_max_c2 (eval (eval $right_lj2_max - $left_lj2_max) * 0.5)) + (def $lj2_max (eval $lj2_max_c1 + (eval $LRFactor * $lj2_max_c2))) + (def $lj2_max_abs_speed $MaxAbsJointSpeed) + + (def $lj3_min -25) + (def $lj3_max 100) + (def $lj3_max_abs_speed $MaxAbsJointSpeed) + + (def $lj4_min -130) + (def $lj4_max 1) + (def $lj4_max_abs_speed $MaxAbsJointSpeed) + + (def $lj5_min -45) + (def $lj5_max 75) + (def $lj5_max_abs_speed (eval "NaoType["$type"]['lj5_max_abs_speed']")) + + (def $right_lj6_min -25) + (def $left_lj6_min -45) + (def $lj6_min_c1 (eval (eval $right_lj6_min + $left_lj6_min) * 0.5)) + (def $lj6_min_c2 (eval (eval $right_lj6_min - $left_lj6_min) * 0.5)) + (def $lj6_min (eval $lj6_min_c1 + (eval $LRFactor * $lj6_min_c2))) + + (def $right_lj6_max 45) + (def $left_lj6_max 25) + (def $lj6_max_c1 (eval (eval $right_lj6_max + $left_lj6_max) * 0.5)) + (def $lj6_max_c2 (eval (eval $right_lj6_max - $left_lj6_max) * 0.5)) + (def $lj6_max (eval $lj6_max_c1 + (eval $LRFactor * $lj6_max_c2))) + (def $lj6_max_abs_speed (eval "NaoType["$type"]['lj6_max_abs_speed']")) + + (def $lj7_min -1) + (def $lj7_max 70) + (def $lj7_max_abs_speed $MaxAbsJointSpeed) + + (def $lj1_axis_x -0.7071) + (def $lj1_axis_y 0) + (def $lj1_axis_z (eval $LRFactor * 0.7071)) + + (def $lj3_Anchor_X (eval -1 * $ThighRelHip2_X)) + (def $lj3_Anchor_Y (eval -1 * $ThighRelHip2_Y)) + (def $lj3_Anchor_Z (eval -1 * $ThighRelHip2_Z)) + + (def $lj6_Anchor_X 0) + (def $lj6_Anchor_Y -0.03) + (def $lj6_Anchor_Z 0.035) + + (def $lj7_Anchor_X 0) + (def $lj7_Anchor_Y (eval -0.5 * $ToeLength)) + (def $lj7_Anchor_Z -0.005) + + ; + ;Models obj + ; + (def $ThighObj (join models/ $LeftOrRight thigh.obj)) + (def $ShankObj (join models/ $LeftOrRight shank.obj)) + (def $FootObj (join models/ $LeftOrRight foot.obj)) + + ; + ;Construct Hip1 + ; + (nd Transform + (setName $Hip1Name) + (setLocalPos $Hip1_X $Hip1_Y $Hip1_Z) + + (importScene rsg/agent/nao/sphere_appearance.rsg $Hip1Radius matYellow) + ;(importScene rsg/agent/nao/sphere_physics $Hip1Radius $Hip1Mass) + (importScene rsg/agent/nao/sphere_physics_nocollider.rsg $Hip1Radius $Hip1Mass) + + + (importScene rsg/agent/nao/hingejoint.rsg + $Joint1PerName $Joint1EffName + ../sphereBody ../../body/boxBody + 0 0 0 + $lj1_axis_x $lj1_axis_y $lj1_axis_z + $lj1_min $lj1_max + $lj1_max_abs_speed) + ) + + ; + ;Construct Hip2 + ; + (nd Transform + (setName $Hip2Name) + (setLocalPos $Hip2_X $Hip2_Y $Hip2_Z) + + (importScene rsg/agent/nao/sphere_appearance.rsg $Hip2Radius matYellow) + ;(importScene rsg/agent/nao/sphere_physics.rsg $Hip2Radius $Hip2Mass) + (importScene rsg/agent/nao/sphere_physics_nocollider.rsg $Hip2Radius $Hip2Mass) + + (importScene rsg/agent/nao/hingejoint.rsg + $Joint2PerName $Joint2EffName + ../sphereBody $Hip1BodyPath + 0 0 0 ;anchor + 0 1 0 ;axis + $lj2_min $lj2_max + $lj2_max_abs_speed) + ) + + ; + ;Construct Thigh + ; + (nd Transform + (setName $ThighName) + (setLocalPos $Thigh_X $Thigh_Y $Thigh_Z) + + (switch $loadObj + (true + (nd StaticMesh (load $ThighObj) (setScale $ThighSizeX $ThighSizeX $ThighSizeX)) + ) + (false + (importScene rsg/agent/nao/box_appearance.rsg $ThighSizeX $ThighSizeY $ThighSizeZ matBlue) + ) + ) + + ;(importScene rsg/agent/nao/box_physics.rsg $ThighSizeX $ThighSizeY $ThighSizeZ $ThighMass) + (importScene rsg/agent/nao/box_physics_nocollider.rsg $ThighSizeX $ThighSizeY $ThighSizeZ $ThighMass) + + (nd BoxCollider + (setName (join $LeftOrRight ThighCollider)) + (addNotCollideWithColliderName TorsoCollider true) + (setBoxLengths $ThighSizeX $ThighSizeY $ThighSizeZ) + (importScene rsg/agent/nao/contactjointhandler.rsg) + ) + + + (importScene rsg/agent/nao/hingejoint.rsg + $Joint3PerName $Joint3EffName + ../boxBody $Hip2BodyPath + $lj3_Anchor_X $lj3_Anchor_Y $lj3_Anchor_Z + 1 0 0 ;1 -1 -1 + $lj3_min $lj3_max + $lj3_max_abs_speed) + + ) + + ; + ;Construct Shank + ; + (nd Transform + (setName $ShankName) + (setLocalPos $Shank_X $Shank_Y $Shank_Z) + + (switch $loadObj + (true + (nd StaticMesh (load $ShankObj) (setScale $ShankSizeX $ShankSizeX $ShankSizeX)) + ) + (false + (importScene rsg/agent/nao/box_appearance.rsg $ShankSizeX $ShankSizeY $ShankSizeZ matGrey) + ) + ) + + ;(importScene rsg/agent/nao/box_physics.rsg $ShankSizeX $ShankSizeY $ShankSizeZ $ShankMass) + (importScene rsg/agent/nao/box_physics_nocollider.rsg $ShankSizeX $ShankSizeY $ShankSizeZ $ShankMass) + + (nd BoxCollider + (setName (join $LeftOrRight ShankCollider)) + (setBoxLengths $ShankSizeX $ShankSizeY $ShankSizeZ) + (importScene rsg/agent/nao/contactjointhandler.rsg) + ) + + (importScene rsg/agent/nao/hingejoint.rsg + $Joint4PerName $Joint4EffName + ../boxBody $ThighBodyPath + 0 -0.01 0.045 + 1 0 0 ;0 -1 -1 + $lj4_min $lj4_max + $lj4_max_abs_speed) + + ) + + ; + ;Construct Ankle + ; + (nd Transform + (setName $AnkleName) + (setLocalPos $Ankle_X $Ankle_Y $Ankle_Z) + + (importScene rsg/agent/nao/sphere_appearance.rsg $AnkleRadius matRed) + ;(importScene rsg/agent/nao/sphere_physics.rsg $AnkleRadius $AnkleMass) + (importScene rsg/agent/nao/sphere_physics_nocollider.rsg $AnkleRadius $AnkleMass) + + (importScene rsg/agent/nao/hingejoint.rsg + $Joint5PerName $Joint5EffName + ../sphereBody $ShankBodyPath + 0 0 0 + 1 0 0 ;0 -1 -1 + $lj5_min $lj5_max + $lj5_max_abs_speed) + + ) + + ; + ;Construct Foot + ; + (nd Transform + (setName $FootName) + (setLocalPos $Foot_X $Foot_Y $Foot_Z) + + (nd ForceResistancePerceptor + (setName $FRPName) + ) + + (switch $loadObj + (true + (nd StaticMesh (load $FootObj) (setScale $FootSizeX (eval $FootSizeX * (eval $FootSizeY / $TotalFootLength)) $FootSizeX)) + ) + (false + (importScene rsg/agent/nao/box_appearance.rsg $FootSizeX $FootSizeY $FootSizeZ matBlue) + ) + ) + + ;(importScene rsg/agent/nao/box_physics_with_handler.rsg $FootSizeX $FootSizeY $FootSizeZ $FootMass) + (importScene rsg/agent/nao/box_physics_nocollider.rsg $FootSizeX $FootSizeY $FootSizeZ $FootMass) + + (nd BoxCollider + (setName (join $LeftOrRight FootCollider)) + (addNotCollideWithColliderName (join $LeftOrRight ShankCollider) true) + (setBoxLengths $FootSizeX $FootSizeY $FootSizeZ) + (importScene rsg/agent/nao/touchperceptorhandler.rsg) + ) + + (importScene rsg/agent/nao/hingejoint.rsg + $Joint6PerName $Joint6EffName + ../boxBody $AnkleBodyPath + $lj6_Anchor_X $lj6_Anchor_Y $lj6_Anchor_Z + 0 1 0 ;1 -1 -1 + $lj6_min $lj6_max + $lj6_max_abs_speed) + + (nd ObjectState + (setID $FootName) + ) + + + ) + + + + ; + ;Construct Toe + ; + (nd Transform + (setName $ToeName) + (setLocalPos $Toe_X $Toe_Y $Toe_Z) + + (nd ForceResistancePerceptor + (setName $FRPToeName) + ) + + (switch $loadObj + (true + (nd StaticMesh (load $FootObj) (setScale $FootSizeX (eval $FootSizeX * (eval $ToeSizeY / $FootSizeY)) (eval $FootSizeX * (eval $ToeSizeZ / $FootSizeZ)))) + ) + (false + (importScene rsg/agent/nao/box_appearance.rsg $ToeSizeX $ToeSizeY $ToeSizeZ matGrey) + ) + ) + + ;(importScene rsg/agent/nao/box_physics_with_handler.rsg $ToeSizeX $ToeSizeY $ToeSizeZ $ToeMass) + (importScene rsg/agent/nao/box_physics_nocollider.rsg $ToeSizeX $ToeSizeY $ToeSizeZ $ToeMass) + + (nd BoxCollider + (setName (join $LeftOrRight ToeCollider)) + (addNotCollideWithColliderName (join $LeftOrRight FootCollider) true) + (setBoxLengths $ToeSizeX $ToeSizeY $ToeSizeZ) + (importScene rsg/agent/nao/touchperceptorhandler.rsg) + ) + + (importScene rsg/agent/nao/hingejoint.rsg + $Joint7PerName $Joint7EffName + ../boxBody $FootBodyPath + $lj7_Anchor_X $lj7_Anchor_Y $lj7_Anchor_Z + 1 0 0 ;1 -1 -1 + $lj7_min $lj7_max + $lj7_max_abs_speed) + ) +) Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2015-03-27 19:39:48 UTC (rev 387) @@ -58,7 +58,7 @@ mNotOffside(false), mLastModeWasPlayOn(false), mUseOffside(true), - mUseCharging(true), + mUseCharging(false), mChargingMinSpeed(0.2), mChargingMinBallDist(0.2), mChargingMaxOppSpeedAngle(90), @@ -75,7 +75,8 @@ mMaxTouchGroupSize(1000), mMaxFoulTime(0.0), // maximum time allowed for a player to commit a positional foul before being repositioned mLastKickOffKickTime(0), - mCheckKickOffKickerFoul(false) + mCheckKickOffKickerFoul(false), + mPenaltyShootout(false) { mFreeKickPos = Vector3f(0.0,0.0,mBallRadius); } @@ -120,6 +121,28 @@ // Reset touch groups ResetTouchGroups(TI_LEFT); ResetTouchGroups(TI_RIGHT); + + // If in penalty shootout mode check that the goalie remains in the penalty area + if (mPenaltyShootout) + { + SoccerBase::TAgentStateList agent_states; + if (! SoccerBase::GetAgentStates(*mBallState.get(), agent_states, TI_RIGHT)) + return; + boost::shared_ptr<oxygen::Transform> agent_aspect; + SoccerBase::TAgentStateList::const_iterator i; + for (i = agent_states.begin(); i != agent_states.end(); ++i) + { + SoccerBase::GetTransformParent(**i, agent_aspect); + Vector3f agentPos = agent_aspect->GetWorldTransform().Pos(); + if (agentPos.x() < mRightPenaltyArea.minVec[0] || agentPos.y() < mRightPenaltyArea.minVec[1] || agentPos.y() > mRightPenaltyArea.maxVec[1]) + { + // Penalty shootout goalie has left penalty area so award goal + mPenaltyShootout = false; + mGameState->ScoreTeam(TI_LEFT); + mGameState->SetPlayMode(PM_Goal_Left); + } + } + } } } @@ -548,27 +571,26 @@ for(int unum=1; unum<=11; unum++) { TPlayMode playMode = mGameState->GetPlayMode(); - if ((playMode == PM_KickOff_Left && idx != TI_LEFT) - || (playMode == PM_KickOff_Right && idx != TI_RIGHT) - || (playMode != PM_KickOff_Left && playMode != PM_KickOff_Right)) + bool checkCrowding = (playMode == PM_KickOff_Left && idx != TI_LEFT) + || (playMode == PM_KickOff_Right && idx != TI_RIGHT) + || (playMode != PM_KickOff_Left && playMode != PM_KickOff_Right); + + // I am the third closest player but i am too near the ball (and not the goalie) + if (checkCrowding && unum != 1 && closestPlayerDist[idx2] < mMinOppDistance + && (distArr[unum][idx] <= mMin3PlDistance + 0.01 + && ordArr[unum][idx] == 3)) { - // I am the third closest player but i am too near the ball (and not the goalie) - if (unum != 1 && closestPlayerDist[idx2] < mMinOppDistance - && (distArr[unum][idx] <= mMin3PlDistance + 0.01 - && ordArr[unum][idx] == 3)) - { playerFoulTime[unum][idx]++; playerLastFoul[unum][idx] = FT_Crowding; - } - // I am the second closest player but i am too near the ball (and not the goalie) - else if (unum != 1 && closestPlayerDist[idx2] < mMinOppDistance - && distArr[unum][idx] <= mMin2PlDistance + 0.01 - && ordArr[unum][idx] == 2) - { + } + // I am the second closest player but i am too near the ball (and not the goalie) + else if (checkCrowding && unum != 1 && closestPlayerDist[idx2] < mMinOppDistance + && distArr[unum][idx] <= mMin2PlDistance + 0.01 + && ordArr[unum][idx] == 2) + { playerFoulTime[unum][idx]++; playerLastFoul[unum][idx] = FT_Crowding; - } - } + } // Too many players inside my own penalty area and Im am the last one to enter or // the last one to enter was the goalie and I am the one further away from own goal else if((numPlInsideOwnArea[idx] > mMaxPlayersInsideOwnArea && unum != 1 && playerInsideOwnArea[unum][idx] == 1 && @@ -647,14 +669,11 @@ int unum = (*i)->GetUniformNumber(); if (playerFoulTime[unum][idx] > mMaxFoulTime / 0.02) { - if (playerLastFoul[unum][idx] != FT_Charging) - { - // I am not a very good soccer player... I am violating the rules... - salt::Vector3f new_pos = RepositionOutsidePos(ballPos, unum, idx); - //Calculate my Reposition pos outside of the field - SoccerBase::MoveAgent(agent_aspect, new_pos); - //Oh my God!! I am flying!! I am going outside of the field - } + // I am not a very good soccer player... I am violating the rules... + salt::Vector3f new_pos = RepositionOutsidePos(ballPos, unum, idx); + //Calculate my Reposition pos outside of the field + SoccerBase::MoveAgent(agent_aspect, new_pos); + //Oh my God!! I am flying!! I am going outside of the field ResetFoulCounterPlayer(unum, idx); // Record faul mFouls.push_back(Foul(mFouls.size() + 1, playerLastFoul[unum][idx], *i)); @@ -1269,6 +1288,7 @@ { // update freekickpos mFreeKickPos = mBallState->GetLastValidBallPosition(); + mFreeKickPos[2] = mBallRadius; return false; } @@ -1715,6 +1735,7 @@ SoccerBase::GetSoccerVar(*this,"GoalKickDist",mGoalKickDist); SoccerBase::GetSoccerVar(*this,"AutomaticKickOff",mAutomaticKickOff); SoccerBase::GetSoccerVar(*this,"WaitBeforeKickOff",mWaitBeforeKickOff); + SoccerBase::GetSoccerVar(*this,"PenaltyShootout",mPenaltyShootout); SoccerBase::GetSoccerVar(*this,"SingleHalfTime",mSingleHalfTime); SoccerBase::GetSoccerVar(*this,"AutomaticQuit",mAutomaticQuit); SoccerBase::GetSoccerVar(*this,"ChangeSidesInSecondHalf",mChangeSidesInSecondHalf); @@ -1790,12 +1811,16 @@ boost::shared_ptr<Transform> transform_parent; boost::shared_ptr<RigidBody> agent_body; + std::string team = ""; + for ( SoccerBase::TAgentStateList::const_iterator it = agent_states.begin(); it != agent_states.end(); it++ ) { + // Get name of team to label all messages with + team = (*it)->GetPerceptName(ObjectState::PT_Player); if ( (*it)->GetUniformNumber() == number) { (*it)->AddSelfMessage(message); @@ -1813,7 +1838,6 @@ Vector3f relPos = pos - new_pos; relPos = SoccerBase::FlipView(relPos, idx); float direction = salt::gRadToDeg(salt::gArcTan2(relPos[1], relPos[0])); - std::string team = (*it)->GetPerceptName(ObjectState::PT_Player); (*it)->AddMessage(message, team, direction, true); } } @@ -1836,7 +1860,6 @@ Vector3f relPos = pos - new_pos; relPos = SoccerBase::FlipView(relPos, SoccerBase::OpponentTeam(idx)); float direction = salt::gRadToDeg(salt::gArcTan2(relPos[1], relPos[0])); - std::string team = (*it)->GetPerceptName(ObjectState::PT_Player); (*it)->AddMessage(message, team, direction, false); } } Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2015-03-27 19:39:48 UTC (rev 387) @@ -448,6 +448,8 @@ boost::shared_ptr<oxygen::AgentAspect> mLastKickOffTaker; /** if kickoff taker should be checked for single kick rule */ bool mCheckKickOffKickerFoul; + /** if in penalty shootout mode */ + bool mPenaltyShootout; /** complete foul history */ std::vector<Foul> mFouls; Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp 2015-03-27 19:39:48 UTC (rev 387) @@ -52,6 +52,8 @@ mCommandMap["repos"] = CT_REPOS; mCommandMap["killsim"] = CT_KILLSIM; mCommandMap["reqfullstate"] = CT_REQFULLSTATE; + mCommandMap["time"] = CT_TIME; + mCommandMap["score"] = CT_SCORE; // setup team index map // Originally team sides were "L","R" and "N" @@ -235,6 +237,12 @@ case CT_REQFULLSTATE: mMonitorControl->RequestFullState(); break; + case CT_TIME: + ParseTimeCommand(predicate); + break; + case CT_SCORE: + ParseScoreCommand(predicate); + break; default: return false; @@ -661,7 +669,7 @@ void TrainerCommandParser::ParseReposCommand(const oxygen::Predicate & predicate) { - cerr << "repos 2" << endl; + //cerr << "repos 2" << endl; Predicate::Iterator unumParam(predicate); int unum; @@ -714,7 +722,7 @@ ballPos = ballBody->GetPosition(); SoccerBase::GetTransformParent(**iter, agent_aspect); - cerr << "repos 3" << endl; + //cerr << "repos 3" << endl; Vector3f new_pos = mSoccerRule->RepositionOutsidePos(ballPos, (*iter)->GetUniformNumber(), (*iter)->GetTeamIndex()); SoccerBase::MoveAgent(agent_aspect, new_pos); @@ -727,3 +735,91 @@ { mSimServer->Quit(); } + +void TrainerCommandParser::ParseTimeCommand(const oxygen::Predicate & predicate) +{ + Predicate::Iterator timeParam(predicate); + float time; + + if (predicate.GetValue(timeParam,time)) + { + if (time >= 0) + { + mGameState->SetTime(time); + } + else + { + GetLog()->Debug() + << "(TrainerCommandParser) ERROR: value of time " + << time << " cannot be a negative value\n"; + return; + } + } + else + { + GetLog()->Debug() + << "(TrainerCommandParser) ERROR: could not parse time " + << time << "\n"; + return; + } +} + +void TrainerCommandParser::ParseScoreCommand(const oxygen::Predicate & predicate) +{ + Predicate::Iterator leftScoreParam(predicate); + int scoreLeft; + if (predicate.FindParameter(leftScoreParam, "left")) + { + if (!predicate.GetValue(leftScoreParam, scoreLeft)) + { + GetLog()->Debug() + << "(TrainerCommandParser) ERROR: could not parse score left " + << scoreLeft << "\n"; + return; + } + } + else + { + GetLog()->Debug() + << "(TrainerCommandParser) ERROR: could not find score left\n"; + return; + } + + + Predicate::Iterator rightScoreParam(predicate); + int scoreRight; + if (predicate.FindParameter(rightScoreParam, "right")) + { + if (!predicate.GetValue(rightScoreParam, scoreRight)) + { + GetLog()->Debug() + << "(TrainerCommandParser) ERROR: could not parse score right " + << scoreRight << "\n"; + return; + } + } + else + { + GetLog()->Debug() + << "(TrainerCommandParser) ERROR: could not find score right\n"; + return; + } + + if (scoreLeft < 0) + { + GetLog()->Debug() + << "(TrainerCommandParser) ERROR: score left " + << scoreLeft << " cannot be negative\n"; + return; + } + + if (scoreRight < 0) + { + GetLog()->Debug() + << "(TrainerCommandParser) ERROR: score right " + << scoreRight << " cannot be negative\n"; + return; + } + + mGameState->SetScores(scoreLeft, scoreRight); +} Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.h =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.h 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.h 2015-03-27 19:39:48 UTC (rev 387) @@ -56,7 +56,9 @@ CT_KILL, CT_REPOS, CT_KILLSIM, - CT_REQFULLSTATE + CT_REQFULLSTATE, + CT_TIME, + CT_SCORE }; typedef std::map<std::string, ECommandType> TCommandMap; @@ -132,7 +134,18 @@ predicate */ void ParseKillSimCommand(const oxygen::Predicate & predicate); + + /** parses and executes the time command contained in the given + predicate + */ + void ParseTimeCommand(const oxygen::Predicate & predicate); + + /** parses and executes the score command contained in the given + predicate + */ + void ParseScoreCommand(const oxygen::Predicate & predicate); + protected: TCommandMap mCommandMap; Modified: branches/gui-bullet/rcssserver3d/rcssserver3d/naorobottypes.rb =================================================================== --- branches/gui-bullet/rcssserver3d/rcssserver3d/naorobottypes.rb 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet/rcssserver3d/rcssserver3d/naorobottypes.rb 2015-03-27 19:39:48 UTC (rev 387) @@ -1,27 +1,59 @@ NaoType = [ # Type 0 (Standard Nao) { + 'Hip1RelTorso_X' => 0.055, + 'Hip1RelTorso_Z' => -0.115, 'ThighRelHip2_Z' => -0.04, 'AnkleRelShank_Z' => -0.055, 'lj5_max_abs_speed' => 6.1395, 'lj6_max_abs_speed' => 6.1395, - 'ElbowRelUpperArm_Y' => 0.07 + 'ElbowRelUpperArm_Y' => 0.07, + 'UseToe' => 'false' }, -# Type 1 +# Type 1 (longer legs and arms) { + 'Hip1RelTorso_X' => 0.055, + 'Hip1RelTorso_Z' => -0.115, 'ThighRelHip2_Z' => -0.05832, 'AnkleRelShank_Z' => -0.07332, 'lj5_max_abs_speed' => 6.1395, 'lj6_max_abs_speed' => 6.1395, - 'ElbowRelUpperArm_Y' => 0.10664 + 'ElbowRelUpperArm_Y' => 0.10664, + 'UseToe' => 'false' }, -# Type 2 +# Type 2 (faster ankle-pitch and slower ankle-roll speed) { + 'Hip1RelTorso_X' => 0.055, + 'Hip1RelTorso_Z' => -0.115, 'ThighRelHip2_Z' => -0.04, 'AnkleRelShank_Z' => -0.055, 'lj5_max_abs_speed' => 8.80667, 'lj6_max_abs_speed' => 3.47234, - 'ElbowRelUpperArm_Y' => 0.07 + 'ElbowRelUpperArm_Y' => 0.07, + 'UseToe' => 'false' +}, +# Type 3 (longer legs and arms + wider hip) +{ + 'Hip1RelTorso_X' => 0.072954143, + 'Hip1RelTorso_Z' => -0.115, + 'ThighRelHip2_Z' => -0.067868424, + 'AnkleRelShank_Z' => -0.082868424, + 'lj5_max_abs_speed' => 6.1395, + 'lj6_max_abs_speed' => 6.1395, + 'ElbowRelUpperArm_Y' => 0.125736848, + 'UseToe' => 'false' +}, +# Type 4 (Nao toes model) +{ + 'Hip1RelTorso_X' => 0.055, + 'Hip1RelTorso_Z' => -0.115, + 'ThighRelHip2_Z' => -0.04, + 'AnkleRelShank_Z' => -0.055, + 'lj5_max_abs_speed' => 6.1395, + 'lj6_max_abs_speed' => 6.1395, + 'ElbowRelUpperArm_Y' => 0.07, + 'UseToe' => 'true', + 'ToeLength' => 0.035517656 } ] Modified: branches/gui-bullet/rcssserver3d/rcssserver3d/naosoccersim.rb =================================================================== --- branches/gui-bullet/rcssserver3d/rcssserver3d/naosoccersim.rb 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet/rcssserver3d/rcssserver3d/naosoccersim.rb 2015-03-27 19:39:48 UTC (rev 387) @@ -54,6 +54,7 @@ addSoccerVar('AutomaticKickOff', false) addSoccerVar('WaitBeforeKickOff', 30.0) addSoccerVar('CoinTossForKickOff', false) +addSoccerVar('PenaltyShootout', false) addSoccerVar('AutomaticQuit', false) addSoccerVar('ChangeSidesInSecondHalf', false) @@ -78,7 +79,7 @@ addSoccerVar('MaxTouchGroupSize', 2) # charging foul parameters -addSoccerVar('UseCharging', true) +addSoccerVar('UseCharging', false) addSoccerVar('ChargingMinSpeed', 0.2) addSoccerVar('ChargingMinBallDist', 0.2) addSoccerVar('IllegalInterceptMinAngle', 70) Modified: branches/gui-bullet/spark/ChangeLog =================================================================== --- branches/gui-bullet/spark/ChangeLog 2015-02-07 20:31:12 UTC (rev 386) +++ branches/gui-bullet/spark/ChangeLog 2015-03-27 19:39:48 UTC (rev 387) @@ -18,14 +18,14 @@ 2013-06-12 Hedayat Vatankhah <hed...@gm...> - * carbon/ - * guiplugin/ - * guilayout/ - * data/guisetups/ - * plugin/inputsysqt/ - * plugin/openglsysqt/ - - fixed compilation issues under GNU/Linux+GCC. - + * carbon/: + * guiplugin/: + * guilayout/: + * data/guisetups/: + * plugin/inputsysqt/: + * plugin/openglsysqt/: + - fixed compilation issues under GNU/Linux+GCC. + * lib/salt/gmath.h: - removed type specifier for std::isnan, since not all overloads are templates @@ -45,103 +45,103 @@ 2012-06-23 Patrick Geib <Pat...@on...> - * carbon/ - - the Carbon library - - * guiplugin/ - - generic (not soccer related) plugins for the carbon gui - - * guilayout/ - - layout projects for the Gui - - * data/guisetups/ - - image resources for the carbon gui. - - * plugin/inputsysqt/ - - a new spark plugin which handles inputs to a spark simulation by - converting from qt to spark defines. + * carbon/ + - the Carbon library + + * guiplugin/ + - generic (not soccer related) plugins for the carbon gui + + * guilayout/ + - layout projects for the Gui + + * data/guisetups/ + - image resources for the carbon gui. + + * plugin/inputsysqt/ + - a new spark plugin which handles inputs to a spark simulation by + converting from qt to spark defines. - * plugin/openglsysqt/ - - empty placeholder openglsystem to be used in simspark when an external - rendering by carbon is used. - - * spark/spark.h: - * spark/spark.cpp: - - relative path prefix can now be given in constructor as optional - parameter. Needed by carbon. - - * spark.rb: - - the spark script now contains logging functions and other functions - needed by the carbon gui - - * plugin/odeimps/odecollider.cpp: - - fixed bug where body was deleted twice + * plugin/openglsysqt/ + - empty placeholder openglsystem to be used in simspark when an external + rendering by carbon is used. + + * spark/spark.h: + * spark/spark.cpp: + - relative path prefix can now be given in constructor as optional + parameter. Needed by carbon. + + * spark.rb: + - the spark script now contains logging functions and other functions + needed by the carbon gui + + * plugin/odeimps/odecollider.cpp: + - fixed bug where body was deleted twice - * lib/zeitgeist/core.h: - * lib/zeitgeist/core.cpp: - - added function to reset the self pointer. Needed by carbon. + * lib/zeitgeist/core.h: + * lib/zeitgeist/core.cpp: + - added function to reset the self pointer. Needed by carbon. - * lib/zeitgeist/leaf_c.cpp: - - added unlinkLeaf() function to ruby interface. + * lib/zeitgeist/leaf_c.cpp: + - added unlinkLeaf() function to ruby interface. - * lib/zeitgeist/logserver/logserverstreambuf.h: - * lib/zeitgeist/logserver/logserverstreambuf.cpp: - - replaced typedef TMaskStream with struct MaskStream. Now it not only - contains the integer mask and stream pointer, but also a synchronization - flag. If the flag is true, the stream will by sync()'ed every time the - input stream flushes a message. This is needed for carbons message stream - appenders, so it can receive the logservers messages immediately when the - simulation thread sends them. + * lib/zeitgeist/logserver/logserverstreambuf.h: + * lib/zeitgeist/logserver/logserverstreambuf.cpp: + - replaced typedef TMaskStream with struct MaskStream. Now it not only + contains the integer mask and stream pointer, but also a synchronization + flag. If the flag is true, the stream will by sync()'ed every time the + input stream flushes a message. This is needed for carbons message stream + appenders, so it can receive the logservers messages immediately when the + simulation thread sends them. - * lib/zeitgeist/logserver/logserver.h: - * lib/zeitgeist/logserver/logserver.cpp: - * lib/zeitgeist/logserver/logserver_c.cpp: - - streams can now be added with an optional synchronization flag. - - updated the script interface for AddStream too. + * lib/zeitgeist/logserver/logserver.h: + * lib/zeitgeist/logserver/logserver.cpp: + * lib/zeitgeist/logserver/logserver_c.cpp: + - streams can now be added with an optional synchronization flag. + - updated the script interface for AddStream too. - * lib/zeitgeist/scriptserver/scriptserver.cpp: - - ruby error messages are now sent to ->Error() instead of ->Debug(). + * lib/zeitgeist/scriptserver/scriptserver.cpp: + - ruby error messages are now sent to ->Error() instead of ->Debug(). - * lib/oxygen/simulationserver/simulationserver.h: - * lib/oxygen/simulationserver/simulationserver.cpp: - - the Simulation can now be paused. There is a flag in the simulation - server and a pause/unpause function. When a simulation is paused, the next - simulation cycle will not call StartCycle, SenseAgent, ActAgent and - EndCycle, but a new control event CE_WaitCycle. - When a simulation is paused, the simulation time does not advance and - agents are not notified about changed time. The wait cycle lasts as long - as a normal simulation cycle. Calling pause(false) will resume the normal - simulation cycle after the current wait cycle and agents are - notified again. - The pausing function is meant to pause and observe the state of the - simulation using the carbon library and the gui. It was tested with - several agent implementations and seemed to work perfectly. + * lib/oxygen/simulationserver/simulationserver.h: + * lib/oxygen/simulationserver/simulationserver.cpp: + - the Simulation can now be paused. There is a flag in the simulation + server and a pause/unpause function. When a simulation is paused, the next + simulation cycle will not call StartCycle, SenseAgent, ActAgent and + EndCycle, but a new control event CE_WaitCycle. + When a simulation is paused, the simulation time does not advance and + agents are not notified about changed time. The wait cycle lasts as long + as a normal simulation cycle. Calling pause(false) will resume the normal + simulation cycle after the current wait cycle and agents are + notified again. + The pausing function is meant to pause and observe the state of the + simulation using the carbon library and the gui. It was tested with + several agent implementations and seemed to work perfectly. - * lib/oxygen/simulationserver/simcontrolnode.h: - - the new control event CE_WaitCycle calls a new interface function - WaitCycle() in simcontrolnodes. This way control nodes can be notified - about running and paused simulation steps. This is used by carbon. - WaitCycle() and EndCycle() are used for SimControlNodes which act as - interface between carbon and spark. + * lib/oxygen/simulationserver/simcontrolnode.h: + - the new control event CE_WaitCycle calls a new interface function + WaitCycle() in simcontrolnodes. This way control nodes can be notified + about running and paused simulation steps. This is used by carbon. + WaitCycle() and EndCycle() are used for SimControlNodes which act as + interface between carbon and spark. - * lib/kerosin/inputsystem/inputsystem.h: - * lib/kerosin/inputsystem/inputsystem.cpp: - - AddInput() and GetInput() now use a boost::shared_mutex to make the - access thread safe. This is neccessary because there may be simulatneous - access from different threads in a carbon simulation. + * lib/kerosin/inputsystem/inputsystem.h: + * lib/kerosin/inputsystem/inputsystem.cpp: + - AddInput() and GetInput() now use a boost::shared_mutex to make the + access thread safe. This is neccessary because there may be simulatneous + access from different threads in a carbon simulation. - * lib/kerosin/renderserver/renderserver.cpp: - - added OpenGlError-code checking between rendering stages. Removed double - picking-end-bracket glPopName() which caused picking to fail. + * lib/kerosin/renderserver/renderserver.cpp: + - added OpenGlError-code checking between rendering stages. Removed double + picking-end-bracket glPopName() which caused picking to fail. - * lib/kerosin/renderserver/rendercontrol.cpp: - * lib/kerosin/renderserver/rendercontrol.h: - * lib/kerosin/renderserver/rendercontrol_c.cpp: - - RenderControlNodes can no be activated or deactivated. Carbon uses this - feature to deactivate them in the spark simulation if the rendering is - done in the gui thread or any other than the server thread. - - Added setActive() function to ruby interface. - + * lib/kerosin/renderserver/rendercontrol.cpp: + * lib/kerosin/renderserver/rendercontrol.h: + * lib/kerosin/renderserver/rendercontrol_c.cpp: + - RenderControlNodes can no be activated or deactivated. Carbon uses this + feature to deactivate them in the spark simulation if the rendering is + done in the gui thread or any other than the server thread. + - Added setActive() function to ruby interface. + 2012-05-23 Hedayat Vatankhah <hed...@gm...> * lib/kerosin/CMakeLists.txt: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |