You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(20) |
Feb
(11) |
Mar
(6) |
Apr
(5) |
May
(4) |
Jun
(7) |
Jul
(9) |
Aug
(11) |
Sep
|
Oct
(4) |
Nov
(13) |
Dec
(21) |
2010 |
Jan
(23) |
Feb
(32) |
Mar
(6) |
Apr
(2) |
May
(10) |
Jun
(15) |
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
|
Nov
(1) |
Dec
(16) |
2011 |
Jan
(1) |
Feb
(5) |
Mar
(19) |
Apr
(13) |
May
(4) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(4) |
Feb
(8) |
Mar
(2) |
Apr
(6) |
May
(13) |
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(4) |
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(15) |
Apr
(2) |
May
(4) |
Jun
(17) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(6) |
Jun
(6) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(6) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <he...@us...> - 2012-05-22 22:33:21
|
Revision: 316 http://simspark.svn.sourceforge.net/simspark/?rev=316&view=rev Author: hedayat Date: 2012-05-22 22:33:15 +0000 (Tue, 22 May 2012) Log Message: ----------- Don't allow direct goals from kickoff Don't allow dribbling on kickoff Update 0.6.6 release notes Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/NEWS trunk/rcssserver3d/RELEASE trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2012-05-22 18:22:38 UTC (rev 315) +++ trunk/rcssserver3d/ChangeLog 2012-05-22 22:33:15 UTC (rev 316) @@ -1,3 +1,13 @@ +2012-05-23 Hedayat Vatankhah <hed...@gm...> + + * NEWS: + * RELEASE: + - updated for 0.6.6 + + * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp: + - do not allow direct goals from kickoff + - do not let the kickoff taker to kick the ball again befor other players + 2012-05-22 Hedayat Vatankhah <hed...@gm...> * plugin/soccer/gamestateaspect/gamestateaspect.cpp: @@ -8,6 +18,7 @@ * plugin/soccer/soccerruleaspect/soccerruleaspect.h: - a little cleanup, and fixed comment for mAutoKickOffTimeOrigin + - removed an unused variable mLastValidBallPosition * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp: - update game's paused state Modified: trunk/rcssserver3d/NEWS =================================================================== --- trunk/rcssserver3d/NEWS 2012-05-22 18:22:38 UTC (rev 315) +++ trunk/rcssserver3d/NEWS 2012-05-22 22:33:15 UTC (rev 316) @@ -6,6 +6,14 @@ also increased to 20x30 meters, and free kick distance is 2.0 meters now. More detailed information about this release follows: +* Rule Changes: + - automatic referee now enforces rules whenever players are permitted to + play, rather than only in playon play mode. + - it is no longer possible to score directly from kick off, the ball should + at least touch another player before going into the goal + - in kickoff playmode, the kicker cannot touch the ball again until another + player touches it. + * Field/Dimension Changes: - New dimensions: 20x30 - Free kick distance: 2.0 Modified: trunk/rcssserver3d/RELEASE =================================================================== --- trunk/rcssserver3d/RELEASE 2012-05-22 18:22:38 UTC (rev 315) +++ trunk/rcssserver3d/RELEASE 2012-05-22 22:33:15 UTC (rev 316) @@ -7,6 +7,14 @@ also increased to 20x30 meters, and free kick distance is 2.0 meters now. More detailed information about this release follows: +* Rule Changes: + - automatic referee now enforces rules whenever players are permitted to + play, rather than only in playon play mode. + - it is no longer possible to score directly from kick off, the ball should + at least touch another player before going into the goal + - in kickoff playmode, the kicker cannot touch the ball again until another + player touches it. + * Field/Dimension Changes: - New dimensions: 20x30 - Free kick distance: 2.0 Modified: trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp 2012-05-22 18:22:38 UTC (rev 315) +++ trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp 2012-05-22 22:33:15 UTC (rev 316) @@ -119,7 +119,7 @@ if (changeSides) mNextHalfKickOff = ti; else - mNextHalfKickOff = (ti == TI_LEFT) ? TI_RIGHT : TI_LEFT; + mNextHalfKickOff = SoccerBase::OpponentTeam(ti); } } Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2012-05-22 18:22:38 UTC (rev 315) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2012-05-22 22:33:15 UTC (rev 316) @@ -68,7 +68,9 @@ mMin2PlDistance(0), // min dist for second closest of team before being repositioned mMin3PlDistance(0), // min dist for third closest of team before being repositioned mMaxTouchGroupSize(1000), - mMaxFaultTime(0.0) // maximum time allowed for a player to commit a positional fault before being repositioned + mMaxFaultTime(0.0), // maximum time allowed for a player to commit a positional fault before being repositioned + mLastKickOffKickTime(0), + mCheckKickOffKickerFault(false) { mFreeKickPos = Vector3f(0.0,0.0,mBallRadius); } @@ -589,6 +591,40 @@ } void +SoccerRuleAspect::PunishKickOffFault( + boost::shared_ptr<oxygen::AgentAspect> agent) +{ + boost::shared_ptr<AgentState> agentState; + if (!SoccerBase::GetAgentState(agent, agentState)) + { + GetLog()->Error() << "ERROR: (SoccerRuleAspect) Cannot get " + "AgentState from an AgentAspect\n"; + } + else + { + TTeamIndex opp = SoccerBase::OpponentTeam(agentState->GetTeamIndex()); + ClearPlayersBeforeKickOff(opp); + + // put the ball back in the middle of the playing field + Vector3f pos(0, 0, mBallRadius); + MoveBall(pos); + + mGameState->KickOff(opp); + } +} + +inline bool SoccerRuleAspect::WasLastKickFromKickOff( + boost::shared_ptr<oxygen::AgentAspect> &lastKicker) +{ + TTime kickTime; + // notice that a kick is not necessarily an immediate action, it can + // take some time... + return mBallState->GetLastCollidingAgent(lastKicker, kickTime) + && kickTime - mLastKickOffKickTime < 0.1 // kick duration = 0.1 + && lastKicker == mLastKickOffTaker; +} + +void SoccerRuleAspect::ClearSelectedPlayers() { float min_dist = mFreeKickMoveDist; @@ -750,6 +786,9 @@ } if (time > mGameState->GetLastModeChange()) { + mLastKickOffKickTime = time; + mCheckKickOffKickerFault = true; + mLastKickOffTaker = agent; mGameState->SetPlayMode(PM_PlayOn); } } @@ -1099,6 +1138,8 @@ if (idx == TI_NONE) { + // sometimes, ball can't record goals due to approximation errors, + // so we check for goals analytically const salt::Vector3f ballPos = mBallBody->GetPosition(); const float xDist2Goal = fabs(ballPos.x()) - mGoalBallLineX; @@ -1129,6 +1170,19 @@ return false; } + /* don't allow goals directly from kickoff + * + * todo it is allowed in FIFA rules, so we should get rid of it e.g. by + * adding noise to the beam effector so that kickoff kicks cannot be + * precisely planned + */ + boost::shared_ptr<AgentAspect> agent; + if (WasLastKickFromKickOff(agent)) + { + PunishKickOffFault(agent); + return false; + } + // score the lucky team mGameState->ScoreTeam((idx == TI_LEFT) ? TI_RIGHT : TI_LEFT); mGameState->SetPlayMode((idx == TI_LEFT) ? PM_Goal_Right : PM_Goal_Left); @@ -1136,6 +1190,25 @@ return true; } +bool +SoccerRuleAspect::CheckKickOffTakerFault() +{ + if (!mCheckKickOffKickerFault) + return false; + + boost::shared_ptr<AgentAspect> agent; + if (!WasLastKickFromKickOff(agent)) // second kick + { + mCheckKickOffKickerFault = false; + if (agent == mLastKickOffTaker) + { + PunishKickOffFault(mLastKickOffTaker); + return true; + } + } + return false; +} + void SoccerRuleAspect::UpdatePlayOn() { @@ -1161,6 +1234,11 @@ } #endif + if (CheckKickOffTakerFault()) + { + return; + } + // other checks go here... } @@ -1176,7 +1254,7 @@ } // put the ball back in the middle of the playing field - Vector3f pos(0,0,mBallRadius); + Vector3f pos(0, 0, mBallRadius); MoveBall(pos); // kick off for the opposite team Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2012-05-22 18:22:38 UTC (rev 315) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2012-05-22 22:33:15 UTC (rev 316) @@ -211,6 +211,9 @@ /** checks if the assistant referee should raise the flag for offside */ bool CheckOffside(); + /** checks if kickoff taker has kicked the ball again before other players */ + bool CheckKickOffTakerFault(); + /** moves the ball to pos setting its linear and angular velocity to 0 */ void MoveBall(const salt::Vector3f& pos); @@ -253,6 +256,15 @@ */ void SwapTeamSides(); + /** + * Punish agent's fault committed during kickoff + */ + void PunishKickOffFault(boost::shared_ptr<oxygen::AgentAspect> agent); + + /** returns true if last kick was happenned in kick off */ + bool WasLastKickFromKickOff( + boost::shared_ptr<oxygen::AgentAspect> &lastKicker); + protected: /** reference to the body node of the Ball */ boost::shared_ptr<oxygen::RigidBody> mBallBody; @@ -276,9 +288,6 @@ one team can touch the ball */ float mDropBallTime; - /** the point above the ground, where the ball left the field */ - salt::Vector3f mLastValidBallPos; - /** the field length (in meters) */ float mFieldLength; /** the field width (in meters) */ @@ -384,6 +393,13 @@ /** use offside law */ bool mUseOffside; + + /** the time of the kick in the last kick off mode */ + TTime mLastKickOffKickTime; + /** the player which kicked in the last kick off mode */ + boost::shared_ptr<oxygen::AgentAspect> mLastKickOffTaker; + /** if kickoff taker should be checked for single kick rule */ + bool mCheckKickOffKickerFault; }; DECLARE_CLASS(SoccerRuleAspect); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-05-22 18:22:45
|
Revision: 315 http://simspark.svn.sourceforge.net/simspark/?rev=315&view=rev Author: hedayat Date: 2012-05-22 18:22:38 +0000 (Tue, 22 May 2012) Log Message: ----------- Add a "paused" game state (when teams are not playing, e.g. Goal left/right play modes) Apply automatic referee rules always while the game is 'running', and reset all counters when 'paused'. Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2012-05-20 21:42:25 UTC (rev 314) +++ trunk/rcssserver3d/ChangeLog 2012-05-22 18:22:38 UTC (rev 315) @@ -1,3 +1,19 @@ +2012-05-22 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/gamestateaspect/gamestateaspect.cpp: + * plugin/soccer/gamestateaspect/gamestateaspect.h: + - added knowledge about a 'paused' state, in which game is not really + running (waiting for the referee to allow the game to continue, e.g. in + goal left/right state or at the beginning of a kick in state) + + * plugin/soccer/soccerruleaspect/soccerruleaspect.h: + - a little cleanup, and fixed comment for mAutoKickOffTimeOrigin + + * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp: + - update game's paused state + - consider the referee rules always while the game is running (not paused), + and reset all counters otherwise. + 2012-05-21 Hedayat Vatankhah <hed...@gm...> * NEWS: Modified: trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp 2012-05-20 21:42:25 UTC (rev 314) +++ trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp 2012-05-22 18:22:38 UTC (rev 315) @@ -45,6 +45,7 @@ mLeftInit = Vector3f(0,0,0); mRightInit = Vector3f(0,0,0); mFinished = false; + mGamePaused = true; } GameStateAspect::~GameStateAspect() @@ -479,3 +480,13 @@ mScore[0] = scoreLeft; mScore[1] = scoreRight; } + +bool GameStateAspect::IsPaused() const +{ + return mGamePaused; +} + +void GameStateAspect::SetPaused(bool paused) +{ + mGamePaused = paused; +} Modified: trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h 2012-05-20 21:42:25 UTC (rev 314) +++ trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h 2012-05-22 18:22:38 UTC (rev 315) @@ -112,6 +112,12 @@ /** sets the current game scores. useful if you start a game in the middle */ void SetScores(int scoreLeft, int scoreRight); + /** returns if the game is paused */ + bool IsPaused() const; + + /** sets the game running state (paused or not) */ + void SetPaused(bool paused); + protected: /** setup the init positions for the agents */ virtual void OnLink(); @@ -175,8 +181,12 @@ /** the radius of an agent */ float mAgentRadius; + /** flag if the simulation should be stopped */ bool mFinished; + + /** flag if the game is running or paused (e.g. in goal_left/right state) */ + bool mGamePaused; }; DECLARE_CLASS(GameStateAspect); Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2012-05-20 21:42:25 UTC (rev 314) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2012-05-22 18:22:38 UTC (rev 315) @@ -91,8 +91,9 @@ void SoccerRuleAspect::AutomaticSimpleReferee(TPlayMode playMode) { - // Reset counters before kickoff - if (playMode == PM_BeforeKickOff) + // Reset counters and do not consider players' faults when game is not + // running + if (mGameState->IsPaused()) { ResetFaultCounter(TI_LEFT); ResetFaultCounter(TI_RIGHT); @@ -106,13 +107,8 @@ AnalyseTouchGroups(TI_LEFT); AnalyseTouchGroups(TI_RIGHT); - // Only apply rules during play-on, leaves some time for agents to - // solve it themselves - if (playMode == PM_PlayOn) - { - ClearPlayersAutomatic(TI_LEFT); // enforce standing and not overcrowding rules for left team - ClearPlayersAutomatic(TI_RIGHT); // enforce standing and not overcrowding rules for right team - } + ClearPlayersAutomatic(TI_LEFT); // enforce standing and not overcrowding rules for left team + ClearPlayersAutomatic(TI_RIGHT); // enforce standing and not overcrowding rules for right team // Reset touch groups ResetTouchGroups(TI_LEFT); @@ -704,6 +700,7 @@ Vector3f pos(0,0,mBallRadius); MoveBall(pos); + mGameState->SetPaused(true); ClearPlayers(mRightHalf, mFreeKickMoveDist, TI_LEFT); ClearPlayers(mLeftHalf, mFreeKickMoveDist, TI_RIGHT); @@ -729,6 +726,8 @@ void SoccerRuleAspect::UpdateKickOff(TTeamIndex idx) { + mGameState->SetPaused(false); + ClearPlayersBeforeKickOff(idx); // if no player touched the ball for mDropBallTime, we move away @@ -761,8 +760,11 @@ // do nothing for the duration of mKickInPauseTime if (mGameState->GetModeTime() < mKickInPauseTime) { + mGameState->SetPaused(true); return; } + mGameState->SetPaused(false); + // move away opponent team ClearPlayers(mFreeKickPos, mFreeKickDist, mFreeKickMoveDist, SoccerBase::OpponentTeam(idx)); @@ -810,8 +812,10 @@ // do nothing for the duration of mKickInPauseTime if (mGameState->GetModeTime() < mKickInPauseTime) { + mGameState->SetPaused(true); return; } + mGameState->SetPaused(false); //--------------- salt::Vector2f ball_pos(mFreeKickPos.x(), mFreeKickPos.y()); @@ -880,8 +884,11 @@ // do nothing for the duration of mKickInPauseTime if (mGameState->GetModeTime() < mKickInPauseTime) { + mGameState->SetPaused(true); return; } + mGameState->SetPaused(false); + // move away opponent team ClearPlayers(idx == TI_LEFT ? mLeftPenaltyArea : mRightPenaltyArea, mFreeKickMoveDist, SoccerBase::OpponentTeam(idx)); @@ -936,8 +943,11 @@ // do nothing for the duration of mKickInPauseTime if (mGameState->GetModeTime() < mKickInPauseTime) { + mGameState->SetPaused(true); return; } + mGameState->SetPaused(false); + // move away opponent team ClearPlayers(mFreeKickPos, mFreeKickDist, mFreeKickMoveDist, SoccerBase::OpponentTeam(idx)); @@ -1129,6 +1139,8 @@ void SoccerRuleAspect::UpdatePlayOn() { + mGameState->SetPaused(false); + // check if the ball is in one of the goals if (CheckGoal()) { @@ -1155,6 +1167,8 @@ void SoccerRuleAspect::UpdateGoal() { + mGameState->SetPaused(true); + // check if the pause time after the goal has elapsed if (mGameState->GetModeTime() < mGoalPauseTime) { @@ -1182,6 +1196,8 @@ void SoccerRuleAspect::UpdateGameOver() { + mGameState->SetPaused(true); + // wait for 10 seconds to finish if (mGameState->GetModeTime() < 9 || !mAutomaticQuit) { Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2012-05-20 21:42:25 UTC (rev 314) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2012-05-22 18:22:38 UTC (rev 315) @@ -265,6 +265,7 @@ /** the radius of the Ball */ float mBallRadius; + /** the length of the pause after a goal */ float mGoalPauseTime; /** the length of the pause after the ball left the field */ @@ -274,8 +275,10 @@ /** the time we wait before dropping the ball in play modes where only one team can touch the ball */ float mDropBallTime; + /** the point above the ground, where the ball left the field */ salt::Vector3f mLastValidBallPos; + /** the field length (in meters) */ float mFieldLength; /** the field width (in meters) */ @@ -286,8 +289,10 @@ float mGoalHeight; /** the absolute x coordinate of the goal which ball should pass (in meters) */ float mGoalBallLineX; + /** the point on the field where we do the kick in, free kick etc. */ salt::Vector3f mFreeKickPos; + /** the distance opponents have to keep during free kicks, kick ins etc. */ float mFreeKickDist; /** the (least) distance opponents will be moved away if they are to close @@ -295,6 +300,7 @@ float mFreeKickMoveDist; /** the distance from the back line the ball should be placed at for a goal kick */ float mGoalKickDist; + /** flag if the simulator should do the kick off automatically after the agent */ bool mAutomaticKickOff; /** time to wait until we kick off automatically */ @@ -305,7 +311,7 @@ bool mAutomaticQuit; /** flag if the side of the teams should be changed in the second half*/ bool mChangeSidesInSecondHalf; - /** time to wait until we kick off automatically */ + /** the time origin from which mWaitBeforeKickOff is calculated */ float mAutoKickOffTimeOrigin; //FCP 2010 - New Parameters (added by FCPortugal for Singapure 2010) @@ -329,6 +335,7 @@ int mMaxTouchGroupSize; /** maximum time allowed for a player to commit a positional fault before being repositioned */ int mMaxFaultTime; + /* Useful arrays for dealing with agent state an faults */ salt::Vector3f playerPos[12][3]; //Players Positions - not used int playerGround[12][3]; //Time Players are on the ground This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-05-20 21:42:32
|
Revision: 314 http://simspark.svn.sourceforge.net/simspark/?rev=314&view=rev Author: hedayat Date: 2012-05-20 21:42:25 +0000 (Sun, 20 May 2012) Log Message: ----------- Reduce the height of Nao's foot Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/NEWS trunk/rcssserver3d/RELEASE trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2012-05-19 18:40:58 UTC (rev 313) +++ trunk/rcssserver3d/ChangeLog 2012-05-20 21:42:25 UTC (rev 314) @@ -1,3 +1,13 @@ +2012-05-21 Hedayat Vatankhah <hed...@gm...> + + * NEWS: + * RELEASE: + - updated for 0.6.6 release + + * data/rsg/agent/nao/naoleg.rsg: + - reduce Nao's foot height (patch by Sander) and modify the position of + ankle accordingly + 2012-05-19 Hedayat Vatankhah <hed...@gm...> * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp Modified: trunk/rcssserver3d/NEWS =================================================================== --- trunk/rcssserver3d/NEWS 2012-05-19 18:40:58 UTC (rev 313) +++ trunk/rcssserver3d/NEWS 2012-05-20 21:42:25 UTC (rev 314) @@ -6,11 +6,13 @@ also increased to 20x30 meters, and free kick distance is 2.0 meters now. More detailed information about this release follows: -* Field Changes: +* Field/Dimension Changes: - New dimensions: 20x30 - Free kick distance: 2.0 - Corner kick position: in the middle point between goal and corner of the field, to facilitate faster corner kicks. + - Nao's foot height is now 0.02 rather than 0.03. Ankle's position changed + accordingly * Several Bug fixes. Some notable ones are: - Penalty lines and middle circle are now visible at their actual position Modified: trunk/rcssserver3d/RELEASE =================================================================== --- trunk/rcssserver3d/RELEASE 2012-05-19 18:40:58 UTC (rev 313) +++ trunk/rcssserver3d/RELEASE 2012-05-20 21:42:25 UTC (rev 314) @@ -7,11 +7,13 @@ also increased to 20x30 meters, and free kick distance is 2.0 meters now. More detailed information about this release follows: -* Field Changes: +* Field/Dimension Changes: - New dimensions: 20x30 - Free kick distance: 2.0 - Corner kick position: in the middle point between goal and corner of the field, to facilitate faster corner kicks. + - Nao's foot height is now 0.02 rather than 0.03. Ankle's position changed + accordingly * Several Bug fixes. Some notable ones are: - Penalty lines and middle circle are now visible at their actual position Modified: trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg 2012-05-19 18:40:58 UTC (rev 313) +++ trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg 2012-05-20 21:42:25 UTC (rev 314) @@ -68,7 +68,7 @@ (def $FootRelAnkle_X 0) (def $FootRelAnkle_Y 0.03) - (def $FootRelAnkle_Z -0.035) + (def $FootRelAnkle_Z -0.04) (def $Hip1_X (eval $Torso_X + $Hip1RelTorso_X)) (def $Hip1_Y (eval $Torso_Y + $Hip1RelTorso_Y)) @@ -118,7 +118,7 @@ (def $FootSizeX 0.08) (def $FootSizeY 0.16) - (def $FootSizeZ 0.03) + (def $FootSizeZ 0.02) (def $FootMass 0.2) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-05-19 18:41:05
|
Revision: 313 http://simspark.svn.sourceforge.net/simspark/?rev=313&view=rev Author: hedayat Date: 2012-05-19 18:40:58 +0000 (Sat, 19 May 2012) Log Message: ----------- Add virtual destructor to physics interface classes to ensure correct destruction of implementation objects. Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/oxygen/physicsserver/int/angularmotorint.h trunk/spark/lib/oxygen/physicsserver/int/balljointint.h trunk/spark/lib/oxygen/physicsserver/int/boxcolliderint.h trunk/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h trunk/spark/lib/oxygen/physicsserver/int/colliderint.h trunk/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h trunk/spark/lib/oxygen/physicsserver/int/fixedjointint.h trunk/spark/lib/oxygen/physicsserver/int/hinge2jointint.h trunk/spark/lib/oxygen/physicsserver/int/hingejointint.h trunk/spark/lib/oxygen/physicsserver/int/jointint.h trunk/spark/lib/oxygen/physicsserver/int/physicsobjectint.h trunk/spark/lib/oxygen/physicsserver/int/physicsserverint.h trunk/spark/lib/oxygen/physicsserver/int/planecolliderint.h trunk/spark/lib/oxygen/physicsserver/int/raycolliderint.h trunk/spark/lib/oxygen/physicsserver/int/rigidbodyint.h trunk/spark/lib/oxygen/physicsserver/int/sliderjointint.h trunk/spark/lib/oxygen/physicsserver/int/spaceint.h trunk/spark/lib/oxygen/physicsserver/int/spherecolliderint.h trunk/spark/lib/oxygen/physicsserver/int/transformcolliderint.h trunk/spark/lib/oxygen/physicsserver/int/universaljointint.h trunk/spark/lib/oxygen/physicsserver/int/worldint.h Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/ChangeLog 2012-05-19 18:40:58 UTC (rev 313) @@ -1,5 +1,28 @@ 2012-05-19 Hedayat Vatankhah <hed...@gm...> + * lib/oxygen/physicsserver/int/angularmotorint.h: + * lib/oxygen/physicsserver/int/balljointint.h: + * lib/oxygen/physicsserver/int/boxcolliderint.h: + * lib/oxygen/physicsserver/int/capsulecolliderint.h: + * lib/oxygen/physicsserver/int/colliderint.h: + * lib/oxygen/physicsserver/int/contactjointhandlerint.h: + * lib/oxygen/physicsserver/int/fixedjointint.h: + * lib/oxygen/physicsserver/int/hinge2jointint.h: + * lib/oxygen/physicsserver/int/hingejointint.h: + * lib/oxygen/physicsserver/int/jointint.h: + * lib/oxygen/physicsserver/int/physicsobjectint.h: + * lib/oxygen/physicsserver/int/physicsserverint.h: + * lib/oxygen/physicsserver/int/planecolliderint.h: + * lib/oxygen/physicsserver/int/raycolliderint.h: + * lib/oxygen/physicsserver/int/rigidbodyint.h: + * lib/oxygen/physicsserver/int/sliderjointint.h: + * lib/oxygen/physicsserver/int/spaceint.h: + * lib/oxygen/physicsserver/int/spherecolliderint.h: + * lib/oxygen/physicsserver/int/transformcolliderint.h: + * lib/oxygen/physicsserver/int/universaljointint.h: + * lib/oxygen/physicsserver/int/worldint.h: + - added virtual distructor + * NEWS: * CMakeLists.txt: - updated for 0.2.3 release Modified: trunk/spark/lib/oxygen/physicsserver/int/angularmotorint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/angularmotorint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/angularmotorint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -40,34 +40,36 @@ class OXYGEN_API AngularMotorInt { public: + virtual ~AngularMotorInt() {} + /** Creates a new angular motor within the physics world specified by \param worldID - */ + */ virtual long CreateAngularMotor(long worldID) = 0; - + /** Sets the mode of this angular motor to user mode */ virtual void SetModeUserMode(long jointID) = 0; - + /** Sets the mode of this angular motor to euler mode */ virtual void SetModeEulerMode(long jointID) = 0; - + /** returns the current motor mode - zero if motor is in user mode, or one if motor is in euler mode. */ virtual int GetMode(long jointID) = 0; - + /** sets the number of angular axes that will be controlled by the angular motor. \param num can range from 0 which effectively disables the motor to 3, which are automatically set in euler mode. */ virtual void SetNumAxes(int num, long jointID) = 0; - + /** returns the number of angular axes that are controlled by the - angular motor + angular motor */ virtual int GetNumAxes(long jointID) = 0; - + /** sets one of the motor axis. \param idx gives the motor axis to be set. \param anchor gives the relative anchor mode of the axis. \param axis gives the axis vector relative to the joint node @@ -79,25 +81,25 @@ to the first body, axis 2 must be anchored to the second body. */ virtual void SetMotorAxis(int idx, int anchor, salt::Vector3f axis, long jointID) = 0; - + /** returns the relative anchor mode of the motor axis \param idx */ virtual int GetAxisAnchor(int idx, long jointID) = 0; - + /** returns the motor axis \param idx */ virtual salt::Vector3f GetMotorAxis(int idx, long jointID) = 0; - + /** sets the current angle along axis \param idx. This function should only be called in 'user' mode, as in this mode the motor has no other way of knowing the joint angles. */ virtual void SetAxisAngle(int idx, float degAngle, long jointID) = 0; - + /** sets the current angle along axis \param idx. This function should only be called in 'user' mode, as in this mode the motor has no other way of knowing the joint angles. */ virtual float GetAxisAngle(int idx, long jointID) = 0; - + /** Return the current angle rate for axis anum. In dAMotorUser mode this is always zero, as not enough information is available. In dAMotorEuler mode this is the corresponding Modified: trunk/spark/lib/oxygen/physicsserver/int/balljointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/balljointint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/balljointint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -33,27 +33,28 @@ class OXYGEN_API BallJointInt { -public: +public: + virtual ~BallJointInt() {} /** Set the joint anchor point. The joint will try to keep this point on each body together. The input is specified in local coordinates. */ virtual void SetAnchor(const salt::Vector3f& anchor, long jointID) = 0; - + /** Returns the joint anchor point in local coordinates on the first of the two bodies. If the joint is perfectly satisfied, the joint anchor point will be the same for both bodies. */ virtual salt::Vector3f GetAnchor1(long jointID) = 0; - + /** Returns the joint anchor point in local coordinates on the second of the two bodies. If the joint is perfectly satisfied, the joint anchor point will be the same for both bodies. */ virtual salt::Vector3f GetAnchor2(long jointID) = 0; - - /** Creates a new BallJoint in the physics world specified + + /** Creates a new BallJoint in the physics world specified by \param worldID */ virtual long CreateBallJoint(long worldID) = 0; Modified: trunk/spark/lib/oxygen/physicsserver/int/boxcolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -32,20 +32,22 @@ class OXYGEN_API BoxColliderInt { -public: +public: + virtual ~BoxColliderInt() {} + /** sets the side lengths of the box geom */ virtual void SetBoxLengths(const salt::Vector3f& extents, long geomID) = 0; - + /** gets the side lengths of the box geom */ virtual void GetBoxLengths(salt::Vector3f& extents, long geomID) = 0; - + /** returns the depth of the given relative position in the managed box geom. Points inside the geom will have positive depth, points outside it will have negative depth, and points on the surface will have zero depth. */ virtual float GetPointDepth(const salt::Vector3f& pos, long geomID) = 0; - + /** Creates a new box geom and returns the ID of the newly created box */ virtual long CreateBox() = 0; }; Modified: trunk/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -32,6 +32,7 @@ class OXYGEN_API CapsuleColliderInt { public: + virtual ~CapsuleColliderInt() {} /** sets the parameters of the capsule. @@ -39,29 +40,29 @@ \param length is the height of the cylinder, not counting the caps */ virtual void SetParams(float radius, float length, long geomID) = 0; - + /** sets the radius of the capsule */ virtual void SetRadius(float radius, long geomID) = 0; - + /** sets the length of the capsule */ virtual void SetLength(float length, long geomID) = 0; - + /** gets the radius and the length of the capsule */ virtual void GetParams(float& radius, float& length, long geomID) = 0; - + /** returns the radius of the capsule */ virtual float GetRadius(long geomID) = 0; - + /** return the length of the capsule */ virtual float GetLength(long geomID) = 0; - + /** returns the depth of the given relative position in the managed capsule geom. Points inside the geom will have positive depth, points outside it will have negative depth, and points on the surface will have zero depth. */ virtual float GetPointDepth(const salt::Vector3f& pos, long geomID) = 0; - + /** Creates a new Capsule and returns the ID of the newly created capsule */ virtual long CreateCapsule() = 0; }; Modified: trunk/spark/lib/oxygen/physicsserver/int/colliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/colliderint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/colliderint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -36,58 +36,60 @@ { public: + virtual ~ColliderInt() {} + /** Gets the pointer to the Collider object that manages the geom specified by geomID. */ virtual Collider* GetColliderPointer(long geomID) = 0; - + /** sets the relative position of the managed geom directly. If the geom is connected to a body, the position of the body will also be changed */ virtual void SetPosition(const salt::Vector3f& globalPos, long geomID) = 0; - + /** sets the relative position of the managed geom to the body's center. Only use for colliders encapsulated in a TransformCollider! */ virtual void SetLocalPosition(const salt::Vector3f& pos, long geomID) = 0; - + /** returns the absolute position of the managed geom */ virtual salt::Vector3f GetPosition(long geomID) const = 0; - + /** sets the relative orientation of the managed geom directly. If the geom is connected to a body, the orientation of the body will also be changed */ virtual void SetRotation(const salt::Matrix& rot, long geomID) = 0; - + /** returns true if the geom managed by this Collider intersects with the geom managed by the given collider */ virtual bool Intersect(boost::shared_ptr<Collider> collider, long geomID) = 0; - + /** returns the handle ID of the containing parent space */ virtual long GetParentSpaceID(long geomID) = 0; - + /** Destroys the collider specified by \param geomID */ virtual void DestroyGeom(long geomID) = 0; - - /** Registers the collider specified by \param geomID to the transform + + /** Registers the collider specified by \param geomID to the transform collider specified by \param parentGeomID */ virtual void TransformSetGeom(long parentGeomID, long geomID) = 0; - - /** Puts the collider specified by \param geomID into the space + + /** Puts the collider specified by \param geomID into the space specified by spaceID. It also registers \param collider as the abstract collider object managing this collider. */ virtual void SetSpace(long spaceID, long geomID, Collider* collider) = 0; - + /** Registers the collider specified by \param geomID to the body specified by \param bodyID */ virtual void SetBody(long bodyID, long geomID) = 0; - + /** Removes the collider specified by \param geomID from the space specified by \param spaceID */ Modified: trunk/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -31,103 +31,105 @@ class OXYGEN_API ContactJointHandlerInt { -public: +public: + virtual ~ContactJointHandlerInt() {} + /** Returns a pointer to a SurfaceParameter class whose values were initialized with default values that make sense for most physics simulations. */ virtual GenericSurfaceParameter* Initialize() = 0; - + /** Finds and returns the ID of the body that the collider specified by - \param geomID has been registered to. */ + \param geomID has been registered to. */ virtual long RetrieveBody(long geomID) = 0; - + /** Creates a contact joint in the world specified by \param worldID, within the joint group specified by \param jointGroupID */ virtual long CreateContactJoint(long worldID, long jointGroupID, GenericContact& contact) = 0; - + /** Attaches the contact joint specified by \param jointID to the two bodies specified by \param body1 and \param body2 - */ + */ virtual void AttachContactJoint(long jointID, long bodyID1, long bodyID2) = 0; - + /** Calculates the surface parameters to take into account for a collision by factoring in the surface parameters of the two colliding objects, specified by \param colideeParam and \param surfacePtr */ - virtual void CalcSurfaceParam(GenericContact& surface, + virtual void CalcSurfaceParam(GenericContact& surface, GenericSurfaceParameter& collideeParam, GenericSurfaceParameter* surfacePtr) = 0; - + /** returns the current set of contact mode flags in the surface parameter */ virtual int GetContactMode(GenericSurfaceParameter* surface) const = 0; - + /** sets or resets the Bounce mode flag */ virtual void SetContactBounceMode(bool set, GenericSurfaceParameter* surface) = 0; - + /** sets the bounce value */ virtual void SetBounceValue(float bounce, GenericSurfaceParameter* surface) = 0; - + /** returns the bounce value */ virtual float GetBounceValue(GenericSurfaceParameter* surface) const = 0; - + /** sets the mininum incoming velocity necessary for bounce */ virtual void SetMinBounceVel(float vel, GenericSurfaceParameter* surface) = 0; - + /** returns the mininum incoming velocity necessary for bounce */ virtual float GetMinBounceVel(GenericSurfaceParameter* surface) const = 0; - + /** sets or resets the error reduction parameter (ERP) mode, useful to make surfaces soft. */ virtual void SetContactSoftERPMode(bool set, GenericSurfaceParameter* surface) = 0; - + /** sets the contact normal error reduction parameter (ERP) */ virtual void SetContactSoftERP(float erp, GenericSurfaceParameter* surface) = 0; - + /** returns the contact normal error reduction parameter (ERP) */ virtual float GetContactSoftERP(GenericSurfaceParameter* surface) const = 0; - + /** sets or resets the constraint force mixing mode (CFM), useful to make surfaces soft */ virtual void SetContactSoftCFMMode(bool set, GenericSurfaceParameter* surface) = 0; - + /** sets the constraint force mixing parameter (CFM) */ virtual void SetContactSoftCFM(float cfm, GenericSurfaceParameter* surface) = 0; - + /** returns the constraint force mixing parameter (CFM) */ virtual float GetContactSoftCFM(GenericSurfaceParameter* surface) const = 0; - + /** sets or resets the force dependent contact slip mode (FDS) */ virtual void SetContactSlipMode (bool set, GenericSurfaceParameter* surface) = 0; - + /** sets the force dependent slip (FDS) in both friction directions */ virtual void SetContactSlip(float slip, GenericSurfaceParameter* surface) = 0; - + /** returns the force dependent slip in the first slip direction (FDS) */ virtual float GetContactSlip1(GenericSurfaceParameter* surface) const = 0; - + /** returns the force dependent slip in the second slip direction (FDS) */ virtual float GetContactSlip2(GenericSurfaceParameter* surface) const = 0; - + /** sets the Coulomb friction coefficient */ virtual void SetContactMu(float mu, GenericSurfaceParameter* surface) = 0; - + /** returns the Coulomb friction coefficient */ virtual float GetContactMu(GenericSurfaceParameter* surface) const = 0; protected: - /** returns \param v1 for \param n =1, \param v2 for /param n =2, and - (\param v1 + \param v2) * 0.5 for \param n =3. Undefined for all + /** returns \param v1 for \param n =1, \param v2 for /param n =2, and + (\param v1 + \param v2) * 0.5 for \param n =3. Undefined for all other values of n. */ virtual float MixValues(const float v1, const float v2, const int n) const = 0; Modified: trunk/spark/lib/oxygen/physicsserver/int/fixedjointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -27,11 +27,13 @@ class OXYGEN_API FixedJointInt{ public: - /** Creates a fixed joint within the physics world specified + virtual ~FixedJointInt() {} + + /** Creates a fixed joint within the physics world specified by \param worldID */ virtual long CreateFixedJoint(long world) = 0; - + /** Declares that the joint specified by \param jointID is a fixed joint */ Modified: trunk/spark/lib/oxygen/physicsserver/int/hinge2jointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -28,11 +28,13 @@ class OXYGEN_API Hinge2JointInt{ public: - /** Creates a hinge2joint within the physics world specified + virtual ~Hinge2JointInt() {} + + /** Creates a hinge2joint within the physics world specified by \param worldID */ virtual long CreateHinge2Joint(long worldID) = 0; - + /** sets the joint anchor point. The joint will try to keep this point on each body together. The input is specified in local coordinates. @@ -41,28 +43,28 @@ const salt::Vector3f& up, const salt::Vector3f& right, long jointID) = 0; - + /** returns the joint anchor point in local coordinates on the first of the two bodies. If the joint is perfectly satisfied, the joint anchor point will be the same for both bodies. */ virtual salt::Vector3f GetAnchor1(long jointID) = 0; - + /** returns the joint anchor point in local coordinates on the second of the two bodies. If the joint is perfectly satisfied, the joint anchor point will be the same for both bodies. */ virtual salt::Vector3f GetAnchor2(long jointID) = 0; - + /** returns one of the hinge2 angles in degrees, measured between the two bodies, or between the body and the static environment. */ virtual float GetAngle(long jointID) = 0; - + /** returns the time derivate of the first of the hinge2 angles */ virtual float GetAngleRate1(long jointID) = 0; - + /** returns the time derivate of the second of the hinge2 angles */ virtual float GetAngleRate2(long jointID) = 0; }; Modified: trunk/spark/lib/oxygen/physicsserver/int/hingejointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/hingejointint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/hingejointint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -28,43 +28,45 @@ class OXYGEN_API HingeJointInt{ public: + virtual ~HingeJointInt() {} + /** Creates a new hingejoint within the physics world specified by \param worldID */ virtual long CreateHingeJoint(long worldID) = 0; - + /** sets the joint anchor point. The joint will try to keep this point on each body together. The input is specified in local coordinates. */ virtual void SetAnchor(const salt::Vector3f& anchor, long jointID) = 0; - + /** returns the joint anchor point in local coordinates on the first of the two bodies. If the joint is perfectly satisfied, the joint anchor point will be the same for both bodies. */ virtual salt::Vector3f GetAnchor1(long jointID) = 0; - + /** returns the joint anchor point in local coordinates on the second of the two bodies. If the joint is perfectly satisfied, the joint anchor point will be the same for both bodies. */ virtual salt::Vector3f GetAnchor2(long jointID) = 0; - + /** Sets the joint axis in the local coordinate system. The connected bodies movements will be constrained to move around this axis. */ virtual void SetAxis(const salt::Vector3f& axis, long jointID) = 0; - + /** Returns the hinge axis in the local coordinate system */ virtual salt::Vector3f GetAxis(long jointID) = 0; - + /** returns the hinge angle in degrees, measured between the two bodies, or between the body and the static environment. */ virtual float GetAngle(long jointID) const = 0; - + /** returns the time derivate of the hinge angle */ virtual float GetAngleRate(long jointID) const = 0; Modified: trunk/spark/lib/oxygen/physicsserver/int/jointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/jointint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/jointint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -37,6 +37,8 @@ class OXYGEN_API JointInt { public: + virtual ~JointInt() {} + /** Returns a pointer to the Joint object that manages the joint specified by \param jointID. */ Modified: trunk/spark/lib/oxygen/physicsserver/int/physicsobjectint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -35,6 +35,8 @@ { public: + virtual ~PhysicsObjectInt() {} + /** converts the rotation part of a salt::Matrix to an engine-specific matrix that arranges the values in a different way */ Modified: trunk/spark/lib/oxygen/physicsserver/int/physicsserverint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/physicsserverint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/physicsserverint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -29,8 +29,9 @@ { class OXYGEN_API PhysicsServerInt -{ +{ public: + virtual ~PhysicsServerInt() {} /** Initialises the physics engine */ virtual void InitEngine() = 0; Modified: trunk/spark/lib/oxygen/physicsserver/int/planecolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/planecolliderint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/planecolliderint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -33,23 +33,25 @@ class OXYGEN_API PlaneColliderInt { public: + virtual ~PlaneColliderInt() {} + /** sets the parameters of the plane equation a*x+b*y+c*z = d , all parameters are given in global coordinates */ virtual void SetPlaneParams(float a, float b, float c, float d, long geomID) = 0; - + /** set the parameters of the plane given a position and a normal vector; all parameters are given in global coordinates */ virtual void SetParams(const salt::Vector3f& pos, salt::Vector3f normal, long geomID) = 0; - + /** returns the depth of the given relative position in the managed plane. Points inside the geom will have positive depth, points outside it will have negative depth, and points on the surface will have zero depth. */ virtual float GetPointDepth(const salt::Vector3f& pos, long geomID) = 0; - + /** Creates a plane collider and returns the ID of the newly created plane */ virtual long CreatePlane() = 0; }; Modified: trunk/spark/lib/oxygen/physicsserver/int/raycolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/raycolliderint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/raycolliderint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -32,14 +32,16 @@ class OXYGEN_API RayColliderInt { /** RayCollider encapsulates an ODE ray geometry "object". - + A ray is different from all the other geom classes in that it does not represent a solid object. It is an infinitely thin line that starts from the geom's position and extends in the direction of the geom's local Z-axis. */ - + public: + virtual ~RayColliderInt() {} + /** Sets the parameters of the ray. * * \param pos starting position of the ray @@ -47,7 +49,7 @@ * \param length length of the ray starting at its position */ virtual void SetParams(salt::Vector3f pos, salt::Vector3f dir, float length, long geomID) = 0; - + /* Creates a ray and returns the ID of the newly created ray */ virtual long CreateRay() = 0; }; Modified: trunk/spark/lib/oxygen/physicsserver/int/rigidbodyint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -34,11 +34,13 @@ { public: - /** Returns a pointer to the abstract RigidBody object that + virtual ~RigidBodyInt() {} + + /** Returns a pointer to the abstract RigidBody object that manages the rigid body specified by \param bodyID */ virtual RigidBody* GetBodyPointer(long bodyID) = 0; - + /** enables this body. Each body can be enabled or disabled. Disabled bodies are effectively turned off and are not updated during a simulation step. Disabling bodies is an @@ -47,84 +49,84 @@ simulation. */ virtual void Enable(long bodyID) = 0; - + /** disables this body */ virtual void Disable(long bodyID) = 0; - + /** returns true if this body is enabled */ virtual bool IsEnabled(long bodyID) const = 0; - + /** sets whether the body is influenced by the world's gravity or not. Bodies are constructed to be influenced by the world's gravity by default. */ virtual void UseGravity(bool f, long bodyID) = 0; - + /** returns true, if this body is influenced by the world's - gravity + gravity */ virtual bool UsesGravity(long bodyID) const = 0; - + /** sets the mass of this body */ virtual void SetMass(float mass, long bodyID) = 0; - + /** Sets the mass parameters of this body */ virtual void SetMassParameters(const GenericMass& mass, long bodyID) = 0; - + /** returns the mass of this body */ virtual float GetMass(long bodyID) const = 0; - + /** sets the mass parameters to represent a sphere of the given radius and density, with the center of mass at (0,0,0) relative to the body. */ virtual void SetSphere(float density, float radius, long bodyID) = 0; - + /** adds a mass representing a sphere of the given radius and density, with the matrix determining its center and orientation */ virtual salt::Vector3f AddSphere(float density, float radius, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; - + /** sets the mass parameters to represent a sphere of the given radius and total mass, with the center of mass at (0,0,0) relative to the body. */ virtual void SetSphereTotal(float total_mass, float radius, long bodyID) = 0; - + /** add a mass representing a sphere of the given radius and total mass, with the matrix determining its center and orientation */ virtual salt::Vector3f AddSphereTotal(float total_mass, float radius, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; - + /** Set the mass parameters to represent a box of the given dimensions and density, with the center of mass at (0,0,0) relative to the body. */ virtual void SetBox(float density, const salt::Vector3f& size, long bodyID) = 0; - + /** Add a mass representing a box of the given dimensions and density, with the matrix determining its center and orientation */ virtual salt::Vector3f AddBox(float density, const salt::Vector3f& size, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; - + /** Set the mass parameters to represent a box of the given dimensions and total mass, with the center of mass at (0,0,0) relative to the body. */ virtual void SetBoxTotal(float total_mass, const salt::Vector3f& size, long bodyID) = 0; - + /** Add a mass representing a box of the given dimensions and total mass, with the matrix determining its center and orientation */ virtual salt::Vector3f AddBoxTotal(float total_mass, const salt::Vector3f& size, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; - + /** Set the mass parameters to represent a flat-ended cylinder of the given parameters and density, with the center of mass at (0,0,0) relative to the body. The radius of the cylinder is @@ -132,14 +134,14 @@ long axis is oriented along the body's z axis. */ virtual void SetCylinder(float density, float radius, float length, long bodyID) = 0; - + /** Add a mass representing a flat-ended cylinder of the given parameters and density, with the matrix determining its center and orientation */ virtual salt::Vector3f AddCylinder(float density, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; - + /** Set the mass parameters to represent a flat-ended cylinder of the given parameters and total mass, with the center of mass at (0,0,0) relative to the body. The radius of the cylinder is @@ -147,14 +149,14 @@ long axis is oriented along the body's z axis. */ virtual void SetCylinderTotal(float total_mass, float radius, float length, long bodyID) = 0; - + /** Add a mass representing a flat-ended cylinder of the given parameters and total mass, with the matrix determining its center and orientation */ virtual salt::Vector3f AddCylinderTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; - + /* Set the mass parameters to represent a capsule of the given parameters and density, with the center of mass at (0,0,0) relative to the body. The radius of the cylinder (and @@ -163,14 +165,14 @@ is oriented along the body's z axis. */ virtual void SetCapsule(float density, float radius, float length, long bodyID) = 0; - + /** Add a mass representing a capsule of the given parameters and density, with the matrix determining its center and orientation */ virtual salt::Vector3f AddCapsule(float density, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; - + /** Set the mass parameters to represent a capsule of the given parameters and total mass, with the center of mass at (0,0,0) relative to the body. The radius of the cylinder (and @@ -179,85 +181,85 @@ is oriented along the body's z axis. */ virtual void SetCapsuleTotal(float total_mass, float radius, float length, long bodyID) = 0; - + /** Add a mass representing a capsule of the given parameters and total mass, with the matrix determining its center and orientation */ virtual salt::Vector3f AddCapsuleTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; - + /** displace the mass center relative to the body frame */ virtual void TranslateMass(const salt::Vector3f& v, long bodyID) = 0; - + /** returns the current linear velocity vector of this body */ virtual salt::Vector3f GetVelocity(long bodyID) const = 0; - + /** sets the current linear velocity of this body */ virtual void SetVelocity(const salt::Vector3f& vel, long bodyID) = 0; - + /** sets the roation of this body */ virtual void SetRotation(const salt::Matrix& rot, long bodyID) = 0; - + /** gets the rotation of this body */ virtual salt::Matrix GetRotation(long bodyID) const = 0; - + /** returns the current angular velocity of this body in local coordinates */ virtual salt::Vector3f GetLocalAngularVelocity(long bodyID) const = 0; - + /** returns the current angular velocity of this body */ virtual salt::Vector3f GetAngularVelocity(long bodyID) const = 0; - + /** sets the current angular velocity of this body */ virtual void SetAngularVelocity(const salt::Vector3f& vel, long bodyID) = 0; - + /** applies a force to the managed body */ virtual void AddForce(const salt::Vector3f& force, long bodyID) = 0; - + /** returns the total force applied to this body */ virtual salt::Vector3f GetForce(long bodyID) const = 0; - + /** aplies a force to the managed body */ virtual void AddTorque(const salt::Vector3f& torque, long bodyID) = 0; - + /** sets the position of the managed body */ virtual void SetPosition(const salt::Vector3f& pos, long bodyID) = 0; - + /** returns the current poosition of this body */ virtual salt::Vector3f GetPosition(long bodyID) const = 0; - + /** destroys the rigid body specified by \param bodyID */ virtual void DestroyRigidBody(long bodyID) = 0; - + /** Gets the matrix needed by the SynchronizeParent method */ virtual salt::Matrix GetSynchronisationMatrix(long bodyID) = 0; - - /** Links the rigid body specified by \param bodyID with the + + /** Links the rigid body specified by \param bodyID with the abstract RigidBody object managing it. This allows retrieving it at a later point. */ virtual void BodySetData(RigidBody* rb, long bodyID) = 0; - + /** Returns a pointer to the abstract RigidBody object managing - the rigid body specified by \param bodyID + the rigid body specified by \param bodyID */ virtual RigidBody* BodyGetData(long bodyID) = 0; - + /** Creates a new rigid body within the physics world specified by \param worldID - */ + */ virtual long CreateBody(long worldID) = 0; - + /** Creates a new mass object with the information passed on to this method via \param mass and \param cVector */ virtual GenericMass& CreateMass(float mass, salt::Vector3f cVector) = 0; - + /** Sets the value of the inertia tensor of this body. \param i is the index of the \param value 's position in the inertia tensor. (It's a 3x3 matrix) */ - virtual void SetInertiaTensorAt(int i, float value, GenericMass& mass) = 0; + virtual void SetInertiaTensorAt(int i, float value, GenericMass& mass) = 0; }; } //namespace oxygen Modified: trunk/spark/lib/oxygen/physicsserver/int/sliderjointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -33,6 +33,8 @@ class OXYGEN_API SliderJointInt { public: + virtual ~SliderJointInt() {} + /** Creates a Slider Joint within the given world */ virtual long CreateSliderJoint(long world) = 0; Modified: trunk/spark/lib/oxygen/physicsserver/int/spaceint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/spaceint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/spaceint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -38,53 +38,55 @@ { public: + virtual ~SpaceInt() {} + virtual long CreateSpace(long spaceID) = 0; - - /** Destroys the space specified by \param spaceID and the + + /** Destroys the space specified by \param spaceID and the contact group specified by \param contactGroup */ virtual void DestroySpace(long contactGroup, long spaceID) = 0; - + /** returns the ID of the containing parent space */ virtual long GetParentSpaceID(long spaceID) = 0; - + /** calls collision detection for this space if internal collision detection is enabled for this space. */ virtual void Collide(long space, Space* callee) = 0; - + /** collide all geoms internal to the space \param callee */ - virtual void Collide2(long obj1, long obj2, Space* callee) = 0; - + virtual void Collide2(long obj1, long obj2, Space* callee) = 0; + /** Creates a Contact Group and returns its ID */ virtual long CreateContactGroup() = 0; - + /** updates internal state after physics calculation */ virtual void PostPhysicsUpdateInternal(long contactGroup) = 0; - - /** Returns true if the physics object specified - by \param objectID is a space - */ + + /** Returns true if the physics object specified + by \param objectID is a space + */ virtual bool ObjectIsSpace(long objectID) = 0; - + /** Retrieves the ID of the body that the geom specified - by \param geomID is linked with + by \param geomID is linked with */ virtual long FetchBody(long geomID) = 0; - + /** Retrieves the ID of the space that the geom specified by \param geomID is inside of */ virtual long FetchSpace(long geomID) = 0; - + /** Returns true if the two bodies specified by \param bodyID1 and \param bodyID2 are connected with a joint */ virtual bool AreConnectedWithJoint(long bodyID1, long bodyID2) = 0; - /** Collides the two geoms managed by \param collider + /** Collides the two geoms managed by \param collider and \param collidee */ - virtual void CollideInternal(boost::shared_ptr<Collider> collider, + virtual void CollideInternal(boost::shared_ptr<Collider> collider, boost::shared_ptr<Collider> collidee, long geomID1, long geomID2) = 0; }; Modified: trunk/spark/lib/oxygen/physicsserver/int/spherecolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/spherecolliderint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/spherecolliderint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -32,22 +32,24 @@ class OXYGEN_API SphereColliderInt { -public: +public: + virtual ~SphereColliderInt() {} + /** sets the radius of the managed sphere geom */ virtual void SetRadius(float r, long geomID) = 0; - + /** get the radius of this sphere */ virtual float GetRadius(long geomID) const = 0; - + /** returns the depth of the given relative position in the managed sphere. Points inside the geom will have positive depth, points outside it will have negative depth, and points on the surface will have zero depth. */ virtual float GetPointDepth(const salt::Vector3f& pos, long geomID) = 0; - + /** Creates a new sphere and returns its ID */ - virtual long CreateSphere() = 0; + virtual long CreateSphere() = 0; }; } //namespace oxygen Modified: trunk/spark/lib/oxygen/physicsserver/int/transformcolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/transformcolliderint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/transformcolliderint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -48,11 +48,13 @@ they allow multiple displaced geoms to be connected to one body. */ -public: +public: + virtual ~TransformColliderInt() {} + /** Creates a new TransformCollider and returns its ID */ virtual long CreateTransformCollider() = 0; - - /** Set the parameters /param cleanup and /param info of the + + /** Set the parameters /param cleanup and /param info of the transformcollider specified by \param geomID */ virtual void SetColliderParameters(int cleanup, int info, long geomID) = 0; Modified: trunk/spark/lib/oxygen/physicsserver/int/universaljointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/universaljointint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/universaljointint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -32,65 +32,67 @@ class OXYGEN_API UniversalJointInt { -public: +public: + virtual ~UniversalJointInt() {} + /** Creates a Universal Joint and returns its ID */ virtual long CreateUniversalJoint(long world) = 0; - + /** sets the joint anchor point. The joint will try to keep this point on each body together. The input is specified in local coordinates. */ virtual void SetAnchor(const salt::Vector3f& anchor, long jointID) = 0; - + /** returns the joint anchor point in local coordinates on the first of the two bodies. If the joint is perfectly satisfied, the joint anchor point will be the same for both bodies. */ virtual salt::Vector3f GetAnchor1(long jointID) = 0; - + /** returns the joint anchor point in local coordinates on the second of the two bodies. If the joint is perfectly satisfied, the joint anchor point will be the same for both bodies. */ virtual salt::Vector3f GetAnchor2(long jointID) = 0; - + /** This function sets up the first axis of the joint \param axis a vector describing the axis in relative coordinates */ virtual void SetAxis1(const salt::Vector3f& axis, long jointID) = 0; - + /** This function sets up the second axis of the joint \param axis a vector describing the axis in local coordinates */ virtual void SetAxis2(const salt::Vector3f& axis, long jointID) = 0; - + /** returns the vector describing the first of the two axis (in local coordinates) \param idx index of the desired axis */ virtual salt::Vector3f GetAxis1(long jointID) const = 0; - + /** returns the vector describing the second of the two axis (in local coordinates) \param idx index of the desired axis */ virtual salt::Vector3f GetAxis2(long jointID) const = 0; - + /** returns the first axis' angles in degrees, measured between the two bodies, or between the body and the static environment. */ virtual float GetAngle1(long jointID) const = 0; - + /** returns the second axis' angles in degrees, measured between the two bodies, or between the body and the static environment. */ virtual float GetAngle2(long jointID) const = 0; - + /** returns the time derivate of the first of the hinge angles */ virtual float GetAngleRate1(long jointID) const = 0; - + /** returns the time derivate of the second of the hinge angles */ virtual float GetAngleRate2(long jointID) const = 0; }; Modified: trunk/spark/lib/oxygen/physicsserver/int/worldint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/worldint.h 2012-05-19 18:17:11 UTC (rev 312) +++ trunk/spark/lib/oxygen/physicsserver/int/worldint.h 2012-05-19 18:40:58 UTC (rev 313) @@ -37,14 +37,16 @@ time, thus one reason to use separate worlds is to simulate systems at different rates. */ - + public: + virtual ~WorldInt() {} + /** sets the gravity vector of this world */ virtual void SetGravity(const salt::Vector3f& gravity, long worldID) = 0; - + /** gets the gravity vector of this world */ virtual salt::Vector3f GetGravity(long worldID) const = 0; - + /** sets the Error Reduction Parameter of this world. The ERP specifies what proportion of a joint error will be fixed during the next simulation step. if ERP=0 then no correcting @@ -57,10 +59,10 @@ is the default). */ virtual void SetERP(float erp, long worldID) = 0; - + /** returns the Error Reduction Parameter of this World. */ virtual float GetERP(long worldID) const = 0; - + /** sets the Constraint Force mixing (CFM) value. If CFM is set to zero, the constraint will be hard. If CFM is set to a positive value, it will be possible to violate the constraint by @@ -71,18 +73,18 @@ have undesirable bad effects, such as instability. */ virtual void SetCFM(float cfm, long worldID) = 0; - + /** returns the Constraint Force mixing (CFM) value. */ virtual float GetCFM(long worldID) const = 0; - + /** steps the world deltatime forward, i.e. performs physics simulation for a deltaTime seconds interval. */ virtual void Step(float deltaTime, long worldID) = 0; - + virtual bool GetAutoDisableFlag(long worldID) const = 0; virtual void SetAutoDisableFlag(bool flag, long worldID) = 0; - + /** Set and get the depth of the surface layer around all geometry objects. Contacts are allowed to sink into the surface layer up to the given depth before coming to rest. The default value is @@ -92,10 +94,10 @@ */ virtual void SetContactSurfaceLayer(float depth, long worldID) = 0; virtual float GetContactSurfaceLayer(long worldID) const = 0; - + /** Create the world an return its ID */ virtual long CreateWorld() = 0; - + /** destroys the world */ virtual void DestroyWorld(long worldID) = 0; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-05-19 18:17:18
|
Revision: 312 http://simspark.svn.sourceforge.net/simspark/?rev=312&view=rev Author: hedayat Date: 2012-05-19 18:17:11 +0000 (Sat, 19 May 2012) Log Message: ----------- Fix the position of right corner kick to use mBallRadius rather than a hard coded value Use new value for corner kick position for RoboCup 2012, to be between the goal and field's corner position Updated RELEASE and NEWS files with information about the new dimensions in this release Updated version to 0.6.6 (CMakeLists.txt) Increased free kick distance to 2.0. Fixed spelling error in GetMonitorInformation() Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/NEWS trunk/rcssserver3d/RELEASE trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.cpp trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.h trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp trunk/rcssserver3d/rcssserver3d/naosoccersim.rb Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2012-05-19 17:21:27 UTC (rev 311) +++ trunk/rcssserver3d/CMakeLists.txt 2012-05-19 18:17:11 UTC (rev 312) @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(rcssserver3d CXX C) -set(PACKAGE_VERSION "0.6.5") +set(PACKAGE_VERSION "0.6.6") ########## check for headerfiles/libraries ########## include(CheckIncludeFile) Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2012-05-19 17:21:27 UTC (rev 311) +++ trunk/rcssserver3d/ChangeLog 2012-05-19 18:17:11 UTC (rev 312) @@ -1,3 +1,30 @@ +2012-05-19 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp + (SoccerRuleAspect::CheckBallLeftField): + - fix the position of right corner kick to use mBallRadius rather than + a hard coded value + - use new value for corner kick position for RoboCup 2012, to be between + the goal and field's corner position + + * NEWS: + * RELEASE: + - added information about the new dimensions in this release + + * CMakeLists.txt: + - updated version to 0.6.6 + + * rcssserver3d/naosoccersim.rb: + - increased free kick distance to 2.0. actually it should be 2.75, but + since we are going to have an artificial corner point it should be + probably smaller too. + + * plugin/soccer/rcs3dmonitor/rcs3dmonitor.h: + * plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp: + * plugin/soccer/sexpmonitor/sexpmonitor.h: + * plugin/soccer/sexpmonitor/sexpmonitor.cpp: + - fixed spelling error in GetMonitorInformation() + 2012-05-17 Hedayat Vatankhah <hed...@gm...> * rcssserver3d/naosoccersim.rb: Modified: trunk/rcssserver3d/NEWS =================================================================== --- trunk/rcssserver3d/NEWS 2012-05-19 17:21:27 UTC (rev 311) +++ trunk/rcssserver3d/NEWS 2012-05-19 18:17:11 UTC (rev 312) @@ -1,3 +1,54 @@ +[0.6.6] +It's time for a new release! This release comes with a number of bug fixes and +several minor enhancements here and there. Now, you can run the server for +two complete halves. Teams now change their sides in the second half. Also, +automatic kick off and automatic quit modes are added. Field dimensions are +also increased to 20x30 meters, and free kick distance is 2.0 meters now. +More detailed information about this release follows: + +* Field Changes: + - New dimensions: 20x30 + - Free kick distance: 2.0 + - Corner kick position: in the middle point between goal and corner of the + field, to facilitate faster corner kicks. + +* Several Bug fixes. Some notable ones are: + - Penalty lines and middle circle are now visible at their actual position + (Thanks to Marcus for his bug report, and Sander). + - Fixed a small bug in parsing move paramter (Thanks to Andreas Seekircher) + - Fixed a mistake which prevented from touch group rules to be applied at all + - Fixed a small bug in goal counting which cause this function to always + count a goal when ball moved out of the field + +* Enhance Automatic Kickoff Support: + - Changed default value of 'WaitBeforeKickOff' to 30, since 5 seconds + is too small for any team to start. + - WaitBeforeKickOff is now calculated from when the first agent connects + rather than from the beginning of the before kickoff playmode (when the + simulator is started) + - A game can be started with kick off for the left team, or using 'coin toss' + to determine which team should start the game. CoinTossForKickOff variable + in naosoccersim.rb can be used to change the behavior. It is disabled + by default. + +* Enhance Support for 'Second Half': + - Automatic Kick Off mode assigns Kick off to the correct team in the second + half + - Change teams' sides in the second half if enabled (enabled by default). It + can be disabled using ChangeSidesInSecondHalf variable in naosoccersim.rb. + +* Automatic Quit: + - In Automatic Quit mode rcsssever3d shuts down automatically when the game + is over. It is disabled by default but can be enabled using 'AutomaticQuit' + variable in naosoccersim.rb + +* Other Enhancements: + - The location of init scripts (e.g. zeitgeist.rb) can now be specified using + --init-script-prefix (you still can put most of the scripts and data files + like rsg/ directory inside your ~/.simspark/ instead). + - Better Windows support + - Support creating Windows binaries under Linux using MinGW + [0.6.5] This release comes with a number of enhancements and some bug fixes. Most notably, the automated referee is improved to prevent many agents to collide Modified: trunk/rcssserver3d/RELEASE =================================================================== --- trunk/rcssserver3d/RELEASE 2012-05-19 17:21:27 UTC (rev 311) +++ trunk/rcssserver3d/RELEASE 2012-05-19 18:17:11 UTC (rev 312) @@ -3,9 +3,16 @@ It's time for a new release! This release comes with a number of bug fixes and several minor enhancements here and there. Now, you can run the server for two complete halves. Teams now change their sides in the second half. Also, -automatic kick off and automatic quit modes are added. More detailed information -about this release follows: +automatic kick off and automatic quit modes are added. Field dimensions are +also increased to 20x30 meters, and free kick distance is 2.0 meters now. +More detailed information about this release follows: +* Field Changes: + - New dimensions: 20x30 + - Free kick distance: 2.0 + - Corner kick position: in the middle point between goal and corner of the + field, to facilitate faster corner kicks. + * Several Bug fixes. Some notable ones are: - Penalty lines and middle circle are now visible at their actual position (Thanks to Marcus for his bug report, and Sander). @@ -37,11 +44,11 @@ variable in naosoccersim.rb * Other Enhancements: -- The location of init scripts (e.g. zeitgeist.rb) can now be specified using + - The location of init scripts (e.g. zeitgeist.rb) can now be specified using --init-script-prefix (you still can put most of the scripts and data files like rsg/ directory inside your ~/.simspark/ instead). -- Better Windows support -- Support creating Windows binaries under Linux using MinGW + - Better Windows support + - Support creating Windows binaries under Linux using MinGW You can get the package on the Simspark page on SourceForge at http://sourceforge.net/projects/simspark/ Modified: trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp 2012-05-19 17:21:27 UTC (rev 311) +++ trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp 2012-05-19 18:17:11 UTC (rev 312) @@ -91,7 +91,7 @@ } } -string RCS3DMonitor::GetMonitorInfomation(const PredicateList& pList) +string RCS3DMonitor::GetMonitorInformation(const PredicateList& pList) { stringstream ss; mFullState = false; Modified: trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h 2012-05-19 17:21:27 UTC (rev 311) +++ trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h 2012-05-19 18:17:11 UTC (rev 312) @@ -82,7 +82,7 @@ * the MonitorServer. The monitor should transfer them to the * client if possible. */ - virtual std::string GetMonitorInfomation(const oxygen::PredicateList& pList); + virtual std::string GetMonitorInformation(const oxygen::PredicateList& pList); /** This function is called once for every MonitorSystem each time * a new client connects. It should return any header/setup Modified: trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.cpp 2012-05-19 17:21:27 UTC (rev 311) +++ trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.cpp 2012-05-19 18:17:11 UTC (rev 312) @@ -213,7 +213,7 @@ } string -SexpMonitor::GetMonitorInfomation(const oxygen::PredicateList& pList) +SexpMonitor::GetMonitorInformation(const oxygen::PredicateList& pList) { if (mGameState->IsFinished()) { Modified: trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.h 2012-05-19 17:21:27 UTC (rev 311) +++ trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.h 2012-05-19 18:17:11 UTC (rev 312) @@ -61,7 +61,7 @@ * the MonitorServer. The monitor should transfer them to the * client if possible. */ - virtual std::string GetMonitorInfomation(const oxygen::PredicateList& pList); + virtual std::string GetMonitorInformation(const oxygen::PredicateList& pList); /** This function is called once for every MonitorSystem each time * a new client connects. It should return any header/setup Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2012-05-19 17:21:27 UTC (rev 311) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2012-05-19 18:17:11 UTC (rev 312) @@ -1034,18 +1034,26 @@ // check corner kick right team else if (last_touch_left && ball_left) { + // temp value for RoboCup 2012 + // correct value: mFieldWidth / 2 - mBallRadius + const float cornerKickY = (mFieldWidth + mGoalWidth) / 4.0 + - mBallRadius; mFreeKickPos[0] = -mFieldLength / 2 + mBallRadius; mFreeKickPos[1] = ball_pos[1] > 0 ? - mFieldWidth / 2 - 0.05 : -mFieldWidth / 2 + 0.05; + cornerKickY : -cornerKickY; mFreeKickPos[2] = mBallRadius; mGameState->SetPlayMode(PM_CORNER_KICK_RIGHT); } // check corner kick left team else { + // temp value for RoboCup 2012 + // correct value: mFieldWidth / 2 - mBallRadius + const float cornerKickY = (mFieldWidth + mGoalWidth) / 4.0 + - mBallRadius; mFreeKickPos[0] = mFieldLength / 2 - mBallRadius; mFreeKickPos[1] = ball_pos[1] > 0 ? - mFieldWidth / 2 - mBallRadius : -mFieldWidth / 2 + mBallRadius; + cornerKickY : -cornerKickY; mFreeKickPos[2] = mBallRadius; mGameState->SetPlayMode(PM_CORNER_KICK_LEFT); } Modified: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-05-19 17:21:27 UTC (rev 311) +++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-05-19 18:17:11 UTC (rev 312) @@ -45,8 +45,8 @@ addSoccerVar('GoalHeight', 0.8) addSoccerVar('PenaltyLength',1.8) addSoccerVar('PenaltyWidth',3.9) -addSoccerVar('FreeKickDistance', 1.3) -addSoccerVar('FreeKickMoveDist', 1.5) +addSoccerVar('FreeKickDistance', 2.0) +addSoccerVar('FreeKickMoveDist', 2.2) addSoccerVar('GoalKickDist', 1.0) addSoccerVar('BorderSize', 0.0) # prevent complaining about missing variable This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-05-19 17:21:33
|
Revision: 311 http://simspark.svn.sourceforge.net/simspark/?rev=311&view=rev Author: hedayat Date: 2012-05-19 17:21:27 +0000 (Sat, 19 May 2012) Log Message: ----------- Prepared NEWS and RELEASE for 0.2.3 release Fixed a spelling error in monitor system's GetMonitorInformation() Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/NEWS trunk/spark/lib/oxygen/monitorserver/monitorserver.cpp trunk/spark/lib/oxygen/monitorserver/monitorsystem.h trunk/spark/plugin/sparkmonitor/sparkmonitor.cpp trunk/spark/plugin/sparkmonitor/sparkmonitor.h Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2012-05-17 09:03:50 UTC (rev 310) +++ trunk/spark/CMakeLists.txt 2012-05-19 17:21:27 UTC (rev 311) @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(simspark CXX C) -set(PACKAGE_VERSION "0.2.2") +set(PACKAGE_VERSION "0.2.3") ########## check for headerfiles/libraries ########## include(CheckIncludeFile) @@ -152,16 +152,16 @@ # 3. Minor version: library changed but without any new interfaces or breaking # compatibility -set(SALT_SO_VERSION 0) -set(SALT_VERSION ${SALT_SO_VERSION}.3.2) +set(SALT_SO_VERSION 1) +set(SALT_VERSION ${SALT_SO_VERSION}.0.0) set(ZEITGEIST_SO_VERSION 3) -set(ZEITGEIST_VERSION ${ZEITGEIST_SO_VERSION}.1.2) -set(OXYGEN_SO_VERSION 5) +set(ZEITGEIST_VERSION ${ZEITGEIST_SO_VERSION}.1.3) +set(OXYGEN_SO_VERSION 6) set(OXYGEN_VERSION ${OXYGEN_SO_VERSION}.0.0) set(KEROSIN_SO_VERSION 2) -set(KEROSIN_VERSION ${KEROSIN_SO_VERSION}.0.0) -set(SPARK_SO_VERSION 0) -set(SPARK_VERSION ${SPARK_SO_VERSION}.0.1) +set(KEROSIN_VERSION ${KEROSIN_SO_VERSION}.1.0) +set(SPARK_SO_VERSION 1) +set(SPARK_VERSION ${SPARK_SO_VERSION}.0.0) set(RCSSNET_SO_VERSION 0) set(RCSSNET_VERSION ${RCSSNET_SO_VERSION}.1.0) Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2012-05-17 09:03:50 UTC (rev 310) +++ trunk/spark/ChangeLog 2012-05-19 17:21:27 UTC (rev 311) @@ -1,3 +1,15 @@ +2012-05-19 Hedayat Vatankhah <hed...@gm...> + + * NEWS: + * CMakeLists.txt: + - updated for 0.2.3 release + + * plugin/sparkmonitor/sparkmonitor.cpp: + * plugin/sparkmonitor/sparkmonitor.h: + * lib/oxygen/monitorserver/monitorsystem.h: + * lib/oxygen/monitorserver/monitorserver.cpp: + - fixed a small spelling error + 2012-05-16 Hedayat Vatankhah <hed...@gm...> * RELEASE: Modified: trunk/spark/NEWS =================================================================== --- trunk/spark/NEWS 2012-05-17 09:03:50 UTC (rev 310) +++ trunk/spark/NEWS 2012-05-19 17:21:27 UTC (rev 311) @@ -1,3 +1,28 @@ +[0.2.3] +Finally, a new release of simspark has come! The most exciting feature of this +release is probably the multi-threaded agent control (thanks to Andreas from +RoboCanes for the initial patch). Previously, this part of the code was +sequential even in multi-threaded mode, but now it can manage several agnets in +parallel which should (hopefully!) increase performance. Besides, there are +a number of compilation and bug fixes here and there and also better Windows +support. Small enhancements are also available. You can find more details below: + +- Multi-threaded Agent Control + -- AgentControl multi-threaded implementation added and enabled by default. + It can be disabled using $threadedAgentControl variable inside spark.rb. +- OpenGL System can now request the end of simulation (makes it possible to + close spark monitor's window to quit! +- The location of init scripts (e.g. zeitgeist.rb) can now be specified using + --init-script-prefix (you still can put most of the scripts and data files + like rsg/ directory inside your ~/.simspark/ instead). +- Compilation fixes +- Support more recent Ruby versions +- Windows Compilation fixes, and few enhancements for better Windows support +- Support for building Windows binary in GNU/Linux using Mingw32 + -- Notice: Windows related changes were already used in 0.2.2 simspark + installer +- Several bug fixes + [0.2.2] This release features many small enhancements which will benefit users. It contains many bug fixes and performance improvements, in addition to Modified: trunk/spark/lib/oxygen/monitorserver/monitorserver.cpp =================================================================== --- trunk/spark/lib/oxygen/monitorserver/monitorserver.cpp 2012-05-17 09:03:50 UTC (rev 310) +++ trunk/spark/lib/oxygen/monitorserver/monitorserver.cpp 2012-05-19 17:21:27 UTC (rev 311) @@ -193,7 +193,7 @@ PredicateList pList; CollectItemPredicates(false,pList); - mData = monitorSystem->GetMonitorInfomation(pList); + mData = monitorSystem->GetMonitorInformation(pList); mDataCycle = cycle; return mData; } Modified: trunk/spark/lib/oxygen/monitorserver/monitorsystem.h =================================================================== --- trunk/spark/lib/oxygen/monitorserver/monitorsystem.h 2012-05-17 09:03:50 UTC (rev 310) +++ trunk/spark/lib/oxygen/monitorserver/monitorsystem.h 2012-05-19 17:21:27 UTC (rev 311) @@ -60,7 +60,7 @@ * the MonitorServer. The monitor should transfer them to the * client if possible. */ - virtual std::string GetMonitorInfomation(const PredicateList& pList) = 0; + virtual std::string GetMonitorInformation(const PredicateList& pList) = 0; /** If a monitor sends information to the world model, this * function is called to process it. Modified: trunk/spark/plugin/sparkmonitor/sparkmonitor.cpp =================================================================== --- trunk/spark/plugin/sparkmonitor/sparkmonitor.cpp 2012-05-17 09:03:50 UTC (rev 310) +++ trunk/spark/plugin/sparkmonitor/sparkmonitor.cpp 2012-05-19 17:21:27 UTC (rev 311) @@ -91,7 +91,7 @@ } } -string SparkMonitor::GetMonitorInfomation(const PredicateList& pList) +string SparkMonitor::GetMonitorInformation(const PredicateList& pList) { stringstream ss; mFullState = false; Modified: trunk/spark/plugin/sparkmonitor/sparkmonitor.h =================================================================== --- trunk/spark/plugin/sparkmonitor/sparkmonitor.h 2012-05-17 09:03:50 UTC (rev 310) +++ trunk/spark/plugin/sparkmonitor/sparkmonitor.h 2012-05-19 17:21:27 UTC (rev 311) @@ -80,7 +80,7 @@ * the MonitorServer. The monitor should transfer them to the * client if possible. */ - virtual std::string GetMonitorInfomation(const oxygen::PredicateList& pList); + virtual std::string GetMonitorInformation(const oxygen::PredicateList& pList); /** This function is called once for every MonitorSystem each time * a new client connects. It should return any header/setup This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-05-17 09:04:01
|
Revision: 310 http://simspark.svn.sourceforge.net/simspark/?rev=310&view=rev Author: hedayat Date: 2012-05-17 09:03:50 +0000 (Thu, 17 May 2012) Log Message: ----------- Fix middle circle radius to be equal to FreeKickDist. Enlarge soccer field to 20x30 Updated release notes Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/RELEASE trunk/rcssserver3d/data/rsg/agent/nao/soccer.rsg trunk/rcssserver3d/rcssserver3d/naosoccersim.rb Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2012-05-16 17:04:06 UTC (rev 309) +++ trunk/rcssserver3d/ChangeLog 2012-05-17 09:03:50 UTC (rev 310) @@ -1,3 +1,11 @@ +2012-05-17 Hedayat Vatankhah <hed...@gm...> + + * rcssserver3d/naosoccersim.rb: + - use new field dimensions: 20x30 + + * data/rsg/agent/nao/soccer.rsg: + - The radius of center circle (field ring) should be equal to + FreeKickDistance (they are equal in FIFA rules too) 2012-05-16 Hedayat Vatankhah <hed...@gm...> * RELEASE: Modified: trunk/rcssserver3d/RELEASE =================================================================== --- trunk/rcssserver3d/RELEASE 2012-05-16 17:04:06 UTC (rev 309) +++ trunk/rcssserver3d/RELEASE 2012-05-17 09:03:50 UTC (rev 310) @@ -7,8 +7,8 @@ about this release follows: * Several Bug fixes. Some notable ones are: - - Penalty lines are now visible at their actual position (Thanks to Marcus for - his bug report) + - Penalty lines and middle circle are now visible at their actual position + (Thanks to Marcus for his bug report, and Sander). - Fixed a small bug in parsing move paramter (Thanks to Andreas Seekircher) - Fixed a mistake which prevented from touch group rules to be applied at all - Fixed a small bug in goal counting which cause this function to always Modified: trunk/rcssserver3d/data/rsg/agent/nao/soccer.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/soccer.rsg 2012-05-16 17:04:06 UTC (rev 309) +++ trunk/rcssserver3d/data/rsg/agent/nao/soccer.rsg 2012-05-17 09:03:50 UTC (rev 310) @@ -12,6 +12,7 @@ (def $GoalDepth (eval Soccer.GoalDepth)) (def $PenaltyLength (eval Soccer.PenaltyLength)) (def $PenaltyWidth (eval Soccer.PenaltyWidth + Soccer.GoalWidth)) + (def $FreeKickDistance (eval Soccer.FreeKickDistance)) ;; height of the field ground plane (def $FieldMaterial matGrass) @@ -261,7 +262,7 @@ ;; ring (importScene rsg/agent/fieldring.rsg - 1.8) + $FreeKickDistance) ;; ;; add the ball Modified: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-05-16 17:04:06 UTC (rev 309) +++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-05-17 09:03:50 UTC (rev 310) @@ -37,8 +37,8 @@ end # the soccer field dimensions in meters -addSoccerVar('FieldLength', 21.0) -addSoccerVar('FieldWidth', 14.0) +addSoccerVar('FieldLength', 30.0) +addSoccerVar('FieldWidth', 20.0) addSoccerVar('FieldHeight', 40.0) addSoccerVar('GoalWidth', 2.1) addSoccerVar('GoalDepth', 0.6) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-05-16 17:04:17
|
Revision: 309 http://simspark.svn.sourceforge.net/simspark/?rev=309&view=rev Author: hedayat Date: 2012-05-16 17:04:06 +0000 (Wed, 16 May 2012) Log Message: ----------- Add first draft of release notes for 0.6.6 Fixed a small bug in trainercommandparser Disable AutomaticQuit by default Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/RELEASE trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp trunk/rcssserver3d/rcssserver3d/naosoccersim.rb Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2012-05-16 17:01:57 UTC (rev 308) +++ trunk/rcssserver3d/ChangeLog 2012-05-16 17:04:06 UTC (rev 309) @@ -1,11 +1,20 @@ 2012-05-16 Hedayat Vatankhah <hed...@gm...> + * RELEASE: + - initial version for 0.6.6 release + + * plugin/soccer/trainercommandparser/trainercommandparser.cpp + (TrainerCommandParser::OnLink): + - fixed a typo where mGameControl was checked instead of mSimServer to see + if it is valid + * data/rsg/agent/nao/soccer.rsg: - use correct penalty width which is equal to PenaltyWidth + GoalWidth * rcssserver3d/naosoccersim.rb: - changed default value of 'WaitBeforeKickOff' to 30, since 5 seconds is too small for any team to start. + - disabled AutomaticQuit mode by default for consistency with older versions 2012-04-15 Hedayat Vatankhah <hed...@gm...> Modified: trunk/rcssserver3d/RELEASE =================================================================== --- trunk/rcssserver3d/RELEASE 2012-05-16 17:01:57 UTC (rev 308) +++ trunk/rcssserver3d/RELEASE 2012-05-16 17:04:06 UTC (rev 309) @@ -1,37 +1,47 @@ -RELEASE News of rcssserver3d-0.6.5 +RELEASE News of rcssserver3d-0.6.6 -This release comes with a number of enhancements and some bug fixes. Most -notably, the automated referee is improved to prevent many agents to collide -with each other which is required for running games with more players. Also, to -better suite the field for running 9 vs 9 games, the field size is increased -and it is 21x14 now. There are some visual improvements and minor enhancements -to improve the general experience with the simulator. Finally, simspark.rb is -renamed to rcssserver3d.rb for more consistency. +It's time for a new release! This release comes with a number of bug fixes and +several minor enhancements here and there. Now, you can run the server for +two complete halves. Teams now change their sides in the second half. Also, +automatic kick off and automatic quit modes are added. More detailed information +about this release follows: -* New touch rules: -The automated referee now enforces two new rules to better prevent crowding and -a high number of collisions in 9 vs 9 games: -- If an agent is in touch with more than 2 agents (including himself), and he - wasn't in such a situation in the previous time step - which means he is the - last to join the group - he is relocated outside of the field. However, if - the number of opponents in the group are more than teammates, an unspecified - opponent will be relocated instead. -- If it is not clear which agent joined the group last, e.g. when 3 players - were all separate at time t, but were all touching each other in time t + 1, - an agent is chosen at random for relocation. +* Several Bug fixes. Some notable ones are: + - Penalty lines are now visible at their actual position (Thanks to Marcus for + his bug report) + - Fixed a small bug in parsing move paramter (Thanks to Andreas Seekircher) + - Fixed a mistake which prevented from touch group rules to be applied at all + - Fixed a small bug in goal counting which cause this function to always + count a goal when ball moved out of the field +* Enhance Automatic Kickoff Support: + - Changed default value of 'WaitBeforeKickOff' to 30, since 5 seconds + is too small for any team to start. + - WaitBeforeKickOff is now calculated from when the first agent connects + rather than from the beginning of the before kickoff playmode (when the + simulator is started) + - A game can be started with kick off for the left team, or using 'coin toss' + to determine which team should start the game. CoinTossForKickOff variable + in naosoccersim.rb can be used to change the behavior. It is disabled + by default. + +* Enhance Support for 'Second Half': + - Automatic Kick Off mode assigns Kick off to the correct team in the second + half + - Change teams' sides in the second half if enabled (enabled by default). It + can be disabled using ChangeSidesInSecondHalf variable in naosoccersim.rb. + +* Automatic Quit: + - In Automatic Quit mode rcsssever3d shuts down automatically when the game + is over. It is disabled by default but can be enabled using 'AutomaticQuit' + variable in naosoccersim.rb + * Other Enhancements: -- Visual improvements in rcssmonitor3d: new field texture, colored team names - and scores -- Set different agent and monitor ports with --agent-port and --server-port -- Bigger field size: 21x14 -- Updated PDF documentation -- Bug fixes, specially in the automated referee -- New Trainer command (killsim) to terminate the simulator -- Compilation fixes -- Nao robots now sense visual information about field lines by default -- Now you should change the value of enableRealTimeMode variable in - rcssserver3d.rb if you want to turn off using real time mode +- The location of init scripts (e.g. zeitgeist.rb) can now be specified using + --init-script-prefix (you still can put most of the scripts and data files + like rsg/ directory inside your ~/.simspark/ instead). +- Better Windows support +- Support creating Windows binaries under Linux using MinGW You can get the package on the Simspark page on SourceForge at http://sourceforge.net/projects/simspark/ Modified: trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp 2012-05-16 17:01:57 UTC (rev 308) +++ trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp 2012-05-16 17:04:06 UTC (rev 309) @@ -125,7 +125,7 @@ mSimServer = shared_dynamic_cast<SimulationServer> (GetCore()->Get("/sys/server/simulation")); - if (mGameControl.get() == 0) + if (mSimServer.get() == 0) { GetLog()->Error() << "ERROR: (TrainerCommandParser) Unable to get SimulationServer\n"; } Modified: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-05-16 17:01:57 UTC (rev 308) +++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-05-16 17:04:06 UTC (rev 309) @@ -55,7 +55,7 @@ addSoccerVar('WaitBeforeKickOff', 30.0) addSoccerVar('CoinTossForKickOff', false) -addSoccerVar('AutomaticQuit', true) +addSoccerVar('AutomaticQuit', false) addSoccerVar('ChangeSidesInSecondHalf', true) # agent parameters This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-05-16 17:02:03
|
Revision: 308 http://simspark.svn.sourceforge.net/simspark/?rev=308&view=rev Author: hedayat Date: 2012-05-16 17:01:57 +0000 (Wed, 16 May 2012) Log Message: ----------- First draft of release notes for simspark 0.2.3 Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/RELEASE Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2012-05-16 12:20:35 UTC (rev 307) +++ trunk/spark/ChangeLog 2012-05-16 17:01:57 UTC (rev 308) @@ -1,3 +1,8 @@ +2012-05-16 Hedayat Vatankhah <hed...@gm...> + + * RELEASE: + - initial version for 0.2.3 release + 2012-04-12 Hedayat Vatankhah <hed...@gm...> * spark/spark.cpp (Spark::Init): Modified: trunk/spark/RELEASE =================================================================== --- trunk/spark/RELEASE 2012-05-16 12:20:35 UTC (rev 307) +++ trunk/spark/RELEASE 2012-05-16 17:01:57 UTC (rev 308) @@ -1,23 +1,30 @@ -RELEASE News of simspark-0.2.2 +RELEASE News of simspark-0.2.3 -This release features many small enhancements which will benefit users. -It contains many bug fixes and performance improvements, in addition to -fixing some compilation issues. The behavior of ACC perceptor has been slightly -changed, and the multi-threaded mode should work without any known bugs. -Support for the camera sensor is improved too. More details are as follows: +Finally, a new release of simspark has come! The most exciting feature of this +release is probably the multi-threaded agent control (thanks to Andreas from +RoboCanes for the initial patch). Previously, this part of the code was +sequential even in multi-threaded mode, but now it can manage several agnets in +parallel which should (hopefully!) increase performance. Besides, there are +a number of compilation and bug fixes here and there and also better Windows +support. Small enhancements are also available. You can find more details below: -- ACC sensor provides raw data without any pre-processing - -- You can apply the following filter to 'RawACC' value received from the - simulator to get ACC value as what you'd receive in previous versions: - ACC = 0.9 * ACC + (0.1) * RawACC -- Using base64 encoding for camera perceptor -- Fixed bugs in multi-threaded mode. +- Multi-threaded Agent Control + -- AgentControl multi-threaded implementation added and enabled by default. + It can be disabled using $threadedAgentControl variable inside spark.rb. +- OpenGL System can now request the end of simulation (makes it possible to + close spark monitor's window to quit! +- The location of init scripts (e.g. zeitgeist.rb) can now be specified using + --init-script-prefix (you still can put most of the scripts and data files + like rsg/ directory inside your ~/.simspark/ instead). - Compilation fixes -- HingePerceptor can report torque -- Better Performance -- New timing system result in more cleaner code and prevent wasting CPU time -- Do not block on sending data to clients. Previously, simulator would block on - send() until it can send all data to clients. +- Support more recent Ruby versions +- Windows Compilation fixes, and few enhancements for better Windows support +- Support for building Windows binary in GNU/Linux using Mingw32 + -- Notice: Windows related changes were already used in 0.2.2 simspark + installer +- Several bug fixes +Thanks to Yuan Xu and Sander van Dijk for their contributions in this release. + You can get the package on the Simspark page on SourceForge at http://sourceforge.net/projects/simspark/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-05-16 12:20:44
|
Revision: 307 http://simspark.svn.sourceforge.net/simspark/?rev=307&view=rev Author: hedayat Date: 2012-05-16 12:20:35 +0000 (Wed, 16 May 2012) Log Message: ----------- Increased WaitBeforeKickoff time to 30 seconds Fix the position of penalty lines in visual percepts Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/data/rsg/agent/nao/soccer.rsg trunk/rcssserver3d/rcssserver3d/naosoccersim.rb Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2012-04-16 09:46:12 UTC (rev 306) +++ trunk/rcssserver3d/ChangeLog 2012-05-16 12:20:35 UTC (rev 307) @@ -1,3 +1,12 @@ +2012-05-16 Hedayat Vatankhah <hed...@gm...> + + * data/rsg/agent/nao/soccer.rsg: + - use correct penalty width which is equal to PenaltyWidth + GoalWidth + + * rcssserver3d/naosoccersim.rb: + - changed default value of 'WaitBeforeKickOff' to 30, since 5 seconds + is too small for any team to start. + 2012-04-15 Hedayat Vatankhah <hed...@gm...> * plugin/soccer/trainercommandparser/trainercommandparser.cpp Modified: trunk/rcssserver3d/data/rsg/agent/nao/soccer.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/soccer.rsg 2012-04-16 09:46:12 UTC (rev 306) +++ trunk/rcssserver3d/data/rsg/agent/nao/soccer.rsg 2012-05-16 12:20:35 UTC (rev 307) @@ -11,7 +11,7 @@ (def $FieldHeight (eval Soccer.FieldHeight)) (def $GoalDepth (eval Soccer.GoalDepth)) (def $PenaltyLength (eval Soccer.PenaltyLength)) - (def $PenaltyWidth (eval Soccer.PenaltyWidth)) + (def $PenaltyWidth (eval Soccer.PenaltyWidth + Soccer.GoalWidth)) ;; height of the field ground plane (def $FieldMaterial matGrass) Modified: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-04-16 09:46:12 UTC (rev 306) +++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-05-16 12:20:35 UTC (rev 307) @@ -52,7 +52,7 @@ # soccer game settings addSoccerVar('AutomaticKickOff', false) -addSoccerVar('WaitBeforeKickOff', 5.0) +addSoccerVar('WaitBeforeKickOff', 30.0) addSoccerVar('CoinTossForKickOff', false) addSoccerVar('AutomaticQuit', true) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-04-16 09:46:18
|
Revision: 306 http://simspark.svn.sourceforge.net/simspark/?rev=306&view=rev Author: hedayat Date: 2012-04-16 09:46:12 +0000 (Mon, 16 Apr 2012) Log Message: ----------- Prevents error messages about missing rb files when they are available in the default directory structure. Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp trunk/spark/spark/spark.cpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2012-04-16 09:41:37 UTC (rev 305) +++ trunk/spark/ChangeLog 2012-04-16 09:46:12 UTC (rev 306) @@ -1,3 +1,13 @@ +2012-04-12 Hedayat Vatankhah <hed...@gm...> + + * spark/spark.cpp (Spark::Init): + - set default relpath to empty string, since "../../" is not a usable + default value (doesn't work in the current project's directory structure) + and also to prevent "script not found" error messages + + * lib/zeitgeist/scriptserver/scriptserver.cpp (ScriptServer::RunInitScript): + - only check mRelPathPrefix if not empty + 2012-04-10 Hedayat Vatankhah <hed...@gm...> * lib/oxygen/simulationserver/agentcontrol.h: Modified: trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp =================================================================== --- trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2012-04-16 09:41:37 UTC (rev 305) +++ trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2012-04-16 09:46:12 UTC (rev 306) @@ -615,22 +615,24 @@ ERunScriptErrorType result = eNotFound; // Trying directory given in mRelPathPrefix - result = RunInitScriptInternal(mRelPathPrefix, fileName, validDotDir, dotDir); - if (result == eOK) + if (!mRelPathPrefix.empty()) { - GetLog()->Debug() << "(ScriptServer) : Ran init script '" - << mRelPathPrefix << salt::RFile::Sep() << fileName << "'\n"; - return true; + result = RunInitScriptInternal(mRelPathPrefix, fileName, validDotDir, dotDir); + if (result == eOK) + { + GetLog()->Debug() << "(ScriptServer) : Ran init script '" + << mRelPathPrefix << salt::RFile::Sep() << fileName << "'\n"; + return true; + } + else if (result == eError) + { + GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" + << mRelPathPrefix << salt::RFile::Sep() << fileName << "'\n"; + return false; + } } - else if (result == eError) - { - GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" - << mRelPathPrefix << salt::RFile::Sep() << fileName << "'\n"; - return false; - } - if (validDotDir) { // Trying dot-dir in home directory Modified: trunk/spark/spark/spark.cpp =================================================================== --- trunk/spark/spark/spark.cpp 2012-04-16 09:41:37 UTC (rev 305) +++ trunk/spark/spark/spark.cpp 2012-04-16 09:46:12 UTC (rev 306) @@ -100,7 +100,7 @@ Spark::Init(int argc, char** argv) { // See if user gave path prefix for init scripts - string relPathPrefix = "../.."; + string relPathPrefix = ""; for (int i = 1; i < argc; ++i) { if (strcmp(argv[i], "--init-script-prefix") == 0) @@ -120,7 +120,7 @@ ( "spark.rb", "lib/spark", - ScriptServer::IS_COMMON + ScriptServer::IS_USERLOCAL ); UpdateCached(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-04-16 09:41:48
|
Revision: 305 http://simspark.svn.sourceforge.net/simspark/?rev=305&view=rev Author: hedayat Date: 2012-04-16 09:41:37 +0000 (Mon, 16 Apr 2012) Log Message: ----------- Fixed a small bug in TrainerCommandParser Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2012-04-09 21:00:07 UTC (rev 304) +++ trunk/rcssserver3d/ChangeLog 2012-04-16 09:41:37 UTC (rev 305) @@ -1,3 +1,9 @@ +2012-04-15 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/trainercommandparser/trainercommandparser.cpp + (TrainerCommandParser::ParsePlayerCommand): + - fixed a small bug in parsing move paramter (Thanks to Andreas Seekircher) + 2012-04-10 Hedayat Vatankhah <hed...@gm...> * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp Modified: trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp 2012-04-09 21:00:07 UTC (rev 304) +++ trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp 2012-04-16 09:41:37 UTC (rev 305) @@ -52,7 +52,7 @@ mCommandMap["repos"] = CT_REPOS; mCommandMap["killsim"] = CT_KILLSIM; mCommandMap["reqfullstate"] = CT_REQFULLSTATE; - + // setup team index map // Originally team sides were "L","R" and "N" // But this seems to be unused @@ -124,7 +124,7 @@ mSimServer = shared_dynamic_cast<SimulationServer> (GetCore()->Get("/sys/server/simulation")); - + if (mGameControl.get() == 0) { GetLog()->Error() << "ERROR: (TrainerCommandParser) Unable to get SimulationServer\n"; @@ -132,7 +132,7 @@ mMonitorControl = shared_dynamic_cast<MonitorControl> (mSimServer->GetControlNode("MonitorControl")); - + if (mMonitorControl.get() == 0) { GetLog()->Error() << "ERROR: (TrainerCommandParser) Unable to get MonitorControl\n"; @@ -235,7 +235,7 @@ case CT_REQFULLSTATE: mMonitorControl->RequestFullState(); break; - + default: return false; } @@ -244,7 +244,7 @@ } void TrainerCommandParser::ParsePlayerCommand(const oxygen::Predicate & predicate) -{ +{ Predicate::Iterator unumParam(predicate); int unum; bool specified = true; @@ -257,7 +257,7 @@ } else specified = false; - + string team; TTeamIndex idx; Predicate::Iterator teamParam(predicate); @@ -269,7 +269,7 @@ specified = false; else idx = mTeamIndexMap[team]; - } + } else specified = false; @@ -278,17 +278,17 @@ mSoccerRule->ClearSelectedPlayers(); return; } - + SoccerBase::TAgentStateList agentStates; - SoccerBase::GetAgentStates(*this, agentStates, (specified ? idx : TI_NONE)); + SoccerBase::GetAgentStates(*this, agentStates, (specified ? idx : TI_NONE)); SoccerBase::TAgentStateList::iterator iter = agentStates.begin(); bool found = false; while (iter != agentStates.end() && !found) - { + { if ((specified && (*iter)->GetUniformNumber() == unum && (*iter)->GetTeamIndex() == idx) || (!specified && (*iter)->IsSelected())) - found = true; + found = true; else ++iter; } @@ -296,7 +296,7 @@ if (!found) { GetLog()->Error() << "(TrainerCommandParser) ERROR: can't get correct AgentState\n"; - return; + return; } Predicate::Iterator posParam(predicate); @@ -332,7 +332,7 @@ float ang; // extract position vector - if (! predicate.GetValue(moveParam, pos)) + if (! predicate.AdvanceValue(moveParam, pos)) { GetLog()->Error() << "(TrainerCommandParser) ERROR: can't get agent rot\n"; return; @@ -358,7 +358,7 @@ } } - // Joschka: I removed the part to set a velocity because it doesn't really + // Joschka: I removed the part to set a velocity because it doesn't really // seem to have a meaning for agents that have more than just a single body Predicate::Iterator batParam(predicate); @@ -372,11 +372,11 @@ { GetLog()->Error() << "(TrainerCommandParser) ERROR: can't get battery value\n"; return; - } + } // set new battery (*iter)->SetBattery(battery); - + } Predicate::Iterator tempParam(predicate); @@ -391,17 +391,17 @@ GetLog()->Error() << "(TrainerCommandParser) ERROR: can't get temperatur value\n"; return; } - + // set new temperature (*iter)->SetBattery(temperature); - + } } void TrainerCommandParser::ParseBallCommand(const oxygen::Predicate& predicate) { - Predicate::Iterator posParam(predicate); + Predicate::Iterator posParam(predicate); if (predicate.FindParameter(posParam, "pos")) { @@ -412,7 +412,7 @@ { GetLog()->Error() << "(TrainerCommandParser) ERROR: can't get ball pos\n"; return; - } + } boost::shared_ptr<RigidBody> body; @@ -515,7 +515,7 @@ { GetLog()->Error() << "(TrainerCommandParser) ERROR: unknown team" << team << "\n"; - + } } else @@ -527,11 +527,11 @@ } void TrainerCommandParser::ParseSelectCommand(const oxygen::Predicate & predicate) -{ +{ Predicate::Iterator unumParam(predicate); int unum; bool specified = true; - + boost::shared_ptr<SoccerRuleAspect> soccerRuleAspect; if (!SoccerBase::GetSoccerRuleAspect(*this, soccerRuleAspect)) { @@ -547,13 +547,13 @@ } else specified = false; - + if (specified && unum == -1) { soccerRuleAspect->ResetAgentSelection(); return; } - + string team; TTeamIndex idx; Predicate::Iterator teamParam(predicate); @@ -565,26 +565,26 @@ specified = false; else idx = mTeamIndexMap[team]; - } + } else specified = false; - + if (!specified) { soccerRuleAspect->SelectNextAgent(); return; } - + SoccerBase::TAgentStateList agentStates; - SoccerBase::GetAgentStates(*this, agentStates, idx); + SoccerBase::GetAgentStates(*this, agentStates, idx); SoccerBase::TAgentStateList::iterator iter = agentStates.begin(); bool found = false; while (iter != agentStates.end() && !found) - { - if ((*iter)->GetUniformNumber() == unum) + { + if ((*iter)->GetUniformNumber() == unum) { - found = true; + found = true; } else ++iter; @@ -593,7 +593,7 @@ if (!found) { GetLog()->Error() << "(TrainerCommandParser) ERROR: can't get correct AgentState\n"; - return; + return; } soccerRuleAspect->ResetAgentSelection(); @@ -601,11 +601,11 @@ } void TrainerCommandParser::ParseKillCommand(const oxygen::Predicate & predicate) -{ +{ Predicate::Iterator unumParam(predicate); int unum; bool specified = true; - + boost::shared_ptr<SoccerRuleAspect> soccerRuleAspect; if (!SoccerBase::GetSoccerRuleAspect(*this, soccerRuleAspect)) { @@ -621,7 +621,7 @@ } else specified = false; - + string team; TTeamIndex idx; Predicate::Iterator teamParam(predicate); @@ -633,10 +633,10 @@ specified = false; else idx = mTeamIndexMap[team]; - } + } else specified = false; - + GameControlServer::TAgentAspectList agentAspects; mGameControl->GetAgentAspectList(agentAspects); GameControlServer::TAgentAspectList::iterator aaiter; @@ -660,13 +660,13 @@ } void TrainerCommandParser::ParseReposCommand(const oxygen::Predicate & predicate) -{ +{ cerr << "repos 2" << endl; Predicate::Iterator unumParam(predicate); int unum; bool specified = true; - + boost::shared_ptr<SoccerRuleAspect> soccerRuleAspect; if (!SoccerBase::GetSoccerRuleAspect(*this, soccerRuleAspect)) { @@ -682,7 +682,7 @@ } else specified = false; - + string team; TTeamIndex idx; Predicate::Iterator teamParam(predicate); @@ -694,12 +694,12 @@ specified = false; else idx = mTeamIndexMap[team]; - } + } else specified = false; SoccerBase::TAgentStateList agentStates; - SoccerBase::GetAgentStates(*this, agentStates, TI_NONE); + SoccerBase::GetAgentStates(*this, agentStates, TI_NONE); SoccerBase::TAgentStateList::iterator iter = agentStates.begin(); boost::shared_ptr<oxygen::Transform> agent_aspect; for (;iter != agentStates.end(); ++iter) @@ -715,14 +715,14 @@ SoccerBase::GetTransformParent(**iter, agent_aspect); cerr << "repos 3" << endl; - Vector3f new_pos = mSoccerRule->RepositionOutsidePos(ballPos, (*iter)->GetUniformNumber(), (*iter)->GetTeamIndex()); - SoccerBase::MoveAgent(agent_aspect, new_pos); + Vector3f new_pos = mSoccerRule->RepositionOutsidePos(ballPos, (*iter)->GetUniformNumber(), (*iter)->GetTeamIndex()); + SoccerBase::MoveAgent(agent_aspect, new_pos); break; } } } - + void TrainerCommandParser::ParseKillSimCommand(const oxygen::Predicate & predicate) { mSimServer->Quit(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-04-09 21:00:13
|
Revision: 304 http://simspark.svn.sourceforge.net/simspark/?rev=304&view=rev Author: hedayat Date: 2012-04-09 21:00:07 +0000 (Mon, 09 Apr 2012) Log Message: ----------- Multi-threaded AgentControl patch by Andreas Seekircher added with some cleanups. It is now enabled by default but might be disabled for the next release if suspected. Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp trunk/spark/lib/oxygen/simulationserver/agentcontrol.h trunk/spark/lib/oxygen/simulationserver/agentcontrol_c.cpp trunk/spark/spark/spark.rb Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2012-04-09 20:46:44 UTC (rev 303) +++ trunk/spark/ChangeLog 2012-04-09 21:00:07 UTC (rev 304) @@ -1,3 +1,15 @@ +2012-04-10 Hedayat Vatankhah <hed...@gm...> + + * lib/oxygen/simulationserver/agentcontrol.h: + * lib/oxygen/simulationserver/agentcontrol.cpp: + * lib/oxygen/simulationserver/agentcontrol_c.cpp: + - AgentControl multi-threaded implementation added with some cleanups. + Thanks to Andreas Seekircher for providing the patch. + + * spark/spark.rb: + - sets AgentControls multi-threaded mode according to $threadedAgentControl + variable + 2012-04-07 Hedayat Vatankhah <hed...@gm...> * lib/oxygen/simulationserver/simulationserver.cpp (SimulationServer::Step): Modified: trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp 2012-04-09 20:46:44 UTC (rev 303) +++ trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp 2012-04-09 21:00:07 UTC (rev 304) @@ -29,13 +29,16 @@ using namespace boost; using namespace std; -AgentControl::AgentControl() : NetControl(), mSyncMode(false) +AgentControl::AgentControl() : NetControl(), mSyncMode(false), + mMultiThreads(true), mThreadBarrierNew(NULL), nThreads(0) { + mThreadBarrier = new boost::barrier(1); mLocalAddr.setPort(3100); } AgentControl::~AgentControl() { + delete mThreadBarrier; } void AgentControl::OnLink() @@ -62,8 +65,24 @@ } mGameControlServer->AgentConnect(client->id); + + //Create a new thread and new barrier + if(mMultiThreads) + { + /**@todo Make this safe! */ + if(mThreadBarrierNew != NULL) + GetLog()->Error() + << "(AgentControl) ERROR mThreadBarrierNew!=NULL!" + << " Agents connecting/disconnecting in same frame !\n"; + nThreads++; + mThreadBarrierNew = new boost::barrier(nThreads+1); + boost::thread* newThread = + mThreadGroup.create_thread(boost::bind(&AgentControl::AgentThread, + this, client)); + } } + void AgentControl::ClientDisconnect(boost::shared_ptr<Client> client) { mClientSenses[client->id].clear(); @@ -90,52 +109,69 @@ return; } - // pass all received messages on to the GameControlServer - for ( - TBufferMap::iterator iter = mBuffers.begin(); - iter != mBuffers.end(); - ++iter - ) - { - boost::shared_ptr<NetBuffer>& netBuff = (*iter).second; - if ( - (netBuff.get() == 0) || - (netBuff->IsEmpty()) - ) - { - continue; - } + //if(!mMultiThreads) + //{ + // pass all received messages on to the GameControlServer + for ( + TBufferMap::iterator iter = mBuffers.begin(); + iter != mBuffers.end(); + ++iter + ) + { + boost::shared_ptr<NetBuffer>& netBuff = (*iter).second; + if ( + (netBuff.get() == 0) || + (netBuff->IsEmpty()) + ) + { + continue; + } - // lookup the client entry corresponding for the buffer - // entry - TAddrMap::iterator clientIter = mClients.find(netBuff->GetAddr()); - if (clientIter == mClients.end()) - { - continue; - } - boost::shared_ptr<Client>& client = (*clientIter).second; + // lookup the client entry corresponding for the buffer + // entry + TAddrMap::iterator clientIter = mClients.find(netBuff->GetAddr()); + if (clientIter == mClients.end()) + { + continue; + } + boost::shared_ptr<Client>& client = (*clientIter).second; - // lookup the AgentAspect node correspoding to the client - boost::shared_ptr<AgentAspect> agent = - mGameControlServer->GetAgentAspect(client->id); - if (agent.get() == 0) - { - continue; - } - - // parse and immediately realize the action - string message; - while (mNetMessage->Extract(netBuff,message)) - { - agent->RealizeActions - (mGameControlServer->Parse(client->id,message)); - } - } + // start cycle for this client + StartCycle(client, netBuff); + } + /*} + else + { + mThreadAction = STARTCYCLE; + WaitMaster(); //let threads start + WaitMaster(); //wait for threads to finish + }*/ } while (!AgentsAreSynced()); } +void AgentControl::StartCycle(const boost::shared_ptr<Client> &client, + boost::shared_ptr<NetBuffer> &netBuff) +{ + // lookup the AgentAspect node corresponding to the client + boost::shared_ptr<AgentAspect> agent = + mGameControlServer->GetAgentAspect(client->id); + if (agent.get() == 0) + { + return; + } + // parse and immediately realize the action + string message; + while (mNetMessage->Extract(netBuff,message)) + { + agent->RealizeActions + (mGameControlServer->Parse(client->id,message)); + } +} + void AgentControl::SenseAgent() { + //if(!mMultiThreads) + //{ int clientID; for ( TAddrMap::iterator iter = mClients.begin(); @@ -149,6 +185,13 @@ SendClientMessage(iter->second, mClientSenses[clientID]); } } + /*} + else + { + mThreadAction = SENSEAGENT; + WaitMaster(); //let threads start + WaitMaster(); //wait for threads to finish + }*/ } void AgentControl::EndCycle() @@ -164,44 +207,57 @@ return; } + if(!mMultiThreads) + { + // generate senses for all agents + for ( + TAddrMap::iterator iter = mClients.begin(); + iter != mClients.end(); + ++iter + ) + { + const boost::shared_ptr<Client> &client = (*iter).second; + EndCycle(client); + } + } + else + { + mThreadAction = ENDCYCLE; + WaitMaster(); //let threads start + WaitMaster(); //wait for threads to finish + } +} + +void AgentControl::EndCycle(const boost::shared_ptr<Client> &client) +{ boost::shared_ptr<BaseParser> parser = mGameControlServer->GetParser(); if (parser.get() == 0) - { - GetLog()->Error() - << "(AgentControl) ERROR: got no parser from " - << " the GameControlServer" << endl; - return; - } + { + GetLog()->Error() + << "(AgentControl) ERROR: got no parser from " + << " the GameControlServer" << endl; + return; + } - // generate senses for all agents - for ( - TAddrMap::iterator iter = mClients.begin(); - iter != mClients.end(); - ++iter - ) - { - const boost::shared_ptr<Client> &client = (*iter).second; + boost::shared_ptr<AgentAspect> agent = + mGameControlServer->GetAgentAspect(client->id); + if (agent.get() == 0) + { + return; + } + if (mSyncMode) + { + agent->SetSynced(false); + } - boost::shared_ptr<AgentAspect> agent = - mGameControlServer->GetAgentAspect(client->id); - if (agent.get() == 0) - { - continue; - } - if (mSyncMode) - { - agent->SetSynced(false); - } + boost::shared_ptr<PredicateList> senseList = agent->QueryPerceptors(); + mClientSenses[client->id] = parser->Generate(senseList); + if (mClientSenses[client->id].empty()) + { + return; + } - boost::shared_ptr<PredicateList> senseList = agent->QueryPerceptors(); - mClientSenses[client->id] = parser->Generate(senseList); - if (mClientSenses[client->id].empty()) - { - continue; - } - - mNetMessage->PrepareToSend(mClientSenses[client->id]); - } + mNetMessage->PrepareToSend(mClientSenses[client->id]); } void AgentControl::SetSyncMode(bool syncMode) @@ -221,6 +277,11 @@ } } +void AgentControl::SetMultiThreaded(bool multiThreaded) +{ + mMultiThreads = multiThreaded; +} + bool AgentControl::AgentsAreSynced() { if (mSyncMode) @@ -247,3 +308,84 @@ } return true; } + + +void AgentControl::AgentThread(const boost::shared_ptr<Client> &client) +{ + boost::barrier *currentBarrier = mThreadBarrierNew; + + while(client->socket->isOpen()) + { + WaitSlave(currentBarrier); + + //StartCycle not parallel: + // parser and agentState::addMessage not thread safe. + // additional synchronization required -> no speed-up ! + if(mThreadAction == STARTCYCLE) + { + + TBufferMap::iterator buf = mBuffers.find(client->addr); + if(buf != mBuffers.end()) + { + boost::shared_ptr<NetBuffer>& netBuff = buf->second; + if (netBuff.get() != 0 && !netBuff->IsEmpty()) + StartCycle(client, netBuff); + } + + } + + // SenseAgent not parallel: not enough computation, no speed-up ! + else if(mThreadAction == SENSEAGENT) + { + + + std::string& senses = mClientSenses[client->id]; + if (!senses.empty()) + SendClientMessage(client, senses); + + } + + // Here we get a speed-up ! + else if(mThreadAction == ENDCYCLE) + { + + EndCycle(client); + + } + + WaitSlave(currentBarrier); + } + + nThreads--; + if(mThreadBarrierNew != NULL) + GetLog()->Error() + << "(AgentControl) ERROR mThreadBarrierNew!=NULL!" + << " Agents connecting/disconnecting in same frame !\n"; + mThreadBarrierNew = new boost::barrier(nThreads+1); + currentBarrier->wait(); +} + +void AgentControl::WaitMaster() +{ + if(mThreadBarrierNew != NULL) + { + boost::barrier *oldBarrier = mThreadBarrier; + mThreadBarrier = mThreadBarrierNew; + oldBarrier->wait(); + mThreadBarrier->wait(); + delete oldBarrier; + mThreadBarrierNew = NULL; + } + else + mThreadBarrier->wait(); +} + +void AgentControl::WaitSlave(boost::barrier* ¤tBarrier) +{ + currentBarrier->wait(); + if(currentBarrier != mThreadBarrier) + { + currentBarrier = mThreadBarrier; + currentBarrier->wait(); + } +} Modified: trunk/spark/lib/oxygen/simulationserver/agentcontrol.h =================================================================== --- trunk/spark/lib/oxygen/simulationserver/agentcontrol.h 2012-04-09 20:46:44 UTC (rev 303) +++ trunk/spark/lib/oxygen/simulationserver/agentcontrol.h 2012-04-09 21:00:07 UTC (rev 304) @@ -23,6 +23,7 @@ #include "netcontrol.h" #include <oxygen/oxygen_defines.h> #include <oxygen/gamecontrolserver/gamecontrolserver.h> +#include <boost/thread/barrier.hpp> namespace oxygen { @@ -56,12 +57,34 @@ /** sets the AgentControl's sync mode */ void SetSyncMode(bool syncMode); + /** sets the AgentControl's sync mode */ + void SetMultiThreaded(bool multiThreaded); + protected: virtual void OnLink(); /** returns if the agents are synced with the srever */ bool AgentsAreSynced(); + /** the thread function which does EndCycle for one agent in + * multi-threaded mode. */ + void AgentThread(const boost::shared_ptr<Client> &client); + + /** forwards all pending messages from a specific agent to the + GameControlServer */ + void StartCycle(const boost::shared_ptr<Client> &client, + boost::shared_ptr<NetBuffer> &netBuff); + + /** generates sense updates for a specific agent */ + void EndCycle(const boost::shared_ptr<Client> &client); + + /** waits for all agent threads to catch up */ + void WaitMaster(); + + /** called in an agent thread to wait for the master thread to signal + * a new task */ + void WaitSlave(boost::barrier* ¤tBarrier); + protected: /** cached reference to the GameControlServer */ CachedPath<GameControlServer> mGameControlServer; @@ -75,6 +98,20 @@ * proceed to the next cycle */ bool mSyncMode; + + /** indicates if the AgentControl runs in multi-threads */ + bool mMultiThreads; + + /** barrier object for synchronizing threads in multi-threaded mode */ + boost::barrier *mThreadBarrier; + boost::barrier *mThreadBarrierNew; + + /** boost thread group to create a new thread when an agent connects */ + boost::thread_group mThreadGroup; + int nThreads; + + /** indicates what should happen in the agent thread right now */ + enum { STARTCYCLE, SENSEAGENT, ENDCYCLE } mThreadAction; }; DECLARE_CLASS(AgentControl); Modified: trunk/spark/lib/oxygen/simulationserver/agentcontrol_c.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/agentcontrol_c.cpp 2012-04-09 20:46:44 UTC (rev 303) +++ trunk/spark/lib/oxygen/simulationserver/agentcontrol_c.cpp 2012-04-09 21:00:07 UTC (rev 304) @@ -35,8 +35,22 @@ return true; } +FUNCTION(AgentControl, setMultiThreaded) +{ + bool inSet; + + if ((in.GetSize() != 1) || (!in.GetValue(in[0], inSet))) + { + return false; + } + + obj->SetMultiThreaded(inSet); + return true; +} + void CLASS(AgentControl)::DefineClass() { DEFINE_BASECLASS(oxygen/NetControl); DEFINE_FUNCTION(setSyncMode); + DEFINE_FUNCTION(setMultiThreaded); } Modified: trunk/spark/spark/spark.rb =================================================================== --- trunk/spark/spark/spark.rb 2012-04-09 20:46:44 UTC (rev 303) +++ trunk/spark/spark/spark.rb 2012-04-09 21:00:07 UTC (rev 304) @@ -44,6 +44,7 @@ $agentType = 'tcp' $agentPort = 3100 $agentSyncMode = false +$threadedAgentControl = true # (MonitorControl) constants # @@ -311,6 +312,7 @@ agentControl.setServerPort($agentPort) agentControl.setStep($agentStep) agentControl.setSyncMode($agentSyncMode) + agentControl.setMultiThreaded($threadedAgentControl) end if ($agentType == 'udp') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-04-09 20:46:50
|
Revision: 303 http://simspark.svn.sourceforge.net/simspark/?rev=303&view=rev Author: hedayat Date: 2012-04-09 20:46:44 +0000 (Mon, 09 Apr 2012) Log Message: ----------- Automatic KickOff should work fine in all cases and correctly select the kickoff side for the second half. Wait for the specified time before automatic kickoff from when the first agent connects rather than when the simulator is started. Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h trunk/rcssserver3d/rcssserver3d/naosoccersim.rb Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2012-04-08 21:39:34 UTC (rev 302) +++ trunk/rcssserver3d/ChangeLog 2012-04-09 20:46:44 UTC (rev 303) @@ -1,9 +1,29 @@ +2012-04-10 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp + (SoccerRuleAspect::UpdateBeforeKickOff): + - WaitBeforeKickOff is now calculated from when the first agent connects + rather than from the beginning of the before kickoff playmode (when the + simulator is started) + 2012-04-09 Hedayat Vatankhah <hed...@gm...> + * plugin/soccer/gamestateaspect/gamestateaspect.h (GameStateAspect): + * plugin/soccer/gamestateaspect/gamestateaspect.cpp (GameStateAspect::KickOff): + - Fix KickOff for the second half: give the ball to the other team in all + cases (both when the teams change their sides in the second half and when + they don't). + * plugin/soccer/soccerruleaspect/soccerruleaspect.h: * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp (SoccerRuleAspect::SwapTeamSides): - * rcssserver3d/naosoccersim.rb: - change teams' sides in the second half if enabled (enabled by default) + + * rcssserver3d/naosoccersim.rb: + - add new variables for the above changes: CoinTossForKickOff and + ChangeSidesInSecondHalf. The former specifies if in the automatic kickoff + mode, the first half kick off is always given to the left team or is + determined randomly. The latter specifies if the teams should change + their sides in the second half. 2012-04-07 Hedayat Vatankhah <hed...@gm...> Modified: trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp 2012-04-08 21:39:34 UTC (rev 302) +++ trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp 2012-04-09 20:46:44 UTC (rev 303) @@ -40,8 +40,8 @@ mGameHalf = GH_FIRST; mScore[0] = 0; mScore[1] = 0; - mLastKickOff = TI_NONE; - //mSecondHalfKickOff = TI_NONE; + mLastKickOffGameHalf = GH_NONE; + mNextHalfKickOff = TI_NONE; mLeftInit = Vector3f(0,0,0); mRightInit = Vector3f(0,0,0); mFinished = false; @@ -97,77 +97,35 @@ } -// let the monitor handle who kicks off in 2nd half. void GameStateAspect::KickOff(TTeamIndex ti) { - // throw a coin to determine which team kicks off + // throw a coin to determine which team kicks off, except if a new half + // is started in which the opposite team should kick off if (ti == TI_NONE) { ti = (salt::UniformRNG<>(0,1)() <= 0.5) ? TI_LEFT : TI_RIGHT; + + if (mGameHalf != mLastKickOffGameHalf) + { + if (mNextHalfKickOff != TI_NONE) + ti = mNextHalfKickOff; + + bool changeSides; + SoccerBase::GetSoccerVar(*this, "ChangeSidesInSecondHalf", + changeSides); + + if (changeSides) + mNextHalfKickOff = ti; + else + mNextHalfKickOff = (ti == TI_LEFT) ? TI_RIGHT : TI_LEFT; + } } SetPlayMode((ti == TI_LEFT) ? PM_KickOff_Left : PM_KickOff_Right); - - if (mLastKickOff == TI_NONE) - mLastKickOff = ti; + mLastKickOffGameHalf = mGameHalf; } - - -// void -// GameStateAspect::KickOff(TTeamIndex ti) -// { -// if (mGameHalf == GH_FIRST) -// { -// // throw a coin to determine which team kicks off -// if (ti == TI_NONE) -// { -// ti = (salt::UniformRNG<>(0,1)() <= 0.5) ? TI_LEFT : TI_RIGHT; -// } - -// SetPlayMode((ti == TI_LEFT) ? PM_KickOff_Left : PM_KickOff_Right); - -// if (mLastKickOff == TI_NONE) -// mLastKickOff = ti; -// } -// else -// { -// // in the second half, let the opposite team kick off -// SetPlayMode((mLastKickOff == TI_LEFT) ? PM_KickOff_Right : PM_KickOff_Left); -// } -// } -//--------------------------------------------- -// void -// GameStateAspect::KickOff(TTeamIndex ti) -// { -// if (mGameHalf == GH_FIRST) -// { -// // throw a coin to determine which team kicks off -// if (ti == TI_NONE) -// { -// ti = (salt::UniformRNG<>(0,1)() <= 0.5) ? TI_LEFT : TI_RIGHT; -// } - -// SetPlayMode((ti == TI_LEFT) ? PM_KickOff_Left : PM_KickOff_Right); - -// mLastKickOff = ti; -// if (mSecondHalfKickOff == TI_NONE) -// { -// //clog << "setting mSecondHalfKickOff\n"; - -// mSecondHalfKickOff = -// (mLastKickOff == TI_LEFT) ? TI_RIGHT : TI_LEFT; -// } -// } -// else -// { -// // in the second half, let the opposite team kick off -// SetPlayMode((mSecondHalfKickOff == TI_LEFT) ? PM_KickOff_Left : PM_KickOff_Right); -// } -// } - -//--------------------------------------------- TTime GameStateAspect::GetTime() const { @@ -481,6 +439,11 @@ fieldWidth/2 - mAgentRadius*2, mAgentRadius ); + + bool coinTossKickOff = true; + SoccerBase::GetSoccerVar(*this, "CoinTossForKickOff", coinTossKickOff); + if (!coinTossKickOff) + mNextHalfKickOff = TI_LEFT; } int Modified: trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h 2012-04-08 21:39:34 UTC (rev 302) +++ trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h 2012-04-09 20:46:44 UTC (rev 303) @@ -153,10 +153,10 @@ TGameHalf mGameHalf; /** the team that had the last KickOff */ - TTeamIndex mLastKickOff; + TGameHalf mLastKickOffGameHalf; -// /** the team that has to start the second half */ -// TTeamIndex mSecondHalfKickOff; + /** the team that has to start the next half */ + TTeamIndex mNextHalfKickOff; /** the names of the two teams */ std::string mTeamName[2]; Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2012-04-08 21:39:34 UTC (rev 302) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2012-04-09 20:46:44 UTC (rev 303) @@ -51,6 +51,7 @@ mSingleHalfTime(false), mAutomaticQuit(true), mChangeSidesInSecondHalf(true), + mAutoKickOffTimeOrigin(1000000.0), mSayMsgSize(20), mAudioCutDist(50.0), mFirstCollidingAgent(true), @@ -713,7 +714,13 @@ mInOffsideRightPlayers.clear(); #endif - if (mAutomaticKickOff && mGameState->GetModeTime() > mWaitBeforeKickOff) + float kickOffWaitTime = 0; + if (mAutoKickOffTimeOrigin > mGameState->GetModeTime()) + mAutoKickOffTimeOrigin = mGameState->GetModeTime(); + else + kickOffWaitTime = mGameState->GetModeTime() - mAutoKickOffTimeOrigin; + + if (mAutomaticKickOff && kickOffWaitTime > mWaitBeforeKickOff) { mGameState->KickOff(); } Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2012-04-08 21:39:34 UTC (rev 302) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2012-04-09 20:46:44 UTC (rev 303) @@ -305,6 +305,8 @@ bool mAutomaticQuit; /** flag if the side of the teams should be changed in the second half*/ bool mChangeSidesInSecondHalf; + /** time to wait until we kick off automatically */ + float mAutoKickOffTimeOrigin; //FCP 2010 - New Parameters (added by FCPortugal for Singapure 2010) /** max time player may be sitted or laying down before being repositioned */ Modified: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-04-08 21:39:34 UTC (rev 302) +++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-04-09 20:46:44 UTC (rev 303) @@ -48,11 +48,15 @@ addSoccerVar('FreeKickDistance', 1.3) addSoccerVar('FreeKickMoveDist', 1.5) addSoccerVar('GoalKickDist', 1.0) +addSoccerVar('BorderSize', 0.0) # prevent complaining about missing variable + +# soccer game settings addSoccerVar('AutomaticKickOff', false) -addSoccerVar('WaitBeforeKickOff', 2.0) +addSoccerVar('WaitBeforeKickOff', 5.0) +addSoccerVar('CoinTossForKickOff', false) + addSoccerVar('AutomaticQuit', true) addSoccerVar('ChangeSidesInSecondHalf', true) -addSoccerVar('BorderSize', 0.0) # prevent complaining about missing variable # agent parameters addSoccerVar('AgentRadius', 0.4) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-04-08 21:39:40
|
Revision: 302 http://simspark.svn.sourceforge.net/simspark/?rev=302&view=rev Author: hedayat Date: 2012-04-08 21:39:34 +0000 (Sun, 08 Apr 2012) Log Message: ----------- Change teams' sides on the second half Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h trunk/rcssserver3d/rcssserver3d/naosoccersim.rb Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2012-04-07 07:22:30 UTC (rev 301) +++ trunk/rcssserver3d/ChangeLog 2012-04-08 21:39:34 UTC (rev 302) @@ -1,3 +1,10 @@ +2012-04-09 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/soccerruleaspect/soccerruleaspect.h: + * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp (SoccerRuleAspect::SwapTeamSides): + * rcssserver3d/naosoccersim.rb: + - change teams' sides in the second half if enabled (enabled by default) + 2012-04-07 Hedayat Vatankhah <hed...@gm...> * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp (SoccerRuleAspect::UpdateGameOver): Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2012-04-07 07:22:30 UTC (rev 301) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2012-04-08 21:39:34 UTC (rev 302) @@ -50,6 +50,7 @@ mWaitBeforeKickOff(1.0), mSingleHalfTime(false), mAutomaticQuit(true), + mChangeSidesInSecondHalf(true), mSayMsgSize(20), mAudioCutDist(50.0), mFirstCollidingAgent(true), @@ -577,6 +578,20 @@ } void +SoccerRuleAspect::SwapTeamSides() +{ + SoccerBase::TAgentStateList agent_states; + if (! SoccerBase::GetAgentStates(*mBallState.get(), agent_states)) + return; + + SoccerBase::TAgentStateList::iterator it; + for (it = agent_states.begin(); it != agent_states.end(); ++it) + { + (*it)->SetTeamIndex(SoccerBase::OpponentTeam((*it)->GetTeamIndex())); + } +} + +void SoccerRuleAspect::ClearSelectedPlayers() { float min_dist = mFreeKickMoveDist; @@ -1183,6 +1198,8 @@ // the first game half is over mGameState->SetPlayMode(PM_BeforeKickOff); mGameState->SetGameHalf(GH_SECOND); + if (mChangeSidesInSecondHalf) + SwapTeamSides(); } } else if ((half == GH_SECOND) && (now >= 2 * mHalfTime)) @@ -1348,6 +1365,7 @@ SoccerBase::GetSoccerVar(*this,"WaitBeforeKickOff",mWaitBeforeKickOff); SoccerBase::GetSoccerVar(*this,"SingleHalfTime",mSingleHalfTime); SoccerBase::GetSoccerVar(*this,"AutomaticQuit",mAutomaticQuit); + SoccerBase::GetSoccerVar(*this,"ChangeSidesInSecondHalf",mChangeSidesInSecondHalf); SoccerBase::GetSoccerVar(*this,"UseOffside",mUseOffside); float penaltyLength, penaltyWidth; SoccerBase::GetSoccerVar(*this,"PenaltyLength",penaltyLength); Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2012-04-07 07:22:30 UTC (rev 301) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2012-04-08 21:39:34 UTC (rev 302) @@ -248,6 +248,11 @@ */ void ClearPlayersBeforeKickOff(TTeamIndex idx); + /** + * swaps the side of the teams + */ + void SwapTeamSides(); + protected: /** reference to the body node of the Ball */ boost::shared_ptr<oxygen::RigidBody> mBallBody; @@ -298,6 +303,8 @@ bool mSingleHalfTime; /** flag if the simulator should quit automatically when the game is over */ bool mAutomaticQuit; + /** flag if the side of the teams should be changed in the second half*/ + bool mChangeSidesInSecondHalf; //FCP 2010 - New Parameters (added by FCPortugal for Singapure 2010) /** max time player may be sitted or laying down before being repositioned */ Modified: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-04-07 07:22:30 UTC (rev 301) +++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-04-08 21:39:34 UTC (rev 302) @@ -51,6 +51,7 @@ addSoccerVar('AutomaticKickOff', false) addSoccerVar('WaitBeforeKickOff', 2.0) addSoccerVar('AutomaticQuit', true) +addSoccerVar('ChangeSidesInSecondHalf', true) addSoccerVar('BorderSize', 0.0) # prevent complaining about missing variable # agent parameters This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-04-07 07:22:37
|
Revision: 301 http://simspark.svn.sourceforge.net/simspark/?rev=301&view=rev Author: hedayat Date: 2012-04-07 07:22:30 +0000 (Sat, 07 Apr 2012) Log Message: ----------- Add/Enable automatic quit after game over. Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h trunk/rcssserver3d/rcssserver3d/naosoccersim.rb trunk/spark/ChangeLog trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2012-03-20 16:44:23 UTC (rev 300) +++ trunk/rcssserver3d/ChangeLog 2012-04-07 07:22:30 UTC (rev 301) @@ -1,3 +1,8 @@ +2012-04-07 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp (SoccerRuleAspect::UpdateGameOver): + - add AutomaticQuit mode to shutdown automatically when the game is over + 2012-02-14 Sander van Dijk <sgv...@gm...> * rcssserver3d/main.cpp (Spark): Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2012-03-20 16:44:23 UTC (rev 300) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2012-04-07 07:22:30 UTC (rev 301) @@ -49,6 +49,7 @@ mAutomaticKickOff(false), mWaitBeforeKickOff(1.0), mSingleHalfTime(false), + mAutomaticQuit(true), mSayMsgSize(20), mAudioCutDist(50.0), mFirstCollidingAgent(true), @@ -1152,7 +1153,7 @@ SoccerRuleAspect::UpdateGameOver() { // wait for 10 seconds to finish - if (mGameState->GetModeTime() < 9) + if (mGameState->GetModeTime() < 9 || !mAutomaticQuit) { return; } @@ -1346,6 +1347,7 @@ SoccerBase::GetSoccerVar(*this,"AutomaticKickOff",mAutomaticKickOff); SoccerBase::GetSoccerVar(*this,"WaitBeforeKickOff",mWaitBeforeKickOff); SoccerBase::GetSoccerVar(*this,"SingleHalfTime",mSingleHalfTime); + SoccerBase::GetSoccerVar(*this,"AutomaticQuit",mAutomaticQuit); SoccerBase::GetSoccerVar(*this,"UseOffside",mUseOffside); float penaltyLength, penaltyWidth; SoccerBase::GetSoccerVar(*this,"PenaltyLength",penaltyLength); Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2012-03-20 16:44:23 UTC (rev 300) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2012-04-07 07:22:30 UTC (rev 301) @@ -296,6 +296,8 @@ float mWaitBeforeKickOff; /** flag if we want to play only one half of the match */ bool mSingleHalfTime; + /** flag if the simulator should quit automatically when the game is over */ + bool mAutomaticQuit; //FCP 2010 - New Parameters (added by FCPortugal for Singapure 2010) /** max time player may be sitted or laying down before being repositioned */ Modified: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-03-20 16:44:23 UTC (rev 300) +++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-04-07 07:22:30 UTC (rev 301) @@ -50,6 +50,7 @@ addSoccerVar('GoalKickDist', 1.0) addSoccerVar('AutomaticKickOff', false) addSoccerVar('WaitBeforeKickOff', 2.0) +addSoccerVar('AutomaticQuit', true) addSoccerVar('BorderSize', 0.0) # prevent complaining about missing variable # agent parameters Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2012-03-20 16:44:23 UTC (rev 300) +++ trunk/spark/ChangeLog 2012-04-07 07:22:30 UTC (rev 301) @@ -1,3 +1,8 @@ +2012-04-07 Hedayat Vatankhah <hed...@gm...> + + * lib/oxygen/simulationserver/simulationserver.cpp (SimulationServer::Step): + - quit if GameControlServer is finished (e.g. the end of a game) + 2012-02-16 Hedayat Vatankhah <hed...@gm...> * lib/salt/gmath.h: Modified: trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp 2012-03-20 16:44:23 UTC (rev 300) +++ trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp 2012-04-07 07:22:30 UTC (rev 301) @@ -265,6 +265,13 @@ mSimTime += mSumDeltaTime; mSumDeltaTime = 0; } + + if (mGameControlServer->IsFinished() && !mExit) + { + GetLog()->Normal() << "(SimulationServer) GameControlServer finished," + " exiting.\n"; + Quit(); + } } void SimulationServer::ControlEvent(EControlEvent event) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2012-03-20 16:44:30
|
Revision: 300 http://simspark.svn.sourceforge.net/simspark/?rev=300&view=rev Author: yxu Date: 2012-03-20 16:44:23 +0000 (Tue, 20 Mar 2012) Log Message: ----------- bugfix: MoveAndRotateAgent could not be called more than once in one cycle Modified Paths: -------------- trunk/rcssserver3d/plugin/soccer/soccerbase/soccerbase.cpp Modified: trunk/rcssserver3d/plugin/soccer/soccerbase/soccerbase.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerbase/soccerbase.cpp 2012-03-06 23:50:21 UTC (rev 299) +++ trunk/rcssserver3d/plugin/soccer/soccerbase/soccerbase.cpp 2012-03-20 16:44:23 UTC (rev 300) @@ -679,8 +679,6 @@ bool SoccerBase::MoveAndRotateAgent(boost::shared_ptr<Transform> agent_aspect, const Vector3f& pos, float angle) { - Vector3f agentPos = agent_aspect->GetWorldTransform().Pos(); - boost::shared_ptr<Transform> parent = shared_dynamic_cast<Transform> (agent_aspect->FindParentSupportingClass<Transform>().lock()); @@ -705,7 +703,7 @@ boost::shared_ptr<RigidBody> body; GetAgentBody(agent_aspect, body); - + const Vector3f& agentPos = body->GetPosition(); Matrix bodyR = body->GetRotation(); bodyR.InvertRotationMatrix(); Matrix mat; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2012-03-06 23:50:27
|
Revision: 299 http://simspark.svn.sourceforge.net/simspark/?rev=299&view=rev Author: yxu Date: 2012-03-06 23:50:21 +0000 (Tue, 06 Mar 2012) Log Message: ----------- Bugfix: the RandomEngine was not Singleton: create two same *RNG produced exactly the same results all the time! Modified Paths: -------------- trunk/spark/lib/salt/random.h trunk/spark/lib/zeitgeist/randomserver/randomserver.cpp Modified: trunk/spark/lib/salt/random.h =================================================================== --- trunk/spark/lib/salt/random.h 2012-02-24 23:40:49 UTC (rev 298) +++ trunk/spark/lib/salt/random.h 2012-03-06 23:50:21 UTC (rev 299) @@ -50,24 +50,9 @@ static RandomEngine& instance() { static RandomEngine the_instance; return the_instance; } - - static RandomEngine& -#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x520) - // Work around overload resolution problem (Gennadiy E. Rozental) - instance(const result_type& value) -#else - instance(result_type value) -#endif - { instance().seed( value ); return instance(); } - - // For GCC, moving this function out-of-line prevents inlining, which may - // reduce overall object code size. However, MSVC does not grok - // out-of-line definitions of member function templates. - template<class Generator> - static RandomEngine& instance(Generator& gen) - { instance().seed( gen ); return instance(); } private: - RandomEngine() : boost::mt19937() { } + RandomEngine() : boost::mt19937() {} + RandomEngine(const RandomEngine&) { assert(false); } }; #if (defined(BOOST_VERSION) && (BOOST_VERSION >= 103100)) @@ -77,12 +62,12 @@ * uniformly distributed random numbers. */ template<class RealType = double> -class UniformRNG : public boost::variate_generator<salt::RandomEngine, +class UniformRNG : public boost::variate_generator<salt::RandomEngine&, boost::uniform_real<RealType> > { public: UniformRNG(RealType min = RealType(0), RealType max = RealType(1)) - : boost::variate_generator<RandomEngine, boost::uniform_real<RealType> > + : boost::variate_generator<RandomEngine&, boost::uniform_real<RealType> > (salt::RandomEngine::instance(), boost::uniform_real<RealType>(min,max)) {} }; @@ -90,12 +75,12 @@ /** A random number generator producing normally distributed numbers. */ template<class RealType = double> -class NormalRNG : public boost::variate_generator<salt::RandomEngine, +class NormalRNG : public boost::variate_generator<salt::RandomEngine&, boost::normal_distribution<RealType> > { public: NormalRNG(double mean, double sigma = (1)) - : boost::variate_generator<RandomEngine, + : boost::variate_generator<RandomEngine&, boost::normal_distribution<RealType> > (salt::RandomEngine::instance(), boost::normal_distribution<RealType>(mean,sigma)) {} @@ -106,12 +91,12 @@ * exponential distribution: p(x) = lambda * exp(-lambda * x) */ template<class RealType = double> -class ExponentialRNG : public boost::variate_generator<salt::RandomEngine, +class ExponentialRNG : public boost::variate_generator<salt::RandomEngine&, boost::exponential_distribution<RealType> > { public: ExponentialRNG(double lambda = RealType(1)) - : boost::variate_generator<RandomEngine, + : boost::variate_generator<RandomEngine&, boost::exponential_distribution<RealType> > (salt::RandomEngine::instance(), boost::exponential_distribution<RealType>(lambda)) Modified: trunk/spark/lib/zeitgeist/randomserver/randomserver.cpp =================================================================== --- trunk/spark/lib/zeitgeist/randomserver/randomserver.cpp 2012-02-24 23:40:49 UTC (rev 298) +++ trunk/spark/lib/zeitgeist/randomserver/randomserver.cpp 2012-03-06 23:50:21 UTC (rev 299) @@ -46,5 +46,5 @@ #endif } - salt::RandomEngine::instance(seed); + salt::RandomEngine::instance().seed(seed); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2012-02-24 23:40:55
|
Revision: 298 http://simspark.svn.sourceforge.net/simspark/?rev=298&view=rev Author: yxu Date: 2012-02-24 23:40:49 +0000 (Fri, 24 Feb 2012) Log Message: ----------- init variable (important for release version!) Modified Paths: -------------- trunk/spark/lib/kerosin/inputserver/input.cpp Modified: trunk/spark/lib/kerosin/inputserver/input.cpp =================================================================== --- trunk/spark/lib/kerosin/inputserver/input.cpp 2012-02-24 13:25:48 UTC (rev 297) +++ trunk/spark/lib/kerosin/inputserver/input.cpp 2012-02-24 23:40:49 UTC (rev 298) @@ -24,7 +24,7 @@ using namespace kerosin; Input::Input(EType t, TInputCode c, int i) - : mType(t),mCode(c),mId(i) + : mType(t),mCode(c),mId(i),mModState(0) { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2012-02-24 13:25:57
|
Revision: 297 http://simspark.svn.sourceforge.net/simspark/?rev=297&view=rev Author: yxu Date: 2012-02-24 13:25:48 +0000 (Fri, 24 Feb 2012) Log Message: ----------- convenient camera pose Modified Paths: -------------- trunk/rsgedit/src/rsgedit.rb Modified: trunk/rsgedit/src/rsgedit.rb =================================================================== --- trunk/rsgedit/src/rsgedit.rb 2012-02-24 13:25:34 UTC (rev 296) +++ trunk/rsgedit/src/rsgedit.rb 2012-02-24 13:25:48 UTC (rev 297) @@ -2,11 +2,18 @@ # rsgedit.rb # +# toggle the real time mode +$enableRealTimeMode = false + def rsgeditResetScene sparkSetupServer() sparkSetupInput('InputSystemWX') sparkSetupRendering('OpenGLSystemWX') - sparkResetScene() + sparkResetScene() + + if ($enableRealTimeMode) + sparkSetupTimer() + end # setup common materials run "scripts/materials.rb" @@ -21,11 +28,11 @@ # let spark create a default camera sparkAddFPSCamera( $scenePath+'camera', - x = -5, - y = -40, - z = 15, + x = 0, + y = -4, + z = 0.6, maxSpeed = 15.0, - accel = 400.0, + accel = 40.0, drag = 4, addCollider = false ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2012-02-24 13:25:45
|
Revision: 296 http://simspark.svn.sourceforge.net/simspark/?rev=296&view=rev Author: yxu Date: 2012-02-24 13:25:34 +0000 (Fri, 24 Feb 2012) Log Message: ----------- free ODE objects in correct order (assume there is only one world!) Modified Paths: -------------- trunk/spark/lib/oxygen/physicsserver/space.cpp trunk/spark/lib/oxygen/physicsserver/space.h trunk/spark/lib/oxygen/physicsserver/world.cpp trunk/spark/lib/oxygen/physicsserver/world.h trunk/spark/plugin/odeimps/odespace.cpp Modified: trunk/spark/lib/oxygen/physicsserver/space.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/space.cpp 2012-02-24 13:25:11 UTC (rev 295) +++ trunk/spark/lib/oxygen/physicsserver/space.cpp 2012-02-24 13:25:34 UTC (rev 296) @@ -193,50 +193,7 @@ mSpaceImp->PostPhysicsUpdateInternal(mContactGroupID); } -void Space::DestroySpaceObjects() -{ - boost::shared_ptr<Scene> scene = GetScene(); - if (scene.get() == 0) - { - return; - } - - TLeafList objects; - const bool recursive = true; - scene->ListChildrenSupportingClass<PhysicsObject>(objects, recursive); - - bool globalSpace = IsGlobalSpace(); - boost::shared_ptr<Space> self = shared_static_cast<Space>(GetSelf().lock()); - - for ( - TLeafList::iterator iter = objects.begin(); - iter != objects.end(); - ++iter - ) - { - boost::shared_ptr<PhysicsObject> object = shared_static_cast<PhysicsObject>(*iter); - if (object == self) - { - continue; - } - - // destroy objects registered to this space; the top level - // space object also destroy any other ODE object - const long parentSpace = object->GetParentSpaceID(); - if ( - ( - (globalSpace) && - (parentSpace == 0) - ) || - (parentSpace == mSpaceID) - ) - { - object->DestroyPhysicsObject(); - } - } -} - void Space::DestroyPhysicsObject() { if (mSpaceID == 0) @@ -244,10 +201,6 @@ return; } - // make sure that all objects registered to this space are destroyed - // before this space. Any other order provokes a segfault in ODE. - DestroySpaceObjects(); - mSpaceImp->DestroySpace(mContactGroupID, mSpaceID); mSpaceID = 0; Modified: trunk/spark/lib/oxygen/physicsserver/space.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/space.h 2012-02-24 13:25:11 UTC (rev 295) +++ trunk/spark/lib/oxygen/physicsserver/space.h 2012-02-24 13:25:34 UTC (rev 296) @@ -105,11 +105,6 @@ /** updates internal state after physics calculation */ virtual void PostPhysicsUpdateInternal(); - /** destroys the bodies managed by all Body objects that are - registered to this Space - */ - void DestroySpaceObjects(); - // // Members // Modified: trunk/spark/lib/oxygen/physicsserver/world.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/world.cpp 2012-02-24 13:25:11 UTC (rev 295) +++ trunk/spark/lib/oxygen/physicsserver/world.cpp 2012-02-24 13:25:34 UTC (rev 296) @@ -120,19 +120,48 @@ recurseLock = true; - boost::shared_ptr<World> space = GetWorld(); - if (space.get() != 0) - { - space->DestroyPhysicsObject(); - } - if (mWorldID == 0) { return; } + // first destory everthing in the world + DestroyWorldObjects(); + + // then destory the world + // otherwise, things in the world will destroied without notifying us mWorldImp->DestroyWorld(mWorldID); mWorldID = 0; recurseLock = false; } + + +void World::DestroyWorldObjects() +{ + boost::shared_ptr<Scene> scene = GetScene(); + + if (scene.get() == 0) + { + return; + } + + TLeafList objects; + const bool recursive = true; + scene->ListChildrenSupportingClass<PhysicsObject>(objects, recursive); + + boost::shared_ptr<World> self = shared_static_cast<World>(GetSelf().lock()); + + for (TLeafList::iterator iter = objects.begin(); iter != objects.end(); ++iter) + { + boost::shared_ptr<PhysicsObject> object = shared_static_cast<PhysicsObject>(*iter); + if (object == self) + { + continue; + } + + // destroy everthing in the world + // assume there is only ONE world + object->DestroyPhysicsObject(); + } +} Modified: trunk/spark/lib/oxygen/physicsserver/world.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/world.h 2012-02-24 13:25:11 UTC (rev 295) +++ trunk/spark/lib/oxygen/physicsserver/world.h 2012-02-24 13:25:34 UTC (rev 296) @@ -110,6 +110,11 @@ /** creates a new physics world */ virtual bool ConstructInternal(); + /** destroys the bodies managed by all objects that are + in Wthis World + */ + void DestroyWorldObjects(); + // // Members // Modified: trunk/spark/plugin/odeimps/odespace.cpp =================================================================== --- trunk/spark/plugin/odeimps/odespace.cpp 2012-02-24 13:25:11 UTC (rev 295) +++ trunk/spark/plugin/odeimps/odespace.cpp 2012-02-24 13:25:34 UTC (rev 296) @@ -87,6 +87,9 @@ dJointGroupDestroy(ODEContactGroup); } + // do not destroy geoms + dSpaceSetCleanup(SpaceImp, 0); + // release the ODE space dSpaceDestroy(SpaceImp); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2012-02-24 13:25:22
|
Revision: 295 http://simspark.svn.sourceforge.net/simspark/?rev=295&view=rev Author: yxu Date: 2012-02-24 13:25:11 +0000 (Fri, 24 Feb 2012) Log Message: ----------- fix rsgedit Modified Paths: -------------- trunk/rsgedit/CMakeLists.txt trunk/rsgedit/src/main.cpp trunk/rsgedit/src/mainframe.cpp trunk/rsgedit/src/simspark.cpp trunk/rsgedit/src/simspark.h trunk/rsgedit/src/sparkglrender.cpp Modified: trunk/rsgedit/CMakeLists.txt =================================================================== --- trunk/rsgedit/CMakeLists.txt 2012-02-24 13:24:49 UTC (rev 294) +++ trunk/rsgedit/CMakeLists.txt 2012-02-24 13:25:11 UTC (rev 295) @@ -9,7 +9,7 @@ find_package(Boost REQUIRED thread COMPONENTS date_time) find_package(ODE REQUIRED) find_package(OpenGL REQUIRED) -set(wxWidgets_USE_LIBS gl adv) +set(wxWidgets_USE_LIBS core gl adv) find_package(wxWidgets REQUIRED) include( ${wxWidgets_USE_FILE} ) Modified: trunk/rsgedit/src/main.cpp =================================================================== --- trunk/rsgedit/src/main.cpp 2012-02-24 13:24:49 UTC (rev 294) +++ trunk/rsgedit/src/main.cpp 2012-02-24 13:25:11 UTC (rev 295) @@ -63,7 +63,7 @@ ); wxYield(); - mSpark = shared_ptr<SimSpark>(new SimSpark("../../")); + mSpark = shared_ptr<SimSpark>(new SimSpark()); if (! mSpark->Init(argc, reinterpret_cast<char**>(argv))) { Modified: trunk/rsgedit/src/mainframe.cpp =================================================================== --- trunk/rsgedit/src/mainframe.cpp 2012-02-24 13:24:49 UTC (rev 294) +++ trunk/rsgedit/src/mainframe.cpp 2012-02-24 13:25:11 UTC (rev 295) @@ -610,11 +610,9 @@ } // go through the next simulation cycle - sim->AdvanceTime(tDeltaSec); + sim->SetSimStep(tDeltaSec); + sim->Cycle(); - shared_ptr<SimControlNode> inputCtr; - sim->Cycle(inputCtr); - // refresh the display RefreshProperties(); @@ -646,7 +644,6 @@ sim->SetSimStep(SIM_SIMSTEP); sim->Init(0,0); - sim->SetAutoTimeMode(false); mLastFPSUpdate = 0.0; } Modified: trunk/rsgedit/src/simspark.cpp =================================================================== --- trunk/rsgedit/src/simspark.cpp 2012-02-24 13:24:49 UTC (rev 294) +++ trunk/rsgedit/src/simspark.cpp 2012-02-24 13:25:11 UTC (rev 295) @@ -37,8 +37,8 @@ std::ostringstream* SimSpark::mLogStream = 0; -SimSpark::SimSpark(const string& relPathPrefix) : - Spark(relPathPrefix) +SimSpark::SimSpark() : + Spark() { mState = S_PAUSED; } Modified: trunk/rsgedit/src/simspark.h =================================================================== --- trunk/rsgedit/src/simspark.h 2012-02-24 13:24:49 UTC (rev 294) +++ trunk/rsgedit/src/simspark.h 2012-02-24 13:25:11 UTC (rev 295) @@ -28,7 +28,7 @@ class SimSpark : public spark::Spark { public: - SimSpark(const std::string& relPathPrefix); + SimSpark(); ~SimSpark(); /** called once after Spark finished it's init */ Modified: trunk/rsgedit/src/sparkglrender.cpp =================================================================== --- trunk/rsgedit/src/sparkglrender.cpp 2012-02-24 13:24:49 UTC (rev 294) +++ trunk/rsgedit/src/sparkglrender.cpp 2012-02-24 13:25:11 UTC (rev 295) @@ -111,7 +111,7 @@ } mCamera->SetViewport(0,0,width,height); - mRenderServer->Render(); + mRenderServer->Render(true); RenderSelection(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2012-02-24 13:24:58
|
Revision: 294 http://simspark.svn.sourceforge.net/simspark/?rev=294&view=rev Author: yxu Date: 2012-02-24 13:24:49 +0000 (Fri, 24 Feb 2012) Log Message: ----------- name conflicts in windows: GetMonitorInfo is a macro in WinUser.h Modified Paths: -------------- trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.cpp trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.h trunk/spark/lib/oxygen/monitorserver/monitorserver.cpp trunk/spark/lib/oxygen/monitorserver/monitorsystem.h trunk/spark/plugin/sparkmonitor/sparkmonitor.cpp trunk/spark/plugin/sparkmonitor/sparkmonitor.h Modified: trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp 2012-02-16 12:18:29 UTC (rev 293) +++ trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp 2012-02-24 13:24:49 UTC (rev 294) @@ -91,7 +91,7 @@ } } -string RCS3DMonitor::GetMonitorInfo(const PredicateList& pList) +string RCS3DMonitor::GetMonitorInfomation(const PredicateList& pList) { stringstream ss; mFullState = false; Modified: trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h 2012-02-16 12:18:29 UTC (rev 293) +++ trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h 2012-02-24 13:24:49 UTC (rev 294) @@ -82,7 +82,7 @@ * the MonitorServer. The monitor should transfer them to the * client if possible. */ - virtual std::string GetMonitorInfo(const oxygen::PredicateList& pList); + virtual std::string GetMonitorInfomation(const oxygen::PredicateList& pList); /** This function is called once for every MonitorSystem each time * a new client connects. It should return any header/setup Modified: trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.cpp 2012-02-16 12:18:29 UTC (rev 293) +++ trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.cpp 2012-02-24 13:24:49 UTC (rev 294) @@ -213,7 +213,7 @@ } string -SexpMonitor::GetMonitorInfo(const oxygen::PredicateList& pList) +SexpMonitor::GetMonitorInfomation(const oxygen::PredicateList& pList) { if (mGameState->IsFinished()) { Modified: trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.h 2012-02-16 12:18:29 UTC (rev 293) +++ trunk/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.h 2012-02-24 13:24:49 UTC (rev 294) @@ -52,7 +52,7 @@ * function is called to process it. * @param data data sent from monitor to monitorsystem via SPADES. */ - void ParseMonitorMessage(const std::string& data); + virtual void ParseMonitorMessage(const std::string& data); /** This function will be called periodically to get information * about the current state of the world. @@ -61,7 +61,7 @@ * the MonitorServer. The monitor should transfer them to the * client if possible. */ - virtual std::string GetMonitorInfo(const oxygen::PredicateList& pList); + virtual std::string GetMonitorInfomation(const oxygen::PredicateList& pList); /** This function is called once for every MonitorSystem each time * a new client connects. It should return any header/setup Modified: trunk/spark/lib/oxygen/monitorserver/monitorserver.cpp =================================================================== --- trunk/spark/lib/oxygen/monitorserver/monitorserver.cpp 2012-02-16 12:18:29 UTC (rev 293) +++ trunk/spark/lib/oxygen/monitorserver/monitorserver.cpp 2012-02-24 13:24:49 UTC (rev 294) @@ -193,7 +193,7 @@ PredicateList pList; CollectItemPredicates(false,pList); - mData = monitorSystem->GetMonitorInfo(pList); + mData = monitorSystem->GetMonitorInfomation(pList); mDataCycle = cycle; return mData; } Modified: trunk/spark/lib/oxygen/monitorserver/monitorsystem.h =================================================================== --- trunk/spark/lib/oxygen/monitorserver/monitorsystem.h 2012-02-16 12:18:29 UTC (rev 293) +++ trunk/spark/lib/oxygen/monitorserver/monitorsystem.h 2012-02-24 13:24:49 UTC (rev 294) @@ -60,7 +60,7 @@ * the MonitorServer. The monitor should transfer them to the * client if possible. */ - virtual std::string GetMonitorInfo(const PredicateList& pList) = 0; + virtual std::string GetMonitorInfomation(const PredicateList& pList) = 0; /** If a monitor sends information to the world model, this * function is called to process it. Modified: trunk/spark/plugin/sparkmonitor/sparkmonitor.cpp =================================================================== --- trunk/spark/plugin/sparkmonitor/sparkmonitor.cpp 2012-02-16 12:18:29 UTC (rev 293) +++ trunk/spark/plugin/sparkmonitor/sparkmonitor.cpp 2012-02-24 13:24:49 UTC (rev 294) @@ -91,7 +91,7 @@ } } -string SparkMonitor::GetMonitorInfo(const PredicateList& pList) +string SparkMonitor::GetMonitorInfomation(const PredicateList& pList) { stringstream ss; mFullState = false; Modified: trunk/spark/plugin/sparkmonitor/sparkmonitor.h =================================================================== --- trunk/spark/plugin/sparkmonitor/sparkmonitor.h 2012-02-16 12:18:29 UTC (rev 293) +++ trunk/spark/plugin/sparkmonitor/sparkmonitor.h 2012-02-24 13:24:49 UTC (rev 294) @@ -80,7 +80,7 @@ * the MonitorServer. The monitor should transfer them to the * client if possible. */ - virtual std::string GetMonitorInfo(const oxygen::PredicateList& pList); + virtual std::string GetMonitorInfomation(const oxygen::PredicateList& pList); /** This function is called once for every MonitorSystem each time * a new client connects. It should return any header/setup This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-02-16 12:18:39
|
Revision: 293 http://simspark.svn.sourceforge.net/simspark/?rev=293&view=rev Author: hedayat Date: 2012-02-16 12:18:29 +0000 (Thu, 16 Feb 2012) Log Message: ----------- Fix GCC 4.7 compilation error Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/salt/gmath.h Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2012-02-14 15:51:26 UTC (rev 292) +++ trunk/spark/ChangeLog 2012-02-16 12:18:29 UTC (rev 293) @@ -1,3 +1,8 @@ +2012-02-16 Hedayat Vatankhah <hed...@gm...> + + * lib/salt/gmath.h: + - add missing std:: prefix for isfinite (fix gcc 4.7 compile error) + 2012-02-14 Sander van Dijk <sgv...@gm...> * lib/zeitgeist/scriptserver/scriptserver.cpp (RunInitScript): Modified: trunk/spark/lib/salt/gmath.h =================================================================== --- trunk/spark/lib/salt/gmath.h 2012-02-14 15:51:26 UTC (rev 292) +++ trunk/spark/lib/salt/gmath.h 2012-02-16 12:18:29 UTC (rev 293) @@ -44,7 +44,7 @@ #define M_PI 3.1415926535897932384626433832795 #endif -#ifndef M_PI_2 +#ifndef M_PI_2 #define M_PI_2 1.57079632679489661923132169164 /* pi/2 */ #endif @@ -226,7 +226,7 @@ assert(std::numeric_limits<TYPE>::has_infinity); return (std::numeric_limits<double>::infinity() != f); #else - return isfinite(f); + return std::isfinite(f); #endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sgv...@us...> - 2012-02-14 15:51:37
|
Revision: 292 http://simspark.svn.sourceforge.net/simspark/?rev=292&view=rev Author: sgvandijk Date: 2012-02-14 15:51:26 +0000 (Tue, 14 Feb 2012) Log Message: ----------- - adopt init script path prefix change to rcssserver3d Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/rcssmonitor3d/main.cpp trunk/rcssserver3d/rcssserver3d/main.cpp Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2012-02-14 15:48:05 UTC (rev 291) +++ trunk/rcssserver3d/ChangeLog 2012-02-14 15:51:26 UTC (rev 292) @@ -1,3 +1,10 @@ +2012-02-14 Sander van Dijk <sgv...@gm...> + + * rcssserver3d/main.cpp (Spark): + * rcssmonitor3d/main.cpp (Spark): + - add --init-script-prefix option to specify location of spark.rb, + zeitgeist.rb, etc + 2011-06-06 Hedayat Vatankhah <hed...@gm...> * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp Modified: trunk/rcssserver3d/rcssmonitor3d/main.cpp =================================================================== --- trunk/rcssserver3d/rcssmonitor3d/main.cpp 2012-02-14 15:48:05 UTC (rev 291) +++ trunk/rcssserver3d/rcssmonitor3d/main.cpp 2012-02-14 15:51:26 UTC (rev 292) @@ -45,8 +45,8 @@ class MonitorSpark : public Spark { public: - MonitorSpark(const std::string& relPathPrefix) : - Spark(relPathPrefix) + MonitorSpark() : + Spark() {}; /** called once after Spark finished it's init */ @@ -165,7 +165,7 @@ int main(int argc, char** argv) { // the spark app framework instance - MonitorSpark spark("../../"); + MonitorSpark spark; if (! spark.Init(argc, argv)) { Modified: trunk/rcssserver3d/rcssserver3d/main.cpp =================================================================== --- trunk/rcssserver3d/rcssserver3d/main.cpp 2012-02-14 15:48:05 UTC (rev 291) +++ trunk/rcssserver3d/rcssserver3d/main.cpp 2012-02-14 15:51:26 UTC (rev 292) @@ -45,8 +45,8 @@ class SimSpark : public Spark { public: - SimSpark(const std::string& relPathPrefix) : - Spark(relPathPrefix), + SimSpark() : + Spark(), mScriptPath("rcssserver3d.rb") {}; @@ -83,10 +83,11 @@ GetLog()->Normal() << "\nusage: rcssserver3d [options] [script]\n" << "\noptions:\n" - << " --help\t\t\t print this message.\n" - << " --script-path PATH\t set the script path (rcssserver3d.rb path).\n" - << "--agent-port PORTNUM\t port for agents to connect to.\n" - << "--server-port PORTNUM\t port for monitors to connect to.\n" + << " --help\t\t\t\t print this message.\n" + << " --script-path PATH\t\t set the script path (rcssserver3d.rb path).\n" + << " --init-script-prefix PATH\t path prefix for init scripts (spark.rb, oxygen.rb, etc.).\n" + << " --agent-port PORTNUM\t\t port for agents to connect to.\n" + << " --server-port PORTNUM\t\t port for monitors to connect to.\n" << "\n"; } @@ -166,7 +167,7 @@ int main(int argc, char** argv) { // the spark app framework instance - SimSpark spark("../../"); + SimSpark spark; if (! spark.Init(argc, argv)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |