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...> - 2013-06-12 20:53:34
|
Revision: 366 http://sourceforge.net/p/simspark/svn/366 Author: hedayat Date: 2013-06-12 20:53:27 +0000 (Wed, 12 Jun 2013) Log Message: ----------- Replace all Windows new lines with Unix ones for consistency Modified Paths: -------------- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/export.h branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.cpp branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.h branches/gui-bullet/rcssserver3d/sparkgui/main.cpp branches/gui-bullet/spark/carbon/aboutdialog.cpp branches/gui-bullet/spark/carbon/aboutdialog.h branches/gui-bullet/spark/carbon/abstractcommand.cpp branches/gui-bullet/spark/carbon/abstractcommand.h branches/gui-bullet/spark/carbon/abstractcommandqueue.cpp branches/gui-bullet/spark/carbon/abstractcommandqueue.h branches/gui-bullet/spark/carbon/abstractplugin.cpp branches/gui-bullet/spark/carbon/abstractplugin.h branches/gui-bullet/spark/carbon/attachableframe.cpp branches/gui-bullet/spark/carbon/attachableframe.h branches/gui-bullet/spark/carbon/carbon.cpp branches/gui-bullet/spark/carbon/carbon.h branches/gui-bullet/spark/carbon/communicationmanager.cpp branches/gui-bullet/spark/carbon/communicationmanager.h branches/gui-bullet/spark/carbon/cutelogger/debugappender.cpp branches/gui-bullet/spark/carbon/cutelogger/debugappender.h branches/gui-bullet/spark/carbon/cutelogger/functionappender.cpp branches/gui-bullet/spark/carbon/cutelogger/functionappender.h branches/gui-bullet/spark/carbon/cutelogger/imessagereceiver.cpp branches/gui-bullet/spark/carbon/cutelogger/imessagereceiver.h branches/gui-bullet/spark/carbon/cutelogger/logger.cpp branches/gui-bullet/spark/carbon/cutelogger/logmessage.cpp branches/gui-bullet/spark/carbon/cutelogger/logmessage.h branches/gui-bullet/spark/carbon/cutelogger/logstream.cpp branches/gui-bullet/spark/carbon/cutelogger/logstream.h branches/gui-bullet/spark/carbon/cutelogger/logstreambuffer.cpp branches/gui-bullet/spark/carbon/cutelogger/logstreambuffer.h branches/gui-bullet/spark/carbon/cutelogger/messageobjectappender.cpp branches/gui-bullet/spark/carbon/cutelogger/messageobjectappender.h branches/gui-bullet/spark/carbon/cutelogger/messagereceiverappender.cpp branches/gui-bullet/spark/carbon/cutelogger/messagereceiverappender.h branches/gui-bullet/spark/carbon/frameattachmentpoint.cpp branches/gui-bullet/spark/carbon/frameattachmentpoint.h branches/gui-bullet/spark/carbon/glwidget.cpp branches/gui-bullet/spark/carbon/glwidget.h branches/gui-bullet/spark/carbon/guisettings_pluginsettings.cpp branches/gui-bullet/spark/carbon/guisettings_pluginsettings.h branches/gui-bullet/spark/carbon/guisettings_simulationsettings.cpp branches/gui-bullet/spark/carbon/guisettings_simulationsettings.h branches/gui-bullet/spark/carbon/guisimcontrol.cpp branches/gui-bullet/spark/carbon/guisimcontrol.h branches/gui-bullet/spark/carbon/guisimcontrol_c.cpp branches/gui-bullet/spark/carbon/inputqt.cpp branches/gui-bullet/spark/carbon/inputqt.h branches/gui-bullet/spark/carbon/isimcontrol.cpp branches/gui-bullet/spark/carbon/isimcontrol.h branches/gui-bullet/spark/carbon/libraryloader.cpp branches/gui-bullet/spark/carbon/libraryloader.h branches/gui-bullet/spark/carbon/main.cpp branches/gui-bullet/spark/carbon/matrixwidget.cpp branches/gui-bullet/spark/carbon/matrixwidget.h branches/gui-bullet/spark/carbon/menumanager.cpp branches/gui-bullet/spark/carbon/menumanager.h branches/gui-bullet/spark/carbon/menuobject.cpp branches/gui-bullet/spark/carbon/menuobject.h branches/gui-bullet/spark/carbon/menuobjectcall.cpp branches/gui-bullet/spark/carbon/menuobjectcall.h branches/gui-bullet/spark/carbon/menuobjectconnection.cpp branches/gui-bullet/spark/carbon/menuobjectconnection.h branches/gui-bullet/spark/carbon/menuobjectfile.cpp branches/gui-bullet/spark/carbon/menuobjectfile.h branches/gui-bullet/spark/carbon/menuobjectmenu.cpp branches/gui-bullet/spark/carbon/menuobjectmenu.h branches/gui-bullet/spark/carbon/menuobjectmenuaction.cpp branches/gui-bullet/spark/carbon/menuobjectmenuaction.h branches/gui-bullet/spark/carbon/menuobjecttoolbar.cpp branches/gui-bullet/spark/carbon/menuobjecttoolbar.h branches/gui-bullet/spark/carbon/namedactionreceiver.cpp branches/gui-bullet/spark/carbon/namedactionreceiver.h branches/gui-bullet/spark/carbon/numberedactionreceiver.cpp branches/gui-bullet/spark/carbon/numberedactionreceiver.h branches/gui-bullet/spark/carbon/openglmanager.cpp branches/gui-bullet/spark/carbon/openglmanager.h branches/gui-bullet/spark/carbon/plugin.cpp branches/gui-bullet/spark/carbon/plugin.h branches/gui-bullet/spark/carbon/plugindefinition.cpp branches/gui-bullet/spark/carbon/plugindefinition.h branches/gui-bullet/spark/carbon/plugindialog.cpp branches/gui-bullet/spark/carbon/plugindialog.h branches/gui-bullet/spark/carbon/plugininstantiatormodel.cpp branches/gui-bullet/spark/carbon/plugininstantiatormodel.h branches/gui-bullet/spark/carbon/pluginmanager.cpp branches/gui-bullet/spark/carbon/pluginmanager.h branches/gui-bullet/spark/carbon/pluginthread.cpp branches/gui-bullet/spark/carbon/pluginthread.h branches/gui-bullet/spark/carbon/plugintype.cpp branches/gui-bullet/spark/carbon/plugintype.h branches/gui-bullet/spark/carbon/process.cpp branches/gui-bullet/spark/carbon/process.h branches/gui-bullet/spark/carbon/serverthread.cpp branches/gui-bullet/spark/carbon/serverthread.h branches/gui-bullet/spark/carbon/settings.cpp branches/gui-bullet/spark/carbon/settings.h branches/gui-bullet/spark/carbon/settingsdialog.cpp branches/gui-bullet/spark/carbon/settingsdialog.h branches/gui-bullet/spark/carbon/settingstreeview.cpp branches/gui-bullet/spark/carbon/settingstreeview.h branches/gui-bullet/spark/carbon/settingswidget.cpp branches/gui-bullet/spark/carbon/settingswidget.h branches/gui-bullet/spark/carbon/setupdialog.cpp branches/gui-bullet/spark/carbon/setupdialog.h branches/gui-bullet/spark/carbon/setupframe.cpp branches/gui-bullet/spark/carbon/setupframe.h branches/gui-bullet/spark/carbon/signalplugin.cpp branches/gui-bullet/spark/carbon/signalplugin.h branches/gui-bullet/spark/carbon/simspark.cpp branches/gui-bullet/spark/carbon/simspark.h branches/gui-bullet/spark/carbon/simulation.cpp branches/gui-bullet/spark/carbon/simulation.h branches/gui-bullet/spark/carbon/simulationmanager.cpp branches/gui-bullet/spark/carbon/simulationmanager.h branches/gui-bullet/spark/carbon/simulationprocess.cpp branches/gui-bullet/spark/carbon/simulationprocess.h branches/gui-bullet/spark/carbon/simulationsetup.cpp branches/gui-bullet/spark/carbon/simulationsetup.h branches/gui-bullet/spark/carbon/simulationtask.cpp branches/gui-bullet/spark/carbon/simulationtask.h branches/gui-bullet/spark/carbon/simulationthread.cpp branches/gui-bullet/spark/carbon/simulationthread.h branches/gui-bullet/spark/carbon/sparkcommandqueue.cpp branches/gui-bullet/spark/carbon/sparkcommandqueue.h branches/gui-bullet/spark/carbon/sparkcommands.cpp branches/gui-bullet/spark/carbon/sparkcommands.h branches/gui-bullet/spark/carbon/sparkcontext.cpp branches/gui-bullet/spark/carbon/sparkcontext.h branches/gui-bullet/spark/carbon/sparkcontroller.cpp branches/gui-bullet/spark/carbon/sparkcontroller.h branches/gui-bullet/spark/carbon/sparkprocess.cpp branches/gui-bullet/spark/carbon/sparkprocess.h branches/gui-bullet/spark/carbon/sparkproperty.cpp branches/gui-bullet/spark/carbon/sparkproperty.h branches/gui-bullet/spark/carbon/sparkpropertycontrol.cpp branches/gui-bullet/spark/carbon/sparkpropertycontrol.h branches/gui-bullet/spark/carbon/sparkpropertycontrolbasic.cpp branches/gui-bullet/spark/carbon/sparkpropertycontrolbasic.h branches/gui-bullet/spark/carbon/sparkpropertydata.cpp branches/gui-bullet/spark/carbon/sparkpropertydata.h branches/gui-bullet/spark/carbon/sparkpropertyexecuter.cpp branches/gui-bullet/spark/carbon/sparkpropertyexecuter.h branches/gui-bullet/spark/carbon/sparkpropertylist.cpp branches/gui-bullet/spark/carbon/sparkpropertylist.h branches/gui-bullet/spark/carbon/sparkpropertymanager.cpp branches/gui-bullet/spark/carbon/sparkpropertymanager.h branches/gui-bullet/spark/carbon/sparkpropertytablewidget.cpp branches/gui-bullet/spark/carbon/sparkpropertytablewidget.h branches/gui-bullet/spark/carbon/sparkpropertywidget.cpp branches/gui-bullet/spark/carbon/sparkpropertywidget.h branches/gui-bullet/spark/carbon/sparksimulationthread.cpp branches/gui-bullet/spark/carbon/sparksimulationthread.h branches/gui-bullet/spark/carbon/sparktreemodel.cpp branches/gui-bullet/spark/carbon/sparktreemodel.h branches/gui-bullet/spark/carbon/sparktreeview.cpp branches/gui-bullet/spark/carbon/sparktreeview.h branches/gui-bullet/spark/carbon/taskdefinition.cpp branches/gui-bullet/spark/carbon/taskdefinition.h branches/gui-bullet/spark/carbon/toolseparatorbutton.cpp branches/gui-bullet/spark/carbon/toolseparatorbutton.h branches/gui-bullet/spark/carbon/topic.cpp branches/gui-bullet/spark/carbon/topic.h branches/gui-bullet/spark/carbon/topicregistration.cpp branches/gui-bullet/spark/carbon/topicregistration.h branches/gui-bullet/spark/carbon/treeitem.cpp branches/gui-bullet/spark/carbon/treeitem.h branches/gui-bullet/spark/carbon/typedlineedit.cpp branches/gui-bullet/spark/carbon/typedlineedit.h branches/gui-bullet/spark/carbon/vector2x3widget.cpp branches/gui-bullet/spark/carbon/vector2x3widget.h branches/gui-bullet/spark/carbon/vector3widget.cpp branches/gui-bullet/spark/carbon/vector3widget.h branches/gui-bullet/spark/carbon/vector4widget.cpp branches/gui-bullet/spark/carbon/vector4widget.h branches/gui-bullet/spark/carbon/windowdefinition.cpp branches/gui-bullet/spark/carbon/windowdefinition.h branches/gui-bullet/spark/carbon/windowmanager.cpp branches/gui-bullet/spark/carbon/windowmanager.h branches/gui-bullet/spark/guilayout/guigridlayout/export.h branches/gui-bullet/spark/guilayout/guigridlayout/guigridlayout.cpp branches/gui-bullet/spark/guilayout/guigridlayout/guigridlayout.h branches/gui-bullet/spark/guilayout/guisimplelayout/export.h branches/gui-bullet/spark/guilayout/guisimplelayout/guisimplelayout.cpp branches/gui-bullet/spark/guilayout/guisimplelayout/guisimplelayout.h branches/gui-bullet/spark/guiplugin/logframe/export.h branches/gui-bullet/spark/guiplugin/logframe/logframe.cpp branches/gui-bullet/spark/guiplugin/logframe/logframe.h branches/gui-bullet/spark/guiplugin/logframe/logframe_logsettings.cpp branches/gui-bullet/spark/guiplugin/logframe/logframe_logsettings.h branches/gui-bullet/spark/guiplugin/monitorframe/export.h branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe.cpp branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe.h branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_glconstants.cpp branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_glconstants.h branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglrender.cpp branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglrender.h branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglwidget.cpp branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglwidget.h branches/gui-bullet/spark/guiplugin/scenegraphframe/export.h branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe.cpp branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe.h branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_propertyframe.cpp branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_propertyframe.h branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_scenegraphwidget.cpp branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_scenegraphwidget.h branches/gui-bullet/spark/guiplugin/setupframe/export.h branches/gui-bullet/spark/guiplugin/setupframe/setupframe.cpp branches/gui-bullet/spark/guiplugin/setupframe/setupframe.h branches/gui-bullet/spark/guiplugin/simulationframe/export.h branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe.cpp branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe.h branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe_taskwidget.cpp branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe_taskwidget.h branches/gui-bullet/spark/plugin/inputqt/export.cpp branches/gui-bullet/spark/plugin/inputqt/inputqt.cpp branches/gui-bullet/spark/plugin/inputqt/inputqt.h branches/gui-bullet/spark/plugin/inputqt/inputsystemqt.cpp branches/gui-bullet/spark/plugin/inputqt/inputsystemqt.h branches/gui-bullet/spark/plugin/inputqt/inputsystemqt_c.cpp Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/export.h =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/export.h 2013-06-12 20:48:36 UTC (rev 365) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/export.h 2013-06-12 20:53:27 UTC (rev 366) @@ -1,14 +1,14 @@ -#ifndef EXPORT_LIB -#define EXPORT_LIB -/** - * \file soccercontrolframe/export.h - * \brief Exports the SoccerControlFrame class as a plugin from a shared library. - */ - -#include "soccercontrolframe.h" - -PLUGINS_EXPORT_BEGIN() -PLUGIN_EXPORT(SoccerControlFrame) -PLUGINS_EXPORT_END() - +#ifndef EXPORT_LIB +#define EXPORT_LIB +/** + * \file soccercontrolframe/export.h + * \brief Exports the SoccerControlFrame class as a plugin from a shared library. + */ + +#include "soccercontrolframe.h" + +PLUGINS_EXPORT_BEGIN() +PLUGIN_EXPORT(SoccerControlFrame) +PLUGINS_EXPORT_END() + #endif \ No newline at end of file Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp 2013-06-12 20:48:36 UTC (rev 365) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp 2013-06-12 20:53:27 UTC (rev 366) @@ -1,610 +1,610 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - - this file is part of rcssserver3D - Author: Patrick Geib - Copyright (C) 2012 RoboCup Soccer Server 3D Maintenance Group - $Id$ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -//Local -#include "soccercontrolframe.h" -#include "soccercontrolframe_soccercommands.h" -#include "export.h" - -//Carbon -#include <pluginmanager.h> -#include <carbon.h> -#include <simulationmanager.h> -#include <simulation.h> -#include <sparkcontroller.h> -#include <guisimcontrol.h> -#include <serverthread.h> -#include <simspark.h> -#include <settings.h> - -//SimSpark -#include <oxygen/gamecontrolserver/gamecontrolserver.h> -#include <zeitgeist/leaf.h> - -//Soccer -#include "soccer/gamestateaspect/gamestateaspect.h" -#include "soccer/soccerruleaspect/soccerruleaspect.h" -#include "soccer/ballstateaspect/ballstateaspect.h" -//#include <agentstate/agentstate.h> - -//Boost -#include <boost/make_shared.hpp> - -//Qt -#include <QValidator> - -using namespace boost; -using namespace oxygen; -using namespace SoccerControlFrameUtil; - -//-------------------------------------------------------------- -// Static -//-------------------------------------------------------------- - -//Factory registration -REGISTER_EXPORT_FRAME(SoccerControlFrame, "soccercontrolframe", "Soccer", 1000) - -//Static class information -void SoccerControlFrame::saveClassInfo() -{ - //Description - setClassInfo(mClassId, AbstractPlugin::PI_DESCRIPTION, - tr("The soccer control frame can be used to monitor and control the state of a simspark soccer simulation.")); - - //Icon - setClassInfo(mClassId, AbstractPlugin::PI_ICON_NAME, ":soccer"); - - //Tags - QStringList tags; - tags << "soccer" << "spark" << "rcssserver3d"; - setClassInfo(mClassId, AbstractPlugin::PI_TAGS, tags); -} - -//-------------------------------------------------------------- -// SoccerFrameUpdateControl -//-------------------------------------------------------------- - -SoccerFrameUpdateControl::SoccerFrameUpdateControl(SoccerControlFrame* parent) - : mParent(parent), CommandQueue(0) -{ -} -SoccerFrameUpdateControl::~SoccerFrameUpdateControl() -{ -} - -void SoccerFrameUpdateControl::startCycle() -{ - emit stateStartCycle(); -} - -void SoccerFrameUpdateControl::endCycle() -{ - SparkCommand::CommandQueue::endCycle(); - emit stateEndCycle(); -} - -void SoccerFrameUpdateControl::waitCycle() -{ - SparkCommand::CommandQueue::waitCycle(); - emit stateWaitCycle(); -} - -//-------------------------------------------------------------- -// SoccerFrame -//-------------------------------------------------------------- -// Public -//-------------------------------------------------------------- - -SoccerControlFrame::SoccerControlFrame() : - mSettings(getCarbon()->getSettings()) -{ - //---------------- - //Layout - ui.setupUi(this); - loadFrameDesign(); - - //---------------- - //Variables - mInit = false; - mLastInitState = true; //--> 1 display update during initialization - mReadyUpdate = true; - mSelectedPlayer = -1; - mSelectedPlayMode = PM_NONE; - mUpdateTimer.setInterval(100); - - //---------------- - //Gui-Field init - ui.gameTimeEdit->setValidator(new QDoubleValidator(0.0, INT_MAX, 4, ui.gameTimeEdit)); - ui.team1GoalsEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team1GoalsEdit)); - ui.team2GoalsEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team2GoalsEdit)); - ui.team1PenaltiesEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team1PenaltiesEdit)); - ui.team2PenaltiesEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team2PenaltiesEdit)); - ui.batteryEdit->setValidator(new QDoubleValidator(0.0, INT_MAX, 4, ui.batteryEdit)); - - //---------------- - //Settings - - loadDefaultSettings(); - loadSettings(); - - //---------------- - //Menu Entries - - //---------------- - //Connections - Simulation* simulation = &*getCarbon()->getSimulationManager()->getSimulation(); - connect(simulation, SIGNAL(serverCreated(boost::shared_ptr<ServerThread>)), this, SLOT(updateServerCreated(boost::shared_ptr<ServerThread>))); - - connect(&mUpdateTimer, SIGNAL(timeout()), this, SLOT(readyUpdate())); -} - -SoccerControlFrame::~SoccerControlFrame() -{ - -} - -void SoccerControlFrame::init(const QStringList& parameters) -{ - //Combo box entries - mGameModes.clear(); - ui.playModeComboBox->clear(); - - mGameModes.insert(PM_BeforeKickOff, GameMode(0, PM_BeforeKickOff, true, tr("Before Kickoff"))); - mGameModes.insert(PM_KickOff_Left, GameMode(0, PM_KickOff_Left, true, tr("KickOff Left"))); - mGameModes.insert(PM_KickOff_Right, GameMode(0, PM_KickOff_Right, true, tr("KickOff Right"))); - mGameModes.insert(PM_PlayOn, GameMode(0, PM_PlayOn, true, tr("Play On"))); - mGameModes.insert(PM_KickIn_Left, GameMode(0, PM_KickIn_Left, true, tr("Kick-In Left"))); - mGameModes.insert(PM_KickIn_Right, GameMode(0, PM_KickIn_Right, true, tr("Kick-In Right"))); - mGameModes.insert(PM_CORNER_KICK_LEFT, GameMode(0, PM_CORNER_KICK_LEFT, true, tr("Corner Kick Left"))); - mGameModes.insert(PM_CORNER_KICK_RIGHT, GameMode(0, PM_CORNER_KICK_RIGHT, true, tr("Corner Kick Right"))); - mGameModes.insert(PM_GOAL_KICK_LEFT, GameMode(0, PM_GOAL_KICK_LEFT, true, tr("Goal Kick Left"))); - mGameModes.insert(PM_GOAL_KICK_RIGHT, GameMode(0, PM_GOAL_KICK_RIGHT, true, tr("Goal Kick Right"))); - mGameModes.insert(PM_OFFSIDE_LEFT, GameMode(0, PM_OFFSIDE_LEFT, true, tr("Offside Left"))); - mGameModes.insert(PM_OFFSIDE_RIGHT, GameMode(0, PM_OFFSIDE_RIGHT, true, tr("Offside Right"))); - mGameModes.insert(PM_GameOver, GameMode(0, PM_GameOver, true, tr("Game Over"))); - mGameModes.insert(PM_Goal_Left, GameMode(0, PM_Goal_Left, true, tr("Goal Left"))); - mGameModes.insert(PM_Goal_Right, GameMode(0, PM_Goal_Right, true, tr("Goal Right"))); - mGameModes.insert(PM_FREE_KICK_LEFT, GameMode(0, PM_FREE_KICK_LEFT, true, tr("Free Kick Left"))); - mGameModes.insert(PM_FREE_KICK_RIGHT, GameMode(0, PM_FREE_KICK_RIGHT, true, tr("Free Kick Right"))); - - int run = 0; - for (auto it = mGameModes.begin(); it != mGameModes.end(); it++) - { - it->mIndex = run; - ui.playModeComboBox->addItem(it->mName); - run++; - } - mSelectedPlayMode = PM_BeforeKickOff; - - tryInitSpark(); - updateDisplay(); -} - -bool SoccerControlFrame::initialized() -{ - return mInit; -} - -void SoccerControlFrame::loadSettings() -{ - -} - -void SoccerControlFrame::saveSettings() -{ - -} - -void SoccerControlFrame::loadDefaultSettings() -{ - mGameControlServerPath = "/sys/server/gamecontrol/"; - mGameStateAspectPath = "/sys/server/gamecontrol/GameStateAspect/"; - mSoccerRuleAspectPath = "/sys/server/gamecontrol/SoccerRuleAspect/"; - mBallStateAspectPath = "/sys/server/gamecontrol/BallStateAspect/"; -} - -//-------------------------------------------------------------- -// Protected -//-------------------------------------------------------------- - -bool SoccerControlFrame::tryInitSpark() -{ - //If already initialized, simply update - if (mInit) - updateDisplay(); - - //If there is no spark controller, try to get it - if (mSparkController.get() == 0) - { - mServerThread = getCarbon()->getSimulationManager()->getSparkServerThread(); - - if (mServerThread.get() == 0) - return false; - else - { - mSparkController = mServerThread->getSparkController(); - connect(&*mSparkController, SIGNAL(sparkRunning(SparkController*)), this, SLOT(updateSparkRunning(SparkController*))); - } - } - - //If there is a spark controller, check for SimSpark - if (mSparkController->getSpark().get() != 0) - { - //There is a controller and simspark-> initialize - - QString gameControlServer = mGameControlServerPath; - QString gameStateAspect = mGameStateAspectPath; - QString soccerRuleAspect = mSoccerRuleAspectPath; - QString ballStateAspect = mBallStateAspectPath; - - //Try to find soccer aspects - if (mSettings->beginGroup(this, true, 1000)) //lock - { - gameControlServer = mSettings->value("mGameControlServerPath", mGameControlServerPath).toString(); - gameStateAspect = mSettings->value("mGameStateAspectPath", mGameStateAspectPath).toString(); - soccerRuleAspect = mSettings->value("mSoccerRuleAspectPath", mSoccerRuleAspectPath).toString(); - ballStateAspect = mSettings->value("mBallStateAspectPath", mBallStateAspectPath).toString(); - mSettings->endGroup(true); //unlock - } - else - { - LOG_WARNING() << "Could not read Settings object in SoccerControlFrame. Using default values for control node paths."; - } - - SimSpark* spark = &*mSparkController->getSpark(); - boost::shared_ptr<GameControlServer> gameControl(shared_dynamic_cast<GameControlServer>(spark->GetCore()->Get(gameControlServer.toStdString()))); - boost::shared_ptr<GameStateAspect> gameState (shared_dynamic_cast<GameStateAspect> (spark->GetCore()->Get(gameStateAspect.toStdString()))); - boost::shared_ptr<SoccerRuleAspect> soccerRule (shared_dynamic_cast<SoccerRuleAspect> (spark->GetCore()->Get(soccerRuleAspect.toStdString()))); - boost::shared_ptr<BallStateAspect> ballState (shared_dynamic_cast<BallStateAspect> (spark->GetCore()->Get(ballStateAspect.toStdString()))); - - bool success = true; - if (!gameControl.get()) - { - LOG_ERROR() << "Soccer GameControlServer not found. Expected it to be at " << gameControlServer << "."; - success = false; - } - if (!gameState.get()) - { - LOG_ERROR() << "Soccer GameStateAspect not found. Expected it to be at " << gameStateAspect << "."; - success = false; - } - if (!soccerRule.get()) - { - LOG_ERROR() << "Soccer SoccerRuleAspect not found. Expected it to be at " << soccerRuleAspect << "."; - success = false; - } - if (!ballState.get()) - { - LOG_ERROR() << "Soccer BallStateAspect not found. Expected it to be at " << ballStateAspect << "."; - success = false; - } - - if (success == false) - { - //Init failed, return - mGameControlServer.reset(); - mRuleAspect.reset(); - mBallAspect.reset(); - mGameAspect.reset(); - return false; - } - - //All nodes found, init successful - mGameControlServer = gameControl; - mRuleAspect = soccerRule; - mBallAspect = ballState; - mGameAspect = gameState; - - //Register control node that polls an update every time a cycle ended - registerUpdater(); - - mInit = true; - updateDisplay(); - return true; - } - return false; -} - -void SoccerControlFrame::registerUpdater() -{ - shared_ptr<GuiSimControl> simControl = mSparkController->getSimulationControl().lock(); - if (simControl.get() == 0) - { - LOG_ERROR() << "No gui simulation control node found to register updater in."; - return; - } - - //Remove old updater (should happen automatically, just to be safe) - if (mUpdater.get() != 0) - { - simControl->unregisterSimControl(mUpdater); - mUpdater.reset(); - } - - //Create new updater - mUpdater = shared_ptr<SoccerFrameUpdateControl>(new SoccerFrameUpdateControl(this)); - simControl->registerSimControl(mUpdater); - connect(&*mUpdater, SIGNAL(stateEndCycle()), this, SLOT(onCycleFinished())); //Queued connection - connect(&*mUpdater, SIGNAL(stateWaitCycle()), this, SLOT(onCycleFinished())); //Queued connection - - //Start update timer - mUpdateTimer.start(); -} - -//-------------------------------------------------------------- -// Private -//-------------------------------------------------------------- - -//-------------------------------------------------------------- -// Protected Slots -//-------------------------------------------------------------- - -void SoccerControlFrame::updateServerCreated(boost::shared_ptr<ServerThread> server) -{ - mSparkController = server->getSparkController(); - connect(&*mSparkController, SIGNAL(sparkRunning(SparkController*)), this, SLOT(updateSparkRunning(SparkController*))); - tryInitSpark(); -} - -void SoccerControlFrame::updateSparkRunning(SparkController* controller) -{ - if (mSparkController.get() != 0) - { - if (mSparkController->getSpark().get() == controller->getSpark().get()) - { - tryInitSpark(); - } - } -} - -void SoccerControlFrame::onCycleFinished() -{ - updateDisplay(); - mReadyUpdate = false; -} - -//-------------------------------------------------------------- -// Public Slots -//-------------------------------------------------------------- - -void SoccerControlFrame::readyUpdate() -{ - mReadyUpdate = true; -} - -void SoccerControlFrame::updateDisplay() -{ - if (mLastInitState != mInit) - { - mLastInitState = mInit; - mUpdateCount = 0; - - ui.batteryEdit->setEnabled(mInit); - ui.temperatureEdit->setEnabled(mInit); - ui.gameTimeEdit->setEnabled(mInit); - ui.team1GoalsEdit->setEnabled(mInit); - ui.team2GoalsEdit->setEnabled(mInit); - ui.team1PenaltiesEdit->setEnabled(mInit); - ui.team2PenaltiesEdit->setEnabled(mInit); - - ui.gameTimeResetButton->setEnabled(mInit); - ui.resetBatteryButton->setEnabled(mInit); - ui.resetTemperatureButton->setEnabled(mInit); - ui.kickOffButton->setEnabled(mInit); - ui.playModeButton->setEnabled(mInit); - ui.playModeComboBox->setEnabled(mInit); - - mSelectedPlayer = -1; - } - - if (!mInit) - { - ui.batteryEdit->setText(""); - ui.temperatureEdit->setText(""); - ui.gameTimeEdit->setText(""); - ui.team1GoalsEdit->setText(""); - ui.team2GoalsEdit->setText(""); - ui.team1PenaltiesEdit->setText(""); - ui.team2PenaltiesEdit->setText(""); - ui.team1NameLabel->setText(tr("Left")); - ui.team2NameLabel->setText(tr("Right")); - ui.agentNameLabel->setText(""); - ui.agentTeamLabel->setText(""); - ui.playModeLabel->setText(tr("Not initialized.")); - } - - if (mInit && mReadyUpdate) - { - //Read and display non-changing values - if (mUpdateCount == 0) - { - } - - //Read and update changing values - ui.team1NameLabel->setText(mGameAspect->GetTeamName(TI_LEFT).c_str()); - ui.team2NameLabel->setText(mGameAspect->GetTeamName(TI_RIGHT).c_str()); - if (!ui.team1GoalsEdit->hasFocus()) ui.team1GoalsEdit->setText(QString::number(mGameAspect->GetScore(TI_LEFT))); - if (!ui.team2GoalsEdit->hasFocus()) ui.team2GoalsEdit->setText(QString::number(mGameAspect->GetScore(TI_RIGHT))); - if (!ui.team1PenaltiesEdit->hasFocus()) ui.team1PenaltiesEdit->setText("0"); - if (!ui.team2PenaltiesEdit->hasFocus()) ui.team2PenaltiesEdit->setText("0"); - - if (!ui.gameTimeEdit->hasFocus()) ui.gameTimeEdit->setText(QString::number(mGameAspect->GetTime())); - - auto pos = mGameModes.find((int)mGameAspect->GetPlayMode()); - if (pos == mGameModes.end()) - { - LOG_WARNING() << "Current game mode " << mGameAspect->GetPlayMode() << " is unknown."; - } - else - { - if (mUpdateCount == 0) - ui.playModeComboBox->setCurrentIndex(pos->mIndex); - ui.playModeLabel->setText(pos->mName); - } - - updatePlayerDisplay(); - } - - mUpdateCount++; -} - -void SoccerControlFrame::updatePlayerDisplay() -{ - if (mSelectedPlayer == -1) - return; - - if (!mInit) - return; -} - -void SoccerControlFrame::editGameTime() -{ - if (!mInit) - return; - - mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTime>(mGameAspect, ui.gameTimeEdit->text().toFloat())); -} - -void SoccerControlFrame::resetGameTime() -{ - if (!mInit) - return; - - mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTime>(mGameAspect, 0.0)); -} - -void SoccerControlFrame::editTeam1Goals() -{ - if (!mInit) - return; - - mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTeamGoals>(mGameAspect, TI_LEFT, ui.team1GoalsEdit->text().toInt())); -} - -void SoccerControlFrame::editTeam2Goals() -{ - if (!mInit) - return; - - mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTeamGoals>(mGameAspect, TI_LEFT, ui.team2GoalsEdit->text().toInt())); -} - -void SoccerControlFrame::editTeam1Penalties() -{ - if (!mInit) - return; -} - -void SoccerControlFrame::editTeam2Penalties() -{ - if (!mInit) - return; -} - -void SoccerControlFrame::selectPlayMode(int index) -{ - if (!mInit) - return; - - ui.playModeButton->setEnabled(false); - - for (auto it = mGameModes.begin(); it != mGameModes.end(); it++) - { - if (it->mIndex == index) - { - mSelectedPlayMode = it->mMode; - ui.playModeButton->setEnabled(it->mManual); - } - } -} - -void SoccerControlFrame::changePlayMode() -{ - if (!mInit) - return; - - mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::ChangePlayMode>(mGameAspect, mSelectedPlayMode)); -} - -void SoccerControlFrame::kickOff() -{ - if (!mInit) - return; - - mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::KickOff>(mGameAspect)); -} - -void SoccerControlFrame::clearPlayers() -{ - if (!mInit) - return; -} - - -void SoccerControlFrame::selectPlayer(int index) -{ - if (!mInit) - return; - - mSelectedPlayer = -1; - updatePlayerDisplay(); -} - -void SoccerControlFrame::editBattery() -{ - if (!mInit) - return; - - if (mSelectedPlayer == -1) - return; - -} - -void SoccerControlFrame::editTemperature() -{ - if (!mInit) - return; - - if (mSelectedPlayer == -1) - return; - -} - -void SoccerControlFrame::resetBattery() -{ - if (!mInit) - return; - - if (mSelectedPlayer == -1) - return; - -} - -void SoccerControlFrame::resetTemperature() -{ - if (!mInit) - return; - - if (mSelectedPlayer == -1) - return; - - +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Author: Patrick Geib + Copyright (C) 2012 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +//Local +#include "soccercontrolframe.h" +#include "soccercontrolframe_soccercommands.h" +#include "export.h" + +//Carbon +#include <pluginmanager.h> +#include <carbon.h> +#include <simulationmanager.h> +#include <simulation.h> +#include <sparkcontroller.h> +#include <guisimcontrol.h> +#include <serverthread.h> +#include <simspark.h> +#include <settings.h> + +//SimSpark +#include <oxygen/gamecontrolserver/gamecontrolserver.h> +#include <zeitgeist/leaf.h> + +//Soccer +#include "soccer/gamestateaspect/gamestateaspect.h" +#include "soccer/soccerruleaspect/soccerruleaspect.h" +#include "soccer/ballstateaspect/ballstateaspect.h" +//#include <agentstate/agentstate.h> + +//Boost +#include <boost/make_shared.hpp> + +//Qt +#include <QValidator> + +using namespace boost; +using namespace oxygen; +using namespace SoccerControlFrameUtil; + +//-------------------------------------------------------------- +// Static +//-------------------------------------------------------------- + +//Factory registration +REGISTER_EXPORT_FRAME(SoccerControlFrame, "soccercontrolframe", "Soccer", 1000) + +//Static class information +void SoccerControlFrame::saveClassInfo() +{ + //Description + setClassInfo(mClassId, AbstractPlugin::PI_DESCRIPTION, + tr("The soccer control frame can be used to monitor and control the state of a simspark soccer simulation.")); + + //Icon + setClassInfo(mClassId, AbstractPlugin::PI_ICON_NAME, ":soccer"); + + //Tags + QStringList tags; + tags << "soccer" << "spark" << "rcssserver3d"; + setClassInfo(mClassId, AbstractPlugin::PI_TAGS, tags); +} + +//-------------------------------------------------------------- +// SoccerFrameUpdateControl +//-------------------------------------------------------------- + +SoccerFrameUpdateControl::SoccerFrameUpdateControl(SoccerControlFrame* parent) + : mParent(parent), CommandQueue(0) +{ +} +SoccerFrameUpdateControl::~SoccerFrameUpdateControl() +{ +} + +void SoccerFrameUpdateControl::startCycle() +{ + emit stateStartCycle(); +} + +void SoccerFrameUpdateControl::endCycle() +{ + SparkCommand::CommandQueue::endCycle(); + emit stateEndCycle(); +} + +void SoccerFrameUpdateControl::waitCycle() +{ + SparkCommand::CommandQueue::waitCycle(); + emit stateWaitCycle(); +} + +//-------------------------------------------------------------- +// SoccerFrame +//-------------------------------------------------------------- +// Public +//-------------------------------------------------------------- + +SoccerControlFrame::SoccerControlFrame() : + mSettings(getCarbon()->getSettings()) +{ + //---------------- + //Layout + ui.setupUi(this); + loadFrameDesign(); + + //---------------- + //Variables + mInit = false; + mLastInitState = true; //--> 1 display update during initialization + mReadyUpdate = true; + mSelectedPlayer = -1; + mSelectedPlayMode = PM_NONE; + mUpdateTimer.setInterval(100); + + //---------------- + //Gui-Field init + ui.gameTimeEdit->setValidator(new QDoubleValidator(0.0, INT_MAX, 4, ui.gameTimeEdit)); + ui.team1GoalsEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team1GoalsEdit)); + ui.team2GoalsEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team2GoalsEdit)); + ui.team1PenaltiesEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team1PenaltiesEdit)); + ui.team2PenaltiesEdit->setValidator(new QIntValidator(0, INT_MAX, ui.team2PenaltiesEdit)); + ui.batteryEdit->setValidator(new QDoubleValidator(0.0, INT_MAX, 4, ui.batteryEdit)); + + //---------------- + //Settings + + loadDefaultSettings(); + loadSettings(); + + //---------------- + //Menu Entries + + //---------------- + //Connections + Simulation* simulation = &*getCarbon()->getSimulationManager()->getSimulation(); + connect(simulation, SIGNAL(serverCreated(boost::shared_ptr<ServerThread>)), this, SLOT(updateServerCreated(boost::shared_ptr<ServerThread>))); + + connect(&mUpdateTimer, SIGNAL(timeout()), this, SLOT(readyUpdate())); +} + +SoccerControlFrame::~SoccerControlFrame() +{ + +} + +void SoccerControlFrame::init(const QStringList& parameters) +{ + //Combo box entries + mGameModes.clear(); + ui.playModeComboBox->clear(); + + mGameModes.insert(PM_BeforeKickOff, GameMode(0, PM_BeforeKickOff, true, tr("Before Kickoff"))); + mGameModes.insert(PM_KickOff_Left, GameMode(0, PM_KickOff_Left, true, tr("KickOff Left"))); + mGameModes.insert(PM_KickOff_Right, GameMode(0, PM_KickOff_Right, true, tr("KickOff Right"))); + mGameModes.insert(PM_PlayOn, GameMode(0, PM_PlayOn, true, tr("Play On"))); + mGameModes.insert(PM_KickIn_Left, GameMode(0, PM_KickIn_Left, true, tr("Kick-In Left"))); + mGameModes.insert(PM_KickIn_Right, GameMode(0, PM_KickIn_Right, true, tr("Kick-In Right"))); + mGameModes.insert(PM_CORNER_KICK_LEFT, GameMode(0, PM_CORNER_KICK_LEFT, true, tr("Corner Kick Left"))); + mGameModes.insert(PM_CORNER_KICK_RIGHT, GameMode(0, PM_CORNER_KICK_RIGHT, true, tr("Corner Kick Right"))); + mGameModes.insert(PM_GOAL_KICK_LEFT, GameMode(0, PM_GOAL_KICK_LEFT, true, tr("Goal Kick Left"))); + mGameModes.insert(PM_GOAL_KICK_RIGHT, GameMode(0, PM_GOAL_KICK_RIGHT, true, tr("Goal Kick Right"))); + mGameModes.insert(PM_OFFSIDE_LEFT, GameMode(0, PM_OFFSIDE_LEFT, true, tr("Offside Left"))); + mGameModes.insert(PM_OFFSIDE_RIGHT, GameMode(0, PM_OFFSIDE_RIGHT, true, tr("Offside Right"))); + mGameModes.insert(PM_GameOver, GameMode(0, PM_GameOver, true, tr("Game Over"))); + mGameModes.insert(PM_Goal_Left, GameMode(0, PM_Goal_Left, true, tr("Goal Left"))); + mGameModes.insert(PM_Goal_Right, GameMode(0, PM_Goal_Right, true, tr("Goal Right"))); + mGameModes.insert(PM_FREE_KICK_LEFT, GameMode(0, PM_FREE_KICK_LEFT, true, tr("Free Kick Left"))); + mGameModes.insert(PM_FREE_KICK_RIGHT, GameMode(0, PM_FREE_KICK_RIGHT, true, tr("Free Kick Right"))); + + int run = 0; + for (auto it = mGameModes.begin(); it != mGameModes.end(); it++) + { + it->mIndex = run; + ui.playModeComboBox->addItem(it->mName); + run++; + } + mSelectedPlayMode = PM_BeforeKickOff; + + tryInitSpark(); + updateDisplay(); +} + +bool SoccerControlFrame::initialized() +{ + return mInit; +} + +void SoccerControlFrame::loadSettings() +{ + +} + +void SoccerControlFrame::saveSettings() +{ + +} + +void SoccerControlFrame::loadDefaultSettings() +{ + mGameControlServerPath = "/sys/server/gamecontrol/"; + mGameStateAspectPath = "/sys/server/gamecontrol/GameStateAspect/"; + mSoccerRuleAspectPath = "/sys/server/gamecontrol/SoccerRuleAspect/"; + mBallStateAspectPath = "/sys/server/gamecontrol/BallStateAspect/"; +} + +//-------------------------------------------------------------- +// Protected +//-------------------------------------------------------------- + +bool SoccerControlFrame::tryInitSpark() +{ + //If already initialized, simply update + if (mInit) + updateDisplay(); + + //If there is no spark controller, try to get it + if (mSparkController.get() == 0) + { + mServerThread = getCarbon()->getSimulationManager()->getSparkServerThread(); + + if (mServerThread.get() == 0) + return false; + else + { + mSparkController = mServerThread->getSparkController(); + connect(&*mSparkController, SIGNAL(sparkRunning(SparkController*)), this, SLOT(updateSparkRunning(SparkController*))); + } + } + + //If there is a spark controller, check for SimSpark + if (mSparkController->getSpark().get() != 0) + { + //There is a controller and simspark-> initialize + + QString gameControlServer = mGameControlServerPath; + QString gameStateAspect = mGameStateAspectPath; + QString soccerRuleAspect = mSoccerRuleAspectPath; + QString ballStateAspect = mBallStateAspectPath; + + //Try to find soccer aspects + if (mSettings->beginGroup(this, true, 1000)) //lock + { + gameControlServer = mSettings->value("mGameControlServerPath", mGameControlServerPath).toString(); + gameStateAspect = mSettings->value("mGameStateAspectPath", mGameStateAspectPath).toString(); + soccerRuleAspect = mSettings->value("mSoccerRuleAspectPath", mSoccerRuleAspectPath).toString(); + ballStateAspect = mSettings->value("mBallStateAspectPath", mBallStateAspectPath).toString(); + mSettings->endGroup(true); //unlock + } + else + { + LOG_WARNING() << "Could not read Settings object in SoccerControlFrame. Using default values for control node paths."; + } + + SimSpark* spark = &*mSparkController->getSpark(); + boost::shared_ptr<GameControlServer> gameControl(shared_dynamic_cast<GameControlServer>(spark->GetCore()->Get(gameControlServer.toStdString()))); + boost::shared_ptr<GameStateAspect> gameState (shared_dynamic_cast<GameStateAspect> (spark->GetCore()->Get(gameStateAspect.toStdString()))); + boost::shared_ptr<SoccerRuleAspect> soccerRule (shared_dynamic_cast<SoccerRuleAspect> (spark->GetCore()->Get(soccerRuleAspect.toStdString()))); + boost::shared_ptr<BallStateAspect> ballState (shared_dynamic_cast<BallStateAspect> (spark->GetCore()->Get(ballStateAspect.toStdString()))); + + bool success = true; + if (!gameControl.get()) + { + LOG_ERROR() << "Soccer GameControlServer not found. Expected it to be at " << gameControlServer << "."; + success = false; + } + if (!gameState.get()) + { + LOG_ERROR() << "Soccer GameStateAspect not found. Expected it to be at " << gameStateAspect << "."; + success = false; + } + if (!soccerRule.get()) + { + LOG_ERROR() << "Soccer SoccerRuleAspect not found. Expected it to be at " << soccerRuleAspect << "."; + success = false; + } + if (!ballState.get()) + { + LOG_ERROR() << "Soccer BallStateAspect not found. Expected it to be at " << ballStateAspect << "."; + success = false; + } + + if (success == false) + { + //Init failed, return + mGameControlServer.reset(); + mRuleAspect.reset(); + mBallAspect.reset(); + mGameAspect.reset(); + return false; + } + + //All nodes found, init successful + mGameControlServer = gameControl; + mRuleAspect = soccerRule; + mBallAspect = ballState; + mGameAspect = gameState; + + //Register control node that polls an update every time a cycle ended + registerUpdater(); + + mInit = true; + updateDisplay(); + return true; + } + return false; +} + +void SoccerControlFrame::registerUpdater() +{ + shared_ptr<GuiSimControl> simControl = mSparkController->getSimulationControl().lock(); + if (simControl.get() == 0) + { + LOG_ERROR() << "No gui simulation control node found to register updater in."; + return; + } + + //Remove old updater (should happen automatically, just to be safe) + if (mUpdater.get() != 0) + { + simControl->unregisterSimControl(mUpdater); + mUpdater.reset(); + } + + //Create new updater + mUpdater = shared_ptr<SoccerFrameUpdateControl>(new SoccerFrameUpdateControl(this)); + simControl->registerSimControl(mUpdater); + connect(&*mUpdater, SIGNAL(stateEndCycle()), this, SLOT(onCycleFinished())); //Queued connection + connect(&*mUpdater, SIGNAL(stateWaitCycle()), this, SLOT(onCycleFinished())); //Queued connection + + //Start update timer + mUpdateTimer.start(); +} + +//-------------------------------------------------------------- +// Private +//-------------------------------------------------------------- + +//-------------------------------------------------------------- +// Protected Slots +//-------------------------------------------------------------- + +void SoccerControlFrame::updateServerCreated(boost::shared_ptr<ServerThread> server) +{ + mSparkController = server->getSparkController(); + connect(&*mSparkController, SIGNAL(sparkRunning(SparkController*)), this, SLOT(updateSparkRunning(SparkController*))); + tryInitSpark(); +} + +void SoccerControlFrame::updateSparkRunning(SparkController* controller) +{ + if (mSparkController.get() != 0) + { + if (mSparkController->getSpark().get() == controller->getSpark().get()) + { + tryInitSpark(); + } + } +} + +void SoccerControlFrame::onCycleFinished() +{ + updateDisplay(); + mReadyUpdate = false; +} + +//-------------------------------------------------------------- +// Public Slots +//-------------------------------------------------------------- + +void SoccerControlFrame::readyUpdate() +{ + mReadyUpdate = true; +} + +void SoccerControlFrame::updateDisplay() +{ + if (mLastInitState != mInit) + { + mLastInitState = mInit; + mUpdateCount = 0; + + ui.batteryEdit->setEnabled(mInit); + ui.temperatureEdit->setEnabled(mInit); + ui.gameTimeEdit->setEnabled(mInit); + ui.team1GoalsEdit->setEnabled(mInit); + ui.team2GoalsEdit->setEnabled(mInit); + ui.team1PenaltiesEdit->setEnabled(mInit); + ui.team2PenaltiesEdit->setEnabled(mInit); + + ui.gameTimeResetButton->setEnabled(mInit); + ui.resetBatteryButton->setEnabled(mInit); + ui.resetTemperatureButton->setEnabled(mInit); + ui.kickOffButton->setEnabled(mInit); + ui.playModeButton->setEnabled(mInit); + ui.playModeComboBox->setEnabled(mInit); + + mSelectedPlayer = -1; + } + + if (!mInit) + { + ui.batteryEdit->setText(""); + ui.temperatureEdit->setText(""); + ui.gameTimeEdit->setText(""); + ui.team1GoalsEdit->setText(""); + ui.team2GoalsEdit->setText(""); + ui.team1PenaltiesEdit->setText(""); + ui.team2PenaltiesEdit->setText(""); + ui.team1NameLabel->setText(tr("Left")); + ui.team2NameLabel->setText(tr("Right")); + ui.agentNameLabel->setText(""); + ui.agentTeamLabel->setText(""); + ui.playModeLabel->setText(tr("Not initialized.")); + } + + if (mInit && mReadyUpdate) + { + //Read and display non-changing values + if (mUpdateCount == 0) + { + } + + //Read and update changing values + ui.team1NameLabel->setText(mGameAspect->GetTeamName(TI_LEFT).c_str()); + ui.team2NameLabel->setText(mGameAspect->GetTeamName(TI_RIGHT).c_str()); + if (!ui.team1GoalsEdit->hasFocus()) ui.team1GoalsEdit->setText(QString::number(mGameAspect->GetScore(TI_LEFT))); + if (!ui.team2GoalsEdit->hasFocus()) ui.team2GoalsEdit->setText(QString::number(mGameAspect->GetScore(TI_RIGHT))); + if (!ui.team1PenaltiesEdit->hasFocus()) ui.team1PenaltiesEdit->setText("0"); + if (!ui.team2PenaltiesEdit->hasFocus()) ui.team2PenaltiesEdit->setText("0"); + + if (!ui.gameTimeEdit->hasFocus()) ui.gameTimeEdit->setText(QString::number(mGameAspect->GetTime())); + + auto pos = mGameModes.find((int)mGameAspect->GetPlayMode()); + if (pos == mGameModes.end()) + { + LOG_WARNING() << "Current game mode " << mGameAspect->GetPlayMode() << " is unknown."; + } + else + { + if (mUpdateCount == 0) + ui.playModeComboBox->setCurrentIndex(pos->mIndex); + ui.playModeLabel->setText(pos->mName); + } + + updatePlayerDisplay(); + } + + mUpdateCount++; +} + +void SoccerControlFrame::updatePlayerDisplay() +{ + if (mSelectedPlayer == -1) + return; + + if (!mInit) + return; +} + +void SoccerControlFrame::editGameTime() +{ + if (!mInit) + return; + + mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTime>(mGameAspect, ui.gameTimeEdit->text().toFloat())); +} + +void SoccerControlFrame::resetGameTime() +{ + if (!mInit) + return; + + mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTime>(mGameAspect, 0.0)); +} + +void SoccerControlFrame::editTeam1Goals() +{ + if (!mInit) + return; + + mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTeamGoals>(mGameAspect, TI_LEFT, ui.team1GoalsEdit->text().toInt())); +} + +void SoccerControlFrame::editTeam2Goals() +{ + if (!mInit) + return; + + mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::SetTeamGoals>(mGameAspect, TI_LEFT, ui.team2GoalsEdit->text().toInt())); +} + +void SoccerControlFrame::editTeam1Penalties() +{ + if (!mInit) + return; +} + +void SoccerControlFrame::editTeam2Penalties() +{ + if (!mInit) + return; +} + +void SoccerControlFrame::selectPlayMode(int index) +{ + if (!mInit) + return; + + ui.playModeButton->setEnabled(false); + + for (auto it = mGameModes.begin(); it != mGameModes.end(); it++) + { + if (it->mIndex == index) + { + mSelectedPlayMode = it->mMode; + ui.playModeButton->setEnabled(it->mManual); + } + } +} + +void SoccerControlFrame::changePlayMode() +{ + if (!mInit) + return; + + mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::ChangePlayMode>(mGameAspect, mSelectedPlayMode)); +} + +void SoccerControlFrame::kickOff() +{ + if (!mInit) + return; + + mUpdater->queueCommand(make_shared<SoccerControlFrameUtil::KickOff>(mGameAspect)); +} + +void SoccerControlFrame::clearPlayers() +{ + if (!mInit) + return; +} + + +void SoccerControlFrame::selectPlayer(int index) +{ + if (!mInit) + return; + + mSelectedPlayer = -1; + updatePlayerDisplay(); +} + +void SoccerControlFrame::editBattery() +{ + if (!mInit) + return; + + if (mSelectedPlayer == -1) + return; + +} + +void SoccerControlFrame::editTemperature() +{ + if (!mInit) + return; + + if (mSelectedPlayer == -1) + return; + +} + +void SoccerControlFrame::resetBattery() +{ + if (!mInit) + return; + + if (mSelectedPlayer == -1) + return; + +} + +void SoccerControlFrame::resetTemperature() +{ + if (!mInit) + return; + + if (mSelectedPlayer == -1) + return; + + } \ No newline at end of file Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h 2013-06-12 20:48:36 UTC (rev 365) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h 2013-06-12 20:53:27 UTC (rev 366) @@ -1,391 +1,391 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - - this file is part of rcssserver3D - Author: Patrick Geib - Copyright (C) 2012 RoboCup Soccer Server 3D Maintenance Group - $Id$ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef SOCCERCONTROLFRAME_H -#define SOCCERCONTROLFRAME_H -/** - * \file soccercontrolframe.h - * \brief Contains SoccerControlFrame and SoccerFrameUpdateControl classes. - */ - -#include "ui_soccercontrolframe.h" -#include "attachableframe.h" -#include "isimcontrol.h" -#include "sparkcommandqueue.h" - -#include <boost/shared_ptr.hpp> -#include <QObject> -#include <QTimer> - -#include <soccer/soccertypes.h> - -class ServerThread; -class SimSpark; -class Settings; - -class SoccerFrameUpdateControl; -class SoccerControlFrame; - -class GameStateAspect; -class SoccerRuleAspect; -class BallStateAspect; - -namespace oxygen -{ - class GameControlServer; -} - -/*! - \brief Update command queue read and set soccer variables and settings in the SimSpark simulation. -*/ -class SoccerFrameUpdateControl : public QObject, public SparkCommand::CommandQueue // is ISimControl -{ - Q_OBJECT - -public: - //public functions - - /*! - \brief Constructor. - */ - SoccerFrameUpdateControl(SoccerControlFrame* parent); - /*! - \brief Destructor. - */ - ~SoccerFrameUpdateControl(); - - /*! - \brief Called when the simulation cycle starts. - - Emits stateStartCycle() - */ - virtual void startCycle(); - /*! - \brief Called when the simulation cycle ends. - - Executes update commands. - Emits stateEndCycle() - */ - virtual void endCycle(); - /*! - \brief Called when the simulation executes a wait-cycle. - - Executes update commands. - Emits stateWaitCycle() - */ - virtual void waitCycle(); - -public: signals: - //public signals - - /*! - \brief Emittet when simualtion cycle starts. - - Calls update function. - */ - void stateStartCycle(); - /*! - \brief Emitted when simulation cycle ends. - - Calls update function. - */ - void stateEndCycle(); - /*! - \brief Emitted when simulation executes a wait-cycle. - - Calls update function. - */ - void stateWaitCycle(); - -public: - //public members - - SoccerControlFrame* mParent; /*!< Parent frame. */ -}; - -/*! - \brief AttachableFrame plugin that displays the state of a Ssoccer simulation and can control it. - - The SoccerControlFrame will wait and try to identify a soccer simulation in every Spark ServerThread that is started. - When it has found a ServerThread that runs a soccer simulation, the frame will register an updater to the SparkController and repeatedly update the - view on soccer variables like the team names, goals and the game time. - - The soccer values can be changed. - A List of SoccerFrameUtil::SoccerCommand derived classes can queue update calls for soccer variables and safely change the current game state. - - \todo Player control not implemented yet. Anyway, for player control to be effective there need to be additional functions to control them. - At the moment the only available functions would be battery state and temperature. - - \todo Currently the frame only controls basic soccer game control with the GameStateAspect and GameControlServer. - Additional control with the BallStateAspect, SoccerRuleAspect and the trainer command parser could be added. -*/ -class SoccerControlFrame : public AttachableFrame -{ - Q_OBJECT - GUI_FRAME - -public: - //public types - - /*! - \brief Description of the current game mode. - - Contains all the soccer game modes (BeforeKickoff, GoalLeft, FreekickRight and so on) and is robust to extension of the game modes. - */ - struct GameMode - { - public: - //public functions - - /*! - \brief full constructor. - - \param index index of the game mode in the combobox - \param mode spark game mode id - \param manual can it be selected by the user - \param name name string of the game mode - */ - GameMode(int index, TPlayMode mode, bool manual, QString name) - : mIndex(index), mMode(mode), mName(name), mManual(manual) {} - - TPlayMode mMode; /*!< spark game mode id */ - QString mName; /*!< name string of the game mode */ - int mIndex; /*!< index of the game mode in the combobox */ - bool mManual; /*!< can it be selected by the user */ - }; - -public: - // public functions - - /*! - \brief Constructor. - */ - SoccerControlFrame(); - /*! - \brief Destructor. - */ - ~SoccerControlFrame(); - -public: - //public virtual functions - - /*! - \brief Initialization function. - - \param parameters parameter list (not used) - */ - virtual void init(const QStringList& parameters); - - /*! - \brief Loads settings from global settings object. - */ - virtual void loadSettings(); - /*! - \brief Saves settings to global settings object. - */ - virtual void saveSettings(); - /*! - \brief Initializes settings with default values. - */ - virtual void loadDefaultSettings(); - - /*! - \brief Returns true after initialization of SimSpark simulation access. - */ - bool initialized(); - -protected: - //protected functions - - /*! - \brief Tries to initialize spark simulation access. - - Will fail if there is no Spark-Server, if the server has no SparkController, if the controller has not initialized SimSpark, or - if the Simulation doe... [truncated message content] |
From: <he...@us...> - 2013-06-12 20:48:39
|
Revision: 365 http://sourceforge.net/p/simspark/svn/365 Author: hedayat Date: 2013-06-12 20:48:36 +0000 (Wed, 12 Jun 2013) Log Message: ----------- Added Patrick changes to spark/ to ChangeLog and README files in proper format. Brought a change from trunk/ which I mistakenly removed. Modified Paths: -------------- branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp branches/gui-bullet/spark/ChangeLog branches/gui-bullet/spark/README Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-06-12 19:49:24 UTC (rev 364) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-06-12 20:48:36 UTC (rev 365) @@ -738,18 +738,11 @@ SoccerRuleAspect::UpdateBeforeKickOff() { // get game control server to check agent count - static boost::shared_ptr<GameControlServer> game_control; + boost::shared_ptr<GameControlServer> game_control; - if (game_control.get() == 0) + if (!SoccerBase::GetGameControlServer(*this, game_control)) { - game_control = shared_dynamic_cast<GameControlServer> - (GetCore()->Get("/sys/server/gamecontrol")); - - if (game_control.get() == 0) - { - GetLog()->Error() << "(SoccerRuleAspect) Error: can't get GameControlServer.\n"; - return; - } + return; } // if no players are connected, just return Modified: branches/gui-bullet/spark/ChangeLog =================================================================== --- branches/gui-bullet/spark/ChangeLog 2013-06-12 19:49:24 UTC (rev 364) +++ branches/gui-bullet/spark/ChangeLog 2013-06-12 20:48:36 UTC (rev 365) @@ -1,3 +1,9 @@ +2013-06-13 Hedayat Vatankhah <hed...@gm...> + + * README: + * ChangeLog: + - added Patrick changes and documentation about the new parts + 2013-06-12 Hedayat Vatankhah <hed...@gm...> * carbon/ @@ -18,6 +24,105 @@ * plugin/sceneeffector/sceneeffector.cpp: - added the ability to receive and apply scene parameters +2012-06-23 Patrick Geib <Pat...@on...> + + * carbon/ + - the Carbon library + + * guiplugin/ + - generic (not soccer related) plugins for the carbon gui + + * guilayout/ + - layout projects for the Gui + + * data/guisetups/ + - image resources for the carbon gui. + + * plugin/inputsysqt/ + - a new spark plugin which handles inputs to a spark simulation by + converting from qt to spark defines. + + * plugin/openglsysqt/ + - empty placeholder openglsystem to be used in simspark when an external + rendering by carbon is used. + + * spark/spark.h: + * spark/spark.cpp: + - relative path prefix can now be given in constructor as optional + parameter. Needed by carbon. + + * spark.rb: + - the spark script now contains logging functions and other functions + needed by the carbon gui + + * plugin/odeimps/odecollider.cpp: + - fixed bug where body was deleted twice + + * lib/zeitgeist/core.h: + * lib/zeitgeist/core.cpp: + - added function to reset the self pointer. Needed by carbon. + + * lib/zeitgeist/leaf_c.cpp: + - added unlinkLeaf() function to ruby interface. + + * lib/zeitgeist/logserver/logserverstreambuf.h: + * lib/zeitgeist/logserver/logserverstreambuf.cpp: + - replaced typedef TMaskStream with struct MaskStream. Now it not only + contains the integer mask and stream pointer, but also a synchronization + flag. If the flag is true, the stream will by sync()'ed every time the + input stream flushes a message. This is needed for carbons message stream + appenders, so it can receive the logservers messages immediately when the + simulation thread sends them. + + * lib/zeitgeist/logserver/logserver.h: + * lib/zeitgeist/logserver/logserver.cpp: + * lib/zeitgeist/logserver/logserver_c.cpp: + - streams can now be added with an optional synchronization flag. + - updated the script interface for AddStream too. + + * lib/zeitgeist/scriptserver/scriptserver.cpp: + - ruby error messages are now sent to ->Error() instead of ->Debug(). + + * lib/oxygen/simulationserver/simulationserver.h: + * lib/oxygen/simulationserver/simulationserver.cpp: + - the Simulation can now be paused. There is a flag in the simulation + server and a pause/unpause function. When a simulation is paused, the next + simulation cycle will not call StartCycle, SenseAgent, ActAgent and + EndCycle, but a new control event CE_WaitCycle. + When a simulation is paused, the simulation time does not advance and + agents are not notified about changed time. The wait cycle lasts as long + as a normal simulation cycle. Calling pause(false) will resume the normal + simulation cycle after the current wait cycle and agents are + notified again. + The pausing function is meant to pause and observe the state of the + simulation using the carbon library and the gui. It was tested with + several agent implementations and seemed to work perfectly. + + * lib/oxygen/simulationserver/simcontrolnode.h: + - the new control event CE_WaitCycle calls a new interface function + WaitCycle() in simcontrolnodes. This way control nodes can be notified + about running and paused simulation steps. This is used by carbon. + WaitCycle() and EndCycle() are used for SimControlNodes which act as + interface between carbon and spark. + + * lib/kerosin/inputsystem/inputsystem.h: + * lib/kerosin/inputsystem/inputsystem.cpp: + - AddInput() and GetInput() now use a boost::shared_mutex to make the + access thread safe. This is neccessary because there may be simulatneous + access from different threads in a carbon simulation. + + * lib/kerosin/renderserver/renderserver.cpp: + - added OpenGlError-code checking between rendering stages. Removed double + picking-end-bracket glPopName() which caused picking to fail. + + * lib/kerosin/renderserver/rendercontrol.cpp: + * lib/kerosin/renderserver/rendercontrol.h: + * lib/kerosin/renderserver/rendercontrol_c.cpp: + - RenderControlNodes can no be activated or deactivated. Carbon uses this + feature to deactivate them in the spark simulation if the rendering is + done in the gui thread or any other than the server thread. + - Added setActive() function to ruby interface. + 2012-05-23 Hedayat Vatankhah <hed...@gm...> * lib/kerosin/CMakeLists.txt: Modified: branches/gui-bullet/spark/README =================================================================== --- branches/gui-bullet/spark/README 2013-06-12 19:49:24 UTC (rev 364) +++ branches/gui-bullet/spark/README 2013-06-12 20:48:36 UTC (rev 365) @@ -83,7 +83,50 @@ for creating simulations using simspark ./test applications for testing different subsystems of the simulator. +./carbon The carbon library contains a gui-framework and a + simulation-framework which wraps simspark using qt. + Its main features are: + - Offering a graphical user interface which can be extended + by visual and functional plugins. The plugins can be used + to write easy-to-use interfaces to simspark simulations. + - Creating, managing and executing simspark-simulations + alongside with any additional threads and processes. + - The gui can be altered flexibly. Its main window with + "attachment points" is loaded from a shared library, and + its used plugins are loaded from shared libraries too. + Plugins with visual representation can be attached to the + Gui. +./guilayout Layout projects for the Gui. They export main windows for + the carbon gui from a shared library. You can easily and + quickly create a new layout for the gui by creating a new + layout project. A gui-layout (main window) may define + attachment points for gui-plugins. + Initial layout projects: + - guigridlayout: Contains 4 attachment points (left, center, + right, bottom) + - guisimplelayout: Contains 2 attachment points (left, right) +./guiplugin Generic (not soccer related) plugins for the carbon gui. + Plugins can be anything to extend the gui with. There are + three types: Simple Plugins (can be executed), Signal + Plugins (can communicate), and AttachableFrame Plugins (can + be embedded into the Gui). Examples which can be created + really easily and quickly, are: executable plugins running in + a new thread, function libraries, toolboxes or menu entries, + or visual plugins made for user interaction. + + Initial plugins (all of them are plugins that can be attached + to attachment points): + - logframe: logs and displays messages + - setupframe: creates simulation setups for the gui + - simulationframe: displays and controls simulation tasks and + processes in the gui + - scenegraphframe: displays and controls the whole scene graph + of a spark simulation. The user can freely change the values + of several types of nodes. + This interaction can be extended with additional plugins. + - monitorframe: renders a spark simulation + Literature: [1] Marco Kögler and Oliver Obst. Simulation League: The Next Generation. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2013-06-12 19:49:27
|
Revision: 364 http://sourceforge.net/p/simspark/svn/364 Author: hedayat Date: 2013-06-12 19:49:24 +0000 (Wed, 12 Jun 2013) Log Message: ----------- Fix bugs in goal counting and other areas when teams change sides in the second half. Disabling changing team sides by default, since it is what we currently use in competitions. Update release notes accordingly Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/NEWS trunk/rcssserver3d/RELEASE trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp trunk/rcssserver3d/rcssserver3d/naosoccersim.rb Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2013-06-12 15:07:21 UTC (rev 363) +++ trunk/rcssserver3d/ChangeLog 2013-06-12 19:49:24 UTC (rev 364) @@ -1,3 +1,14 @@ +2013-06-13 Hedayat Vatankhah <hed...@gm...> + + * NEWS: + * RELEASE: + - added a note about fixing side changing bug in 0.6.7 release + + * rcssserver3d/naosoccersim.rb: + - disabled ChangeSidesInSecondHalf by default for 0.6.7 release, since this + is what we use currently in competitions. But it should work fine if + enabled. + 2013-06-12 Hedayat Vatankhah <hed...@gm...> * NEWS: @@ -11,10 +22,18 @@ * rcssserver3d/naorobottypes.rb: * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp: - re-formatted for better readability & consistency + (SoccerRuleAspect::SwapTeamSides): + - swap gamestateaspect internal team data too (should fix bugs related to + changing team's sides in the second half) * rcssserver3d/naosoccersim.rb: - - add charging foul parameters to silent 'variable not found' errors + - added charging foul parameters to silent 'variable not found' errors + * plugin/soccer/gamestateaspect/gamestateaspect.h: + * plugin/soccer/gamestateaspect/gamestateaspect.cpp: + - added new functions to swap teams internal data structures when they + change sides + 2013-06-12 Sander van Dijk <sgv...@gm...> * plugin/soccer/soccerruleaspect/soccerruleaspect.h: Modified: trunk/rcssserver3d/NEWS =================================================================== --- trunk/rcssserver3d/NEWS 2013-06-12 15:07:21 UTC (rev 363) +++ trunk/rcssserver3d/NEWS 2013-06-12 19:49:24 UTC (rev 364) @@ -40,6 +40,9 @@ by Patrick) - A player can kick the ball in kickoff if there are only 2 players in the field to support current penalty mode. + - Fixed bugs in goal counting when changing team sides in the second half. + Now, this feature should work fine. However, it is disabled by default now + since we don't use it currently in the competitions. [0.6.6] It's time for a new release! This release comes with a number of bug fixes and Modified: trunk/rcssserver3d/RELEASE =================================================================== --- trunk/rcssserver3d/RELEASE 2013-06-12 15:07:21 UTC (rev 363) +++ trunk/rcssserver3d/RELEASE 2013-06-12 19:49:24 UTC (rev 364) @@ -41,6 +41,9 @@ by Patrick) - A player can kick the ball in kickoff if there are only 2 players in the field to support current penalty mode. + - Fixed bugs in goal counting when changing team sides in the second half. + Now, this feature should work fine. However, it is disabled by default now + since we don't use it currently in the competitions. You can get the package on the Simspark page on SourceForge at http://sourceforge.net/projects/simspark/ Modified: trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp 2013-06-12 15:07:21 UTC (rev 363) +++ trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp 2013-06-12 19:49:24 UTC (rev 364) @@ -20,6 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "gamestateaspect.h" +#include <algorithm> #include <zeitgeist/logserver/logserver.h> #include <soccerbase/soccerbase.h> #include <agentstate/agentstate.h> @@ -53,6 +54,9 @@ mGamePaused = true; mMaxHeteroTypeCount = 3; mMaxTotalHeteroCount = 9; + mInternalIndex[TI_NONE] = -1; + mInternalIndex[TI_LEFT] = 0; + mInternalIndex[TI_RIGHT] = 1; } GameStateAspect::~GameStateAspect() @@ -163,30 +167,19 @@ void GameStateAspect::SetTeamName(TTeamIndex idx, const std::string& name) { - switch (idx) - { - case TI_LEFT: - mTeamName[0] = name; - break; - case TI_RIGHT: - mTeamName[1] = name; - break; - } + int i = GetInternalIndex(idx); + if (i > -1) + mTeamName[i] = name; return; } std::string GameStateAspect::GetTeamName(TTeamIndex idx) const { - switch (idx) - { - case TI_LEFT: - return mTeamName[0]; - case TI_RIGHT: - return mTeamName[1]; - default: + int i = GetInternalIndex(idx); + if (i < 0) return ""; - } + return mTeamName[i]; } TTeamIndex @@ -197,34 +190,30 @@ if (mTeamName[i].empty()) { mTeamName[i] = teamName; - return static_cast<TTeamIndex>(i + TI_LEFT); + return GetInternalIndex(TI_LEFT) == i ? TI_LEFT : TI_RIGHT; } if (mTeamName[i] == teamName) { - return static_cast<TTeamIndex>(i + TI_LEFT); + return GetInternalIndex(TI_LEFT) == i ? TI_LEFT : TI_RIGHT; } } return TI_NONE; } +inline int +GameStateAspect::GetInternalIndex(TTeamIndex idx) const +{ + return mInternalIndex[idx]; +} + bool GameStateAspect::InsertUnum(TTeamIndex idx, int unum) { - int i; - - switch (idx) - { - case TI_LEFT: - i = 0; - break; - case TI_RIGHT: - i = 1; - break; - default: + int i = GetInternalIndex(idx); + if (i < 0) return false; - } TUnumSet& set = mUnumSet[i]; @@ -244,19 +233,9 @@ bool GameStateAspect::EraseUnum(TTeamIndex idx, int unum) { - int i; - - switch (idx) - { - case TI_LEFT: - i = 0; - break; - case TI_RIGHT: - i = 1; - break; - default: + int i = GetInternalIndex(idx); + if (i < 0) return false; - } TUnumSet& set = mUnumSet[i]; @@ -275,19 +254,9 @@ bool GameStateAspect::InsertRobotType(TTeamIndex idx, int type) { - int i; - - switch (idx) - { - case TI_LEFT: - i = 0; - break; - case TI_RIGHT: - i = 1; - break; - default: + int i = GetInternalIndex(idx); + if (i < 0) return false; - } if (type) // heterogeneous player { @@ -321,19 +290,9 @@ bool GameStateAspect::EraseRobotType(TTeamIndex idx, int type) { - int i; - - switch (idx) - { - case TI_LEFT: - i = 0; - break; - case TI_RIGHT: - i = 1; - break; - default: + int i = GetInternalIndex(idx); + if (i < 0) return false; - } if (mRobotTypeCount[i].size() <= type || !mRobotTypeCount[i][type]) { @@ -447,30 +406,21 @@ void GameStateAspect::ScoreTeam(TTeamIndex idx) { - switch (idx) - { - case TI_LEFT: - ++mScore[0]; - break; - case TI_RIGHT: - ++mScore[1]; - break; - } - return; + int i = GetInternalIndex(idx); + if (i < 0) + return; + + ++mScore[i]; } int GameStateAspect::GetScore(TTeamIndex idx) const { - switch (idx) - { - case TI_LEFT: - return mScore[0]; - case TI_RIGHT: - return mScore[1]; - default: + int i = GetInternalIndex(idx); + if (i < 0) return 0; - } + + return mScore[i]; } Vector3f @@ -553,18 +503,9 @@ int GameStateAspect::RequestUniformNumber(TTeamIndex ti) const { - int idx; - switch (ti) - { - case TI_LEFT: - idx = 0; - break; - case TI_RIGHT: - idx = 1; - break; - default: + int idx = GetInternalIndex(ti); + if (idx < 0) return 0; - } for (int i = 1; i <=11; ++i) if (mUnumSet[idx].find(i) == mUnumSet[idx].end()) @@ -593,3 +534,8 @@ { mGamePaused = paused; } + +void GameStateAspect::SwapTeamIndexes() +{ + swap(mInternalIndex[TI_LEFT], mInternalIndex[TI_RIGHT]); +} Modified: trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h 2013-06-12 15:07:21 UTC (rev 363) +++ trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h 2013-06-12 19:49:24 UTC (rev 364) @@ -119,6 +119,9 @@ /** sets the game running state (paused or not) */ void SetPaused(bool paused); + /** swaps the team index (side) of current teams */ + void SwapTeamIndexes(); + protected: /** setup the init positions for the agents */ virtual void OnLink(); @@ -152,6 +155,13 @@ */ TTeamIndex GetTeamIndex(const std::string& teamName); + /** + * @param[in] idx the team index + * @return the internal index used for indexing variables storing data + * about teams. If idx is TI_NONE, it will return -1 + */ + int GetInternalIndex(TTeamIndex idx) const; + protected: /** the current play mode */ TPlayMode mPlayMode; @@ -177,6 +187,10 @@ /** the team that has to start the next half */ TTeamIndex mNextHalfKickOff; + /** the internal index for a team, since its TTeamIndex might change in + * the second half */ + int mInternalIndex[3]; + /** 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 2013-06-12 15:07:21 UTC (rev 363) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-06-12 19:49:24 UTC (rev 364) @@ -138,8 +138,9 @@ void SoccerRuleAspect::ResetFoulCounter(TTeamIndex idx) { - for(int t=1; t<=11; t++) { - ResetFoulCounterPlayer(t,idx); + for (int t = 1; t <= 11; t++) + { + ResetFoulCounterPlayer(t, idx); } } @@ -800,11 +801,17 @@ if (! SoccerBase::GetAgentStates(*mBallState.get(), agent_states)) return; + mGameState->SwapTeamIndexes(); + SoccerBase::TAgentStateList::iterator it; for (it = agent_states.begin(); it != agent_states.end(); ++it) { (*it)->SetTeamIndex(SoccerBase::OpponentTeam((*it)->GetTeamIndex())); } + + // make sure that team names (and probably other things) are updated on + // monitors + GetActiveScene()->SetModified(true); } void Modified: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2013-06-12 15:07:21 UTC (rev 363) +++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2013-06-12 19:49:24 UTC (rev 364) @@ -56,7 +56,7 @@ addSoccerVar('CoinTossForKickOff', false) addSoccerVar('AutomaticQuit', false) -addSoccerVar('ChangeSidesInSecondHalf', true) +addSoccerVar('ChangeSidesInSecondHalf', false) # 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...> - 2013-06-12 15:07:24
|
Revision: 363 http://sourceforge.net/p/simspark/svn/363 Author: hedayat Date: 2013-06-12 15:07:21 +0000 (Wed, 12 Jun 2013) Log Message: ----------- Add Id svn keyword to all .cpp/.c/.h files Some Reformatting Adding charging foul variables to naosoccersim.rb Updating NEWS/Release/CmakeLists.txt for 0.6.7 release Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/NEWS trunk/rcssserver3d/RELEASE trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.h trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler_c.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpaction.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector_c.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.h trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor_c.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.h trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem_c.cpp trunk/rcssserver3d/rcssagent3d/naobehavior.cpp trunk/rcssserver3d/rcssserver3d/naorobottypes.rb trunk/rcssserver3d/rcssserver3d/naosoccersim.rb Property Changed: ---------------- trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.cpp trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.h trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler_c.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.c trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/compatible.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.c trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.c trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpaction.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector_c.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor_c.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpwrapper.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/naospecific.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/naospecific.h trunk/rcssserver3d/plugin/soccer/line/line.cpp trunk/rcssserver3d/plugin/soccer/line/line.h trunk/rcssserver3d/plugin/soccer/line/line_c.cpp trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor_c.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.h trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem_c.cpp Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/CMakeLists.txt 2013-06-12 15:07:21 UTC (rev 363) @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(rcssserver3d CXX C) -set(PACKAGE_VERSION "0.6.6") +set(PACKAGE_VERSION "0.6.7") ########## check for headerfiles/libraries ########## include(CheckIncludeFile) Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/ChangeLog 2013-06-12 15:07:21 UTC (rev 363) @@ -1,3 +1,20 @@ +2013-06-12 Hedayat Vatankhah <hed...@gm...> + + * NEWS: + * RELEASE: + * CMakeLists.txt: + - Updated for 0.6.7 release + + * rcssagent3d/naobehavior.cpp: + - use the new style scene command to load standard Nao + + * rcssserver3d/naorobottypes.rb: + * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp: + - re-formatted for better readability & consistency + + * rcssserver3d/naosoccersim.rb: + - add charging foul parameters to silent 'variable not found' errors + 2013-06-12 Sander van Dijk <sgv...@gm...> * plugin/soccer/soccerruleaspect/soccerruleaspect.h: @@ -6,7 +23,6 @@ - added Patrick's charging foul rules, plus soccervar parameters to enable and configure them. these fouls are not penalized, only recorded and sent to the monitor - 2013-06-09 Hedayat Vatankhah <hed...@gm...> @@ -18,7 +34,7 @@ both the total number of heterogeneous players of each team (MaxTotalHeteroCount variable in naosoccersim.rb), and the number of heterogeneous players of each type (MaxHeteroTypeCount variable) - + 2013-06-06 Hedayat Vatankhah <hed...@gm...> * plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h: Modified: trunk/rcssserver3d/NEWS =================================================================== --- trunk/rcssserver3d/NEWS 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/NEWS 2013-06-12 15:07:21 UTC (rev 363) @@ -1,3 +1,46 @@ +[0.6.7] +This is the RoboCup 2013 release. It comes with some bug fixes, and also +compatibility with latest Boost libraries. New foulds and new debugging +facility are provided. Now, fouls are sent to the monitor so that it can +provide visual feedback about them. Finally, support for heterogeneous robots +is added and two sample types are provided. + +* Heterogeneous Players: + This release supports heterogeneous players. Currently, two extra Nao robots + are provided beside the standard Nao (thanks Stefan and Klaus). + + - Usage: to use the new heterogeneous players, a new scene command should be + used. While the old style scene commands work, for using hetero players you + should send "(scene rsg/agent/nao/nao_hetero.rsg TYPE_NO)", in which TYPE_NO + is the type number of the player type. Type 0 is the standard type, and + hetero types start from 1. Therefore, to load Nao type 1 the following + command should be sent: (scene rsg/agent/nao/nao_hetero.rsg 1). Notice that + you can use the new style command for loading standard Nao, using 0 as + TYPE_NO. + + - Heterogeneous Robot Parameters: The robot parameters for different types + are defined in a new file: "naorobottypes.rb". New types can be added to the + array. But to define new parameters, corresponding .rsg files should be + modified. + + - Rules: Each team can use a limited number of hetero players. The limits + can be configured in naosoccersim.rb using "MaxTotalHeteroCount" and + "MaxHeteroTypeCount" variables. The former limits the total number of hetero + players for each team, and the latter specifies the maximum number of players + of a single hetero player type. + +* Other Features/Changes: + - Charging fouls rules are added (thanks Patrick). These fouls are not + penalized, but recorded and sent to the monitor. New rules can be configured + in naosoccersim.rb. + - Fouls are added to the monitor protocol to provide visual feedback about + them to viewers. + - For debugging purposes, sensing the orientation of the agent can be + enabled using "setSenseMyOrien" option in the .rsg file of an agent (added + by Patrick) + - A player can kick the ball in kickoff if there are only 2 players in + the field to support current penalty mode. + [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 Modified: trunk/rcssserver3d/RELEASE =================================================================== --- trunk/rcssserver3d/RELEASE 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/RELEASE 2013-06-12 15:07:21 UTC (rev 363) @@ -1,64 +1,46 @@ -RELEASE News of rcssserver3d-0.6.6 +RELEASE News of rcssserver3d-0.6.7 -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: +This is the RoboCup 2013 release. It comes with some bug fixes, and also +compatibility with latest Boost libraries. New foulds and new debugging +facility are provided. Now, fouls are sent to the monitor so that it can +provide visual feedback about them. Finally, support for heterogeneous robots +is added and two sample types are provided. -* 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. +* Heterogeneous Players: + This release supports heterogeneous players. Currently, two extra Nao robots + are provided beside the standard Nao (thanks Stefan and Klaus). + + - Usage: to use the new heterogeneous players, a new scene command should be + used. While the old style scene commands work, for using hetero players you + should send "(scene rsg/agent/nao/nao_hetero.rsg TYPE_NO)", in which TYPE_NO + is the type number of the player type. Type 0 is the standard type, and + hetero types start from 1. Therefore, to load Nao type 1 the following + command should be sent: (scene rsg/agent/nao/nao_hetero.rsg 1). Notice that + you can use the new style command for loading standard Nao, using 0 as + TYPE_NO. + + - Heterogeneous Robot Parameters: The robot parameters for different types + are defined in a new file: "naorobottypes.rb". New types can be added to the + array. But to define new parameters, corresponding .rsg files should be + modified. + + - Rules: Each team can use a limited number of hetero players. The limits + can be configured in naosoccersim.rb using "MaxTotalHeteroCount" and + "MaxHeteroTypeCount" variables. The former limits the total number of hetero + players for each team, and the latter specifies the maximum number of players + of a single hetero player type. -* 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 +* Other Features/Changes: + - Charging fouls rules are added (thanks Patrick). These fouls are not + penalized, but recorded and sent to the monitor. New rules can be configured + in naosoccersim.rb. + - Fouls are added to the monitor protocol to provide visual feedback about + them to viewers. + - For debugging purposes, sensing the orientation of the agent can be + enabled using "setSenseMyOrien" option in the .rsg file of an agent (added + by Patrick) + - A player can kick the ball in kickoff if there are only 2 players in + the field to support current penalty mode. -* 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 - You can get the package on the Simspark page on SourceForge at http://sourceforge.net/projects/simspark/ Index: trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.cpp 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.h 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.h 2013-06-12 15:07:21 UTC (rev 363) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: recorderhandler.h 176 2010-02-25 12:19:37Z a-held $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler_c.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler_c.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler_c.cpp 2013-06-12 15:07:21 UTC (rev 363) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: recorderhandler_c.cpp 176 2010-02-25 12:19:37Z a-held $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.c =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.c 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.c 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.c ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.h 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.h 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/compatible.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/compatible.h 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/compatible.h 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/compatible.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.c =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.c 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.c 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.c ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.h 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.h 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.c =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.c 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.c 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.c ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.h 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.h 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpaction.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpaction.h 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpaction.h 2013-06-12 15:07:21 UTC (rev 363) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: forceaction.h,v 1.3 2004/02/12 14:07:24 fruit Exp $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpaction.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.h 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.h 2013-06-12 15:07:21 UTC (rev 363) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: HMDPeffector.h,v 1.5 2007/06/14 17:55:18 jboedeck Exp $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector_c.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector_c.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector_c.cpp 2013-06-12 15:07:21 UTC (rev 363) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: forceeffector_c.cpp,v 1.3 2004/02/21 15:51:39 fruit Exp $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.h 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.h 2013-06-12 15:07:21 UTC (rev 363) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: gyrorateperceptor.h,v 1.2 2007/05/30 18:40:49 jboedeck Exp $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor_c.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor_c.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor_c.cpp 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpwrapper.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpwrapper.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpwrapper.cpp 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpwrapper.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/hmdp_effector/naospecific.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/naospecific.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/naospecific.cpp 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/naospecific.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/hmdp_effector/naospecific.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/naospecific.h 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/naospecific.h 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/naospecific.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/line/line.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/line/line.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/line/line.cpp 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/line/line.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/line/line.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/line/line.h 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/line/line.h 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/line/line.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/rcssserver3d/plugin/soccer/line/line_c.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/line/line_c.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/line/line_c.cpp 2013-06-12 15:07:21 UTC (rev 363) Property changes on: trunk/rcssserver3d/plugin/soccer/line/line_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp 2013-06-12 15:07:21 UTC (rev 363) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: RCS3DMonitor.cpp 246 2011-02-18 18:44:14Z sgvandijk $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h 2013-06-12 15:07:21 UTC (rev 363) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: sparkmonitor.h 3 2008-11-21 02:38:08Z hedayat $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor_c.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor_c.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor_c.cpp 2013-06-12 15:07:21 UTC (rev 363) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: sparkmonitor_c.cpp 3 2008-11-21 02:38:08Z hedayat $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-06-12 15:07:21 UTC (rev 363) @@ -290,7 +290,8 @@ { boost::shared_ptr<TouchGroup> touchGroup = (*asIt)->GetTouchGroup(); - if (touchGroup->size() != 2) { + if (touchGroup->size() != 2) + { continue; } @@ -299,7 +300,7 @@ float s[2]; //agentSpeed float d[2]; //agentDistToBall float a[2]; //agentAngleOfSpeedVectorToBall - float agentAngleOfSpeedVectorToOpponent[2]; + float agentAngleOfSpeedVectorToOpponent[2]; float m; //mutualAngleOfSpeed int agentUNum[2]; int agentTeamIndex[2]; @@ -310,7 +311,7 @@ for (TouchGroup::iterator agentIt = touchGroup->begin(); agentIt != touchGroup->end(); ++agentIt) { - + boost::shared_ptr<Transform> transform_parent; boost::shared_ptr<RigidBody> agent_body; @@ -321,105 +322,157 @@ agentPos[i] = agent_body->GetPosition(); // Compute agent distance to ball - d[i] = sqrt(pow(agentPos[i].x()-ballPos.x(),2)+pow(agentPos[i].y()-ballPos.y(),2)); - + d[i] = sqrt(pow(agentPos[i].x() - ballPos.x(), 2) + + pow(agentPos[i].y() - ballPos.y(), 2)); + // Get agent velocity agentVel[i] = agent_body->GetVelocity(); // Compute agent speed - s[i] = sqrt(pow(agentVel[i].x(),2)+pow(agentVel[i].y(),2)); + s[i] = sqrt(pow(agentVel[i].x(), 2) + pow(agentVel[i].y(), 2)); // Compute speed vector angle to ball - a[i] = abs(salt::gRadToDeg(salt::gNormalizeRad(salt::gArcTan2(agentVel[i].y(), agentVel[i].x()) - salt::gArcTan2(ballPos.y()-agentPos[i].y(), ballPos.x()-agentPos[i].x())))); + a[i] = abs(salt::gRadToDeg(salt::gNormalizeRad( + salt::gArcTan2(agentVel[i].y(), agentVel[i].x()) - + salt::gArcTan2(ballPos.y()-agentPos[i].y(), ballPos.x()-agentPos[i].x()) + ))); // Get agent uniform number and team index agentUNum[i] = (*agentIt)->GetUniformNumber(); agentTeamIndex[i] = (*agentIt)->GetTeamIndex(); - - std::cout << "Agent " << agentUNum[i] << " team " << agentTeamIndex[i] << ":\tposition = " << agentPos[i] << "\tvelocity = " << agentVel[i] << std::endl; +// GetLog()->Debug() << "Agent " << agentUNum[i] << " team " +// << agentTeamIndex[i] << ":\tposition = " << agentPos[i] +// << "\tvelocity = " << agentVel[i] << "\n"; + i++; } - + // Check if these are opponent agents meaning they have different team indexes bool haveOpponent = agentTeamIndex[0] != agentTeamIndex[1]; - if (haveOpponent) { + if (haveOpponent) + { // Compute speed vector angle to opponent - for (i = 0; i <= 1; i++) { - agentAngleOfSpeedVectorToOpponent[i] = abs(salt::gRadToDeg(salt::gNormalizeRad(salt::gArcTan2(agentVel[i].y(), agentVel[i].x()) - salt::gArcTan2(agentPos[1-i].y()-agentPos[i].y(), agentPos[1-i].x()-agentPos[i].x())))); + for (i = 0; i <= 1; i++) + { + agentAngleOfSpeedVectorToOpponent[i] = abs( + salt::gRadToDeg(salt::gNormalizeRad( + salt::gArcTan2(agentVel[i].y(), agentVel[i].x()) - + salt::gArcTan2(agentPos[1-i].y()-agentPos[i].y(), + agentPos[1-i].x()-agentPos[i].x())) + )); } // Compute mutual angle of speed - m = abs(salt::gRadToDeg(salt::gNormalizeRad(salt::gArcTan2(agentVel[0].y(), agentVel[0].x()) - salt::gArcTan2(agentVel[1].y(), agentVel[1].x())))); + m = abs(salt::gRadToDeg(salt::gNormalizeRad( + salt::gArcTan2(agentVel[0].y(), agentVel[0].x()) - + salt::gArcTan2(agentVel[1].y(), agentVel[1].x()) + ))); bool agentFoul[2]; // Boolean if an agent had committed a foul - for (int i = 0; i <= 1; i++) { + for (int i = 0; i <= 1; i++) + { // Minimum requirements for a foul - std::cout << "Agent " << agentUNum[i] << " team " << agentTeamIndex[i] << ":\tspeed = " << s[i] << "\tdist_from_ball = " << d[i] << "\tangle_speed_to_opp = " << agentAngleOfSpeedVectorToOpponent[i] << std::endl; - agentFoul[i] = s[i] >= mChargingMinSpeed && d[i] >= mChargingMinBallDist && agentAngleOfSpeedVectorToOpponent[i] < mChargingMaxOppSpeedAngle; +// GetLog()->Debug() << "Agent " << agentUNum[i] << " team " +// << agentTeamIndex[i] << ":\tspeed = " << s[i] +// << "\tdist_from_ball = " << d[i] +// << "\tangle_speed_to_opp = " +// << agentAngleOfSpeedVectorToOpponent[i] +// << "\n"; + agentFoul[i] = s[i] >= mChargingMinSpeed + && d[i] >= mChargingMinBallDist + && agentAngleOfSpeedVectorToOpponent[i] + < mChargingMaxOppSpeedAngle; } - if (d[0] < mChargingMinBallDist || d[1] < mChargingMinBallDist) { + if (d[0] < mChargingMinBallDist || d[1] < mChargingMinBallDist) + { // Don't call a foul if at least one of the agents is close to the ball continue; } - if (agentFoul[0] && agentFoul[1]) { + if (agentFoul[0] && agentFoul[1]) + { // Handle case where both agent's are thought to have committed a foul - std::cout << "m = " << m << std::endl; - if (m < mChargingIllInterceptMinMutualSpeedAngel) { +// GetLog()->Debug() << "m = " << m << "\n"; + if (m < mChargingIllInterceptMinMutualSpeedAngel) + { // Handle foul from player behind case - salt::Vector3f midpoint = ((agentPos[0]+agentVel[0])+(agentPos[1]+agentVel[1]))/2.0; + salt::Vector3f midpoint = ((agentPos[0] + agentVel[0]) + + (agentPos[1] + agentVel[1])) / 2.0; float agentDistFromMidpoint[2]; - for (int i = 0; i <= 1; i++) { - agentDistFromMidpoint[i] = sqrt(pow(agentPos[i].x()-midpoint.x(),2)+pow(agentPos[i].y()-midpoint.y(),2)); - std::cout << "Agent " << agentUNum[i] << " team " << agentTeamIndex[i] << ":\tdistance from midpoint = " << agentDistFromMidpoint[i] << std::endl; + for (int i = 0; i <= 1; i++) + { + agentDistFromMidpoint[i] = sqrt( + pow(agentPos[i].x() - midpoint.x(), 2) + + pow(agentPos[i].y() - midpoint.y(), 2)); +// GetLog()->Debug() << "Agent " << agentUNum[i] +// << " team " << agentTeamIndex[i] +// << ":\tdistance from midpoint = " +// << agentDistFromMidpoint[i] << "\n"; } - if (agentDistFromMidpoint[0] < agentDistFromMidpoint[1]) { + if (agentDistFromMidpoint[0] < agentDistFromMidpoint[1]) + { agentFoul[0] = false; - } else if (agentDistFromMidpoint[1] < agentDistFromMidpoint[0]) { + } + else if (agentDistFromMidpoint[1] < agentDistFromMidpoint[0]) + { agentFoul[1] = false; - } else { + } + else + { // Mutual foul so no call agentFoul[0] = false; agentFoul[1] = false; } - - } else { + } + else + { // Handle illegal interception case - for (int i = 0; i <= 1; i++) { - std::cout << "Agent " << agentUNum[i] << " team " << agentTeamIndex[i] << ":\tangle of speed vector to ball = " << a[i] << std::endl; +// for (int i = 0; i <= 1; i++) { +// GetLog()->Debug() << "Agent " << agentUNum[i] +// << " team " << agentTeamIndex[i] +// << ":\tangle of speed vector to ball = " +// << a[i] << "\n"; +// } + + if (a[0] < a[1]) + { + agentFoul[0] = false; } - - if (a[0] < a[1]) { - agentFoul[0] = false; - } else if (a[1] < a[0]) { + else if (a[1] < a[0]) + { agentFoul[1] = false; - } else { + } + else + { // Mutual foul so no call agentFoul[0] = false; agentFoul[1] = false; } } } - - for (int i = 0; i <= 1; i++) { - if (agentFoul[i]) { + + for (int i = 0; i <= 1; i++) + { + if (agentFoul[i]) + { playerFoulTime[agentUNum[i]][agentTeamIndex[i]]++; playerLastFoul[agentUNum[i]][agentTeamIndex[i]] = FT_Charging; - std::cout << "FOUL on agent " << agentUNum[i] << " team " << agentTeamIndex[i] << std::endl; + GetLog()->Debug() << "FOUL on agent " << agentUNum[i] + << " team " << agentTeamIndex[i] << "\n"; // Should we remove fouling player from touch group? - + } } - + } } // END FOUL DETECTION @@ -1671,7 +1724,6 @@ SoccerBase::GetSoccerVar(*this,"ChargingMinSpeed",mChargingMinSpeed); SoccerBase::GetSoccerVar(*this,"ChargingMinBallDist",mChargingMinBallDist); SoccerBase::GetSoccerVar(*this,"IllegalInterceptMinAngle",mChargingIllInterceptMinMutualSpeedAngel); - SoccerBase::GetSoccerVar(*this,"UseCharging",mUseCharging); // cout << "MaxInside " << mMaxPlayersInsideOwnArea << endl << endl; Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.cpp 2013-06-12 15:07:21 UTC (rev 363) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: gamestateitem.cpp 259 2011-03-24 20:25:24Z hedayat $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.h 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.h 2013-06-12 15:07:21 UTC (rev 363) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: gamestateitem.h 21 2009-01-14 14:38:57Z yxu $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem_c.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem_c.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem_c.cpp 2013-06-12 15:07:21 UTC (rev 363) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: gamestateitem_c.cpp 9 2008-11-24 02:39:02Z hedayat $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/rcssserver3d/rcssagent3d/naobehavior.cpp =================================================================== --- trunk/rcssserver3d/rcssagent3d/naobehavior.cpp 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/rcssagent3d/naobehavior.cpp 2013-06-12 15:07:21 UTC (rev 363) @@ -64,7 +64,7 @@ mJointIDMap["raj4"] = JID_RARM_4; } -std::string gJointEff_2_Str[] = +std::string gJointEff_2_Str[] = { "he1", "he2", @@ -106,7 +106,7 @@ // use the scene effector to build the agent and beam to a // position near the center of the playing field return - "(scene rsg/agent/nao/nao.rsg)"; + "(scene rsg/agent/nao/nao_hetero.rsg 0)"; } void NaoBehavior::ParseHingeJointInfo(const oxygen::Predicate& predicate) @@ -178,7 +178,7 @@ { cerr << "(NaoBehavior) could not parse universal joint angle2!" << endl; return; - } + } // try to read axis2 rate // update the map @@ -193,7 +193,7 @@ double heartime; string sender; string message; - + Predicate::Iterator iter(predicate); if (! predicate.AdvanceValue(iter, heartime)) @@ -202,7 +202,7 @@ return; } - + if (! predicate.AdvanceValue(iter, sender)) { cerr << "could not get sender \n"; @@ -226,7 +226,7 @@ << " me said " << message << " at " << heartime << endl; } return; - + } @@ -264,7 +264,7 @@ const Predicate& predicate = (*iter); switch(predicate.name[0]) - { + { case 'H': // hinge joint (HJ) ParseHingeJointInfo(predicate); break; @@ -292,10 +292,10 @@ break; case S_Sit: - if (mCounter > 40) - { - mCounter = 0; - mState = S_SwingLeft; + if (mCounter > 40) + { + mCounter = 0; + mState = S_SwingLeft; ss << "(lae1 0)" << "(rae1 0)" << "(lae2 0)" @@ -326,8 +326,8 @@ << "(rae3 0)" << "(lae4 -0.8)" << "(rae4 0.8)" - << "(lle3 1)" - << "(rle3 1)" + << "(lle3 1)" + << "(rle3 1)" << "(lle4 -2)" << "(rle4 -2)" << "(lle5 1)" @@ -350,7 +350,7 @@ mCounter++; if (mCounter % 10 == 0) ss << "(say ComeOn!)"; - + //std::cout << "Sent: " << ss.str() << "\n"; return ss.str(); } Modified: trunk/rcssserver3d/rcssserver3d/naorobottypes.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naorobottypes.rb 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/rcssserver3d/naorobottypes.rb 2013-06-12 15:07:21 UTC (rev 363) @@ -1,8 +1,27 @@ NaoType = [ # Type 0 (Standard Nao) -{'ThighRelHip2_Z' => -0.04, 'AnkleRelShank_Z' => -0.055, 'lj5_max_abs_speed' => 6.1395, 'lj6_max_abs_speed' => 6.1395, 'ElbowRelUpperArm_Y' => 0.07}, +{ + 'ThighRelHip2_Z' => -0.04, + 'AnkleRelShank_Z' => -0.055, + 'lj5_max_abs_speed' => 6.1395, + 'lj6_max_abs_speed' => 6.1395, + 'ElbowRelUpperArm_Y' => 0.07 +}, # Type 1 -{'ThighRelHip2_Z' => -0.06, 'AnkleRelShank_Z' => -0.075, 'lj5_max_abs_speed' => 6.1395, 'lj6_max_abs_speed' => 6.1395, 'ElbowRelUpperArm_Y' => 0.11}, +{ + 'ThighRelHip2_Z' => -0.06, + 'AnkleRelShank_Z' => -0.075, + 'lj5_max_abs_speed' => 6.1395, + 'lj6_max_abs_speed' => 6.1395, + 'ElbowRelUpperArm_Y' => 0.11 +}, # Type 2 -{'ThighRelHip2_Z' => -0.04, 'AnkleRelShank_Z' => -0.055, 'lj5_max_abs_speed' => 9.21, 'lj6_max_abs_speed' => 4.605, 'ElbowRelUpperArm_Y' => 0.07} +{ + 'ThighRelHip2_Z' => -0.04, + 'AnkleRelShank_Z' => -0.055, + 'lj5_max_abs_speed' => 9.21, + 'lj6_max_abs_speed' => 4.605, + 'ElbowRelUpperArm_Y' => 0.07 +} + ] Modified: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2013-06-12 14:58:36 UTC (rev 362) +++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2013-06-12 15:07:21 UTC (rev 363) @@ -76,7 +76,11 @@ addSoccerVar('UseOffside', false) addSoccerVar('MaxTouchGroupSize', 2) +# charging foul parameters addSoccerVar('UseCharging', true) +addSoccerVar('ChargingMinSpeed', 0.2) +addSoccerVar('ChargingMinBallDist', 0.2) +addSoccerVar('IllegalInterceptMinAngle', 70) # auto ref parameters FCP 2010 addSoccerVar('NotStandingMaxTime',30) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2013-06-12 14:58:41
|
Revision: 362 http://sourceforge.net/p/simspark/svn/362 Author: hedayat Date: 2013-06-12 14:58:36 +0000 (Wed, 12 Jun 2013) Log Message: ----------- Add Id svn keyword to all .cpp/.c/.h files Modified Paths: -------------- trunk/spark/lib/kerosin/sceneserver/capsule.cpp trunk/spark/lib/kerosin/sceneserver/capsule.h trunk/spark/lib/kerosin/sceneserver/capsule_c.cpp trunk/spark/lib/oxygen/physicsserver/capsulecollider.cpp trunk/spark/lib/oxygen/physicsserver/capsulecollider.h trunk/spark/lib/oxygen/physicsserver/capsulecollider_c.cpp trunk/spark/lib/oxygen/physicsserver/conecollider.cpp trunk/spark/lib/oxygen/physicsserver/physicsobject.cpp trunk/spark/lib/oxygen/physicsserver/physicsobject.h trunk/spark/lib/oxygen/physicsserver/physicsobject_c.cpp trunk/spark/utility/libobj/_vsnprintf.c trunk/spark/utility/libobj/libobj.c Property Changed: ---------------- trunk/spark/lib/kerosin/sceneserver/capsule.cpp trunk/spark/lib/kerosin/sceneserver/capsule.h trunk/spark/lib/kerosin/sceneserver/capsule_c.cpp trunk/spark/lib/oxygen/physicsserver/capsulecollider.cpp trunk/spark/lib/oxygen/physicsserver/capsulecollider.h trunk/spark/lib/oxygen/physicsserver/capsulecollider_c.cpp trunk/spark/lib/oxygen/physicsserver/compoundcollider.cpp trunk/spark/lib/oxygen/physicsserver/compoundcollider.h trunk/spark/lib/oxygen/physicsserver/compoundcollider_c.cpp trunk/spark/lib/oxygen/physicsserver/concavecollider.cpp trunk/spark/lib/oxygen/physicsserver/concavecollider.h trunk/spark/lib/oxygen/physicsserver/concavecollider_c.cpp trunk/spark/lib/oxygen/physicsserver/conecollider.cpp trunk/spark/lib/oxygen/physicsserver/conecollider.h trunk/spark/lib/oxygen/physicsserver/conecollider_c.cpp trunk/spark/lib/oxygen/physicsserver/conetwistjoint.cpp trunk/spark/lib/oxygen/physicsserver/conetwistjoint.h trunk/spark/lib/oxygen/physicsserver/conetwistjoint_c.cpp trunk/spark/lib/oxygen/physicsserver/convexcollider.cpp trunk/spark/lib/oxygen/physicsserver/convexcollider.h trunk/spark/lib/oxygen/physicsserver/convexcollider_c.cpp trunk/spark/lib/oxygen/physicsserver/cylindercollider.cpp trunk/spark/lib/oxygen/physicsserver/cylindercollider.h trunk/spark/lib/oxygen/physicsserver/cylindercollider_c.cpp trunk/spark/lib/oxygen/physicsserver/dynamicbody.cpp trunk/spark/lib/oxygen/physicsserver/dynamicbody.h trunk/spark/lib/oxygen/physicsserver/dynamicbody_c.cpp trunk/spark/lib/oxygen/physicsserver/emptycollider.cpp trunk/spark/lib/oxygen/physicsserver/emptycollider.h trunk/spark/lib/oxygen/physicsserver/emptycollider_c.cpp trunk/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp trunk/spark/lib/oxygen/physicsserver/generic6dofjoint.h trunk/spark/lib/oxygen/physicsserver/generic6dofjoint_c.cpp trunk/spark/lib/oxygen/physicsserver/genericphysicsobjects.h trunk/spark/lib/oxygen/physicsserver/int/angularmotorint.h trunk/spark/lib/oxygen/physicsserver/int/balljointint.h trunk/spark/lib/oxygen/physicsserver/int/bodyint.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/compoundcolliderint.h trunk/spark/lib/oxygen/physicsserver/int/concavecolliderint.h trunk/spark/lib/oxygen/physicsserver/int/conecolliderint.h trunk/spark/lib/oxygen/physicsserver/int/conetwistjointint.h trunk/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h trunk/spark/lib/oxygen/physicsserver/int/convexcolliderint.h trunk/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h trunk/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h trunk/spark/lib/oxygen/physicsserver/int/emptycolliderint.h trunk/spark/lib/oxygen/physicsserver/int/fixedjointint.h trunk/spark/lib/oxygen/physicsserver/int/generic6dofjointint.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/softbodyint.h trunk/spark/lib/oxygen/physicsserver/int/spaceint.h trunk/spark/lib/oxygen/physicsserver/int/spherecolliderint.h trunk/spark/lib/oxygen/physicsserver/int/staticbodyint.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 trunk/spark/lib/oxygen/physicsserver/physicsobject.cpp trunk/spark/lib/oxygen/physicsserver/physicsobject.h trunk/spark/lib/oxygen/physicsserver/physicsobject_c.cpp trunk/spark/lib/oxygen/physicsserver/rigidbody.cpp trunk/spark/lib/oxygen/physicsserver/rigidbody.h trunk/spark/lib/oxygen/physicsserver/rigidbody_c.cpp trunk/spark/lib/oxygen/physicsserver/softbody.cpp trunk/spark/lib/oxygen/physicsserver/softbody.h trunk/spark/lib/oxygen/physicsserver/softbody_c.cpp trunk/spark/lib/oxygen/physicsserver/staticbody.cpp trunk/spark/lib/oxygen/physicsserver/staticbody.h trunk/spark/lib/oxygen/physicsserver/staticbody_c.cpp trunk/spark/lib/salt/line2.h trunk/spark/lib/salt/linesegment2.h trunk/spark/plugin/imageperceptor/imagerender.h trunk/spark/plugin/odeimps/export.cpp trunk/spark/plugin/odeimps/odeangularmotor.cpp trunk/spark/plugin/odeimps/odeangularmotor.h trunk/spark/plugin/odeimps/odeangularmotor_c.cpp trunk/spark/plugin/odeimps/odeballjoint.cpp trunk/spark/plugin/odeimps/odeballjoint.h trunk/spark/plugin/odeimps/odeballjoint_c.cpp trunk/spark/plugin/odeimps/odebody.cpp trunk/spark/plugin/odeimps/odebody.h trunk/spark/plugin/odeimps/odebody_c.cpp trunk/spark/plugin/odeimps/odeboxcollider.cpp trunk/spark/plugin/odeimps/odeboxcollider.h trunk/spark/plugin/odeimps/odeboxcollider_c.cpp trunk/spark/plugin/odeimps/odecapsulecollider.cpp trunk/spark/plugin/odeimps/odecapsulecollider.h trunk/spark/plugin/odeimps/odecapsulecollider_c.cpp trunk/spark/plugin/odeimps/odecollider.cpp trunk/spark/plugin/odeimps/odecollider.h trunk/spark/plugin/odeimps/odecollider_c.cpp trunk/spark/plugin/odeimps/odecompoundcollider.cpp trunk/spark/plugin/odeimps/odecompoundcollider.h trunk/spark/plugin/odeimps/odecompoundcollider_c.cpp trunk/spark/plugin/odeimps/odeconcavecollider.cpp trunk/spark/plugin/odeimps/odeconcavecollider.h trunk/spark/plugin/odeimps/odeconcavecollider_c.cpp trunk/spark/plugin/odeimps/odeconecollider.cpp trunk/spark/plugin/odeimps/odeconecollider.h trunk/spark/plugin/odeimps/odeconecollider_c.cpp trunk/spark/plugin/odeimps/odeconetwistjoint.cpp trunk/spark/plugin/odeimps/odeconetwistjoint.h trunk/spark/plugin/odeimps/odeconetwistjoint_c.cpp trunk/spark/plugin/odeimps/odecontactjointhandler.cpp trunk/spark/plugin/odeimps/odecontactjointhandler.h trunk/spark/plugin/odeimps/odecontactjointhandler_c.cpp trunk/spark/plugin/odeimps/odeconvexcollider.cpp trunk/spark/plugin/odeimps/odeconvexcollider.h trunk/spark/plugin/odeimps/odeconvexcollider_c.cpp trunk/spark/plugin/odeimps/odecylindercollider.cpp trunk/spark/plugin/odeimps/odecylindercollider.h trunk/spark/plugin/odeimps/odecylindercollider_c.cpp trunk/spark/plugin/odeimps/odedynamicbody.cpp trunk/spark/plugin/odeimps/odedynamicbody.h trunk/spark/plugin/odeimps/odedynamicbody_c.cpp trunk/spark/plugin/odeimps/odeemptycollider.cpp trunk/spark/plugin/odeimps/odeemptycollider.h trunk/spark/plugin/odeimps/odeemptycollider_c.cpp trunk/spark/plugin/odeimps/odefixedjoint.cpp trunk/spark/plugin/odeimps/odefixedjoint.h trunk/spark/plugin/odeimps/odefixedjoint_c.cpp trunk/spark/plugin/odeimps/odegeneric6dofjoint.cpp trunk/spark/plugin/odeimps/odegeneric6dofjoint.h trunk/spark/plugin/odeimps/odegeneric6dofjoint_c.cpp trunk/spark/plugin/odeimps/odehinge2joint.cpp trunk/spark/plugin/odeimps/odehinge2joint.h trunk/spark/plugin/odeimps/odehinge2joint_c.cpp trunk/spark/plugin/odeimps/odehingejoint.cpp trunk/spark/plugin/odeimps/odehingejoint.h trunk/spark/plugin/odeimps/odehingejoint_c.cpp trunk/spark/plugin/odeimps/odejoint.cpp trunk/spark/plugin/odeimps/odejoint.h trunk/spark/plugin/odeimps/odejoint_c.cpp trunk/spark/plugin/odeimps/odephysicsobject.cpp trunk/spark/plugin/odeimps/odephysicsobject.h trunk/spark/plugin/odeimps/odephysicsobject_c.cpp trunk/spark/plugin/odeimps/odephysicsserver.cpp trunk/spark/plugin/odeimps/odephysicsserver.h trunk/spark/plugin/odeimps/odephysicsserver_c.cpp trunk/spark/plugin/odeimps/odeplanecollider.cpp trunk/spark/plugin/odeimps/odeplanecollider.h trunk/spark/plugin/odeimps/odeplanecollider_c.cpp trunk/spark/plugin/odeimps/oderaycollider.cpp trunk/spark/plugin/odeimps/oderaycollider.h trunk/spark/plugin/odeimps/oderaycollider_c.cpp trunk/spark/plugin/odeimps/oderigidbody.cpp trunk/spark/plugin/odeimps/oderigidbody.h trunk/spark/plugin/odeimps/oderigidbody_c.cpp trunk/spark/plugin/odeimps/odesliderjoint.cpp trunk/spark/plugin/odeimps/odesliderjoint.h trunk/spark/plugin/odeimps/odesliderjoint_c.cpp trunk/spark/plugin/odeimps/odesoftbody.cpp trunk/spark/plugin/odeimps/odesoftbody.h trunk/spark/plugin/odeimps/odesoftbody_c.cpp trunk/spark/plugin/odeimps/odespace.cpp trunk/spark/plugin/odeimps/odespace.h trunk/spark/plugin/odeimps/odespace_c.cpp trunk/spark/plugin/odeimps/odespherecollider.cpp trunk/spark/plugin/odeimps/odespherecollider.h trunk/spark/plugin/odeimps/odespherecollider_c.cpp trunk/spark/plugin/odeimps/odestaticbody.cpp trunk/spark/plugin/odeimps/odestaticbody.h trunk/spark/plugin/odeimps/odestaticbody_c.cpp trunk/spark/plugin/odeimps/odetransformcollider.cpp trunk/spark/plugin/odeimps/odetransformcollider.h trunk/spark/plugin/odeimps/odetransformcollider_c.cpp trunk/spark/plugin/odeimps/odeuniversaljoint.cpp trunk/spark/plugin/odeimps/odeuniversaljoint.h trunk/spark/plugin/odeimps/odeuniversaljoint_c.cpp trunk/spark/plugin/odeimps/odeworld.cpp trunk/spark/plugin/odeimps/odeworld.h trunk/spark/plugin/odeimps/odeworld_c.cpp trunk/spark/plugin/odeimps/odewrapper.h trunk/spark/utility/libb64/cdecode.c trunk/spark/utility/libb64/cdecode.h trunk/spark/utility/libb64/cencode.c trunk/spark/utility/libb64/cencode.h trunk/spark/utility/libb64/decode.h trunk/spark/utility/libb64/encode.h trunk/spark/utility/libobj/_vsnprintf.c trunk/spark/utility/libobj/libobj.c trunk/spark/utility/libobj/memcmp.c trunk/spark/utility/sfsexp/cstring.c trunk/spark/utility/sfsexp/faststack.c trunk/spark/utility/sfsexp/io.c trunk/spark/utility/sfsexp/malloc_util.c trunk/spark/utility/sfsexp/parser.c trunk/spark/utility/sfsexp/sexp.c trunk/spark/utility/sfsexp/sexp_ops.c trunk/spark/windows/include/GL/glext.h trunk/spark/windows/include/GL/glxext.h trunk/spark/windows/include/GL/wglext.h Modified: trunk/spark/lib/kerosin/sceneserver/capsule.cpp =================================================================== --- trunk/spark/lib/kerosin/sceneserver/capsule.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/kerosin/sceneserver/capsule.cpp 2013-06-12 14:58:36 UTC (rev 362) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: capsule.cpp 3 2008-11-21 02:38:08Z hedayat $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/spark/lib/kerosin/sceneserver/capsule.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/spark/lib/kerosin/sceneserver/capsule.h =================================================================== --- trunk/spark/lib/kerosin/sceneserver/capsule.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/kerosin/sceneserver/capsule.h 2013-06-12 14:58:36 UTC (rev 362) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: capsule.h 57 2009-03-18 07:26:56Z hedayat $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/spark/lib/kerosin/sceneserver/capsule.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/spark/lib/kerosin/sceneserver/capsule_c.cpp =================================================================== --- trunk/spark/lib/kerosin/sceneserver/capsule_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/kerosin/sceneserver/capsule_c.cpp 2013-06-12 14:58:36 UTC (rev 362) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: capsule_c.cpp 3 2008-11-21 02:38:08Z hedayat $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/spark/lib/kerosin/sceneserver/capsule_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/spark/lib/oxygen/physicsserver/capsulecollider.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2013-06-12 14:58:36 UTC (rev 362) @@ -3,7 +3,7 @@ this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2003 Koblenz University - $Id: capsulecollider.cpp 108 2009-11-25 10:20:10Z a-held $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/spark/lib/oxygen/physicsserver/capsulecollider.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/spark/lib/oxygen/physicsserver/capsulecollider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/capsulecollider.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/capsulecollider.h 2013-06-12 14:58:36 UTC (rev 362) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: capsulecollider.h 108 2009-11-25 10:20:10Z a-held $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/spark/lib/oxygen/physicsserver/capsulecollider.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/spark/lib/oxygen/physicsserver/capsulecollider_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/capsulecollider_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/capsulecollider_c.cpp 2013-06-12 14:58:36 UTC (rev 362) @@ -3,7 +3,7 @@ this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2003 Koblenz University - $Id: capsulecollider_c.cpp 108 2009-11-25 10:20:10Z a-held $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/spark/lib/oxygen/physicsserver/capsulecollider_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/compoundcollider.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/compoundcollider.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/compoundcollider.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/compoundcollider.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/compoundcollider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/compoundcollider.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/compoundcollider.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/compoundcollider.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/compoundcollider_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/compoundcollider_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/compoundcollider_c.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/compoundcollider_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/concavecollider.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/concavecollider.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/concavecollider.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/concavecollider.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/concavecollider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/concavecollider.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/concavecollider.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/concavecollider.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/concavecollider_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/concavecollider_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/concavecollider_c.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/concavecollider_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/spark/lib/oxygen/physicsserver/conecollider.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/conecollider.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/conecollider.cpp 2013-06-12 14:58:36 UTC (rev 362) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: conecollider.cpp + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -43,18 +43,18 @@ if (mConeColliderImp.get() == 0) mConeColliderImp = dynamic_pointer_cast<ConeColliderInt> (GetCore()->New("ConeColliderImp")); - + if (mConeColliderImp.get() == 0) { //we can't use the logserver here std::cerr << "(ConeCollider) ERROR: No implementation found at '/classes/ConeColliderImp'"; return false; } - + if (!Collider::ConstructInternal()) return false; - + //we can't use the logserver here std::cerr << "(ConeCollider) ERROR: ConeCollider is not implemented yet. Did nothing"; - + return true; } Property changes on: trunk/spark/lib/oxygen/physicsserver/conecollider.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/conecollider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/conecollider.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/conecollider.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/conecollider.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/conecollider_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/conecollider_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/conecollider_c.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/conecollider_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/conetwistjoint.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/conetwistjoint.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/conetwistjoint.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/conetwistjoint.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/conetwistjoint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/conetwistjoint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/conetwistjoint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/conetwistjoint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/conetwistjoint_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/conetwistjoint_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/conetwistjoint_c.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/conetwistjoint_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/convexcollider.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/convexcollider.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/convexcollider.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/convexcollider.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/convexcollider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/convexcollider.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/convexcollider.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/convexcollider.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/convexcollider_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/convexcollider_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/convexcollider_c.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/convexcollider_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/cylindercollider.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/cylindercollider.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/cylindercollider.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/cylindercollider.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/cylindercollider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/cylindercollider.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/cylindercollider.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/cylindercollider.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/cylindercollider_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/cylindercollider_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/cylindercollider_c.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/cylindercollider_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/dynamicbody.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/dynamicbody.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/dynamicbody.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/dynamicbody.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/dynamicbody.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/dynamicbody.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/dynamicbody.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/dynamicbody.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/dynamicbody_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/dynamicbody_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/dynamicbody_c.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/dynamicbody_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/emptycollider.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/emptycollider.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/emptycollider.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/emptycollider.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/emptycollider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/emptycollider.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/emptycollider.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/emptycollider.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/emptycollider_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/emptycollider_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/emptycollider_c.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/emptycollider_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/generic6dofjoint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/generic6dofjoint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/generic6dofjoint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/generic6dofjoint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/generic6dofjoint_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/generic6dofjoint_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/generic6dofjoint_c.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/generic6dofjoint_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/genericphysicsobjects.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/genericphysicsobjects.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/genericphysicsobjects.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/genericphysicsobjects.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/angularmotorint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/angularmotorint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/angularmotorint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/angularmotorint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/balljointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/balljointint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/balljointint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/balljointint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/bodyint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/bodyint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/bodyint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/bodyint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/boxcolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/boxcolliderint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/colliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/colliderint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/colliderint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/colliderint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/concavecolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/concavecolliderint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/concavecolliderint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/concavecolliderint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/conecolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/conecolliderint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/conecolliderint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/conecolliderint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/conetwistjointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/conetwistjointint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/conetwistjointint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/conetwistjointint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/convexcolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/convexcolliderint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/convexcolliderint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/convexcolliderint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/emptycolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/emptycolliderint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/emptycolliderint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/emptycolliderint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/fixedjointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/fixedjointint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/hinge2jointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/hinge2jointint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/hingejointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/hingejointint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/hingejointint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/hingejointint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/jointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/jointint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/jointint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/jointint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/physicsobjectint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/physicsobjectint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/physicsserverint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/physicsserverint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/physicsserverint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/physicsserverint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/planecolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/planecolliderint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/planecolliderint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/planecolliderint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/raycolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/raycolliderint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/raycolliderint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/raycolliderint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/rigidbodyint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/rigidbodyint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/sliderjointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/sliderjointint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/softbodyint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/softbodyint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/softbodyint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/softbodyint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/spaceint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/spaceint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/spaceint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/spaceint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/spherecolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/spherecolliderint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/spherecolliderint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/spherecolliderint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/staticbodyint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/staticbodyint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/staticbodyint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/staticbodyint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/transformcolliderint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/transformcolliderint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/transformcolliderint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/transformcolliderint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/universaljointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/universaljointint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/universaljointint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/universaljointint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/int/worldint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/worldint.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/int/worldint.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/int/worldint.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/spark/lib/oxygen/physicsserver/physicsobject.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/physicsobject.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/physicsobject.cpp 2013-06-12 14:58:36 UTC (rev 362) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: odeobject.cpp 3 2008-11-21 02:38:08Z hedayat $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/spark/lib/oxygen/physicsserver/physicsobject.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/spark/lib/oxygen/physicsserver/physicsobject.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/physicsobject.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/physicsobject.h 2013-06-12 14:58:36 UTC (rev 362) @@ -4,8 +4,8 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: odeobject.h 56 2009-03-17 18:03:47Z hedayat $ - $Id: odeobject.h 56 2009-03-17 18:03:47Z hedayat $ + $Id$ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/spark/lib/oxygen/physicsserver/physicsobject.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: trunk/spark/lib/oxygen/physicsserver/physicsobject_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/physicsobject_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/physicsobject_c.cpp 2013-06-12 14:58:36 UTC (rev 362) @@ -3,7 +3,7 @@ this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2003 Koblenz University - $Id: odeobject_c.cpp 3 2008-11-21 02:38:08Z hedayat $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/spark/lib/oxygen/physicsserver/physicsobject_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/rigidbody.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/rigidbody.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/rigidbody.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/rigidbody.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/rigidbody.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/rigidbody.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/rigidbody.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/rigidbody.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/rigidbody_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/rigidbody_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/rigidbody_c.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/rigidbody_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/softbody.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/softbody.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/softbody.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/softbody.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/softbody.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/softbody.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/softbody.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/softbody.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/softbody_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/softbody_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/softbody_c.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/softbody_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/staticbody.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/staticbody.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/staticbody.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/staticbody.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/staticbody.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/staticbody.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/staticbody.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/staticbody.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/oxygen/physicsserver/staticbody_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/staticbody_c.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/oxygen/physicsserver/staticbody_c.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/oxygen/physicsserver/staticbody_c.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/salt/line2.h =================================================================== --- trunk/spark/lib/salt/line2.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/salt/line2.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/salt/line2.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/lib/salt/linesegment2.h =================================================================== --- trunk/spark/lib/salt/linesegment2.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/lib/salt/linesegment2.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/lib/salt/linesegment2.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/plugin/imageperceptor/imagerender.h =================================================================== --- trunk/spark/plugin/imageperceptor/imagerender.h 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/plugin/imageperceptor/imagerender.h 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/plugin/imageperceptor/imagerender.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/plugin/odeimps/export.cpp =================================================================== --- trunk/spark/plugin/odeimps/export.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/plugin/odeimps/export.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/plugin/odeimps/export.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/plugin/odeimps/odeangularmotor.cpp =================================================================== --- trunk/spark/plugin/odeimps/odeangularmotor.cpp 2013-06-12 11:44:17 UTC (rev 361) +++ trunk/spark/plugin/odeimps/odeangularmotor.cpp 2013-06-12 14:58:36 UTC (rev 362) Property changes on: trunk/spark/plugin/odeimps/odeangularmotor.cpp ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/spark/plugin/odeimps/... [truncated message content] |
From: <he...@us...> - 2013-06-12 11:44:21
|
Revision: 361 http://sourceforge.net/p/simspark/svn/361 Author: hedayat Date: 2013-06-12 11:44:17 +0000 (Wed, 12 Jun 2013) Log Message: ----------- Fix compilation errors for rcssserver3d under GNU/Linux+GCC for the new GUI project Modified Paths: -------------- branches/gui-bullet/rcssserver3d/CMakeLists.txt branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.cpp branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.h branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp branches/gui-bullet/rcssserver3d/sparkgui/CMakeLists.txt branches/gui-bullet/rcssserver3d/sparkgui/main.cpp branches/gui-bullet/spark/ChangeLog branches/gui-bullet/spark/carbon/CMakeLists.txt branches/gui-bullet/spark/carbon/signalplugin.cpp branches/gui-bullet/spark/lib/salt/gmath.h Modified: branches/gui-bullet/rcssserver3d/CMakeLists.txt =================================================================== --- branches/gui-bullet/rcssserver3d/CMakeLists.txt 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/CMakeLists.txt 2013-06-12 11:44:17 UTC (rev 361) @@ -46,7 +46,7 @@ link_directories(${Boost_LIBRARY_DIRS}) if (UNIX) - set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE + set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS} "--std=gnu++11" CACHE STRING "Common C++ compiler flags" FORCE) set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -W -Wall -Woverloaded-virtual" CACHE STRING "C++ compiler flags for Debug builds" FORCE) Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp 2013-06-12 11:44:17 UTC (rev 361) @@ -36,17 +36,17 @@ #include <settings.h> //SimSpark -#include <oxygen\gamecontrolserver\gamecontrolserver.h> -#include <zeitgeist\leaf.h> +#include <oxygen/gamecontrolserver/gamecontrolserver.h> +#include <zeitgeist/leaf.h> //Soccer -#include "soccer\gamestateaspect\gamestateaspect.h" -#include "soccer\soccerruleaspect\soccerruleaspect.h" -#include "soccer\ballstateaspect\ballstateaspect.h" -//#include <agentstate\agentstate.h> +#include "soccer/gamestateaspect/gamestateaspect.h" +#include "soccer/soccerruleaspect/soccerruleaspect.h" +#include "soccer/ballstateaspect/ballstateaspect.h" +//#include <agentstate/agentstate.h> //Boost -#include <boost\make_shared.hpp> +#include <boost/make_shared.hpp> //Qt #include <QValidator> Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.h 2013-06-12 11:44:17 UTC (rev 361) @@ -31,11 +31,11 @@ #include "isimcontrol.h" #include "sparkcommandqueue.h" -#include <boost\shared_ptr.hpp> +#include <boost/shared_ptr.hpp> #include <QObject> #include <QTimer> -#include <soccer\soccertypes.h> +#include <soccer/soccertypes.h> class ServerThread; class SimSpark; Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.cpp 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.cpp 2013-06-12 11:44:17 UTC (rev 361) @@ -23,11 +23,11 @@ #include <sparkcommandqueue.h> #include <simspark.h> -#include <cutelogger\logger.h> +#include <cutelogger/logger.h> -#include <gamestateaspect\gamestateaspect.h> -#include <ballstateaspect\ballstateaspect.h> -#include <soccerruleaspect\soccerruleaspect.h> +#include <gamestateaspect/gamestateaspect.h> +#include <ballstateaspect/ballstateaspect.h> +#include <soccerruleaspect/soccerruleaspect.h> using namespace boost; using namespace zeitgeist; Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.h =================================================================== --- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.h 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe_soccercommands.h 2013-06-12 11:44:17 UTC (rev 361) @@ -26,13 +26,13 @@ * \brief Contains SoccerControlFrameUtil::SoccerCommand and derived command classes. */ -#include <boost\shared_ptr.hpp> +#include <boost/shared_ptr.hpp> #include <isimcontrol.h> -#include <cutelogger\logger.h> +#include <cutelogger/logger.h> #include <sparkcommands.h> -#include <soccer\soccertypes.h> +#include <soccer/soccertypes.h> class SparkController; class GameStateAspect; Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-06-12 11:44:17 UTC (rev 361) @@ -812,7 +812,7 @@ if (time > mGameState->GetLastModeChange()) { mLastKickOffKickTime = time; - mCheckKickOffKickerFault = true; + mCheckKickOffKickerFoul = true; mLastKickOffTaker = agent; mGameState->SetPlayMode(PM_PlayOn); } Modified: branches/gui-bullet/rcssserver3d/sparkgui/CMakeLists.txt =================================================================== --- branches/gui-bullet/rcssserver3d/sparkgui/CMakeLists.txt 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/sparkgui/CMakeLists.txt 2013-06-12 11:44:17 UTC (rev 361) @@ -52,7 +52,7 @@ target_link_libraries(sparkgui optimized ${LIB}) ENDFOREACH(LIB) -target_link_libraries(sparkgui ) +target_link_libraries(sparkgui ${Boost_LIBRARIES}) set_target_properties(sparkgui PROPERTIES INSTALL_RPATH "${RPATH_DIRECTORIES}") install(TARGETS sparkgui DESTINATION ${BINDIR}) Modified: branches/gui-bullet/rcssserver3d/sparkgui/main.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/sparkgui/main.cpp 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/rcssserver3d/sparkgui/main.cpp 2013-06-12 11:44:17 UTC (rev 361) @@ -31,7 +31,7 @@ #include <QLibrary> #include <QMainWindow> -#include "sparkgui\sparkgui_config.h" +#include "sparkgui/sparkgui_config.h" void PrintGreeting() { Modified: branches/gui-bullet/spark/ChangeLog =================================================================== --- branches/gui-bullet/spark/ChangeLog 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/spark/ChangeLog 2013-06-12 11:44:17 UTC (rev 361) @@ -1,3 +1,17 @@ +2013-06-12 Hedayat Vatankhah <hed...@gm...> + + * carbon/ + * guiplugin/ + * guilayout/ + * data/guisetups/ + * plugin/inputsysqt/ + * plugin/openglsysqt/ + - fixed compilation issues under GNU/Linux+GCC. + + * lib/salt/gmath.h: + - removed type specifier for std::isnan, since not all overloads are + templates + 2012-11-24 Hedayat Vatankhah <hed...@gm...> * plugin/sceneeffector/sceneaction.h: Modified: branches/gui-bullet/spark/carbon/CMakeLists.txt =================================================================== --- branches/gui-bullet/spark/carbon/CMakeLists.txt 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/spark/carbon/CMakeLists.txt 2013-06-12 11:44:17 UTC (rev 361) @@ -6,6 +6,7 @@ simulationprocess.h simulationmanager.h serverthread.h + signalplugin.h simulationsetup.h simulation.h simulationthread.h @@ -281,7 +282,7 @@ ${OPENGL_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) #intermediate directory -add_library(carbon STATIC +add_library(carbon ${carbon_SOURCES} ${carbon_QOBJECT_HEADERS_MOC} ${carbon_HEADERS} @@ -289,7 +290,7 @@ ${carbon_RESOURCES_RCC} ) -target_link_libraries(carbon +target_link_libraries(carbon ${FREETYPE_LIBRARIES} ${IL_LIBRARIES} ${OPENGL_LIBRARIES} Modified: branches/gui-bullet/spark/carbon/signalplugin.cpp =================================================================== --- branches/gui-bullet/spark/carbon/signalplugin.cpp 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/spark/carbon/signalplugin.cpp 2013-06-12 11:44:17 UTC (rev 361) @@ -63,7 +63,7 @@ // Public //-------------------------------------------------------------- -SignalPluginInstantiator::SignalPluginInstantiator(int id, const QString& name, const QString& caption, SignalPlugin* (*instantiateFunc)(void), +SignalPluginInstantiator::SignalPluginInstantiator(int id, const QString& name, const QString& caption, SignalPlugin* (*instantiateFunc)(void), int maxInstanceCount, const char* library) : AbstractPluginInstantiator(id, name, caption, PT_SIGNAL, maxInstanceCount, library), mInstantiateFunc(instantiateFunc) Modified: branches/gui-bullet/spark/lib/salt/gmath.h =================================================================== --- branches/gui-bullet/spark/lib/salt/gmath.h 2013-06-12 10:28:06 UTC (rev 360) +++ branches/gui-bullet/spark/lib/salt/gmath.h 2013-06-12 11:44:17 UTC (rev 361) @@ -214,7 +214,7 @@ #ifdef WIN32 return _isnan(static_cast<double>(f)) != 0; #else - return std::isnan<TYPE>(f); + return std::isnan(f); #endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sgv...@us...> - 2013-06-12 10:28:10
|
Revision: 360 http://sourceforge.net/p/simspark/svn/360 Author: sgvandijk Date: 2013-06-12 10:28:06 +0000 (Wed, 12 Jun 2013) Log Message: ----------- Added Patrick's charging foul rules, plus soccervar parameters to enable and configure them. these fouls are not penalized, only recorded and sent to the monitor 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 2013-06-12 09:17:07 UTC (rev 359) +++ trunk/rcssserver3d/ChangeLog 2013-06-12 10:28:06 UTC (rev 360) @@ -1,3 +1,13 @@ +2013-06-12 Sander van Dijk <sgv...@gm...> + + * plugin/soccer/soccerruleaspect/soccerruleaspect.h: + * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp: + * rcssserver3d/naosoccersim.rb: + - added Patrick's charging foul rules, plus soccervar parameters + to enable and configure them. these fouls are not penalized, only + recorded and sent to the monitor + + 2013-06-09 Hedayat Vatankhah <hed...@gm...> * plugin/soccer/gamestateaspect/gamestateaspect.h: Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-06-12 09:17:07 UTC (rev 359) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-06-12 10:28:06 UTC (rev 360) @@ -58,6 +58,11 @@ mNotOffside(false), mLastModeWasPlayOn(false), mUseOffside(true), + mUseCharging(true), + mChargingMinSpeed(0.2), + mChargingMinBallDist(0.2), + mChargingMaxOppSpeedAngle(90), + mChargingIllInterceptMinMutualSpeedAngel(70), mDropBallTime(15), mNotStandingMaxTime(1000), // max time player may be sitted or laying down before being repositioned mGoalieNotStandingMaxTime(1000), // max time goalie may be sitted or laying down before being repositioned @@ -275,6 +280,151 @@ return; random_shuffle(agent_states.begin(), agent_states.end()); + + // BEGIN FOUL DETECTION + if (mUseCharging) + { + + SoccerBase::TAgentStateList::iterator asIt = agent_states.begin(); + for (; asIt != agent_states.end(); ++asIt) + { + boost::shared_ptr<TouchGroup> touchGroup = (*asIt)->GetTouchGroup(); + + if (touchGroup->size() != 2) { + continue; + } + + salt::Vector3f agentVel[2]; + salt::Vector3f agentPos[2]; + float s[2]; //agentSpeed + float d[2]; //agentDistToBall + float a[2]; //agentAngleOfSpeedVectorToBall + float agentAngleOfSpeedVectorToOpponent[2]; + float m; //mutualAngleOfSpeed + int agentUNum[2]; + int agentTeamIndex[2]; + + salt::Vector3f ballPos = mBallBody->GetPosition(); + + int i = 0; + for (TouchGroup::iterator agentIt = touchGroup->begin(); + agentIt != touchGroup->end(); ++agentIt) + { + + boost::shared_ptr<Transform> transform_parent; + boost::shared_ptr<RigidBody> agent_body; + + SoccerBase::GetTransformParent(*(*agentIt), transform_parent); + SoccerBase::GetAgentBody(transform_parent, agent_body); + + // Get agent position + agentPos[i] = agent_body->GetPosition(); + + // Compute agent distance to ball + d[i] = sqrt(pow(agentPos[i].x()-ballPos.x(),2)+pow(agentPos[i].y()-ballPos.y(),2)); + + // Get agent velocity + agentVel[i] = agent_body->GetVelocity(); + + // Compute agent speed + s[i] = sqrt(pow(agentVel[i].x(),2)+pow(agentVel[i].y(),2)); + + // Compute speed vector angle to ball + a[i] = abs(salt::gRadToDeg(salt::gNormalizeRad(salt::gArcTan2(agentVel[i].y(), agentVel[i].x()) - salt::gArcTan2(ballPos.y()-agentPos[i].y(), ballPos.x()-agentPos[i].x())))); + + // Get agent uniform number and team index + agentUNum[i] = (*agentIt)->GetUniformNumber(); + agentTeamIndex[i] = (*agentIt)->GetTeamIndex(); + + std::cout << "Agent " << agentUNum[i] << " team " << agentTeamIndex[i] << ":\tposition = " << agentPos[i] << "\tvelocity = " << agentVel[i] << std::endl; + + i++; + } + + + // Check if these are opponent agents meaning they have different team indexes + bool haveOpponent = agentTeamIndex[0] != agentTeamIndex[1]; + + if (haveOpponent) { + // Compute speed vector angle to opponent + for (i = 0; i <= 1; i++) { + agentAngleOfSpeedVectorToOpponent[i] = abs(salt::gRadToDeg(salt::gNormalizeRad(salt::gArcTan2(agentVel[i].y(), agentVel[i].x()) - salt::gArcTan2(agentPos[1-i].y()-agentPos[i].y(), agentPos[1-i].x()-agentPos[i].x())))); + } + + // Compute mutual angle of speed + m = abs(salt::gRadToDeg(salt::gNormalizeRad(salt::gArcTan2(agentVel[0].y(), agentVel[0].x()) - salt::gArcTan2(agentVel[1].y(), agentVel[1].x())))); + + bool agentFoul[2]; // Boolean if an agent had committed a foul + + for (int i = 0; i <= 1; i++) { + // Minimum requirements for a foul + std::cout << "Agent " << agentUNum[i] << " team " << agentTeamIndex[i] << ":\tspeed = " << s[i] << "\tdist_from_ball = " << d[i] << "\tangle_speed_to_opp = " << agentAngleOfSpeedVectorToOpponent[i] << std::endl; + agentFoul[i] = s[i] >= mChargingMinSpeed && d[i] >= mChargingMinBallDist && agentAngleOfSpeedVectorToOpponent[i] < mChargingMaxOppSpeedAngle; + } + + if (d[0] < mChargingMinBallDist || d[1] < mChargingMinBallDist) { + // Don't call a foul if at least one of the agents is close to the ball + continue; + } + + if (agentFoul[0] && agentFoul[1]) { + // Handle case where both agent's are thought to have committed a foul + std::cout << "m = " << m << std::endl; + if (m < mChargingIllInterceptMinMutualSpeedAngel) { + // Handle foul from player behind case + salt::Vector3f midpoint = ((agentPos[0]+agentVel[0])+(agentPos[1]+agentVel[1]))/2.0; + + float agentDistFromMidpoint[2]; + for (int i = 0; i <= 1; i++) { + agentDistFromMidpoint[i] = sqrt(pow(agentPos[i].x()-midpoint.x(),2)+pow(agentPos[i].y()-midpoint.y(),2)); + std::cout << "Agent " << agentUNum[i] << " team " << agentTeamIndex[i] << ":\tdistance from midpoint = " << agentDistFromMidpoint[i] << std::endl; + } + + + if (agentDistFromMidpoint[0] < agentDistFromMidpoint[1]) { + agentFoul[0] = false; + } else if (agentDistFromMidpoint[1] < agentDistFromMidpoint[0]) { + agentFoul[1] = false; + } else { + // Mutual foul so no call + agentFoul[0] = false; + agentFoul[1] = false; + } + + + } else { + // Handle illegal interception case + for (int i = 0; i <= 1; i++) { + std::cout << "Agent " << agentUNum[i] << " team " << agentTeamIndex[i] << ":\tangle of speed vector to ball = " << a[i] << std::endl; + } + + if (a[0] < a[1]) { + agentFoul[0] = false; + } else if (a[1] < a[0]) { + agentFoul[1] = false; + } else { + // Mutual foul so no call + agentFoul[0] = false; + agentFoul[1] = false; + } + } + } + + for (int i = 0; i <= 1; i++) { + if (agentFoul[i]) { + playerFoulTime[agentUNum[i]][agentTeamIndex[i]]++; + playerLastFoul[agentUNum[i]][agentTeamIndex[i]] = FT_Charging; + std::cout << "FOUL on agent " << agentUNum[i] << " team " << agentTeamIndex[i] << std::endl; + // Should we remove fouling player from touch group? + + } + } + + } + } + // END FOUL DETECTION + } + SoccerBase::TAgentStateList::iterator i = agent_states.begin(); for (; i != agent_states.end(); ++i) { @@ -435,11 +585,14 @@ int unum = (*i)->GetUniformNumber(); if (playerFoulTime[unum][idx] > mMaxFoulTime / 0.02) { - // I am not a very good soccer player... I am violating the rules... - salt::Vector3f new_pos = RepositionOutsidePos(ballPos, unum, idx); - //Calculate my Reposition pos outside of the field - SoccerBase::MoveAgent(agent_aspect, new_pos); - //Oh my God!! I am flying!! I am going outside of the field + if (playerLastFoul[unum][idx] != FT_Charging) + { + // I am not a very good soccer player... I am violating the rules... + salt::Vector3f new_pos = RepositionOutsidePos(ballPos, unum, idx); + //Calculate my Reposition pos outside of the field + SoccerBase::MoveAgent(agent_aspect, new_pos); + //Oh my God!! I am flying!! I am going outside of the field + } ResetFoulCounterPlayer(unum, idx); // Record faul mFouls.push_back(Foul(mFouls.size() + 1, playerLastFoul[unum][idx], *i)); @@ -1514,6 +1667,11 @@ SoccerBase::GetSoccerVar(*this,"Min3PlDistance",mMin3PlDistance); SoccerBase::GetSoccerVar(*this,"MaxTouchGroupSize",mMaxTouchGroupSize); //SoccerBase::GetSoccerVar(*this,"MaxFoulTime",mMaxFoulTime); + SoccerBase::GetSoccerVar(*this,"UseCharging",mUseCharging); + SoccerBase::GetSoccerVar(*this,"ChargingMinSpeed",mChargingMinSpeed); + SoccerBase::GetSoccerVar(*this,"ChargingMinBallDist",mChargingMinBallDist); + SoccerBase::GetSoccerVar(*this,"IllegalInterceptMinAngle",mChargingIllInterceptMinMutualSpeedAngel); + SoccerBase::GetSoccerVar(*this,"UseCharging",mUseCharging); // cout << "MaxInside " << mMaxPlayersInsideOwnArea << endl << endl; Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2013-06-12 09:17:07 UTC (rev 359) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2013-06-12 10:28:06 UTC (rev 360) @@ -53,7 +53,8 @@ FT_IllegalDefence, FT_IllegalAttack, FT_Incapable, - FT_KickOff + FT_KickOff, + FT_Charging }; struct Foul @@ -67,6 +68,8 @@ EFoulType type; boost::shared_ptr<AgentState> agent; bool operator<(Foul const& other) const { return index < other.index; } + + int time; }; public: @@ -425,6 +428,20 @@ /** use offside law */ bool mUseOffside; + /** use charging law */ + bool mUseCharging; + + /** minimum player speed to apply charging rules */ + float mChargingMinSpeed; + /** minimum player distance to ball to apply charging rules */ + float mChargingMinBallDist; + /** maximum angle between move direction and opponent to apply + * charging rules */ + float mChargingMaxOppSpeedAngle; + /** minimum angle between move directions to apply illegal + * intercept part of charging rules */ + float mChargingIllInterceptMinMutualSpeedAngel; + /** the time of the kick in the last kick off mode */ TTime mLastKickOffKickTime; /** the player which kicked in the last kick off mode */ Modified: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2013-06-12 09:17:07 UTC (rev 359) +++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2013-06-12 10:28:06 UTC (rev 360) @@ -76,6 +76,8 @@ addSoccerVar('UseOffside', false) addSoccerVar('MaxTouchGroupSize', 2) +addSoccerVar('UseCharging', true) + # auto ref parameters FCP 2010 addSoccerVar('NotStandingMaxTime',30) addSoccerVar('GoalieNotStandingMaxTime',60) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2013-06-12 09:17:12
|
Revision: 359 http://sourceforge.net/p/simspark/svn/359 Author: hedayat Date: 2013-06-12 09:17:07 +0000 (Wed, 12 Jun 2013) Log Message: ----------- Fix compilation error under GNU/Linux+GCC Modified Paths: -------------- branches/gui-bullet/spark/CMakeLists.txt branches/gui-bullet/spark/carbon/CMakeLists.txt branches/gui-bullet/spark/carbon/abstractcommand.cpp branches/gui-bullet/spark/carbon/abstractcommand.h branches/gui-bullet/spark/carbon/abstractcommandqueue.cpp branches/gui-bullet/spark/carbon/abstractcommandqueue.h branches/gui-bullet/spark/carbon/abstractplugin.h branches/gui-bullet/spark/carbon/carbon.cpp branches/gui-bullet/spark/carbon/carbon.h branches/gui-bullet/spark/carbon/communicationmanager.cpp branches/gui-bullet/spark/carbon/communicationmanager.h branches/gui-bullet/spark/carbon/cutelogger/imessagereceiver.cpp branches/gui-bullet/spark/carbon/cutelogger/imessagereceiver.h branches/gui-bullet/spark/carbon/cutelogger/logstreambuffer.h branches/gui-bullet/spark/carbon/guisimcontrol.cpp branches/gui-bullet/spark/carbon/guisimcontrol.h branches/gui-bullet/spark/carbon/libraryloader.cpp branches/gui-bullet/spark/carbon/libraryloader.h branches/gui-bullet/spark/carbon/menumanager.cpp branches/gui-bullet/spark/carbon/menumanager.h branches/gui-bullet/spark/carbon/menuobjectfile.cpp branches/gui-bullet/spark/carbon/openglmanager.cpp branches/gui-bullet/spark/carbon/plugininstantiatormodel.h branches/gui-bullet/spark/carbon/pluginmanager.cpp branches/gui-bullet/spark/carbon/pluginmanager.h branches/gui-bullet/spark/carbon/pluginthread.cpp branches/gui-bullet/spark/carbon/settings.cpp branches/gui-bullet/spark/carbon/settingsdialog.cpp branches/gui-bullet/spark/carbon/settingsdialog.h branches/gui-bullet/spark/carbon/simspark.cpp branches/gui-bullet/spark/carbon/simspark.h branches/gui-bullet/spark/carbon/simulation.h branches/gui-bullet/spark/carbon/simulationmanager.cpp branches/gui-bullet/spark/carbon/simulationmanager.h branches/gui-bullet/spark/carbon/simulationprocess.cpp branches/gui-bullet/spark/carbon/simulationsetup.cpp branches/gui-bullet/spark/carbon/simulationsetup.h branches/gui-bullet/spark/carbon/simulationtask.h branches/gui-bullet/spark/carbon/sparkcommandqueue.cpp branches/gui-bullet/spark/carbon/sparkcommandqueue.h branches/gui-bullet/spark/carbon/sparkcommands.cpp branches/gui-bullet/spark/carbon/sparkcommands.h branches/gui-bullet/spark/carbon/sparkcontext.cpp branches/gui-bullet/spark/carbon/sparkcontroller.h branches/gui-bullet/spark/carbon/sparkproperty.cpp branches/gui-bullet/spark/carbon/sparkproperty.h branches/gui-bullet/spark/carbon/sparkpropertycontrolbasic.cpp branches/gui-bullet/spark/carbon/sparkpropertycontrolbasic.h branches/gui-bullet/spark/carbon/sparkpropertydata.cpp branches/gui-bullet/spark/carbon/sparkpropertyexecuter.cpp branches/gui-bullet/spark/carbon/sparkpropertyexecuter.h branches/gui-bullet/spark/carbon/sparkpropertylist.h branches/gui-bullet/spark/carbon/sparkpropertymanager.h branches/gui-bullet/spark/carbon/sparktreemodel.cpp branches/gui-bullet/spark/carbon/topic.cpp branches/gui-bullet/spark/carbon/topicregistration.cpp branches/gui-bullet/spark/carbon/windowmanager.h branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe.cpp branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglrender.cpp branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglwidget.cpp branches/gui-bullet/spark/guiplugin/scenegraphframe/CMakeLists.txt branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_propertyframe.cpp branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_propertyframe.h branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_scenegraphwidget.cpp branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_scenegraphwidget.h branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe.h branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe_taskwidget.h branches/gui-bullet/spark/lib/kerosin/inputserver/inputsystem.cpp branches/gui-bullet/spark/lib/kerosin/inputserver/inputsystem.h branches/gui-bullet/spark/lib/salt/matrix.h branches/gui-bullet/spark/test/scenetest/main.cpp branches/gui-bullet/spark/test/scenetest/md5mesh.cpp Modified: branches/gui-bullet/spark/CMakeLists.txt =================================================================== --- branches/gui-bullet/spark/CMakeLists.txt 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/CMakeLists.txt 2013-06-12 09:17:07 UTC (rev 359) @@ -112,7 +112,7 @@ link_directories(${Boost_LIBRARY_DIRS}) if (UNIX) - set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE + set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS} "--std=gnu++11" CACHE STRING "Common C++ compiler flags" FORCE) set(CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "Common C compiler flags" FORCE) Modified: branches/gui-bullet/spark/carbon/CMakeLists.txt =================================================================== --- branches/gui-bullet/spark/carbon/CMakeLists.txt 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/CMakeLists.txt 2013-06-12 09:17:07 UTC (rev 359) @@ -275,6 +275,7 @@ ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility + ${CMAKE_CURRENT_SOURCE_DIR} ${FREETYPE_INCLUDE_DIRS} ${IL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} Modified: branches/gui-bullet/spark/carbon/abstractcommand.cpp =================================================================== --- branches/gui-bullet/spark/carbon/abstractcommand.cpp 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/abstractcommand.cpp 2013-06-12 09:17:07 UTC (rev 359) @@ -20,7 +20,7 @@ #include "abstractcommand.h" #include "abstractcommandqueue.h" -#include "cutelogger\logger.h" +#include "cutelogger/logger.h" using namespace boost; Modified: branches/gui-bullet/spark/carbon/abstractcommand.h =================================================================== --- branches/gui-bullet/spark/carbon/abstractcommand.h 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/abstractcommand.h 2013-06-12 09:17:07 UTC (rev 359) @@ -26,9 +26,9 @@ */ #include <QObject> -#include <boost\shared_ptr.hpp> +#include <boost/shared_ptr.hpp> -#include "cutelogger\logger.h" +#include "cutelogger/logger.h" class AbstractCommandQueue; Modified: branches/gui-bullet/spark/carbon/abstractcommandqueue.cpp =================================================================== --- branches/gui-bullet/spark/carbon/abstractcommandqueue.cpp 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/abstractcommandqueue.cpp 2013-06-12 09:17:07 UTC (rev 359) @@ -20,7 +20,7 @@ #include "abstractcommandqueue.h" #include "abstractcommand.h" -#include "cutelogger\logger.h" +#include "cutelogger/logger.h" //-------------------------------------------------------------- // Constructor Modified: branches/gui-bullet/spark/carbon/abstractcommandqueue.h =================================================================== --- branches/gui-bullet/spark/carbon/abstractcommandqueue.h 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/abstractcommandqueue.h 2013-06-12 09:17:07 UTC (rev 359) @@ -27,7 +27,7 @@ #include <QString> #include <QSemaphore> -#include <boost\shared_ptr.hpp> +#include <boost/shared_ptr.hpp> #include <list> class AbstractCommand; Modified: branches/gui-bullet/spark/carbon/abstractplugin.h =================================================================== --- branches/gui-bullet/spark/carbon/abstractplugin.h 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/abstractplugin.h 2013-06-12 09:17:07 UTC (rev 359) @@ -30,9 +30,9 @@ */ #include "plugintype.h" -#include "cutelogger\logger.h" +#include "cutelogger/logger.h" -#include <boost\shared_ptr.hpp> +#include <boost/shared_ptr.hpp> #include <vector> #include <QString> @@ -55,7 +55,7 @@ <b>Usage:</b>\n Define one or more plugin classes derived from Plugin, SignalPlugin or AttachableFrame. - Register the plugins in the plugin factory as plugins ready to be exported using REGISTER_EXPORT_PLUGIN, REGISTER_EXPORT_SIGNALPLUGIN, or + Register the plugins in the plugin factory as plugins ready to be exported using REGISTER_EXPORT_PLUGIN, REGISTER_EXPORT_SIGNALPLUGIN, or REGISTER_EXPORT_FRAME. In a separate export header file, use PLUGINS_EXPORT_BEGIN and PLUGINS_EXPORT_END to export the plugins with PLUGIN_EXPORT. Using the export macros in a file with a Qt derived file (a file that will be parsed by the qt meta object compiler) won't work. @@ -81,7 +81,7 @@ <b>Usage:</b>\n Define one or more plugin classes derived from Plugin, SignalPlugin or AttachableFrame. - Register the plugins in the plugin factory as plugins ready to be exported using REGISTER_EXPORT_PLUGIN, REGISTER_EXPORT_SIGNALPLUGIN, or + Register the plugins in the plugin factory as plugins ready to be exported using REGISTER_EXPORT_PLUGIN, REGISTER_EXPORT_SIGNALPLUGIN, or REGISTER_EXPORT_FRAME. In a separate export header file, use PLUGINS_EXPORT_BEGIN and PLUGINS_EXPORT_END to export the plugins with PLUGIN_EXPORT. Using the export macros in a file with a Qt derived file (a file that will be parsed by the qt meta object compiler) won't work. @@ -102,13 +102,13 @@ <b>Usage:</b>\n Define one or more plugin classes derived from Plugin, SignalPlugin or AttachableFrame. - Register the plugins in the plugin factory as plugins ready to be exported using REGISTER_EXPORT_PLUGIN, REGISTER_EXPORT_SIGNALPLUGIN, or + Register the plugins in the plugin factory as plugins ready to be exported using REGISTER_EXPORT_PLUGIN, REGISTER_EXPORT_SIGNALPLUGIN, or REGISTER_EXPORT_FRAME. In a separate export header file, use PLUGINS_EXPORT_BEGIN and PLUGINS_EXPORT_END to export the plugins with PLUGIN_EXPORT. Using the export macros in a file with a Qt derived file (a file that will be parsed by the qt meta object compiler) won't work. The main application will call the export function defined by the plugins GUI_PLUGIN, GUI_SIGNALPLUGIN or GUI_FRAME macro. - This will export the plugin to the main applications plugin factory with the library name and (incremented) class id given by the + This will export the plugin to the main applications plugin factory with the library name and (incremented) class id given by the main application. */ #define PLUGIN_EXPORT(CLASS)\ @@ -163,7 +163,7 @@ Plugins that are called by other plugins are called immediately in the callers thread. Plugins that run indefinitely will cause the calling thread to freeze. Plugins and SignalPlugins can be started in PluginThreads of a Simulation. An endless loop in a plugin started in another thread naturally wont freeze the other threads. - + If your derived plugin is not meant to be called by the main thread or other plugins directly, set the execution type with setExecutionType(ET_LOOP). If your derived plugin is only meant to be called by the main thread or other plugins directly, set the execution type with setExecutionType(ET_ONCE). Otherwise the PluginManager will allow any execution of the Plugin (ET_ANY). @@ -201,7 +201,7 @@ \brief Plugin class information fields. Can be set by any plugin instance to specify class properties. - Every plugin info id is converted to a unique string when loading or saving class data. + Every plugin info id is converted to a unique string when loading or saving class data. This string is used as a string to save the class info with in the global settings object. */ enum EPluginInfo @@ -374,8 +374,8 @@ */ virtual bool run() = 0; /*! - \brief Stop function to stop a plugin executed in another thread. - + \brief Stop function to stop a plugin executed in another thread. + The function is called when the plugin is executed in another thread and is requested to stop its execution as soon as possible. The Thread will notice that the plugin is stopped when it returns from its run() function. @@ -386,8 +386,8 @@ virtual bool stop() = 0; /*! \brief Pause function to pause a plugin executed in another thread. - - The function is called when the plugin is executed in another thread and is requested to pause or unpause its execution until the next time pause(), + + The function is called when the plugin is executed in another thread and is requested to pause or unpause its execution until the next time pause(), stop() or run() is call. Plugins executed in the main thread are expected to only take fractions of a second of time so pause() is not needed and wont be called. The EExecutionType of the plugin specifies if it can be executed from the main thread and plugins, from another thread or not at all. @@ -397,9 +397,9 @@ virtual bool pause(bool state) = 0; /*! \brief Restart function to stop and start a plugin executed in another thread. - + The function is called when the plugin is executed in another thread and is requested to stop and restart its execution. - Plugins executed in the main thread are expected to only take fractions of a second of time so restart() is not needed and wont be called. Instead reoccurring calls + Plugins executed in the main thread are expected to only take fractions of a second of time so restart() is not needed and wont be called. Instead reoccurring calls all use run(). The EExecutionType of the plugin specifies if it can be executed from the main thread and plugins, from another thread or not at all. @@ -454,7 +454,7 @@ /*! \brief Returns the Carbon registered to the plugin class. - When plugins are exported from shared libraries the Carbon of the application is registered to the plugin so access to the static Carbon + When plugins are exported from shared libraries the Carbon of the application is registered to the plugin so access to the static Carbon instance can be done in the plugin class. */ Carbon* getCarbon(); @@ -522,7 +522,7 @@ /*! \brief Specifies if the plugin is an extension. - + Is called and should only be called by the PluginManager! */ void setIsExtension(bool extension); @@ -573,7 +573,7 @@ \param maxInstanceCount maximum amount of instances of this plugin allowed at a time \param library name of the library the plugin class was loaded from (empty for built-in plugins) */ - AbstractPluginInstantiator(int classId, const QString& name, const QString& caption, EPluginType type, + AbstractPluginInstantiator(int classId, const QString& name, const QString& caption, EPluginType type, int maxInstanceCount, const char* library); /*! \brief Basic destructor. Modified: branches/gui-bullet/spark/carbon/carbon.cpp =================================================================== --- branches/gui-bullet/spark/carbon/carbon.cpp 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/carbon.cpp 2013-06-12 09:17:07 UTC (rev 359) @@ -28,7 +28,7 @@ #include "attachableframe.h" #include "settingsdialog.h" #include "settings.h" -#include "cutelogger\logmessage.h" +#include "cutelogger/logmessage.h" #include "simulationtask.h" #include "sparkproperty.h" #include "topic.h" Modified: branches/gui-bullet/spark/carbon/carbon.h =================================================================== --- branches/gui-bullet/spark/carbon/carbon.h 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/carbon.h 2013-06-12 09:17:07 UTC (rev 359) @@ -29,11 +29,11 @@ #include <QObject> #include <QStringList> -#include "cutelogger/Logger.h" -#include "cutelogger/ConsoleAppender.h" -#include "cutelogger/FileAppender.h" -#include "cutelogger/DebugAppender.h" -#include "cutelogger/FunctionAppender.h" +#include "cutelogger/logger.h" +#include "cutelogger/consoleappender.h" +#include "cutelogger/fileappender.h" +#include "cutelogger/debugappender.h" +#include "cutelogger/functionappender.h" #include <map> #include <boost/shared_ptr.hpp> @@ -49,6 +49,7 @@ #define LIB_IMPORT #endif +class QApplication; class QMainWindow; class MenuManager; class WindowManager; @@ -65,7 +66,7 @@ /*! \brief Main controller class of the Carbon library. - Controls Initialization of the Logging System, and the manager elements. + Controls Initialization of the Logging System, and the manager elements. Only one carbon instance may be initialized at a time. After initialization the controller is globally accesible with Carbon::get(). \sa MenuManager @@ -194,7 +195,7 @@ \brief Initialized with commandline options. Called once. - + \param argc commandline parameter count \param argv commandline argument list */ @@ -236,7 +237,7 @@ /brief Notification from the logger that a new log source was added. Emits logSourceAdded. - + \param id id of the log source */ void updateLogSourceAdded(int id); @@ -309,7 +310,7 @@ */ static void registerStaticCarbonPointer(Carbon* carbon); -private: +private: // private functions /*! @@ -331,7 +332,7 @@ */ bool initSettingsWidgets(); /*! - \brief Returns the log appender collection for the static carbon instance, or the static log control object if no cotnroller was found. + \brief Returns the log appender collection for the static carbon instance, or the static log control object if no cotnroller was found. */ static boost::shared_ptr<CarbonLogControl> getLogControl(); Modified: branches/gui-bullet/spark/carbon/communicationmanager.cpp =================================================================== --- branches/gui-bullet/spark/carbon/communicationmanager.cpp 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/communicationmanager.cpp 2013-06-12 09:17:07 UTC (rev 359) @@ -23,7 +23,7 @@ #include "abstractplugin.h" #include "topic.h" -#include <boost\make_shared.hpp> +#include <boost/make_shared.hpp> using namespace boost; Modified: branches/gui-bullet/spark/carbon/communicationmanager.h =================================================================== --- branches/gui-bullet/spark/carbon/communicationmanager.h 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/communicationmanager.h 2013-06-12 09:17:07 UTC (rev 359) @@ -28,7 +28,7 @@ #include <QObject> #include <QStringList> #include <QList> -#include <boost\shared_ptr.hpp> +#include <boost/shared_ptr.hpp> class Topic; class AbstractPlugin; Modified: branches/gui-bullet/spark/carbon/cutelogger/imessagereceiver.cpp =================================================================== --- branches/gui-bullet/spark/carbon/cutelogger/imessagereceiver.cpp 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/cutelogger/imessagereceiver.cpp 2013-06-12 09:17:07 UTC (rev 359) @@ -46,7 +46,7 @@ emit queuedMessage(message, level); } -void ThreadMessageQueue::queueMessageObject(boost::shared_ptr<LogMessage>& object) +void ThreadMessageQueue::queueMessageObject(const boost::shared_ptr<LogMessage>& object) { emit queuedMessageObject(object); } @@ -109,7 +109,7 @@ mThreadMessageQueue->queueMessage(message, level); } -void IMessageReceiver::receiveMessageObjectQueued(boost::shared_ptr<LogMessage>& object) +void IMessageReceiver::receiveMessageObjectQueued(const boost::shared_ptr<LogMessage>& object) { if (!mQueueInterThreadMessages) receiveMessageObject(object); @@ -141,7 +141,7 @@ QString IMessageReceiver::getMessageFormat() { - return mMessageReceiverAppender.format(); + return mMessageReceiverAppender.format(); } QString IMessageReceiver::getMessageObjectFormat() Modified: branches/gui-bullet/spark/carbon/cutelogger/imessagereceiver.h =================================================================== --- branches/gui-bullet/spark/carbon/cutelogger/imessagereceiver.h 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/cutelogger/imessagereceiver.h 2013-06-12 09:17:07 UTC (rev 359) @@ -67,7 +67,7 @@ \param object message to queue */ - void queueMessageObject(boost::shared_ptr<LogMessage>& object); + void queueMessageObject(const boost::shared_ptr<LogMessage>& object); private: signals: /*! @@ -83,7 +83,7 @@ \param object message to emit */ void queuedMessageObject(boost::shared_ptr<LogMessage> object); - + private slots: /*! \brief Receives an emitted queued message in the main thread and sends it to the receive target. @@ -140,7 +140,7 @@ a ThreadMessageQueue and the qt-connect-queue. For the queue to work the IMessageReceivers thread needs to be in an event loop (QThread::exec()). \warning Especially when interacting with QtGui-elements like QTextEdit, QWidget etc., the IMessageReceiver HAS to be used in queued mode, since only the owning thread - may change Gui parameters. Otherwise the application might crash in release mode. + may change Gui parameters. Otherwise the application might crash in release mode. If you dont want the messages to be queued you can set the constructors queue flag to false. In this case the thread that sent the log message will call receiveMessage() and receiveMessageObject() directly. @@ -172,7 +172,7 @@ /*! \brief Receive function called by MessageReceiverAppender when a new message arrives. - Calls the virtual receive function directly if mQueueInterThreadMessages is false. + Calls the virtual receive function directly if mQueueInterThreadMessages is false. Queues them by sending them to the owning thread if mQueueInterThreadMessages is true. \param message formatted message @@ -182,12 +182,12 @@ /*! \brief Receive function called by MessageObjectAppender when a new message arrives. - Calls the virtual receive function directly if mQueueInterThreadMessages is false. + Calls the virtual receive function directly if mQueueInterThreadMessages is false. Queues them by sending them to the owning thread if mQueueInterThreadMessages is true. \param object message content and meta information as LogMessage */ - void receiveMessageObjectQueued(boost::shared_ptr<LogMessage>& object); + void receiveMessageObjectQueued(const boost::shared_ptr<LogMessage>& object); protected: @@ -199,7 +199,7 @@ a ThreadMessageQueue and the qt-connect-queue. For the queue to work the IMessageReceivers thread needs to be in an event loop (QThread::exec()). \warning Especially when interacting with QtGui-elements like QTextEdit, QWidget etc, the receiveMessagesQueued flag HAS to be set, since only the owning thread - may change Gui parameters. + may change Gui parameters. If you dont want the messages to be queued you can set receiveMessagesQueued to false. In this case the thread that sent the log message will call receiveMessage() and receiveMessageObject() directly. Modified: branches/gui-bullet/spark/carbon/cutelogger/logstreambuffer.h =================================================================== --- branches/gui-bullet/spark/carbon/cutelogger/logstreambuffer.h 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/cutelogger/logstreambuffer.h 2013-06-12 09:17:07 UTC (rev 359) @@ -68,7 +68,7 @@ /*! \brief Returns the buffer size. */ - unsigned int getSize() const; + unsigned int getSize() const; /*! \brief Returns the log level of messages in this buffer. */ @@ -76,7 +76,7 @@ /*! \brief Returns the source id for messages in this buffer. */ - unsigned int getLogSource() const; + unsigned int getLogSource() const; protected: // virtual protected functions @@ -120,11 +120,11 @@ \brief Sends out complete internal buffer. */ void PutBuffer(); - + /*! \brief Sends out a single character. */ - void LogStreamBuffer::PutChar(TIntType chr); + void PutChar(TIntType chr); private: //private members Modified: branches/gui-bullet/spark/carbon/guisimcontrol.cpp =================================================================== --- branches/gui-bullet/spark/carbon/guisimcontrol.cpp 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/guisimcontrol.cpp 2013-06-12 09:17:07 UTC (rev 359) @@ -20,7 +20,7 @@ #include "guisimcontrol.h" #include "isimcontrol.h" -#include "cutelogger\logger.h" +#include "cutelogger/logger.h" //-------------------------------------------------------------- // Public Modified: branches/gui-bullet/spark/carbon/guisimcontrol.h =================================================================== --- branches/gui-bullet/spark/carbon/guisimcontrol.h 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/guisimcontrol.h 2013-06-12 09:17:07 UTC (rev 359) @@ -25,8 +25,8 @@ * \brief Contains GuiSimControl class, an oxygen SimulationControlNode for the Gui. */ -#include <oxygen\simulationserver\simcontrolnode.h> -#include <boost\shared_ptr.hpp> +#include <oxygen/simulationserver/simcontrolnode.h> +#include <boost/shared_ptr.hpp> #include <QList> class ISimControl; @@ -91,7 +91,7 @@ private: //private functions - + /*! \brief Called once when the simulation is started. */ Modified: branches/gui-bullet/spark/carbon/libraryloader.cpp =================================================================== --- branches/gui-bullet/spark/carbon/libraryloader.cpp 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/libraryloader.cpp 2013-06-12 09:17:07 UTC (rev 359) @@ -19,7 +19,7 @@ */ #include "libraryloader.h" -#include "cutelogger\logger.h" +#include "cutelogger/logger.h" #include "pluginmanager.h" #include "carbon.h" Modified: branches/gui-bullet/spark/carbon/libraryloader.h =================================================================== --- branches/gui-bullet/spark/carbon/libraryloader.h 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/libraryloader.h 2013-06-12 09:17:07 UTC (rev 359) @@ -33,7 +33,7 @@ #include <QDir> #include <QMainWindow> -#include <boost\shared_ptr.hpp> +#include <boost/shared_ptr.hpp> /*! \brief Class that manages include directories and files for plugin and main window shared libraries. Modified: branches/gui-bullet/spark/carbon/menumanager.cpp =================================================================== --- branches/gui-bullet/spark/carbon/menumanager.cpp 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/menumanager.cpp 2013-06-12 09:17:07 UTC (rev 359) @@ -27,7 +27,7 @@ #include "menuobjectmenu.h" #include "menuobjecttoolbar.h" #include "menuobjectfile.h" -#include "windowManager.h" +#include "windowmanager.h" #include "settingsdialog.h" #include "plugindialog.h" #include "numberedactionreceiver.h" @@ -92,7 +92,7 @@ } QAction* action; - + //------------------------------------------------------ // Init Menu //------------------------------------------------------ @@ -110,7 +110,7 @@ action->setToolTip("Load a simulation state."); action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_L)); connect(action, SIGNAL(triggered()), this, SLOT(load())); - + action = mFileMenu->addAction(QIcon(":save"), tr("&Save")); action->setToolTip("Save the current simulation state."); action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_S)); @@ -135,7 +135,7 @@ action = mFileMenu->addAction(QIcon(":folder"), tr("&Load Clean")); action->setToolTip("Load a simulation state without loading data files for the plugins."); connect(action, SIGNAL(triggered()), this, SLOT(loadClean())); - + action = mFileMenu->addAction(QIcon(":save"), tr("&Save Clean")); action->setToolTip("Save the current simulation setup without saving data files for the plugins."); connect(action, SIGNAL(triggered()), this, SLOT(saveClean())); @@ -149,7 +149,7 @@ action = mFileMenu->addAction(tr("&Exit")); action->setToolTip("Close the program."); connect(action, SIGNAL(triggered()), this, SLOT(exit())); - + addNamedMenu(mFileMenu, "File"); //------------------------------------------------------ @@ -196,7 +196,7 @@ addNamedMenu(mToolsMenu, "Tools"); //------------------------------------------------------ - + //------------------------------------------------------ //Log Menu //------------------------------------------------------ @@ -207,7 +207,7 @@ connect(action, SIGNAL(triggered()), this, SLOT(sendInitMessages())); mLogMenu->addSeparator(); - + mSparkDebugLevelAction = mLogMenu->addAction(tr("Set SimSpark log level: Debug")); connect(mSparkDebugLevelAction, SIGNAL(triggered()), this, SLOT(setSparkLogLevelDebug())); @@ -219,7 +219,7 @@ mSparkErrorLevelAction = mLogMenu->addAction(tr("Set SimSpark log level: Error")); connect(mSparkErrorLevelAction, SIGNAL(triggered()), this, SLOT(setSparkLogLevelError())); - + addNamedMenu(mLogMenu, "Log"); //------------------------------------------------------ @@ -232,21 +232,21 @@ //TODO: Add Help menu //action = mHelpMenu->addAction(tr("&View Help")); //connect(action, SIGNAL(triggered()), this, SLOT(help())); - + action = mHelpMenu->addAction(tr("&About")); connect(action, SIGNAL(triggered()), this, SLOT(about())); action = mHelpMenu->addAction(tr("&Whats this?")); action->setShortcut(Qt::CTRL + Qt::Key_W); connect(action, SIGNAL(triggered()), this, SLOT(whatsThis())); - + addNamedMenu(mHelpMenu, "Help"); //------------------------------------------------------ //------------------------------------------------------ // Init ToolBars //------------------------------------------------------ - + //------------------------------------------------------ // File Toolbar //------------------------------------------------------ @@ -382,7 +382,7 @@ if (caller->hasVisualRepresentation() == false) { callerWidget = 0; - target = 0; + target = 0; if (location == MOL_LOCAL) { LOG_WARNING() << "Cant provide 'Local' menu objects in a plugin without visual representation. Ignoring this flag."; @@ -573,7 +573,7 @@ void MenuManager::cleanEntries(const AbstractPlugin* origin) { - + TMenuObjects::iterator it = mMenuObjects.begin(); while (it != mMenuObjects.end()) { @@ -726,7 +726,7 @@ void MenuManager::reload() { SimulationManager* manager = mParent->getSimulationManager(); - QString currentSimulation = manager->getSimulation()->getFilename(); + QString currentSimulation = manager->getSimulation()->getFilename(); manager->initializeSimulationFromFile(currentSimulation, true); } @@ -857,7 +857,7 @@ //Set log level for all spark controllers for (auto it = mSparkController.begin(); it != mSparkController.end(); it++) { - (*it)->setLogProperties((Logger::LogLevel) level); + (*it)->setLogProperties((Logger::LogLevel) level); } } @@ -935,7 +935,7 @@ LOG_INFO() << "Cant create another plugin of class " << pos->second->getName(); return; } - + //Choose attachment and parameters QString parameter = ""; QString attachment = ""; @@ -945,7 +945,7 @@ if (attachmentPoint) attachment = attachmentPoint->getName(); } - + //Create plugin definition boost::shared_ptr<PluginDefinition> definition(new PluginDefinition( pos->second->getName(), pos->second->getName(), pos->second->getPluginType(), PluginDefinition::RD_INHERIT, parameter, attachment)); @@ -1004,7 +1004,7 @@ default: break; } action->setWhatsThis("Create a new " + typeText + " of class '" + it->second->getName() + "'.\n" \ - "The maximum amount for plugins of this class is " + QString::number(it->second->getMaxInstanceCount()) + "." + "The maximum amount for plugins of this class is " + QString::number(it->second->getMaxInstanceCount()) + "." + descriptionHeader + description); //Connect button @@ -1035,4 +1035,4 @@ delete mMenuObjects.back(); mMenuObjects.pop_back(); }*/ -} \ No newline at end of file +} Modified: branches/gui-bullet/spark/carbon/menumanager.h =================================================================== --- branches/gui-bullet/spark/carbon/menumanager.h 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/menumanager.h 2013-06-12 09:17:07 UTC (rev 359) @@ -31,7 +31,7 @@ #include <QString> #include <QMenuBar> #include <QSize> -#include <Map> +#include <map> #include <vector> class Carbon; @@ -60,7 +60,7 @@ At time of frame instantiation they provide the MenuManager with additional Menus, Actions and Toolboxes for their control. Tools, Menus and so on are named and stored as MenuObject. - While Plugins and SignalPlugins may only provide global toolboxes and menu entries, AttachableFrames can create and provide local entries that are build in + While Plugins and SignalPlugins may only provide global toolboxes and menu entries, AttachableFrames can create and provide local entries that are build in into their frame at a specified location. */ class MenuManager : public QObject @@ -144,7 +144,7 @@ \brief Returns the main MenuBar of the active MenuManager. */ static QMenuBar* getMenuBar(); - + /*! \brief Changes a toolbar style to a fixed style. @@ -290,7 +290,7 @@ //----------------------------- // File Menu / Tools //----------------------------- - + /*! \brief Load simulation. */ Modified: branches/gui-bullet/spark/carbon/menuobjectfile.cpp =================================================================== --- branches/gui-bullet/spark/carbon/menuobjectfile.cpp 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/menuobjectfile.cpp 2013-06-12 09:17:07 UTC (rev 359) @@ -330,7 +330,8 @@ //Create menu object and provide to Manager MenuManager::EMenuObjectLocation menuLocation; QString menuName; - QMenu* newMenu = loadMenu(&(n.toElement()), menuName, menuLocation); + QDomElement el = n.toElement(); + QMenu* newMenu = loadMenu(&el, menuName, menuLocation); if (newMenu == 0) { LOG_ERROR() << "Could not create menu object from file."; @@ -352,7 +353,8 @@ //Create toolbar object and provide to Manager MenuManager::EMenuObjectLocation toolBarLocation; QString toolBarName(""); - QToolBar* newToolBar = loadToolBar(&(n.toElement()), toolBarName, toolBarLocation); + QDomElement el = n.toElement(); + QToolBar* newToolBar = loadToolBar(&el, toolBarName, toolBarLocation); if (newToolBar == 0) { LOG_ERROR() << "Could not create toolbar object from file."; @@ -438,7 +440,8 @@ if (nodeName.compare("action") == 0) { //Create action and add to menu - bool success = loadAction(&(n.toElement()), newMenu); + QDomElement el = n.toElement(); + bool success = loadAction(&el, newMenu); if (!success) { LOG_ERROR() << "Could not create an action object from file."; @@ -519,7 +522,8 @@ if (nodeName.compare("tool") == 0) { //Create tool action and add to menu - bool success = loadTool(&(n.toElement()), newToolBar); + QDomElement el = n.toElement(); + bool success = loadTool(&el, newToolBar); if (!success) { LOG_ERROR() << "Could not create an tool action object from file."; @@ -895,7 +899,7 @@ { if (run >= (int)typeList.size()) { - LOG_WARNING() << "Specified more arguments than given in Definition of target function " << slotStr << + LOG_WARNING() << "Specified more arguments than given in Definition of target function " << slotStr << ". Ignoring the following arguments."; break; } @@ -985,7 +989,7 @@ else typeStr = typeAttr.value(); - if ((typeStr.compare("qstring", Qt::CaseInsensitive) != 0) && + if ((typeStr.compare("qstring", Qt::CaseInsensitive) != 0) && (typeStr.compare("bool", Qt::CaseInsensitive) != 0) && (typeStr.compare("int", Qt::CaseInsensitive) != 0) && (typeStr.compare("float", Qt::CaseInsensitive) != 0)) @@ -1166,4 +1170,4 @@ // Slots //-------------------------------------------------------------- -} //namespace MenuSystem \ No newline at end of file +} //namespace MenuSystem Modified: branches/gui-bullet/spark/carbon/openglmanager.cpp =================================================================== --- branches/gui-bullet/spark/carbon/openglmanager.cpp 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/openglmanager.cpp 2013-06-12 09:17:07 UTC (rev 359) @@ -98,7 +98,7 @@ break; } } - + unlockWidgets(); return ret; } @@ -118,7 +118,7 @@ break; } } - + unlockWidgets(); return ret; } @@ -190,7 +190,7 @@ { if (!lockWidgets()) return false; - + for (auto it = mWidgets.begin(); it != mWidgets.end(); ) { if (it->mWidget == widget) @@ -278,10 +278,10 @@ } //Send signal for receiver thread to prepare external opengl access - sendGLStateSignal(widget, lockSignal, blockedLock); + sendGLStateSignal(widget, lockSignal, blockedLock); //Disable resize/repaint updates - widget->setUpdatesEnabled(false); + widget->setUpdatesEnabled(false); //Make the target gl context current in this thread widget->makeCurrent(); @@ -340,7 +340,7 @@ } } - + } void OpenGLManager::glWidgetDestroyed(QObject* widget) @@ -350,12 +350,12 @@ LOG_WARNING() << "Could not remove destroyed GlWidget from list because list access is locked."; return; } - + for (auto it = mWidgets.begin(); it != mWidgets.end(); ) { if (it->mWidget == widget) { - LOG_WARNING() << "Removing registered GLWidget 0x" << QString::number((int)widget, 16).toStdString().c_str() << + LOG_WARNING() << "Removing registered GLWidget 0x" << QString::number((intptr_t)widget, 16).toStdString().c_str() << " because it was destroyed. Call unregisterGLWidget() before destruction."; it = mWidgets.erase(it); } Modified: branches/gui-bullet/spark/carbon/plugininstantiatormodel.h =================================================================== --- branches/gui-bullet/spark/carbon/plugininstantiatormodel.h 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/plugininstantiatormodel.h 2013-06-12 09:17:07 UTC (rev 359) @@ -28,7 +28,7 @@ #include "plugintype.h" #include "abstractplugin.h" -#include <boost\shared_ptr.hpp> +#include <boost/shared_ptr.hpp> #include <vector> #include <QAbstractTableModel> Modified: branches/gui-bullet/spark/carbon/pluginmanager.cpp =================================================================== --- branches/gui-bullet/spark/carbon/pluginmanager.cpp 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/pluginmanager.cpp 2013-06-12 09:17:07 UTC (rev 359) @@ -96,7 +96,7 @@ if (mPluginSettingsWidget == 0) { mPluginSettingsWidget = new GuiSettings::PluginSettings(mSettings); - Carbon::get()->getSettingsDialog()->includeSettingWidget(tr("Gui"), tr("Plugin Manager"), + Carbon::get()->getSettingsDialog()->includeSettingWidget(tr("Gui"), tr("Plugin Manager"), (SettingsWidget**)&mPluginSettingsWidget, 0, ":config"); //Setting connections @@ -155,7 +155,7 @@ if (mPluginIncludeDirectories.contains(*it)) continue; - + mPluginIncludeDirectories.push_back(dir.absolutePath()); listChanged = true; } @@ -166,7 +166,7 @@ mPluginIncludeDirectories.push_back(mDefaultPluginPath); listChanged = true; } - + if (listChanged) { if (mSettings->beginGroup("gui_PluginManager", true)) //lock @@ -267,7 +267,7 @@ else for (SimulationSetup::TPluginDefinitions::const_iterator p_it = addList.begin(); p_it != addList.end(); p_it++) { - //This is a plugin that matches a remove definition? Remove this! + //This is a plugin that matches a remove definition? Remove this! if (p_it->get()->pluginMatches(plugin, true)) { //definition matches, delete @@ -339,7 +339,7 @@ //Nothing to delete, return return false; } - + LOG_DEBUG() << "Deleting plugin with id " << pluginId << "."; return deletePlugin(it->second->getClassId(), pluginId, true, removeDefFromSimulation); @@ -354,7 +354,7 @@ //Nothing to reload, return return 0; } - + LOG_DEBUG() << "Reloading plugin with id " << plugin.getPluginId() << " (" << plugin.getCaption() << ")."; //Store data @@ -411,7 +411,7 @@ //Not in managed list, return return 0; } - + LOG_DEBUG() << "Reinitializing plugin with id " << plugin.getPluginId() << " (" << plugin.getCaption() << ")."; //If a new definition is given, use the new parameters and attachments @@ -603,7 +603,7 @@ //Calling init function plugin->init(parameters); - + //Store instantiation info addInstanceIndex(plugin->getClassId(), plugin->getPluginId()); emit pluginAdded(plugin->getPluginId()); @@ -615,14 +615,14 @@ AttachableFrame* PluginManager::createAttachableFrame(const QString& name, const QString& caption, const QStringList& targets, const QStringList& parameters) { - LOG_DEBUG() << "Trying to create plugin " << caption << " of class " << name << " at attachmentpoint " << + LOG_DEBUG() << "Trying to create plugin " << caption << " of class " << name << " at attachmentpoint " << (targets.size() > 0 ? targets.at(0) : " <undefined>."); if (targets.size() == 0) { LOG_WARNING() << "No attachment targets defined for Plugin with class name " << name << ". Using default attachments."; FrameAttachmentPoint* point = mParent->getWindowManager()->findDefaultFrameAttachmentPoint(true); - if (!point) + if (!point) { LOG_ERROR() << "could not create plugin. No free default attachment point found."; return 0; @@ -640,7 +640,7 @@ if (i != targets.size() -1) targetlist.append(", "); } - + LOG_ERROR() << "Could not create Plugin class with name " << name << " because none of the attachment points specified could be found: " << targetlist; return 0; } @@ -713,7 +713,7 @@ if (!searchName && !searchCaption && !searchType) { - LOG_WARNING() << "Plugin search query matches with any plugin. Specify class name, plugin caption and/or type."; + LOG_WARNING() << "Plugin search query matches with any plugin. Specify class name, plugin caption and/or type."; } std::vector<AbstractPlugin*> matches = findPlugins(name, caption, type); @@ -828,7 +828,7 @@ if (ok) LOG_DEBUG() << "Plugin definition moved from current Simulation Setup to Extension Plugin list."; else - LOG_WARNING() << "Plugin definition not found current Simulation Setup. Cant remove it to update Extension Plugin list."; + LOG_WARNING() << "Plugin definition not found current Simulation Setup. Cant remove it to update Extension Plugin list."; } } } @@ -942,7 +942,7 @@ return PluginFactory::getFactory().getMaxInstanceCount(classId); } -void PluginManager::createPluginContextMenu(QMenu* menu, std::vector<NumberedActionReceiver*>& actionReceivers, +void PluginManager::createPluginContextMenu(QMenu* menu, std::vector<NumberedActionReceiver*>& actionReceivers, QObject* signalTarget, const char* slot, const PluginDefinition& matchDefinition) { //Add plugins identifications to list @@ -959,7 +959,7 @@ QVariant PluginManager::getPluginClassInfo(int classId, AbstractPlugin::EPluginInfo info) { - return getPluginClassInfo(classId, AbstractPlugin::getClassInfoName(info)); + return getPluginClassInfo(classId, AbstractPlugin::getClassInfoName(info)); } QVariant PluginManager::getPluginClassInfo(int classId, const QString& field) @@ -974,7 +974,7 @@ if (mSettings->beginGroup("gui_PluginInfo", true)) //lock { mSettings->beginGroup(name); - + QVariant returning; returning = mSettings->value(field, QVariant()); @@ -992,7 +992,7 @@ void PluginManager::setPluginClassInfo(int classId, AbstractPlugin::EPluginInfo info, const QVariant& value) { - setPluginClassInfo(classId, AbstractPlugin::getClassInfoName(info), value); + setPluginClassInfo(classId, AbstractPlugin::getClassInfoName(info), value); } void PluginManager::setPluginClassInfo(int classId, const QString& field, const QVariant& value) @@ -1023,7 +1023,7 @@ for (auto it = mPluginMap.begin(); it != mPluginMap.end(); it++) { bool loadedOne = it->second->loadData(data); - if (loadedOne) + if (loadedOne) loaded = true; } return loaded; @@ -1065,11 +1065,11 @@ { //Choose Path from dialog QFileDialog dialog((QWidget*)Carbon::get()->getWindowManager()->getMainWindow(), - QString(tr("Add plugin include directory")), + QString(tr("Add plugin include directory")), mDefaultPluginPath); dialog.setFilter(QDir::Dirs); dialog.setToolTip(tr("Choose a directory with plugin libraries to include. All libraries in the directory will be linked to the application.")); - + //Execute dialog bool accepted = dialog.exec(); if (!accepted) @@ -1156,11 +1156,11 @@ { //Choose File from dialog QFileDialog dialog((QWidget*)Carbon::get()->getWindowManager()->getMainWindow(), - QString(tr("Add plugin library")), + QString(tr("Add plugin library")), mDefaultPluginPath); dialog.setFilter(QDir::Files); dialog.setToolTip(tr("Choose a plugin libraries to include. The libraries will be linked to the application.")); - + //Execute dialog bool accepted = dialog.exec(); if (!accepted) @@ -1263,11 +1263,11 @@ void PluginManager::initLibraries() { //Add all single files - mLibraryLoader->addFiles(mPluginIncludeFiles); - + mLibraryLoader->addFiles(mPluginIncludeFiles); + //Add all include directories for (auto it = mPluginIncludeDirectories.begin(); it != mPluginIncludeDirectories.end(); it++) - mLibraryLoader->addDirectory(*it); + mLibraryLoader->addDirectory(*it); //Link all included plugin libraries (one by one for detailed log infos) for (auto it = mLibraryLoader->librariesBegin(); it != mLibraryLoader->librariesEnd(); it++) @@ -1555,7 +1555,7 @@ switch(col) { - case 0: + case 0: //Extension return plugin->isExtension() ? Qt::Checked : Qt::Unchecked; break; @@ -1563,7 +1563,7 @@ case 2: //fall case 3: //fall case 4: //fall - default: + default: break; } } @@ -1575,31 +1575,31 @@ switch(col) { - case 0: + case 0: //Extension return QVariant(tr("The location where the plugin definition is saved.\n" \ "If checked, the plugin will be an 'Extension' and loaded with every simulation instead of only the current simulation setup.\n" \ "Otherwise it will be stored in the current simulation setup.")); break; - case 1: + case 1: //Caption return QVariant(tr("The caption of the plugin instance. Used to display a name for the plugin instance and to store settings for the plugin instance with.")); break; - case 2: + case 2: //Class return QVariant(tr("The name of the plugin class.")); break; - case 3: + case 3: //Type return QVariant(tr("The type of the plugin class.\n" \ "Simple-Plugins are usually used to be executed in a Plugin-Thread, Signal-Plugins can be used to communicate with each other, \n" \ "and Frame-Plugins are visual plugins that can be attached to and moved between the Gui attachment points.")); break; - case 4: + case 4: //Attachment return QVariant(tr("Name of the current attachment point the plugin is attached to. Only Frame-Plugins can be attached.")); break; - default: + default: return QVariant(tr("#Illegal column Index#")); break; } @@ -1666,7 +1666,7 @@ switch (col) { - case 0: + case 0: mPluginManager->declareExtensionPlugin(plugin->getPluginId(), value.toBool(), true); break; case 1: //fall @@ -1750,31 +1750,31 @@ { switch(section) { - case 0: + case 0: //Extension return QVariant(tr("The location where the plugin definition is saved.\n" \ "If checked, the plugin will be an 'Extension' and loaded with every simulation instead of only the current simulation setup.\n \ Otherwise it will be stored in the SimulationSetup.")); break; - case 1: + case 1: //Caption return QVariant(tr("The caption of the plugin instance. Used to display a name for the plugin instance and to store settings for the plugin instance with.")); break; - case 2: + case 2: //Class return QVariant(tr("The name of the plugin class.")); break; - case 3: + case 3: //Type return QVariant(tr("The type of the plugin class.\n" \ "Simple-Plugins are usually used to be executed in a Plugin-Thread, Signal-Plugins can be used to communicate with each other, \n" \ "and Frame-Plugins are visual plugins that can be attached to and moved between the Gui attachment points.")); break; - case 4: + case 4: //Attachment return QVariant(tr("Name of the current attachment point the plugin is attached to. Only Frame-Plugins can be attached.")); break; - default: + default: return QVariant(tr("#Illegal column Index#")); break; } Modified: branches/gui-bullet/spark/carbon/pluginmanager.h =================================================================== --- branches/gui-bullet/spark/carbon/pluginmanager.h 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/pluginmanager.h 2013-06-12 09:17:07 UTC (rev 359) @@ -59,7 +59,7 @@ For example, the SimulationManager loads SimulationSetup files and uses the PluginManager to create plugins based on PluginDefinitions in the SimulationSetup. The user can manually explore the list of registered plugin classes and instantiate them or remove plugin instances with a PluginDialog. When loading a list of plugins, the manager can control which plugins are kept, which ones are reloaded, which ones have to be removed, and which ones habe to be added. - + Plugins are stored with different kinds of identification values. These different values can be used to search and access plugins. They are also used to identify them during one program execution or over several program executions (e.g. to save [[Gui Settings Concept|Settings]] for the plugins). @@ -83,11 +83,11 @@ The caption of a plugin is freely choosable. It is advised to not to change it too often, because settings for plugin instances are saved with its caption as identification.\n It is stored in the plugin instance.\n It CAN be different for every plugin instance and can be changed at runtime. Unless changed manually, plugin instances will have the same name in every program execution.\n - + Plugins can be searched an utilized at runtime by searching for their name, ids, or definition directly using findPlugins() in the PluginManager. A better and order-independant way is to use the CommunicationManager (see [[Graphical User Interface Development]]) to create communication channels between plugins. - The manager handles deleting plugins. + The manager handles deleting plugins. Some plugins (derived from AttachableFrame and attached to a QWidget) are deleted by Qt and notify the manager of the plugins destruction. */ class PluginManager : public QObject @@ -117,7 +117,7 @@ public: // public constructor functions - + /*! \brief Basic constructor. @@ -272,7 +272,7 @@ /*! \brief Searches plugins in the plugin instance list that matches different criteria. - name, caption and type can be general (empty string or -1) to match with all plugins. + name, caption and type can be general (empty string or -1) to match with all plugins. All matching plugins are added to a list and returned. When using findPlugin() to search for a single plugin in the manager you should make sure, that the SimulationSetup uses unique captions, so they can be identified by caption. @@ -305,7 +305,7 @@ A Plugin declared as a extension will not be unloaded when loading a new SimulationSetup in the SimulationManager. They will be loaded first before loading any plugin list with the PluginManager. - If the SimulationSetup declares the plugin too, the declaration will stay in the setup definition. + If the SimulationSetup declares the plugin too, the declaration will stay in the setup definition. This will result in double instantiation of the plugin if it can be instantiated more than once. The extension flag will never be stored within a SimulationSetup, but the plugins flagged as extension are stored in an additional SimulationSetup which contains the extensions. @@ -336,11 +336,11 @@ \warning Do not access plugins from any other than the main thread because they might be deleted in between getting the pointer and dereferencing it. Since the plugin might be deleted by the Gui-Core itself, the only safe way to access the plugin from another thread is using the plugin managers call interface. - - It should not be neccessary to store a plugin pointer. Store its pluginId (instance id) instead. Either way, the signal pluginAboutToBeRemoved() informs about + + It should not be neccessary to store a plugin pointer. Store its pluginId (instance id) instead. Either way, the signal pluginAboutToBeRemoved() informs about removal of the plugin. If the plugin was removed by the gui itself however this signal is emitted in the destructor of the plugin and it must not be dereferenced anymore in the mean time. So, dont store plugin pointers in any other than the main thread. - + \param pluginId id of the plugin */ AbstractPlugin* getPlugin(int pluginId) const; @@ -375,7 +375,7 @@ \param slot Slot of the optional object to invoke when a plugin entry was clicked. signature is (int) and contains the plugin id \param matchDefinition optional plugin definition to restrict the set of plugins that generate entries. Only matching plugins will have an entry in the list */ - void createPluginContextMenu(QMenu* menu, std::vector<NumberedActionReceiver*>& actionReceivers = std::vector<NumberedActionReceiver*>(), + void createPluginContextMenu(QMenu* menu, std::vector<NumberedActionReceiver*>& actionReceivers, QObject* signalTarget = 0, const char* slot = "", const PluginDefinition& matchDefinition = PluginDefinition()); /*! @@ -645,9 +645,9 @@ //Settings QString mExtensionFile; /*!< File to load the SimulationSetup with the extension plugins from. */ QString mDefaultPluginPath; /*!< Default path to search plugin libraries in. */ - QStringList mPluginIncludeDirectories; /*!< List of include directories for plugin libraries. */ - QStringList mPluginIncludeFiles; /*!< List of single plugin libraries to include. */ - + QStringList mPluginIncludeDirectories; /*!< List of include directories for plugin libraries. */ + QStringList mPluginIncludeFiles; /*!< List of single plugin libraries to include. */ + static int mNextClassId; /*!< Next class id. */ int mNextPluginId; /*!< Next plugin instance id. */ Modified: branches/gui-bullet/spark/carbon/pluginthread.cpp =================================================================== --- branches/gui-bullet/spark/carbon/pluginthread.cpp 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/pluginthread.cpp 2013-06-12 09:17:07 UTC (rev 359) @@ -70,7 +70,7 @@ void PluginThread::run() { bool success = initPlugin(); - + if (!success) { LOG_ERROR() << "Could not run plugin because plugin creation failed."; @@ -106,7 +106,7 @@ //Pause/Unpause plugin bool success = mPlugin->pause(state); - if (success) + if (success) emit updatePaused(state); } @@ -146,7 +146,7 @@ PluginManager* manager = Carbon::get()->getPluginManager(); //For new plugins, executable denotes the executable plugin, class mainScript the plugin caption and secondary script the plugin type (as integer) - AbstractPlugin* plugin = manager->findPlugin(getTaskDefinition().getFirst(), getTaskDefinition().getSecond(), + AbstractPlugin* plugin = manager->findPlugin(getTaskDefinition().getFirst(), getTaskDefinition().getSecond(), getTaskDefinition().getThird().compare("") == 0 ? -1 : getTaskDefinition().getThird().toInt()); if (plugin == 0) Modified: branches/gui-bullet/spark/carbon/settings.cpp =================================================================== --- branches/gui-bullet/spark/carbon/settings.cpp 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/settings.cpp 2013-06-12 09:17:07 UTC (rev 359) @@ -22,7 +22,7 @@ #include "abstractplugin.h" #include "carbon.h" -#include <QThread.h> +#include <QThread> //-------------------------------------------------------------- // Static Modified: branches/gui-bullet/spark/carbon/settingsdialog.cpp =================================================================== --- branches/gui-bullet/spark/carbon/settingsdialog.cpp 2013-06-12 08:41:40 UTC (rev 358) +++ branches/gui-bullet/spark/carbon/settingsdialog.cpp 2013-06-12 09:17:07 UTC (rev 359) @@ -57,7 +57,7 @@ shared_ptr<PageDefinition> pagePtr(getPageDefinition(topic, page)); - if (pagePtr == 0) + if (pagePtr == 0) return false; LOG_DEBUG() << "Registering plugin " << registree->getCaption() << " to topic " << topic << " and page " << page << ".... [truncated message content] |
From: <he...@us...> - 2013-06-12 08:41:43
|
Revision: 358 http://sourceforge.net/p/simspark/svn/358 Author: hedayat Date: 2013-06-12 08:41:40 +0000 (Wed, 12 Jun 2013) Log Message: ----------- Final changes for 0.2.4 release: NEWS/RELEASE notes, and version bumps in CMakeLists.txt Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/NEWS trunk/spark/RELEASE Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2013-06-09 19:30:22 UTC (rev 357) +++ trunk/spark/CMakeLists.txt 2013-06-12 08:41:40 UTC (rev 358) @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(simspark CXX C) -set(PACKAGE_VERSION "0.2.3") +set(PACKAGE_VERSION "0.2.4") ########## check for headerfiles/libraries ########## include(CheckIncludeFile) @@ -155,13 +155,13 @@ 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.3) +set(ZEITGEIST_VERSION ${ZEITGEIST_SO_VERSION}.1.4) set(OXYGEN_SO_VERSION 6) -set(OXYGEN_VERSION ${OXYGEN_SO_VERSION}.0.0) +set(OXYGEN_VERSION ${OXYGEN_SO_VERSION}.0.1) set(KEROSIN_SO_VERSION 2) -set(KEROSIN_VERSION ${KEROSIN_SO_VERSION}.1.0) +set(KEROSIN_VERSION ${KEROSIN_SO_VERSION}.1.1) set(SPARK_SO_VERSION 1) -set(SPARK_VERSION ${SPARK_SO_VERSION}.0.0) +set(SPARK_VERSION ${SPARK_SO_VERSION}.0.1) set(RCSSNET_SO_VERSION 0) set(RCSSNET_VERSION ${RCSSNET_SO_VERSION}.1.0) Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2013-06-09 19:30:22 UTC (rev 357) +++ trunk/spark/ChangeLog 2013-06-12 08:41:40 UTC (rev 358) @@ -1,3 +1,10 @@ +2013-06-12 Hedayat Vatankhah <hed...@gm...> + + * NEWS: + * RELEASE: + * CMakeLists.txt: + - final changes for 0.2.4 release + 2012-11-24 Hedayat Vatankhah <hed...@gm...> * plugin/sceneeffector/sceneaction.h: Modified: trunk/spark/NEWS =================================================================== --- trunk/spark/NEWS 2013-06-09 19:30:22 UTC (rev 357) +++ trunk/spark/NEWS 2013-06-12 08:41:40 UTC (rev 358) @@ -1,3 +1,13 @@ +[0.2.4] +Simspark 0.2.4 is ready. This release is mostly a bug fix and compile fix +release for RoboCup 2013. New exciting changes are pending, but will be +released in Simspark 0.3.0 very soon. The most considerable change in this +release is the possibility of sending parameters to the SceneEffector, which +is required for Heterogeneous robots functionality. + +Additionally, a paper about recent changes to Simspark/Rcssserver3d which is +mostly written by Yuan Xu is available in SimSpark SVN repository. + [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 Modified: trunk/spark/RELEASE =================================================================== --- trunk/spark/RELEASE 2013-06-09 19:30:22 UTC (rev 357) +++ trunk/spark/RELEASE 2013-06-12 08:41:40 UTC (rev 358) @@ -1,30 +1,13 @@ -RELEASE News of simspark-0.2.3 +RELEASE News of simspark-0.2.4 -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: +Simspark 0.2.4 is ready. This release is mostly a bug fix and compile fix +release for RoboCup 2013. New exciting changes are pending, but will be +released in Simspark 0.3.0 very soon. The most considerable change in this +release is the possibility of sending parameters to the SceneEffector, which +is required for Heterogeneous robots functionality. -- 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 +Additionally, a paper about recent changes to Simspark/Rcssserver3d which is +mostly written by Yuan Xu is available in SimSpark SVN repository. -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...> - 2013-06-09 19:30:24
|
Revision: 357 http://sourceforge.net/p/simspark/svn/357 Author: hedayat Date: 2013-06-09 19:30:22 +0000 (Sun, 09 Jun 2013) Log Message: ----------- Merge renderserver.cpp changes Modified Paths: -------------- branches/gui-bullet/spark/lib/kerosin/renderserver/renderserver.cpp Modified: branches/gui-bullet/spark/lib/kerosin/renderserver/renderserver.cpp =================================================================== --- branches/gui-bullet/spark/lib/kerosin/renderserver/renderserver.cpp 2013-06-09 18:35:13 UTC (rev 356) +++ branches/gui-bullet/spark/lib/kerosin/renderserver/renderserver.cpp 2013-06-09 19:30:22 UTC (rev 357) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: renderserver.cpp 238 2010-12-17 00:23:17Z yxu $ + $Id: renderserver.cpp 331 2013-02-13 08:31:45Z hedayat $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -55,7 +55,6 @@ mPickedNode.reset(); } - void RenderServer::Render(bool clean) { @@ -74,7 +73,7 @@ // if no camera is selected yet, select the first one if (mCamera.get() == 0) - mCamera = shared_static_cast<Camera>(mActiveScene->GetChildOfClass("Camera", true)); + mCamera = static_pointer_cast<Camera>(mActiveScene->GetChildOfClass("Camera", true)); if (mCamera.get() == 0) { @@ -140,7 +139,7 @@ ++iter ) { - (shared_static_cast<Light>(*iter))->Prepare(); + (static_pointer_cast<Light>(*iter))->Prepare(); } } @@ -281,7 +280,7 @@ void RenderServer::RenderScene(boost::shared_ptr<BaseNode> node, unsigned pass) { - boost::shared_ptr<RenderNode> renderNode = shared_dynamic_cast<RenderNode>(node); + boost::shared_ptr<RenderNode> renderNode = dynamic_pointer_cast<RenderNode>(node); if (renderNode.get() != 0 && !renderNode->IsVisible()) return; @@ -328,7 +327,7 @@ // traverse the the hierarchy for (TLeafList::iterator i = node->begin(); i!= node->end(); ++i) { - boost::shared_ptr<BaseNode> node = shared_dynamic_cast<BaseNode>(*i); + boost::shared_ptr<BaseNode> node = dynamic_pointer_cast<BaseNode>(*i); if (node.get() == 0) { continue; @@ -424,7 +423,7 @@ if (*iter == mCamera) { ++iter; - mCamera = iter != cameras.end() ? shared_static_cast<Camera>(*iter) : shared_static_cast<Camera>(cameras.front()); + mCamera = iter != cameras.end() ? static_pointer_cast<Camera>(*iter) : static_pointer_cast<Camera>(cameras.front()); break; } } @@ -436,7 +435,7 @@ for (TLeafList::iterator iter = cameras.begin(); iter != cameras.end(); ++iter) if (*iter == mCamera) { - mCamera = iter != cameras.begin() ? shared_static_cast<Camera>(*(--iter)) : shared_static_cast<Camera>(cameras.back()); + mCamera = iter != cameras.begin() ? static_pointer_cast<Camera>(*(--iter)) : static_pointer_cast<Camera>(cameras.back()); break; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2013-06-09 18:35:19
|
Revision: 356 http://sourceforge.net/p/simspark/svn/356 Author: hedayat Date: 2013-06-09 18:35:13 +0000 (Sun, 09 Jun 2013) Log Message: ----------- Merge (except renderserver.cpp) with trunk Modified Paths: -------------- branches/gui-bullet/rcssserver3d/CMakeLists.txt branches/gui-bullet/rcssserver3d/ChangeLog branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoarm.rsg branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoleg.rsg branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg branches/gui-bullet/rcssserver3d/plugin/soccer/CMakeLists.txt branches/gui-bullet/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.h branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate_c.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/agentstateperceptor/agentstateperceptor.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/ball/ball.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/beameffector/beameffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/catcheffector/catcheffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/createeffector/createeffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/driveeffector/driveeffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/export.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h branches/gui-bullet/rcssserver3d/plugin/soccer/gametimeperceptor/gametimeperceptor.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/initeffector/initeffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/initeffector/singlematiniteffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/initeffector/staticmeshiniteffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/internalsoccermonitor/internalsoccerinput.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/internalsoccermonitor/internalsoccerrender.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/kickeffector/kickeffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/pantilteffector/pantilteffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h branches/gui-bullet/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor_c.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/sayeffector/sayeffector.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/sexpmonitor/sexpmonitor.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/soccerbase/soccerbase.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/soccercontrolaspect/soccercontrolaspect.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/soccernode/soccernode.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h branches/gui-bullet/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/visionperceptor/visionperceptor.cpp branches/gui-bullet/rcssserver3d/plugin/soccermonitor/soccerinput.cpp branches/gui-bullet/rcssserver3d/plugin/soccermonitor/soccerinputlogplayer.cpp branches/gui-bullet/rcssserver3d/plugin/soccermonitor/soccerrender.cpp branches/gui-bullet/rcssserver3d/rcssagent3d/hoap2behavior.cpp branches/gui-bullet/rcssserver3d/rcssagent3d/naobehavior.cpp branches/gui-bullet/rcssserver3d/rcssagent3d/soccerbehavior.cpp branches/gui-bullet/rcssserver3d/rcssagent3d/soccerbotbehavior.cpp branches/gui-bullet/rcssserver3d/rcssmonitor3d/CMakeLists.txt branches/gui-bullet/rcssserver3d/rcssserver3d/CMakeLists.txt branches/gui-bullet/rcssserver3d/rcssserver3d/naosoccersim.rb branches/gui-bullet/spark/CMakeLists.txt branches/gui-bullet/spark/ChangeLog branches/gui-bullet/spark/lib/kerosin/fontserver/glyph.cpp branches/gui-bullet/spark/lib/kerosin/imageserver/imageserver.cpp branches/gui-bullet/spark/lib/kerosin/inputserver/inputcontrol.cpp branches/gui-bullet/spark/lib/kerosin/inputserver/inputserver.cpp branches/gui-bullet/spark/lib/kerosin/materialserver/material2dtexture.cpp branches/gui-bullet/spark/lib/kerosin/materialserver/materialserver.cpp branches/gui-bullet/spark/lib/kerosin/openglserver/openglserver.cpp branches/gui-bullet/spark/lib/kerosin/renderserver/rendercontrol.cpp branches/gui-bullet/spark/lib/kerosin/renderserver/renderserver.cpp branches/gui-bullet/spark/lib/kerosin/sceneserver/singlematnode.cpp branches/gui-bullet/spark/lib/kerosin/sceneserver/staticmesh.cpp branches/gui-bullet/spark/lib/kerosin/soundserver/soundserver.cpp branches/gui-bullet/spark/lib/oxygen/agentaspect/agentaspect.cpp branches/gui-bullet/spark/lib/oxygen/agentaspect/effector.cpp branches/gui-bullet/spark/lib/oxygen/controlaspect/controlaspect.cpp branches/gui-bullet/spark/lib/oxygen/gamecontrolserver/gamecontrolserver.cpp branches/gui-bullet/spark/lib/oxygen/geometryserver/geometryserver.cpp branches/gui-bullet/spark/lib/oxygen/geometryserver/indexbuffer.cpp branches/gui-bullet/spark/lib/oxygen/monitorserver/monitorserver.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/angularmotor.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/balljoint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/body.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/bodycontroller.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/boxcollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/capsulecollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/collider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/collisionhandler.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/compoundcollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/concavecollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/conecollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/conetwistjoint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/contactjointhandler.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/convexcollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/cylindercollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/dynamicbody.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/emptycollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/fixedjoint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/hinge2joint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/hingejoint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/joint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/physicsobject.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/physicsserver.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/planecollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/raycollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/rigidbody.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/sliderjoint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/softbody.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/space.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/spherecollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/staticbody.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/transformcollider.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/universaljoint.cpp branches/gui-bullet/spark/lib/oxygen/physicsserver/world.cpp branches/gui-bullet/spark/lib/oxygen/sceneserver/basenode.cpp branches/gui-bullet/spark/lib/oxygen/sceneserver/fpscontroller.cpp branches/gui-bullet/spark/lib/oxygen/sceneserver/sceneserver.cpp branches/gui-bullet/spark/lib/oxygen/sceneserver/transform.cpp branches/gui-bullet/spark/lib/oxygen/simulationserver/simcontrolnode.cpp branches/gui-bullet/spark/lib/oxygen/simulationserver/simulationserver.cpp branches/gui-bullet/spark/lib/oxygen/spadesserver/spadesserver.cpp branches/gui-bullet/spark/lib/zeitgeist/class.cpp branches/gui-bullet/spark/lib/zeitgeist/core.cpp branches/gui-bullet/spark/lib/zeitgeist/core.h branches/gui-bullet/spark/lib/zeitgeist/corecontext.cpp branches/gui-bullet/spark/lib/zeitgeist/fileserver/fileserver.cpp branches/gui-bullet/spark/lib/zeitgeist/leaf.cpp branches/gui-bullet/spark/lib/zeitgeist/leaf.h branches/gui-bullet/spark/lib/zeitgeist/node.cpp branches/gui-bullet/spark/lib/zeitgeist/node.h branches/gui-bullet/spark/plugin/accelerometer/accelerometer.cpp branches/gui-bullet/spark/plugin/collisionperceptor/forceresistanceperceptor.cpp branches/gui-bullet/spark/plugin/collisionperceptor/perceptorhandler.cpp branches/gui-bullet/spark/plugin/collisionperceptor/touchperceptorhandler.cpp branches/gui-bullet/spark/plugin/filesystemrar/filesystemrar.cpp branches/gui-bullet/spark/plugin/forceeffector/forceeffector.cpp branches/gui-bullet/spark/plugin/gyrorateperceptor/gyrorateperceptor.cpp branches/gui-bullet/spark/plugin/imageperceptor/imageperceptor.cpp branches/gui-bullet/spark/plugin/inputsdl/inputsystemsdl.cpp branches/gui-bullet/spark/plugin/objimporter/objimporter.cpp branches/gui-bullet/spark/plugin/perfectvisionperceptor/perfectvisionperceptor.cpp branches/gui-bullet/spark/plugin/rosimporter/rosimporter.cpp branches/gui-bullet/spark/plugin/rubysceneimporter/rubysceneimporter.cpp branches/gui-bullet/spark/plugin/sceneeffector/sceneaction.h branches/gui-bullet/spark/plugin/sceneeffector/sceneeffector.cpp branches/gui-bullet/spark/plugin/sparkagent/hinge2effector.cpp branches/gui-bullet/spark/plugin/sparkagent/hingeeffector.cpp branches/gui-bullet/spark/plugin/sparkagent/timeperceptor.cpp branches/gui-bullet/spark/plugin/sparkagent/universaljointeffector.cpp branches/gui-bullet/spark/plugin/sparkmonitor/sparkmonitor.cpp branches/gui-bullet/spark/plugin/sparkmonitor/sparkmonitorclient.cpp branches/gui-bullet/spark/plugin/sparkmonitor/sparkmonitorlogfileserver.cpp branches/gui-bullet/spark/spark/spark.cpp branches/gui-bullet/spark/test/coretest/main.cpp branches/gui-bullet/spark/test/fonttest/main.cpp branches/gui-bullet/spark/test/inputtest/main.cpp branches/gui-bullet/spark/test/scenetest/main.cpp branches/gui-bullet/spark/test/scenetest/md5mesh.cpp Added Paths: ----------- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.cpp branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.h branches/gui-bullet/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem_c.cpp branches/gui-bullet/rcssserver3d/rcssserver3d/naorobottypes.rb branches/gui-bullet/spark/doc/papers/2013/ Removed Paths: ------------- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg Property Changed: ---------------- branches/gui-bullet/rcssserver3d/ branches/gui-bullet/spark/ Index: branches/gui-bullet/rcssserver3d =================================================================== --- branches/gui-bullet/rcssserver3d 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d 2013-06-09 18:35:13 UTC (rev 356) Property changes on: branches/gui-bullet/rcssserver3d ___________________________________________________________________ Added: svn:mergeinfo ## -0,0 +1 ## +/trunk/rcssserver3d:329-355 \ No newline at end of property Modified: branches/gui-bullet/rcssserver3d/CMakeLists.txt =================================================================== --- branches/gui-bullet/rcssserver3d/CMakeLists.txt 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/CMakeLists.txt 2013-06-09 18:35:13 UTC (rev 356) @@ -26,7 +26,7 @@ find_package(Spark REQUIRED) find_package(Freetype REQUIRED) -find_package(Boost REQUIRED) +find_package(Boost REQUIRED system) find_package(SDL REQUIRED) find_package(DevIL REQUIRED) find_package(ODE REQUIRED) Modified: branches/gui-bullet/rcssserver3d/ChangeLog =================================================================== --- branches/gui-bullet/rcssserver3d/ChangeLog 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/ChangeLog 2013-06-09 18:35:13 UTC (rev 356) @@ -1,3 +1,50 @@ +2013-06-09 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/gamestateaspect/gamestateaspect.h: + * plugin/soccer/gamestateaspect/gamestateaspect.cpp: + * plugin/soccer/agentstate/agentstate.cpp (AgentState::OnUnlink): + * rcssserver3d/naosoccersim.rb: + - control the number of heterogeneous players each team can use. It limits + both the total number of heterogeneous players of each team + (MaxTotalHeteroCount variable in naosoccersim.rb), and the number of + heterogeneous players of each type (MaxHeteroTypeCount variable) + +2013-06-06 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h: + * plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp: + * plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor_c.cpp: + * data/rsg/agent/nao/naoneckhead.rsg: + - added MyOrientation sensing by Patrick (setSenseMyOrien in rsg file) + +2013-04-25 Hedayat Vatankhah <hed...@gm...> + + * data/rsg/agent/nao/nao_hetero.rsg: + * plugin/soccer/agentstate/agentstate.h: + * plugin/soccer/agentstate/agentstate.cpp: + * plugin/soccer/agentstate/agentstate_c.cpp: + - added robot type to agent state + +2012-11-25 Hedayat Vatankhah <hed...@gm...> + + * data/rsg/agent/nao/nao_hetero.rsg: + - nao_hetero.rsg can be used to create different variants of Nao robot + - nao.rsg a compatbility scene to create default Nao type (type 0) + + * rcssserver3d/naorobottypes.rb: + * rcssserver3d/naosoccersim.rb: + * rcssserver3d/CMakeLists.txt: + - added naorobottypes.rb to initialize Nao heterogeneous robot parameters + +2012-06-21 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp: + - let a player kick the ball more than once in kickoff if there are not + more than 2 players inside the game. Should be removed when a proper + "Penalty mode" is added to the simulator + - small cleanup: call SoccerBase::GetGameControlServer() to access + game control server + 2012-05-23 Hedayat Vatankhah <hed...@gm...> * NEWS: Modified: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -6,14 +6,9 @@ $Path_Body1 $Path_Body2 $Anchor_X $Anchor_Y $Anchor_Z $Axis_X $Axis_Y $Axis_Z - $Min $Max + $MinDeg $MaxDeg + $MaxAbsSpeed ) - - (def $PI 3.14159265) - ;(def $MinDeg (eval $Min * (eval 180.0 / $PI))) - ;(def $MaxDeg (eval $Max * (eval 180.0 / $PI))) - (def $MinDeg $Min) - (def $MaxDeg $Max) ; There are 2 types of motor installed on the real Nao, each type has ; 2 types of "Reduction ratio". @@ -23,7 +18,7 @@ ; We don't need to follow them totally that different hingeeffector is using ; different types of motor. ; All the hingeeffector uses the 351.77 - (def $MaxAbsSpeed (eval $PI * (eval 351.77 / 180.0))) + ; (def $MaxAbsSpeed (eval $PI * (eval 351.77 / 180.0))) ; ;Hinge Joint Parameters Deleted: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -1,138 +0,0 @@ -; -*- mode: lisp; -*- - -; -; nao robot description file. -; - -(RSG 0 1) -( - -; -; The torso parameters -; - -(def $TorsoLength 0.1) -(def $TorsoWidth 0.1) -(def $TorsoHeight 0.18) -(def $TorsoMass 1.2171) - -(def $TorsoInitX 0) -(def $TorsoInitY -1) -(def $TorsoInitZ 1.5) - -(def $loadObj (eval Nao.UseTexture)) -; -;Begin Construct of Nao -; -(nd Space - (setName spacenao) - (disableInnerCollision true) - - ; - ;The torso part - ; - (nd AgentAspect - (setName body) - (setLocalPos $TorsoInitX $TorsoInitY $TorsoInitZ) - - (switch $loadObj - (true - (nd Transform - (setLocalRotation -90 0 180) - (nd StaticMesh - (load 'models/naobody.obj') - (setScale $TorsoLength $TorsoLength $TorsoLength) - ) - ) - ) - - (false - (importScene rsg/agent/nao/box_appearance.rsg $TorsoLength $TorsoWidth $TorsoHeight matGrey) - ) - ) - - ;(importScene rsg/agent/nao/box_physics.rsg $TorsoLength $TorsoWidth $TorsoHeight $TorsoMass) - (importScene rsg/agent/nao/box_physics_nocollider.rsg $TorsoLength $TorsoWidth $TorsoHeight $TorsoMass) - (nd BoxCollider - (setName TorsoCollider) - (setBoxLengths $TorsoLength $TorsoWidth $TorsoHeight) - (importScene rsg/agent/nao/contactjointhandler.rsg) - ) - - ;Install effectors and perceptors - (nd StaticMeshInitEffector) - - (nd TimePerceptor) - - (nd AgentState - (setName AgentState) - (nd GameStatePerceptor) - (nd HearPerceptor) - (nd Transform - (nd Cylinder - (setName SelectionMarker) - (setParams 1.0 1.0) - (setScale 0.2 0.2 0.02) - (setMaterial matSelect) - (setTransparent) - ) - ) - ) - - (nd GyroRatePerceptor (setName torso)) - (nd Accelerometer (setName torso)) - - ;(nd HMDPPerceptor) - ;(nd HMDPEffector) - - (nd BeamEffector) - - (nd SayEffector) - - ;(nd VisionPerceptor - ; (setSenseMyPos false) - ; (setStaticSenseAxis false) - ; (addNoise false)) - - (nd AgentSyncEffector) - - );end of AgentAspect - - - ; - ;The neck and head part - ; - (importScene rsg/agent/nao/naoneckhead.rsg $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) - - - ; - ;The Right Arm - ; - (importScene rsg/agent/nao/naoarm.rsg - 1 r - $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) - - ; - ;The Left Arm - ; - (importScene rsg/agent/nao/naoarm.rsg - -1 l - $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) - - ; - ;The Right Leg - ; - (importScene rsg/agent/nao/naoleg.rsg - 1 r - $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) - - ; - ;The Left Leg - ; - (importScene rsg/agent/nao/naoleg.rsg - -1 l - $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) - -);end of nd Space - -);end of RSG 0 1 Copied: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg (from rev 355, trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg) =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg (rev 0) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -0,0 +1,7 @@ +; -*- mode: lisp; -*- + +(RSG 0 1) +( + (importScene rsg/agent/nao/nao_hetero.rsg 0) +) + \ No newline at end of file Copied: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg (from rev 355, trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg) =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg (rev 0) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -0,0 +1,149 @@ +; -*- mode: lisp; -*- + +; +; nao robot description file. +; + +(RSG 0 1) +( + +(templ $type) + +; +; The torso parameters +; + +;(def $TorsoLength (eval "NaoType["$type"]['tl']")) + +(def $TorsoLength 0.1) +(def $TorsoWidth 0.1) +(def $TorsoHeight 0.18) +(def $TorsoMass 1.2171) + +(def $TorsoInitX 0) +(def $TorsoInitY -1) +(def $TorsoInitZ 1.5) + +(def $loadObj (eval Nao.UseTexture)) +; +;Begin Construct of Nao +; +(nd Space + (setName spacenao) + (disableInnerCollision true) + + ; + ;The torso part + ; + (nd AgentAspect + (setName body) + (setLocalPos $TorsoInitX $TorsoInitY $TorsoInitZ) + + (switch $loadObj + (true + (nd Transform + (setLocalRotation -90 0 180) + (nd StaticMesh + (load 'models/naobody.obj') + (setScale $TorsoLength $TorsoLength $TorsoLength) + ) + ) + ) + + (false + (importScene rsg/agent/nao/box_appearance.rsg $TorsoLength $TorsoWidth $TorsoHeight matGrey) + ) + ) + + ;(importScene rsg/agent/nao/box_physics.rsg $TorsoLength $TorsoWidth $TorsoHeight $TorsoMass) + (importScene rsg/agent/nao/box_physics_nocollider.rsg $TorsoLength $TorsoWidth $TorsoHeight $TorsoMass) + (nd BoxCollider + (setName TorsoCollider) + (setBoxLengths $TorsoLength $TorsoWidth $TorsoHeight) + (importScene rsg/agent/nao/contactjointhandler.rsg) + ) + + ;Install effectors and perceptors + (nd StaticMeshInitEffector) + + (nd TimePerceptor) + + (nd AgentState + (setName AgentState) + (setRobotType $type) + (nd GameStatePerceptor) + (nd HearPerceptor) + (nd Transform + (nd Cylinder + (setName SelectionMarker) + (setParams 1.0 1.0) + (setScale 0.2 0.2 0.02) + (setMaterial matSelect) + (setTransparent) + ) + ) + ) + + (nd GyroRatePerceptor (setName torso)) + (nd Accelerometer (setName torso)) + + ;(nd HMDPPerceptor) + ;(nd HMDPEffector) + + (nd BeamEffector) + + (nd SayEffector) + + ;(nd VisionPerceptor + ; (setSenseMyPos false) + ; (setStaticSenseAxis false) + ; (addNoise false)) + + (nd AgentSyncEffector) + + );end of AgentAspect + + + ; + ;The neck and head part + ; + (importScene rsg/agent/nao/naoneckhead.rsg + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) + + + ; + ;The Right Arm + ; + (importScene rsg/agent/nao/naoarm.rsg + 1 r + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) + + ; + ;The Left Arm + ; + (importScene rsg/agent/nao/naoarm.rsg + -1 l + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) + + ; + ;The Right Leg + ; + (importScene rsg/agent/nao/naoleg.rsg + 1 r + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) + + ; + ;The Left Leg + ; + (importScene rsg/agent/nao/naoleg.rsg + -1 l + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) + +);end of nd Space + +);end of RSG 0 1 Modified: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoarm.rsg =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoarm.rsg 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoarm.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -8,6 +8,7 @@ ; (templ $LRFactor $LeftOrRight $Torso_X $Torso_Y $Torso_Z $loadObj + $type ) ; @@ -45,7 +46,8 @@ (def $UpperarmRelShoulderZ 0) (def $ElbowRelUpperArm_X (eval $LRFactor * -0.01)) - (def $ElbowRelUpperArm_Y 0.07) + ;(def $ElbowRelUpperArm_Y 0.07) + (def $ElbowRelUpperArm_Y (eval "NaoType["$type"]['ElbowRelUpperArm_Y']")) (def $ElbowRelUpperArm_Z 0.009) (def $LowerarmRelElbow_X 0) @@ -91,8 +93,12 @@ ; ;Joint Parameters ; + (def $PI 3.14159265) + (def $MaxAbsJointSpeed (eval $PI * (eval 351.77 / 180.0))) + (def $aj1_min -120) (def $aj1_max 120) + (def $aj1_max_abs_speed $MaxAbsJointSpeed) (def $right_aj2_min -95) (def $left_aj2_min -1) @@ -105,9 +111,11 @@ (def $aj2_max_c1 (eval (eval $right_aj2_max + $left_aj2_max) * 0.5)) (def $aj2_max_c2 (eval (eval $right_aj2_max - $left_aj2_max) * 0.5)) (def $aj2_max (eval $aj2_max_c1 + (eval $LRFactor * $aj2_max_c2))) + (def $aj2_max_abs_speed $MaxAbsJointSpeed) (def $aj3_min -120) (def $aj3_max 120) + (def $aj3_max_abs_speed $MaxAbsJointSpeed) (def $right_aj4_min -1) (def $left_aj4_min -90) @@ -120,6 +128,7 @@ (def $aj4_max_c1 (eval (eval $right_aj4_max + $left_aj4_max) * 0.5)) (def $aj4_max_c2 (eval (eval $right_aj4_max - $left_aj4_max) * 0.5)) (def $aj4_max (eval $aj4_max_c1 + (eval $LRFactor * $aj4_max_c2))) + (def $aj4_max_abs_speed $MaxAbsJointSpeed) (def $aj2_Anchor_X (eval -1 * $UpperarmRelShoulderX)) @@ -152,7 +161,8 @@ ../sphereBody ../../body/boxBody 0 0 0 1 0 0 ;1 -1 -1 - $aj1_min $aj1_max) + $aj1_min $aj1_max + $aj1_max_abs_speed) ) ; @@ -175,11 +185,12 @@ (importScene rsg/agent/nao/box_physics.rsg $UpperArmSizeX $UpperArmSizeY $UpperArmSizeZ $UpperArmMass) (importScene rsg/agent/nao/hingejoint.rsg - $Joint2PerName $Joint2EffName - ../boxBody $ShoulderBodyPath - $aj2_Anchor_X $aj2_Anchor_Y $aj2_Anchor_Z - 0 0 1 ;2 -1 -1 - $aj2_min $aj2_max) + $Joint2PerName $Joint2EffName + ../boxBody $ShoulderBodyPath + $aj2_Anchor_X $aj2_Anchor_Y $aj2_Anchor_Z + 0 0 1 ;2 -1 -1 + $aj2_min $aj2_max + $aj2_max_abs_speed) ) ; @@ -195,11 +206,12 @@ (importScene rsg/agent/nao/sphere_physics_nocollider.rsg $ElbowRadius $ElbowMass) (importScene rsg/agent/nao/hingejoint.rsg - $Joint3PerName $Joint3EffName - ../sphereBody $UpperarmBodyPath - 0 0 0 - 0 1 0 ;1 -1 -1 - $aj3_min $aj3_max) + $Joint3PerName $Joint3EffName + ../sphereBody $UpperarmBodyPath + 0 0 0 + 0 1 0 ;1 -1 -1 + $aj3_min $aj3_max + $aj3_max_abs_speed) ) ; @@ -221,11 +233,12 @@ (importScene rsg/agent/nao/box_physics.rsg $LowerArmSizeX $LowerArmSizeY $LowerArmSizeZ $LowerArmMass) (importScene rsg/agent/nao/hingejoint.rsg - $Joint4PerName $Joint4EffName - ../boxBody $ElbowBodyPath - $aj4_Anchor_X $aj4_Anchor_Y $aj4_Anchor_Z - 0 0 1 ;2 -1 -1 - $aj4_min $aj4_max) + $Joint4PerName $Joint4EffName + ../boxBody $ElbowBodyPath + $aj4_Anchor_X $aj4_Anchor_Y $aj4_Anchor_Z + 0 0 1 ;2 -1 -1 + $aj4_min $aj4_max + $aj4_max_abs_speed) (nd ObjectState (setID $LowerarmName) Modified: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoleg.rsg =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoleg.rsg 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoleg.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -8,6 +8,7 @@ ; (templ $LRFactor $LeftOrRight $Torso_X $Torso_Y $Torso_Z $loadObj + $type ) ; @@ -56,7 +57,8 @@ (def $ThighRelHip2_X 0) (def $ThighRelHip2_Y 0.01) - (def $ThighRelHip2_Z -0.04) + ;(def $ThighRelHip2_Z -0.04) + (def $ThighRelHip2_Z (eval "NaoType["$type"]['ThighRelHip2_Z']")) (def $ShankRelThigh_X 0) (def $ShankRelThigh_Y 0.005) @@ -64,7 +66,8 @@ (def $AnkleRelShank_X 0) (def $AnkleRelShank_Y -0.01) - (def $AnkleRelShank_Z -0.055) + ;(def $AnkleRelShank_Z -0.055) + (def $AnkleRelShank_Z (eval "NaoType["$type"]['AnkleRelShank_Z']")) (def $FootRelAnkle_X 0) (def $FootRelAnkle_Y 0.03) @@ -125,8 +128,12 @@ ; ;Joint Parameters ; + (def $PI 3.14159265) + (def $MaxAbsJointSpeed (eval $PI * (eval 351.77 / 180.0))) + (def $lj1_min -90) (def $lj1_max 1) + (def $lj1_max_abs_speed $MaxAbsJointSpeed) (def $right_lj2_min -45) (def $left_lj2_min -25) @@ -139,15 +146,19 @@ (def $lj2_max_c1 (eval (eval $right_lj2_max + $left_lj2_max) * 0.5)) (def $lj2_max_c2 (eval (eval $right_lj2_max - $left_lj2_max) * 0.5)) (def $lj2_max (eval $lj2_max_c1 + (eval $LRFactor * $lj2_max_c2))) + (def $lj2_max_abs_speed $MaxAbsJointSpeed) (def $lj3_min -25) (def $lj3_max 100) + (def $lj3_max_abs_speed $MaxAbsJointSpeed) (def $lj4_min -130) (def $lj4_max 1) + (def $lj4_max_abs_speed $MaxAbsJointSpeed) (def $lj5_min -45) (def $lj5_max 75) + (def $lj5_max_abs_speed (eval "NaoType["$type"]['lj5_max_abs_speed']")) (def $right_lj6_min -25) (def $left_lj6_min -45) @@ -160,6 +171,7 @@ (def $lj6_max_c1 (eval (eval $right_lj6_max + $left_lj6_max) * 0.5)) (def $lj6_max_c2 (eval (eval $right_lj6_max - $left_lj6_max) * 0.5)) (def $lj6_max (eval $lj6_max_c1 + (eval $LRFactor * $lj6_max_c2))) + (def $lj6_max_abs_speed (eval "NaoType["$type"]['lj6_max_abs_speed']")) (def $lj1_axis_x -0.7071) (def $lj1_axis_y 0) @@ -193,7 +205,8 @@ ../sphereBody ../../body/boxBody 0 0 0 $lj1_axis_x $lj1_axis_y $lj1_axis_z - $lj1_min $lj1_max) + $lj1_min $lj1_max + $lj1_max_abs_speed) ) ; @@ -212,7 +225,8 @@ ../sphereBody $Hip1BodyPath 0 0 0 ;anchor 0 1 0 ;axis - $lj2_min $lj2_max) + $lj2_min $lj2_max + $lj2_max_abs_speed) ) ; @@ -243,11 +257,12 @@ (importScene rsg/agent/nao/hingejoint.rsg - $Joint3PerName $Joint3EffName - ../boxBody $Hip2BodyPath - $lj3_Anchor_X $lj3_Anchor_Y $lj3_Anchor_Z - 1 0 0 ;1 -1 -1 - $lj3_min $lj3_max) + $Joint3PerName $Joint3EffName + ../boxBody $Hip2BodyPath + $lj3_Anchor_X $lj3_Anchor_Y $lj3_Anchor_Z + 1 0 0 ;1 -1 -1 + $lj3_min $lj3_max + $lj3_max_abs_speed) ) @@ -277,11 +292,12 @@ ) (importScene rsg/agent/nao/hingejoint.rsg - $Joint4PerName $Joint4EffName - ../boxBody $ThighBodyPath - 0 -0.01 0.045 - 1 0 0 ;0 -1 -1 - $lj4_min $lj4_max) + $Joint4PerName $Joint4EffName + ../boxBody $ThighBodyPath + 0 -0.01 0.045 + 1 0 0 ;0 -1 -1 + $lj4_min $lj4_max + $lj4_max_abs_speed) ) @@ -301,7 +317,8 @@ ../sphereBody $ShankBodyPath 0 0 0 1 0 0 ;0 -1 -1 - $lj5_min $lj5_max) + $lj5_min $lj5_max + $lj5_max_abs_speed) ) @@ -336,11 +353,12 @@ ) (importScene rsg/agent/nao/hingejoint.rsg - $Joint6PerName $Joint6EffName - ../boxBody $AnkleBodyPath - 0 -0.03 0.035 - 0 1 0 ;1 -1 -1 - $lj6_min $lj6_max) + $Joint6PerName $Joint6EffName + ../boxBody $AnkleBodyPath + 0 -0.03 0.035 + 0 1 0 ;1 -1 -1 + $lj6_min $lj6_max + $lj6_max_abs_speed) (nd ObjectState (setID $FootName) Modified: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -2,7 +2,9 @@ (RSG 0 1) ( - (templ $Torso_X $Torso_Y $Torso_Z $loadObj) + (templ $Torso_X $Torso_Y $Torso_Z $loadObj + $type + ) ; ;neck parameter @@ -27,14 +29,19 @@ ; ;Head effector 1 parameter ; + (def $PI 3.14159265) + (def $MaxAbsJointSpeed (eval $PI * (eval 351.77 / 180.0))) + (def $he1_min -120) (def $he1_max 120) + (def $he1_max_abs_speed $MaxAbsJointSpeed) ; ;Head effector 2 parameter ; (def $he2_min -45) (def $he2_max 45) + (def $he2_max_abs_speed $MaxAbsJointSpeed) ; ;Begin construct neck @@ -51,7 +58,8 @@ ../capsuleBody ../../body/boxBody 0 0 0 0 0 1 - $he1_min $he1_max) + $he1_min $he1_max + $he1_max_abs_speed) ) ; @@ -84,11 +92,13 @@ ;../boxBody ../../body/boxBody 0 0 -0.005 1 0 0 - $he2_min $he2_max) + $he2_min $he2_max + $he2_max_abs_speed) (nd RestrictedVisionPerceptor (setViewCones 120 120) (setSenseMyPos false) + (setSenseMyOrien false) (setSenseBallPos false) (setStaticSenseAxis false) (addNoise true) Modified: branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg =================================================================== --- branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg 2013-06-09 18:35:13 UTC (rev 356) @@ -9,6 +9,7 @@ $Axis2_X $Axis2_Y $Axis2_Z $Min0 $Max0 $Min1 $Max1 + $MaxAbsSpeed ) (def $PI 3.14159265) @@ -26,7 +27,6 @@ (def $Stop_ERP 0.8) (def $FudgeFactor 1e-5) (def $Bounce 1) - (def $MaxAbsSpeed (eval $PI * (eval 351.77 / 180.0))) (nd UniversalJoint (attach $Path_Body1 $Path_Body2) Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/CMakeLists.txt =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/CMakeLists.txt 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/CMakeLists.txt 2013-06-09 18:35:13 UTC (rev 356) @@ -37,6 +37,7 @@ soccercontrolaspect/soccercontrolaspect.h soccernode/soccernode.h soccerruleaspect/soccerruleaspect.h + soccerruleaspect/soccerruleitem.h trainercommandparser/trainercommandparser.h gametimeperceptor/gametimeperceptor.h visionperceptor/visionperceptor.h @@ -106,6 +107,8 @@ soccernode/soccernode_c.cpp soccerruleaspect/soccerruleaspect.cpp soccerruleaspect/soccerruleaspect_c.cpp + soccerruleaspect/soccerruleitem.cpp + soccerruleaspect/soccerruleitem_c.cpp trainercommandparser/trainercommandparser.cpp trainercommandparser/trainercommandparser_c.cpp visionperceptor/visionperceptor.cpp Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/agentcollisionhandler/agentcollisionhandler.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -56,5 +56,5 @@ return boost::shared_ptr<AgentState>(); } - return boost::shared_static_cast<AgentState>(agentAspect->FindChildSupportingClass<AgentState>(true)); + return boost::static_pointer_cast<AgentState>(agentAspect->FindChildSupportingClass<AgentState>(true)); } Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -76,6 +76,18 @@ } void +AgentState::SetRobotType(int type) +{ + mRobotType = type; +} + +int +AgentState::GetRobotType() const +{ + return mRobotType; +} + +void AgentState::SetID(const std::string& id, TPerceptType pt) { std::istringstream iss(id); @@ -217,7 +229,7 @@ void AgentState::UpdateHierarchyInternal() { - boost::shared_ptr<RenderNode> node = boost::shared_dynamic_cast<RenderNode>(GetChild("SelectionMarker", true)); + boost::shared_ptr<RenderNode> node = boost::dynamic_pointer_cast<RenderNode>(GetChild("SelectionMarker", true)); if (!node) { GetLog()->Error() << "ERROR: (AgentState::UpdateHierarchyInternal) could not find selection marker\n"; @@ -238,8 +250,9 @@ GetLog()->Error() << "ERROR: (AgentState::OnUnlink) could not get game state\n"; return; } - - game_state->ReturnUniform(GetTeamIndex(), GetUniformNumber()); + + game_state->ReturnUniform(GetTeamIndex(), GetUniformNumber(), + GetRobotType()); } bool Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.h =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.h 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate.h 2013-06-09 18:35:13 UTC (rev 356) @@ -59,6 +59,12 @@ /** returns the uniform number as integer */ int GetUniformNumber() const; + /** Set the robot type. */ + void SetRobotType(int type); + + /** returns the robot type */ + int GetRobotType() const; + /** Set the object id for perceptors. * * This method is the same as SetUniformNumber for AgentState. @@ -97,25 +103,25 @@ /** Whether agent is selected */ bool IsSelected() const; - + /** Select agent */ void Select(bool s = true); - + /** Unselect agent */ void UnSelect(); - + /** Backup old touch group and create new empty one */ void NewTouchGroup(); - + /** Get the touch group of the previous step */ boost::shared_ptr<TouchGroup> GetOldTouchGroup(); - + /** Get the current touch group */ boost::shared_ptr<TouchGroup> GetTouchGroup(); - + /** Set the current touch group */ void SetTouchGroup(boost::shared_ptr<TouchGroup> group); - + protected: /** team index */ TTeamIndex mTeamIndex; @@ -123,6 +129,9 @@ /** uniform number */ int mUniformNumber; + /** robot type */ + int mRobotType; + /** motor temperature */ float mTemperature; @@ -161,7 +170,7 @@ /** is this agent selected */ bool mSelected; - + boost::shared_ptr<TouchGroup> mOldTouchGroup; boost::shared_ptr<TouchGroup> mTouchGroup; Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate_c.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate_c.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/agentstate/agentstate_c.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -25,8 +25,25 @@ using namespace boost; using namespace oxygen; +FUNCTION(AgentState,setRobotType) +{ + int inType; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in.begin(), inType)) + ) + { + return false; + } + + obj->SetRobotType(inType); + return true; +} + void CLASS(AgentState)::DefineClass() { DEFINE_BASECLASS(ObjectState); + DEFINE_FUNCTION(setRobotType); } Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/agentstateperceptor/agentstateperceptor.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/agentstateperceptor/agentstateperceptor.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/agentstateperceptor/agentstateperceptor.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -61,7 +61,7 @@ predicate.parameter.Clear(); boost::shared_ptr<BaseNode> parent = - shared_dynamic_cast<BaseNode>(GetParent().lock()); + dynamic_pointer_cast<BaseNode>(GetParent().lock()); if (parent.get() == 0) { Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/ball/ball.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/ball/ball.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/ball/ball.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -46,7 +46,7 @@ if (mBody.get() == 0) { - mBody = shared_dynamic_cast<RigidBody>(GetChildOfClass("RigidBody")); + mBody = dynamic_pointer_cast<RigidBody>(GetChildOfClass("RigidBody")); } } @@ -60,7 +60,7 @@ // mBallStateAspect during OnLink if (mBallStateAspect.get() == 0) { - mBallStateAspect = shared_dynamic_cast<BallStateAspect> + mBallStateAspect = dynamic_pointer_cast<BallStateAspect> (GetCore()->Get("/sys/server/gamecontrol/BallStateAspect")); if (mBallStateAspect.get() == 0) return; } Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -74,7 +74,7 @@ if (agents.size() > 0) { - mLastCollidingAgent = shared_static_cast<AgentAspect> + mLastCollidingAgent = static_pointer_cast<AgentAspect> (agents.front().lock()); mLastAgentCollisionTime = mGameState->GetTime(); Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/beameffector/beameffector.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/beameffector/beameffector.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/beameffector/beameffector.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -61,7 +61,7 @@ } boost::shared_ptr<BeamAction> beamAction = - shared_dynamic_cast<BeamAction>(mAction); + dynamic_pointer_cast<BeamAction>(mAction); mAction.reset(); Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/catcheffector/catcheffector.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/catcheffector/catcheffector.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/catcheffector/catcheffector.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -83,7 +83,7 @@ } boost::shared_ptr<CatchAction> catchAction = - shared_dynamic_cast<CatchAction>(mAction); + dynamic_pointer_cast<CatchAction>(mAction); mAction.reset(); if (catchAction.get() == 0) { @@ -177,7 +177,7 @@ SoccerBase::GetSoccerRuleAspect(*this,mSoccerRule); - mAgent = shared_dynamic_cast<AgentAspect>(GetParent().lock()); + mAgent = dynamic_pointer_cast<AgentAspect>(GetParent().lock()); if (mAgent.get() == 0) { @@ -188,7 +188,7 @@ } boost::shared_ptr<SphereCollider> geom = - shared_dynamic_cast<SphereCollider>(mAgent->GetChild("geometry")); + dynamic_pointer_cast<SphereCollider>(mAgent->GetChild("geometry")); if (geom.get() == 0) { GetLog()->Error() Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/createeffector/createeffector.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/createeffector/createeffector.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/createeffector/createeffector.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -42,7 +42,7 @@ return; boost::shared_ptr<CreateAction> createAction = - shared_dynamic_cast<CreateAction>(mAction); + dynamic_pointer_cast<CreateAction>(mAction); mAction.reset(); if (createAction.get() == 0) { Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/driveeffector/driveeffector.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/driveeffector/driveeffector.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/driveeffector/driveeffector.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -50,7 +50,7 @@ } boost::shared_ptr<BaseNode> parent = - shared_dynamic_cast<BaseNode>(GetParent().lock()); + dynamic_pointer_cast<BaseNode>(GetParent().lock()); if (parent.get() == 0) { @@ -59,7 +59,7 @@ return false; } - boost::shared_ptr<DriveAction> driveAction = shared_dynamic_cast<DriveAction>(action); + boost::shared_ptr<DriveAction> driveAction = dynamic_pointer_cast<DriveAction>(action); if (driveAction.get() == 0) { @@ -117,7 +117,7 @@ SoccerBase::GetAgentState(*this,mAgentState); boost::shared_ptr<SphereCollider> geom = - shared_dynamic_cast<SphereCollider>(mTransformParent->GetChild("geometry")); + dynamic_pointer_cast<SphereCollider>(mTransformParent->GetChild("geometry")); mMaxDistance = 0.001; if (geom.get() == 0) Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/export.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/export.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/export.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -36,6 +36,7 @@ #include "gamestateaspect/gamestateitem.h" #include "ballstateaspect/ballstateaspect.h" #include "soccerruleaspect/soccerruleaspect.h" +#include "soccerruleaspect/soccerruleitem.h" #include "agentstate/agentstate.h" #include "sexpmonitor/sexpmonitor.h" #include "internalsoccermonitor/internalsoccerrender.h" @@ -63,6 +64,7 @@ ZEITGEIST_EXPORT(GameStateItem); ZEITGEIST_EXPORT(BallStateAspect); ZEITGEIST_EXPORT(SoccerRuleAspect); + ZEITGEIST_EXPORT(SoccerRuleItem); ZEITGEIST_EXPORT(BeamEffector); ZEITGEIST_EXPORT(CatchEffector); ZEITGEIST_EXPORT(CreateEffector); Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -38,14 +38,21 @@ mFupTime = 0; mLastModeChange = 0; mGameHalf = GH_FIRST; + mRobotTypeCount[0].push_back(0); // add count for type 0 (default type) + mRobotTypeCount[1].push_back(0); + mHeteroCount[0] = 0; + mHeteroCount[1] = 0; mScore[0] = 0; mScore[1] = 0; mLastKickOffGameHalf = GH_NONE; mNextHalfKickOff = TI_NONE; mLeftInit = Vector3f(0,0,0); mRightInit = Vector3f(0,0,0); + mAgentRadius = 3.5; mFinished = false; mGamePaused = true; + mMaxHeteroTypeCount = 3; + mMaxTotalHeteroCount = 9; } GameStateAspect::~GameStateAspect() @@ -266,6 +273,82 @@ } bool +GameStateAspect::InsertRobotType(TTeamIndex idx, int type) +{ + int i; + + switch (idx) + { + case TI_LEFT: + i = 0; + break; + case TI_RIGHT: + i = 1; + break; + default: + return false; + } + + if (type) // heterogeneous player + { + if (mHeteroCount[i] == mMaxTotalHeteroCount) + { + GetLog()->Error() + << "ERROR: (GameStateAspect::InsertRobotType) Hetero player" + " count limit reached.\n"; + return false; + } + + ++mHeteroCount[i]; + + if (mRobotTypeCount[i].size() <= type) + mRobotTypeCount[i].resize(type+1); + + if (mRobotTypeCount[i][type] == mMaxHeteroTypeCount) + { + GetLog()->Error() + << "ERROR: (GameStateAspect::InsertRobotType) No more robots " + "of type " << type << " are allowed.\n"; + return false; + } + } + + ++mRobotTypeCount[i][type]; + + return true; +} + +bool +GameStateAspect::EraseRobotType(TTeamIndex idx, int type) +{ + int i; + + switch (idx) + { + case TI_LEFT: + i = 0; + break; + case TI_RIGHT: + i = 1; + break; + default: + return false; + } + + if (mRobotTypeCount[i].size() <= type || !mRobotTypeCount[i][type]) + { + return false; + } + + if (type) // heterogeneous player + --mHeteroCount[i]; + + --mRobotTypeCount[i][type]; + + return true; +} + +bool GameStateAspect::RequestUniform(boost::shared_ptr<AgentState> agentState, std::string teamName, unsigned int unum) { @@ -297,6 +380,15 @@ return false; } + if (!InsertRobotType(idx, agentState->GetRobotType())) + { + GetLog()->Error() + << "ERROR: (GameStateAspect::RequestUniform) cannot insert robot" + " of type " << agentState->GetRobotType() << " to team " + << teamName << "\n"; + return false; + } + agentState->SetUniformNumber(unum); agentState->SetTeamIndex(idx); //agentState->SetPerceptName(teamName, ObjectState::PT_Default); @@ -311,7 +403,7 @@ } bool -GameStateAspect::ReturnUniform(TTeamIndex ti, unsigned int unum) +GameStateAspect::ReturnUniform(TTeamIndex ti, unsigned int unum, int type) { if (! EraseUnum(ti,unum)) { @@ -321,6 +413,14 @@ return false; } + if (!EraseRobotType(ti, type)) + { + GetLog()->Error() + << "ERROR: (GameStateAspect::ReturnUniform) cannot erase robot " + " type " << type << " from team " << ti << "\n"; + return false; + } + return true; } @@ -445,6 +545,9 @@ SoccerBase::GetSoccerVar(*this, "CoinTossForKickOff", coinTossKickOff); if (!coinTossKickOff) mNextHalfKickOff = TI_LEFT; + + SoccerBase::GetSoccerVar(*this, "MaxHeteroTypeCount", mMaxHeteroTypeCount); + SoccerBase::GetSoccerVar(*this, "MaxTotalHeteroCount", mMaxTotalHeteroCount); } int Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h 2013-06-09 18:35:13 UTC (rev 356) @@ -24,6 +24,7 @@ #include <soccercontrolaspect/soccercontrolaspect.h> #include <set> +#include <vector> class AgentState; @@ -87,7 +88,7 @@ std::string teamName, unsigned int unum); /** notifies that a uniform number is free again */ - bool ReturnUniform(TTeamIndex ti, unsigned int unum); + bool ReturnUniform(TTeamIndex ti, unsigned int unum, int type); /** returns the next uniform number not taken for the given team */ int RequestUniformNumber(TTeamIndex ti) const; @@ -133,6 +134,18 @@ contain a uniform number unum and erases it. */ bool EraseUnum(TTeamIndex idx, int unum); + /** + * Adds a robot of the given type to the given team if permitted. + * @return true if permitted + */ + bool InsertRobotType(TTeamIndex idx, int type); + + /** + * Removes a robot of the given type from the given team if exists. + * @return true on success + */ + bool EraseRobotType(TTeamIndex idx, int type); + /** returns the team index corresponding to the given teamName. If the teamname does not exist and less than two teams are registered, the given team name is registered. @@ -170,6 +183,12 @@ /** the set of uniform number for each team */ TUnumSet mUnumSet[2]; + /** the array of robot type counts for each team */ + std::vector<int> mRobotTypeCount[2]; + + /** the number of heterogeneous players for each team */ + int mHeteroCount[2]; + /** the scores of two teams */ int mScore[2]; @@ -187,6 +206,12 @@ /** flag if the game is running or paused (e.g. in goal_left/right state) */ bool mGamePaused; + + /** the maximum number of heterogeneous players of a single type per team */ + int mMaxHeteroTypeCount; + + /** the maximum number of total heterogeneous players for a team */ + int mMaxTotalHeteroCount; }; DECLARE_CLASS(GameStateAspect); Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/gametimeperceptor/gametimeperceptor.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/gametimeperceptor/gametimeperceptor.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/gametimeperceptor/gametimeperceptor.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -65,7 +65,7 @@ void GameTimePerceptor::OnLink() { - mGameState = shared_dynamic_cast<GameStateAspect> + mGameState = dynamic_pointer_cast<GameStateAspect> (GetCore()->Get("/sys/server/gamecontrol/GameStateAspect")); if (mGameState.get() == 0) Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -85,7 +85,7 @@ return; } - boost::shared_ptr<HMDPAction> hMDPAction = shared_dynamic_cast<HMDPAction>(mAction); + boost::shared_ptr<HMDPAction> hMDPAction = dynamic_pointer_cast<HMDPAction>(mAction); mAction.reset(); if (hMDPAction.get() == 0) { @@ -141,7 +141,7 @@ // parent should be a transform, or some other node, which has a // Body-child - mBody = shared_dynamic_cast<RigidBody>(parent->GetChildOfClass("RigidBody")); + mBody = dynamic_pointer_cast<RigidBody>(parent->GetChildOfClass("RigidBody")); if (mBody.get() == 0) { @@ -216,7 +216,7 @@ boost::shared_ptr<Leaf> join = *j_it; boost::shared_ptr<BaseNode> jparent = - shared_dynamic_cast<BaseNode>(join->GetParent().lock()); + dynamic_pointer_cast<BaseNode>(join->GetParent().lock()); std::cout << i << " " << jparent->GetName() << std::endl; i++; @@ -259,7 +259,7 @@ for (TLeafList::iterator j_it = jointList.begin(); j_it != jointList.end(); j_it++) { - boost::shared_ptr<HingeJoint> joint = shared_static_cast<HingeJoint> (*j_it); + boost::shared_ptr<HingeJoint> joint = static_pointer_cast<HingeJoint> (*j_it); servo_angle[i] = joint->GetAngle() - zeroPosServo(i); double tpos = servo_target_pos[i]; float err = servo_gain[i] * (tpos - servo_angle[i]); Modified: branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp =================================================================== --- branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp 2013-06-08 21:23:54 UTC (rev 355) +++ branches/gui-bullet/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp 2013-06-09 18:35:13 UTC (rev 356) @@ -48,10 +48,10 @@ { messageOut = ""; - boost::shared_ptr<Transform> transformParent = shared_static_cast<Transform> ( + boost::shared_ptr<Transform> transformParent = static_pointer_cast<Transform> ( FindParentSupportingClass<Transform> ().lock()); - mBody = shared_static_cast<RigidBody> (transf... [truncated message content] |
From: <he...@us...> - 2013-06-08 21:23:57
|
Revision: 355 http://sourceforge.net/p/simspark/svn/355 Author: hedayat Date: 2013-06-08 21:23:54 +0000 (Sat, 08 Jun 2013) Log Message: ----------- Check the number of hetero players each team can use. Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h trunk/rcssserver3d/rcssserver3d/naosoccersim.rb Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2013-06-05 20:03:19 UTC (rev 354) +++ trunk/rcssserver3d/ChangeLog 2013-06-08 21:23:54 UTC (rev 355) @@ -1,3 +1,14 @@ +2013-06-09 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/gamestateaspect/gamestateaspect.h: + * plugin/soccer/gamestateaspect/gamestateaspect.cpp: + * plugin/soccer/agentstate/agentstate.cpp (AgentState::OnUnlink): + * rcssserver3d/naosoccersim.rb: + - control the number of heterogeneous players each team can use. It limits + both the total number of heterogeneous players of each team + (MaxTotalHeteroCount variable in naosoccersim.rb), and the number of + heterogeneous players of each type (MaxHeteroTypeCount variable) + 2013-06-06 Hedayat Vatankhah <hed...@gm...> * plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h: @@ -4,7 +15,7 @@ * plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp: * plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor_c.cpp: * data/rsg/agent/nao/naoneckhead.rsg: - - Add MyOrientation sensing by Patrick (setSenseMyOrien in rsg file) + - added MyOrientation sensing by Patrick (setSenseMyOrien in rsg file) 2013-04-25 Hedayat Vatankhah <hed...@gm...> Modified: trunk/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp 2013-06-05 20:03:19 UTC (rev 354) +++ trunk/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp 2013-06-08 21:23:54 UTC (rev 355) @@ -251,7 +251,8 @@ return; } - game_state->ReturnUniform(GetTeamIndex(), GetUniformNumber()); + game_state->ReturnUniform(GetTeamIndex(), GetUniformNumber(), + GetRobotType()); } bool Modified: trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp 2013-06-05 20:03:19 UTC (rev 354) +++ trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.cpp 2013-06-08 21:23:54 UTC (rev 355) @@ -38,14 +38,21 @@ mFupTime = 0; mLastModeChange = 0; mGameHalf = GH_FIRST; + mRobotTypeCount[0].push_back(0); // add count for type 0 (default type) + mRobotTypeCount[1].push_back(0); + mHeteroCount[0] = 0; + mHeteroCount[1] = 0; mScore[0] = 0; mScore[1] = 0; mLastKickOffGameHalf = GH_NONE; mNextHalfKickOff = TI_NONE; mLeftInit = Vector3f(0,0,0); mRightInit = Vector3f(0,0,0); + mAgentRadius = 3.5; mFinished = false; mGamePaused = true; + mMaxHeteroTypeCount = 3; + mMaxTotalHeteroCount = 9; } GameStateAspect::~GameStateAspect() @@ -266,6 +273,82 @@ } bool +GameStateAspect::InsertRobotType(TTeamIndex idx, int type) +{ + int i; + + switch (idx) + { + case TI_LEFT: + i = 0; + break; + case TI_RIGHT: + i = 1; + break; + default: + return false; + } + + if (type) // heterogeneous player + { + if (mHeteroCount[i] == mMaxTotalHeteroCount) + { + GetLog()->Error() + << "ERROR: (GameStateAspect::InsertRobotType) Hetero player" + " count limit reached.\n"; + return false; + } + + ++mHeteroCount[i]; + + if (mRobotTypeCount[i].size() <= type) + mRobotTypeCount[i].resize(type+1); + + if (mRobotTypeCount[i][type] == mMaxHeteroTypeCount) + { + GetLog()->Error() + << "ERROR: (GameStateAspect::InsertRobotType) No more robots " + "of type " << type << " are allowed.\n"; + return false; + } + } + + ++mRobotTypeCount[i][type]; + + return true; +} + +bool +GameStateAspect::EraseRobotType(TTeamIndex idx, int type) +{ + int i; + + switch (idx) + { + case TI_LEFT: + i = 0; + break; + case TI_RIGHT: + i = 1; + break; + default: + return false; + } + + if (mRobotTypeCount[i].size() <= type || !mRobotTypeCount[i][type]) + { + return false; + } + + if (type) // heterogeneous player + --mHeteroCount[i]; + + --mRobotTypeCount[i][type]; + + return true; +} + +bool GameStateAspect::RequestUniform(boost::shared_ptr<AgentState> agentState, std::string teamName, unsigned int unum) { @@ -297,6 +380,15 @@ return false; } + if (!InsertRobotType(idx, agentState->GetRobotType())) + { + GetLog()->Error() + << "ERROR: (GameStateAspect::RequestUniform) cannot insert robot" + " of type " << agentState->GetRobotType() << " to team " + << teamName << "\n"; + return false; + } + agentState->SetUniformNumber(unum); agentState->SetTeamIndex(idx); //agentState->SetPerceptName(teamName, ObjectState::PT_Default); @@ -311,7 +403,7 @@ } bool -GameStateAspect::ReturnUniform(TTeamIndex ti, unsigned int unum) +GameStateAspect::ReturnUniform(TTeamIndex ti, unsigned int unum, int type) { if (! EraseUnum(ti,unum)) { @@ -321,6 +413,14 @@ return false; } + if (!EraseRobotType(ti, type)) + { + GetLog()->Error() + << "ERROR: (GameStateAspect::ReturnUniform) cannot erase robot " + " type " << type << " from team " << ti << "\n"; + return false; + } + return true; } @@ -445,6 +545,9 @@ SoccerBase::GetSoccerVar(*this, "CoinTossForKickOff", coinTossKickOff); if (!coinTossKickOff) mNextHalfKickOff = TI_LEFT; + + SoccerBase::GetSoccerVar(*this, "MaxHeteroTypeCount", mMaxHeteroTypeCount); + SoccerBase::GetSoccerVar(*this, "MaxTotalHeteroCount", mMaxTotalHeteroCount); } int Modified: trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h 2013-06-05 20:03:19 UTC (rev 354) +++ trunk/rcssserver3d/plugin/soccer/gamestateaspect/gamestateaspect.h 2013-06-08 21:23:54 UTC (rev 355) @@ -24,6 +24,7 @@ #include <soccercontrolaspect/soccercontrolaspect.h> #include <set> +#include <vector> class AgentState; @@ -87,7 +88,7 @@ std::string teamName, unsigned int unum); /** notifies that a uniform number is free again */ - bool ReturnUniform(TTeamIndex ti, unsigned int unum); + bool ReturnUniform(TTeamIndex ti, unsigned int unum, int type); /** returns the next uniform number not taken for the given team */ int RequestUniformNumber(TTeamIndex ti) const; @@ -133,6 +134,18 @@ contain a uniform number unum and erases it. */ bool EraseUnum(TTeamIndex idx, int unum); + /** + * Adds a robot of the given type to the given team if permitted. + * @return true if permitted + */ + bool InsertRobotType(TTeamIndex idx, int type); + + /** + * Removes a robot of the given type from the given team if exists. + * @return true on success + */ + bool EraseRobotType(TTeamIndex idx, int type); + /** returns the team index corresponding to the given teamName. If the teamname does not exist and less than two teams are registered, the given team name is registered. @@ -170,6 +183,12 @@ /** the set of uniform number for each team */ TUnumSet mUnumSet[2]; + /** the array of robot type counts for each team */ + std::vector<int> mRobotTypeCount[2]; + + /** the number of heterogeneous players for each team */ + int mHeteroCount[2]; + /** the scores of two teams */ int mScore[2]; @@ -187,6 +206,12 @@ /** flag if the game is running or paused (e.g. in goal_left/right state) */ bool mGamePaused; + + /** the maximum number of heterogeneous players of a single type per team */ + int mMaxHeteroTypeCount; + + /** the maximum number of total heterogeneous players for a team */ + int mMaxTotalHeteroCount; }; DECLARE_CLASS(GameStateAspect); Modified: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2013-06-05 20:03:19 UTC (rev 354) +++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2013-06-08 21:23:54 UTC (rev 355) @@ -60,6 +60,8 @@ # agent parameters addSoccerVar('AgentRadius', 0.4) +addSoccerVar('MaxHeteroTypeCount', 3) +addSoccerVar('MaxTotalHeteroCount', 9) # ball parameters addSoccerVar('BallRadius', 0.042) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2013-06-05 20:03:22
|
Revision: 354 http://sourceforge.net/p/simspark/svn/354 Author: hedayat Date: 2013-06-05 20:03:19 +0000 (Wed, 05 Jun 2013) Log Message: ----------- Added sensing the orientation of the agent by Patrick MacAlpine Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor_c.cpp Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2013-05-29 05:32:14 UTC (rev 353) +++ trunk/rcssserver3d/ChangeLog 2013-06-05 20:03:19 UTC (rev 354) @@ -1,3 +1,11 @@ +2013-06-06 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h: + * plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp: + * plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor_c.cpp: + * data/rsg/agent/nao/naoneckhead.rsg: + - Add MyOrientation sensing by Patrick (setSenseMyOrien in rsg file) + 2013-04-25 Hedayat Vatankhah <hed...@gm...> * data/rsg/agent/nao/nao_hetero.rsg: Modified: trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2013-05-29 05:32:14 UTC (rev 353) +++ trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2013-06-05 20:03:19 UTC (rev 354) @@ -98,6 +98,7 @@ (nd RestrictedVisionPerceptor (setViewCones 120 120) (setSenseMyPos false) + (setSenseMyOrien false) (setSenseBallPos false) (setStaticSenseAxis false) (addNoise true) Modified: trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp 2013-05-29 05:32:14 UTC (rev 353) +++ trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp 2013-06-05 20:03:19 UTC (rev 354) @@ -38,6 +38,7 @@ RestrictedVisionPerceptor::RestrictedVisionPerceptor() : Perceptor(), mSenseMyPos(false), + mSenseMyOrien(false), mSenseBallPos(false), mAddNoise(true), mStaticSenseAxis(true), @@ -160,7 +161,7 @@ SoccerBase::GetTransformParent(*this,mTransformParent); // SoccerBase::GetAgentState(*this, mAgentState); SoccerBase::GetActiveScene(*this,mActiveScene); - + boost::shared_ptr<AgentAspect> agent_aspect = FindParentSupportingClass<AgentAspect>().lock(); if (agent_aspect == 0) @@ -176,7 +177,7 @@ { mAgentAspect = agent_aspect; } - + mAgentState = static_pointer_cast<AgentState> (mAgentAspect->GetChildOfClass("AgentState",true)); if (mAgentState == 0) @@ -272,7 +273,7 @@ } boost::shared_ptr<Transform> j = od.mObj->GetTransformParent(); - + if (j.get() == 0) { continue; // this should never happen @@ -280,7 +281,7 @@ od.mRelPos = j->GetWorldTransform().Pos() - myPos; od.mDist = od.mRelPos.Length(); - + visibleNodes[node].push_back(od); } } @@ -298,14 +299,14 @@ boost::shared_ptr<AgentAspect> agent_aspect = dynamic_pointer_cast<AgentAspect>(node); if (agent_aspect != 0) - { + { boost::shared_ptr<AgentAspect> aspect = agent_aspect->FindParentSupportingClass<AgentAspect>().lock(); if (aspect != 0) { agent_aspect = aspect; } - + boost::shared_ptr<AgentState> agent_state = static_pointer_cast<AgentState> (agent_aspect->GetChildOfClass("AgentState",true)); if (agent_state.get() == 0 || @@ -314,7 +315,7 @@ { return; } - + ParameterList& element = predicate.parameter.AddList(); element.AddValue(std::string("P")); @@ -461,21 +462,32 @@ element.AddValue(sensedMyPos[2]); } + if (mSenseMyOrien) + { + // Orientation + TTeamIndex ti = mAgentState->GetTeamIndex(); + Vector3f sensedMyUp = SoccerBase::FlipView(mTransformParent->GetWorldTransform().Up(), ti); + + ParameterList& element = predicate.parameter.AddList(); + element.AddValue(std::string("myorien")); + element.AddValue(gRadToDeg(gArcTan2(sensedMyUp[1], sensedMyUp[0]))); + } + if (mSenseBallPos) { TTeamIndex ti = mAgentState->GetTeamIndex(); boost::shared_ptr<Ball> ball; SoccerBase::GetBall(*this, ball); Vector3f sensedBallPos = SoccerBase::FlipView(ball->GetWorldTransform().Pos(), ti); - + ParameterList& element = predicate.parameter.AddList(); element.AddValue(std::string("ballpos")); element.AddValue(sensedBallPos[0]); element.AddValue(sensedBallPos[1]); element.AddValue(sensedBallPos[2]); - + } - + if (mSenseLine) { SenseLine(predicate); @@ -578,21 +590,32 @@ element.AddValue(sensedMyPos[2]); } + if (mSenseMyOrien) + { + // Orientation + TTeamIndex ti = mAgentState->GetTeamIndex(); + Vector3f sensedMyUp = SoccerBase::FlipView(mTransformParent->GetWorldTransform().Up(), ti); + + ParameterList& element = predicate.parameter.AddList(); + element.AddValue(std::string("myorien")); + element.AddValue(gRadToDeg(gArcTan2(sensedMyUp[1], sensedMyUp[0]))); + } + if (mSenseBallPos) { TTeamIndex ti = mAgentState->GetTeamIndex(); boost::shared_ptr<Ball> ball; SoccerBase::GetBall(*this, ball); Vector3f sensedBallPos = SoccerBase::FlipView(ball->GetWorldTransform().Pos(), ti); - + ParameterList& element = predicate.parameter.AddList(); element.AddValue(std::string("ballpos")); element.AddValue(sensedBallPos[0]); element.AddValue(sensedBallPos[1]); element.AddValue(sensedBallPos[2]); - + } - + if (mSenseLine) { SenseLine(predicate); @@ -665,6 +688,12 @@ } void +RestrictedVisionPerceptor::SetSenseMyOrien(bool sense) +{ + mSenseMyOrien = sense; +} + +void RestrictedVisionPerceptor::SetSenseBallPos(bool sense) { mSenseBallPos = sense; @@ -691,7 +720,7 @@ // object is too close return false; } - + const int hAngle_2 = mHViewCone >> 1; if (gAbs(od.mTheta) > hAngle_2) { @@ -737,7 +766,7 @@ { Vector3f bp3 = ld.mBeginPoint.mRelPos; Vector3f ep3 = ld.mEndPoint.mRelPos; - + if ( bp3.y() < focalLength && ep3.y() >= focalLength ) { float t = ( focalLength - ep3.y() ) / ( bp3.y() - ep3.y() ); @@ -807,7 +836,7 @@ } } } - + if (seeBeginPoint && seeEndPoint) { // make some noise Modified: trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h 2013-05-29 05:32:14 UTC (rev 353) +++ trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h 2013-06-05 20:03:19 UTC (rev 354) @@ -105,7 +105,10 @@ //! Turn sensing of agent position on/off void SetSenseMyPos(bool sense); - //! Turn sensing of agent position on/off + //! Turn sensing of agent orientation on/off + void SetSenseMyOrien(bool sense); + + //! Turn sensing of ball position on/off void SetSenseBallPos(bool sense); // turn sensing of lines on/off @@ -211,6 +214,9 @@ //! true, if the absolute position of the agent is sensed. bool mSenseMyPos; + + //! true, if the absolute orientation of the agent's camera in the x-y plane is sensed. + bool mSenseMyOrien; //! true, if the absolute position of the ball is sensed. bool mSenseBallPos; Modified: trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor_c.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor_c.cpp 2013-05-29 05:32:14 UTC (rev 353) +++ trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor_c.cpp 2013-06-05 20:03:19 UTC (rev 354) @@ -80,6 +80,22 @@ return true; } +FUNCTION(RestrictedVisionPerceptor,setSenseMyOrien) +{ + bool inSenseMyOrien; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in.begin(),inSenseMyOrien)) + ) + { + return false; + } + + obj->SetSenseMyOrien(inSenseMyOrien); + return true; +} + FUNCTION(RestrictedVisionPerceptor,setSenseBallPos) { bool inSenseBallPos; @@ -188,6 +204,7 @@ DEFINE_FUNCTION(setNoiseParams); DEFINE_FUNCTION(addNoise); DEFINE_FUNCTION(setSenseMyPos); + DEFINE_FUNCTION(setSenseMyOrien); DEFINE_FUNCTION(setSenseBallPos); DEFINE_FUNCTION(setStaticSenseAxis); DEFINE_FUNCTION(setViewCones); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kla...@us...> - 2013-05-29 05:32:18
|
Revision: 353 http://sourceforge.net/p/simspark/svn/353 Author: klausdorer Date: 2013-05-29 05:32:14 +0000 (Wed, 29 May 2013) Log Message: ----------- Adjusted NaoType1 (LongLeg) according to finding during tests at German Open. Arms are now also longer. Enlargement of legs is now split into two parts, half at hip, half at ankle. Inverse Kinematics Walks of Nao should now also work without major changes on this type. Modified Paths: -------------- trunk/rcssserver3d/data/rsg/agent/nao/naoarm.rsg trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg trunk/rcssserver3d/rcssserver3d/naorobottypes.rb Modified: trunk/rcssserver3d/data/rsg/agent/nao/naoarm.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/naoarm.rsg 2013-05-24 15:01:08 UTC (rev 352) +++ trunk/rcssserver3d/data/rsg/agent/nao/naoarm.rsg 2013-05-29 05:32:14 UTC (rev 353) @@ -46,7 +46,8 @@ (def $UpperarmRelShoulderZ 0) (def $ElbowRelUpperArm_X (eval $LRFactor * -0.01)) - (def $ElbowRelUpperArm_Y 0.07) + ;(def $ElbowRelUpperArm_Y 0.07) + (def $ElbowRelUpperArm_Y (eval "NaoType["$type"]['ElbowRelUpperArm_Y']")) (def $ElbowRelUpperArm_Z 0.009) (def $LowerarmRelElbow_X 0) Modified: trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg 2013-05-24 15:01:08 UTC (rev 352) +++ trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg 2013-05-29 05:32:14 UTC (rev 353) @@ -66,7 +66,8 @@ (def $AnkleRelShank_X 0) (def $AnkleRelShank_Y -0.01) - (def $AnkleRelShank_Z -0.055) + ;(def $AnkleRelShank_Z -0.055) + (def $AnkleRelShank_Z (eval "NaoType["$type"]['AnkleRelShank_Z']")) (def $FootRelAnkle_X 0) (def $FootRelAnkle_Y 0.03) Modified: trunk/rcssserver3d/rcssserver3d/naorobottypes.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naorobottypes.rb 2013-05-24 15:01:08 UTC (rev 352) +++ trunk/rcssserver3d/rcssserver3d/naorobottypes.rb 2013-05-29 05:32:14 UTC (rev 353) @@ -1,8 +1,8 @@ NaoType = [ # Type 0 (Standard Nao) -{'ThighRelHip2_Z' => -0.04, 'lj5_max_abs_speed' => 6.1395, 'lj6_max_abs_speed' => 6.1395}, +{'ThighRelHip2_Z' => -0.04, 'AnkleRelShank_Z' => -0.055, 'lj5_max_abs_speed' => 6.1395, 'lj6_max_abs_speed' => 6.1395, 'ElbowRelUpperArm_Y' => 0.07}, # Type 1 -{'ThighRelHip2_Z' => -0.08, 'lj5_max_abs_speed' => 6.1395, 'lj6_max_abs_speed' => 6.1395}, +{'ThighRelHip2_Z' => -0.06, 'AnkleRelShank_Z' => -0.075, 'lj5_max_abs_speed' => 6.1395, 'lj6_max_abs_speed' => 6.1395, 'ElbowRelUpperArm_Y' => 0.11}, # Type 2 -{'ThighRelHip2_Z' => -0.04, 'lj5_max_abs_speed' => 9.21, 'lj6_max_abs_speed' => 4.605} +{'ThighRelHip2_Z' => -0.04, 'AnkleRelShank_Z' => -0.055, 'lj5_max_abs_speed' => 9.21, 'lj6_max_abs_speed' => 4.605, 'ElbowRelUpperArm_Y' => 0.07} ] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2013-05-24 15:01:11
|
Revision: 352 http://sourceforge.net/p/simspark/svn/352 Author: yxu Date: 2013-05-24 15:01:08 +0000 (Fri, 24 May 2013) Log Message: ----------- Merge branch 'open-source-paper' * open-source-paper: read through the text Modified Paths: -------------- trunk/spark/doc/papers/2013/opensource.tex Modified: trunk/spark/doc/papers/2013/opensource.tex =================================================================== --- trunk/spark/doc/papers/2013/opensource.tex 2013-05-22 14:59:02 UTC (rev 351) +++ trunk/spark/doc/papers/2013/opensource.tex 2013-05-24 15:01:08 UTC (rev 352) @@ -79,7 +79,7 @@ As the result, RoboCup soccer simulations have changed significantly over the years, going from rather abstract agent representations to more and more realistic humanoid robot games\cite{Boedecker2008,usermanual}. Thanks to the flexibility of the Spark system, these transitions were achieved with little changes to the simulator's core architecture. -In this paper we describe the recent development of SimSpark project, which make the SimSpark possible to simulate 11 vs. 11 humanoid robot soccer games in real time\todo{is it real time in RoboCup 2012?}. +In this paper we describe the recent development of SimSpark project, which make the SimSpark possible to simulate 11 vs. 11 humanoid robot soccer games in real time. In section \ref{s:overview}, we will give an overview of the SimSpark project since 2008. After that, we will describe the development of the Spark simulation platform in section \ref{s:spark} and the implementation of RoboCup 3D Soccer Simulator in section \ref{s:rcssserver3d}. We will introduce some new features for RoboCup 2013 in section \ref{s:ongoing}. Furthermore, we will give the application examples of SimSpark in section \ref{s:application}. @@ -90,15 +90,12 @@ \section{Project Overview} \label{s:overview} -Until 2008, soccer simulation and SimSpark simulator were developed and released as a single project called rcssserver3d, but it was already decided that they should be separated -to make the separation more visible for both users and developers. -In late 2008, the separation happened with the migration of sources from CVS repository -at \url{http://sserver.sourceforge.net} to SimSpark's project Subversion repository at +Until 2008, soccer simulation and SimSpark simulator were developed and released as a single project called rcssserver3d. +In late 2008, the SimSpark project migrated from CVS repository at \url{http://sserver.sourceforge.net} to the new project Subversion repository at \url{http://simspark.sourceforge.net}. As part of this process, the project was broken to two main projects (Spark simulation platform and RCSSServer3D soccer simulation server) -and two auxiliary projects (RSGEdit and simspark-utilities). Also, simspark binary was -renamed to rcssserver3d to make it clear that it runs soccer simulation rather than a -generic simulation environment. +and two auxiliary projects (RSGEdit and simspark-utilities). +The separation clarifies SimSpark is a generic simulation environment rather than only a robot soccer simulator. SimSpark was never a single-platform project, but it practically didn't support Windows. In recent years, Windows support was added after migration from Autotools @@ -166,10 +163,9 @@ The NAO robot model is also equipped with a powerful selection of the sensors described in section \ref{s:spark}, to provide a widespread information base for agent development. +There are differences between simulated NAO and real NAO. For example, the hip joints are physically connected by one motor in the real NAO. Furthermore, the simulated robot gets positions of objects via virtual vision sensor, while the real robot has to process images to understand the world. Nevertheless, this NAO model enables RCSSServer3D to be a good humanoid robot research platform. -There are differences between simulated NAO and real NAO. For example, the left hip and the right hip in the real NAO are physically connected by one motor so they cannot be controlled independently. The simulated robot has one motor for each joint. Furthermore, the simulated robot gets positions of objects via virtual vision sensor, while the real robot has to process images to understand the world. Nevertheless, this NAO model enables RCSSServer3D to be a good humanoid robot research platform. - \section{Experimental Features} \label{s:ongoing} @@ -294,33 +290,21 @@ \end{figure} \subsection{Heterogeneous Robots} -Simulation is a great tool for experimenting with robots without buying expensive -real robots. Also, the simulated robots are never damaged and they can be used for long -running experiences without human intervention. +Heterogeneous systems are emerging as effective solutions to many multi-robot tasks, +it is also true for the soccer team. The physical difference between robots are important when they serve diverse roles in a cooperating team. +In simulation, the physical properties of the robot can be easily changed, so it is a good platform for researching on heterogeneous systems. -However, the possibilities provided by a simulation environment is -not limited to these. Not only you can experiment with different behaviors, but -also you can modify the mechanical properties of the robot as you wish. Additionally, -it is possible to create new challenges for robot AI developers. Since you can -generate robots with different mechanical properties very easily at run time, -you can provide variations of a robot to teams and they can use them if they can -adopt their developed behaviors to unseen robots; which is in contrast with -real robots because teams know the exact specification of the robots and -can develop behaviors specifically tuned for them. If heterogeneous -robots are available in a game, teams can use them only if they can adopt -their behaviors to the robots they didn't know about. +Heterogeneity also creates new challenges for robot AI developers. +The robots with different mechanical properties will be generated at running time, +different robots are provided to teams, so teams have to adopt their developed behaviors to unknown robots. SimSpark already provided the ability to define different robot models and use them in its simulation environment. However, each model was fixed and if you -wanted to have several variations of a robot, you should have defined several +wanted to have several variations of a robot, you had to defined several separate robot models. To better support games with heterogeneous robots, we have -added the support for parametric models to SimSpark. Therefore, it is possible to -define models in which a number of parameters are variables and can have different -values for different robot variations. For example, the length and the mass of the -legs of a robot can be different for different types of that robot model. -When you want to load such a model, you should -specify which type of that robot is needed and its parameters are replaced in the -parametric model and the model is created. +implemented the parametric robot model. +This model has a number of parameters and can have different values for different robot variations. For example, the length of the legs can be different for different robots. +In order to launch this model, only these parameters have to be specified additionally. \subsection{Agent Proxies} Initially, SimSpark used SPADES\cite{riley2003spades} for managing external agents. It @@ -330,22 +314,21 @@ latency. Therefore, if agents were unable to deliver their commands to the server in a cycle because of network latency, their commands were executed by the simulator in the next simulation cycle. As the number of soccer players in soccer simulation -increased, this problem become more apparent. +increased, this problem became more apparent. -To solve this problem, the concept of agent proxies were proposed. Agent proxies -run on the client machines were agents will be running, and they are responsible for -communicating with the server. Agents communicate with the proxies instead of +To solve this problem, the concept of agent proxies was proposed. +Agents communicate with the proxies instead of communicating directly with the simulator. In this model, the cycle time is managed by the proxies on the client side, and they communicate with the simulator in Sync Mode. Therefore, the simulator waits for all proxies to signal the end of a cycle and then proceeds with the next cycle. This model ensures that agents can use the allowed cycle time to think in a cycle when new information is delivered to them. -This model is not ideal because the agents can have some spare time if network latency -occurs, but it is better, more predictable and more fair than the current model. Also, -no new information is arrived to agents in that spare time and they cannot send new -commands for that cycle. Hopefully, by using a new binary network protocol the network -traffic and therefore the latency will be reduced considerably.\review{this does not quite fit to the rest of section where you argue that the proxy exactly removes the need for such optimizations} +This model is not perfect because the agents can have some spare time if network latency +occurs, but it is more predictable and fairer than the old model. +The network latency can be reduced by using binary network protocol between proxies and simulator. +Nevertheless, no new information is arrived to agents in that spare time and they cannot send new +commands for that cycle. Currently, an initial version of agent proxies is under development outside SimSpark project using Java. @@ -358,12 +341,12 @@ % The main goal of this project is to provide a flexible and extensible User Interface and Simulation Development Environment, that can be used to start, control and monitor different simulations using the Simspark server, agent and monitor processes, as well as incorporate several additional tools like for example a visual editor for robot models (like RsgEdit) or a debugging monitor for agents (like RoboViz). \section{Applications} -As a powerful robot simulator, SimSpark is gaining popularity in RoboCup, including Standard Platform League and Humanoid League.\review{may be this is too obvious, but the main application is still 3D simulation league that is not mentioned here. It should be. That has the most impact as of today.} It is also widely used to teach artificial intelligence and robotic lectures. +In addition to be used in RoboCup Soccer Simulation 3D League, SimSpark is gaining popularity in other leagues, including Standard Platform League and Humanoid League. It is also widely used to teach artificial intelligence and robotic lectures. \label{s:application} -% \paragraph{RoboCup Soccer Simulation League} Simulation 3D League. Since 2004, SimSpark has been used as a official competitions environment. Since then, research teams have developed useful research tools based on SimSpark. Some of these tools are also released as open source. -% For example, RoboViz\cite{Stoecker2012} is designed to assess and develop agent behaviors in SimSpark. -% Combined with these tools, SimSpark becomes a useful platform to develop and test new algorithms for multi-robot systems. +\paragraph{RoboCup Soccer Simulation 3D League} Since 2004, SimSpark has been used as a official competitions environment. Research teams have developed useful research tools based on SimSpark. +For example, RoboViz\cite{Stoecker2012} is designed to assess and develop agent behaviors in SimSpark. And these tools are also released in open source. +Combined with these tools, SimSpark becomes a featured platform to develop and test new algorithms for multi-robot systems. \paragraph{RoboCup Soccer Standard Platform League} % As one of the long term goals of the soccer simulation is to aim for realism the long term objective are realistic humanoid players in a physical environment. @@ -373,11 +356,11 @@ The special situation between Standard Platform League and 3D Simulation League is that both leagues use the same robot model — NAO from Aldebaran. So it appears to be natural to reuse the work which has already been done. Nao Team Humboldt developed a software architecture\cite{SCPR2010} which enables their control software can run both in real NAO and simulated NAO with SimSpark. This helps them to participate in both Simulation League and Standard Platform League, and achieve some good results. -Furthermore, Nao Team Humboldt also promotes the usage of SimSpark in the Standard Platform League by implementing its rules, see \Cref{f:simspark-spl}. +Furthermore, they also promotes the usage of SimSpark in the Standard Platform League by implementing its rules, see \Cref{f:simspark-spl}. \begin{figure} \centering - \includegraphics[width = 0.6\columnwidth]{simspark-spl} + \includegraphics[width = 0.9\columnwidth]{simspark-spl} \caption{Prototype of the extended SimSpark for Standard Platform League. The bottom of screen are images of robot cameras.} \label{f:simspark-spl} @@ -427,10 +410,9 @@ \item[Physics Abstraction Layer] Relying on a single physics engine, i.e. ODE, hampers Simspark's flexibility. -Thus, an abstract physics layer was development\cite{Held2010}, ODE and Bullet can be used as plugins with the abstract physics layer. However, current implementation has many drawbacks and difficult to maintenance. -\review{any plans to support physics calculations in GPU? Or is it done already?} +Thus, the physics abstraction layer has be developed\cite{Held2010}, ODE and Bullet can be used as plugins of SimSpark. However, current implementation has many drawbacks and difficult to maintenance. +% \review{any plans to support physics calculations in GPU? Or is it done already? -- it should be the task of physics engine} - \item[Robot Model Importers] The usage of SimSpark will be extended when it has more robot models, however creating robot models is a time consuming task. The idea is to create model importers for different model format, so SimSpark will be able to use the robot model which is available in other simulators. \end{description} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sgv...@us...> - 2013-05-22 14:59:04
|
Revision: 351 http://sourceforge.net/p/simspark/svn/351 Author: sgvandijk Date: 2013-05-22 14:59:02 +0000 (Wed, 22 May 2013) Log Message: ----------- - Rename fault to foul - SoccerRuleAspect keeps list of fouls - Created SoccerRuleItem; adds fouls to monitor protocol Modified Paths: -------------- trunk/rcssserver3d/plugin/soccer/CMakeLists.txt trunk/rcssserver3d/plugin/soccer/export.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h trunk/rcssserver3d/rcssserver3d/naosoccersim.rb Added Paths: ----------- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.h trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem_c.cpp Modified: trunk/rcssserver3d/plugin/soccer/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/plugin/soccer/CMakeLists.txt 2013-05-20 11:28:53 UTC (rev 350) +++ trunk/rcssserver3d/plugin/soccer/CMakeLists.txt 2013-05-22 14:59:02 UTC (rev 351) @@ -37,6 +37,7 @@ soccercontrolaspect/soccercontrolaspect.h soccernode/soccernode.h soccerruleaspect/soccerruleaspect.h + soccerruleaspect/soccerruleitem.h trainercommandparser/trainercommandparser.h gametimeperceptor/gametimeperceptor.h visionperceptor/visionperceptor.h @@ -106,6 +107,8 @@ soccernode/soccernode_c.cpp soccerruleaspect/soccerruleaspect.cpp soccerruleaspect/soccerruleaspect_c.cpp + soccerruleaspect/soccerruleitem.cpp + soccerruleaspect/soccerruleitem_c.cpp trainercommandparser/trainercommandparser.cpp trainercommandparser/trainercommandparser_c.cpp visionperceptor/visionperceptor.cpp Modified: trunk/rcssserver3d/plugin/soccer/export.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/export.cpp 2013-05-20 11:28:53 UTC (rev 350) +++ trunk/rcssserver3d/plugin/soccer/export.cpp 2013-05-22 14:59:02 UTC (rev 351) @@ -36,6 +36,7 @@ #include "gamestateaspect/gamestateitem.h" #include "ballstateaspect/ballstateaspect.h" #include "soccerruleaspect/soccerruleaspect.h" +#include "soccerruleaspect/soccerruleitem.h" #include "agentstate/agentstate.h" #include "sexpmonitor/sexpmonitor.h" #include "internalsoccermonitor/internalsoccerrender.h" @@ -63,6 +64,7 @@ ZEITGEIST_EXPORT(GameStateItem); ZEITGEIST_EXPORT(BallStateAspect); ZEITGEIST_EXPORT(SoccerRuleAspect); + ZEITGEIST_EXPORT(SoccerRuleItem); ZEITGEIST_EXPORT(BeamEffector); ZEITGEIST_EXPORT(CatchEffector); ZEITGEIST_EXPORT(CreateEffector); Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-05-20 11:28:53 UTC (rev 350) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2013-05-22 14:59:02 UTC (rev 351) @@ -68,9 +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 + mMaxFoulTime(0.0), // maximum time allowed for a player to commit a positional foul before being repositioned mLastKickOffKickTime(0), - mCheckKickOffKickerFault(false) + mCheckKickOffKickerFoul(false) { mFreeKickPos = Vector3f(0.0,0.0,mBallRadius); } @@ -93,21 +93,21 @@ void SoccerRuleAspect::AutomaticSimpleReferee(TPlayMode playMode) { - // Reset counters and do not consider players' faults when game is not + // Reset counters and do not consider players' fouls when game is not // running if (mGameState->IsPaused()) { - ResetFaultCounter(TI_LEFT); - ResetFaultCounter(TI_RIGHT); + ResetFoulCounter(TI_LEFT); + ResetFoulCounter(TI_RIGHT); } else { CalculateDistanceArrays(TI_LEFT); // Calculates distance arrays for left team CalculateDistanceArrays(TI_RIGHT); // Calculates distance arrays for right team - AnalyseFaults(TI_LEFT); // Analyzes simple faults for the left team - AnalyseFaults(TI_RIGHT); // Analyzes simple faults for the right team - AnalyseTouchGroups(TI_LEFT); - AnalyseTouchGroups(TI_RIGHT); + AnalyseFouls(TI_LEFT); // Analyzes simple fouls for the left team + AnalyseFouls(TI_RIGHT); // Analyzes simple fouls for the right team + AnalyseTouchGroups(TI_LEFT); // Analyzes how many players are touching for the left team + AnalyseTouchGroups(TI_RIGHT); // Analyzes whether too many players are touching for the 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 @@ -120,21 +120,21 @@ void -SoccerRuleAspect::ResetFaultCounterPlayer(int unum, TTeamIndex idx) +SoccerRuleAspect::ResetFoulCounterPlayer(int unum, TTeamIndex idx) { playerGround[unum][idx] = 0; playerNotStanding[unum][idx] = 0; playerStanding[unum][idx] = 5/0.02; // Considers player has been standing for some time in playoff prevPlayerInsideOwnArea[unum][idx] = 0; playerInsideOwnArea[unum][idx] = 0; - playerFaultTime[unum][idx] = 0; + playerFoulTime[unum][idx] = 0; } void -SoccerRuleAspect::ResetFaultCounter(TTeamIndex idx) +SoccerRuleAspect::ResetFoulCounter(TTeamIndex idx) { for(int t=1; t<=11; t++) { - ResetFaultCounterPlayer(t,idx); + ResetFoulCounterPlayer(t,idx); } } @@ -301,7 +301,8 @@ if (pl[idx] >= touchGroup->size() - pl[idx]) { - playerFaultTime[(*i)->GetUniformNumber()][idx]++; + playerFoulTime[(*i)->GetUniformNumber()][idx]++; + playerLastFoul[(*i)->GetUniformNumber()][idx] = FT_Touching; // Remove player from touch group so no more agents are replaced touchGroup->erase(*i); } @@ -309,7 +310,8 @@ { // I am the last one to enter the group, but the number of // opponents in the group are more than us - playerFaultTime[(*oppIt)->GetUniformNumber()][oppIdx]++; + playerFoulTime[(*oppIt)->GetUniformNumber()][oppIdx]++; + playerLastFoul[(*oppIt)->GetUniformNumber()][oppIdx] = FT_Touching; touchGroup->erase(*oppIt); } } @@ -330,8 +332,8 @@ } } -// Analyse Faults and Creates Fault Time Array -void SoccerRuleAspect::AnalyseFaults(TTeamIndex idx) +// Analyse Fouls and Creates Foul Time Array +void SoccerRuleAspect::AnalyseFouls(TTeamIndex idx) { TTeamIndex idx2; if (idx == TI_LEFT) @@ -345,13 +347,15 @@ if (unum != 1 && closestPlayerDist[idx2] < mMinOppDistance && (distArr[unum][idx] <= mMin3PlDistance + 0.01 && ordArr[unum][idx] == 3)) { - playerFaultTime[unum][idx]++; + playerFoulTime[unum][idx]++; + playerLastFoul[unum][idx] = FT_Crowding; } // I am the second closest player but i am too near the ball (and not the goalie) else if(unum != 1 && closestPlayerDist[idx2] < mMinOppDistance && distArr[unum][idx] <= mMin2PlDistance + 0.01 && ordArr[unum][idx] == 2 ) { - playerFaultTime[unum][idx]++; + playerFoulTime[unum][idx]++; + playerLastFoul[unum][idx] = FT_Crowding; } // Too many players inside my own penalty area and Im am the last one to enter or // the last one to enter was the goalie and I am the one further away from own goal @@ -359,31 +363,36 @@ (prevPlayerInsideOwnArea[unum][idx] == 0 || (prevPlayerInsideOwnArea[1][idx] == 0 && playerInsideOwnArea[1][idx] == 1 && mMaxPlayersInsideOwnArea + 1 == ordGArr[unum][idx])))) { - playerFaultTime[unum][idx]++; + playerFoulTime[unum][idx]++; + playerLastFoul[unum][idx] = FT_IllegalDefence; } // I am a field player and on the ground for too much time else if (unum != 1 && playerGround[unum][idx] > mGroundMaxTime / 0.02) { - playerFaultTime[unum][idx]++; + playerFoulTime[unum][idx]++; + playerLastFoul[unum][idx] = FT_Incapable; } // I am a field player and I am not standing for too much time else if(unum!=1 && playerNotStanding[unum][idx] > mNotStandingMaxTime / 0.02) { - playerFaultTime[unum][idx]++; + playerFoulTime[unum][idx]++; + playerLastFoul[unum][idx] = FT_Incapable; } // I am the goalie and I am on the ground for too much time else if (unum == 1 && playerGround[unum][idx] > mGoalieGroundMaxTime / 0.02) { - playerFaultTime[unum][idx]++; + playerFoulTime[unum][idx]++; + playerLastFoul[unum][idx] = FT_Incapable; } // I am the goalie and I and not standing for too much time else if (unum == 1 && playerNotStanding[unum][idx] > mGoalieNotStandingMaxTime / 0.02) { - playerFaultTime[unum][idx]++; + playerFoulTime[unum][idx]++; + playerLastFoul[unum][idx] = FT_Incapable; } else { - playerFaultTime[unum][idx]=0; + playerFoulTime[unum][idx]=0; } } } @@ -424,14 +433,16 @@ SoccerBase::GetTransformParent(**i, agent_aspect); Vector3f agentPos = agent_aspect->GetWorldTransform().Pos(); int unum = (*i)->GetUniformNumber(); - if (playerFaultTime[unum][idx] > mMaxFaultTime / 0.02) + if (playerFoulTime[unum][idx] > mMaxFoulTime / 0.02) { // I am not a very good soccer player... I am violating the rules... salt::Vector3f new_pos = RepositionOutsidePos(ballPos, unum, idx); //Calculate my Reposition pos outside of the field SoccerBase::MoveAgent(agent_aspect, new_pos); //Oh my God!! I am flying!! I am going outside of the field - ResetFaultCounterPlayer(unum, idx); + ResetFoulCounterPlayer(unum, idx); + // Record faul + mFouls.push_back(Foul(mFouls.size() + 1, playerLastFoul[unum][idx], *i)); //cout << "*********Player Repos Num: " << unum << " Team: " << team << " Pos: " << new_pos << endl; } } @@ -591,7 +602,7 @@ } void -SoccerRuleAspect::PunishKickOffFault( +SoccerRuleAspect::PunishKickOffFoul( boost::shared_ptr<oxygen::AgentAspect> agent) { boost::shared_ptr<AgentState> agentState; @@ -666,6 +677,20 @@ } } +vector<SoccerRuleAspect::Foul> +SoccerRuleAspect::GetFouls() const +{ + return mFouls; +} + +vector<SoccerRuleAspect::Foul> +SoccerRuleAspect::GetFoulsSince(unsigned index) const +{ + Foul f(index+1, (EFoulType)0, boost::shared_ptr<AgentState>()); + vector<SoccerRuleAspect::Foul>::const_iterator low = lower_bound(mFouls.begin(), mFouls.end(), f); + return vector<Foul>(low, mFouls.end()); +} + void SoccerRuleAspect::DropBall() { @@ -783,7 +808,7 @@ if (SoccerBase::GetGameControlServer(*this, game_control) && game_control->GetAgentCount() > 2) // todo: remove this when there is a "penalty" playmode { - mCheckKickOffKickerFault = true; + mCheckKickOffKickerFoul = true; } mLastKickOffKickTime = time; mLastKickOffTaker = agent; @@ -1177,7 +1202,7 @@ boost::shared_ptr<AgentAspect> agent; if (WasLastKickFromKickOff(agent)) { - PunishKickOffFault(agent); + PunishKickOffFoul(agent); return false; } @@ -1189,18 +1214,18 @@ } bool -SoccerRuleAspect::CheckKickOffTakerFault() +SoccerRuleAspect::CheckKickOffTakerFoul() { - if (!mCheckKickOffKickerFault) + if (!mCheckKickOffKickerFoul) return false; boost::shared_ptr<AgentAspect> agent; if (!WasLastKickFromKickOff(agent)) // second kick { - mCheckKickOffKickerFault = false; + mCheckKickOffKickerFoul = false; if (agent == mLastKickOffTaker) { - PunishKickOffFault(mLastKickOffTaker); + PunishKickOffFoul(mLastKickOffTaker); return true; } } @@ -1232,7 +1257,7 @@ } #endif - if (CheckKickOffTakerFault()) + if (CheckKickOffTakerFoul()) { return; } @@ -1488,7 +1513,7 @@ SoccerBase::GetSoccerVar(*this,"Min2PlDistance",mMin2PlDistance); SoccerBase::GetSoccerVar(*this,"Min3PlDistance",mMin3PlDistance); SoccerBase::GetSoccerVar(*this,"MaxTouchGroupSize",mMaxTouchGroupSize); - //SoccerBase::GetSoccerVar(*this,"MaxFaultTime",mMaxFaultTime); + //SoccerBase::GetSoccerVar(*this,"MaxFoulTime",mMaxFoulTime); // cout << "MaxInside " << mMaxPlayersInsideOwnArea << endl << endl; Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2013-05-20 11:28:53 UTC (rev 350) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2013-05-22 14:59:02 UTC (rev 351) @@ -46,6 +46,29 @@ public: typedef std::list<boost::shared_ptr<AgentState> > TAgentStateList; + enum EFoulType + { + FT_Crowding, + FT_Touching, + FT_IllegalDefence, + FT_IllegalAttack, + FT_Incapable, + FT_KickOff + }; + + struct Foul + { + Foul(unsigned _index, EFoulType _type, boost::shared_ptr<AgentState> _agent) + : index(_index), + type(_type), + agent(_agent) + {} + int index; + EFoulType type; + boost::shared_ptr<AgentState> agent; + bool operator<(Foul const& other) const { return index < other.index; } + }; + public: SoccerRuleAspect(); virtual ~SoccerRuleAspect(); @@ -76,7 +99,7 @@ */ //salt::Vector3f RepositionInsidePos(salt::Vector3f initPos, int unum, TTeamIndex idx, float distance); - /** New rules for repositioning players that commit faults + /** New rules for repositioning players that commit fouls */ void ClearPlayersAutomatic(TTeamIndex idx); @@ -91,17 +114,17 @@ */ void ProcessAgentState(salt::Vector3f pos, int unum, TTeamIndex idx); - /** Reset the fault time counter for all players and also other counters + /** Reset the foul time counter for all players and also other counters */ - void ResetFaultCounter(TTeamIndex idx); + void ResetFoulCounter(TTeamIndex idx); - /** Reset the fault time counter for a given player + /** Reset the foul time counter for a given player */ - void ResetFaultCounterPlayer(int unum, TTeamIndex idx); + void ResetFoulCounterPlayer(int unum, TTeamIndex idx); - /**Analyse Faults from players and increase fault counter of offending players + /**Analyse Fouls from players and increase foul counter of offending players */ - void AnalyseFaults(TTeamIndex idx); + void AnalyseFouls(TTeamIndex idx); /** Check whether too many agents are touching */ @@ -146,7 +169,14 @@ */ salt::Vector2f GetFieldSize() const; + /** Get the foul history + */ + std::vector<Foul> GetFouls() const; + /** Get the foul history, starting from given foul index + */ + std::vector<Foul> GetFoulsSince(unsigned index) const; + void ResetAgentSelection(); void SelectNextAgent(); @@ -212,7 +242,7 @@ bool CheckOffside(); /** checks if kickoff taker has kicked the ball again before other players */ - bool CheckKickOffTakerFault(); + bool CheckKickOffTakerFoul(); /** moves the ball to pos setting its linear and angular velocity to 0 */ void MoveBall(const salt::Vector3f& pos); @@ -257,9 +287,9 @@ void SwapTeamSides(); /** - * Punish agent's fault committed during kickoff + * Punish agent's foul committed during kickoff */ - void PunishKickOffFault(boost::shared_ptr<oxygen::AgentAspect> agent); + void PunishKickOffFoul(boost::shared_ptr<oxygen::AgentAspect> agent); /** returns true if last kick was happenned in kick off */ bool WasLastKickFromKickOff( @@ -342,10 +372,10 @@ int mMaxPlayersInsideOwnArea; /** maximum number of players that may be in a single touch group */ int mMaxTouchGroupSize; - /** maximum time allowed for a player to commit a positional fault before being repositioned */ - int mMaxFaultTime; + /** maximum time allowed for a player to commit a positional foul before being repositioned */ + int mMaxFoulTime; - /* Useful arrays for dealing with agent state an faults */ + /* Useful arrays for dealing with agent state an fouls */ salt::Vector3f playerPos[12][3]; //Players Positions - not used int playerGround[12][3]; //Time Players are on the ground int playerNotStanding[12][3]; //Time Players are not standing (head up for more than 0.5s) @@ -356,7 +386,8 @@ int ordArr[12][3]; //Distance order of players (left/right team) float distGArr[12][3]; //Distance array to own goal (left/right team) int ordGArr[12][3]; //Distance order of players to own goal (left/right team) - int playerFaultTime[12][3]; //Time player is commiting a positional fault + int playerFoulTime[12][3]; //Time player is commiting a positional foul + EFoulType playerLastFoul[12][3]; //Type of last foul committed by player int numPlInsideOwnArea[3]; //Number of players inside own area int closestPlayer[3]; //Closest Player from each team float closestPlayerDist[3]; //Closest Player distance to ball from each team @@ -399,7 +430,10 @@ /** 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; + bool mCheckKickOffKickerFoul; + + /** complete foul history */ + std::vector<Foul> mFouls; }; DECLARE_CLASS(SoccerRuleAspect); Added: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.cpp (rev 0) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.cpp 2013-05-22 14:59:02 UTC (rev 351) @@ -0,0 +1,78 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: gamestateitem.cpp 259 2011-03-24 20:25:24Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include "soccerruleitem.h" +#include <soccerbase/soccerbase.h> +#include <agentstate/agentstate.h> + +using namespace zeitgeist; +using namespace oxygen; +using namespace std; + +SoccerRuleItem::SoccerRuleItem() + : MonitorItem(), + mLastFoul(0) +{ +} + +SoccerRuleItem::~SoccerRuleItem() +{ +} + +void SoccerRuleItem::GetInitialPredicates(PredicateList& pList) +{ + GetPredicates(pList); +} + +void SoccerRuleItem::AddFoul(SoccerRuleAspect::Foul const& foul, PredicateList& pList) +{ + Predicate& predicate = pList.AddPredicate(); + predicate.name = "foul"; + predicate.parameter.AddValue(foul.index); + predicate.parameter.AddValue((int)foul.type); + predicate.parameter.AddValue((int)foul.agent->GetTeamIndex()); + predicate.parameter.AddValue((int)foul.agent->GetUniformNumber()); +} + +void SoccerRuleItem::GetPredicates(PredicateList& pList) +{ + if (mSoccerRule.get() == 0) + { + return; + } + + vector<SoccerRuleAspect::Foul> newFouls = mSoccerRule->GetFoulsSince(mLastFoul); + for (unsigned i = 0; i < newFouls.size(); ++i) + { + AddFoul(newFouls[i], pList); + mLastFoul = newFouls[i].index; + } +} + +void SoccerRuleItem::OnLink() +{ + SoccerBase::GetSoccerRuleAspect(*this, mSoccerRule); +} + +void SoccerRuleItem::OnUnlink() +{ + mSoccerRule.reset(); +} Added: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.h (rev 0) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem.h 2013-05-22 14:59:02 UTC (rev 351) @@ -0,0 +1,64 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: gamestateitem.h 21 2009-01-14 14:38:57Z yxu $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef SOCCERRULEITEM_H +#define SOCCERRULEITEM_H + +#include <oxygen/monitorserver/monitoritem.h> +#include "soccerruleaspect.h" + +class SoccerRuleItem : public oxygen::MonitorItem +{ +public: + SoccerRuleItem(); + virtual ~SoccerRuleItem(); + + /** This function is called once for every MonitorSystem each time + * a new client connects. It should append predicates to a list + * that is sent using the active monitor + */ + virtual void GetInitialPredicates(oxygen::PredicateList& pList); + + /** This function will be called periodically to append predicates + to a list that is sent using the active monitor + */ + virtual void GetPredicates(oxygen::PredicateList& pList); + + /** sets the reference to the GameStateAspect */ + virtual void OnLink(); + + /** resets the reference to the GameStateAspect */ + virtual void OnUnlink(); + +protected: + boost::shared_ptr<SoccerRuleAspect> mSoccerRule; + + //! Last foul sent out to monitors + unsigned mLastFoul; + + void AddFoul(SoccerRuleAspect::Foul const& foul, oxygen::PredicateList& pList); + +}; + +DECLARE_CLASS(SoccerRuleItem) + +#endif // SOCCERRULEITEM_H + Added: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem_c.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem_c.cpp (rev 0) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleitem_c.cpp 2013-05-22 14:59:02 UTC (rev 351) @@ -0,0 +1,30 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: gamestateitem_c.cpp 9 2008-11-24 02:39:02Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "soccerruleitem.h" + +using namespace oxygen; + +void CLASS(SoccerRuleItem)::DefineClass() +{ + DEFINE_BASECLASS(MonitorItem); +} Modified: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2013-05-20 11:28:53 UTC (rev 350) +++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2013-05-22 14:59:02 UTC (rev 351) @@ -124,6 +124,7 @@ monitorServer = get($serverPath+'monitor') if (monitorServer != nil) monitorServer.registerMonitorItem('GameStateItem') + monitorServer.registerMonitorItem('SoccerRuleItem') end # install the TrainerCommandParser to parse commands received from a This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2013-05-20 11:28:56
|
Revision: 350 http://sourceforge.net/p/simspark/svn/350 Author: yxu Date: 2013-05-20 11:28:53 +0000 (Mon, 20 May 2013) Log Message: ----------- Merge branch 'open-source-paper' # By Xu Yuan (1) and hedayat (1) * open-source-paper: comments of the reviewers Add heterogeneous robot type to AgentState, so that it can be checked by rules. Modified Paths: -------------- trunk/spark/doc/papers/2013/opensource.tex Modified: trunk/spark/doc/papers/2013/opensource.tex =================================================================== --- trunk/spark/doc/papers/2013/opensource.tex 2013-04-24 20:11:40 UTC (rev 349) +++ trunk/spark/doc/papers/2013/opensource.tex 2013-05-20 11:28:53 UTC (rev 350) @@ -1,7 +1,7 @@ \documentclass{llncs} \usepackage[belowskip=-15pt,aboveskip=10pt]{caption} \usepackage[utf8]{inputenc} -\usepackage[disable]{todonotes} +\usepackage{todonotes} \usepackage{amsmath} \usepackage[hidelinks]{hyperref} \usepackage{cleveref} @@ -25,6 +25,8 @@ \input{#1.tikz} } +\newcommand{\review}[1]{\todo[inline,color=red]{REVIEW: #1}} + \renewcommand{\textfraction}{0.15} \renewcommand{\topfraction}{0.85} \renewcommand{\bottomfraction}{0.65} @@ -34,7 +36,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} -\title{SimSpark: An Open Source Robot Simulator Developed by RoboCup Community} +\title{SimSpark: An Open Source Robot Simulator Developed by the RoboCup Community} \author{Yuan Xu\inst{1} \and Hedayat Vatankhah\inst{2}} @@ -83,6 +85,8 @@ Furthermore, we will give the application examples of SimSpark in section \ref{s:application}. Finally, we will outline future development plans in section \ref{s:conclusion}. +\review{As a technical paper, it is better to add detailed description of the mechanism to guarantee the generality and the extendability of SimSpark.} + \section{Project Overview} \label{s:overview} @@ -102,6 +106,9 @@ \section{Spark} \label{s:spark} + +\review{a picture of the architecture would simplify reading may be including clients and monitor} + As a generic simulation environment, Spark provides a rich set of features to create, debug and modify multi-robot simulations. It has three main components, including the simulation engine, the object and memory management system, and the physics engine. Details about architecture and concepts of Spark have been described in \cite{Boedecker2008,OR05}. In this section, we describe the necessary changes for simulating 11 vs. 11 humanoid robot soccer game. @@ -131,8 +138,14 @@ So the physics computation and \textit{SimControlNode}s can run in parallel. Furthermore, the physics engine, e.g. Open Dynamic Engine\cite{Smith:ODE}, is modified to run in parallel by using Intel Threading Building Blocks\cite{tbb}. -In RoboCup 2012, the 11 vs. 11 humanoid robot (22 degree of freedom) soccer games were simulated in real time by computer with Intel Core i7-975 @3.33GHz CPU and 4G DDR3 RAM. \todo[color=yellow]{results of performance improvement, any benchmark?} +In RoboCup 2012, the 11 vs. 11 humanoid robot (22 degree of freedom) soccer games were simulated in real time by computer with Intel Core i7-975 @3.33GHz CPU and 4G DDR3 RAM. +\review{22 agents is great. Just to add that in such a setup, the soccerserver claims 'only' 160\% of an 800\% CPU availability even when run in as fast as possible mode. So there still might be space for improvement.} + +\review{it is nice to add some comparative evaluation of speed up by multi-threading.} + +\todo[color=yellow]{results of performance improvement, any benchmark?} + \section{RCSSServer3D} \label{s:rcssserver3d} @@ -332,7 +345,7 @@ occurs, but it is better, more predictable and more fair than the current model. Also, no new information is arrived to agents in that spare time and they cannot send new commands for that cycle. Hopefully, by using a new binary network protocol the network -traffic and therefore the latency will be reduced considerably. +traffic and therefore the latency will be reduced considerably.\review{this does not quite fit to the rest of section where you argue that the proxy exactly removes the need for such optimizations} Currently, an initial version of agent proxies is under development outside SimSpark project using Java. @@ -345,7 +358,7 @@ % The main goal of this project is to provide a flexible and extensible User Interface and Simulation Development Environment, that can be used to start, control and monitor different simulations using the Simspark server, agent and monitor processes, as well as incorporate several additional tools like for example a visual editor for robot models (like RsgEdit) or a debugging monitor for agents (like RoboViz). \section{Applications} -As a powerful robot simulator, SimSpark is gaining popularity in RoboCup, including Standard Platform League and Humanoid League. It is also widely used to teach artificial intelligence and robotic lectures. +As a powerful robot simulator, SimSpark is gaining popularity in RoboCup, including Standard Platform League and Humanoid League.\review{may be this is too obvious, but the main application is still 3D simulation league that is not mentioned here. It should be. That has the most impact as of today.} It is also widely used to teach artificial intelligence and robotic lectures. \label{s:application} % \paragraph{RoboCup Soccer Simulation League} Simulation 3D League. Since 2004, SimSpark has been used as a official competitions environment. Since then, research teams have developed useful research tools based on SimSpark. Some of these tools are also released as open source. @@ -384,12 +397,12 @@ The introduction of a humanoid robot model increase the realism of SimSpark, and gains popularity in research teams who have real robots. The increased number of players per team makes research slowly get back to the high level behaviors based on solid low level behavior for realistic humanoid robot teams. -SimSpark has undergone continuous development driven by the requirement of continuous research in multi-robot system. The following approaches are planned: +SimSpark has undergone continuous development driven by the requirement of continuous research in multi-robot system. The following extentions are planned: \begin{description} \item[Integration With Existing Robotic Frameworks] To enhance the usability of SimSpark for wider usage, and also to make it easier to develop and test their robotic software on SimSpark and to use the same code on real hardware, we aim to integrate SimSpark to an -existing robotic framework, such as Player and ROS. +existing robotic framework, such as ROS or Player. % Player is a well-known robotic framework which % can be used to control both real and simulated robots. We planned to integrate @@ -412,16 +425,18 @@ % who have developed programs for real robots using the framework to experiment % with SimSpark. -\item[Abstract Physics Layer] +\item[Physics Abstraction Layer] Relying on a single physics engine, i.e. ODE, hampers Simspark's flexibility. Thus, an abstract physics layer was development\cite{Held2010}, ODE and Bullet can be used as plugins with the abstract physics layer. However, current implementation has many drawbacks and difficult to maintenance. +\review{any plans to support physics calculations in GPU? Or is it done already?} + \item[Robot Model Importers] The usage of SimSpark will be extended when it has more robot models, however creating robot models is a time consuming task. The idea is to create model importers for different model format, so SimSpark will be able to use the robot model which is available in other simulators. \end{description} \section*{Acknowledgments} -We wish to thank other members in the Maintenance Committee of the RoboCup Soccer Simulation League, especially the original authors of SimSpark: M. K\"ogler, M. Rollmann, and O. Obst. Furthermore, thanks go to J. Boedecker for supporting us to work in the SimSpark project.\todo{other names here...} +We wish to thank other members in the Maintenance Committee of the RoboCup Soccer Simulation League, especially the original authors of SimSpark: M. K\"ogler, M. Rollmann, and O. Obst. Furthermore, thanks go to J. Boedecker for supporting us to work in the SimSpark project. \bibliographystyle{splncs03} \bibliography{reference} \end{document} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2013-04-24 20:11:48
|
Revision: 349 http://simspark.svn.sourceforge.net/simspark/?rev=349&view=rev Author: hedayat Date: 2013-04-24 20:11:40 +0000 (Wed, 24 Apr 2013) Log Message: ----------- Add heterogeneous robot type to AgentState, so that it can be checked by rules. Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg trunk/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp trunk/rcssserver3d/plugin/soccer/agentstate/agentstate.h trunk/rcssserver3d/plugin/soccer/agentstate/agentstate_c.cpp Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2013-04-12 09:04:57 UTC (rev 348) +++ trunk/rcssserver3d/ChangeLog 2013-04-24 20:11:40 UTC (rev 349) @@ -1,3 +1,11 @@ +2013-04-25 Hedayat Vatankhah <hed...@gm...> + + * data/rsg/agent/nao/nao_hetero.rsg: + * plugin/soccer/agentstate/agentstate.h: + * plugin/soccer/agentstate/agentstate.cpp: + * plugin/soccer/agentstate/agentstate_c.cpp: + - added robot type to agent state + 2012-11-25 Hedayat Vatankhah <hed...@gm...> * data/rsg/agent/nao/nao_hetero.rsg: Modified: trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg 2013-04-12 09:04:57 UTC (rev 348) +++ trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg 2013-04-24 20:11:40 UTC (rev 349) @@ -70,6 +70,7 @@ (nd AgentState (setName AgentState) + (setRobotType $type) (nd GameStatePerceptor) (nd HearPerceptor) (nd Transform Modified: trunk/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp 2013-04-12 09:04:57 UTC (rev 348) +++ trunk/rcssserver3d/plugin/soccer/agentstate/agentstate.cpp 2013-04-24 20:11:40 UTC (rev 349) @@ -76,6 +76,18 @@ } void +AgentState::SetRobotType(int type) +{ + mRobotType = type; +} + +int +AgentState::GetRobotType() const +{ + return mRobotType; +} + +void AgentState::SetID(const std::string& id, TPerceptType pt) { std::istringstream iss(id); @@ -238,7 +250,7 @@ GetLog()->Error() << "ERROR: (AgentState::OnUnlink) could not get game state\n"; return; } - + game_state->ReturnUniform(GetTeamIndex(), GetUniformNumber()); } Modified: trunk/rcssserver3d/plugin/soccer/agentstate/agentstate.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/agentstate/agentstate.h 2013-04-12 09:04:57 UTC (rev 348) +++ trunk/rcssserver3d/plugin/soccer/agentstate/agentstate.h 2013-04-24 20:11:40 UTC (rev 349) @@ -59,6 +59,12 @@ /** returns the uniform number as integer */ int GetUniformNumber() const; + /** Set the robot type. */ + void SetRobotType(int type); + + /** returns the robot type */ + int GetRobotType() const; + /** Set the object id for perceptors. * * This method is the same as SetUniformNumber for AgentState. @@ -97,25 +103,25 @@ /** Whether agent is selected */ bool IsSelected() const; - + /** Select agent */ void Select(bool s = true); - + /** Unselect agent */ void UnSelect(); - + /** Backup old touch group and create new empty one */ void NewTouchGroup(); - + /** Get the touch group of the previous step */ boost::shared_ptr<TouchGroup> GetOldTouchGroup(); - + /** Get the current touch group */ boost::shared_ptr<TouchGroup> GetTouchGroup(); - + /** Set the current touch group */ void SetTouchGroup(boost::shared_ptr<TouchGroup> group); - + protected: /** team index */ TTeamIndex mTeamIndex; @@ -123,6 +129,9 @@ /** uniform number */ int mUniformNumber; + /** robot type */ + int mRobotType; + /** motor temperature */ float mTemperature; @@ -161,7 +170,7 @@ /** is this agent selected */ bool mSelected; - + boost::shared_ptr<TouchGroup> mOldTouchGroup; boost::shared_ptr<TouchGroup> mTouchGroup; Modified: trunk/rcssserver3d/plugin/soccer/agentstate/agentstate_c.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/agentstate/agentstate_c.cpp 2013-04-12 09:04:57 UTC (rev 348) +++ trunk/rcssserver3d/plugin/soccer/agentstate/agentstate_c.cpp 2013-04-24 20:11:40 UTC (rev 349) @@ -25,8 +25,25 @@ using namespace boost; using namespace oxygen; +FUNCTION(AgentState,setRobotType) +{ + int inType; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in.begin(), inType)) + ) + { + return false; + } + + obj->SetRobotType(inType); + return true; +} + void CLASS(AgentState)::DefineClass() { DEFINE_BASECLASS(ObjectState); + DEFINE_FUNCTION(setRobotType); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kla...@us...> - 2013-04-12 09:05:05
|
Revision: 348 http://simspark.svn.sourceforge.net/simspark/?rev=348&view=rev Author: klausdorer Date: 2013-04-12 09:04:57 +0000 (Fri, 12 Apr 2013) Log Message: ----------- adjusted rsg files to be able to pass heterogeneous type information introduced the possibility to specify different joint max speeds added two heterogeneous types: longer leg and faster foot pitch Modified Paths: -------------- trunk/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg trunk/rcssserver3d/data/rsg/agent/nao/naoarm.rsg trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg trunk/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg trunk/rcssserver3d/rcssserver3d/naorobottypes.rb Modified: trunk/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg 2013-03-30 00:43:18 UTC (rev 347) +++ trunk/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg 2013-04-12 09:04:57 UTC (rev 348) @@ -6,14 +6,9 @@ $Path_Body1 $Path_Body2 $Anchor_X $Anchor_Y $Anchor_Z $Axis_X $Axis_Y $Axis_Z - $Min $Max + $MinDeg $MaxDeg + $MaxAbsSpeed ) - - (def $PI 3.14159265) - ;(def $MinDeg (eval $Min * (eval 180.0 / $PI))) - ;(def $MaxDeg (eval $Max * (eval 180.0 / $PI))) - (def $MinDeg $Min) - (def $MaxDeg $Max) ; There are 2 types of motor installed on the real Nao, each type has ; 2 types of "Reduction ratio". @@ -23,7 +18,7 @@ ; We don't need to follow them totally that different hingeeffector is using ; different types of motor. ; All the hingeeffector uses the 351.77 - (def $MaxAbsSpeed (eval $PI * (eval 351.77 / 180.0))) + ; (def $MaxAbsSpeed (eval $PI * (eval 351.77 / 180.0))) ; ;Hinge Joint Parameters Modified: trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg 2013-03-30 00:43:18 UTC (rev 347) +++ trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg 2013-04-12 09:04:57 UTC (rev 348) @@ -106,7 +106,9 @@ ; ;The neck and head part ; - (importScene rsg/agent/nao/naoneckhead.rsg $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) + (importScene rsg/agent/nao/naoneckhead.rsg + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) ; @@ -114,28 +116,32 @@ ; (importScene rsg/agent/nao/naoarm.rsg 1 r - $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) ; ;The Left Arm ; (importScene rsg/agent/nao/naoarm.rsg -1 l - $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) ; ;The Right Leg ; (importScene rsg/agent/nao/naoleg.rsg 1 r - $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) ; ;The Left Leg ; (importScene rsg/agent/nao/naoleg.rsg -1 l - $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj) + $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj + $type) );end of nd Space Modified: trunk/rcssserver3d/data/rsg/agent/nao/naoarm.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/naoarm.rsg 2013-03-30 00:43:18 UTC (rev 347) +++ trunk/rcssserver3d/data/rsg/agent/nao/naoarm.rsg 2013-04-12 09:04:57 UTC (rev 348) @@ -8,6 +8,7 @@ ; (templ $LRFactor $LeftOrRight $Torso_X $Torso_Y $Torso_Z $loadObj + $type ) ; @@ -91,8 +92,12 @@ ; ;Joint Parameters ; + (def $PI 3.14159265) + (def $MaxAbsJointSpeed (eval $PI * (eval 351.77 / 180.0))) + (def $aj1_min -120) (def $aj1_max 120) + (def $aj1_max_abs_speed $MaxAbsJointSpeed) (def $right_aj2_min -95) (def $left_aj2_min -1) @@ -105,9 +110,11 @@ (def $aj2_max_c1 (eval (eval $right_aj2_max + $left_aj2_max) * 0.5)) (def $aj2_max_c2 (eval (eval $right_aj2_max - $left_aj2_max) * 0.5)) (def $aj2_max (eval $aj2_max_c1 + (eval $LRFactor * $aj2_max_c2))) + (def $aj2_max_abs_speed $MaxAbsJointSpeed) (def $aj3_min -120) (def $aj3_max 120) + (def $aj3_max_abs_speed $MaxAbsJointSpeed) (def $right_aj4_min -1) (def $left_aj4_min -90) @@ -120,6 +127,7 @@ (def $aj4_max_c1 (eval (eval $right_aj4_max + $left_aj4_max) * 0.5)) (def $aj4_max_c2 (eval (eval $right_aj4_max - $left_aj4_max) * 0.5)) (def $aj4_max (eval $aj4_max_c1 + (eval $LRFactor * $aj4_max_c2))) + (def $aj4_max_abs_speed $MaxAbsJointSpeed) (def $aj2_Anchor_X (eval -1 * $UpperarmRelShoulderX)) @@ -152,7 +160,8 @@ ../sphereBody ../../body/boxBody 0 0 0 1 0 0 ;1 -1 -1 - $aj1_min $aj1_max) + $aj1_min $aj1_max + $aj1_max_abs_speed) ) ; @@ -175,11 +184,12 @@ (importScene rsg/agent/nao/box_physics.rsg $UpperArmSizeX $UpperArmSizeY $UpperArmSizeZ $UpperArmMass) (importScene rsg/agent/nao/hingejoint.rsg - $Joint2PerName $Joint2EffName - ../boxBody $ShoulderBodyPath - $aj2_Anchor_X $aj2_Anchor_Y $aj2_Anchor_Z - 0 0 1 ;2 -1 -1 - $aj2_min $aj2_max) + $Joint2PerName $Joint2EffName + ../boxBody $ShoulderBodyPath + $aj2_Anchor_X $aj2_Anchor_Y $aj2_Anchor_Z + 0 0 1 ;2 -1 -1 + $aj2_min $aj2_max + $aj2_max_abs_speed) ) ; @@ -195,11 +205,12 @@ (importScene rsg/agent/nao/sphere_physics_nocollider.rsg $ElbowRadius $ElbowMass) (importScene rsg/agent/nao/hingejoint.rsg - $Joint3PerName $Joint3EffName - ../sphereBody $UpperarmBodyPath - 0 0 0 - 0 1 0 ;1 -1 -1 - $aj3_min $aj3_max) + $Joint3PerName $Joint3EffName + ../sphereBody $UpperarmBodyPath + 0 0 0 + 0 1 0 ;1 -1 -1 + $aj3_min $aj3_max + $aj3_max_abs_speed) ) ; @@ -221,11 +232,12 @@ (importScene rsg/agent/nao/box_physics.rsg $LowerArmSizeX $LowerArmSizeY $LowerArmSizeZ $LowerArmMass) (importScene rsg/agent/nao/hingejoint.rsg - $Joint4PerName $Joint4EffName - ../boxBody $ElbowBodyPath - $aj4_Anchor_X $aj4_Anchor_Y $aj4_Anchor_Z - 0 0 1 ;2 -1 -1 - $aj4_min $aj4_max) + $Joint4PerName $Joint4EffName + ../boxBody $ElbowBodyPath + $aj4_Anchor_X $aj4_Anchor_Y $aj4_Anchor_Z + 0 0 1 ;2 -1 -1 + $aj4_min $aj4_max + $aj4_max_abs_speed) (nd ObjectState (setID $LowerarmName) Modified: trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg 2013-03-30 00:43:18 UTC (rev 347) +++ trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg 2013-04-12 09:04:57 UTC (rev 348) @@ -8,6 +8,7 @@ ; (templ $LRFactor $LeftOrRight $Torso_X $Torso_Y $Torso_Z $loadObj + $type ) ; @@ -56,7 +57,8 @@ (def $ThighRelHip2_X 0) (def $ThighRelHip2_Y 0.01) - (def $ThighRelHip2_Z -0.04) + ;(def $ThighRelHip2_Z -0.04) + (def $ThighRelHip2_Z (eval "NaoType["$type"]['ThighRelHip2_Z']")) (def $ShankRelThigh_X 0) (def $ShankRelThigh_Y 0.005) @@ -125,8 +127,12 @@ ; ;Joint Parameters ; + (def $PI 3.14159265) + (def $MaxAbsJointSpeed (eval $PI * (eval 351.77 / 180.0))) + (def $lj1_min -90) (def $lj1_max 1) + (def $lj1_max_abs_speed $MaxAbsJointSpeed) (def $right_lj2_min -45) (def $left_lj2_min -25) @@ -139,15 +145,19 @@ (def $lj2_max_c1 (eval (eval $right_lj2_max + $left_lj2_max) * 0.5)) (def $lj2_max_c2 (eval (eval $right_lj2_max - $left_lj2_max) * 0.5)) (def $lj2_max (eval $lj2_max_c1 + (eval $LRFactor * $lj2_max_c2))) + (def $lj2_max_abs_speed $MaxAbsJointSpeed) (def $lj3_min -25) (def $lj3_max 100) + (def $lj3_max_abs_speed $MaxAbsJointSpeed) (def $lj4_min -130) (def $lj4_max 1) + (def $lj4_max_abs_speed $MaxAbsJointSpeed) (def $lj5_min -45) (def $lj5_max 75) + (def $lj5_max_abs_speed (eval "NaoType["$type"]['lj5_max_abs_speed']")) (def $right_lj6_min -25) (def $left_lj6_min -45) @@ -160,6 +170,7 @@ (def $lj6_max_c1 (eval (eval $right_lj6_max + $left_lj6_max) * 0.5)) (def $lj6_max_c2 (eval (eval $right_lj6_max - $left_lj6_max) * 0.5)) (def $lj6_max (eval $lj6_max_c1 + (eval $LRFactor * $lj6_max_c2))) + (def $lj6_max_abs_speed (eval "NaoType["$type"]['lj6_max_abs_speed']")) (def $lj1_axis_x -0.7071) (def $lj1_axis_y 0) @@ -193,7 +204,8 @@ ../sphereBody ../../body/boxBody 0 0 0 $lj1_axis_x $lj1_axis_y $lj1_axis_z - $lj1_min $lj1_max) + $lj1_min $lj1_max + $lj1_max_abs_speed) ) ; @@ -212,7 +224,8 @@ ../sphereBody $Hip1BodyPath 0 0 0 ;anchor 0 1 0 ;axis - $lj2_min $lj2_max) + $lj2_min $lj2_max + $lj2_max_abs_speed) ) ; @@ -243,11 +256,12 @@ (importScene rsg/agent/nao/hingejoint.rsg - $Joint3PerName $Joint3EffName - ../boxBody $Hip2BodyPath - $lj3_Anchor_X $lj3_Anchor_Y $lj3_Anchor_Z - 1 0 0 ;1 -1 -1 - $lj3_min $lj3_max) + $Joint3PerName $Joint3EffName + ../boxBody $Hip2BodyPath + $lj3_Anchor_X $lj3_Anchor_Y $lj3_Anchor_Z + 1 0 0 ;1 -1 -1 + $lj3_min $lj3_max + $lj3_max_abs_speed) ) @@ -277,11 +291,12 @@ ) (importScene rsg/agent/nao/hingejoint.rsg - $Joint4PerName $Joint4EffName - ../boxBody $ThighBodyPath - 0 -0.01 0.045 - 1 0 0 ;0 -1 -1 - $lj4_min $lj4_max) + $Joint4PerName $Joint4EffName + ../boxBody $ThighBodyPath + 0 -0.01 0.045 + 1 0 0 ;0 -1 -1 + $lj4_min $lj4_max + $lj4_max_abs_speed) ) @@ -301,7 +316,8 @@ ../sphereBody $ShankBodyPath 0 0 0 1 0 0 ;0 -1 -1 - $lj5_min $lj5_max) + $lj5_min $lj5_max + $lj5_max_abs_speed) ) @@ -336,11 +352,12 @@ ) (importScene rsg/agent/nao/hingejoint.rsg - $Joint6PerName $Joint6EffName - ../boxBody $AnkleBodyPath - 0 -0.03 0.035 - 0 1 0 ;1 -1 -1 - $lj6_min $lj6_max) + $Joint6PerName $Joint6EffName + ../boxBody $AnkleBodyPath + 0 -0.03 0.035 + 0 1 0 ;1 -1 -1 + $lj6_min $lj6_max + $lj6_max_abs_speed) (nd ObjectState (setID $FootName) Modified: trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2013-03-30 00:43:18 UTC (rev 347) +++ trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2013-04-12 09:04:57 UTC (rev 348) @@ -2,7 +2,9 @@ (RSG 0 1) ( - (templ $Torso_X $Torso_Y $Torso_Z $loadObj) + (templ $Torso_X $Torso_Y $Torso_Z $loadObj + $type + ) ; ;neck parameter @@ -27,14 +29,19 @@ ; ;Head effector 1 parameter ; + (def $PI 3.14159265) + (def $MaxAbsJointSpeed (eval $PI * (eval 351.77 / 180.0))) + (def $he1_min -120) (def $he1_max 120) + (def $he1_max_abs_speed $MaxAbsJointSpeed) ; ;Head effector 2 parameter ; (def $he2_min -45) (def $he2_max 45) + (def $he2_max_abs_speed $MaxAbsJointSpeed) ; ;Begin construct neck @@ -51,7 +58,8 @@ ../capsuleBody ../../body/boxBody 0 0 0 0 0 1 - $he1_min $he1_max) + $he1_min $he1_max + $he1_max_abs_speed) ) ; @@ -84,7 +92,8 @@ ;../boxBody ../../body/boxBody 0 0 -0.005 1 0 0 - $he2_min $he2_max) + $he2_min $he2_max + $he2_max_abs_speed) (nd RestrictedVisionPerceptor (setViewCones 120 120) Modified: trunk/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg 2013-03-30 00:43:18 UTC (rev 347) +++ trunk/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg 2013-04-12 09:04:57 UTC (rev 348) @@ -9,6 +9,7 @@ $Axis2_X $Axis2_Y $Axis2_Z $Min0 $Max0 $Min1 $Max1 + $MaxAbsSpeed ) (def $PI 3.14159265) @@ -26,7 +27,6 @@ (def $Stop_ERP 0.8) (def $FudgeFactor 1e-5) (def $Bounce 1) - (def $MaxAbsSpeed (eval $PI * (eval 351.77 / 180.0))) (nd UniversalJoint (attach $Path_Body1 $Path_Body2) Modified: trunk/rcssserver3d/rcssserver3d/naorobottypes.rb =================================================================== --- trunk/rcssserver3d/rcssserver3d/naorobottypes.rb 2013-03-30 00:43:18 UTC (rev 347) +++ trunk/rcssserver3d/rcssserver3d/naorobottypes.rb 2013-04-12 09:04:57 UTC (rev 348) @@ -1,6 +1,8 @@ NaoType = [ # Type 0 (Standard Nao) -{'tl' => 0.1}, +{'ThighRelHip2_Z' => -0.04, 'lj5_max_abs_speed' => 6.1395, 'lj6_max_abs_speed' => 6.1395}, # Type 1 -{'tl' => 0.12} +{'ThighRelHip2_Z' => -0.08, 'lj5_max_abs_speed' => 6.1395, 'lj6_max_abs_speed' => 6.1395}, +# Type 2 +{'ThighRelHip2_Z' => -0.04, 'lj5_max_abs_speed' => 9.21, 'lj6_max_abs_speed' => 4.605} ] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2013-03-30 00:43:27
|
Revision: 347 http://simspark.svn.sourceforge.net/simspark/?rev=347&view=rev Author: yxu Date: 2013-03-30 00:43:18 +0000 (Sat, 30 Mar 2013) Log Message: ----------- submit open-source-paper * open-source-paper: submit spell checking draft 1 (in 8 pages) future work Modified Paths: -------------- trunk/spark/doc/papers/2013/joint.tikz trunk/spark/doc/papers/2013/opensource.tex trunk/spark/doc/papers/2013/reference.bib Modified: trunk/spark/doc/papers/2013/joint.tikz =================================================================== --- trunk/spark/doc/papers/2013/joint.tikz 2013-03-29 21:11:54 UTC (rev 346) +++ trunk/spark/doc/papers/2013/joint.tikz 2013-03-30 00:43:18 UTC (rev 347) @@ -1,5 +1,5 @@ \begin{tikzpicture} - \tikzstyle{module}=[draw, minimum height=1cm, minimum width=2cm] + \tikzstyle{module}=[draw, minimum height=0.9cm, minimum width=2cm] \node[module] (sc) {\shortstack{Stiffness\\ Control}}; \draw[<-] (sc) -- node[at end, above]{$k_s$} ++(-1.6,0); @@ -26,9 +26,9 @@ \draw[->] ($(ps.south east)!0.7!(ps.south west)$) -- ++(0,-0.2) -| node[above, near start]{$\Delta{Q}^+$} (bl); - \node[module] (bat) at (6, -1.7) {Battery}; + \node[module, minimum height=0.5cm] (bat) at (6, -1.3) {Battery}; \draw[->] ($(ps.south east)!0.3!(ps.south west)$) |- node[above, near end]{$E$} (bat); \draw[->] (bat) -| node[above, near start] {On/Off} (sc); - \draw[dashed] (-1.3,-1.1) rectangle (9.9,1.8) node[anchor=north east] {Servo Motor Model}; + \draw[dashed] (-1.3,-0.8) rectangle (9.9,1.7) node[anchor=north east] {Servo Motor Model}; \end{tikzpicture} \ No newline at end of file Modified: trunk/spark/doc/papers/2013/opensource.tex =================================================================== --- trunk/spark/doc/papers/2013/opensource.tex 2013-03-29 21:11:54 UTC (rev 346) +++ trunk/spark/doc/papers/2013/opensource.tex 2013-03-30 00:43:18 UTC (rev 347) @@ -1,6 +1,7 @@ \documentclass{llncs} +\usepackage[belowskip=-15pt,aboveskip=10pt]{caption} \usepackage[utf8]{inputenc} -\usepackage{todonotes} +\usepackage[disable]{todonotes} \usepackage{amsmath} \usepackage[hidelinks]{hyperref} \usepackage{cleveref} @@ -71,16 +72,15 @@ Using simulation for algorithm development and testing makes thing easier. % \paragraph{History} -\textit{SimSpark}, a multi-robot simulator based on the generic components of the Spark\cite{OR05} physical multi-agent simulation system, has been used in the RoboCup Soccer Simulation League since 2004. +SimSpark, a multi-robot simulator based on the generic components of the Spark\cite{OR05} physical multi-agent simulation system, has been used in the RoboCup Soccer Simulation League since 2004. The project was registered as open source project in SourceForge in 2004, it has an established code base with development increasing year-over-year. As the result, RoboCup soccer simulations have changed significantly over the years, going from rather abstract agent representations to more and more realistic humanoid robot games\cite{Boedecker2008,usermanual}. Thanks to the flexibility of the Spark system, these transitions were achieved with little changes to the simulator's core architecture. -In this paper we describe the recent development of \textit{SimSpark} project, which make the \textit{SimSpark} possible to simulate 11 vs. 11 humanoid robot soccer games in real time\todo{is it real time in RoboCup 2012?}. -In section \ref{s:overview}, we will give an overview of \textit{SimSpark} project since 2008. After that, we will describe the development of the \textit{Spark} simulation platform in section \ref{s:spark}. -In section \ref{s:rcssserver3d}, we will briefly describe the implementation of RoboCup 3D Soccer Simulator -- \textit{RCSSServer3D}. +In this paper we describe the recent development of SimSpark project, which make the SimSpark possible to simulate 11 vs. 11 humanoid robot soccer games in real time\todo{is it real time in RoboCup 2012?}. +In section \ref{s:overview}, we will give an overview of the SimSpark project since 2008. After that, we will describe the development of the Spark simulation platform in section \ref{s:spark} and the implementation of RoboCup 3D Soccer Simulator in section \ref{s:rcssserver3d}. We will introduce some new features for RoboCup 2013 in section \ref{s:ongoing}. -Furthermore, we will discuss the application of \textit{SimSpark} not only in simulation league but also other leagues with real robots in section \ref{s:application}. +Furthermore, we will give the application examples of SimSpark in section \ref{s:application}. Finally, we will outline future development plans in section \ref{s:conclusion}. \section{Project Overview} @@ -102,11 +102,11 @@ \section{Spark} \label{s:spark} -As a generic simulation environment, Spark provides a rich set of features to create, debug and modify multi-robot simulation. +As a generic simulation environment, Spark provides a rich set of features to create, debug and modify multi-robot simulations. It has three main components, including the simulation engine, the object and memory management system, and the physics engine. Details about architecture and concepts of Spark have been described in \cite{Boedecker2008,OR05}. In this section, we describe the necessary changes for simulating 11 vs. 11 humanoid robot soccer game. -However changes to the simulator core were never customized for the soccer simulation. -First, a set of sensors of humanoid robot are implemented as plugins. Second, multi-threads supporting takes advantage of multi-cores in modern CPU to be able to run in real time. +However changes to the simulator core were never specialized for the soccer simulation. +% First, a set of sensors of humanoid robot are implemented as plugins. Second, multi-threads supporting takes advantage of multi-cores in modern CPU to be able to run in real time. \paragraph{Sensor Plugins} Sensors of a robot allows awareness of the robot's state and the environment. @@ -116,8 +116,8 @@ Additionally, a more realistic camera which delivers images rendered via OpenGL hardware accelerated offscreen buffers is implemented. Details of these sensors can be found in \cite{usermanual}. \paragraph{Multi-threads Supporting} -In modern time, computers have a processor with multi-cores or even multi-CPUs. -This improves the performance greatly, but only the multi-threaded program can benefit. +% In modern time, computers have a processor with multi-cores or even multi-CPUs. +% This improves the performance greatly, but only the multi-threaded program can benefit. One great feature of SimSpark is switching between single thread mode and multi-threads mode. The multi-threads mode can improve the performance in computer with multi-cores processor, but the single thread mode is also useful for developing the simulator. @@ -138,7 +138,8 @@ As the competition environment for the Soccer Simulation 3D League at RoboCup, RCSSServer3D simulates the soccer field where two team of robots play soccer game. -In its initial version players were modeled as spheres in a physical three dimensional world. Now it supports humanoid players with articulated bodies. In particular, the soccer environment and rules are implemented in the simulation, and the NAO robot manufactured by Aldebaran Robotics is modeled. +In its initial version players were modeled as spheres in a physical three dimensional world. Now it supports humanoid players with articulated bodies. +% In particular, the soccer environment and rules are implemented in the simulation, and the NAO robot manufactured by Aldebaran Robotics is modeled. \paragraph{Soccer Simulation} Most rules of the soccer game are judged by an automatic rule set that enforces the basic soccer rule set. @@ -153,35 +154,34 @@ sensors described in section \ref{s:spark}, to provide a widespread information base for agent development. -There are differences between simulated NAO and real NAO. For example, the left hip and the right hip in the real NAO are physically connected by one motor so they cannot be controlled independently. The simulated robot has a motor for each joint. Furthermore, the simulated robot gets positions of objects via virtual vision sensor, while the real robot has to process images to understand the world. Never the less, this NAO model enables RCSSServer3D as a good humanoid robot research platform. +There are differences between simulated NAO and real NAO. For example, the left hip and the right hip in the real NAO are physically connected by one motor so they cannot be controlled independently. The simulated robot has one motor for each joint. Furthermore, the simulated robot gets positions of objects via virtual vision sensor, while the real robot has to process images to understand the world. Nevertheless, this NAO model enables RCSSServer3D to be a good humanoid robot research platform. \section{Experimental Features} \label{s:ongoing} -For getting more realistic simulation, some new features are proposed and implemented, including realistic motor, heterogeneous robots, and agent proxies. Furthermore, a new graphic user interface is implemented for better user experiences. +For getting more realistic simulation, some new features are proposed and implemented, including realistic motor, heterogeneous robots, and agent proxies. +% Furthermore, a new graphic user interface is implemented for better user experiences. These experimental features probably will be used in RoboCup 2013 for the first time. \subsection{Realistic Motor} NAO robot has twenty-one motor joints as its actuators. -The simulation engine, e.g. ODE, provides a simple model of real life servos: +The simulation engine, i.e. ODE, provides a simple model of real life servos: the motor brings the body up to speed in one step; and provides force that is not more than is allowed. The simple motor model is one reason for the unrealistic simulation results. -Furthermore, some aspects like stiffness control, power consumption and temperature regulation, are missing but are also important for robotics. -In this section, we proposed and implemented a realistic motor model. More details and experimental results are given in \cite{Xu2012}. +% Furthermore, some aspects like stiffness control, power consumption and temperature regulation, are missing but are also important for robotics. +In this section, we proposed and implemented a realistic motor model. More details and experimental results are described in \cite{Xu2012}. \paragraph{Stiffness} -The stiffness determines how strong the motor is. The value is from 0.0 -to 1.0, 0 means the motor is off and 1 means the motor is running at -full power. In the real robot, -this percentage is the maximum electric current applied to the motor. Setting the -stiffness to 0.5 means that the electric current limitation is reduced -to 50\%. +The stiffness determines how strong the motor is. +% The value is from 0.0 to 1.0, 0 means the motor is off and 1 means the motor is running at full power. +In the real robot, this percentage is the maximum electric current applied to the motor. +% Setting the stiffness to 0.5 means that the electric current limitation is reduced to 50\%. For a DC motor, the electric current, $I$, determines the output torque, $\tau = K_\tau I \label{eq:tau-i}$; -where $K_\tau$ is the torque constant of the motor. $K_\tau$ can be found in the -specifications of motor, e.g. \cite{naoqi}. -The simulation engine can specified the maximum torque of the servo, therefore the +where $K_\tau$ is the torque constant of the motor, and can be found in the +specification. +The simulation engine can specify the maximum torque of the servo, therefore the stiffness control can be easily implemented by setting the maximum torque of the simulated servo: \begin{align} @@ -192,17 +192,14 @@ denotes the maximum torque of the servo when stiffness is 1. \paragraph{Power Consumption} -Another important aspect besides the motor's performance is its -power consumption: how much energy does it cost to run. -The robot is powered by a battery with limited energy, and has to walk during the +Another important aspect of real motor is power consumption. +Because the robot is powered by a battery with limited energy, and has to walk during the game. -An even more important factor in energy consumption is -that the motor can overheat if it consumes too much energy and -becomes too hot. -In the real robot, the temperature of each motor is measured, and the motor shuts down +Furthermore, the motor can overheat if it consumes too much energy and becomes too hot. +In real robots, the temperature of each motor is measured, and the motor shuts down when the temperature is too high. -DC motors are based on this equation: +DC motors can be modeled by the following equation: $U = U_e + IR \label{eq:u-ir} = K_e \dot{\theta} \label{eq:u-ke}$; where $U$ is the voltage of input, $U_e$ is the back electromotive force (EMF), $I$ is the electric current, $R$ is resistance, @@ -221,32 +218,31 @@ \end{equation} where $\Delta{}t$ is the time step of the simulation, and $P_t$ is the power consumed at time $t$. For the overall power consumption, the energy consumed by devices other than motors, -e.g. mainboard, CPU, camera, etc. has to be added. It is the power -consumption of the NAO robot in an idle state (all motors are off), and measured to be 33 W. -\Cref{fig:battery} compares the simulation result of this model to -reality. +e.g. main board, CPU, camera, etc. has to be counted. +% \Cref{fig:battery} compares the simulation result of this model to +% reality. -\begin{figure} - \centering - \begin{minipage}{0.49\columnwidth} - \centering - \pgfplotsset{width=0.9\columnwidth,height=7cm} - \inputtikz{battery} - \caption{Power consumption of the real and the simulated NAO robot in action. - The electric current is the summary of all motors. - In this example, the robot turns left for 5 minutes, then -stands for 1 minutes and then turns right for 5 minutes. This is shown by the change of electric current.} - \label{fig:battery} - \end{minipage}\hfill{} - \begin{minipage}{0.49\columnwidth} - \centering - \pgfplotsset{width=0.9\columnwidth,height=7cm} - \inputtikz{joint-temp-LKneePitch} - \caption{The temperature of the (knee pitch) motor in the simulation and the real NAO robot. The green background is the electric current in the real robot. Note that the temperature of real NAO has accuracy of 1 $^{\circ}$C.\newline - } - \label{fig:joint-temperature} - \end{minipage} -\end{figure} +% \begin{figure} +% \centering +% \begin{minipage}{0.49\columnwidth} +% \centering +% \pgfplotsset{width=0.9\columnwidth,height=7cm} +% \inputtikz{battery} +% \caption{Power consumption of the real and the simulated NAO robot in action. +% The electric current is the summary of all motors. +% In this example, the robot turns left for 5 minutes, then +% stands for 1 minutes and then turns right for 5 minutes. This is shown by the change of electric current.} +% \label{fig:battery} +% \end{minipage}\hfill{} +% \begin{minipage}{0.49\columnwidth} +% \centering +% \pgfplotsset{width=0.9\columnwidth,height=7cm} +% \inputtikz{joint-temp-LKneePitch} +% \caption{The temperature of the (knee pitch) motor in the simulation and the real NAO robot. The green background is the electric current in the real robot. Note that the temperature of real NAO has accuracy of 1 $^{\circ}$C.\newline +% } +% \label{fig:joint-temperature} +% \end{minipage} +% \end{figure} \paragraph{Temperature Regulation} We model the temperature and heat of the motor with the following equations: @@ -255,27 +251,28 @@ \Delta{}Q &= C\Delta{}T \end{align} where $T$ is the temperature of the motor, $T_e$ -is the temperature of the environment, but it is the internal temperature -of motor, so it is higher than outside and differs from motor to -motor, $\Delta{}Q^+$ is the heat produced by the motor, $\Delta{}Q^-$ is -the heat transferred from the motor to the environment, $\Delta{}Q$ is the -heat changing, $\lambda$ is thermal conductivity which indicates the -ability of a motor to conduct heat, and $C$ is the heat capacity of +is the environment temperature inside the motor, so it is higher than outside and differs from motor to motor, $\Delta{}Q$ is the +heat changing, $\Delta{}Q^+$ is the heat produced by the motor, $\Delta{}Q^-$ is +the heat transferred from the motor to the environment, $\lambda$ is thermal conductivity which indicates the ability of a motor to conduct heat, and $C$ is the heat capacity of the motor, which can be seen as constant. Finally, the temperature of the motor at time $t+\Delta{}t$ can be solved as: \begin{equation} \label{eq:motor-temp} T_{t+\Delta{}t} = T_t + \Delta{}T = T_t + \frac{[I^2R-\lambda(T_t-T_e)]\Delta{}t}{C} \end{equation} -In this model, we need to determine $T_e$, $\lambda$, and $C$ by experiments. It can be formulate as a classic linear regression problem. +In this model, we need to determine $T_e$, $\lambda$, and $C$ by experiments. +% It can be formulate as a classic linear regression problem. A sequence values of $\Delta{}t$, $T_t$, and $I^2R$ can be measured by experiment, therefore the optimum parameters of \cref{eq:motor-temp} is determined. -After determining the parameters in the \cref{eq:motor-temp}, we can use this model to simulate motor temperature. In \Cref{fig:joint-temperature}, the simulated temperature is compared with data from the real robot. +% After determining the parameters in the \cref{eq:motor-temp}, we can use this model to simulate motor temperature. +% In \Cref{fig:joint-temperature}, the simulated temperature is compared with data from the real robot. The whole process of joint simulation is summarized in -\Cref{fig:joint}: stiffness $k_s$ is simulated by setting the maximum torque -of the motor $\tau_{max}$; the final maximum torque $\tau_m$ used by simulation engine is calculated by temperature regulation; and the simulation engine computes the resulted angle -and torque applied; in the end, the consumed power and temperature are -computed by \cref{eq:motor-power,eq:motor-temp} respectively. When the battery is empty, the maximum torque $\tau_{max}$ is set to 0 to turn off the motor. +\Cref{fig:joint}. +% stiffness $k_s$ is simulated by setting the maximum torque +% of the motor $\tau_{max}$; the final maximum torque $\tau_m$ used by simulation engine is calculated by temperature regulation; and the simulation engine computes the resulted angle +% and torque applied; in the end, the consumed power and temperature are +% computed by \cref{eq:motor-power,eq:motor-temp} respectively. +When the battery is empty, the maximum torque $\tau_{max}$ is set to 0 to turn off the motor. \begin{figure} \centering \inputtikz{joint} @@ -340,37 +337,34 @@ Currently, an initial version of agent proxies is under development outside SimSpark project using Java. -\subsection{SimSpark GUI} -\todo{SimSpark GUI: \url{http://simspark.sourceforge.net/wiki/index.php/Graphical_User_Interface}} +% \subsection{SimSpark GUI} +% \todo{SimSpark GUI: \url{http://simspark.sourceforge.net/wiki/index.php/Graphical_User_Interface}} -NOTE: It will be merged to trunk soon. So it is almost complete. +% NOTE: It will be merged to trunk soon. So it is almost complete. -The main goal of this project is to provide a flexible and extensible User Interface and Simulation Development Environment, that can be used to start, control and monitor different simulations using the Simspark server, agent and monitor processes, as well as incorporate several additional tools like for example a visual editor for robot models (like RsgEdit) or a debugging monitor for agents (like RoboViz). +% The main goal of this project is to provide a flexible and extensible User Interface and Simulation Development Environment, that can be used to start, control and monitor different simulations using the Simspark server, agent and monitor processes, as well as incorporate several additional tools like for example a visual editor for robot models (like RsgEdit) or a debugging monitor for agents (like RoboViz). \section{Applications} +As a powerful robot simulator, SimSpark is gaining popularity in RoboCup, including Standard Platform League and Humanoid League. It is also widely used to teach artificial intelligence and robotic lectures. + \label{s:application} -\paragraph{RoboCup Soccer Simulation League} -In RoboCup 2004, SimSpark was successfully used for the first official competition in RoboCup Simulation 3D League. Since then, it is used as a standard research platform and test bed\todo{How many teams in last RoboCup?}. -Simulation teams also developed useful research tools based on SimSpark. Some of these tools are also released as open source. -For example, RoboViz\cite{Stoecker2012} is designed to assess and develop agent behaviors in SimSpark, -it facilitates the real-time visualization of agents running concurrently on the SimSpark simulator, -and provides higher-level analysis and visualization of agent behaviors. -Combined with these tools, SimSpark becomes a good platform to develop and test new algorithms for multi-robot systems. -It is also widely used to teach artificial intelligence and robotic lectures. +% \paragraph{RoboCup Soccer Simulation League} Simulation 3D League. Since 2004, SimSpark has been used as a official competitions environment. Since then, research teams have developed useful research tools based on SimSpark. Some of these tools are also released as open source. +% For example, RoboViz\cite{Stoecker2012} is designed to assess and develop agent behaviors in SimSpark. +% Combined with these tools, SimSpark becomes a useful platform to develop and test new algorithms for multi-robot systems. \paragraph{RoboCup Soccer Standard Platform League} -As one of the long term goals of the soccer simulation is to aim for realism the long term objective are realistic humanoid players in a physical environment. -These players should one day challenge the champion of the most recent World Cup. -The SimSpark is also used by teams in RoboCup Standard Platform League and Humanoid League. +% As one of the long term goals of the soccer simulation is to aim for realism the long term objective are realistic humanoid players in a physical environment. +% These players should one day challenge the champion of the most recent World Cup. +% The SimSpark is also used by teams in RoboCup Standard Platform League and Humanoid League. The special situation between Standard Platform League and 3D Simulation League is that both leagues use the same robot model — NAO from Aldebaran. -So it appears to be natural to reuse the work which has already been done in Simulation League and make SimSpark usable in Standard Platform League. -Nao Team Humboldt developed their software architecture\cite{SCPR2010} which enables their control software can run both in real NAO and simulated NAO with SimSpark. This helps them to achieve some good results in both Simulation League and Standard Platform League. -Furthermore, Nao Team Humboldt also promotes the usage of SimSpark in the Standard Platform League by implementing its rules. \Cref{f:simspark-spl} is the snapshot of the extended SimSpark for Standard Platform League. +So it appears to be natural to reuse the work which has already been done. +Nao Team Humboldt developed a software architecture\cite{SCPR2010} which enables their control software can run both in real NAO and simulated NAO with SimSpark. This helps them to participate in both Simulation League and Standard Platform League, and achieve some good results. +Furthermore, Nao Team Humboldt also promotes the usage of SimSpark in the Standard Platform League by implementing its rules, see \Cref{f:simspark-spl}. \begin{figure} \centering - \includegraphics[width = 0.75\columnwidth]{simspark-spl} + \includegraphics[width = 0.6\columnwidth]{simspark-spl} \caption{Prototype of the extended SimSpark for Standard Platform League. The bottom of screen are images of robot cameras.} \label{f:simspark-spl} @@ -387,40 +381,47 @@ \section{Conclusion and Future Work} \label{s:conclusion} SimSpark is a powerful tool to state different multi-robot researches. -The introduction of a humanoid robot model to the simulation gave another perspective to the league. -The interest in the 3D simulation competition is growing fast and research is slowly getting back to the design and implementation of multi-agent higher-level behaviors based on solid low level behavior architectures for realistic humanoid robot teams. +The introduction of a humanoid robot model increase the realism of SimSpark, and gains popularity in research teams who have real robots. +The increased number of players per team makes research slowly get back to the high level behaviors based on solid low level behavior for realistic humanoid robot teams. -SimSpark has undergone continuous development driven by the requirement of continues research in multi-robot system. - -\paragraph{Integration With Existing Robotic Frameworks} -To enhance the usability of SimSpark for wider usage, and also to make it easier -for developers to develop and test their robotic software on SimSpark and to +SimSpark has undergone continuous development driven by the requirement of continuous research in multi-robot system. The following approaches are planned: +\begin{description} +\item[Integration With Existing Robotic Frameworks] +To enhance the usability of SimSpark for wider usage, and also to make it easier to develop and test their robotic software on SimSpark and to use the same code on real hardware, we aim to integrate SimSpark to an -existing robotic framework. Player is a well-known robotic framework which -can be used to control both real and simulated robots. We planned to integrate -SimSpark with Player so that people can develop agents for SimSpark using -Player interfaces. It has the additional benefit of using Player's network -protocol which is much more efficient than the current network protocol used -in SimSpark. It is also a good opportunity to enhance the multi-threaded -capabilities of SimSpark given the asynchronous nature of using Player with -different robot sensors. +existing robotic framework, such as Player and ROS. -Recently, another robotic framework called ROS is gaining popularity and is in -active development. Therefore, we will reconsider our planning and might decide -to integrate SimSpark with ROS instead. However, considering that Player itself -is integrated into ROS, integrating with Player still might make sense. +% Player is a well-known robotic framework which +% can be used to control both real and simulated robots. We planned to integrate +% SimSpark with Player so that people can develop agents for SimSpark using +% Player interfaces. It has the additional benefit of using Player's network +% protocol which is much more efficient than the current network protocol used +% in SimSpark. It is also a good opportunity to enhance the multi-threaded +% capabilities of SimSpark given the asynchronous nature of using Player with +% different robot sensors. -If SimSpark is integrated into an existing robotic framework, it is possible -for researchers to develop a single program to control both a simulated -robot inside and the same real robot given that the robot itself is also -supported by the framework. It will be also much easier to attract people -who have developed programs for real robots using the framework to experiment -with SimSpark. +% Recently, another robotic framework called ROS is gaining popularity and is in +% active development. Therefore, we will reconsider our planning and might decide +% to integrate SimSpark with ROS instead. However, considering that Player itself +% is integrated into ROS, integrating with Player still might make sense. -\paragraph{physics simulation engine abstraction / Bullet} -\paragraph{more robot models, formate?} +% If SimSpark is integrated into an existing robotic framework, it is possible +% for researchers to develop a single program to control both a simulated +% robot inside and the same real robot given that the robot itself is also +% supported by the framework. It will be also much easier to attract people +% who have developed programs for real robots using the framework to experiment +% with SimSpark. + +\item[Abstract Physics Layer] +Relying on a single physics engine, i.e. ODE, hampers Simspark's flexibility. +Thus, an abstract physics layer was development\cite{Held2010}, ODE and Bullet can be used as plugins with the abstract physics layer. However, current implementation has many drawbacks and difficult to maintenance. + +\item[Robot Model Importers] +The usage of SimSpark will be extended when it has more robot models, however creating robot models is a time consuming task. The idea is to create model importers for different model format, so SimSpark will be able to use the robot model which is available in other simulators. +\end{description} + \section*{Acknowledgments} -We wish to thank other members in in the Maintenance Committee of the RoboCup Soccer Simulation League, especially the original authors of SimSpark: M. K\"ogler, M. Rollmann, and O. Obst. Furthermore, thanks go to J. Boedecker for introducing us to the SimSpark project.\todo{other names here...} +We wish to thank other members in the Maintenance Committee of the RoboCup Soccer Simulation League, especially the original authors of SimSpark: M. K\"ogler, M. Rollmann, and O. Obst. Furthermore, thanks go to J. Boedecker for supporting us to work in the SimSpark project.\todo{other names here...} \bibliographystyle{splncs03} \bibliography{reference} \end{document} Modified: trunk/spark/doc/papers/2013/reference.bib =================================================================== --- trunk/spark/doc/papers/2013/reference.bib 2013-03-29 21:11:54 UTC (rev 346) +++ trunk/spark/doc/papers/2013/reference.bib 2013-03-30 00:43:18 UTC (rev 347) @@ -45,6 +45,15 @@ timestamp = {2013.03.17} } +@TECHREPORT{Held2010, + author = {Andreas Held}, + title = {Creating an Abstract Physics Layer for Simspark}, + institution = {University of Koblenz-Landau}, + year = {2010}, + owner = {xu}, + timestamp = {2013.03.29} +} + @INPROCEEDINGS{SCPR2010, author = {Heinrich Mellmann and Yuan Xu and Thomas Krause and Florian Holzhauer}, title = {NaoTH Software Architecture for an Autonomous Agent}, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2013-03-29 21:12:04
|
Revision: 346 http://simspark.svn.sourceforge.net/simspark/?rev=346&view=rev Author: yxu Date: 2013-03-29 21:11:54 +0000 (Fri, 29 Mar 2013) Log Message: ----------- Merge branch 'open-source-paper' * open-source-paper: some text for connecting sections draft Acknowledgments draft abstract Modified Paths: -------------- trunk/spark/doc/papers/2013/opensource.tex Modified: trunk/spark/doc/papers/2013/opensource.tex =================================================================== --- trunk/spark/doc/papers/2013/opensource.tex 2013-03-29 20:18:52 UTC (rev 345) +++ trunk/spark/doc/papers/2013/opensource.tex 2013-03-29 21:11:54 UTC (rev 346) @@ -59,11 +59,10 @@ \maketitle \begin{abstract} - - current state of simspark - - changes 2013 - - evidence of impact of the released component to the RoboCup community. - - technical contribution - - benefit for the RoboCup community. + SimSpark is an open source robot simulator developed by RoboCup Community. + This paper briefly describes the development of SimSpark since 2008. + Furthermore, some new features are proposed and implemented for the next RoboCup, including realistic motor, heterogeneous robots, and agent proxies. + As a powerful tool to state different multi-robot researches, SimSpark has been successfully used in RoboCup simulation league, standard platform league and humanoid league. \end{abstract} \section{Introduction} @@ -82,11 +81,8 @@ In section \ref{s:rcssserver3d}, we will briefly describe the implementation of RoboCup 3D Soccer Simulator -- \textit{RCSSServer3D}. We will introduce some new features for RoboCup 2013 in section \ref{s:ongoing}. Furthermore, we will discuss the application of \textit{SimSpark} not only in simulation league but also other leagues with real robots in section \ref{s:application}. -Finally, we will outline future development plans in section \ref{s:conclusion} . +Finally, we will outline future development plans in section \ref{s:conclusion}. -\todo[inline,color=gray]{Releated work: SimRobot, Webots, V-REP, Gazebo...} - - \section{Project Overview} \label{s:overview} @@ -147,9 +143,9 @@ \paragraph{Soccer Simulation} Most rules of the soccer game are judged by an automatic rule set that enforces the basic soccer rule set. However more involved situations like detection unfair behavior still require a human referee. -Noticeably, the size of soccer field is increasing every year, since the number of robots in each team is increasing. In RoboCup 2012, each team has 11 robots. This +Noticeably, the size of soccer field is increasing every year, since the number of robots in each team is increasing. In RoboCup 2012, each team has 11 robots. +This makes coordination between multi-robots more important. - \paragraph{Robot Model} The NAO robot is currently used in the competitions of the Soccer Simulation 3D League at RoboCup. Its height is about 57cm and its weight is around 4.5kg. Its biped architecture with 22 degrees of freedom allows NAO to have great mobility. @@ -162,8 +158,10 @@ \section{Experimental Features} \label{s:ongoing} -These features are experimental, they (probably) will be used in RoboCup 2013 for the first time. (Some of them are still under the development) +For getting more realistic simulation, some new features are proposed and implemented, including realistic motor, heterogeneous robots, and agent proxies. Furthermore, a new graphic user interface is implemented for better user experiences. +These experimental features probably will be used in RoboCup 2013 for the first time. + \subsection{Realistic Motor} NAO robot has twenty-one motor joints as its actuators. The simulation engine, e.g. ODE, provides a simple model of real life servos: @@ -343,7 +341,7 @@ project using Java. \subsection{SimSpark GUI} -\todo{SimSpark GUI: http://simspark.sourceforge.net/wiki/index.php/Graphical_User_Interface} +\todo{SimSpark GUI: \url{http://simspark.sourceforge.net/wiki/index.php/Graphical_User_Interface}} NOTE: It will be merged to trunk soon. So it is almost complete. @@ -389,7 +387,11 @@ \section{Conclusion and Future Work} \label{s:conclusion} SimSpark is a powerful tool to state different multi-robot researches. +The introduction of a humanoid robot model to the simulation gave another perspective to the league. +The interest in the 3D simulation competition is growing fast and research is slowly getting back to the design and implementation of multi-agent higher-level behaviors based on solid low level behavior architectures for realistic humanoid robot teams. +SimSpark has undergone continuous development driven by the requirement of continues research in multi-robot system. + \paragraph{Integration With Existing Robotic Frameworks} To enhance the usability of SimSpark for wider usage, and also to make it easier for developers to develop and test their robotic software on SimSpark and to @@ -415,11 +417,10 @@ who have developed programs for real robots using the framework to experiment with SimSpark. -\todo[inline]{Other physic engine, Bullet / physics simulation engine abstraction} -\todo[inline]{better GUI} -\todo[inline]{more robot models?} +\paragraph{physics simulation engine abstraction / Bullet} +\paragraph{more robot models, formate?} \section*{Acknowledgments} - +We wish to thank other members in in the Maintenance Committee of the RoboCup Soccer Simulation League, especially the original authors of SimSpark: M. K\"ogler, M. Rollmann, and O. Obst. Furthermore, thanks go to J. Boedecker for introducing us to the SimSpark project.\todo{other names here...} \bibliographystyle{splncs03} \bibliography{reference} \end{document} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2013-03-29 20:19:02
|
Revision: 345 http://simspark.svn.sourceforge.net/simspark/?rev=345&view=rev Author: yxu Date: 2013-03-29 20:18:52 +0000 (Fri, 29 Mar 2013) Log Message: ----------- Merge branch 'open-source-paper' * open-source-paper: nao model spark section begin Spark short realistic motor clean draft introduction Modified Paths: -------------- trunk/spark/doc/papers/2013/joint-temp-LKneePitch.tikz trunk/spark/doc/papers/2013/opensource.tex trunk/spark/doc/papers/2013/reference.bib Modified: trunk/spark/doc/papers/2013/joint-temp-LKneePitch.tikz =================================================================== --- trunk/spark/doc/papers/2013/joint-temp-LKneePitch.tikz 2013-03-29 19:47:49 UTC (rev 344) +++ trunk/spark/doc/papers/2013/joint-temp-LKneePitch.tikz 2013-03-29 20:18:52 UTC (rev 345) @@ -1884,7 +1884,7 @@ enlarge x limits=false, legend pos=north west, xlabel={time (s)}, -ylabel={temperature (\textdegree{}C)}, +ylabel={temperature ($^{\circ}$C)}, ] \addplot[every mark/.append style={solid}, black, solid, mark=none, line legend] table[x=x, y=y] { Modified: trunk/spark/doc/papers/2013/opensource.tex =================================================================== --- trunk/spark/doc/papers/2013/opensource.tex 2013-03-29 19:47:49 UTC (rev 344) +++ trunk/spark/doc/papers/2013/opensource.tex 2013-03-29 20:18:52 UTC (rev 345) @@ -2,7 +2,6 @@ \usepackage[utf8]{inputenc} \usepackage{todonotes} \usepackage{amsmath} -\usepackage{textcomp} % for \textdegree \usepackage[hidelinks]{hyperref} \usepackage{cleveref} \crefname{figure}{Fig.}{Fig.} @@ -25,6 +24,11 @@ \input{#1.tikz} } +\renewcommand{\textfraction}{0.15} +\renewcommand{\topfraction}{0.85} +\renewcommand{\bottomfraction}{0.65} +\renewcommand{\floatpagefraction}{0.60} + \graphicspath{{fig/}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} @@ -64,45 +68,34 @@ \section{Introduction} The development on robots may be severely limited by the constrained resources. -This is especially true in the research of multi-robots systems in areas such as RoboCup. +This is especially true in the research of multi-robot systems in areas such as RoboCup. Using simulation for algorithm development and testing makes thing easier. % \paragraph{History} \textit{SimSpark}, a multi-robot simulator based on the generic components of the Spark\cite{OR05} physical multi-agent simulation system, has been used in the RoboCup Soccer Simulation League since 2004. -The project was registered as open source project in SourceForge\footnote{\url{http://simspark.sourceforge.net}} in 2004, it has an established code base with development increasing year-over-year. +The project was registered as open source project in SourceForge in 2004, it has an established code base with development increasing year-over-year. As the result, RoboCup soccer simulations have changed significantly over the years, going from rather abstract agent representations to more and more realistic humanoid robot games\cite{Boedecker2008,usermanual}. Thanks to the flexibility of the Spark system, these transitions were achieved with little changes to the simulator's core architecture. -In this paper we describe the recent development of \textit{SimSpark} project, which make the \textit{SimSpark} possible to simulate 11 vs. 11 humanoid robot soccer games in real time\todo{is it real time in RoboCup? ``Almost! It'll be slower if there are many collisions''}. -In section \ref{s:overview}, we will give an overview of \textit{SimSpark} project since 2008. After that, we will describe the development in core module -- names \textit{Spark} in section \ref{s:spark}. In section \ref{s:rcssserver3d}, we will give the implementation of RoboCup 3D Soccer Simulator -- \textit{RCSSServer3D}. We will introduce some ongoing work for RoboCup 2013 in -section \ref{s:ongoing}. Furthermore, we will discuss the application of \textit{SimSpark} not only in simulation league but also other leagues with real robots in section \ref{s:application}. Finally, we will outline future development plans in section \ref{s:conclusion} . +In this paper we describe the recent development of \textit{SimSpark} project, which make the \textit{SimSpark} possible to simulate 11 vs. 11 humanoid robot soccer games in real time\todo{is it real time in RoboCup 2012?}. +In section \ref{s:overview}, we will give an overview of \textit{SimSpark} project since 2008. After that, we will describe the development of the \textit{Spark} simulation platform in section \ref{s:spark}. +In section \ref{s:rcssserver3d}, we will briefly describe the implementation of RoboCup 3D Soccer Simulator -- \textit{RCSSServer3D}. +We will introduce some new features for RoboCup 2013 in section \ref{s:ongoing}. +Furthermore, we will discuss the application of \textit{SimSpark} not only in simulation league but also other leagues with real robots in section \ref{s:application}. +Finally, we will outline future development plans in section \ref{s:conclusion} . \todo[inline,color=gray]{Releated work: SimRobot, Webots, V-REP, Gazebo...} \section{Project Overview} \label{s:overview} -Because last paper about simspark was in 2008 -In comparison to specialized simulators, users can create new simulations by using a scene description language. - -Agents communicate with the simulation server via UDP or TCP, and therefore can be implemented in any language that supports such sockets. -It is also possible to use integrated agents, which are programmed as part of the -simulator; but it is mainly for debugging purposes. -Multiple software agents can participate in one simulation. - -Simulations are created within the server using the Ruby language and text-based RSG files. -SimSpark uses the Open Dynamics Engine (ODE) for detecting collisions and for simulating rigid body dynamics. ODE allows accurate simulation of the physical properties of objects such as velocity, inertia and friction. - -The soccer simulation for this tournament was developed in parallel with the SimSpark simulator. In its initial version players were modeled as spheres in a physical three dimensional world. Since then SimSpark grew considerably and now supports humanoid players with articulated bodies. - -% \subsection{Architectural Changes (?)} -It served from the beginning as a test bed and a guide for essential new features that were added to the simulator during development. However changes to the simulator core were never customized for the soccer simulation. Instead generic simulator services were implemented with all soccer specific details contained in a set of plugins and applications. Until 2008, soccer simulation and SimSpark simulator were developed and released as a single project called rcssserver3d, but it was already decided that they should be separated -to make the separation more visible for both users new developers. +Until 2008, soccer simulation and SimSpark simulator were developed and released as a single project called rcssserver3d, but it was already decided that they should be separated +to make the separation more visible for both users and developers. In late 2008, the separation happened with the migration of sources from CVS repository at \url{http://sserver.sourceforge.net} to SimSpark's project Subversion repository at \url{http://simspark.sourceforge.net}. As part of this process, the project was broken -to two main projects (SimSpark simulator and RCSSServer3D soccer simulation software) +to two main projects (Spark simulation platform and RCSSServer3D soccer simulation server) and two auxiliary projects (RSGEdit and simspark-utilities). Also, simspark binary was renamed to rcssserver3d to make it clear that it runs soccer simulation rather than a generic simulation environment. @@ -113,62 +106,24 @@ \section{Spark} \label{s:spark} -\paragraph{New Sensors} - - ACC - - FRP (Force Resistance Perceptor) - - Gyro - - Restrict Vision - -- Line perceptions - -- camera (image) +As a generic simulation environment, Spark provides a rich set of features to create, debug and modify multi-robot simulation. +It has three main components, including the simulation engine, the object and memory management system, and the physics engine. Details about architecture and concepts of Spark have been described in \cite{Boedecker2008,OR05}. +In this section, we describe the necessary changes for simulating 11 vs. 11 humanoid robot soccer game. +However changes to the simulator core were never customized for the soccer simulation. +First, a set of sensors of humanoid robot are implemented as plugins. Second, multi-threads supporting takes advantage of multi-cores in modern CPU to be able to run in real time. -\paragraph{Integrated Agents} -Since the agents run as separate processes than the simulator, it was not possible to -use debugging tools to debug agents while the server was running because if the -agent process was paused, the simulator continued the simulation which would usually -lead to unwanted results. For example, if the agent was paused in the middle of walking -in an unstable state, it would fall on the ground. Therefore, support for integrated -agents have been added to the simulator so that it is possible to program and run an -agent as a part of the simulator process. It also makes development of simple agents -easier since there is no need to bother about agent/server communication. +\paragraph{Sensor Plugins} +Sensors of a robot allows awareness of the robot's state and the environment. +Humanoid robots like the NAO usually have many different sensors installed. +We have implemented new plugins to simulate sensors of humanoid robots. +Some of the sensors delivers information from physics engine, such as joint position, gyro, accelerometer, and force resistance. Furthermore, lines can be sensed by virtual vision. +Additionally, a more realistic camera which delivers images rendered via OpenGL hardware accelerated offscreen buffers is implemented. Details of these sensors can be found in \cite{usermanual}. -While support for integrated agents was mainly added to facilitate debugging, the -addition of sync mode is a better solution for this purpose which is introduced below. - -\paragraph{Sync Mode} -As the number of agents increase, the simulator puts a lot more load on CPU. As a -result, it will be more difficult to run the agents on the same machine as the simulator -since they will not get enough processing time in each cycle. This will make it -difficult or almost impossible to develop and run multi-agent systems on a single -machine or on older machines. To overcome this issue, a new running mode called -``Sync Mode'' has been added to the simulator. When it is running in the sync mode, -the cycles will not be advanced automatically. Instead, the simulator will proceed -to the next cycle when all connected agents send a ``(sync)'' command indicating that -they are finished with this cycle. Therefore, agents doesn't need to catch up with the -simulator and it will wait for them as much as needed. - -Not only this feature will make it possible to experiment with the simulator on -slower systems, but also it will make debugging much easier even on multi-agent setups. -For instance, if an agent is paused in a debugger tool, the simulator will not proceed -to the next cycle and also all other agents have to wait for the next cycle. - -\paragraph{Support for Other Physics Engines} -SimSpark was initially built around ODE physics engine. However, it turned out that -it has its own limitations and using other engines might provide extra benefits. -For example, some engines might provide better multi-threaded support or could -support hardware acceleration physics simulation. And some of them might be better -suited to some types of simulation. - -As a result, a physics abstraction layer was implemented by Andreas Held \todo{should we cite people?} and ODE -implementation was moved out of the core and become a plugin. Now, it is possible -to implement support for other physics engines as plugins, and use an appropriate -plugin for a simulation on each hardware. A partial implementation of Bullet physics -plugin is already available. - -\paragraph{Multi-threads Supporting\todo{agent controls}} -In modern time, computers have a CPU with multi-cores or even multi-CPUs. +\paragraph{Multi-threads Supporting} +In modern time, computers have a processor with multi-cores or even multi-CPUs. This improves the performance greatly, but only the multi-threaded program can benefit. One great feature of SimSpark is switching between single thread mode and multi-threads -mode. The multi-threads mode can improve the performance in computer with multi-cores CPU, but the single thread mode is also useful for developing the simulator. +mode. The multi-threads mode can improve the performance in computer with multi-cores processor, but the single thread mode is also useful for developing the simulator. The implementation of multi-threads loop is based on two conditions. First, different tasks are assigned to different \textit{SimControlNode}s in SimSpark. @@ -177,38 +132,45 @@ Second, all data of simulation state is stored in a tree called \textit{active scene}, the physics engine and \textit{SimControlNode}s interact through the \textit{active scene}. As we know, the physics computation is the most time-consuming, and the physics engine does not need to access the active scene during physics computation. -So the physics computation and \textit{SimControlNode}s can run in parallel.\todo[color=green]{UML?}\todo[color=yellow]{results of performance improvement, any benchmark?} +So the physics computation and \textit{SimControlNode}s can run in parallel. +Furthermore, the physics engine, e.g. Open Dynamic Engine\cite{Smith:ODE}, is modified to run in parallel by using Intel Threading Building Blocks\cite{tbb}. -\todo[inline]{ -Sander van Dijk and Ubbo Visser -Proposal: Boosting the 3D SSL Simulator -Increase Research Possibilities in the RC SSL Community +In RoboCup 2012, the 11 vs. 11 humanoid robot (22 degree of freedom) soccer games were simulated in real time by computer with Intel Core i7-975 @3.33GHz CPU and 4G DDR3 RAM. \todo[color=yellow]{results of performance improvement, any benchmark?} -ODE TBB, ??sander's paper -- where??}\footnote{\url{http://www.robocup.org/2011/03/robocup-federation-call-for-project-proposals-2/}} +\section{RCSSServer3D} +\label{s:rcssserver3d} -\todo[inline]{Internal/External Monitor} +As the competition environment for the Soccer Simulation 3D League at RoboCup, +RCSSServer3D simulates the soccer field where two team of robots play soccer game. +In its initial version players were modeled as spheres in a physical three dimensional world. Now it supports humanoid players with articulated bodies. In particular, the soccer environment and rules are implemented in the simulation, and the NAO robot manufactured by Aldebaran Robotics is modeled. -\todo[inline]{logfiles} +\paragraph{Soccer Simulation} +Most rules of the soccer game are judged by an automatic rule set that enforces the basic soccer rule set. +However more involved situations like detection unfair behavior still require a human referee. +Noticeably, the size of soccer field is increasing every year, since the number of robots in each team is increasing. In RoboCup 2012, each team has 11 robots. This -\section{RCSSServer3D} -\label{s:rcssserver3d} -\todo[inline]{robot model: NAO (rcssserver3d)} -\todo[inline]{soccer rules (referee) (rcssserver3d)} -\todo[inline]{bigger fields and more robots (rcssserver3d)} +\paragraph{Robot Model} +The NAO robot is currently used in the competitions of the Soccer Simulation 3D League at RoboCup. Its height is about 57cm and its weight is around 4.5kg. +Its biped architecture with 22 degrees of freedom allows NAO to have great mobility. +The NAO robot model is also equipped with a powerful selection of the +sensors described in section \ref{s:spark}, to provide a widespread information base for +agent development. + +There are differences between simulated NAO and real NAO. For example, the left hip and the right hip in the real NAO are physically connected by one motor so they cannot be controlled independently. The simulated robot has a motor for each joint. Furthermore, the simulated robot gets positions of objects via virtual vision sensor, while the real robot has to process images to understand the world. Never the less, this NAO model enables RCSSServer3D as a good humanoid robot research platform. + + \section{Experimental Features} \label{s:ongoing} These features are experimental, they (probably) will be used in RoboCup 2013 for the first time. (Some of them are still under the development) \subsection{Realistic Motor} -\todo{motivation: my email...} -\todo{shorter} NAO robot has twenty-one motor joints as its actuators. +The simulation engine, e.g. ODE, provides a simple model of real life servos: +the motor brings the body up to speed in one step; and provides force that is not more than is allowed. The simple motor model is one reason for the unrealistic simulation results. -The ODE provides a simple model of real life servos. -It has two parameters: a desired speed and the maximum force that is available to reach that speed. The motor brings the body up to speed in one step; and provides force that is not more than is allowed. -There is no motor that works like this in reality. Furthermore, some aspects like stiffness control, power consumption and temperature regulation, are missing but are also important for robotics. +In this section, we proposed and implemented a realistic motor model. More details and experimental results are given in \cite{Xu2012}. \paragraph{Stiffness} The stiffness determines how strong the motor is. The value is from 0.0 @@ -217,15 +179,11 @@ this percentage is the maximum electric current applied to the motor. Setting the stiffness to 0.5 means that the electric current limitation is reduced to 50\%. - For a DC motor, the electric current, $I$, determines the output torque, -$\tau$: -\begin{align} - \tau &= K_\tau I \label{eq:tau-i} -\end{align} -where $K_\tau$ is the torque constant of the motor. It can be found in the -specifications from \cite{naoqi}. In -the simulation, the maximum torque of the servo can be specified, therefore the +$\tau = K_\tau I \label{eq:tau-i}$; +where $K_\tau$ is the torque constant of the motor. $K_\tau$ can be found in the +specifications of motor, e.g. \cite{naoqi}. +The simulation engine can specified the maximum torque of the servo, therefore the stiffness control can be easily implemented by setting the maximum torque of the simulated servo: \begin{align} @@ -239,46 +197,36 @@ Another important aspect besides the motor's performance is its power consumption: how much energy does it cost to run. The robot is powered by a battery with limited energy, and has to walk during the -game: half a game is 10 minutes. +game. An even more important factor in energy consumption is that the motor can overheat if it consumes too much energy and -becomes too hot. In the real NAO, Aldebaran Robotics estimates the temperature -of each motor by integrating electric current, and shuts down the motor -when the temperature is too high. Therefore modeling power consuming -is important for implementing energy effective motions. +becomes too hot. +In the real robot, the temperature of each motor is measured, and the motor shuts down +when the temperature is too high. -DC motors are based on the following equations: -\begin{align} - U &= U_e + IR \label{eq:u-ir}\\ - U_e &= K_e \dot{\theta} \label{eq:u-ke} -\end{align} +DC motors are based on this equation: +$U = U_e + IR \label{eq:u-ir} = K_e \dot{\theta} \label{eq:u-ke}$; where $U$ is the voltage of input, $U_e$ is the back electromotive force (EMF), $I$ is the electric current, $R$ is resistance, $\dot{\theta}$ is the speed, and $K_e$ is the speed constant of the motor. - -The value of $R$ and $K_e$ can be found in the specifications from \cite{naoqi}; +The value of $R$ and $K_e$ can be found in the specifications of motor again; and the simulation engine provides the value of $\tau$ and $\dot{\theta}$; therefore we can calculate the -power consumption by putting \cref{eq:tau-i,eq:u-ir,eq:u-ke} together: +power consumption: \begin{align} - P &= UI \\ - &= U_eI + I^2R \\ - &= \frac{K_e}{K_\tau}\dot{\theta}\tau + \frac{R}{K_\tau^2}\tau^2 + P = UI = U_eI + I^2R = \frac{K_e}{K_\tau}\dot{\theta}\tau + \frac{R}{K_\tau^2}\tau^2 \end{align} - And the total energy used by the motor is: \begin{equation} \label{eq:motor-power} E = \sum_t{P_t\Delta{}t} \end{equation} -where $\Delta{}t$ is the time step of the simulation, and $P_t$ is the power consumed at time $t$. - -\Cref{fig:battery} compares the simulation result of this model to -reality. In this example, the robot turns left for 5 minutes, then -stands for 1 minutes and then turns right for 5 minutes. This is shown by the change of electric current in the figure. For the overall +where $\Delta{}t$ is the time step of the simulation, and $P_t$ is the power consumed at time $t$. For the overall power consumption, the energy consumed by devices other than motors, e.g. mainboard, CPU, camera, etc. has to be added. It is the power -consumption of the robot in an idle state (all motors are off), and measured to be 33 W. +consumption of the NAO robot in an idle state (all motors are off), and measured to be 33 W. +\Cref{fig:battery} compares the simulation result of this model to +reality. \begin{figure} \centering @@ -286,15 +234,18 @@ \centering \pgfplotsset{width=0.9\columnwidth,height=7cm} \inputtikz{battery} - \caption{Power consumption of the real and the simulated robot in action. - The electric current is the summary of all motors.} + \caption{Power consumption of the real and the simulated NAO robot in action. + The electric current is the summary of all motors. + In this example, the robot turns left for 5 minutes, then +stands for 1 minutes and then turns right for 5 minutes. This is shown by the change of electric current.} \label{fig:battery} \end{minipage}\hfill{} \begin{minipage}{0.49\columnwidth} \centering \pgfplotsset{width=0.9\columnwidth,height=7cm} \inputtikz{joint-temp-LKneePitch} - \caption{The temperature of the (knee pitch) motor in the simulation and the real robot. The green background is the electric current in the real robot.} + \caption{The temperature of the (knee pitch) motor in the simulation and the real NAO robot. The green background is the electric current in the real robot. Note that the temperature of real NAO has accuracy of 1 $^{\circ}$C.\newline + } \label{fig:joint-temperature} \end{minipage} \end{figure} @@ -302,10 +253,8 @@ \paragraph{Temperature Regulation} We model the temperature and heat of the motor with the following equations: \begin{align} - \Delta{}Q^+ &= I^2R\Delta{}t \\ - \Delta{}Q^- &= -\lambda(T-T_e)\Delta{}t \\ - \Delta{}Q &= \Delta{}Q^+ + \Delta{}Q^-\\ - C &= \frac{\Delta{}Q}{\Delta{}T} + \Delta{}Q &= \Delta{}Q^+ + \Delta{}Q^- = I^2R\Delta{}t -\lambda(T-T_e)\Delta{}t \\ + \Delta{}Q &= C\Delta{}T \end{align} where $T$ is the temperature of the motor, $T_e$ is the temperature of the environment, but it is the internal temperature @@ -320,43 +269,15 @@ \label{eq:motor-temp} T_{t+\Delta{}t} = T_t + \Delta{}T = T_t + \frac{[I^2R-\lambda(T_t-T_e)]\Delta{}t}{C} \end{equation} - -In this model, we determined $T_e$, $\lambda$, and $C$ by experiments. It can be formulate as a classic linear regression problem. We rewrite \cref{eq:motor-temp} to: -\begin{align} - \label{eq:motor-temp-ols} - \Delta{}tx_0 + T_t\Delta{}tx_1 - \Delta{}t x_2 &= I^2R \\ - x_0 &= C \\ - x_1 &= \lambda \\ - x_2 &= \lambda Te -\end{align} -A sequence values of $\Delta{}t$, $T_t$, and $I^2R$ can be measured by experiment, therefore the optimum values for $x_0$, $x_1$, and $x_2$ can be obtained by linear least squares method, so the parameters of \cref{eq:motor-temp} is determined. \Cref{tab:motor-parameter} gives the results of the experiment. -\begin{table}[h] - \centering - \caption{Parameters $T_e$, $\lambda$ and $C$ in the \cref{eq:motor-temp} for different joints of the NAO V3.} - \label{tab:motor-parameter} - \begin{tabular}{lccc} - \toprule - Joints & $T_e$ (\textdegree{}C) & $\lambda$ (W/\textdegree{}C) & $C$ (J/\textdegree{}C)\\ - \midrule - HipYawPitch & 33 & 0.0158 & 27.2 \\ - \midrule - HipRoll & & & \\ - AnkleRoll & 27 & 0.0158 & 27.2 \\ - \midrule - HipPitch & & & \\ - KneePitch & 27 & 0.0198 & 43.6 \\ - AnklePitch & & & \\ - \bottomrule - \end{tabular} -\end{table} - +In this model, we need to determine $T_e$, $\lambda$, and $C$ by experiments. It can be formulate as a classic linear regression problem. +A sequence values of $\Delta{}t$, $T_t$, and $I^2R$ can be measured by experiment, therefore the optimum parameters of \cref{eq:motor-temp} is determined. After determining the parameters in the \cref{eq:motor-temp}, we can use this model to simulate motor temperature. In \Cref{fig:joint-temperature}, the simulated temperature is compared with data from the real robot. The whole process of joint simulation is summarized in \Cref{fig:joint}: stiffness $k_s$ is simulated by setting the maximum torque of the motor $\tau_{max}$; the final maximum torque $\tau_m$ used by simulation engine is calculated by temperature regulation; and the simulation engine computes the resulted angle and torque applied; in the end, the consumed power and temperature are -computed by \cref{eq:motor-power,eq:motor-temp} respectively. When the battery is empty, the maximum torque $\tau_{max}$ is set 0 to turn off the motor. +computed by \cref{eq:motor-power,eq:motor-temp} respectively. When the battery is empty, the maximum torque $\tau_{max}$ is set to 0 to turn off the motor. \begin{figure} \centering \inputtikz{joint} @@ -431,12 +352,15 @@ \section{Applications} \label{s:application} \paragraph{RoboCup Soccer Simulation League} -In RoboCup 2004, SimSpark was successfully used for the first official competition in RoboCup Simulation 3D League. Since then, it is used as a standard research platform and test bed\todo{How many teams in last RoboCup?}. By using it, simulation teams not only have designed and tested new algorithms, but also developed useful research tools based on SimSpark. Some of these tools are also released as open source. +In RoboCup 2004, SimSpark was successfully used for the first official competition in RoboCup Simulation 3D League. Since then, it is used as a standard research platform and test bed\todo{How many teams in last RoboCup?}. +Simulation teams also developed useful research tools based on SimSpark. Some of these tools are also released as open source. For example, RoboViz\cite{Stoecker2012} is designed to assess and develop agent behaviors in SimSpark, it facilitates the real-time visualization of agents running concurrently on the SimSpark simulator, -and provides higher-level analysis and visualization of agent behaviors. +and provides higher-level analysis and visualization of agent behaviors. +Combined with these tools, SimSpark becomes a good platform to develop and test new algorithms for multi-robot systems. +It is also widely used to teach artificial intelligence and robotic lectures. -\paragraph{Usage for Real Robot} +\paragraph{RoboCup Soccer Standard Platform League} As one of the long term goals of the soccer simulation is to aim for realism the long term objective are realistic humanoid players in a physical environment. These players should one day challenge the champion of the most recent World Cup. The SimSpark is also used by teams in RoboCup Standard Platform League and Humanoid League. @@ -454,6 +378,7 @@ \label{f:simspark-spl} \end{figure} +\paragraph{RoboCup Soccer Humanoid League} Of course the simulator can also be extended for other leagues by adding new robot models. For example, in RoboCup Humanoid Kid Size League, FUmanoid\cite{Donat2012} uses SimSpark to perform multi-level testing methods for archiving higher @@ -463,7 +388,7 @@ \section{Conclusion and Future Work} \label{s:conclusion} -SimSpark is a powerful tool to state different multi-agent research questions. +SimSpark is a powerful tool to state different multi-robot researches. \paragraph{Integration With Existing Robotic Frameworks} To enhance the usability of SimSpark for wider usage, and also to make it easier @@ -490,9 +415,9 @@ who have developed programs for real robots using the framework to experiment with SimSpark. -\todo[inline]{Other physic engine, Bullet} +\todo[inline]{Other physic engine, Bullet / physics simulation engine abstraction} \todo[inline]{better GUI} - +\todo[inline]{more robot models?} \section*{Acknowledgments} \bibliographystyle{splncs03} Modified: trunk/spark/doc/papers/2013/reference.bib =================================================================== --- trunk/spark/doc/papers/2013/reference.bib 2013-03-29 19:47:49 UTC (rev 344) +++ trunk/spark/doc/papers/2013/reference.bib 2013-03-29 20:18:52 UTC (rev 345) @@ -77,6 +77,26 @@ RoboCup Simulation League competition. } } +@ARTICLE{riley2003spades, + author = {Riley, Patrick}, + title = {SPADES: a system for parallel-agent, discrete-event simulation}, + journal = {AI Magazine}, + year = {2003}, + volume = {24}, + pages = {41}, + number = {2} +} + +@MANUAL{Smith:ODE, + title = {Open Dynamic Engine User Guide}, + author = {Russell Smith}, + year = {2006}, + note = {Last visited at 07.02.2013}, + file = {:windows/E/download_doc/RoboCup/ode-latest-userguide.pdf:PDF}, + typeoflit = {EB/OL}, + url = {http://www.ode.org} +} + @INPROCEEDINGS{Stoecker2012, author = {Justin Stoecker and Ubbo Visser}, title = {RoboViz: Programmable Visualization for Simulated Soccer}, @@ -86,12 +106,22 @@ timestamp = {2013.03.25} } -@article{riley2003spades, - title={SPADES: a system for parallel-agent, discrete-event simulation}, - author={Riley, Patrick}, - journal={AI Magazine}, - volume={24}, - number={2}, - pages={41}, - year={2003} +@PHDTHESIS{Xu2012, + author = {Yuan Xu}, + title = {From Simulation to Reality: Migration of Humanoid Robot Control}, + school = {Humboldt-Universität zu Berlin}, + year = {2012}, + owner = {xu}, + timestamp = {2013.03.29} } + +@WEBPAGE{tbb, + title = {Intel® Threading Building Blocks}, + url = {http://threadingbuildingblocks.org/}, + lastchecked = {2013.03}, + owner = {xu}, + timestamp = {2013.03.29} +} + +@comment{jabref-entrytype: Webpage: req[title;url] opt[author;editor;note;year;month;lastchecked;forcedlabel]} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2013-03-29 19:47:56
|
Revision: 344 http://simspark.svn.sourceforge.net/simspark/?rev=344&view=rev Author: hedayat Date: 2013-03-29 19:47:49 +0000 (Fri, 29 Mar 2013) Log Message: ----------- Add integrating with Player/ROS to future work. Add a section about SimSpark GUI by Patrick Geib which could be completed using wiki info Modified Paths: -------------- trunk/spark/doc/papers/2013/opensource.tex Modified: trunk/spark/doc/papers/2013/opensource.tex =================================================================== --- trunk/spark/doc/papers/2013/opensource.tex 2013-03-29 17:39:00 UTC (rev 343) +++ trunk/spark/doc/papers/2013/opensource.tex 2013-03-29 19:47:49 UTC (rev 344) @@ -421,11 +421,13 @@ Currently, an initial version of agent proxies is under development outside SimSpark project using Java. -\subsection{Integration With Existing Robotic Frameworks} -\todo{Hedayat Vatankhah:Architecture Enhancements Proposal for Soccer -Simulation Server 3D} +\subsection{SimSpark GUI} +\todo{SimSpark GUI: http://simspark.sourceforge.net/wiki/index.php/Graphical_User_Interface} +NOTE: It will be merged to trunk soon. So it is almost complete. +The main goal of this project is to provide a flexible and extensible User Interface and Simulation Development Environment, that can be used to start, control and monitor different simulations using the Simspark server, agent and monitor processes, as well as incorporate several additional tools like for example a visual editor for robot models (like RsgEdit) or a debugging monitor for agents (like RoboViz). + \section{Applications} \label{s:application} \paragraph{RoboCup Soccer Simulation League} @@ -463,6 +465,31 @@ \label{s:conclusion} SimSpark is a powerful tool to state different multi-agent research questions. +\paragraph{Integration With Existing Robotic Frameworks} +To enhance the usability of SimSpark for wider usage, and also to make it easier +for developers to develop and test their robotic software on SimSpark and to +use the same code on real hardware, we aim to integrate SimSpark to an +existing robotic framework. Player is a well-known robotic framework which +can be used to control both real and simulated robots. We planned to integrate +SimSpark with Player so that people can develop agents for SimSpark using +Player interfaces. It has the additional benefit of using Player's network +protocol which is much more efficient than the current network protocol used +in SimSpark. It is also a good opportunity to enhance the multi-threaded +capabilities of SimSpark given the asynchronous nature of using Player with +different robot sensors. + +Recently, another robotic framework called ROS is gaining popularity and is in +active development. Therefore, we will reconsider our planning and might decide +to integrate SimSpark with ROS instead. However, considering that Player itself +is integrated into ROS, integrating with Player still might make sense. + +If SimSpark is integrated into an existing robotic framework, it is possible +for researchers to develop a single program to control both a simulated +robot inside and the same real robot given that the robot itself is also +supported by the framework. It will be also much easier to attract people +who have developed programs for real robots using the framework to experiment +with SimSpark. + \todo[inline]{Other physic engine, Bullet} \todo[inline]{better GUI} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2013-03-29 17:39:11
|
Revision: 343 http://simspark.svn.sourceforge.net/simspark/?rev=343&view=rev Author: hedayat Date: 2013-03-29 17:39:00 +0000 (Fri, 29 Mar 2013) Log Message: ----------- - Added my address - Few spelling errors fixed - Integrated Agents - Sync Mode - Physics Abstraction Layer - Some English fixes for heterogeneous robots section Modified Paths: -------------- trunk/spark/doc/papers/2013/opensource.tex Modified: trunk/spark/doc/papers/2013/opensource.tex =================================================================== --- trunk/spark/doc/papers/2013/opensource.tex 2013-03-28 13:14:58 UTC (rev 342) +++ trunk/spark/doc/papers/2013/opensource.tex 2013-03-29 17:39:00 UTC (rev 343) @@ -45,7 +45,9 @@ \begin{minipage}[t]{0.4\textwidth} \and \centering -Amirkabir University of Technology, Iran\\ +Department of Computer Engineering and IT \\ +Amirkabir University of Technology \\ +Tehran, Iran\\ \email{hed...@gm...} \end{minipage} } @@ -69,9 +71,9 @@ \textit{SimSpark}, a multi-robot simulator based on the generic components of the Spark\cite{OR05} physical multi-agent simulation system, has been used in the RoboCup Soccer Simulation League since 2004. The project was registered as open source project in SourceForge\footnote{\url{http://simspark.sourceforge.net}} in 2004, it has an established code base with development increasing year-over-year. As the result, RoboCup soccer simulations have changed significantly over the years, going from rather abstract agent representations to more and more realistic humanoid robot games\cite{Boedecker2008,usermanual}. -Thanks to the flexibility of the Spark system, these transitions were achieved with little changes to the simulator’s core architecture. +Thanks to the flexibility of the Spark system, these transitions were achieved with little changes to the simulator's core architecture. -In this paper we describe the recent development of \textit{SimSpark} project, which make the \textit{SimSpark} possible to simulate 11 vs. 11 humanoid robot soccer games in real time\todo{is it real time in RoboCup?}. +In this paper we describe the recent development of \textit{SimSpark} project, which make the \textit{SimSpark} possible to simulate 11 vs. 11 humanoid robot soccer games in real time\todo{is it real time in RoboCup? ``Almost! It'll be slower if there are many collisions''}. In section \ref{s:overview}, we will give an overview of \textit{SimSpark} project since 2008. After that, we will describe the development in core module -- names \textit{Spark} in section \ref{s:spark}. In section \ref{s:rcssserver3d}, we will give the implementation of RoboCup 3D Soccer Simulator -- \textit{RCSSServer3D}. We will introduce some ongoing work for RoboCup 2013 in section \ref{s:ongoing}. Furthermore, we will discuss the application of \textit{SimSpark} not only in simulation league but also other leagues with real robots in section \ref{s:application}. Finally, we will outline future development plans in section \ref{s:conclusion} . @@ -85,7 +87,8 @@ In comparison to specialized simulators, users can create new simulations by using a scene description language. Agents communicate with the simulation server via UDP or TCP, and therefore can be implemented in any language that supports such sockets. -\todo{integrated agent as well} +It is also possible to use integrated agents, which are programmed as part of the +simulator; but it is mainly for debugging purposes. Multiple software agents can participate in one simulation. Simulations are created within the server using the Ruby language and text-based RSG files. @@ -110,7 +113,7 @@ \section{Spark} \label{s:spark} -\subsection{New Sensors} +\paragraph{New Sensors} - ACC - FRP (Force Resistance Perceptor) - Gyro @@ -118,12 +121,51 @@ -- Line perceptions -- camera (image) -\todo[inline]{sync mode (simspark)} -\todo[inline]{integrated agents (simspark)} -\todo[inline]{physics simulation engine abstraction (simspark)} +\paragraph{Integrated Agents} +Since the agents run as separate processes than the simulator, it was not possible to +use debugging tools to debug agents while the server was running because if the +agent process was paused, the simulator continued the simulation which would usually +lead to unwanted results. For example, if the agent was paused in the middle of walking +in an unstable state, it would fall on the ground. Therefore, support for integrated +agents have been added to the simulator so that it is possible to program and run an +agent as a part of the simulator process. It also makes development of simple agents +easier since there is no need to bother about agent/server communication. +While support for integrated agents was mainly added to facilitate debugging, the +addition of sync mode is a better solution for this purpose which is introduced below. + +\paragraph{Sync Mode} +As the number of agents increase, the simulator puts a lot more load on CPU. As a +result, it will be more difficult to run the agents on the same machine as the simulator +since they will not get enough processing time in each cycle. This will make it +difficult or almost impossible to develop and run multi-agent systems on a single +machine or on older machines. To overcome this issue, a new running mode called +``Sync Mode'' has been added to the simulator. When it is running in the sync mode, +the cycles will not be advanced automatically. Instead, the simulator will proceed +to the next cycle when all connected agents send a ``(sync)'' command indicating that +they are finished with this cycle. Therefore, agents doesn't need to catch up with the +simulator and it will wait for them as much as needed. + +Not only this feature will make it possible to experiment with the simulator on +slower systems, but also it will make debugging much easier even on multi-agent setups. +For instance, if an agent is paused in a debugger tool, the simulator will not proceed +to the next cycle and also all other agents have to wait for the next cycle. + +\paragraph{Support for Other Physics Engines} +SimSpark was initially built around ODE physics engine. However, it turned out that +it has its own limitations and using other engines might provide extra benefits. +For example, some engines might provide better multi-threaded support or could +support hardware acceleration physics simulation. And some of them might be better +suited to some types of simulation. + +As a result, a physics abstraction layer was implemented by Andreas Held \todo{should we cite people?} and ODE +implementation was moved out of the core and become a plugin. Now, it is possible +to implement support for other physics engines as plugins, and use an appropriate +plugin for a simulation on each hardware. A partial implementation of Bullet physics +plugin is already available. + \paragraph{Multi-threads Supporting\todo{agent controls}} -In modern time, computers have a CUP with multi-cores or even multi-CPUs. +In modern time, computers have a CPU with multi-cores or even multi-CPUs. This improves the performance greatly, but only the multi-threaded program can benefit. One great feature of SimSpark is switching between single thread mode and multi-threads mode. The multi-threads mode can improve the performance in computer with multi-cores CPU, but the single thread mode is also useful for developing the simulator. @@ -323,30 +365,31 @@ \end{figure} \subsection{Heterogeneous Robots} -\todo[inline]{Draft, needs better English} -Simulation is great for experimenting with robots without need to buy expensive -real robots. Also, the robots are never damaged and they can be used for long +Simulation is a great tool for experimenting with robots without buying expensive +real robots. Also, the simulated robots are never damaged and they can be used for long running experiences without human intervention. -However, the possibilities which are provided by a simulation environment is +However, the possibilities provided by a simulation environment is not limited to these. Not only you can experiment with different behaviors, but also you can modify the mechanical properties of the robot as you wish. Additionally, -it is possible to create new challenges for robot AI developers since you can +it is possible to create new challenges for robot AI developers. Since you can generate robots with different mechanical properties very easily at run time, you can provide variations of a robot to teams and they can use them if they can adopt their developed behaviors to unseen robots; which is in contrast with real robots because teams know the exact specification of the robots and -can develop behaviors specifically tuned for a single robot. If heterogeneous +can develop behaviors specifically tuned for them. If heterogeneous robots are available in a game, teams can use them only if they can adopt their behaviors to the robots they didn't know about. -Simspark already provided the ability to define different robot models and +SimSpark already provided the ability to define different robot models and use them in its simulation environment. However, each model was fixed and if you wanted to have several variations of a robot, you should have defined several separate robot models. To better support games with heterogeneous robots, we have -added the support for parametric models to simspark. Therefore, it is possible to +added the support for parametric models to SimSpark. Therefore, it is possible to define models in which a number of parameters are variables and can have different -values for different robot variations.\todo[color=green]{which parameters? for example} When you want to load such a model, you shold +values for different robot variations. For example, the length and the mass of the +legs of a robot can be different for different types of that robot model. +When you want to load such a model, you should specify which type of that robot is needed and its parameters are replaced in the parametric model and the model is created. @@ -370,12 +413,12 @@ cycle time to think in a cycle when new information is delivered to them. This model is not ideal because the agents can have some spare time if network latency -occures, but it is better, more predictable and more fair than the current model. Also, +occurs, but it is better, more predictable and more fair than the current model. Also, no new information is arrived to agents in that spare time and they cannot send new commands for that cycle. Hopefully, by using a new binary network protocol the network traffic and therefore the latency will be reduced considerably. -Currently, an initial version of agent proxies is under development outside simspark +Currently, an initial version of agent proxies is under development outside SimSpark project using Java. \subsection{Integration With Existing Robotic Frameworks} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2013-03-28 13:15:06
|
Revision: 342 http://simspark.svn.sourceforge.net/simspark/?rev=342&view=rev Author: hedayat Date: 2013-03-28 13:14:58 +0000 (Thu, 28 Mar 2013) Log Message: ----------- Add some content for agent proxies section. Also some notes about rcssserver3d/simspark separation. Modified Paths: -------------- trunk/spark/doc/papers/2013/opensource.tex trunk/spark/doc/papers/2013/reference.bib Modified: trunk/spark/doc/papers/2013/opensource.tex =================================================================== --- trunk/spark/doc/papers/2013/opensource.tex 2013-03-26 11:40:17 UTC (rev 341) +++ trunk/spark/doc/papers/2013/opensource.tex 2013-03-28 13:14:58 UTC (rev 342) @@ -84,7 +84,8 @@ In comparison to specialized simulators, users can create new simulations by using a scene description language. -Agents communicate with the simulation server via UDP or TCP, and therefore can be implemented in any language that supports such sockets.\todo{integrated agent as well} +Agents communicate with the simulation server via UDP or TCP, and therefore can be implemented in any language that supports such sockets. +\todo{integrated agent as well} Multiple software agents can participate in one simulation. Simulations are created within the server using the Ruby language and text-based RSG files. @@ -93,18 +94,25 @@ The soccer simulation for this tournament was developed in parallel with the SimSpark simulator. In its initial version players were modeled as spheres in a physical three dimensional world. Since then SimSpark grew considerably and now supports humanoid players with articulated bodies. % \subsection{Architectural Changes (?)} -\todo[inline]{separation of simspark and rcssserver3d}\todo{Hedayat Vatankhah: -Architecture Enhancements Proposal for Soccer Simulation Server 3D} -It served from the beginning as a test bed and a guide for essential new features that were added to the simulator during development. However changes to the simulator core were never customized for the soccer simulation. Instead generic simulator services were implemented with all soccer specific details contained in a set of plugins. +It served from the beginning as a test bed and a guide for essential new features that were added to the simulator during development. However changes to the simulator core were never customized for the soccer simulation. Instead generic simulator services were implemented with all soccer specific details contained in a set of plugins and applications. Until 2008, soccer simulation and SimSpark simulator were developed and released as a single project called rcssserver3d, but it was already decided that they should be separated +to make the separation more visible for both users new developers. +In late 2008, the separation happened with the migration of sources from CVS repository +at \url{http://sserver.sourceforge.net} to SimSpark's project Subversion repository at +\url{http://simspark.sourceforge.net}. As part of this process, the project was broken +to two main projects (SimSpark simulator and RCSSServer3D soccer simulation software) +and two auxiliary projects (RSGEdit and simspark-utilities). Also, simspark binary was +renamed to rcssserver3d to make it clear that it runs soccer simulation rather than a +generic simulation environment. -\todo[inline]{Cmake migration?} -\todo[inline]{windows support (mingw32,VC)} +SimSpark was never a single-platform project, but it practically didn't support +Windows. In recent years, Windows support was added after migration from Autotools +to CMake, and windows installers are now released. \section{Spark} \label{s:spark} \subsection{New Sensors} - ACC - - FSR + - FRP (Force Resistance Perceptor) - Gyro - Restrict Vision -- Line perceptions @@ -343,9 +351,38 @@ parametric model and the model is created. \subsection{Agent Proxies} +Initially, SimSpark used SPADES\cite{riley2003spades} for managing external agents. It +managed the simulation time and the time spend in agents for thinking. Later it was +dropped because of its complexities and agents communicated with the server directly. +The cycle duration was managed by the server without considering agents and the network +latency. Therefore, if agents were unable to deliver their commands to the server in a +cycle because of network latency, their commands were executed by the simulator +in the next simulation cycle. As the number of soccer players in soccer simulation +increased, this problem become more apparent. -\subsection{Player Integration??} +To solve this problem, the concept of agent proxies were proposed. Agent proxies +run on the client machines were agents will be running, and they are responsible for +communicating with the server. Agents communicate with the proxies instead of +communicating directly with the simulator. In this model, the cycle time is managed +by the proxies on the client side, and they communicate with the simulator in Sync Mode. +Therefore, the simulator waits for all proxies to signal the end of a cycle and +then proceeds with the next cycle. This model ensures that agents can use the allowed +cycle time to think in a cycle when new information is delivered to them. +This model is not ideal because the agents can have some spare time if network latency +occures, but it is better, more predictable and more fair than the current model. Also, +no new information is arrived to agents in that spare time and they cannot send new +commands for that cycle. Hopefully, by using a new binary network protocol the network +traffic and therefore the latency will be reduced considerably. + +Currently, an initial version of agent proxies is under development outside simspark +project using Java. + +\subsection{Integration With Existing Robotic Frameworks} +\todo{Hedayat Vatankhah:Architecture Enhancements Proposal for Soccer +Simulation Server 3D} + + \section{Applications} \label{s:application} \paragraph{RoboCup Soccer Simulation League} Modified: trunk/spark/doc/papers/2013/reference.bib =================================================================== --- trunk/spark/doc/papers/2013/reference.bib 2013-03-26 11:40:17 UTC (rev 341) +++ trunk/spark/doc/papers/2013/reference.bib 2013-03-28 13:14:58 UTC (rev 342) @@ -86,3 +86,12 @@ timestamp = {2013.03.25} } +@article{riley2003spades, + title={SPADES: a system for parallel-agent, discrete-event simulation}, + author={Riley, Patrick}, + journal={AI Magazine}, + volume={24}, + number={2}, + pages={41}, + year={2003} +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |