diff --git a/scenarios/CMakeLists.txt b/scenarios/CMakeLists.txt index 47803ece69ba7affb572132ca195d055173eb7ea..3b942c24894a6fabe2d760ff167cf0bf34138b8c 100644 --- a/scenarios/CMakeLists.txt +++ b/scenarios/CMakeLists.txt @@ -2,4 +2,3 @@ add_subdirectory(WeissHapticSensorsUnitTest) add_subdirectory(MotionControlTest) add_subdirectory(statecharttestscenario) -add_subdirectory(MovePlatformToLandmarkGroupTest) diff --git a/scenarios/MovePlatformToLandmarkGroupTest/CMakeLists.txt b/scenarios/MovePlatformToLandmarkGroupTest/CMakeLists.txt deleted file mode 100644 index d20f40b8b6d3c0ea97e3533a08c865b3d9dfbd3c..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkGroupTest/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -# Add your components below as shown in the following example: -# -# set(SCENARIO_COMPONENTS -# ConditionHandler -# Observer -# PickAndPlaceComponent) - -set(SCENARIO_COMPONENTS - ConditionHandler - SystemObserver - RobotControl -# RobotStateComponent - PlatformUnitObserver -# PlatformUnitDynamicSimulation -# Simulator - XMLRemoteStateOfferer - ) - -# optional 3rd parameter: "path/to/global/config.cfg" -armarx_scenario("MovePlatformToLandmarkGroupTest" "${SCENARIO_COMPONENTS}") - -#set(SCENARIO_CONFIGS -# config/ComponentName.optionalString.cfg -# ) -# optional 3rd parameter: "path/to/global/config.cfg" -#armarx_scenario_from_configs("statecharttestscenario" "${SCENARIO_CONFIGS}") diff --git a/scenarios/MovePlatformToLandmarkGroupTest/MovePlatformToLandmarkGroupTest.armarxgui b/scenarios/MovePlatformToLandmarkGroupTest/MovePlatformToLandmarkGroupTest.armarxgui deleted file mode 100644 index 41292d6d01b7c733e3e4466a71732df8e921d1c1..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkGroupTest/MovePlatformToLandmarkGroupTest.armarxgui +++ /dev/null @@ -1,38 +0,0 @@ -[General] -loadedLibs=/home/SMBAD/wittenbe/home/repos/armarx/Gui/build/lib/libConditionViewerGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/Gui/build/lib/libHandUnitGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/Gui/build/lib/libHapticUnitGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/Gui/build/lib/libKinematicUnitGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/Gui/build/lib/libLoggingGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/Gui/build/lib/libObserverPropertiesGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/Gui/build/lib/libPlatformUnitGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/Gui/build/lib/libSensorActorWidgetsGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/Gui/build/lib/libStatechartEditorGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/Gui/build/lib/libStatechartEventSenderGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/Gui/build/lib/libStateChartGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/Gui/build/lib/libStatechartViewerGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/Gui/build/lib/libSystemStateMonitorGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/MemoryX/build/lib/libWorkingMemoryGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/SimulationX/build/lib/libSimulatorControlGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/VisionX/build/lib/libVisionXGuiPlugin.so, /home/SMBAD/wittenbe/home/repos/armarx/Armar4/build/lib/libHardwareGuiPlugin.so -MainWindowGeometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\x2\x10\0\0\0\x46\0\0\a\x17\0\0\x4\x13\0\0\x2\x11\0\0\0\x62\0\0\a\x16\0\0\x4\x12\0\0\0\0\0\0) -DockWidgetsState="@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x1\0\0\0\x1\0\0\x5\x6\0\0\x3\x82\xfc\x2\0\0\0\x2\xfc\0\0\0\x19\0\0\x2\xd2\0\0\0\xe8\0\xff\xff\xff\xfc\x1\0\0\0\x2\xfb\0\0\0\x1a\0\x44\0o\0\x63\0k\0L\0o\0g\0V\0i\0\x65\0w\0\x65\0r\x1\0\0\0\0\0\0\x3\xec\0\0\0\xc8\0\xff\xff\xff\xfb\0\0\0,\0\x44\0o\0\x63\0k\0S\0y\0s\0t\0\x65\0m\0S\0t\0\x61\0t\0\x65\0M\0o\0n\0i\0t\0o\0r\x1\0\0\x3\xf2\0\0\x1\x14\0\0\0\xd3\0\xff\xff\xff\xfb\0\0\0\x1e\0\x44\0o\0\x63\0k\0\x45\0v\0\x65\0n\0t\0S\0\x65\0n\0\x64\0\x65\0r\x1\0\0\x2\xf1\0\0\0\xaa\0\0\0\xaa\0\xff\xff\xff\0\0\0\0\0\0\x3\x82\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0)" -WidgetCustomNames=EventSender, LogViewer, SystemStateMonitor - -[EventSender] -WidgetBaseName=EventSender -widgetWidth=1286 -widgetHeight=150 -EventSender\1\eventSenderName=startMovePlatformToLandmarkGroupTest -EventSender\1\description= -EventSender\1\componentName=RobotControlStateOfferer -EventSender\1\globalStateIdentifier=RobotStatechart->RobotControl->Functional -EventSender\1\eventName=EvLoadScenario -EventSender\1\eventReceiverName=toAll -EventSender\1\parameters\1\key=proxyName -EventSender\1\parameters\1\VariantTypeId=-2125418521 -EventSender\1\parameters\1\value=MovePlatformToLandmarkGroupRemoteStateOfferer -EventSender\1\parameters\2\key=stateName -EventSender\1\parameters\2\VariantTypeId=-2125418521 -EventSender\1\parameters\2\value=MovePlatformToLandmark -EventSender\1\parameters\size=2 -EventSender\size=1 - -[LogViewer] -WidgetBaseName=LogViewer -widgetWidth=1004 -widgetHeight=690 -verbosityLevel=1 -autoFilterAdding=true - -[SystemStateMonitor] -WidgetBaseName=SystemStateMonitor -widgetWidth=276 -widgetHeight=702 -ManagerRepository=@Invalid() -MonitoredManagers=ArmarXGuiManager, ArmarXSimulatorManager, CommonStorageManager, ConditionHandlerManager, KinematicUnitDynamicSimulationManager, KinematicUnitObserverManager, KinematicUnitSimulationManager, LongtermMemoryManager, MovePlatformAppManager, PlatformUnitDynamicSimulationManager, PlatformUnitObserverManager, PriorKnowledgeManager, RobotControlManager, RobotStateComponentManager, SystemObserverManager, WavingManager diff --git a/scenarios/MovePlatformToLandmarkGroupTest/config/ConditionHandler.cfg b/scenarios/MovePlatformToLandmarkGroupTest/config/ConditionHandler.cfg deleted file mode 100644 index fae5ffe0ad36b025157e2105e37c3e2a30f7506c..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkGroupTest/config/ConditionHandler.cfg +++ /dev/null @@ -1,92 +0,0 @@ -# ================================================================== -# ArmarX properties -# ================================================================== - -# ArmarX.CachePath: Path for cache files -# Attributes: -# - Default: ${HOME}/.armarx/mongo/.cache -# - Case sensitivity: no -# - Required: no -# ArmarX.CachePath = ${HOME}/.armarx/mongo/.cache - - -# ArmarX.DataPath: Semicolon-separated search list for data files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.DataPath = "" - - -# ArmarX.Verbosity: Global logging level for whole application -# Attributes: -# - Default: Verbose -# - Case sensitivity: no -# - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.Verbosity = Verbose - - -# ArmarX.DisableLogging: Turn logging off in whole application -# Attributes: -# - Default: 0 -# - Case sensitivity: no -# - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.DisableLogging = 0 - - -# ArmarX.ApplicationName: Application name -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.ApplicationName = "" - - -# ArmarX.Config: Comma-separated list of configuration files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.Config = "" - - -# ================================================================== -# ArmarX.ConditionHandler properties -# ================================================================== - -# ArmarX.ConditionHandler.HistoryLength: Length of condition history kept by the conditionhandler -# Attributes: -# - Default: 1000 -# - Case sensitivity: no -# - Required: no -# ArmarX.ConditionHandler.HistoryLength = 1000 - - -# ArmarX.ConditionHandler.Observers: Comma seperated observer list -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.ConditionHandler.Observers = "" - - -# ArmarX.ConditionHandler.MinimumLoggingLevel: Local logging level only for this component -# Attributes: -# - Default: Undefined -# - Case sensitivity: no -# - Required: no -# - Possible values: {Error, Fatal, Info, Undefined, Verbose, Warning} -# ArmarX.ConditionHandler.MinimumLoggingLevel = Undefined - - -# ArmarX.ConditionHandler.ObjectName: Name of IceGrid well-known object -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.ConditionHandler.ObjectName = "" - - - diff --git a/scenarios/MovePlatformToLandmarkGroupTest/config/PlatformUnitObserver.cfg b/scenarios/MovePlatformToLandmarkGroupTest/config/PlatformUnitObserver.cfg deleted file mode 100644 index e018cd2d6c185fae2a5bc480e6897e86e1fe7915..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkGroupTest/config/PlatformUnitObserver.cfg +++ /dev/null @@ -1,84 +0,0 @@ -# ================================================================== -# ArmarX properties -# ================================================================== - -# ArmarX.CachePath: Path for cache files -# Attributes: -# - Default: ${HOME}/.armarx/mongo/.cache -# - Case sensitivity: no -# - Required: no -# ArmarX.CachePath = ${HOME}/.armarx/mongo/.cache - - -# ArmarX.DataPath: Semicolon-separated search list for data files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.DataPath = "" - - -# ArmarX.Verbosity: Global logging level for whole application -# Attributes: -# - Default: Verbose -# - Case sensitivity: no -# - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.Verbosity = Verbose - - -# ArmarX.DisableLogging: Turn logging off in whole application -# Attributes: -# - Default: 0 -# - Case sensitivity: no -# - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.DisableLogging = 0 - - -# ArmarX.ApplicationName: Application name -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.ApplicationName = "" - - -# ArmarX.Config: Comma-separated list of configuration files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.Config = "" - - -# ================================================================== -# ArmarX.PlatformUnitObserver properties -# ================================================================== - -# ArmarX.PlatformUnitObserver.PlatformName: Name of the platform (will publish values on PlatformName + 'State') -# Attributes: -# - Default: Platform -# - Case sensitivity: no -# - Required: no -# ArmarX.PlatformUnitObserver.PlatformName = Platform - - -# ArmarX.PlatformUnitObserver.MinimumLoggingLevel: Local logging level only for this component -# Attributes: -# - Default: Undefined -# - Case sensitivity: no -# - Required: no -# - Possible values: {Error, Fatal, Info, Undefined, Verbose, Warning} -# ArmarX.PlatformUnitObserver.MinimumLoggingLevel = Undefined - - -# ArmarX.PlatformUnitObserver.ObjectName: Name of IceGrid well-known object -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.PlatformUnitObserver.ObjectName = "" - - - diff --git a/scenarios/MovePlatformToLandmarkGroupTest/config/RobotControl.cfg b/scenarios/MovePlatformToLandmarkGroupTest/config/RobotControl.cfg deleted file mode 100644 index cefc98c81c93ac88b47ae16bf4bf448f5b3934c8..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkGroupTest/config/RobotControl.cfg +++ /dev/null @@ -1,93 +0,0 @@ -# ================================================================== -# ArmarX properties -# ================================================================== - -# ArmarX.CachePath: Path for cache files -# Attributes: -# - Default: ${HOME}/.armarx/mongo/.cache -# - Case sensitivity: no -# - Required: no -# ArmarX.CachePath = ${HOME}/.armarx/mongo/.cache - - -# ArmarX.DataPath: Semicolon-separated search list for data files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.DataPath = "" - - -# ArmarX.Verbosity: Global logging level for whole application -# Attributes: -# - Default: Verbose -# - Case sensitivity: no -# - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.Verbosity = Verbose - - -# ArmarX.DisableLogging: Turn logging off in whole application -# Attributes: -# - Default: 0 -# - Case sensitivity: no -# - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.DisableLogging = 0 - - -# ArmarX.ApplicationName: Application name -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.ApplicationName = "" - - -# ArmarX.Config: Comma-separated list of configuration files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.Config = "" - - -# ================================================================== -# ArmarX.RobotControlStateOfferer properties -# ================================================================== - -# ArmarX.RobotControlStateOfferer.logstates: -# Attributes: -# - Default: Comma seperated list with state names to log. If not set, all transitions will be logged -# - Case sensitivity: no -# - Required: no -# ArmarX.RobotControlStateOfferer.logstates = Comma seperated list with state names to log. If not set, all transitions will be logged - - -# ArmarX.RobotControlStateOfferer.enableStatechartLogger: disable/enable statechart logger -# Attributes: -# - Default: 0 -# - Case sensitivity: no -# - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.RobotControlStateOfferer.enableStatechartLogger = 0 - - -# ArmarX.RobotControlStateOfferer.MinimumLoggingLevel: Local logging level only for this component -# Attributes: -# - Default: Undefined -# - Case sensitivity: no -# - Required: no -# - Possible values: {Error, Fatal, Info, Undefined, Verbose, Warning} -# ArmarX.RobotControlStateOfferer.MinimumLoggingLevel = Undefined - - -# ArmarX.RobotControlStateOfferer.ObjectName: Name of IceGrid well-known object -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.RobotControlStateOfferer.ObjectName = "" - - - diff --git a/scenarios/MovePlatformToLandmarkGroupTest/config/SystemObserver.cfg b/scenarios/MovePlatformToLandmarkGroupTest/config/SystemObserver.cfg deleted file mode 100644 index 7102973bdf909d22014a0c940bfa2b128fffeabd..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkGroupTest/config/SystemObserver.cfg +++ /dev/null @@ -1,76 +0,0 @@ -# ================================================================== -# ArmarX properties -# ================================================================== - -# ArmarX.CachePath: Path for cache files -# Attributes: -# - Default: ${HOME}/.armarx/mongo/.cache -# - Case sensitivity: no -# - Required: no -# ArmarX.CachePath = ${HOME}/.armarx/mongo/.cache - - -# ArmarX.DataPath: Semicolon-separated search list for data files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.DataPath = "" - - -# ArmarX.Verbosity: Global logging level for whole application -# Attributes: -# - Default: Verbose -# - Case sensitivity: no -# - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.Verbosity = Verbose - - -# ArmarX.DisableLogging: Turn logging off in whole application -# Attributes: -# - Default: 0 -# - Case sensitivity: no -# - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.DisableLogging = 0 - - -# ArmarX.ApplicationName: Application name -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.ApplicationName = "" - - -# ArmarX.Config: Comma-separated list of configuration files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.Config = "" - - -# ================================================================== -# ArmarX.SystemObserver properties -# ================================================================== - -# ArmarX.SystemObserver.MinimumLoggingLevel: Local logging level only for this component -# Attributes: -# - Default: Undefined -# - Case sensitivity: no -# - Required: no -# - Possible values: {Error, Fatal, Info, Undefined, Verbose, Warning} -# ArmarX.SystemObserver.MinimumLoggingLevel = Undefined - - -# ArmarX.SystemObserver.ObjectName: Name of IceGrid well-known object -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.SystemObserver.ObjectName = "" - - - diff --git a/scenarios/MovePlatformToLandmarkGroupTest/config/XMLRemoteStateOfferer.cfg b/scenarios/MovePlatformToLandmarkGroupTest/config/XMLRemoteStateOfferer.cfg deleted file mode 100644 index 3bd0bcec6ca0d85f7e733f7b3938601c3a881a30..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkGroupTest/config/XMLRemoteStateOfferer.cfg +++ /dev/null @@ -1,83 +0,0 @@ -# ================================================================== -# ArmarX properties -# ================================================================== - -# ArmarX.CachePath: Path for cache files -# Attributes: -# - Default: ${HOME}/.armarx/mongo/.cache -# - Case sensitivity: no -# - Required: no -# ArmarX.CachePath = ${HOME}/.armarx/mongo/.cache - - -# ArmarX.DataPath: Semicolon-separated search list for data files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.DataPath = "" - - -# ArmarX.Verbosity: Global logging level for whole application -# Attributes: -# - Default: Verbose -# - Case sensitivity: no -# - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.Verbosity = Debug - - -# ArmarX.DisableLogging: Turn logging off in whole application -# Attributes: -# - Default: 0 -# - Case sensitivity: no -# - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.DisableLogging = 0 - - -# ArmarX.ApplicationName: Application name -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.ApplicationName = "" - - -# ArmarX.Config: Comma-separated list of configuration files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.Config = "" - - -# ================================================================== -# ArmarX.XMLStateComponent properties -# ================================================================== - -# ArmarX.XMLStateComponent.XMLStatechartGroupDefinitionFile: Path to statechart group definition file (*.scgxml) -# Attributes: -# - Case sensitivity: no -# - Required: yes -ArmarX.XMLStateComponent.XMLStatechartGroupDefinitionFile = RobotAPI/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmarkGroup.scgxml - - -# ArmarX.XMLStateComponent.MinimumLoggingLevel: Local logging level only for this component -# Attributes: -# - Default: Undefined -# - Case sensitivity: no -# - Required: no -# - Possible values: {Error, Fatal, Info, Undefined, Verbose, Warning} -# ArmarX.XMLStateComponent.MinimumLoggingLevel = Undefined - - -# ArmarX.XMLStateComponent.ObjectName: Name of IceGrid well-known object -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.XMLStateComponent.ObjectName = "" - - - diff --git a/scenarios/MovePlatformToLandmarkGroupTest/config/XMLRemoteStateOfferer1.cfg b/scenarios/MovePlatformToLandmarkGroupTest/config/XMLRemoteStateOfferer1.cfg deleted file mode 100644 index 0d049a6f8284b65784731218696f4013c401cf2c..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkGroupTest/config/XMLRemoteStateOfferer1.cfg +++ /dev/null @@ -1,83 +0,0 @@ -# ================================================================== -# ArmarX properties -# ================================================================== - -# ArmarX.CachePath: Path for cache files -# Attributes: -# - Default: ${HOME}/.armarx/mongo/.cache -# - Case sensitivity: no -# - Required: no -# ArmarX.CachePath = ${HOME}/.armarx/mongo/.cache - - -# ArmarX.DataPath: Semicolon-separated search list for data files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.DataPath = "" - - -# ArmarX.Verbosity: Global logging level for whole application -# Attributes: -# - Default: Verbose -# - Case sensitivity: no -# - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.Verbosity = Verbose - - -# ArmarX.DisableLogging: Turn logging off in whole application -# Attributes: -# - Default: 0 -# - Case sensitivity: no -# - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.DisableLogging = 0 - - -# ArmarX.ApplicationName: Application name -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no - ArmarX.ApplicationName = "123" - - -# ArmarX.Config: Comma-separated list of configuration files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.Config = "" - - -# ================================================================== -# ArmarX.XMLStateComponent properties -# ================================================================== - -# ArmarX.XMLStateComponent.XMLStatechartGroupDefinitionFile: Path to statechart group definition file (*.scgxml) -# Attributes: -# - Case sensitivity: no -# - Required: yes -ArmarX.XMLStateComponent.XMLStatechartGroupDefinitionFile = RobotAPI/source/RobotAPI/statecharts/MovePlatformGroup/MovePlatformGroup.scgxml - - -# ArmarX.XMLStateComponent.MinimumLoggingLevel: Local logging level only for this component -# Attributes: -# - Default: Undefined -# - Case sensitivity: no -# - Required: no -# - Possible values: {Error, Fatal, Info, Undefined, Verbose, Warning} -# ArmarX.XMLStateComponent.MinimumLoggingLevel = Undefined - - -# ArmarX.XMLStateComponent.ObjectName: Name of IceGrid well-known object -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no - ArmarX.XMLStateComponent.ObjectName = "MovePlatformGroup" - - - diff --git a/scenarios/MovePlatformToLandmarkGroupTest/start_the_scenario_in_SimulatorGui_first b/scenarios/MovePlatformToLandmarkGroupTest/start_the_scenario_in_SimulatorGui_first deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/scenarios/MovePlatformToLandmarkTest/WidgetMovePlatformToLandmarkApp.armarxgui b/scenarios/MovePlatformToLandmarkTest/WidgetMovePlatformToLandmarkApp.armarxgui deleted file mode 100644 index 81cb8bad1c5d5a2a8e029d180844ba465940dfc7..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkTest/WidgetMovePlatformToLandmarkApp.armarxgui +++ /dev/null @@ -1,38 +0,0 @@ -[General] -loadedLibs=Gui/build/lib/libConditionViewerGuiPlugin.so, Gui/build/lib/libHandUnitGuiPlugin.so, Gui/build/lib/libHardwareGuiPlugin.so, Gui/build/lib/libKinematicUnitGuiPlugin.so, Gui/build/lib/libLoggingGuiPlugin.so, Gui/build/lib/libObjectExaminerGuiPlugin.so, Gui/build/lib/libObserverPropertiesGuiPlugin.so, Gui/build/lib/libPlatformUnitGuiPlugin.so, Gui/build/lib/libSensorActorWidgetsGuiPlugin.so, Gui/build/lib/libStateChartGuiPlugin.so, Gui/build/lib/libSystemStateMonitorGuiPlugin.so, SimulationX/build/lib/libSimulatorControlGuiPlugin.so -MainWindowGeometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\xff\xff\xff\xff\0\0\0\x18\0\0\a\x80\0\0\x4 \0\0\0\0\0\0\0\0\xff\xff\xff\xfe\xff\xff\xff\xfe\0\0\0\0\x2\0) -DockWidgetsState="@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x1\0\0\0\x1\0\0\a\x80\0\0\x3\xbd\xfc\x2\0\0\0\x2\xfc\0\0\0\x19\0\0\x3\x2\0\0\0\xdc\0\xff\xff\xff\xfc\x1\0\0\0\x2\xfb\0\0\0\x1a\0\x44\0o\0\x63\0k\0L\0o\0g\0V\0i\0\x65\0w\0\x65\0r\x1\0\0\0\0\0\0\x5\xdd\0\0\0\xc8\0\xff\xff\xff\xfb\0\0\0,\0\x44\0o\0\x63\0k\0S\0y\0s\0t\0\x65\0m\0S\0t\0\x61\0t\0\x65\0M\0o\0n\0i\0t\0o\0r\x1\0\0\x5\xe3\0\0\x1\x9d\0\0\0\xd3\0\xff\xff\xff\xfb\0\0\0\x1e\0\x44\0o\0\x63\0k\0\x45\0v\0\x65\0n\0t\0S\0\x65\0n\0\x64\0\x65\0r\x1\0\0\x3!\0\0\0\xb5\0\0\0\xaa\0\xff\xff\xff\0\0\0\0\0\0\x3\xbd\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0)" -WidgetCustomNames=EventSender, LogViewer, SystemStateMonitor - -[EventSender] -WidgetBaseName=EventSender -widgetWidth=1920 -widgetHeight=161 -EventSender\1\eventSenderName=startMovePlatformToLandmarkTest -EventSender\1\description= -EventSender\1\componentName=RobotControlStateOfferer -EventSender\1\globalStateIdentifier=RobotStatechart->RobotControl->Functional -EventSender\1\eventName=EvLoadScenario -EventSender\1\eventReceiverName=toAll -EventSender\1\parameters\1\key=proxyName -EventSender\1\parameters\1\VariantTypeId=-2125418521 -EventSender\1\parameters\1\value=MovePlatformToLandmarkStateChartStateOfferer -EventSender\1\parameters\2\key=stateName -EventSender\1\parameters\2\VariantTypeId=-2125418521 -EventSender\1\parameters\2\value=MovePlatformToLandmarkStateChart -EventSender\1\parameters\size=2 -EventSender\size=1 - -[LogViewer] -WidgetBaseName=LogViewer -widgetWidth=1501 -widgetHeight=750 -verbosityLevel=1 -autoFilterAdding=true - -[SystemStateMonitor] -WidgetBaseName=SystemStateMonitor -widgetWidth=413 -widgetHeight=750 -ManagerRepository=@Invalid() -MonitoredManagers=ArmarXGuiManager, ArmarXSimulatorManager, CommonStorageManager, ConditionHandlerManager, KinematicUnitDynamicSimulationManager, KinematicUnitObserverManager, KinematicUnitSimulationManager, LongtermMemoryManager, MovePlatformAppManager, PlatformUnitDynamicSimulationManager, PlatformUnitObserverManager, PriorKnowledgeManager, RobotControlManager, RobotStateComponentManager, SystemObserverManager, WavingManager diff --git a/scenarios/MovePlatformToLandmarkTest/configs/ArmarXGui.cfg b/scenarios/MovePlatformToLandmarkTest/configs/ArmarXGui.cfg deleted file mode 100644 index 72e2e2ed2fb8fed63738266f09fe8ab9994bc0a3..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkTest/configs/ArmarXGui.cfg +++ /dev/null @@ -1,7 +0,0 @@ -ArmarX.LoadPlugins=${ArmarXHome_DIR}/Gui/build/lib/libKinematicUnitGuiPlugin.so -ArmarX.Show3DViewer=yes -# model XML file path containing a VirtualRobot RobotNodeSet that defines the joints -ArmarX.KinematicUnitGuiPlugin.RobotFileName=Armar4/data/robotmodel/ArmarIV.xml -# node set name -ArmarX.KinematicUnitGuiPlugin.RobotNodeSetName=Robot -ArmarX.KinematicUnitGuiPlugin.KinematicUnitName=Armar4KinematicUnit diff --git a/scenarios/MovePlatformToLandmarkTest/configs/ConditionHandler.cfg b/scenarios/MovePlatformToLandmarkTest/configs/ConditionHandler.cfg deleted file mode 100644 index 3bb2beb8145f198ecfbdd70005c24fe002562c4f..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkTest/configs/ConditionHandler.cfg +++ /dev/null @@ -1,92 +0,0 @@ -# ================================================================== -# ArmarX properties -# ================================================================== - -# ArmarX.CachePath: Path for cache files -# Attributes: -# - Default: .cache -# - Case sensitivity: no -# - Required: no -# ArmarX.CachePath = .cache - - -# ArmarX.DataPath: Semicolon-separated search list for data files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.DataPath = "" - - -# ArmarX.Verbosity: Global logging level for whole application -# Attributes: -# - Default: Verbose -# - Case sensitivity: no -# - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.Verbosity = Verbose - - -# ArmarX.DisableLogging: Turn logging off in whole application -# Attributes: -# - Default: 0 -# - Case sensitivity: no -# - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.DisableLogging = 0 - - -# ArmarX.ApplicationName: Application name -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.ApplicationName = "" - - -# ArmarX.Config: Comma-separated list of configuration files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.Config = "" - - -# ================================================================== -# ArmarX.ConditionHandler properties -# ================================================================== - -# ArmarX.ConditionHandler.HistoryLength: Length of condition history kept by the conditionhandler -# Attributes: -# - Default: 1000 -# - Case sensitivity: no -# - Required: no -# ArmarX.ConditionHandler.HistoryLength = 1000 - - -# ArmarX.ConditionHandler.Observers: Comma seperated observer list -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.ConditionHandler.Observers = "" - - -# ArmarX.ConditionHandler.MinimumLoggingLevel: Local logging level only for this component -# Attributes: -# - Default: Undefined -# - Case sensitivity: no -# - Required: no -# - Possible values: {Error, Fatal, Info, Undefined, Verbose, Warning} -# ArmarX.ConditionHandler.MinimumLoggingLevel = Undefined - - -# ArmarX.ConditionHandler.ObjectName: Name of IceGrid well-known object -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.ConditionHandler.ObjectName = "" - - - diff --git a/scenarios/MovePlatformToLandmarkTest/configs/Global.cfg b/scenarios/MovePlatformToLandmarkTest/configs/Global.cfg deleted file mode 100644 index 77927624693f052359958908ce6d8a1bb0e6bc4f..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkTest/configs/Global.cfg +++ /dev/null @@ -1,5 +0,0 @@ -ArmarX.DisableLogging = no -VisionX.DisableLogging = no - -ArmarX.GlobalMinimumLoggingLevel = Verbose -VisionX.GlobalMinimumLoggingLevel = Verbose diff --git a/scenarios/MovePlatformToLandmarkTest/configs/MovePlatformToLandmarkExample.xml b/scenarios/MovePlatformToLandmarkTest/configs/MovePlatformToLandmarkExample.xml deleted file mode 100644 index 57f2c211283dc7499d812259fbbe80643b1b8824..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkTest/configs/MovePlatformToLandmarkExample.xml +++ /dev/null @@ -1,45 +0,0 @@ -<MovePlatformToLandmarkStateChart> - <StateParameters> - <!-- - x/y are in mm - for now z=rotation around z axis in radian (values from about -PI to +PI) - --> - <targetLandmark>Test1</targetLandmark> - <landmarkTags> - <Item0>Start</Item0> - <Item1>Test1</Item1> - </landmarkTags> - <!-- lists of lists seem impossible, hence why there's only one point per landmark--> - <landmarkPositions> - <Item0> - <x>0</x> - <y>0</y> - <z>0</z> - </Item0> - <Item1> - <x>0</x> - <y>10000</y> - <z>0</z> - </Item1> - <Item2> - <x>0</x> - <y>10000</y> - <z>1</z> - </Item2> - <Item3> - <x>-3000</x> - <y>5000</y> - <z>1</z> - </Item3> - <!--Item4> - <x>0</x> - <y>0</y> - <z>0</z> - </Item4--> - </landmarkPositions> - <positionalAccuracy>11</positionalAccuracy> <!--mm--> - <orientationalAccuracy>0.2</orientationalAccuracy> <!--rad--> - <timeoutMoveTo>30001</timeoutMoveTo> - </StateParameters> -</MovePlatformToLandmarkStateChart> - diff --git a/scenarios/MovePlatformToLandmarkTest/configs/MovePlatformToLandmarkExampleGraph.xml b/scenarios/MovePlatformToLandmarkTest/configs/MovePlatformToLandmarkExampleGraph.xml deleted file mode 100644 index dc898b10e933fa50bbe51df8ce0242e827c2e923..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkTest/configs/MovePlatformToLandmarkExampleGraph.xml +++ /dev/null @@ -1,98 +0,0 @@ -<MovePlatformToLandmarkStateChart> - <StateParameters> - <!-- - x/y are in mm - for now z=rotation around z axis in radian (values from about -PI to +PI) - --> - <targetLandmark>TableWithRolls</targetLandmark> - <!-- frame serves as a node name --> - <landmarkNodes> - <Item0> - <x>0</x> - <y>0</y> - <z>0</z> - <frame>Start</frame> - </Item0> - <Item1> - <x>4200</x> - <y>0</y> - <z>0</z> - <frame>1</frame> - </Item1> - <Item2> - <x>4200</x> - <y>4000</y> - <z>0</z> - <frame>2</frame> - </Item2> - <Item3> - <x>4200</x> - <y>4000</y> - <z>3</z> - <frame>Handover</frame> - </Item3> - <Item4> - <x>3100</x> - <y>6000</y> - <z>0</z> - <frame>3</frame> - </Item4> - <Item5> - <x>3300</x> - <y>8300</y> - <z>0</z> - <frame>4</frame> - </Item5> - <Item6> - <x>2600</x> - <y>7600</y> - <z>0.8</z> - <frame>Oven</frame> - </Item6> - <Item7> - <x>3300</x> - <y>7150</y> - <z>-1.6</z> - <frame>TableWithRolls</frame> - </Item7> - <Item8> - <x>2600</x> - <y>9600</y> - <z>0.1</z> - <frame>Sink</frame> - </Item8> - <Item9> - <x>4500</x> - <y>9400</y> - <z>0</z> - <frame>Cupboard7Door</frame> - </Item9> - <Item10> - <x>3200</x> - <y>9600</y> - <z>0</z> - <frame>SinkTable</frame> - </Item10> - </landmarkNodes> - <!-- each edge is defined as "<nodename>;<nodename>" (";" is a delimiter between names, - so it shouldn't appear in any node name), all edges are bidirectional between the provided nodes --> - <landmarkEdges> - <Item0>Start;1</Item0> - <Item1>1;2</Item1> - <Item2>2;Handover</Item2> - <Item3>2;3</Item3> - <Item4>3;4</Item4> - <Item5>3;Oven</Item5> - <Item6>3;TableWithRolls</Item6> - <Item7>4;Oven</Item7> - <Item8>4;TableWithRolls</Item8> - <Item9>4;Sink</Item9> - <Item10>4;Cupboard7Door</Item10> - <Item11>TableWithRolls;SinkTable</Item11> - </landmarkEdges> - <positionalAccuracy>10</positionalAccuracy> <!--mm--> - <orientationalAccuracy>0.1</orientationalAccuracy> <!--rad--> - <timeoutMoveTo>30000</timeoutMoveTo> - <waitAfterLast>3000</waitAfterLast> - </StateParameters> -</MovePlatformToLandmarkStateChart> diff --git a/scenarios/MovePlatformToLandmarkTest/configs/MovePlatformToLandmarkTest.cfg b/scenarios/MovePlatformToLandmarkTest/configs/MovePlatformToLandmarkTest.cfg deleted file mode 100644 index 972396a37efb0d9b6ea4823dc6c269f9876b21bf..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkTest/configs/MovePlatformToLandmarkTest.cfg +++ /dev/null @@ -1,2 +0,0 @@ -ArmarX.MovePlatformToLandmarkStateChartStateOfferer.KinematicUnitObserverName=PlatformUnitObserver -ArmarX.MovePlatformToLandmarkStateChartStateOfferer.KinematicUnitName=PlatformUnitDynamicSimulation diff --git a/scenarios/MovePlatformToLandmarkTest/configs/PlatformUnitObserver.cfg b/scenarios/MovePlatformToLandmarkTest/configs/PlatformUnitObserver.cfg deleted file mode 100644 index 5fafd2950db0ef2b16a91dcb0c7996564af6e4c8..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkTest/configs/PlatformUnitObserver.cfg +++ /dev/null @@ -1,62 +0,0 @@ -# ================================================================== -# ArmarX properties -# ================================================================== - -# ArmarX.CachePath: Path for cache files -# Attributes: -# - Default: .cache -# - Case sensitivity: no -# - Required: no -# ArmarX.CachePath = .cache - - -# ArmarX.DataPath: Semicolon-separated search list for data files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.DataPath = "" - - -# ArmarX.Verbosity: Global logging level for whole application -# Attributes: -# - Default: Verbose -# - Case sensitivity: no -# - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.Verbosity = Verbose - - -# ArmarX.DisableLogging: Turn logging off in whole application -# Attributes: -# - Default: 0 -# - Case sensitivity: no -# - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.DisableLogging = 0 - - -# ArmarX.ApplicationName: Application name -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.ApplicationName = "" - - -# ArmarX.Config: Comma-separated list of configuration files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.Config = "" - - -# ================================================================== -# ArmarX.PlatformUnitObserver properties -# ================================================================== - -ArmarX.PlatformUnitObserver.PlatformName=Platform - - - diff --git a/scenarios/MovePlatformToLandmarkTest/configs/RobotControl.cfg b/scenarios/MovePlatformToLandmarkTest/configs/RobotControl.cfg deleted file mode 100644 index a5a0610eddf235a4011b5fdb0eb4370ed621ae0a..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkTest/configs/RobotControl.cfg +++ /dev/null @@ -1,76 +0,0 @@ -# ================================================================== -# ArmarX properties -# ================================================================== - -# ArmarX.CachePath: Path for cache files -# Attributes: -# - Default: .cache -# - Case sensitivity: no -# - Required: no -# ArmarX.CachePath = .cache - - -# ArmarX.DataPath: Semicolon-separated search list for data files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.DataPath = "" - - -# ArmarX.Verbosity: Global logging level for whole application -# Attributes: -# - Default: Verbose -# - Case sensitivity: no -# - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.Verbosity = Verbose - - -# ArmarX.DisableLogging: Turn logging off in whole application -# Attributes: -# - Default: 0 -# - Case sensitivity: no -# - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.DisableLogging = 0 - - -# ArmarX.ApplicationName: Application name -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.ApplicationName = "" - - -# ArmarX.Config: Comma-separated list of configuration files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.Config = "" - - -# ================================================================== -# ArmarX.RobotControlStateOfferer properties -# ================================================================== - -# ArmarX.RobotControlStateOfferer.MinimumLoggingLevel: Local logging level only for this component -# Attributes: -# - Default: Undefined -# - Case sensitivity: no -# - Required: no -# - Possible values: {Error, Fatal, Info, Undefined, Verbose, Warning} -# ArmarX.RobotControlStateOfferer.MinimumLoggingLevel = Undefined - - -# ArmarX.RobotControlStateOfferer.ObjectName: Name of IceGrid well-known object -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.RobotControlStateOfferer.ObjectName = "" - - - diff --git a/scenarios/MovePlatformToLandmarkTest/configs/SystemObserver.cfg b/scenarios/MovePlatformToLandmarkTest/configs/SystemObserver.cfg deleted file mode 100644 index 1347203c6bbb6d49bef0b13e1031aee2ca1e0155..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkTest/configs/SystemObserver.cfg +++ /dev/null @@ -1,76 +0,0 @@ -# ================================================================== -# ArmarX properties -# ================================================================== - -# ArmarX.CachePath: Path for cache files -# Attributes: -# - Default: .cache -# - Case sensitivity: no -# - Required: no -# ArmarX.CachePath = .cache - - -# ArmarX.DataPath: Semicolon-separated search list for data files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.DataPath = "" - - -# ArmarX.Verbosity: Global logging level for whole application -# Attributes: -# - Default: Verbose -# - Case sensitivity: no -# - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.Verbosity = Verbose - - -# ArmarX.DisableLogging: Turn logging off in whole application -# Attributes: -# - Default: 0 -# - Case sensitivity: no -# - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.DisableLogging = 0 - - -# ArmarX.ApplicationName: Application name -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.ApplicationName = "" - - -# ArmarX.Config: Comma-separated list of configuration files -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.Config = "" - - -# ================================================================== -# ArmarX.SystemObserver properties -# ================================================================== - -# ArmarX.SystemObserver.MinimumLoggingLevel: Local logging level only for this component -# Attributes: -# - Default: Undefined -# - Case sensitivity: no -# - Required: no -# - Possible values: {Error, Fatal, Info, Undefined, Verbose, Warning} -# ArmarX.SystemObserver.MinimumLoggingLevel = Undefined - - -# ArmarX.SystemObserver.ObjectName: Name of IceGrid well-known object -# Attributes: -# - Default: "" -# - Case sensitivity: no -# - Required: no -# ArmarX.SystemObserver.ObjectName = "" - - - diff --git a/scenarios/MovePlatformToLandmarkTest/startScenario.sh b/scenarios/MovePlatformToLandmarkTest/startScenario.sh deleted file mode 100755 index bb413a3847d8af8a9208f915a6be0012eefeeb6a..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkTest/startScenario.sh +++ /dev/null @@ -1,24 +0,0 @@ - -export CORE_PATH=../../../Core -export GUI_PATH=../../../Gui -export VISIONX_PATH=../..././VisionX -export ARMAR4_PATH=../../../Armar4 -export HUMANOIDROBOTAPI_PATH=../../../RobotAPI -export SCRIPT_PATH=$CORE_PATH/build/bin -export SIMULATION_PATH=../../../SimulationX - -export CORE_BIN_PATH=$CORE_PATH/build/bin -export GUI_BIN_PATH=$GUI_PATH/build/bin -export VISIONX_BIN_PATH=$VISIONX_PATH/build/bin -export ARMAR4_BIN_PATH=$ARMAR4_PATH/build/bin -export HUMANOIDROBOTAPI_BIN_PATH=$HUMANOIDROBOTAPI_PATH/build/bin - -export GLOBAL_CONFIG=./configs/Global.cfg - -# armarx components -$SCRIPT_PATH/startApplication.sh $HUMANOIDROBOTAPI_BIN_PATH/PlatformUnitObserverRun --Ice.Config=$GLOBAL_CONFIG,./configs/PlatformUnitObserver.cfg & -$SCRIPT_PATH/startApplication.sh $CORE_BIN_PATH/SystemObserverRun --Ice.Config=$GLOBAL_CONFIG & -$SCRIPT_PATH/startApplication.sh $CORE_BIN_PATH/RobotControlRun --Ice.Config=$GLOBAL_CONFIG & -$SCRIPT_PATH/startApplication.sh $CORE_BIN_PATH/ConditionHandlerRun --Ice.Config=$GLOBAL_CONFIG & -$SCRIPT_PATH/startApplication.sh $HUMANOIDROBOTAPI_BIN_PATH/MovePlatformAppRun --Ice.Config=$GLOBAL_CONFIG & -$SCRIPT_PATH/startApplication.sh $HUMANOIDROBOTAPI_BIN_PATH/MovePlatformToLandmarkAppRun --Ice.Config=$GLOBAL_CONFIG,./configs/MovePlatformToLandmarkTest.cfg & diff --git a/scenarios/MovePlatformToLandmarkTest/start_the_scenario_in_SimulatorGui_first b/scenarios/MovePlatformToLandmarkTest/start_the_scenario_in_SimulatorGui_first deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/scenarios/MovePlatformToLandmarkTest/stopScenario.sh b/scenarios/MovePlatformToLandmarkTest/stopScenario.sh deleted file mode 100755 index dfe89bbb34cdbb8bce7fda179e3ac7bf66723cd9..0000000000000000000000000000000000000000 --- a/scenarios/MovePlatformToLandmarkTest/stopScenario.sh +++ /dev/null @@ -1,32 +0,0 @@ - -skill () -{ - STR=`ps aux | grep -re "$1 --Ice.Default" | grep -v grep | awk '{print $2}'` - if [ ${#STR} == 0 ] - then - echo skipping $1 - else - echo killing $1 - kill -s $2 `ps aux | grep -re "$1 --Ice.Default" | grep -v grep | awk '{print $2}'` - fi -} - -echo SENDING SIGINT TO ALL PROCESSES -skill PlatformUnitObserverRun 2 -skill SystemObserverRun 2 -skill ConditionHandlerRun 2 -skill RobotControlRun 2 - -skill MovePlatformAppRun 2 -skill MovePlatformToLandmarkAppRun 2 - -sleep 1 - -echo SENDING SIGKILL TO ALL PROCESSES -skill PlatformUnitObserverRun 9 -skill SystemObserverRun 9 -skill ConditionHandlerRun 9 -skill RobotControlRun 9 - -skill MovePlatformAppRun 9 -skill MovePlatformToLandmarkAppRun 9 diff --git a/source/RobotAPI/applications/CMakeLists.txt b/source/RobotAPI/applications/CMakeLists.txt index ec585fcb60c53548a2988bbe7c138e56280f7e24..0abaf667b7855a98168feb4eb9bfe76020608a4c 100644 --- a/source/RobotAPI/applications/CMakeLists.txt +++ b/source/RobotAPI/applications/CMakeLists.txt @@ -4,10 +4,6 @@ add_subdirectory(HeadIKUnit) add_subdirectory(MotionControlTest) add_subdirectory(TCPControlUnit) -#obsolete -#add_subdirectory(MovePlatform) -#add_subdirectory(MovePlatformToLandmark) - add_subdirectory(WeissHapticSensorsUnit) add_subdirectory(WeissHapticSensor) add_subdirectory(HapticObserver) diff --git a/source/RobotAPI/applications/MovePlatform/CMakeLists.txt b/source/RobotAPI/applications/MovePlatform/CMakeLists.txt deleted file mode 100644 index 9c9c63e79a123fd552bb605490765134342762b3..0000000000000000000000000000000000000000 --- a/source/RobotAPI/applications/MovePlatform/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -#test case to move platform to prespecified positions - -armarx_component_set_name(MovePlatformApp) - -find_package(Eigen3 QUIET) - -armarx_build_if(Eigen3_FOUND "Eigen3 not available") - -include_directories(${Eigen3_INCLUDE_DIR}) - -if (NOT Simox_FOUND) - find_package(Simox 2.3.0 QUIET) -endif() -armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available") -include_directories(${Simox_INCLUDE_DIRS}) - -set(COMPONENT_LIBS MovePlatform) - -set(SOURCES main.cpp - MovePlatformApp.h) - -armarx_add_component_executable("${SOURCES}") diff --git a/source/RobotAPI/applications/MovePlatform/MovePlatformApp.h b/source/RobotAPI/applications/MovePlatform/MovePlatformApp.h deleted file mode 100644 index ac02948a56f3242ee93e338753a47ee852b2eaea..0000000000000000000000000000000000000000 --- a/source/RobotAPI/applications/MovePlatform/MovePlatformApp.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::applications::MovePlatformApp - * @author Valerij Wittenbeck - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_APPLICATION_MovePlatform_H -#define _ARMARX_APPLICATION_MovePlatform_H - - -#include <RobotAPI/statecharts/MovePlatform/MovePlatform.h> - -#include <Core/core/application/Application.h> - -namespace armarx -{ - class MovePlatformApp : - virtual public armarx::Application - { - /** - * @see armarx::Application::setup() - */ - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, - Ice::PropertiesPtr properties) - { - registry->addObject( Component::create<MovePlatformStateChart>(properties) ); - } - }; -} - -#endif diff --git a/source/RobotAPI/applications/MovePlatform/main.cpp b/source/RobotAPI/applications/MovePlatform/main.cpp deleted file mode 100644 index cb829dda7f8d3c05931738959dc5c6c4f960db13..0000000000000000000000000000000000000000 --- a/source/RobotAPI/applications/MovePlatform/main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::application::MovePlatform - * @author Valerij Wittenbeck - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "MovePlatformApp.h" -#include <Core/core/logging/Logging.h> - -int main(int argc, char* argv[]) -{ - armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::MovePlatformApp>(); - app->setName("MovePlatformApp"); - - return app->main(argc, argv); -} diff --git a/source/RobotAPI/applications/MovePlatformToLandmark/CMakeLists.txt b/source/RobotAPI/applications/MovePlatformToLandmark/CMakeLists.txt deleted file mode 100644 index a368cd102df640f1cd2584e3943bcd7100dfb15f..0000000000000000000000000000000000000000 --- a/source/RobotAPI/applications/MovePlatformToLandmark/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -#test case to move platform to prespecified positions - -armarx_component_set_name(MovePlatformToLandmarkApp) - -find_package(Eigen3 QUIET) - -armarx_build_if(Eigen3_FOUND "Eigen3 not available") - -include_directories(${Eigen3_INCLUDE_DIR}) - -if (NOT Simox_FOUND) - find_package(Simox 2.3.0 QUIET) -endif() -armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available") -include_directories(${Simox_INCLUDE_DIRS}) - -set(COMPONENT_LIBS MovePlatformToLandmark) - -set(SOURCES main.cpp - MovePlatformToLandmarkApp.h) - -armarx_add_component_executable("${SOURCES}") diff --git a/source/RobotAPI/applications/MovePlatformToLandmark/MovePlatformToLandmarkApp.h b/source/RobotAPI/applications/MovePlatformToLandmark/MovePlatformToLandmarkApp.h deleted file mode 100644 index 67a3bbaf475768b7a14d6d67b030f2cd28c0e6f8..0000000000000000000000000000000000000000 --- a/source/RobotAPI/applications/MovePlatformToLandmark/MovePlatformToLandmarkApp.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::applications::MovePlatformToLandmarkApp - * @author Valerij Wittenbeck - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_APPLICATION_MovePlatformToLandmark_H -#define _ARMARX_APPLICATION_MovePlatformToLandmark_H - - -#include <RobotAPI/statecharts/MovePlatformToLandmark/MovePlatformToLandmark.h> - -#include <Core/core/application/Application.h> - -namespace armarx -{ - class MovePlatformToLandmarkApp : - virtual public armarx::Application - { - /** - * @see armarx::Application::setup() - */ - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, - Ice::PropertiesPtr properties) - { - registry->addObject( Component::create<MovePlatformToLandmarkStateChart>(properties) ); - } - }; -} - -#endif diff --git a/source/RobotAPI/applications/MovePlatformToLandmark/main.cpp b/source/RobotAPI/applications/MovePlatformToLandmark/main.cpp deleted file mode 100644 index bdab85115fa1faf64133542a921b418bb938fcf5..0000000000000000000000000000000000000000 --- a/source/RobotAPI/applications/MovePlatformToLandmark/main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::application::MovePlatformToLandmark - * @author Valerij Wittenbeck - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "MovePlatformToLandmarkApp.h" -#include <Core/core/logging/Logging.h> - -int main(int argc, char* argv[]) -{ - armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::MovePlatformToLandmarkApp>(); - app->setName("MovePlatformToLandmarkApp"); - - return app->main(argc, argv); -} diff --git a/source/RobotAPI/statecharts/CMakeLists.txt b/source/RobotAPI/statecharts/CMakeLists.txt index 001b89747d5593f7b79106a238f03134d0fd14b1..d55cae78ff093408d1c1b17fbe92486b326404dc 100644 --- a/source/RobotAPI/statecharts/CMakeLists.txt +++ b/source/RobotAPI/statecharts/CMakeLists.txt @@ -6,12 +6,3 @@ add_subdirectory(MotionControlGroup) add_subdirectory(operations) add_subdirectory(motioncontrol) - -#legacy, delete asap (MovePlatformToLandmarkGroup has all relevant code) -#add_subdirectory(moveplatform) -#add_subdirectory(moveplatformtolandmark) - -add_subdirectory(MovePlatformToLandmarkGroup) - -add_subdirectory(FindAndGraspObjectGroup) -#add_subdirectory(LocalizeObjectGroup) diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/CMakeLists.txt b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/CMakeLists.txt deleted file mode 100644 index ea1ea32d17dbafcded4f928e3d344be2ebef5825..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/CMakeLists.txt +++ /dev/null @@ -1,66 +0,0 @@ -armarx_component_set_name("FindAndGraspObjectGroup") - -#find_package(MyLib QUIET) -#armarx_build_if(MyLib_FOUND "MyLib not available") -# -# all include_directories must be guarded by if(Xyz_FOUND) -# for multiple libraries write: if(X_FOUND AND Y_FOUND).... -#if(MyLib_FOUND) -# include_directories(${MyLib_INCLUDE_DIRS}) -#endif() - -set(COMPONENT_LIBS ArmarXInterfaces ArmarXCore ArmarXCoreStatechart ArmarXCoreObservers) - -# Sources - -set(SOURCES -FindAndGraspObjectGroupRemoteStateOfferer.cpp -./FindAndGraspObject.cpp -VisualServoSubGroup/VisualServo.cpp -VisualServoSubGroup/VisualServo.cpp -VisualServoSubGroup/LocalizeObject.cpp -VisualServoSubGroup/SelectObject.cpp -VisualServoSubGroup/VisualServoObjectSubGroup/VisualServoObject.cpp -VisualServoSubGroup/VisualServoObjectSubGroup/WaitForUpdates.cpp -VisualServoSubGroup/VisualServoObjectSubGroup/CalcVelocities.cpp -VisualServoSubGroup/VisualServoWrapper.cpp -GraspingWithTorquesSubGroup/GraspingWithTorques.cpp -GraspingWithTorquesSubGroup/Preshape.cpp -GraspingWithTorquesSubGroup/CloseHandWithTorques.cpp -GraspingWithTorquesSubGroup/CloseHandWithJointAngles.cpp -GraspingWithTorquesSubGroup/InstallTerminateConditions.cpp -LiftObjectSubGroup/LiftObject.cpp -LiftObjectSubGroup/ControlModeChooser.cpp -LiftObjectSubGroup/MoveJointsVelControl.cpp -LiftObjectSubGroup/MoveJointsPosControl.cpp -LiftObjectSubGroup/MoveJointsPosVelControl.cpp -LiftObjectSubGroup/ValidateTcpPose.cpp -#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.cpp -) - -set(HEADERS -FindAndGraspObjectGroupRemoteStateOfferer.h -./FindAndGraspObject.h -VisualServoSubGroup/VisualServo.h -VisualServoSubGroup/VisualServo.h -VisualServoSubGroup/LocalizeObject.h -VisualServoSubGroup/SelectObject.h -VisualServoSubGroup/VisualServoObjectSubGroup/VisualServoObject.h -VisualServoSubGroup/VisualServoObjectSubGroup/WaitForUpdates.h -VisualServoSubGroup/VisualServoObjectSubGroup/CalcVelocities.h -VisualServoSubGroup/VisualServoWrapper.h -GraspingWithTorquesSubGroup/GraspingWithTorques.h -GraspingWithTorquesSubGroup/Preshape.h -GraspingWithTorquesSubGroup/CloseHandWithTorques.h -GraspingWithTorquesSubGroup/CloseHandWithJointAngles.h -GraspingWithTorquesSubGroup/InstallTerminateConditions.h -LiftObjectSubGroup/LiftObject.h -LiftObjectSubGroup/ControlModeChooser.h -LiftObjectSubGroup/MoveJointsVelControl.h -LiftObjectSubGroup/MoveJointsPosControl.h -LiftObjectSubGroup/MoveJointsPosVelControl.h -LiftObjectSubGroup/ValidateTcpPose.h -#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.h -) - -armarx_add_component("${SOURCES}" "${HEADERS}") diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObject.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObject.cpp deleted file mode 100644 index 0e71fc272e380012b50ee4519a61ba93ecc68bff..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObject.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "FindAndGraspObject.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -FindAndGraspObject::SubClassRegistry FindAndGraspObject::Registry(FindAndGraspObject::GetName(), &FindAndGraspObject::CreateInstance); - - - -FindAndGraspObject::FindAndGraspObject(XMLStateConstructorParams stateData) : - XMLStateTemplate < FindAndGraspObject > (stateData) -{ -} - -void FindAndGraspObject::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void FindAndGraspObject::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void FindAndGraspObject::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void FindAndGraspObject::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string FindAndGraspObject::GetName() -{ - return "FindAndGraspObject"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr FindAndGraspObject::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new FindAndGraspObject(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObject.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObject.h deleted file mode 100644 index e6b0bfe9fd8f000307b831aecab5bd96931eddbf..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObject.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_FindAndGraspObject_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_FindAndGraspObject_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class FindAndGraspObject : - virtual public XMLStateTemplate < FindAndGraspObject > , - public XMLStateFactoryBase - { - public: - FindAndGraspObject(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObject.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObject.xml deleted file mode 100644 index 05a05900642caf1bdbc2f76845ecdadc0c811980..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObject.xml +++ /dev/null @@ -1,116 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="FindAndGraspObject" uuid="E32161DE-ABE3-484F-94B2-DCC3BE5B42C5" width="800" height="600"> - <Description>This statechart is responsible for localizing an object as well as the tcp's marker and with the help of visual servoing, grasp and lift that object.</Description> - <InputParameters> - <Parameter name="IKCutCartErrorMM" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="graspName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="graspRobotNodeSetName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="graspSetName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="handUnitName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="jointAnglesGrasp" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - <Parameter name="jointAnglesPreshape" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - <Parameter name="jointMaxSpeed" type="::armarx::FloatVariantData" optional="yes"/> - <Parameter name="jointMaxSpeedLift" type="::armarx::FloatVariantData" optional="yes"/> - <Parameter name="jointMaxSpeeds" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="yes"/> - <Parameter name="jointNames" type="::armarx::SingleTypeVariantListBase(::armarx::StringVariantData)" optional="no"/> - <Parameter name="jointTargetTolerance" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="jointTorquesGrasp" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - <Parameter name="kinematicChain" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="markerName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="minMarkerCertainty" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="minObjectCertainty" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="objectName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="referenceFrame" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="stepSize" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="targetJointValues" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - <Parameter name="tcpName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="thresholdVelocity" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="timeoutGrasp" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="timeoutInMs" type="::armarx::IntVariantData" optional="no"/> - <Parameter name="timeoutLiftObject" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="timeoutMinExecutionTime" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="timeoutPreshape" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="timeoutTotalMsec" type="::armarx::FloatVariantData" optional="yes"/> - <Parameter name="trajectoryOrientation" type="::armarx::QuaternionBase" optional="no"/> - <Parameter name="trajectoryPosition" type="::armarx::Vector3Base" optional="no"/> - <Parameter name="useOrientation" type="::armarx::BoolVariantData" optional="no"/> - <Parameter name="useTorquesForGrasping" type="::armarx::BoolVariantData" optional="no"/> - </InputParameters> - <OutputParameters/> - <LocalParameters/> - <Substates> - <EndState name="EvFailure" event="EvFailure" left="24.06" top="521.399" boundingSquareSize="83.1115"/> - <EndState name="EvSuccess" event="EvSuccess" left="694.035" top="520.959" boundingSquareSize="83.6954"/> - <LocalState name="GraspingWithTorques" refuuid="EA81BB5E-7691-4EC7-94E6-8D49A65167EC" left="340.228" top="121.154" boundingSquareSize="207.202"/> - <LocalState name="LiftObject" refuuid="1AB13665-FBF3-4677-A662-348E7D5C67EC" left="340.228" top="365.877" boundingSquareSize="200"/> - <LocalState name="VisualServo" refuuid="1CFCACD5-CF25-45C3-A3BC-C5A193C6E7EC" left="79.2105" top="120.4" boundingSquareSize="200"/> - </Substates> - <Events/> - <StartState substateName="VisualServo"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="IKCutCartErrorMM" to="IKCutCartErrorMM"/> - <ParameterMapping sourceType="Parent" from="graspName" to="graspName"/> - <ParameterMapping sourceType="Parent" from="graspSetName" to="graspSetName"/> - <ParameterMapping sourceType="Parent" from="kinematicChain" to="kinematicChain"/> - <ParameterMapping sourceType="Parent" from="markerName" to="markerName"/> - <ParameterMapping sourceType="Parent" from="minMarkerCertainty" to="minMarkerCertainty"/> - <ParameterMapping sourceType="Parent" from="minObjectCertainty" to="minObjectCertainty"/> - <ParameterMapping sourceType="Parent" from="objectName" to="objectName"/> - <ParameterMapping sourceType="Parent" from="referenceFrame" to="referenceFrame"/> - <ParameterMapping sourceType="Parent" from="stepSize" to="stepSize"/> - <ParameterMapping sourceType="Parent" from="tcpName" to="tcpName"/> - <ParameterMapping sourceType="Parent" from="timeoutTotalMsec" to="timeoutTotalMsec"/> - <ParameterMapping sourceType="Parent" from="useOrientation" to="useOrientation"/> - </ParameterMappings> - </StartState> - <Transitions> - <Transition from="VisualServo" to="EvFailure" eventName="EvFailure"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="65.6316" posY="534.105"/> - </SupportPoints> - </Transition> - <Transition from="VisualServo" to="GraspingWithTorques" eventName="EvSuccess"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="handUnitName" to="handUnitName"/> - <ParameterMapping sourceType="Parent" from="jointAnglesGrasp" to="jointAnglesGrasp"/> - <ParameterMapping sourceType="Parent" from="jointAnglesPreshape" to="jointAnglesPreshape"/> - <ParameterMapping sourceType="Parent" from="jointTorquesGrasp" to="jointTorquesGrasp"/> - <ParameterMapping sourceType="Parent" from="graspRobotNodeSetName" to="robotNodeSetName"/> - <ParameterMapping sourceType="Parent" from="thresholdVelocity" to="thresholdVelocity"/> - <ParameterMapping sourceType="Parent" from="timeoutGrasp" to="timeoutGrasp"/> - <ParameterMapping sourceType="Parent" from="timeoutMinExecutionTime" to="timeoutMinExecutionTime"/> - <ParameterMapping sourceType="Parent" from="timeoutPreshape" to="timeoutPreshape"/> - <ParameterMapping sourceType="Parent" from="useTorquesForGrasping" to="useTorquesForGrasping"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="353.053" posY="193.123"/> - </SupportPoints> - </Transition> - <Transition from="GraspingWithTorques" to="EvFailure" eventName="EvFailure"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="93.5439" posY="535.614"/> - </SupportPoints> - </Transition> - <Transition from="GraspingWithTorques" to="LiftObject" eventName="EvSuccess"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="438.298" posY="368.895"/> - </SupportPoints> - </Transition> - <Transition from="LiftObject" to="EvFailure" eventName="EvFailure"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="96.6255" posY="552.662"/> - </SupportPoints> - </Transition> - <Transition from="LiftObject" to="EvSuccess" eventName="EvSuccess"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="710.632" posY="537.123"/> - </SupportPoints> - </Transition> - </Transitions> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObjectGroup.scgxml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObjectGroup.scgxml deleted file mode 100644 index fd5531cace121fd39a5c744a42e9d83ff398f7ab..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObjectGroup.scgxml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<StatechartGroup name="FindAndGraspObjectGroup" package="RobotAPI"> - <Folder basename="GraspingWithTorquesSubGroup"> - <State filename="CloseHandWithJointAngles.xml"/> - <State filename="CloseHandWithTorques.xml"/> - <State filename="GraspingWithTorques.xml" visibility="public"/> - <State filename="InstallTerminateConditions.xml"/> - <State filename="Preshape.xml"/> - </Folder> - <Folder basename="LiftObjectSubGroup"> - <State filename="ControlModeChooser.xml"/> - <State filename="LiftObject.xml" visibility="public"/> - <State filename="MoveJointsPosControl.xml"/> - <State filename="MoveJointsPosVelControl.xml"/> - <State filename="MoveJointsVelControl.xml"/> - <State filename="ValidateTcpPose.xml"/> - </Folder> - <Folder basename="VisualServoSubGroup"> - <Folder basename="VisualServoObjectSubGroup"> - <State filename="CalcVelocities.xml"/> - <State filename="VisualServoObject.xml" visibility="public"/> - <State filename="WaitForUpdates.xml"/> - </Folder> - <State filename="LocalizeObject.xml"/> - <State filename="SelectObject.xml"/> - <State filename="VisualServo.xml" visibility="public"/> - <State filename="VisualServoWrapper.xml"/> - </Folder> - <State filename="FindAndGraspObject.xml" visibility="public"/> -</StatechartGroup> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObjectGroupRemoteStateOfferer.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObjectGroupRemoteStateOfferer.cpp deleted file mode 100644 index 83447852290eb9be102a8d2847aac036cf2cc329..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObjectGroupRemoteStateOfferer.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup::FindAndGraspObjectGroupRemoteStateOfferer - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "FindAndGraspObjectGroupRemoteStateOfferer.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -FindAndGraspObjectGroupRemoteStateOfferer::SubClassRegistry FindAndGraspObjectGroupRemoteStateOfferer::Registry(FindAndGraspObjectGroupRemoteStateOfferer::GetName(), &FindAndGraspObjectGroupRemoteStateOfferer::CreateInstance); - - - -FindAndGraspObjectGroupRemoteStateOfferer::FindAndGraspObjectGroupRemoteStateOfferer(StatechartGroupXmlReaderPtr reader) : - XMLRemoteStateOfferer < StatechartContext > (reader) -{ -} - -void FindAndGraspObjectGroupRemoteStateOfferer::onInitXMLRemoteStateOfferer() -{ - -} - -void FindAndGraspObjectGroupRemoteStateOfferer::onConnectXMLRemoteStateOfferer() -{ - -} - -void FindAndGraspObjectGroupRemoteStateOfferer::onExitXMLRemoteStateOfferer() -{ - -} - -// DO NOT EDIT NEXT FUNCTION -std::string FindAndGraspObjectGroupRemoteStateOfferer::GetName() -{ - return "FindAndGraspObjectGroupRemoteStateOfferer"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateOffererFactoryBasePtr FindAndGraspObjectGroupRemoteStateOfferer::CreateInstance(StatechartGroupXmlReaderPtr reader) -{ - return XMLStateOffererFactoryBasePtr(new FindAndGraspObjectGroupRemoteStateOfferer(reader)); -} - - - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObjectGroupRemoteStateOfferer.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObjectGroupRemoteStateOfferer.h deleted file mode 100644 index f4a7e357ad3cfab6537592e3a91e80e8f0b3764c..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/FindAndGraspObjectGroupRemoteStateOfferer.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_REMOTESTATEOFFERER_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_REMOTESTATEOFFERER_H - -#include <Core/statechart/xmlstates/XMLRemoteStateOfferer.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class FindAndGraspObjectGroupRemoteStateOfferer : - virtual public XMLRemoteStateOfferer < StatechartContext > // Change this statechart context if you need another context (dont forget to change in the constructor as well) - { - public: - FindAndGraspObjectGroupRemoteStateOfferer(StatechartGroupXmlReaderPtr reader); - - // inherited from RemoteStateOfferer - void onInitXMLRemoteStateOfferer(); - void onConnectXMLRemoteStateOfferer(); - void onExitXMLRemoteStateOfferer(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateOffererFactoryBasePtr CreateInstance(StatechartGroupXmlReaderPtr reader); - static SubClassRegistry Registry; - - - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithJointAngles.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithJointAngles.cpp deleted file mode 100644 index a0093942d46762628aa1da4164bbf848b358043c..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithJointAngles.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "CloseHandWithJointAngles.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -CloseHandWithJointAngles::SubClassRegistry CloseHandWithJointAngles::Registry(CloseHandWithJointAngles::GetName(), &CloseHandWithJointAngles::CreateInstance); - - - -CloseHandWithJointAngles::CloseHandWithJointAngles(XMLStateConstructorParams stateData) : - XMLStateTemplate < CloseHandWithJointAngles > (stateData) -{ -} - -void CloseHandWithJointAngles::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void CloseHandWithJointAngles::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void CloseHandWithJointAngles::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void CloseHandWithJointAngles::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string CloseHandWithJointAngles::GetName() -{ - return "CloseHandWithJointAngles"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr CloseHandWithJointAngles::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new CloseHandWithJointAngles(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithJointAngles.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithJointAngles.h deleted file mode 100644 index 5148aefc35ce76a5a07885a91d6607475ee84927..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithJointAngles.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_CloseHandWithJointAngles_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_CloseHandWithJointAngles_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class CloseHandWithJointAngles : - virtual public XMLStateTemplate < CloseHandWithJointAngles > , - public XMLStateFactoryBase - { - public: - CloseHandWithJointAngles(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithJointAngles.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithJointAngles.xml deleted file mode 100644 index e0c01e5f40c072f50f8bdc0f31a6fc6ed4eb1895..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithJointAngles.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="CloseHandWithJointAngles" uuid="1A2EC83D-18A0-40F3-AF4F-B7FDFFCE67EC" width="800" height="138.996"> - <Description>This state is responsible for initiating the closing of the hand via joint angle velocities.</Description> - <InputParameters> - <Parameter name="jointAnglesGrasp" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - <Parameter name="jointNames" type="::armarx::SingleTypeVariantListBase(::armarx::StringVariantData)" optional="no"/> - <Parameter name="timeoutGrasp" type="::armarx::FloatVariantData" optional="no"/> - </InputParameters> - <OutputParameters/> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvGraspWithJointAnglesTimeout"/> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithTorques.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithTorques.cpp deleted file mode 100644 index 9cd93607c634547738b71da1372a7d1c82bcf2c4..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithTorques.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "CloseHandWithTorques.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -CloseHandWithTorques::SubClassRegistry CloseHandWithTorques::Registry(CloseHandWithTorques::GetName(), &CloseHandWithTorques::CreateInstance); - - - -CloseHandWithTorques::CloseHandWithTorques(XMLStateConstructorParams stateData) : - XMLStateTemplate < CloseHandWithTorques > (stateData) -{ -} - -void CloseHandWithTorques::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void CloseHandWithTorques::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void CloseHandWithTorques::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void CloseHandWithTorques::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string CloseHandWithTorques::GetName() -{ - return "CloseHandWithTorques"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr CloseHandWithTorques::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new CloseHandWithTorques(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithTorques.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithTorques.h deleted file mode 100644 index 8d2ca8f79fa68ccdfdd79a6799d4f8e527dc205e..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithTorques.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_CloseHandWithTorques_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_CloseHandWithTorques_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class CloseHandWithTorques : - virtual public XMLStateTemplate < CloseHandWithTorques > , - public XMLStateFactoryBase - { - public: - CloseHandWithTorques(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithTorques.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithTorques.xml deleted file mode 100644 index c5acc3c4015af756241a28da39ab566c4c99197f..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/CloseHandWithTorques.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="CloseHandWithTorques" uuid="EC55F9F2-1CFA-41D9-A6A7-2E69639DE7EC" width="800" height="134.739"> - <Description>This state is responsible for initiating the closing of the hand via torques.</Description> - <InputParameters> - <Parameter name="jointNames" type="::armarx::SingleTypeVariantListBase(::armarx::StringVariantData)" optional="no"/> - <Parameter name="jointTorquesGrasp" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - <Parameter name="timeoutMinExecutionTime" type="::armarx::FloatVariantData" optional="no"/> - </InputParameters> - <OutputParameters/> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvMinExecutionTimeout"/> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/GraspingWithTorques.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/GraspingWithTorques.cpp deleted file mode 100644 index 287dc1dfdf08e712beb9f39c4700f9e5d1b4e22a..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/GraspingWithTorques.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "GraspingWithTorques.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -GraspingWithTorques::SubClassRegistry GraspingWithTorques::Registry(GraspingWithTorques::GetName(), &GraspingWithTorques::CreateInstance); - - - -GraspingWithTorques::GraspingWithTorques(XMLStateConstructorParams stateData) : - XMLStateTemplate < GraspingWithTorques > (stateData) -{ -} - -void GraspingWithTorques::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void GraspingWithTorques::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void GraspingWithTorques::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void GraspingWithTorques::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string GraspingWithTorques::GetName() -{ - return "GraspingWithTorques"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr GraspingWithTorques::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new GraspingWithTorques(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/GraspingWithTorques.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/GraspingWithTorques.h deleted file mode 100644 index 9b1f75886de6dd62fded621402376797ff40246b..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/GraspingWithTorques.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_GraspingWithTorques_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_GraspingWithTorques_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class GraspingWithTorques : - virtual public XMLStateTemplate < GraspingWithTorques > , - public XMLStateFactoryBase - { - public: - GraspingWithTorques(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/GraspingWithTorques.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/GraspingWithTorques.xml deleted file mode 100644 index 257759ef89f7f2a35085b66418d0fe2fbf07b7a1..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/GraspingWithTorques.xml +++ /dev/null @@ -1,91 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="GraspingWithTorques" uuid="EA81BB5E-7691-4EC7-94E6-8D49A65167EC" width="828.807" height="600"> - <Description>This statechart is responsible for closing a hand, thus grasping an object enclosed by the hand, via torque control.</Description> - <InputParameters> - <Parameter name="handUnitName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="jointAnglesGrasp" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - <Parameter name="jointAnglesPreshape" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - <Parameter name="jointTorquesGrasp" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - <Parameter name="robotNodeSetName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="thresholdVelocity" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="timeoutGrasp" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="timeoutMinExecutionTime" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="timeoutPreshape" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="useTorquesForGrasping" type="::armarx::BoolVariantData" optional="no"/> - </InputParameters> - <OutputParameters/> - <LocalParameters> - <Parameter name="jointNames" type="::armarx::SingleTypeVariantListBase(::armarx::StringVariantData)" optional="yes"/> - <Parameter name="jointVelocitiesDatafields" type="::armarx::SingleTypeVariantListBase(::armarx::DatafieldRefBase)" optional="yes"/> - </LocalParameters> - <Substates> - <LocalState name="CloseHandWithJointAngles" refuuid="1A2EC83D-18A0-40F3-AF4F-B7FDFFCE67EC" left="392.85" top="252.868" boundingSquareSize="200"/> - <LocalState name="CloseHandWithTorques" refuuid="EC55F9F2-1CFA-41D9-A6A7-2E69639DE7EC" left="396.594" top="120.4" boundingSquareSize="197.321"/> - <EndState name="EvFailure" event="EvFailure" left="63.8699" top="439.042" boundingSquareSize="188.546"/> - <EndState name="EvSuccess" event="EvSuccess" left="347.686" top="433.44" boundingSquareSize="200"/> - <LocalState name="InstallTerminateConditions" refuuid="519A546A-872E-4085-917E-5E8D674EE7EC" left="465.314" top="184.04" boundingSquareSize="312.126"/> - <LocalState name="Preshape" refuuid="A7C2ABC7-DB4F-4D8F-B821-116F69A567EC" left="27.0775" top="148.312" boundingSquareSize="134.359"/> - </Substates> - <Events/> - <StartState substateName="Preshape"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="jointAnglesPreshape" to="jointAnglesPreshape"/> - <ParameterMapping sourceType="Parent" from="jointNames" to="jointNames"/> - <ParameterMapping sourceType="Parent" from="timeoutPreshape" to="timeoutPreshape"/> - <ParameterMapping sourceType="Parent" from="useTorquesForGrasping" to="useTorquesForGrasping"/> - </ParameterMappings> - </StartState> - <Transitions> - <Transition from="Preshape" to="CloseHandWithTorques" eventName="EvPreshapeTimeout_ToCloseWithTorques"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="jointNames" to="jointNames"/> - <ParameterMapping sourceType="Parent" from="jointTorquesGrasp" to="jointTorquesGrasp"/> - <ParameterMapping sourceType="Parent" from="timeoutMinExecutionTime" to="timeoutMinExecutionTime"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="222.889" posY="127.123"/> - </SupportPoints> - </Transition> - <Transition from="Preshape" to="CloseHandWithJointAngles" eventName="EvPreshapeTimeout_ToCloseWithJointAngles"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="jointAnglesGrasp" to="jointAnglesGrasp"/> - <ParameterMapping sourceType="Parent" from="jointNames" to="jointNames"/> - <ParameterMapping sourceType="Parent" from="timeoutGrasp" to="timeoutGrasp"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="228.821" posY="282.213"/> - </SupportPoints> - </Transition> - <Transition from="CloseHandWithTorques" to="InstallTerminateConditions" eventName="EvMinExecutionTimeout"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="handUnitName" to="handUnitName"/> - <ParameterMapping sourceType="Parent" from="jointNames" to="jointNames"/> - <ParameterMapping sourceType="Parent" from="jointVelocitiesDatafields" to="jointVelocitiesDatafields"/> - <ParameterMapping sourceType="Parent" from="thresholdVelocity" to="thresholdVelocity"/> - <ParameterMapping sourceType="Parent" from="timeoutGrasp" to="timeoutGrasp"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="488.152" posY="191.532"/> - </SupportPoints> - </Transition> - <Transition from="CloseHandWithJointAngles" to="EvSuccess" eventName="EvGraspWithJointAnglesTimeout"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="455.947" posY="437.303"/> - </SupportPoints> - </Transition> - <Transition from="InstallTerminateConditions" to="EvSuccess" eventName="EvMinExecutionTimeout"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="539.001" posY="449.168"/> - </SupportPoints> - </Transition> - <Transition from="InstallTerminateConditions" to="EvSuccess" eventName="EvAllJointVelocitiesLow"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="541.544" posY="511.882"/> - </SupportPoints> - </Transition> - </Transitions> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/InstallTerminateConditions.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/InstallTerminateConditions.cpp deleted file mode 100644 index def44556fcff680e9493ad7215610cc5ebced5b7..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/InstallTerminateConditions.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "InstallTerminateConditions.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -InstallTerminateConditions::SubClassRegistry InstallTerminateConditions::Registry(InstallTerminateConditions::GetName(), &InstallTerminateConditions::CreateInstance); - - - -InstallTerminateConditions::InstallTerminateConditions(XMLStateConstructorParams stateData) : - XMLStateTemplate < InstallTerminateConditions > (stateData) -{ -} - -void InstallTerminateConditions::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void InstallTerminateConditions::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void InstallTerminateConditions::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void InstallTerminateConditions::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string InstallTerminateConditions::GetName() -{ - return "InstallTerminateConditions"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr InstallTerminateConditions::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new InstallTerminateConditions(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/InstallTerminateConditions.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/InstallTerminateConditions.h deleted file mode 100644 index b2b5a8e1f19a8a65ca091d30dbfed4384e9a3fb4..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/InstallTerminateConditions.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_InstallTerminateConditions_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_InstallTerminateConditions_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class InstallTerminateConditions : - virtual public XMLStateTemplate < InstallTerminateConditions > , - public XMLStateFactoryBase - { - public: - InstallTerminateConditions(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/InstallTerminateConditions.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/InstallTerminateConditions.xml deleted file mode 100644 index 6af584006c92959a3b66aa60218eb5ffd663cf80..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/InstallTerminateConditions.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="InstallTerminateConditions" uuid="519A546A-872E-4085-917E-5E8D674EE7EC" width="1248.5" height="211.635"> - <Description>This state is responsible for installing conditions which guarantee that the hand was closed, ideally grasping an object.</Description> - <InputParameters> - <Parameter name="handUnitName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="jointNames" type="::armarx::SingleTypeVariantListBase(::armarx::StringVariantData)" optional="no"/> - <Parameter name="jointVelocitiesDatafields" type="::armarx::SingleTypeVariantListBase(::armarx::DatafieldRefBase)" optional="no"/> - <Parameter name="thresholdVelocity" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="timeoutGrasp" type="::armarx::FloatVariantData" optional="no"/> - </InputParameters> - <OutputParameters/> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvMinExecutionTimeout"/> - <Event name="EvAllJointVelocitiesLow"> - <Description>Denotes that the hand is closed and is ideally grasping an object.</Description> - </Event> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/Preshape.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/Preshape.cpp deleted file mode 100644 index bff31dd78dcec59e637308a969c50fec2c66b57f..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/Preshape.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "Preshape.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -Preshape::SubClassRegistry Preshape::Registry(Preshape::GetName(), &Preshape::CreateInstance); - - - -Preshape::Preshape(XMLStateConstructorParams stateData) : - XMLStateTemplate < Preshape > (stateData) -{ -} - -void Preshape::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void Preshape::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void Preshape::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void Preshape::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string Preshape::GetName() -{ - return "Preshape"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr Preshape::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new Preshape(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/Preshape.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/Preshape.h deleted file mode 100644 index 6c50feb6e34768e910eda45bf55b5523224883c5..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/Preshape.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_Preshape_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_Preshape_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class Preshape : - virtual public XMLStateTemplate < Preshape > , - public XMLStateFactoryBase - { - public: - Preshape(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/Preshape.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/Preshape.xml deleted file mode 100644 index e94fbc377c13886c2b3c68899ef1c4e6ceb1787f..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/GraspingWithTorquesSubGroup/Preshape.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="Preshape" uuid="A7C2ABC7-DB4F-4D8F-B821-116F69A567EC" width="800" height="600"> - <Description>This state applies the joint preshape angles to the hand as a grasping preparation.</Description> - <InputParameters> - <Parameter name="jointAnglesPreshape" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - <Parameter name="jointNames" type="::armarx::SingleTypeVariantListBase(::armarx::StringVariantData)" optional="no"/> - <Parameter name="timeoutPreshape" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="useTorquesForGrasping" type="::armarx::BoolVariantData" optional="no"/> - </InputParameters> - <OutputParameters/> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvPreshapeTimeout_ToCloseWithTorques"> - <Description>Denotes that the hand should be closed with torques.</Description> - </Event> - <Event name="EvPreshapeTimeout_ToCloseWithJointAngles"> - <Description>Denotes that the hand should be closed with joint angle velocities.</Description> - </Event> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ControlModeChooser.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ControlModeChooser.cpp deleted file mode 100644 index 4c2d29aaf0696e596be6732ee012dbe6871f0e7f..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ControlModeChooser.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "ControlModeChooser.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -ControlModeChooser::SubClassRegistry ControlModeChooser::Registry(ControlModeChooser::GetName(), &ControlModeChooser::CreateInstance); - - - -ControlModeChooser::ControlModeChooser(XMLStateConstructorParams stateData) : - XMLStateTemplate < ControlModeChooser > (stateData) -{ -} - -void ControlModeChooser::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void ControlModeChooser::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void ControlModeChooser::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void ControlModeChooser::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string ControlModeChooser::GetName() -{ - return "ControlModeChooser"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr ControlModeChooser::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new ControlModeChooser(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ControlModeChooser.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ControlModeChooser.h deleted file mode 100644 index 3f9377ee927516116ecb99a4dc4b093ae0151c89..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ControlModeChooser.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_ControlModeChooser_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_ControlModeChooser_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class ControlModeChooser : - virtual public XMLStateTemplate < ControlModeChooser > , - public XMLStateFactoryBase - { - public: - ControlModeChooser(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ControlModeChooser.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ControlModeChooser.xml deleted file mode 100644 index ab499aa57e1395bd3b5a17280bea0b3700275668..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ControlModeChooser.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="ControlModeChooser" uuid="C460D44A-02F8-448B-977A-12FE332E67EC" width="800" height="186.618"> - <Description>This method activates the desired joint control mode.</Description> - <InputParameters> - <Parameter name="jointNames" type="::armarx::SingleTypeVariantListBase(::armarx::StringVariantData)" optional="no"/> - <Parameter name="targetJointValues" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - </InputParameters> - <OutputParameters> - <Parameter name="jointNames" type="::armarx::SingleTypeVariantListBase(::armarx::StringVariantData)" optional="no"/> - <Parameter name="targetJointValues" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - </OutputParameters> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvPosControl"/> - <Event name="EvVelControl"/> - <Event name="EvPosVelControl"/> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/LiftObject.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/LiftObject.cpp deleted file mode 100644 index 4a01c87c018bfaf539b4df7f51e644fcabf87a89..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/LiftObject.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "LiftObject.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -LiftObject::SubClassRegistry LiftObject::Registry(LiftObject::GetName(), &LiftObject::CreateInstance); - - - -LiftObject::LiftObject(XMLStateConstructorParams stateData) : - XMLStateTemplate < LiftObject > (stateData) -{ -} - -void LiftObject::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void LiftObject::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void LiftObject::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void LiftObject::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string LiftObject::GetName() -{ - return "LiftObject"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr LiftObject::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new LiftObject(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/LiftObject.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/LiftObject.h deleted file mode 100644 index 6987510d40df5e94a4507b03129628ef6ae94b74..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/LiftObject.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_LiftObject_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_LiftObject_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class LiftObject : - virtual public XMLStateTemplate < LiftObject > , - public XMLStateFactoryBase - { - public: - LiftObject(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/LiftObject.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/LiftObject.xml deleted file mode 100644 index d91eec4a8f410d3007665a735dee118be83779bd..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/LiftObject.xml +++ /dev/null @@ -1,142 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="LiftObject" uuid="1AB13665-FBF3-4677-A662-348E7D5C67EC" width="800" height="600"> - <Description>This statechart is responsible for lifting a grasped object so that it may travel with the robot safely.</Description> - <InputParameters> - <Parameter name="jointControlMode" type="::armarx::StringVariantData" optional="yes"/> - <Parameter name="jointMaxSpeed" type="::armarx::FloatVariantData" optional="yes"/> - <Parameter name="kinematicChain" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="tcpName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="timeoutLiftObject" type="::armarx::FloatVariantData" optional="no"/> - </InputParameters> - <OutputParameters/> - <LocalParameters> - <Parameter name="ikWithOrientation" type="::armarx::BoolVariantData" optional="yes"/> - <Parameter name="jointTargetTolerance" type="::armarx::FloatVariantData" optional="yes"/> - <Parameter name="kinematicChainName" type="::armarx::StringVariantData" optional="yes"/> - <Parameter name="targetOrientationDistanceTolerance" type="::armarx::FloatVariantData" optional="yes"/> - <Parameter name="targetPositionDistanceTolerance" type="::armarx::FloatVariantData" optional="yes"/> - <Parameter name="targetTCPOrientation" type="::armarx::FramedOrientationBase" optional="yes"/> - <Parameter name="targetTCPPosition" type="::armarx::FramedPositionBase" optional="yes"/> - <Parameter name="timeoutInMs" type="::armarx::IntVariantData" optional="yes"/> - </LocalParameters> - <Substates> - <RemoteState name="CalculateJointAngleConfiguration" refuuid="4A604EC0-8108-465C-9196-FFA35E12E7EC" proxyName="MotionControlGroupRemoteStateOfferer" left="24.06" top="120.4" boundingSquareSize="200"/> - <LocalState name="ControlModeChooser" refuuid="C460D44A-02F8-448B-977A-12FE332E67EC" left="52.0526" top="205.193" boundingSquareSize="156.91"/> - <EndState name="EvFailure" event="EvFailure" left="24.06" top="433.44" boundingSquareSize="200"/> - <EndState name="EvSuccess" event="EvSuccess" left="577.44" top="433.44" boundingSquareSize="200"/> - <LocalState name="MoveJointsPosControl" refuuid="B026AC8C-1E74-4DC4-AB2E-64F3132067EC" left="302.509" top="234.614" boundingSquareSize="200"/> - <LocalState name="MoveJointsPosVelControl" refuuid="CCFF18C7-FF4B-4503-8BF6-1D549997E7EC" left="528.07" top="198.856" boundingSquareSize="200"/> - <LocalState name="MoveJointsVelControl" refuuid="3B890A9E-53E2-49E2-AAB8-B8D37ED867EC" left="118.438" top="288.93" boundingSquareSize="200"/> - <LocalState name="ValidateTcpPose" refuuid="EA799BAC-0800-4214-B998-AB27CEE7E7EC" left="294.965" top="411.895" boundingSquareSize="222.091"/> - </Substates> - <Events/> - <StartState substateName="CalculateJointAngleConfiguration"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="ikWithOrientation" to="ikWithOrientation"/> - <ParameterMapping sourceType="Parent" from="kinematicChainName" to="kinematicChainName"/> - <ParameterMapping sourceType="Parent" from="targetOrientationDistanceTolerance" to="targetOrientationDistanceTolerance"/> - <ParameterMapping sourceType="Parent" from="targetPositionDistanceTolerance" to="targetPositionDistanceTolerance"/> - <ParameterMapping sourceType="Parent" from="targetTCPOrientation" to="targetTCPOrientation"/> - <ParameterMapping sourceType="Parent" from="targetTCPPosition" to="targetTCPPosition"/> - </ParameterMappings> - </StartState> - <Transitions> - <Transition from="CalculateJointAngleConfiguration" to="ControlModeChooser" eventName="EvCalculationDone"> - <ParameterMappings> - <ParameterMapping sourceType="Output" from="jointNames" to="jointNames"/> - <ParameterMapping sourceType="Output" from="targetJointValues" to="targetJointValues"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="128.246" posY="220.281"/> - </SupportPoints> - </Transition> - <Transition from="ControlModeChooser" to="MoveJointsPosControl" eventName="EvPosControl"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="jointMaxSpeed" to="jointMaxSpeed"/> - <ParameterMapping sourceType="Output" from="jointNames" to="jointNames"/> - <ParameterMapping sourceType="Parent" from="jointTargetTolerance" to="jointTargetTolerance"/> - <ParameterMapping sourceType="Output" from="targetJointValues" to="targetJointValues"/> - <ParameterMapping sourceType="Parent" from="timeoutInMs" to="timeoutInMs"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="308.544" posY="248.947"/> - </SupportPoints> - </Transition> - <Transition from="ControlModeChooser" to="MoveJointsVelControl" eventName="EvVelControl"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="jointMaxSpeed" to="jointMaxSpeed"/> - <ParameterMapping sourceType="Output" from="jointNames" to="jointNames"/> - <ParameterMapping sourceType="Parent" from="jointTargetTolerance" to="jointTargetTolerance"/> - <ParameterMapping sourceType="Output" from="targetJointValues" to="targetJointValues"/> - <ParameterMapping sourceType="Parent" from="timeoutInMs" to="timeoutInMs"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="212.737" posY="291.947"/> - </SupportPoints> - </Transition> - <Transition from="ControlModeChooser" to="MoveJointsPosVelControl" eventName="EvPosVelControl"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="jointMaxSpeed" to="jointMaxSpeed"/> - <ParameterMapping sourceType="Output" from="jointNames" to="jointNames"/> - <ParameterMapping sourceType="Parent" from="jointTargetTolerance" to="jointTargetTolerance"/> - <ParameterMapping sourceType="Output" from="targetJointValues" to="targetJointValues"/> - <ParameterMapping sourceType="Parent" from="timeoutInMs" to="timeoutInMs"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="536.368" posY="207.456"/> - </SupportPoints> - </Transition> - <Transition from="MoveJointsVelControl" to="ValidateTcpPose" eventName="EvJointsActuated"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="ikWithOrientation" to="ikWithOrientation"/> - <ParameterMapping sourceType="Parent" from="kinematicChainName" to="kinematicChainName"/> - <ParameterMapping sourceType="Parent" from="targetOrientationDistanceTolerance" to="targetOrientationDistanceTolerance"/> - <ParameterMapping sourceType="Parent" from="targetPositionDistanceTolerance" to="targetPositionDistanceTolerance"/> - <ParameterMapping sourceType="Parent" from="targetTCPOrientation" to="targetTCPOrientation"/> - <ParameterMapping sourceType="Parent" from="targetTCPPosition" to="targetTCPPosition"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="299.491" posY="418.684"/> - </SupportPoints> - </Transition> - <Transition from="MoveJointsPosControl" to="ValidateTcpPose" eventName="EvJointsActuated"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="ikWithOrientation" to="ikWithOrientation"/> - <ParameterMapping sourceType="Parent" from="kinematicChainName" to="kinematicChainName"/> - <ParameterMapping sourceType="Parent" from="targetOrientationDistanceTolerance" to="targetOrientationDistanceTolerance"/> - <ParameterMapping sourceType="Parent" from="targetPositionDistanceTolerance" to="targetPositionDistanceTolerance"/> - <ParameterMapping sourceType="Parent" from="targetTCPOrientation" to="targetTCPOrientation"/> - <ParameterMapping sourceType="Parent" from="targetTCPPosition" to="targetTCPPosition"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="404.351" posY="421.702"/> - </SupportPoints> - </Transition> - <Transition from="MoveJointsPosVelControl" to="ValidateTcpPose" eventName="EvJointsActuated"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="ikWithOrientation" to="ikWithOrientation"/> - <ParameterMapping sourceType="Parent" from="kinematicChainName" to="kinematicChainName"/> - <ParameterMapping sourceType="Parent" from="targetOrientationDistanceTolerance" to="targetOrientationDistanceTolerance"/> - <ParameterMapping sourceType="Parent" from="targetPositionDistanceTolerance" to="targetPositionDistanceTolerance"/> - <ParameterMapping sourceType="Parent" from="targetTCPOrientation" to="targetTCPOrientation"/> - <ParameterMapping sourceType="Parent" from="targetTCPPosition" to="targetTCPPosition"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="510.719" posY="416.421"/> - </SupportPoints> - </Transition> - <Transition from="ValidateTcpPose" to="EvSuccess" eventName="EvSuccess"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="588.421" posY="506.947"/> - </SupportPoints> - </Transition> - <Transition from="ValidateTcpPose" to="EvFailure" eventName="EvFailure"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="218.018" posY="513.737"/> - </SupportPoints> - </Transition> - </Transitions> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosControl.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosControl.cpp deleted file mode 100644 index 87891b9ea0cc104add39b262e62e1970608b76d7..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosControl.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "MoveJointsPosControl.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -MoveJointsPosControl::SubClassRegistry MoveJointsPosControl::Registry(MoveJointsPosControl::GetName(), &MoveJointsPosControl::CreateInstance); - - - -MoveJointsPosControl::MoveJointsPosControl(XMLStateConstructorParams stateData) : - XMLStateTemplate < MoveJointsPosControl > (stateData) -{ -} - -void MoveJointsPosControl::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void MoveJointsPosControl::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void MoveJointsPosControl::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void MoveJointsPosControl::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string MoveJointsPosControl::GetName() -{ - return "MoveJointsPosControl"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr MoveJointsPosControl::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new MoveJointsPosControl(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosControl.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosControl.h deleted file mode 100644 index 90bf115b496fd1b7244eb954bae829d70b1e32aa..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosControl.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_MoveJointsPosControl_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_MoveJointsPosControl_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class MoveJointsPosControl : - virtual public XMLStateTemplate < MoveJointsPosControl > , - public XMLStateFactoryBase - { - public: - MoveJointsPosControl(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosControl.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosControl.xml deleted file mode 100644 index f87f29c78f9df284f5e536bba8ec743d4719b37d..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosControl.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="MoveJointsPosControl" uuid="B026AC8C-1E74-4DC4-AB2E-64F3132067EC" width="800" height="122.702"> - <Description>stub</Description> - <InputParameters> - <Parameter name="jointMaxSpeed" type="::armarx::FloatVariantData" optional="yes"/> - <Parameter name="jointMaxSpeeds" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="yes"/> - <Parameter name="jointNames" type="::armarx::SingleTypeVariantListBase(::armarx::StringVariantData)" optional="no"/> - <Parameter name="jointTargetTolerance" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="targetJointValues" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - <Parameter name="timeoutInMs" type="::armarx::IntVariantData" optional="no"/> - </InputParameters> - <OutputParameters> - <Parameter name="jointDistancesToTargets" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="yes"/> - </OutputParameters> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvJointsActuated"/> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosVelControl.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosVelControl.cpp deleted file mode 100644 index 23f768dfcf6b1127a6633627d70bb3d130f35922..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosVelControl.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "MoveJointsPosVelControl.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -MoveJointsPosVelControl::SubClassRegistry MoveJointsPosVelControl::Registry(MoveJointsPosVelControl::GetName(), &MoveJointsPosVelControl::CreateInstance); - - - -MoveJointsPosVelControl::MoveJointsPosVelControl(XMLStateConstructorParams stateData) : - XMLStateTemplate < MoveJointsPosVelControl > (stateData) -{ -} - -void MoveJointsPosVelControl::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void MoveJointsPosVelControl::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void MoveJointsPosVelControl::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void MoveJointsPosVelControl::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string MoveJointsPosVelControl::GetName() -{ - return "MoveJointsPosVelControl"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr MoveJointsPosVelControl::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new MoveJointsPosVelControl(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosVelControl.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosVelControl.h deleted file mode 100644 index 14951ac8fc507a8ea99c3e9227dd343186af993c..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosVelControl.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_MoveJointsPosVelControl_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_MoveJointsPosVelControl_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class MoveJointsPosVelControl : - virtual public XMLStateTemplate < MoveJointsPosVelControl > , - public XMLStateFactoryBase - { - public: - MoveJointsPosVelControl(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosVelControl.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosVelControl.xml deleted file mode 100644 index 062d8ef0942299249120444322d8249f35e7455a..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsPosVelControl.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="MoveJointsPosVelControl" uuid="CCFF18C7-FF4B-4503-8BF6-1D549997E7EC" width="800" height="113.649"> - <Description>stub</Description> - <InputParameters> - <Parameter name="jointMaxSpeed" type="::armarx::FloatVariantData" optional="yes"/> - <Parameter name="jointMaxSpeeds" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="yes"/> - <Parameter name="jointNames" type="::armarx::SingleTypeVariantListBase(::armarx::StringVariantData)" optional="no"/> - <Parameter name="jointTargetTolerance" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="targetJointValues" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - <Parameter name="timeoutInMs" type="::armarx::IntVariantData" optional="no"/> - </InputParameters> - <OutputParameters> - <Parameter name="jointDistancesToTargets" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="yes"/> - </OutputParameters> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvJointsActuated"/> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsVelControl.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsVelControl.cpp deleted file mode 100644 index dc717a5fe8923a68bfb34e481f8ffe9f3636249c..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsVelControl.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "MoveJointsVelControl.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -MoveJointsVelControl::SubClassRegistry MoveJointsVelControl::Registry(MoveJointsVelControl::GetName(), &MoveJointsVelControl::CreateInstance); - - - -MoveJointsVelControl::MoveJointsVelControl(XMLStateConstructorParams stateData) : - XMLStateTemplate < MoveJointsVelControl > (stateData) -{ -} - -void MoveJointsVelControl::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void MoveJointsVelControl::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void MoveJointsVelControl::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void MoveJointsVelControl::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string MoveJointsVelControl::GetName() -{ - return "MoveJointsVelControl"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr MoveJointsVelControl::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new MoveJointsVelControl(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsVelControl.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsVelControl.h deleted file mode 100644 index 429fdebc45fa7a83ef512ecfa0ed3b9f02f798ba..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsVelControl.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_MoveJointsVelControl_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_MoveJointsVelControl_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class MoveJointsVelControl : - virtual public XMLStateTemplate < MoveJointsVelControl > , - public XMLStateFactoryBase - { - public: - MoveJointsVelControl(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsVelControl.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsVelControl.xml deleted file mode 100644 index d2b00c6478a17d49d1b582e3d4794064e2ed5fb4..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/MoveJointsVelControl.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="MoveJointsVelControl" uuid="3B890A9E-53E2-49E2-AAB8-B8D37ED867EC" width="800" height="113.649"> - <Description>This state moves the robot's hand to the target joint positions via velocity control.</Description> - <InputParameters> - <Parameter name="jointMaxSpeed" type="::armarx::FloatVariantData" optional="yes"/> - <Parameter name="jointMaxSpeeds" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="yes"/> - <Parameter name="jointNames" type="::armarx::SingleTypeVariantListBase(::armarx::StringVariantData)" optional="no"/> - <Parameter name="jointTargetTolerance" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="targetJointValues" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="no"/> - <Parameter name="timeoutInMs" type="::armarx::IntVariantData" optional="no"/> - </InputParameters> - <OutputParameters> - <Parameter name="jointDistancesToTargets" type="::armarx::SingleTypeVariantListBase(::armarx::FloatVariantData)" optional="yes"/> - </OutputParameters> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvJointsActuated"/> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ValidateTcpPose.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ValidateTcpPose.cpp deleted file mode 100644 index 68a5c1b5b7e7295cd302291d21df337c2a92caba..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ValidateTcpPose.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "ValidateTcpPose.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -ValidateTcpPose::SubClassRegistry ValidateTcpPose::Registry(ValidateTcpPose::GetName(), &ValidateTcpPose::CreateInstance); - - - -ValidateTcpPose::ValidateTcpPose(XMLStateConstructorParams stateData) : - XMLStateTemplate < ValidateTcpPose > (stateData) -{ -} - -void ValidateTcpPose::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void ValidateTcpPose::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void ValidateTcpPose::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void ValidateTcpPose::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string ValidateTcpPose::GetName() -{ - return "ValidateTcpPose"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr ValidateTcpPose::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new ValidateTcpPose(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ValidateTcpPose.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ValidateTcpPose.h deleted file mode 100644 index 8f3bd1bc5eef0c721054dc80bfa84c72230cac34..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ValidateTcpPose.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_ValidateTcpPose_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_ValidateTcpPose_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class ValidateTcpPose : - virtual public XMLStateTemplate < ValidateTcpPose > , - public XMLStateFactoryBase - { - public: - ValidateTcpPose(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ValidateTcpPose.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ValidateTcpPose.xml deleted file mode 100644 index 62514efc91f587724be2a3c45447b534840c5e5a..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/LiftObjectSubGroup/ValidateTcpPose.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="ValidateTcpPose" uuid="EA799BAC-0800-4214-B998-AB27CEE7E7EC" width="1472.02" height="277.004"> - <Description>This state makes sure that the desired joint position was reached.</Description> - <InputParameters> - <Parameter name="ikWithOrientation" type="::armarx::BoolVariantData" optional="no"/> - <Parameter name="kinematicChainName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="targetOrientationDistanceTolerance" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="targetPositionDistanceTolerance" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="targetTCPOrientation" type="::armarx::FramedOrientationBase" optional="no"/> - <Parameter name="targetTCPPosition" type="::armarx::FramedPositionBase" optional="no"/> - </InputParameters> - <OutputParameters> - <Parameter name="TCPDistanceToTarget" type="::armarx::FloatVariantData" optional="yes"/> - <Parameter name="TCPOrientationDistanceToTarget" type="::armarx::FloatVariantData" optional="yes"/> - </OutputParameters> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvSuccess"> - <Description>Denotes that the target pose has been reached.</Description> - </Event> - <Event name="EvFailure"> - <Description>Denotes that the target pose has not been reached with the desired accuracy.</Description> - </Event> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/LocalizeObject.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/LocalizeObject.cpp deleted file mode 100644 index 57b8716b5b2580aa8beeb3abc8d26e8883e7b5a9..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/LocalizeObject.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "LocalizeObject.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -LocalizeObject::SubClassRegistry LocalizeObject::Registry(LocalizeObject::GetName(), &LocalizeObject::CreateInstance); - - - -LocalizeObject::LocalizeObject(XMLStateConstructorParams stateData) : - XMLStateTemplate < LocalizeObject > (stateData) -{ -} - -void LocalizeObject::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void LocalizeObject::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void LocalizeObject::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void LocalizeObject::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string LocalizeObject::GetName() -{ - return "LocalizeObject"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr LocalizeObject::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new LocalizeObject(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/LocalizeObject.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/LocalizeObject.h deleted file mode 100644 index 34b6822754608ef39641db5f2a3ff2d78bb2b454..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/LocalizeObject.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_LocalizeObject_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_LocalizeObject_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class LocalizeObject : - virtual public XMLStateTemplate < LocalizeObject > , - public XMLStateFactoryBase - { - public: - LocalizeObject(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/LocalizeObject.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/LocalizeObject.xml deleted file mode 100644 index 4c2ab9bf4779278defe92efccfa6d031a4f8c0c6..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/LocalizeObject.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="LocalizeObject" uuid="65B8AC75-3373-4A1D-A80C-50E9385F67EC" width="800" height="600"> - <Description>This state waits until both the object and the marker have been localized.</Description> - <InputParameters> - <Parameter name="markerChannel" type="::armarx::ChannelRefBase" optional="no"/> - <Parameter name="objectChannel" type="::armarx::ChannelRefBase" optional="no"/> - </InputParameters> - <OutputParameters/> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvObjectsLocalized"> - <Description>Denotes that both the object and the marker have been localized.</Description> - </Event> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/SelectObject.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/SelectObject.cpp deleted file mode 100644 index bd8b7368d30fcf73456aed589af59091529e6532..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/SelectObject.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "SelectObject.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -SelectObject::SubClassRegistry SelectObject::Registry(SelectObject::GetName(), &SelectObject::CreateInstance); - - - -SelectObject::SelectObject(XMLStateConstructorParams stateData) : - XMLStateTemplate < SelectObject > (stateData) -{ -} - -void SelectObject::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void SelectObject::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void SelectObject::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void SelectObject::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string SelectObject::GetName() -{ - return "SelectObject"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr SelectObject::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new SelectObject(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/SelectObject.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/SelectObject.h deleted file mode 100644 index 57e2cd26f900f4c2bbc7edce0942ff077368fe96..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/SelectObject.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_SelectObject_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_SelectObject_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class SelectObject : - virtual public XMLStateTemplate < SelectObject > , - public XMLStateFactoryBase - { - public: - SelectObject(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/SelectObject.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/SelectObject.xml deleted file mode 100644 index 0bed6a11e828b0985021a37a60a0d31c7f22eb73..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/SelectObject.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="SelectObject" uuid="B021151C-D3E6-4260-81B4-24D3C3A967EC" width="800" height="600"> - <Description>This state waits for the channel references of both object and marker to become available in the working memory as well as selecting specific channels if multiple are available.</Description> - <InputParameters> - <Parameter name="markerChannel" type="::armarx::ChannelRefBase" optional="no"/> - <Parameter name="objectChannel" type="::armarx::ChannelRefBase" optional="no"/> - </InputParameters> - <OutputParameters> - <Parameter name="markerInstanceChannel" type="::armarx::ChannelRefBase" optional="no"/> - <Parameter name="objectInstanceChannel" type="::armarx::ChannelRefBase" optional="no"/> - </OutputParameters> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvObjectInstanceNotAvailableYet"> - <Description>Either the marker or the object channel is not available yet.</Description> - </Event> - <Event name="EvObjectsSelected"> - <Description>Denotes that all channels are available.</Description> - </Event> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServo.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServo.cpp deleted file mode 100644 index 2ca334ba5eeb3902f1dbc115e4dc98822d686d8d..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServo.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "VisualServo.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -VisualServo::SubClassRegistry VisualServo::Registry(VisualServo::GetName(), &VisualServo::CreateInstance); - - - -VisualServo::VisualServo(XMLStateConstructorParams stateData) : - XMLStateTemplate < VisualServo > (stateData) -{ -} - -void VisualServo::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void VisualServo::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void VisualServo::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void VisualServo::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string VisualServo::GetName() -{ - return "VisualServo"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr VisualServo::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new VisualServo(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServo.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServo.h deleted file mode 100644 index f7460571e0bb87b79852d50aac1a011d96521bf0..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServo.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_VisualServo_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_VisualServo_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class VisualServo : - virtual public XMLStateTemplate < VisualServo > , - public XMLStateFactoryBase - { - public: - VisualServo(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServo.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServo.xml deleted file mode 100644 index cd94f235bfe47bfe45111a5d299503e1006a0401..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServo.xml +++ /dev/null @@ -1,119 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="VisualServo" uuid="1CFCACD5-CF25-45C3-A3BC-C5A193C6E7EC" width="800" height="600"> - <Description>This state is responsible for localizing an object and a marker attached to a tcp in order to perform visual servoing and minimize the distance between the two.</Description> - <InputParameters> - <Parameter name="IKCutCartErrorMM" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="graspName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="graspSetName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="kinematicChain" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="markerName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="minMarkerCertainty" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="minObjectCertainty" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="objectName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="referenceFrame" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="stepSize" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="tcpName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="timeoutTotalMsec" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="useOrientation" type="::armarx::BoolVariantData" optional="no"/> - </InputParameters> - <OutputParameters/> - <LocalParameters> - <Parameter name="markerChannel" type="::armarx::ChannelRefBase" optional="yes"/> - <Parameter name="objectChannel" type="::armarx::ChannelRefBase" optional="yes"/> - </LocalParameters> - <Substates> - <EndState name="EvFailure" event="EvFailure" left="78.5567" top="430.231" boundingSquareSize="200"/> - <EndState name="EvSuccess" event="EvSuccess" left="558.545" top="432.426" boundingSquareSize="200"/> - <LocalState name="LocalizeObject" refuuid="65B8AC75-3373-4A1D-A80C-50E9385F67EC" left="71.6667" top="120.4" boundingSquareSize="200"/> - <LocalState name="SelectObject" refuuid="B021151C-D3E6-4260-81B4-24D3C3A967EC" left="303.263" top="120.4" boundingSquareSize="200"/> - <LocalState name="VisualServoWrapper" refuuid="47FB89AF-2B7E-44DC-B72C-5B73D148E7EC" left="540.351" top="120.4" boundingSquareSize="200"/> - </Substates> - <Events/> - <StartState substateName="LocalizeObject"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="markerChannel" to="markerChannel"/> - <ParameterMapping sourceType="Parent" from="objectChannel" to="objectChannel"/> - </ParameterMappings> - </StartState> - <Transitions> - <Transition from="LocalizeObject" to="SelectObject" eventName="EvObjectsLocalized"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="markerChannel" to="markerChannel"/> - <ParameterMapping sourceType="Parent" from="objectChannel" to="objectChannel"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="315.506" posY="224.202"/> - </SupportPoints> - </Transition> - <Transition from="SelectObject" to="SelectObject" eventName="EvObjectInstanceNotAvailableYet"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="markerChannel" to="markerChannel"/> - <ParameterMapping sourceType="Parent" from="objectChannel" to="objectChannel"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="409.853" posY="262.752"/> - <SupportPoint posX="283.792" posY="32.754"/> - <SupportPoint posX="313.792" posY="62.754"/> - <SupportPoint posX="343.792" posY="92.754"/> - </SupportPoints> - </Transition> - <Transition from="SelectObject" to="VisualServoWrapper" eventName="EvObjectsSelected"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="IKCutCartErrorMM" to="IKCutCartErrorMM"/> - <ParameterMapping sourceType="Parent" from="kinematicChain" to="kinematicChain"/> - <ParameterMapping sourceType="Parent" from="markerChannel" to="markerChannel"/> - <ParameterMapping sourceType="Output" from="markerInstanceChannel" to="markerInstanceChannel"/> - <ParameterMapping sourceType="Parent" from="markerName" to="markerName"/> - <ParameterMapping sourceType="Parent" from="minObjectCertainty" to="minObjectCertainty"/> - <ParameterMapping sourceType="Parent" from="objectChannel" to="objectChannel"/> - <ParameterMapping sourceType="Output" from="objectInstanceChannel" to="objectInstanceChannel"/> - <ParameterMapping sourceType="Parent" from="objectName" to="objectName"/> - <ParameterMapping sourceType="Parent" from="referenceFrame" to="referenceFrame"/> - <ParameterMapping sourceType="Parent" from="stepSize" to="stepSize"/> - <ParameterMapping sourceType="Parent" from="tcpName" to="tcpName"/> - <ParameterMapping sourceType="Parent" from="timeoutTotalMsec" to="timeoutTotalMsec"/> - <ParameterMapping sourceType="Parent" from="useOrientation" to="useOrientation"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="562.026" posY="184.637"/> - </SupportPoints> - </Transition> - <Transition from="VisualServoWrapper" to="EvFailure" eventName="EvFailure"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="271.883" posY="461.592"/> - </SupportPoints> - </Transition> - <Transition from="VisualServoWrapper" to="EvSuccess" eventName="EvSuccess"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="661.446" posY="454.491"/> - </SupportPoints> - </Transition> - <Transition from="VisualServoWrapper" to="VisualServoWrapper" eventName="EvObjectPoseUpdate"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="IKCutCartErrorMM" to="IKCutCartErrorMM"/> - <ParameterMapping sourceType="Parent" from="kinematicChain" to="kinematicChain"/> - <ParameterMapping sourceType="Parent" from="markerChannel" to="markerChannel"/> - <ParameterMapping sourceType="Output" from="markerInstanceChannel" to="markerInstanceChannel"/> - <ParameterMapping sourceType="Parent" from="markerName" to="markerName"/> - <ParameterMapping sourceType="Parent" from="minObjectCertainty" to="minObjectCertainty"/> - <ParameterMapping sourceType="Parent" from="objectChannel" to="objectChannel"/> - <ParameterMapping sourceType="Output" from="objectInstanceChannel" to="objectInstanceChannel"/> - <ParameterMapping sourceType="Parent" from="objectName" to="objectName"/> - <ParameterMapping sourceType="Parent" from="referenceFrame" to="referenceFrame"/> - <ParameterMapping sourceType="Parent" from="stepSize" to="stepSize"/> - <ParameterMapping sourceType="Parent" from="tcpName" to="tcpName"/> - <ParameterMapping sourceType="Parent" from="timeoutTotalMsec" to="timeoutTotalMsec"/> - <ParameterMapping sourceType="Parent" from="useOrientation" to="useOrientation"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="677.678" posY="129.854"/> - <SupportPoint posX="469.079" posY="90.2845"/> - <SupportPoint posX="499.079" posY="120.285"/> - <SupportPoint posX="529.079" posY="150.285"/> - </SupportPoints> - </Transition> - </Transitions> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/CalcVelocities.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/CalcVelocities.cpp deleted file mode 100644 index f0f448cb9f1f7fc2fdf431878e2b19b5474150e1..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/CalcVelocities.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "CalcVelocities.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -CalcVelocities::SubClassRegistry CalcVelocities::Registry(CalcVelocities::GetName(), &CalcVelocities::CreateInstance); - - - -CalcVelocities::CalcVelocities(XMLStateConstructorParams stateData) : - XMLStateTemplate < CalcVelocities > (stateData) -{ -} - -void CalcVelocities::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void CalcVelocities::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void CalcVelocities::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void CalcVelocities::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string CalcVelocities::GetName() -{ - return "CalcVelocities"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr CalcVelocities::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new CalcVelocities(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/CalcVelocities.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/CalcVelocities.h deleted file mode 100644 index 36c0204f09e6061f61cd76d6cc5a35397a6b6404..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/CalcVelocities.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_CalcVelocities_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_CalcVelocities_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class CalcVelocities : - virtual public XMLStateTemplate < CalcVelocities > , - public XMLStateFactoryBase - { - public: - CalcVelocities(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/CalcVelocities.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/CalcVelocities.xml deleted file mode 100644 index 3014d78889a97a090e783be5ae301c76fa0022f8..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/CalcVelocities.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="CalcVelocities" uuid="E7F4512D-8F5D-4F4F-AFC5-CD23CB7BE7EC" width="800" height="600"> - <Description>This state calculates the joint velocities based on where the marker and target position are so that the given tcp may approach the target.</Description> - <InputParameters> - <Parameter name="IKCutCartErrorMM" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="kinematicChain" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="markerChannel" type="::armarx::ChannelRefBase" optional="no"/> - <Parameter name="stepSize" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="targetPose" type="::armarx::FramedPoseBase" optional="no"/> - <Parameter name="tcpName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="useOrientation" type="::armarx::BoolVariantData" optional="no"/> - </InputParameters> - <OutputParameters/> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvCalcVelocitiesDone"> - <Description>Joint velocities have been calculated and the statechart can now wait for marker updates.</Description> - </Event> - <Event name="EvTargetReached"> - <Description>Denotes that the target was reached and no updates are necessary.</Description> - </Event> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/VisualServoObject.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/VisualServoObject.cpp deleted file mode 100644 index 4f78d416da41fda6ee7b222c912e8096d0e0c17f..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/VisualServoObject.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "VisualServoObject.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -VisualServoObject::SubClassRegistry VisualServoObject::Registry(VisualServoObject::GetName(), &VisualServoObject::CreateInstance); - - - -VisualServoObject::VisualServoObject(XMLStateConstructorParams stateData) : - XMLStateTemplate < VisualServoObject > (stateData) -{ -} - -void VisualServoObject::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void VisualServoObject::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void VisualServoObject::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void VisualServoObject::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string VisualServoObject::GetName() -{ - return "VisualServoObject"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr VisualServoObject::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new VisualServoObject(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/VisualServoObject.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/VisualServoObject.h deleted file mode 100644 index 014c68e0994d5d5778c761870b40c6ac425702d8..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/VisualServoObject.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_VisualServoObject_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_VisualServoObject_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class VisualServoObject : - virtual public XMLStateTemplate < VisualServoObject > , - public XMLStateFactoryBase - { - public: - VisualServoObject(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/VisualServoObject.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/VisualServoObject.xml deleted file mode 100644 index 038fb47a533365c460a1bad2461307f965ec48bd..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/VisualServoObject.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="VisualServoObject" uuid="657172A7-E6D1-4193-9F23-0DC64D1B67EC" width="800" height="600"> - <Description>This state is responsible for visual servoing a tcp based on an attached marker and the target object's last known pose. -The goal is to minimize the distance between the marker and object.</Description> - <InputParameters> - <Parameter name="IKCutCartErrorMM" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="kinematicChain" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="markerChannel" type="::armarx::ChannelRefBase" optional="no"/> - <Parameter name="minRecognitionLikelihood" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="stepSize" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="targetPose" type="::armarx::FramedPoseBase" optional="no"/> - <Parameter name="tcpName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="timeoutTotalMsec" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="useOrientation" type="::armarx::BoolVariantData" optional="no"/> - </InputParameters> - <OutputParameters/> - <LocalParameters/> - <Substates> - <LocalState name="CalcVelocities" refuuid="E7F4512D-8F5D-4F4F-AFC5-CD23CB7BE7EC" left="475.263" top="152.713" boundingSquareSize="200"/> - <EndState name="EvSuccess" event="EvSuccess" left="492.36" top="416.844" boundingSquareSize="200"/> - <LocalState name="WaitForUpdates" refuuid="255B1ABB-40C2-4B37-9426-DE9F267F67EC" left="154.649" top="149.368" boundingSquareSize="200"/> - </Substates> - <Events> - <Event name="EvFailure"> - <Description>Denotes that either the marker was lost or that a timeout occured.</Description> - </Event> - </Events> - <StartState substateName="WaitForUpdates"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="markerChannel" to="markerChannel"/> - <ParameterMapping sourceType="Parent" from="minRecognitionLikelihood" to="minRecognitionLikelihood"/> - <ParameterMapping sourceType="Parent" from="targetPose" to="targetPose"/> - </ParameterMappings> - </StartState> - <Transitions> - <Transition from="WaitForUpdates" to="CalcVelocities" eventName="EvMarkerPoseUpdate"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="IKCutCartErrorMM" to="IKCutCartErrorMM"/> - <ParameterMapping sourceType="Parent" from="kinematicChain" to="kinematicChain"/> - <ParameterMapping sourceType="Parent" from="markerChannel" to="markerChannel"/> - <ParameterMapping sourceType="Parent" from="stepSize" to="stepSize"/> - <ParameterMapping sourceType="Parent" from="targetPose" to="targetPose"/> - <ParameterMapping sourceType="Parent" from="tcpName" to="tcpName"/> - <ParameterMapping sourceType="Parent" from="useOrientation" to="useOrientation"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="495.632" posY="215.754"/> - </SupportPoints> - </Transition> - <Transition from="CalcVelocities" to="WaitForUpdates" eventName="EvCalcVelocitiesDone"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="markerChannel" to="markerChannel"/> - <ParameterMapping sourceType="Parent" from="minRecognitionLikelihood" to="minRecognitionLikelihood"/> - <ParameterMapping sourceType="Parent" from="targetPose" to="targetPose"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="321.368" posY="182.561"/> - </SupportPoints> - </Transition> - <Transition from="CalcVelocities" to="EvSuccess" eventName="EvTargetReached"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="555.228" posY="449.614"/> - </SupportPoints> - </Transition> - </Transitions> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/WaitForUpdates.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/WaitForUpdates.cpp deleted file mode 100644 index da68663db0a7cb3f2bd802b90776e2264f20a02c..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/WaitForUpdates.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "WaitForUpdates.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -WaitForUpdates::SubClassRegistry WaitForUpdates::Registry(WaitForUpdates::GetName(), &WaitForUpdates::CreateInstance); - - - -WaitForUpdates::WaitForUpdates(XMLStateConstructorParams stateData) : - XMLStateTemplate < WaitForUpdates > (stateData) -{ -} - -void WaitForUpdates::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void WaitForUpdates::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void WaitForUpdates::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void WaitForUpdates::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string WaitForUpdates::GetName() -{ - return "WaitForUpdates"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr WaitForUpdates::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new WaitForUpdates(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/WaitForUpdates.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/WaitForUpdates.h deleted file mode 100644 index cb9eedf5d0b4fac43b0cd2ba08f3bbcd70534792..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/WaitForUpdates.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_WaitForUpdates_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_WaitForUpdates_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class WaitForUpdates : - virtual public XMLStateTemplate < WaitForUpdates > , - public XMLStateFactoryBase - { - public: - WaitForUpdates(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/WaitForUpdates.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/WaitForUpdates.xml deleted file mode 100644 index 34e4370d8a4aaa71260dc4bbaed1df3d6aac6170..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoObjectSubGroup/WaitForUpdates.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="WaitForUpdates" uuid="255B1ABB-40C2-4B37-9426-DE9F267F67EC" width="800" height="600"> - <Description>This state waits for updates on the marker to initiate the (re)calculation of joint velocities for visual servoing.</Description> - <InputParameters> - <Parameter name="markerChannel" type="::armarx::ChannelRefBase" optional="no"/> - <Parameter name="minRecognitionLikelihood" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="targetPose" type="::armarx::FramedPoseBase" optional="no"/> - </InputParameters> - <OutputParameters/> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvMarkerPoseUpdate"> - <Description>Denotes that the marker pose was updated and that joint velocities for grasping should be recalculated.</Description> - </Event> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoWrapper.cpp b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoWrapper.cpp deleted file mode 100644 index f7e227e89e4cf6a1cb5c4cda941528a0764889ea..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoWrapper.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "VisualServoWrapper.h" - -using namespace armarx; -using namespace FindAndGraspObjectGroup; - -// DO NOT EDIT NEXT LINE -VisualServoWrapper::SubClassRegistry VisualServoWrapper::Registry(VisualServoWrapper::GetName(), &VisualServoWrapper::CreateInstance); - - - -VisualServoWrapper::VisualServoWrapper(XMLStateConstructorParams stateData) : - XMLStateTemplate < VisualServoWrapper > (stateData) -{ -} - -void VisualServoWrapper::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - -void VisualServoWrapper::run() -{ - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true - { - // do your calculations - } - -} - -void VisualServoWrapper::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} - -void VisualServoWrapper::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) - -} - -// DO NOT EDIT NEXT FUNCTION -std::string VisualServoWrapper::GetName() -{ - return "VisualServoWrapper"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr VisualServoWrapper::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new VisualServoWrapper(stateData)); -} - diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoWrapper.h b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoWrapper.h deleted file mode 100644 index 0758efcb4248388d5b6955b15acb1b23ae469f5b..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoWrapper.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::FindAndGraspObjectGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_VisualServoWrapper_H -#define _ARMARX_XMLUSERCODE_RobotAPI_FindAndGraspObjectGroup_VisualServoWrapper_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace FindAndGraspObjectGroup - { - class VisualServoWrapper : - virtual public XMLStateTemplate < VisualServoWrapper > , - public XMLStateFactoryBase - { - public: - VisualServoWrapper(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoWrapper.xml b/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoWrapper.xml deleted file mode 100644 index 3cce09e41347e61100c10345166de0f820de26ff..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/FindAndGraspObjectGroup/VisualServoSubGroup/VisualServoWrapper.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="VisualServoWrapper" uuid="47FB89AF-2B7E-44DC-B72C-5B73D148E7EC" width="800" height="600"> - <InputParameters> - <Parameter name="IKCutCartErrorMM" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="kinematicChain" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="markerChannel" type="::armarx::ChannelRefBase" optional="no"/> - <Parameter name="markerInstanceChannel" type="::armarx::ChannelRefBase" optional="no"/> - <Parameter name="markerName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="minObjectCertainty" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="objectChannel" type="::armarx::ChannelRefBase" optional="no"/> - <Parameter name="objectInstanceChannel" type="::armarx::ChannelRefBase" optional="no"/> - <Parameter name="objectName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="referenceFrame" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="stepSize" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="tcpName" type="::armarx::StringVariantData" optional="no"/> - <Parameter name="timeoutTotalMsec" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="useOrientation" type="::armarx::BoolVariantData" optional="no"/> - </InputParameters> - <OutputParameters> - <Parameter name="markerInstanceChannel" type="::armarx::ChannelRefBase" optional="no"/> - <Parameter name="objectInstanceChannel" type="::armarx::ChannelRefBase" optional="no"/> - </OutputParameters> - <LocalParameters> - <Parameter name="targetPose" type="::armarx::FramedPoseBase" optional="yes"/> - </LocalParameters> - <Substates> - <EndState name="EvFailure" event="EvFailure" left="43.2356" top="431.375" boundingSquareSize="200"/> - <EndState name="EvSuccess" event="EvSuccess" left="577.44" top="433.44" boundingSquareSize="200"/> - <LocalState name="VisualServoObject" refuuid="657172A7-E6D1-4193-9F23-0DC64D1B67EC" left="292.702" top="120.4" boundingSquareSize="200"/> - </Substates> - <Events> - <Event name="EvObjectPoseUpdate"> - <Description>Denotes that the object's pose was updated.</Description> - </Event> - </Events> - <StartState substateName="VisualServoObject"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="IKCutCartErrorMM" to="IKCutCartErrorMM"/> - <ParameterMapping sourceType="Parent" from="kinematicChain" to="kinematicChain"/> - <ParameterMapping sourceType="Parent" from="markerInstanceChannel" to="markerChannel"/> - <ParameterMapping sourceType="Parent" from="minObjectCertainty" to="minRecognitionLikelihood"/> - <ParameterMapping sourceType="Parent" from="stepSize" to="stepSize"/> - <ParameterMapping sourceType="Parent" from="targetPose" to="targetPose"/> - <ParameterMapping sourceType="Parent" from="tcpName" to="tcpName"/> - <ParameterMapping sourceType="Parent" from="timeoutTotalMsec" to="timeoutTotalMsec"/> - <ParameterMapping sourceType="Parent" from="useOrientation" to="useOrientation"/> - </ParameterMappings> - </StartState> - <Transitions> - <Transition from="VisualServoObject" to="EvFailure" eventName="EvFailure"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="162.947" posY="454.14"/> - </SupportPoints> - </Transition> - <Transition from="VisualServoObject" to="EvSuccess" eventName="EvSuccess"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="584.649" posY="445.842"/> - </SupportPoints> - </Transition> - </Transitions> -</State> - diff --git a/source/RobotAPI/statecharts/MotionControlGroup/CalculateJointAngleConfiguration.cpp b/source/RobotAPI/statecharts/MotionControlGroup/CalculateJointAngleConfiguration.cpp index fca3557b4699304b8039455a4655ef7776a80122..ad1b68ce0fa20b02fe582c2a5f9aa1cd3e2b7b83 100644 --- a/source/RobotAPI/statecharts/MotionControlGroup/CalculateJointAngleConfiguration.cpp +++ b/source/RobotAPI/statecharts/MotionControlGroup/CalculateJointAngleConfiguration.cpp @@ -23,6 +23,13 @@ #include "CalculateJointAngleConfiguration.h" +// Core +#include <RobotAPI/libraries/robotstate/remote/RemoteRobot.h> + +// Virtual Robot +#include <VirtualRobot/IK/GenericIKSolver.h> +#include <VirtualRobot/LinkedCoordinate.h> + using namespace armarx; using namespace MotionControlGroup; @@ -36,37 +43,95 @@ CalculateJointAngleConfiguration::CalculateJointAngleConfiguration(XMLStateConst { } -void CalculateJointAngleConfiguration::onEnter() -{ - // put your user code for the enter-point here - // execution time should be short (<100ms) -} - void CalculateJointAngleConfiguration::run() { - // put your user code for the execution-phase here - // runs in seperate thread, thus can do complex operations - // should check constantly whether isRunningTaskStopped() returns true - - - while (!isRunningTaskStopped()) // stop run function if returning true + //RobotStatechartContext* context = getContext<RobotStatechartContext>(); + //VirtualRobot::RobotPtr robot(new RemoteRobot(context->robotStateComponent->getRobotSnapshot("CalculateTCPPoseTime"))); + + // TODO: with the following line, the IK doesn't find a solution, so this terrible hack must be used. Fix it!!! + //VirtualRobot::RobotPtr robot = robotPtr->clone("CalculateTCPPoseClone"); + //std::string robotModelFile; + //ArmarXDataPath::getAbsolutePath("Armar4/data/Armar4/ArmarIV.xml", robotModelFile); + //ArmarXDataPath::getAbsolutePath("Armar3/data/robotmodel/ArmarIII.xml", robotModelFile); + //VirtualRobot::RobotPtr robot = VirtualRobot::RobotIO::loadRobot(robotModelFile.c_str()); + + std::string kinChainName = getInput<std::string>("kinematicChainName"); + float maxError = getInput<float>("targetPositionDistanceTolerance"); + float maxErrorRot = getInput<float>("targetOrientationDistanceTolerance"); + bool withOrientation = getInput<bool>("ikWithOrientation"); + VirtualRobot::IKSolver::CartesianSelection ikType = VirtualRobot::IKSolver::All; + if (!withOrientation) + ikType = VirtualRobot::IKSolver::Position; + + + RobotStatechartContext* context = getContext<RobotStatechartContext>(); + if (!context) { - // do your calculations + ARMARX_WARNING << "Need a RobotStatechartContext" << flush; + sendEvent<EvFailure>(); } -} - -void CalculateJointAngleConfiguration::onBreak() -{ - // put your user code for the breaking point here - // execution time should be short (<100ms) -} + if (!context->robotStateComponent) + { + ARMARX_WARNING << "No RobotStatechartContext->robotStateComponent" << flush; + sendEvent<EvFailure>(); + } -void CalculateJointAngleConfiguration::onExit() -{ - // put your user code for the exit point here - // execution time should be short (<100ms) + VirtualRobot::RobotPtr robot = RemoteRobot::createLocalClone(context->robotStateComponent); + if (!robot) + { + ARMARX_WARNING << "Could not create a local clone of RemoteRobot" << flush; + sendEvent<EvFailure>(); + } + if (!robot->hasRobotNodeSet(kinChainName)) + { + ARMARX_WARNING << "Robot does not know kinematic chain with name " << kinChainName << flush; + sendEvent<EvFailure>(); + } + ARMARX_INFO << "Setting up ik solver for kin chain: " << kinChainName << ", max position error:" << maxError << ", max orientation erorr " << maxErrorRot << ", useOrientation:" << withOrientation << armarx::flush; + VirtualRobot::GenericIKSolverPtr ikSolver(new VirtualRobot::GenericIKSolver(robot->getRobotNodeSet(kinChainName), VirtualRobot::JacobiProvider::eSVDDamped)); + ikSolver->setVerbose(true); + ikSolver->setMaximumError(maxError,maxErrorRot); + ikSolver->setupJacobian(0.6f, 10); + + VirtualRobot::LinkedCoordinate target = ArmarPose::createLinkedCoordinate(robot, getInput<FramedPosition>("targetTCPPosition"), getInput<FramedOrientation>("targetTCPOrientation")); + ARMARX_INFO << "IK target: " << target.getPose() << armarx::flush; + Eigen::Matrix4f goalInRoot = target.getInFrame(robot->getRootNode()); + +// // test +// VirtualRobot::RobotNodePtr rn = robot->getRobotNode("LeftTCP"); +// Eigen::Matrix4f goalTmpTCP = rn->getGlobalPose(); + Eigen::Matrix4f goalGlobal = robot->getRootNode()->toGlobalCoordinateSystem(goalInRoot); + ARMARX_INFO << "GOAL in root: " << goalInRoot << armarx::flush; + ARMARX_INFO << "GOAL global: " << goalGlobal << armarx::flush; +// ARMARX_INFO << "GOAL TCP:" << goalTmpTCP << endl; + + ARMARX_INFO << "Calculating IK" << flush; + //if (!ikSolver->solve(goalGlobal, VirtualRobot::IKSolver::Position, 50)) + if (!ikSolver->solve(goalGlobal, ikType, 5)) + { + ARMARX_WARNING << "IKSolver found no solution! " << flush; + sendEvent<EvFailure>(); + } + else + { + SingleTypeVariantList jointNames = SingleTypeVariantList(VariantType::String); + SingleTypeVariantList targetJointValues = SingleTypeVariantList(VariantType::Float); + VirtualRobot::RobotNodeSetPtr kinematicChain = robot->getRobotNodeSet(kinChainName); + for (int i = 0; i < (signed int)kinematicChain->getSize(); i++) + { + jointNames.addVariant(Variant(kinematicChain->getNode(i)->getName())); + targetJointValues.addVariant(Variant(kinematicChain->getNode(i)->getJointValue())); + ARMARX_LOG << " joint: " << kinematicChain->getNode(i)->getName() << " value: " << kinematicChain->getNode(i)->getJointValue() << flush; + } + ARMARX_LOG << "number of joints to be set: " << jointNames.getSize() << flush; + ARMARX_LOG << "setting output: jointNames" << flush; + setOutput("jointNames", jointNames); + ARMARX_LOG << "setting output: targetJointValues" << flush; + setOutput("targetJointValues", targetJointValues); + sendEvent<EvCalculationDone>(); + } } // DO NOT EDIT NEXT FUNCTION diff --git a/source/RobotAPI/statecharts/MotionControlGroup/CalculateJointAngleConfiguration.h b/source/RobotAPI/statecharts/MotionControlGroup/CalculateJointAngleConfiguration.h index 253e3682c0882c4eb505234fb835ad42c60adc77..e1ee57d4411f89dc2e3eed8e6affab7c9598dbf3 100644 --- a/source/RobotAPI/statecharts/MotionControlGroup/CalculateJointAngleConfiguration.h +++ b/source/RobotAPI/statecharts/MotionControlGroup/CalculateJointAngleConfiguration.h @@ -25,11 +25,13 @@ #define _ARMARX_XMLUSERCODE_RobotAPI_MotionControlGroup_CalculateJointAngleConfiguration_H #include <Core/statechart/xmlstates/XMLState.h> +#include <RobotAPI/libraries/core/RobotStatechartContext.h> namespace armarx { namespace MotionControlGroup { + DEFINEEVENT(EvCalculationDone) class CalculateJointAngleConfiguration : virtual public XMLStateTemplate < CalculateJointAngleConfiguration > , public XMLStateFactoryBase @@ -38,10 +40,7 @@ namespace armarx CalculateJointAngleConfiguration(XMLStateConstructorParams stateData); // inherited from StateBase - void onEnter(); void run(); - void onBreak(); - void onExit(); // static functions for AbstractFactory Method static std::string GetName(); diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/CMakeLists.txt b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/CMakeLists.txt deleted file mode 100644 index ec48625617a86703f28383c77380993b1c347243..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -armarx_component_set_name("MovePlatformToLandmarkGroup") - -#find_package(MyLib QUIET) -#armarx_build_if(MyLib_FOUND "MyLib not available") -# -# all include_directories must be guarded by if(Xyz_FOUND) -# for multiple libraries write: if(X_FOUND AND Y_FOUND).... -#if(MyLib_FOUND) -# include_directories(${MyLib_INCLUDE_DIRS}) -#endif() - -find_package(Eigen3 QUIET) -find_package(Simox QUIET) - -armarx_build_if(Eigen3_FOUND "Eigen3 not available") -armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available") - -if (Eigen3_FOUND AND Simox_FOUND) - include_directories( - ${Eigen3_INCLUDE_DIR} - ${Simox_INCLUDE_DIRS}) -endif() - -set(COMPONENT_LIBS ArmarXInterfaces ArmarXCore ArmarXCoreStatechart ArmarXCoreObservers RobotAPIRemoteRobot) - -# Sources - -set(SOURCES -MovePlatformToLandmarkGroupRemoteStateOfferer.cpp -./MovePlatformToLandmark.cpp -./CalcPath.cpp -MovePlatformSubGroup/MovePlatform.cpp -MovePlatformSubGroup/MoveToNext.cpp -#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.cpp -) - -set(HEADERS -PlatformContext.h -MovePlatformToLandmarkGroupRemoteStateOfferer.h -./MovePlatformToLandmark.h -./CalcPath.h -MovePlatformSubGroup/MovePlatform.h -MovePlatformSubGroup/MoveToNext.h -#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.h -) - -armarx_add_component("${SOURCES}" "${HEADERS}") diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/CalcPath.cpp b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/CalcPath.cpp deleted file mode 100644 index d1367e017a9c3e035b751418a3046c2c81750dba..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/CalcPath.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::MovePlatformToLandmarkGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "CalcPath.h" - -using namespace armarx; -using namespace MovePlatformToLandmarkGroup; - -// DO NOT EDIT NEXT LINE -CalcPath::SubClassRegistry CalcPath::Registry(CalcPath::GetName(), &CalcPath::CreateInstance); - - - -CalcPath::CalcPath(XMLStateConstructorParams stateData) : - XMLStateTemplate < CalcPath > (stateData) -{ -} - -void CalcPath::onEnter() -{ - ARMARX_LOG << eVERBOSE << "CalcPath::onEnter()" << flush; - - //read the nodes into a tag to node map - SingleTypeVariantListPtr landmarkNodes = getInput<SingleTypeVariantList>("landmarkNodes"); - std::map<std::string, NodePtr> nameToNodeMap; - for (int i = 0; i < landmarkNodes->getSize(); i++) { - ARMARX_LOG << landmarkNodes->getVariant(i)->getTypeName() << flush; - FramedVector3Ptr fv = landmarkNodes->getVariant(i)->get<FramedVector3>(); - NodePtr n = NodePtr(new Node()); - n->name = fv->frame; - n->framedPos = fv; - nameToNodeMap[fv->frame] = n; - } - - ARMARX_LOG << eVERBOSE << "StateCalculatePath:onEnter(): Retrieving edges" << flush; - //process the edges by adding the nodes to each other's successors - SingleTypeVariantListPtr landmarkEdges = getInput<SingleTypeVariantList>("landmarkEdges"); - for (int i = 0; i < landmarkEdges->getSize(); i++) { - std::string edge = landmarkEdges->getVariant(i)->getString(); - std::vector<std::string> edgeNodes; - boost::split(edgeNodes, edge, boost::is_any_of(";"), boost::token_compress_on); - NodePtr left = nameToNodeMap[edgeNodes[0]]; - NodePtr right = nameToNodeMap[edgeNodes[1]]; - left->successors.push_back(right); - right->successors.push_back(left); - } - - ARMARX_LOG << eVERBOSE << "CalcPath:onEnter(): Getting current pose from PlatformContext" << flush; - PlatformContext* context = getContext<PlatformContext>(); - ChannelRefPtr poseRef = context->getChannelRef(context->getPlatformUnitObserverName(), "platformPose"); - const float platformPositionX = context->getDatafieldRef(poseRef, "positionX")->getDataField()->getFloat(); - const float platformPositionY = context->getDatafieldRef(poseRef, "positionY")->getDataField()->getFloat(); - - //has trouble resolving the observer? -// const float platformPositionX = context->getDataFromObserver(DataFieldIdentifierPtr(new DataFieldIdentifier("platformPose.positionX")))->getFloat(); -// const float platformPositionY = context->getDataFromObserver(DataFieldIdentifierPtr(new DataFieldIdentifier("platformPose.positionY")))->getFloat(); - - std::map<std::string, NodePtr>::iterator it = nameToNodeMap.begin(); - if (it == nameToNodeMap.end()) { - ARMARX_LOG << eWARN << "No nodes provided" << flush; - sendEvent<EvNoPathFound>(); - return; - } - ARMARX_LOG << eVERBOSE << "StateCalculatePath:onEnter(): Finding closest point in graph" << flush; - NodePtr closest = it->second; - float minDist = closest->dist(platformPositionX, platformPositionY); - it++; - for (; it != nameToNodeMap.end(); it++) { - const float dist = it->second->dist(platformPositionX, platformPositionY); - if (dist < minDist) { - closest = it->second; - minDist = dist; - } - } - - ARMARX_DEBUG << "CalcPath:onEnter(): Starting point: " << closest->name << flush; - - std::string landmark = getInput<std::string>("targetLandmark"); - NodePtr goal = nameToNodeMap[landmark]; - if (!goal) { - ARMARX_LOG << eWARN << "Target landmark doesn't exist in graph" << flush; - sendEvent<EvNoPathFound>(); - return; - } - ARMARX_DEBUG << "CalcPath::onEnter(): Looking for path" << flush; - std::list<NodePtr> path = aStar(closest, goal); - if (path.empty()) { - ARMARX_LOG << eWARN << "No path found" << flush; - sendEvent<EvNoPathFound>(); - return; - } - SingleTypeVariantList targetPositions(VariantType::Vector3); - const float goalAlpha = path.back()->framedPos->z; - for (std::list<NodePtr>::iterator it = path.begin(); it != path.end(); it++) { - Vector3 v; - v.x = (*it)->framedPos->x; - v.y = (*it)->framedPos->y; - v.z = goalAlpha; - targetPositions.addVariant(v); - } - setOutput("targetPositions", targetPositions); - sendEvent<EvPathFound>(); - ARMARX_LOG << eVERBOSE << "Done CalcPath::onEnter()" << flush; -} - -//http://en.wikipedia.org/wiki/A*_search_algorithm -std::list<CalcPath::NodePtr> CalcPath::aStar(CalcPath::NodePtr start, CalcPath::NodePtr goal) { - std::list<NodePtr> path; - - std::vector<NodePtr> closedSet; - std::vector<NodePtr> openSet; - openSet.push_back(start); - std::map<NodePtr, float> gScore; - gScore[start] = 0.f; - std::map<NodePtr, float> fScore; - fScore[start] = gScore[start] + heuristic(start, goal); - std::map<NodePtr, NodePtr> cameFrom; - cameFrom[goal] = start; //in case start==goal - - while (!openSet.empty()) { - float lowestScore = fScore[openSet[0]]; - std::vector<NodePtr>::iterator currentIT = openSet.begin(); - for (std::vector<NodePtr>::iterator it = openSet.begin() + 1; it != openSet.end(); it++) { - if (fScore[*it] < lowestScore) { - lowestScore = fScore[*it]; - currentIT = it; - } - } - NodePtr current = *currentIT; - if (current == goal) { - NodePtr cameFromNode = goal; - while (cameFromNode != start) { - path.push_front(cameFromNode); - cameFromNode = cameFrom[cameFromNode]; - } - path.push_front(start); - break; - } - openSet.erase(currentIT); - closedSet.push_back(current); - - for (size_t i = 0; i < current->successors.size(); i++) { - NodePtr neighbor = current->successors[i]; - if (std::find(closedSet.begin(), closedSet.end(), neighbor) != closedSet.end()) continue; - - float tentativeGScore = gScore[current] + current->dist(neighbor); - bool notInOS = std::find(openSet.begin(), openSet.end(), neighbor) == openSet.end(); - if (notInOS || tentativeGScore < gScore[neighbor]) { - cameFrom[neighbor] = current; - gScore[neighbor] = tentativeGScore; - fScore[neighbor] = tentativeGScore + heuristic(neighbor, goal); - if (notInOS) { - openSet.push_back(neighbor); - } - } - } - } - return path; -} - -void CalcPath::run() -{ -} - -void CalcPath::onBreak() -{ -} - -void CalcPath::onExit() -{ -} - -// DO NOT EDIT NEXT FUNCTION -std::string CalcPath::GetName() -{ - return "CalcPath"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr CalcPath::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new CalcPath(stateData)); -} - diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/CalcPath.h b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/CalcPath.h deleted file mode 100644 index 47ea4ea52b880001e6b1cd70907ab927c7d1c8f9..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/CalcPath.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::MovePlatformToLandmarkGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_MovePlatformToLandmarkGroup_CalcPath_H -#define _ARMARX_XMLUSERCODE_RobotAPI_MovePlatformToLandmarkGroup_CalcPath_H - -#include <Core/statechart/xmlstates/XMLState.h> -#include <RobotAPI/statecharts/MovePlatformToLandmarkGroup/PlatformContext.h> - -namespace armarx -{ - namespace MovePlatformToLandmarkGroup - { - DEFINEEVENT(EvPathFound) - DEFINEEVENT(EvNoPathFound) - - class CalcPath : - virtual public XMLStateTemplate < CalcPath > , - public XMLStateFactoryBase - { - public: - CalcPath(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - - private: - struct Node { - std::string name; - std::vector<boost::shared_ptr<Node>> successors; - FramedVector3Ptr framedPos; - inline float dist(boost::shared_ptr<Node> o) { - return dist(o->framedPos->x, o->framedPos->y); - } - inline float dist(float x, float y) { - const float dX = framedPos->x - x; - const float dY = framedPos->y - y; - return std::sqrt(dX * dX + dY * dY); - } - }; - typedef boost::shared_ptr<Node> NodePtr; - - inline float heuristic(NodePtr n1, NodePtr n2) { - return n1->dist(n2); - } - - std::list<NodePtr> aStar(NodePtr start, NodePtr goal); - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/CalcPath.xml b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/CalcPath.xml deleted file mode 100644 index 828fcb3a6f1c2e81fc42c66c828f3b33a5362805..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/CalcPath.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="CalcPath" uuid="36719C67-762C-45FC-A703-0784C7A34F8B" width="800" height="336.376"> - <Description>This state is responsible for calculating a path via the A* algorithm. Given a list of nodes and a list of edges, a shortest path (if one exists) is calculated between the node closest to the current position and the target landmark and returned as a list of points belonging to the nodes traversed.</Description> - <InputParameters> - <Parameter name="landmarkEdges" type="::armarx::SingleTypeVariantListBase(::armarx::StringVariantData)" optional="no"/> - <Parameter name="landmarkNodes" type="::armarx::SingleTypeVariantListBase(::armarx::FramedVector3Base)" optional="no"/> - <Parameter name="targetLandmark" type="::armarx::StringVariantData" optional="no"/> - </InputParameters> - <OutputParameters> - <Parameter name="targetPositions" type="::armarx::SingleTypeVariantListBase(::armarx::Vector3Base)" optional="no"/> - </OutputParameters> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvPathFound"> - <Description>Denotes that a path was found from the current position to the target landmark</Description> - </Event> - <Event name="EvNoPathFound"> - <Description>Denotes that no path was found between the node closest to the current position and the target landmark based on the provided graph.</Description> - </Event> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MovePlatform.cpp b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MovePlatform.cpp deleted file mode 100644 index 428e090ad657ae5c8085768934d5f45b7ce8a38d..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MovePlatform.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::MovePlatformToLandmarkGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "MovePlatform.h" - -using namespace armarx; -using namespace MovePlatformToLandmarkGroup; - -// DO NOT EDIT NEXT LINE -MovePlatform::SubClassRegistry MovePlatform::Registry(MovePlatform::GetName(), &MovePlatform::CreateInstance); - - - -MovePlatform::MovePlatform(XMLStateConstructorParams stateData) : - XMLStateTemplate < MovePlatform > (stateData) -{ -} - -void MovePlatform::onEnter() -{ - ARMARX_LOG << eVERBOSE << "Entering StatechartMovePlatform"; - ChannelRefPtr counter = ChannelRefPtr::dynamicCast(getContext()->systemObserverPrx->startCounter(0, "positionCounter")); - setLocal("positionCounter", counter); -} - -void MovePlatform::onExit() -{ - ChannelRefPtr r = getLocal<ChannelRef>("positionCounter"); - getContext()->systemObserverPrx->removeCounter(r); - ARMARX_LOG << eVERBOSE << "Exiting StatechartMovePlatform..."; -} - -// DO NOT EDIT NEXT FUNCTION -std::string MovePlatform::GetName() -{ - return "MovePlatform"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr MovePlatform::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new MovePlatform(stateData)); -} - diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MovePlatform.h b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MovePlatform.h deleted file mode 100644 index 38d4389d79fe97e4a2f8a030be96251de576ddc8..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MovePlatform.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::MovePlatformToLandmarkGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_MovePlatformToLandmarkGroup_MovePlatform_H -#define _ARMARX_XMLUSERCODE_RobotAPI_MovePlatformToLandmarkGroup_MovePlatform_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace MovePlatformToLandmarkGroup - { - class MovePlatform : - virtual public XMLStateTemplate < MovePlatform > , - public XMLStateFactoryBase - { - public: - MovePlatform(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MovePlatform.xml b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MovePlatform.xml deleted file mode 100644 index ac9396e612a256bba6d6b23c37f26b100b5afd80..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MovePlatform.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="MovePlatform" uuid="DB4A1244-3587-4F87-909F-B7274E4842C5" width="800" height="611.495"> - <Description>This state moves the platform through a series of points.</Description> - <InputParameters> - <Parameter name="orientationalAccuracy" type="::armarx::FloatVariantData" optional="no" default='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FloatVariantData","value":0.0}}'/> - <Parameter name="positionalAccuracy" type="::armarx::FloatVariantData" optional="no" default='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FloatVariantData","value":10.0}}'/> - <Parameter name="targetPositions" type="::armarx::SingleTypeVariantListBase(::armarx::Vector3Base)" optional="no" default='{"array":[{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::Vector3Base","value":{"x":0.0,"y":5000.0,"z":0.0}}},{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::Vector3Base","value":{"x":0.0,"y":5000.0,"z":3.0}}},{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::Vector3Base","value":{"x":-2500.0,"y":2500.0,"z":0.0}}}],"type":"::armarx::SingleTypeVariantListBase"}'/> - <Parameter name="timeoutMoveTo" type="::armarx::IntVariantData" optional="no" default='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::IntVariantData","value":30000}}'/> - <Parameter name="waitAfterLast" type="::armarx::IntVariantData" optional="no" default='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::IntVariantData","value":0}}'/> - </InputParameters> - <OutputParameters/> - <LocalParameters> - <Parameter name="positionCounter" type="::armarx::ChannelRefBase" optional="yes"/> - </LocalParameters> - <Substates> - <EndState name="EvFailure" event="EvFailure" left="51.7664" top="277.061" boundingSquareSize="200"/> - <EndState name="EvSuccess" event="EvSuccess" left="284.051" top="277.061" boundingSquareSize="200"/> - <LocalState name="MoveToNext" refuuid="E3A2DA64-4967-4F8E-AA8B-7CBF7BED42C5" left="164.749" top="124.007" boundingSquareSize="200"/> - </Substates> - <Events/> - <StartState substateName="MoveToNext"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="orientationalAccuracy" to="orientationalAccuracy"/> - <ParameterMapping sourceType="Parent" from="positionCounter" to="positionCounter"/> - <ParameterMapping sourceType="Parent" from="positionalAccuracy" to="positionalAccuracy"/> - <ParameterMapping sourceType="Parent" from="targetPositions" to="targetPositions"/> - <ParameterMapping sourceType="Parent" from="timeoutMoveTo" to="timeoutMoveTo"/> - <ParameterMapping sourceType="Parent" from="waitAfterLast" to="waitAfterLast"/> - </ParameterMappings> - </StartState> - <Transitions> - <Transition from="MoveToNext" to="MoveToNext" eventName="EvWaypointReached"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="orientationalAccuracy" to="orientationalAccuracy"/> - <ParameterMapping sourceType="Parent" from="positionCounter" to="positionCounter"/> - <ParameterMapping sourceType="Parent" from="positionalAccuracy" to="positionalAccuracy"/> - <ParameterMapping sourceType="Parent" from="targetPositions" to="targetPositions"/> - <ParameterMapping sourceType="Parent" from="timeoutMoveTo" to="timeoutMoveTo"/> - <ParameterMapping sourceType="Parent" from="waitAfterLast" to="waitAfterLast"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="223.718" posY="127.619"/> - <SupportPoint posX="83.4658" posY="65.1142"/> - <SupportPoint posX="113.466" posY="95.1142"/> - <SupportPoint posX="143.466" posY="125.114"/> - </SupportPoints> - </Transition> - <Transition from="MoveToNext" to="EvSuccess" eventName="EvEndpointReached"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="370.557" posY="270.614"/> - </SupportPoints> - </Transition> - <Transition from="MoveToNext" to="EvFailure" eventName="EvTimeoutWaypointUnreachable"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="130.694" posY="267.539"/> - </SupportPoints> - </Transition> - </Transitions> -</State> - diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MoveToNext.cpp b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MoveToNext.cpp deleted file mode 100644 index 8a1f7b9a7bf3364821ba891a2b3a16ee330633de..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MoveToNext.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::MovePlatformToLandmarkGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "MoveToNext.h" - -using namespace armarx; -using namespace MovePlatformToLandmarkGroup; - -// DO NOT EDIT NEXT LINE -MoveToNext::SubClassRegistry MoveToNext::Registry(MoveToNext::GetName(), &MoveToNext::CreateInstance); - - - -MoveToNext::MoveToNext(XMLStateConstructorParams stateData) : - XMLStateTemplate < MoveToNext > (stateData) -{ -} - -void MoveToNext::onEnter() -{ - ARMARX_LOG << eVERBOSE << "Entering MoveToNext::onEnter" << flush; - PlatformContext* context = getContext<PlatformContext>(); - ChannelRefPtr counter = getInput<ChannelRef>("positionCounter"); - int positionIndex = counter->getDataField("value")->getInt(); - ARMARX_DEBUG << "Entering positionIndex:" << positionIndex << flush; - SingleTypeVariantListPtr points = getInput<SingleTypeVariantList>("targetPositions"); - ARMARX_DEBUG << "points->getSize:" << points->getSize() << flush; - if (positionIndex < points->getSize()) { - Vector3Ptr currentTarget = points->getVariant(positionIndex)->get<Vector3>(); - ARMARX_DEBUG << "currentTarget:" << currentTarget->toEigen().transpose() << flush; - float positionalAccuracy = getInput<float>("positionalAccuracy"); - float orientationalAccuracy = getInput<float>("orientationalAccuracy"); - context->platformUnitPrx->moveTo(currentTarget->x, currentTarget->y, currentTarget->z, positionalAccuracy, orientationalAccuracy); - Literal checkX(context->platformUnitObserverName + ".platformPose.positionX", "inrange", Literal::createParameterList(currentTarget->x-positionalAccuracy,currentTarget->x+positionalAccuracy)); - Literal checkY(context->platformUnitObserverName + ".platformPose.positionY", "inrange", Literal::createParameterList(currentTarget->y-positionalAccuracy,currentTarget->y+positionalAccuracy)); - Literal checkAngle(context->platformUnitObserverName + ".platformPose.rotation", "inrange", Literal::createParameterList(currentTarget->z-orientationalAccuracy,currentTarget->z+orientationalAccuracy)); - - condTargetReached = installCondition<EvWaypointReached>(checkX && checkY && checkAngle); - timeoutMoveToNext = setTimeoutEvent(getInput<int>("timeoutMoveTo"), createEvent<EvTimeoutWaypointUnreachable>()); - } else { - timeoutWaitAfterLast = setTimeoutEvent(getInput<int>("waitAfterLast"), createEvent<EvEndpointReached>()); - } - - context->systemObserverPrx->incrementCounter(counter); - ARMARX_LOG << eVERBOSE << "Done MoveToNext::onEnter()"; -} - -void MoveToNext::onExit() -{ - removeCondition(condTargetReached); - removeTimeoutEvent(timeoutMoveToNext); - removeTimeoutEvent(timeoutWaitAfterLast); - ARMARX_LOG << eVERBOSE << "MoveToNext: Done onExit()"; -} - -// DO NOT EDIT NEXT FUNCTION -std::string MoveToNext::GetName() -{ - return "MoveToNext"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr MoveToNext::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new MoveToNext(stateData)); -} - diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MoveToNext.h b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MoveToNext.h deleted file mode 100644 index 63df7450c85e7868b3ffec5eef89bb6ab67355cd..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MoveToNext.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::MovePlatformToLandmarkGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_MovePlatformToLandmarkGroup_MoveToNext_H -#define _ARMARX_XMLUSERCODE_RobotAPI_MovePlatformToLandmarkGroup_MoveToNext_H - -#include <Core/statechart/xmlstates/XMLState.h> -#include <RobotAPI/statecharts/MovePlatformToLandmarkGroup/PlatformContext.h> - -namespace armarx -{ - namespace MovePlatformToLandmarkGroup - { - DEFINEEVENT(EvTimeoutWaypointUnreachable) - DEFINEEVENT(EvWaypointReached) - DEFINEEVENT(EvEndpointReached) - - class MoveToNext : - virtual public XMLStateTemplate < MoveToNext > , - public XMLStateFactoryBase - { - public: - MoveToNext(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - ConditionIdentifier condTargetReached; - ActionEventIdentifier timeoutMoveToNext; - ActionEventIdentifier timeoutWaitAfterLast; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MoveToNext.xml b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MoveToNext.xml deleted file mode 100644 index 7cbb13178e690177facbd3b6892c682a43af14db..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformSubGroup/MoveToNext.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="MoveToNext" uuid="E3A2DA64-4967-4F8E-AA8B-7CBF7BED42C5" width="800" height="185.582"> - <Description>This state is responsible for moving the platform to a given point.</Description> - <InputParameters> - <Parameter name="orientationalAccuracy" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="positionCounter" type="::armarx::ChannelRefBase" optional="no"/> - <Parameter name="positionalAccuracy" type="::armarx::FloatVariantData" optional="no"/> - <Parameter name="targetPositions" type="::armarx::SingleTypeVariantListBase(::armarx::Vector3Base)" optional="no"/> - <Parameter name="timeoutMoveTo" type="::armarx::IntVariantData" optional="no"/> - <Parameter name="waitAfterLast" type="::armarx::IntVariantData" optional="no"/> - </InputParameters> - <OutputParameters/> - <LocalParameters/> - <Substates/> - <Events> - <Event name="EvTimeoutWaypointUnreachable"> - <Description>Denotes that the platform could not move to a waypoint within the set time limit.</Description> - </Event> - <Event name="EvWaypointReached"> - <Description>Denotes that a waypoint (that is not an endpoint) was reached.</Description> - </Event> - <Event name="EvEndpointReached"> - <Description>Denotes that the endpoint was reached successfully and that there are no more target waypoints.</Description> - </Event> - </Events> - <Transitions/> -</State> - diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmark.cpp b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmark.cpp deleted file mode 100644 index c974e75511e02088b6e8455af4178029aa4eb361..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmark.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::MovePlatformToLandmarkGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "MovePlatformToLandmark.h" - -using namespace armarx; -using namespace MovePlatformToLandmarkGroup; - -// DO NOT EDIT NEXT LINE -MovePlatformToLandmark::SubClassRegistry MovePlatformToLandmark::Registry(MovePlatformToLandmark::GetName(), &MovePlatformToLandmark::CreateInstance); - - - -MovePlatformToLandmark::MovePlatformToLandmark(XMLStateConstructorParams stateData) : - XMLStateTemplate < MovePlatformToLandmark > (stateData) -{ -} - -void MovePlatformToLandmark::onEnter() -{ -} - -void MovePlatformToLandmark::run() -{ -} - -void MovePlatformToLandmark::onBreak() -{ -} - -void MovePlatformToLandmark::onExit() -{ -} - -// DO NOT EDIT NEXT FUNCTION -std::string MovePlatformToLandmark::GetName() -{ - return "MovePlatformToLandmark"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateFactoryBasePtr MovePlatformToLandmark::CreateInstance(XMLStateConstructorParams stateData) -{ - return XMLStateFactoryBasePtr(new MovePlatformToLandmark(stateData)); -} - diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmark.h b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmark.h deleted file mode 100644 index 8910434dde858c3171def0520a9f1b7bf42b043b..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmark.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::MovePlatformToLandmarkGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_MovePlatformToLandmarkGroup_MovePlatformToLandmark_H -#define _ARMARX_XMLUSERCODE_RobotAPI_MovePlatformToLandmarkGroup_MovePlatformToLandmark_H - -#include <Core/statechart/xmlstates/XMLState.h> - -namespace armarx -{ - namespace MovePlatformToLandmarkGroup - { - class MovePlatformToLandmark : - virtual public XMLStateTemplate < MovePlatformToLandmark > , - public XMLStateFactoryBase - { - public: - MovePlatformToLandmark(XMLStateConstructorParams stateData); - - // inherited from StateBase - void onEnter(); - void run(); - void onBreak(); - void onExit(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData); - static SubClassRegistry Registry; - - // DO NOT INSERT ANY CLASS MEMBERS, - // use stateparameters instead, - // if classmember are neccessary nonetheless, reset them in onEnter - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmark.xml b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmark.xml deleted file mode 100644 index 63705efef7f4dc65cbe15acb35b1e098fdd346c9..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmark.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<State version="1.0" name="MovePlatformToLandmark" uuid="9AE3BE73-6695-4BEF-B91F-D6B072B04F8B" width="800" height="683.424"> - <Description>State responsible for planning a path on a provided graph of nodes, edges and an end point. - -Each node encodes a (x,y) position, orientation around the z axis as well as a "frame" which serves as a name/id. -Each edge is a string in the format "<name1>;<name2>" where the names or those of existing nodes which are to be connected bidirectionally (no unidirectional connections).</Description> - <InputParameters> - <Parameter name="landmarkEdges" type="::armarx::SingleTypeVariantListBase(::armarx::StringVariantData)" optional="no" default='{"array":[{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::StringVariantData","value":""}}],"type":"::armarx::SingleTypeVariantListBase"}'/> - <Parameter name="landmarkNodes" type="::armarx::SingleTypeVariantListBase(::armarx::FramedVector3Base)" optional="no" default='{"array":[{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FramedVector3Base","value":{"frame":"Start","x":0.0,"y":0.0,"z":0.0}}},{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FramedVector3Base","value":{"frame":"1","x":4200.0,"y":0.0,"z":0.0}}},{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FramedVector3Base","value":{"frame":"2","x":4200.0,"y":4000.0,"z":0.0}}},{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FramedVector3Base","value":{"frame":"Handover","x":4200.0,"y":4000.0,"z":3.0}}},{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FramedVector3Base","value":{"frame":"3","x":3100.0,"y":6000.0,"z":0.0}}},{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FramedVector3Base","value":{"frame":"4","x":3300.0,"y":8300.0,"z":0.0}}},{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FramedVector3Base","value":{"frame":"Oven","x":2600.0,"y":7600.0,"z":0.0}}},{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FramedVector3Base","value":{"frame":"TableWithRolls","x":3300.0,"y":7150.0,"z":-1.0}}},{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FramedVector3Base","value":{"frame":"Sink","x":2600.0,"y":9600.0,"z":0.0}}},{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FramedVector3Base","value":{"frame":"Cupboard7Door","x":4500.0,"y":9400.0,"z":0.0}}},{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FramedVector3Base","value":{"frame":"SinkTable","x":3200.0,"y":9700.0,"z":0.0}}},{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FramedVector3Base","value":{"frame":"CloseToTableWithRolls","x":3500.0,"y":7150.0,"z":-1.0}}},{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FramedVector3Base","value":{"frame":"HandoverTable","x":3000.0,"y":5500.0,"z":2.0}}}],"type":"::armarx::SingleTypeVariantListBase"}'/> - <Parameter name="orientationalAccuracy" type="::armarx::FloatVariantData" optional="no" default='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FloatVariantData","value":0.0}}'/> - <Parameter name="positionalAccuracy" type="::armarx::FloatVariantData" optional="no" default='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::FloatVariantData","value":10.0}}'/> - <Parameter name="targetLandmark" type="::armarx::StringVariantData" optional="no" default='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::StringVariantData","value":"HandoverTable"}}'/> - <Parameter name="timeoutMoveTo" type="::armarx::IntVariantData" optional="no" default='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::IntVariantData","value":30000}}'/> - <Parameter name="waitAfterLast" type="::armarx::IntVariantData" optional="no" default='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::IntVariantData","value":0}}'/> - </InputParameters> - <OutputParameters/> - <LocalParameters/> - <Substates> - <LocalState name="CalcPath" refuuid="36719C67-762C-45FC-A703-0784C7A34F8B" left="122.965" top="138.053" boundingSquareSize="169.071"/> - <EndState name="EvFailure" event="EvFailure" left="118.685" top="431.075" boundingSquareSize="200"/> - <EndState name="EvSuccess" event="EvSuccess" left="505.166" top="433.44" boundingSquareSize="200"/> - <LocalState name="MovePlatform" refuuid="DB4A1244-3587-4F87-909F-B7274E4842C5" left="460.577" top="137.085" boundingSquareSize="200"/> - </Substates> - <Events/> - <StartState substateName="CalcPath"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="landmarkEdges" to="landmarkEdges"/> - <ParameterMapping sourceType="Parent" from="landmarkNodes" to="landmarkNodes"/> - <ParameterMapping sourceType="Parent" from="targetLandmark" to="targetLandmark"/> - </ParameterMappings> - </StartState> - <Transitions> - <Transition from="CalcPath" to="MovePlatform" eventName="EvPathFound"> - <ParameterMappings> - <ParameterMapping sourceType="Parent" from="orientationalAccuracy" to="orientationalAccuracy"/> - <ParameterMapping sourceType="Parent" from="positionalAccuracy" to="positionalAccuracy"/> - <ParameterMapping sourceType="Output" from="targetPositions" to="targetPositions"/> - <ParameterMapping sourceType="Parent" from="timeoutMoveTo" to="timeoutMoveTo"/> - <ParameterMapping sourceType="Parent" from="waitAfterLast" to="waitAfterLast"/> - </ParameterMappings> - <SupportPoints> - <SupportPoint posX="463.658" posY="213.196"/> - </SupportPoints> - </Transition> - <Transition from="CalcPath" to="EvFailure" eventName="EvNoPathFound"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="212.888" posY="452.978"/> - </SupportPoints> - </Transition> - <Transition from="MovePlatform" to="EvFailure" eventName="EvFailure"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="263.745" posY="465.988"/> - </SupportPoints> - </Transition> - <Transition from="MovePlatform" to="EvSuccess" eventName="EvSuccess"> - <ParameterMappings/> - <SupportPoints> - <SupportPoint posX="577.163" posY="438.786"/> - </SupportPoints> - </Transition> - </Transitions> -</State> - diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmarkGroup.scgxml b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmarkGroup.scgxml deleted file mode 100644 index 029261a578383ec35f7c234107f824902d6dc6df..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmarkGroup.scgxml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<StatechartGroup name="MovePlatformToLandmarkGroup" package="RobotAPI"> - <Description>A Statechart responsible for planning a path on a provided graph of nodes(2D position + orientation + name), edges and an end point</Description> - <Folder basename="MovePlatformSubGroup"> - <State filename="MovePlatform.xml" visibility="public"/> - <State filename="MoveToNext.xml"/> - </Folder> - <State filename="MovePlatformToLandmark.xml" visibility="public"/> - <State filename="CalcPath.xml"/> -</StatechartGroup> - diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmarkGroupRemoteStateOfferer.cpp b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmarkGroupRemoteStateOfferer.cpp deleted file mode 100644 index 51e94da0e8a36d0b6ce262d211c2ff4fa6e121ea..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmarkGroupRemoteStateOfferer.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::MovePlatformToLandmarkGroup::MovePlatformToLandmarkGroupRemoteStateOfferer - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "MovePlatformToLandmarkGroupRemoteStateOfferer.h" - -using namespace armarx; -using namespace MovePlatformToLandmarkGroup; - -// DO NOT EDIT NEXT LINE -MovePlatformToLandmarkGroupRemoteStateOfferer::SubClassRegistry MovePlatformToLandmarkGroupRemoteStateOfferer::Registry(MovePlatformToLandmarkGroupRemoteStateOfferer::GetName(), &MovePlatformToLandmarkGroupRemoteStateOfferer::CreateInstance); - - - -MovePlatformToLandmarkGroupRemoteStateOfferer::MovePlatformToLandmarkGroupRemoteStateOfferer(StatechartGroupXmlReaderPtr reader) : - XMLRemoteStateOfferer < PlatformContext > (reader) -{ -} - -void MovePlatformToLandmarkGroupRemoteStateOfferer::onInitXMLRemoteStateOfferer() -{ - -} - -void MovePlatformToLandmarkGroupRemoteStateOfferer::onConnectXMLRemoteStateOfferer() -{ - -} - -void MovePlatformToLandmarkGroupRemoteStateOfferer::onExitXMLRemoteStateOfferer() -{ - -} - -// DO NOT EDIT NEXT FUNCTION -std::string MovePlatformToLandmarkGroupRemoteStateOfferer::GetName() -{ - return "MovePlatformToLandmarkGroupRemoteStateOfferer"; -} - -// DO NOT EDIT NEXT FUNCTION -XMLStateOffererFactoryBasePtr MovePlatformToLandmarkGroupRemoteStateOfferer::CreateInstance(StatechartGroupXmlReaderPtr reader) -{ - return XMLStateOffererFactoryBasePtr(new MovePlatformToLandmarkGroupRemoteStateOfferer(reader)); -} - - - diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmarkGroupRemoteStateOfferer.h b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmarkGroupRemoteStateOfferer.h deleted file mode 100644 index 016ea299ed760e82b200f0d2a14197c475f4cb1c..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/MovePlatformToLandmarkGroupRemoteStateOfferer.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::MovePlatformToLandmarkGroup - * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_XMLUSERCODE_RobotAPI_MovePlatformToLandmarkGroup_REMOTESTATEOFFERER_H -#define _ARMARX_XMLUSERCODE_RobotAPI_MovePlatformToLandmarkGroup_REMOTESTATEOFFERER_H - -#include <Core/statechart/xmlstates/XMLRemoteStateOfferer.h> -#include <RobotAPI/statecharts/MovePlatformToLandmarkGroup/PlatformContext.h> - -namespace armarx -{ - namespace MovePlatformToLandmarkGroup - { - class MovePlatformToLandmarkGroupRemoteStateOfferer : - virtual public XMLRemoteStateOfferer < PlatformContext > // Change this statechart context if you need another context (dont forget to change in the constructor as well) - { - public: - MovePlatformToLandmarkGroupRemoteStateOfferer(StatechartGroupXmlReaderPtr reader); - - // inherited from RemoteStateOfferer - void onInitXMLRemoteStateOfferer(); - void onConnectXMLRemoteStateOfferer(); - void onExitXMLRemoteStateOfferer(); - - // static functions for AbstractFactory Method - static std::string GetName(); - static XMLStateOffererFactoryBasePtr CreateInstance(StatechartGroupXmlReaderPtr reader); - static SubClassRegistry Registry; - - - }; - } -} - -#endif diff --git a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/PlatformContext.h b/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/PlatformContext.h deleted file mode 100644 index d71d9710519c881a0adbeca3aaac62e54881cc51..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/MovePlatformToLandmarkGroup/PlatformContext.h +++ /dev/null @@ -1,114 +0,0 @@ -/* -* This file is part of ArmarX. -* -* ArmarX is free software; you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* ArmarX 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 Lesser General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* @package RobotAPI::MovePlatform -* @author Valerij Wittenbeck -* @date 2014 -* @copyright http://www.gnu.org/licenses/gpl.txt -* GNU General Public License -*/ - - -#ifndef ARMARX_COMPONENT_PlatformContext_H -#define ARMARX_COMPONENT_PlatformContext_H - -#include <Core/core/Component.h> -#include <Core/core/system/ImportExportComponent.h> -#include <Core/statechart/StatechartContext.h> -#include <RobotAPI/libraries/robotstate/remote/RemoteRobot.h> -#include <RobotAPI/interface/units/PlatformUnitInterface.h> -#include <RobotAPI/interface/observers/PlatformUnitObserverInterface.h> -#include <RobotAPI/libraries/robotstate/remote/RobotStateObjectFactories.h> - -#include <RobotAPI/libraries/units/PlatformUnitObserver.h> -//#include <VirtualRobot/VirtualRobot.h> -#include <IceUtil/Time.h> - -namespace armarx -{ - - // **************************************************************** - // Component and context - // **************************************************************** - - struct PlatformContextProperties : StatechartContextPropertyDefinitions - { - PlatformContextProperties(std::string prefix): - StatechartContextPropertyDefinitions(prefix) - { - defineOptionalProperty<std::string>("PlatformUnitName", "PlatformUnitDynamicSimulation", "Name of the PlatformUnit to use"); - defineOptionalProperty<std::string>("PlatformUnitObserverName", "PlatformUnitObserver", "Name of the PlatformUnitObserver to use"); - } - }; - class ARMARXCOMPONENT_IMPORT_EXPORT PlatformContext : - virtual public StatechartContext - { - public: - // inherited from Component - virtual std::string getDefaultName() { return "PlatformContext"; } - virtual void onInitStatechartContext() - { - ARMARX_LOG << eINFO << "Init PlatformContext" << flush; - - platformUnitObserverName = getProperty<std::string>("PlatformUnitObserverName").getValue(); - platformUnitDynamicSimulationName = getProperty<std::string>("PlatformUnitName").getValue(); - - // usingProxy(getProperty<std::string>("PlatformUnitName").getValue()); - usingProxy(platformUnitDynamicSimulationName); - usingProxy("RobotStateComponent"); - usingProxy(platformUnitObserverName); - } - - virtual void onConnectStatechartContext() - { - ARMARX_LOG << eINFO << "Starting PlatformContext" << flush; - - // retrieve proxies - robotStateComponent = getProxy<RobotStateComponentInterfacePrx>("RobotStateComponent"); - platformUnitPrx = getProxy<PlatformUnitInterfacePrx>(platformUnitDynamicSimulationName); - platformUnitObserverPrx = getProxy<PlatformUnitObserverInterfacePrx>(platformUnitObserverName); - ARMARX_LOG << eINFO << "Fetched proxies" << platformUnitPrx << " " << platformUnitObserverPrx << " " << robotStateComponent << flush; - - // initialize remote robot - remoteRobot.reset(new RemoteRobot(robotStateComponent->getSynchronizedRobot())); - ARMARX_LOG << eINFO << "Created remote robot" << flush; - } - - - /** - * @see PropertyUser::createPropertyDefinitions() - */ - virtual PropertyDefinitionsPtr createPropertyDefinitions() - { - return PropertyDefinitionsPtr(new PlatformContextProperties( - getConfigIdentifier())); - } - std::string getPlatformUnitObserverName() { return platformUnitObserverName; } - - //! Prx for the RobotState - RobotStateComponentInterfacePrx robotStateComponent; - PlatformUnitInterfacePrx platformUnitPrx; - PlatformUnitObserverInterfacePrx platformUnitObserverPrx; - //SystemObserverInterfacePrx systemObserver; // already defined in StatechartContext - VirtualRobot::RobotPtr remoteRobot; - std::string platformUnitObserverName; - std::string platformUnitDynamicSimulationName; - private: - - }; -} - -#endif diff --git a/source/RobotAPI/statecharts/moveplatform/CMakeLists.txt b/source/RobotAPI/statecharts/moveplatform/CMakeLists.txt deleted file mode 100644 index f74bc9ecc73f1afc85f8cc9c43f6971bb1bd4eac..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/moveplatform/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -armarx_set_target("RobotAPI Library: MovePlatform") - - -find_package(Eigen3 QUIET) -find_package(Simox QUIET) - -armarx_build_if(Eigen3_FOUND "Eigen3 not available") -armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available") - -if (Eigen3_FOUND AND Simox_FOUND) - include_directories( - ${Eigen3_INCLUDE_DIR} - ${Simox_INCLUDE_DIRS}) -endif() - -set(LIB_NAME MovePlatform) -set(LIB_VERSION 0.1.0) -set(LIB_SOVERSION 0) - -set(LIBS RobotAPICore ArmarXCoreObservers) - -set(LIB_FILES MovePlatform.cpp - ) -set(LIB_HEADERS - MovePlatform.h - PlatformContext.h -) - -armarx_add_library("${LIB_NAME}" "${LIB_VERSION}" "${LIB_SOVERSION}" "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}") diff --git a/source/RobotAPI/statecharts/moveplatform/MovePlatform.cpp b/source/RobotAPI/statecharts/moveplatform/MovePlatform.cpp deleted file mode 100644 index ad970c607e6cc256a6600f8ca28f091c8f68d1f4..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/moveplatform/MovePlatform.cpp +++ /dev/null @@ -1,157 +0,0 @@ -/* -* This file is part of ArmarX. -* -* ArmarX is free software; you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* ArmarX 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 Lesser General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* @package RobotAPI::MovePlatform -* @author Valerij Wittenbeck -* @date 2014 - -* @copyright http://www.gnu.org/licenses/gpl.txt -* GNU General Public License -*/ - -#include "MovePlatform.h" -//#include "../core/RobotStatechartContext.h" - -#include <Core/observers/variant/ChannelRef.h> -#include <Core/observers/variant/SingleTypeVariantList.h> -#include <RobotAPI/libraries/robotstate/remote/ArmarPose.h> -#include <VirtualRobot/IK/DifferentialIK.h> - -#include <RobotAPI/interface/units/PlatformUnitInterface.h> - -namespace armarx -{ - - - void MovePlatformStateChart::onInitRemoteStateOfferer() - { - addState<StatechartMovePlatform>("MovePlatformStateChart"); - } - - void MovePlatformStateChart::onConnectRemoteStateOfferer() - { - - } - - // **************************************************************** - // Implementation of StatechartMovePlatform - // **************************************************************** - void StatechartMovePlatform::defineParameters() - { -// setConfigFile("RobotAPI/scenarios/MovePlatformTest/configs/MovePlatformExample.xml"); - setConfigFile("RobotAPI/scenarios/MovePlatformTest/configs/MovePlatformExampleCloseToTable.xml"); - addToInput("targetPositions", VariantType::List(VariantType::Vector3), false); - addToInput("positionalAccuracy", VariantType::Float, false); - addToInput("orientationalAccuracy", VariantType::Float, false); - addToInput("timeoutMoveTo", VariantType::Int, false); - addToInput("waitAfterLast", VariantType::Int, false); - addToLocal("positionCounter", VariantType::ChannelRef); - } - - void StatechartMovePlatform::defineSubstates() - { - ARMARX_LOG << eVERBOSE << "Entering StatechartMovePlatform"; - StatePtr stateMoveToNext = addState<StateMoveToNext>("stateMoveToNext"); - StatePtr stateSuccess = addState<SuccessState>("stateSuccess"); - StatePtr stateFailure = addState<FailureState>("stateFailure"); - - ParameterMappingPtr mapMoveToNextInfo = ParameterMapping::createMapping() - ->mapFromParent("*", "*"); - setInitState(stateMoveToNext, mapMoveToNextInfo); - - //transitions - addTransition<EvTargetReached>(stateMoveToNext, stateMoveToNext, mapMoveToNextInfo); - addTransition<EvNoTargets>(stateMoveToNext, stateSuccess); - addTransition<EvTimeoutTargetUnreachable>(stateMoveToNext, stateFailure); - } - - void StatechartMovePlatform::onEnter() - { - ARMARX_LOG << eVERBOSE << "Entering StatechartMovePlatform"; - - PlatformContext* context = getContext<PlatformContext>(); - ChannelRefPtr counter = ChannelRefPtr::dynamicCast(context->systemObserverPrx->startCounter(0, "positionCounter")); - - setLocal("positionCounter", counter); - } - - void StatechartMovePlatform::onExit() - { - ChannelRefPtr r = getLocal<ChannelRef>("positionCounter"); - getContext()->systemObserverPrx->removeCounter(r); - ARMARX_LOG << eVERBOSE << "Exiting StatechartMovePlatform..."; - } - - // **************************************************************** - // Implementation of StateMoveToNext - // **************************************************************** - - void StateMoveToNext::defineParameters() - { - addToInput("targetPositions", VariantType::List(VariantType::Vector3), false); - addToInput("positionalAccuracy", VariantType::Float, false); - addToInput("orientationalAccuracy", VariantType::Float, false); - addToInput("timeoutMoveTo", VariantType::Int, false); - addToInput("waitAfterLast", VariantType::Int, false); - addToInput("positionCounter", VariantType::ChannelRef, false); - } - - void StateMoveToNext::onEnter() - { - ARMARX_LOG << eVERBOSE << "Entering StateMoveToNext::onEnter" << flush; - PlatformContext* context = getContext<PlatformContext>(); - ChannelRefPtr counter = getInput<ChannelRef>("positionCounter"); - int positionIndex = counter->getDataField("value")->getInt(); - ARMARX_DEBUG << "Entering positionIndex:" << positionIndex << flush; - SingleTypeVariantListPtr points = getInput<SingleTypeVariantList>("targetPositions"); - ARMARX_DEBUG << "points->getSize:" << points->getSize() << flush; - if (positionIndex < points->getSize()) { - SingleTypeVariantListPtr list = getInput<SingleTypeVariantList>("targetPositions"); - - ARMARX_DEBUG << "list->getSize:" << list->getSize() << flush; - VariantPtr v = list->getVariant(positionIndex); - ARMARX_DEBUG << "v->getTypeName():" << v->getTypeName() << flush; - - Vector3Ptr currentTarget = v->get<Vector3>(); - ARMARX_DEBUG << "currentTarget:" << currentTarget->toEigen().transpose() << flush; - float positionalAccuracy = getInput<float>("positionalAccuracy"); - float orientationalAccuracy = getInput<float>("orientationalAccuracy"); - context->platformUnitPrx->moveTo(currentTarget->x, currentTarget->y, currentTarget->z, positionalAccuracy, orientationalAccuracy); - - Literal checkX("PlatformUnitObserver.platformPose.positionX", "inrange", Literal::createParameterList(currentTarget->x-positionalAccuracy,currentTarget->x+positionalAccuracy)); - Literal checkY("PlatformUnitObserver.platformPose.positionY", "inrange", Literal::createParameterList(currentTarget->y-positionalAccuracy,currentTarget->y+positionalAccuracy)); - Literal checkAngle("PlatformUnitObserver.platformPose.rotation", "inrange", Literal::createParameterList(currentTarget->z-orientationalAccuracy,currentTarget->z+orientationalAccuracy)); - - condTargetReached = installCondition<EvTargetReached>(checkX && checkY && checkAngle); - timeoutMoveToNext = setTimeoutEvent(getInput<int>("timeoutMoveTo"), createEvent<EvTimeoutTargetUnreachable>()); - } else { -// sendEvent<EvNoTargets>(); - timeoutWaitAfterLast = setTimeoutEvent(getInput<int>("waitAfterLast"), createEvent<EvNoTargets>()); - } - - context->systemObserverPrx->incrementCounter(counter); - ARMARX_LOG << eVERBOSE << "Done MoveToNext::onEnter()"; - } - - void StateMoveToNext::onExit() - { - removeCondition(condTargetReached); - removeTimeoutEvent(timeoutMoveToNext); - removeTimeoutEvent(timeoutWaitAfterLast); - ARMARX_LOG << eVERBOSE << "StateMoveToNext: Done onExit()"; - } -} - diff --git a/source/RobotAPI/statecharts/moveplatform/MovePlatform.h b/source/RobotAPI/statecharts/moveplatform/MovePlatform.h deleted file mode 100644 index a8b104ece29790dead7da3c8b943175c3df456d1..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/moveplatform/MovePlatform.h +++ /dev/null @@ -1,83 +0,0 @@ -/* -* This file is part of ArmarX. -* -* ArmarX is free software; you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* ArmarX 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 Lesser General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* @package RobotAPI::MovePlatform -* @author Valerij Wittenbeck -* @date 2014 Valerij Wittenbeck -* @copyright http://www.gnu.org/licenses/gpl.txt -* GNU General Public License -*/ - -#ifndef ARMARX_COMPONENT_MOVE_PLATFORM_H -#define ARMARX_COMPONENT_MOVE_PLATFORM_H - -#include <Core/statechart/Statechart.h> -#include <RobotAPI/statecharts/MovePlatform/PlatformContext.h> - -namespace armarx -{ - class MovePlatformStateChart : public RemoteStateOfferer<PlatformContext> - { - public: - void onInitRemoteStateOfferer(); - void onConnectRemoteStateOfferer(); - std::string getStateOffererName() const { return "MovePlatformStateChart"; } - }; - - // **************************************************************** - // Events - // **************************************************************** - -// DEFINEEVENT(EvSuccess) - DEFINEEVENT(EvTimeoutTargetUnreachable) - DEFINEEVENT(EvNoTargets) - DEFINEEVENT(EvTargetReached) - - // **************************************************************** - // Definition of StatechartMovePlatform - // **************************************************************** - struct StatechartMovePlatform : - StateTemplate<StatechartMovePlatform> - { - void defineParameters(); - void defineSubstates(); - void onEnter(); - void onExit(); - - }; - - // **************************************************************** - // Definition of StateMoveToNext - // **************************************************************** - /** - * StateMoveToNext: Move to next target in list - */ - - struct StateMoveToNext : - StateTemplate<StateMoveToNext> - { - void defineParameters(); - void onEnter(); - void onExit(); - - ConditionIdentifier condTargetReached; - StateUtility::ActionEventIdentifier timeoutMoveToNext; - StateUtility::ActionEventIdentifier timeoutWaitAfterLast; - }; - -} - -#endif diff --git a/source/RobotAPI/statecharts/moveplatform/PlatformContext.h b/source/RobotAPI/statecharts/moveplatform/PlatformContext.h deleted file mode 100644 index d71d9710519c881a0adbeca3aaac62e54881cc51..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/moveplatform/PlatformContext.h +++ /dev/null @@ -1,114 +0,0 @@ -/* -* This file is part of ArmarX. -* -* ArmarX is free software; you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* ArmarX 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 Lesser General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* @package RobotAPI::MovePlatform -* @author Valerij Wittenbeck -* @date 2014 -* @copyright http://www.gnu.org/licenses/gpl.txt -* GNU General Public License -*/ - - -#ifndef ARMARX_COMPONENT_PlatformContext_H -#define ARMARX_COMPONENT_PlatformContext_H - -#include <Core/core/Component.h> -#include <Core/core/system/ImportExportComponent.h> -#include <Core/statechart/StatechartContext.h> -#include <RobotAPI/libraries/robotstate/remote/RemoteRobot.h> -#include <RobotAPI/interface/units/PlatformUnitInterface.h> -#include <RobotAPI/interface/observers/PlatformUnitObserverInterface.h> -#include <RobotAPI/libraries/robotstate/remote/RobotStateObjectFactories.h> - -#include <RobotAPI/libraries/units/PlatformUnitObserver.h> -//#include <VirtualRobot/VirtualRobot.h> -#include <IceUtil/Time.h> - -namespace armarx -{ - - // **************************************************************** - // Component and context - // **************************************************************** - - struct PlatformContextProperties : StatechartContextPropertyDefinitions - { - PlatformContextProperties(std::string prefix): - StatechartContextPropertyDefinitions(prefix) - { - defineOptionalProperty<std::string>("PlatformUnitName", "PlatformUnitDynamicSimulation", "Name of the PlatformUnit to use"); - defineOptionalProperty<std::string>("PlatformUnitObserverName", "PlatformUnitObserver", "Name of the PlatformUnitObserver to use"); - } - }; - class ARMARXCOMPONENT_IMPORT_EXPORT PlatformContext : - virtual public StatechartContext - { - public: - // inherited from Component - virtual std::string getDefaultName() { return "PlatformContext"; } - virtual void onInitStatechartContext() - { - ARMARX_LOG << eINFO << "Init PlatformContext" << flush; - - platformUnitObserverName = getProperty<std::string>("PlatformUnitObserverName").getValue(); - platformUnitDynamicSimulationName = getProperty<std::string>("PlatformUnitName").getValue(); - - // usingProxy(getProperty<std::string>("PlatformUnitName").getValue()); - usingProxy(platformUnitDynamicSimulationName); - usingProxy("RobotStateComponent"); - usingProxy(platformUnitObserverName); - } - - virtual void onConnectStatechartContext() - { - ARMARX_LOG << eINFO << "Starting PlatformContext" << flush; - - // retrieve proxies - robotStateComponent = getProxy<RobotStateComponentInterfacePrx>("RobotStateComponent"); - platformUnitPrx = getProxy<PlatformUnitInterfacePrx>(platformUnitDynamicSimulationName); - platformUnitObserverPrx = getProxy<PlatformUnitObserverInterfacePrx>(platformUnitObserverName); - ARMARX_LOG << eINFO << "Fetched proxies" << platformUnitPrx << " " << platformUnitObserverPrx << " " << robotStateComponent << flush; - - // initialize remote robot - remoteRobot.reset(new RemoteRobot(robotStateComponent->getSynchronizedRobot())); - ARMARX_LOG << eINFO << "Created remote robot" << flush; - } - - - /** - * @see PropertyUser::createPropertyDefinitions() - */ - virtual PropertyDefinitionsPtr createPropertyDefinitions() - { - return PropertyDefinitionsPtr(new PlatformContextProperties( - getConfigIdentifier())); - } - std::string getPlatformUnitObserverName() { return platformUnitObserverName; } - - //! Prx for the RobotState - RobotStateComponentInterfacePrx robotStateComponent; - PlatformUnitInterfacePrx platformUnitPrx; - PlatformUnitObserverInterfacePrx platformUnitObserverPrx; - //SystemObserverInterfacePrx systemObserver; // already defined in StatechartContext - VirtualRobot::RobotPtr remoteRobot; - std::string platformUnitObserverName; - std::string platformUnitDynamicSimulationName; - private: - - }; -} - -#endif diff --git a/source/RobotAPI/statecharts/moveplatformtolandmark/CMakeLists.txt b/source/RobotAPI/statecharts/moveplatformtolandmark/CMakeLists.txt deleted file mode 100644 index d90432f954c7c76dbbb81b534b3ad7aed8f328d8..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/moveplatformtolandmark/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -armarx_set_target("RobotAPI Library: MovePlatformToLandmark") - - -find_package(Eigen3 QUIET) -find_package(Simox QUIET) - -armarx_build_if(Eigen3_FOUND "Eigen3 not available") -armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available") - -if (Eigen3_FOUND AND Simox_FOUND) - include_directories( - ${Eigen3_INCLUDE_DIR} - ${Simox_INCLUDE_DIRS}) -endif() - -set(LIB_NAME MovePlatformToLandmark) -set(LIB_VERSION 0.1.0) -set(LIB_SOVERSION 0) - -set(LIBS RobotAPIRobotStateComponent RobotAPICore ArmarXCoreObservers) - -set(LIB_FILES MovePlatformToLandmark.cpp - ) -set(LIB_HEADERS - MovePlatformToLandmark.h -) - -armarx_add_library("${LIB_NAME}" "${LIB_VERSION}" "${LIB_SOVERSION}" "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}") diff --git a/source/RobotAPI/statecharts/moveplatformtolandmark/MovePlatformToLandmark.cpp b/source/RobotAPI/statecharts/moveplatformtolandmark/MovePlatformToLandmark.cpp deleted file mode 100644 index ff5d3f10143c96e8b04026460b477c94b1231822..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/moveplatformtolandmark/MovePlatformToLandmark.cpp +++ /dev/null @@ -1,259 +0,0 @@ -/* -* This file is part of ArmarX. -* -* ArmarX is free software; you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* ArmarX 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 Lesser General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* @package RobotAPI::MovePlatformToLandmark -* @author Valerij Wittenbeck -* @date 2014 - -* @copyright http://www.gnu.org/licenses/gpl.txt -* GNU General Public License -*/ - -#include "MovePlatformToLandmark.h" - -#include <RobotAPI/libraries/robotstate/remote/ArmarPose.h> -#include <RobotAPI/libraries/robotstate/remote/RobotStateObjectFactories.h> -#include <RobotAPI/interface/units/PlatformUnitInterface.h> - -#include <Core/core/ManagedIceObject.h> -#include <Core/core/CoreObjectFactories.h> -#include <Core/observers/variant/ChannelRef.h> -#include <Core/observers/variant/SingleTypeVariantList.h> -#include <Core/observers/ObserverObjectFactories.h> - -#include <boost/algorithm/string.hpp> - -namespace armarx -{ - - - void MovePlatformToLandmarkStateChart::onInitRemoteStateOfferer() - { - addState<StatechartMovePlatformToLandmark>("MovePlatformToLandmarkStateChart"); - } - - void MovePlatformToLandmarkStateChart::onConnectRemoteStateOfferer() - { - if(!getArmarXManager()->getIceManager()->getCommunicator()->findObjectFactory(armarx::FramedVector3Base::ice_staticId())) - { - ARMARX_INFO << "could not find factory"; - } - } - - // **************************************************************** - // Implementation of StatechartMovePlatformToLandmark - // **************************************************************** - void StatechartMovePlatformToLandmark::defineParameters() - { - //setConfigFile("RobotAPI/scenarios/MovePlatformToLandmarkTest/configs/MovePlatformToLandmarkExampleGraph.xml"); - - addToInput("targetLandmark", VariantType::String, false); - addToInput("landmarkNodes", VariantType::List(VariantType::FramedVector3), false); - addToInput("landmarkEdges", VariantType::List(VariantType::String), false); - addToInput("positionalAccuracy", VariantType::Float, true); - addToInput("orientationalAccuracy", VariantType::Float, true); - addToInput("timeoutMoveTo", VariantType::Int, false); - addToInput("waitAfterLast", VariantType::Int, false); - } - - void StatechartMovePlatformToLandmark::defineSubstates() - { - RemoteStatePtr stateMoveToLocation = addRemoteState("MovePlatformStateChart","MovePlatformStateChartStateOfferer"); - StatePtr stateCalcPath = addState<StateCalculatePath>("stateCalculatePath"); - StatePtr stateSuccess = addState<SuccessState>("stateSuccess"); - StatePtr stateFailure = addState<FailureState>("stateFailure"); - - setInitState(stateCalcPath, ParameterMapping::createMapping()->mapFromParent("*","*")); - //transitions - addTransition<EvPathFound>(stateCalcPath, stateMoveToLocation, ParameterMapping::createMapping() - ->mapFromParent("*","*") - ->mapFromOutput("targetPositions") - ); - addTransition<EvNoPathFound>(stateCalcPath, stateFailure); - addTransition<EvSuccess>(stateMoveToLocation, stateSuccess); - addTransition<EvFailure>(stateMoveToLocation, stateFailure); - } - - void StatechartMovePlatformToLandmark::onEnter() - { - ARMARX_LOG << eVERBOSE << "Entering StatechartMovePlatformToLandmark"; - } - - void StatechartMovePlatformToLandmark::onExit() - { - ARMARX_LOG << eVERBOSE << "Exiting StatechartMovePlatformToLandmark..."; - } - - // **************************************************************** - // Implementation of StateCalculatePath - // **************************************************************** - - void StateCalculatePath::defineParameters() - { - addToInput("targetLandmark", VariantType::String, false); - addToInput("landmarkNodes", VariantType::List(VariantType::FramedVector3), false); - addToInput("landmarkEdges", VariantType::List(VariantType::String), false); - addToOutput("targetPositions", VariantType::List(VariantType::Vector3), false); - } - - void StateCalculatePath::onEnter() - { - ARMARX_LOG << eVERBOSE << "Entering StateCalculatePath" << flush; - - //read the nodes into a tag to node map - SingleTypeVariantListPtr landmarkNodes = getInput<SingleTypeVariantList>("landmarkNodes"); - std::map<std::string, NodePtr> nameToNodeMap; - for (int i = 0; i < landmarkNodes->getSize(); i++) { - ARMARX_LOG << landmarkNodes->getVariant(i)->getTypeName() << std::endl; - FramedVector3Ptr fv = landmarkNodes->getVariant(i)->get<FramedVector3>(); - NodePtr n = NodePtr(new Node()); - n->name = fv->frame; - n->framedPos = fv; - nameToNodeMap[fv->frame] = n; - } - - ARMARX_LOG << eVERBOSE << "StateCalculatePath:onEnter(): Retrieving edges" << flush; - //process the edges by adding the nodes to each other's successors - SingleTypeVariantListPtr landmarkEdges = getInput<SingleTypeVariantList>("landmarkEdges"); - for (int i = 0; i < landmarkEdges->getSize(); i++) { - std::string edge = landmarkEdges->getVariant(i)->getString(); - std::vector<std::string> edgeNodes; - boost::split(edgeNodes, edge, boost::is_any_of(";"), boost::token_compress_on); - NodePtr left = nameToNodeMap[edgeNodes[0]]; - NodePtr right = nameToNodeMap[edgeNodes[1]]; - left->successors.push_back(right); - right->successors.push_back(left); - } - - ARMARX_LOG << eVERBOSE << "StateCalculatePath:onEnter(): Getting current pose from PlatformContext" << flush; - PlatformContext* context = getContext<PlatformContext>(); - ChannelRefPtr poseRef = context->getChannelRef(context->getPlatformUnitObserverName(), "platformPose"); - const float platformPositionX = context->getDatafieldRef(poseRef, "positionX")->getDataField()->getFloat(); - const float platformPositionY = context->getDatafieldRef(poseRef, "positionY")->getDataField()->getFloat(); - - //has trouble resolving the observer? -// const float platformPositionX = context->getDataFromObserver(DataFieldIdentifierPtr(new DataFieldIdentifier("platformPose.positionX")))->getFloat(); -// const float platformPositionY = context->getDataFromObserver(DataFieldIdentifierPtr(new DataFieldIdentifier("platformPose.positionY")))->getFloat(); - - std::map<std::string, NodePtr>::iterator it = nameToNodeMap.begin(); - if (it == nameToNodeMap.end()) { - ARMARX_LOG << eWARN << "No nodes provided"; - sendEvent<EvNoPathFound>(); - return; - } - ARMARX_LOG << eVERBOSE << "StateCalculatePath:onEnter(): Finding closest point in graph" << flush; - NodePtr closest = it->second; - float minDist = getDist(platformPositionX, platformPositionY, closest->framedPos->x, closest->framedPos->y); - it++; - for (; it != nameToNodeMap.end(); it++) { - const float dist = getDist(platformPositionX, platformPositionY, it->second->framedPos->x, it->second->framedPos->y); - if (dist < minDist) { - closest = it->second; - minDist = dist; - } - } - - ARMARX_LOG << eVERBOSE << "StateCalculatePath:onEnter(): Starting point: " << closest->name << flush; - - std::string landmark = getInput<std::string>("targetLandmark"); - NodePtr goal = nameToNodeMap[landmark]; - if (!goal) { - ARMARX_LOG << eWARN << "Target landmark doesn't exist in graph" << flush; - sendEvent<EvNoPathFound>(); - return; - } - ARMARX_LOG << eVERBOSE << "StateCalculatePath:onEnter(): Looking for path" << flush; - std::list<NodePtr> path = aStar(closest, goal); - if (path.empty()) { - ARMARX_LOG << eWARN << "No path found" << flush; - sendEvent<EvNoPathFound>(); - return; - } - SingleTypeVariantList targetPositions(VariantType::Vector3); - const float goalAlpha = path.back()->framedPos->z; - for (std::list<NodePtr>::iterator it = path.begin(); it != path.end(); it++) { - Vector3 v; - v.x = (*it)->framedPos->x; - v.y = (*it)->framedPos->y; - v.z = goalAlpha; - targetPositions.addVariant(v); - } - setOutput("targetPositions", targetPositions); - sendEvent<EvPathFound>(); - ARMARX_LOG << eVERBOSE << "StateCalculatePath: Done onEnter()" << flush; - } - - void StateCalculatePath::onExit() - { - ARMARX_LOG << eVERBOSE << "StateCalculatePath: Done onExit()"; - } - - //http://en.wikipedia.org/wiki/A*_search_algorithm - std::list<StateCalculatePath::NodePtr> StateCalculatePath::aStar(StateCalculatePath::NodePtr start, StateCalculatePath::NodePtr goal) { - std::list<NodePtr> path; - - std::vector<NodePtr> closedSet; - std::vector<NodePtr> openSet; - openSet.push_back(start); - std::map<NodePtr, float> gScore; - gScore[start] = 0; - std::map<NodePtr, float> fScore; - fScore[start] = gScore[start] + heuristic(start, goal); - std::map<NodePtr, NodePtr> cameFrom; - cameFrom[goal] = start; //in case start==goal - - while (!openSet.empty()) { - float lowestScore = fScore[openSet[0]]; - std::vector<NodePtr>::iterator currentIT = openSet.begin(); - for (std::vector<NodePtr>::iterator it = openSet.begin() + 1; it != openSet.end(); it++) { - if (fScore[*it] < lowestScore) { - lowestScore = fScore[*it]; - currentIT = it; - } - } - NodePtr current = *currentIT; - if (current == goal) { - NodePtr cameFromNode = goal; - while (cameFromNode != start) { - path.push_front(cameFromNode); - cameFromNode = cameFrom[cameFromNode]; - } - path.push_front(start); - break; - } - openSet.erase(currentIT); - closedSet.push_back(current); - - for (size_t i = 0; i < current->successors.size(); i++) { - NodePtr neighbor = current->successors[i]; - if (std::find(closedSet.begin(), closedSet.end(), neighbor) != closedSet.end()) continue; - - float tentativeGScore = gScore[current] + heuristic(current, neighbor); - bool notInOS = std::find(openSet.begin(), openSet.end(), neighbor) == openSet.end(); - if (notInOS || tentativeGScore < gScore[neighbor]) { - cameFrom[neighbor] = current; - gScore[neighbor] = tentativeGScore; - fScore[neighbor] = tentativeGScore + heuristic(neighbor, goal); - if (notInOS) { - openSet.push_back(neighbor); - } - } - } - } - return path; - } -} - diff --git a/source/RobotAPI/statecharts/moveplatformtolandmark/MovePlatformToLandmark.h b/source/RobotAPI/statecharts/moveplatformtolandmark/MovePlatformToLandmark.h deleted file mode 100644 index b5bd933c4bf5dd4ffdb34b720eddba86675aacb0..0000000000000000000000000000000000000000 --- a/source/RobotAPI/statecharts/moveplatformtolandmark/MovePlatformToLandmark.h +++ /dev/null @@ -1,102 +0,0 @@ -/* -* This file is part of ArmarX. -* -* ArmarX is free software; you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* ArmarX 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 Lesser General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* @package RobotAPI::MovePlatformToLandmark -* @author Valerij Wittenbeck -* @date 2014 Valerij Wittenbeck -* @copyright http://www.gnu.org/licenses/gpl.txt -* GNU General Public License -*/ - -#ifndef ARMARX_COMPONENT_MOVE_PLATFORM_TO_LANDMARK_H -#define ARMARX_COMPONENT_MOVE_PLATFORM_TO_LANDMARK_H - -#include <RobotAPI/statecharts/MovePlatform/PlatformContext.h> -#include <Core/statechart/Statechart.h> - -/* -* This statechart is meant to bridge the gap between a user verbally specifying a target location (i.e. fridge, table, ...) -* and the robot knowing which points it needs to go to in order to reach that landmark. -* -* Ideally, there is some planning involved (graph retrieving/generating, path searching, etc), but this basic form only associates -* a landmark tag with a series of points that need to be traversed through without respect to the robot's current position. -*/ - -namespace armarx -{ - class MovePlatformToLandmarkStateChart : public RemoteStateOfferer<PlatformContext> - { - public: - void onInitRemoteStateOfferer(); - void onConnectRemoteStateOfferer(); - std::string getStateOffererName() const { return "MovePlatformToLandmarkStateChart"; } - }; - - // **************************************************************** - // Events - // **************************************************************** - - DEFINEEVENT(EvPathFound) - DEFINEEVENT(EvNoPathFound) - - // **************************************************************** - // Definition of StatechartMovePlatformToLandmark - // **************************************************************** - struct StatechartMovePlatformToLandmark : - StateTemplate<StatechartMovePlatformToLandmark> - { - void defineParameters(); - void defineSubstates(); - void onEnter(); - void onExit(); - }; - - // **************************************************************** - // Definition of StateCalculatePath - // **************************************************************** - /** - * StateCalculatePath: Calculate set of points for the robot to drive through - */ - - struct StateCalculatePath : - StateTemplate<StateCalculatePath> - { - struct Node { - std::string name; - std::vector<boost::shared_ptr<Node> > successors; - FramedVector3Ptr framedPos; - }; - typedef boost::shared_ptr<Node> NodePtr; - - void defineParameters(); - void onEnter(); - void onExit(); - - inline float getDist(float x1, float y1, float x2, float y2) { - const float dX = x1 - x2; - const float dY = y1 - y2; - return std::sqrt(dX * dX + dY * dY); - } - - std::list<NodePtr> aStar(NodePtr start, NodePtr goal); - inline float heuristic(NodePtr n1, NodePtr n2) { - return getDist(n1->framedPos->x, n1->framedPos->y, n2->framedPos->x, n2->framedPos->y); - } - }; - -} - -#endif