Skip to content

Commit

Permalink
Merge pull request #891 from DLR-RM/develop
Browse files Browse the repository at this point in the history
Update to 2.1.3
  • Loading branch information
JohannesErnst authored Apr 19, 2024
2 parents fa5e54a + cc287ac commit 9b223de
Show file tree
Hide file tree
Showing 17 changed files with 52 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.1.2
current_version = 2.1.3

[bumpversion:glob:**/pyproject.toml]
search = version = "{current_version}" # Handled by bump2version
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ Changelog
Information about :ref:`RAFCON` changes in each release will be published here. More
details can be found in the `GIT commit log <https://github.com/DLR-RM/RAFCON/commits/master>`__.

2.1.3
""""""
- Bug fixes:
- Fixed AboutDialog logo image path
- Bringing back state editor guide lines
- Fixed issue that children states can be dragged out of parent states (same for state titles)
- Fixed issue where CTRL+Z in Source Editor or Description would undo twice instead of once
- Fixed cramped Linkage Overview widget (now properly displays the logical linkage)
- Fixes bug when trying to connect a data port outside of the parent state

- Miscellaneous:
- Updated docs text, configuration and layout for webpage

2.1.2
""""""
- Bug fixes:
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
cff-version: "1.2.0"
message: "If you use this software, please cite it using these metadata."
title: RAFCON
version: 2.1.2 # Handled by bump2version
date-released: 2024-03-05
version: 2.1.3 # Handled by bump2version
date-released: 2024-04-19
license: EPL-1.0
doi: "10.5281/zenodo.1493058"
authors:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.2
2.1.3
2 changes: 1 addition & 1 deletion doc/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ Subsequently, the events are forwarded via the ExecutionHistory
to the ConsumerManager. The ConsumerManager distributes the events to different Consumers.
RAFCON ships with a default Consumer called the FileSystemConsumer.
If FILE_SYSTEM_EXECUTION_HISTORY_ENABLE is enabled the FileSystemConsumer will write all history on disk into a shelve file.
The execution_log_viewer.py can then be used to analyze the execution history logs after untime.
The execution_log_viewer.py can then be used to analyze the execution history logs after runtime.

It is straightforward to create other consumers (e.g. for logging the execution-history via a middleware).
Therefore, a plugin can be created that just works similar to the FileSystemConsumer.
Expand Down
14 changes: 4 additions & 10 deletions doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ A typical config file looks like this:
"intermediate_level": "${RAFCON_LIB_PATH}/../examples/functionality_examples"
}
LIBRARY_RECOVERY_MODE: False
LOAD_SM_WITH_CHECKS: True
STORAGE_PATH_WITH_STATE_NAME: True
Expand All @@ -42,7 +43,6 @@ A typical config file looks like this:
EXECUTION_LOG_SET_READ_AND_WRITABLE_FOR_ALL: False
SCRIPT_RECOMPILATION_ON_STATE_EXECUTION: True
SCRIPT_COMPILE_ON_FILESYSTEM_LOAD: True
.. _core_config_docs:

Expand Down Expand Up @@ -100,13 +100,14 @@ NO\_PROGRAMMATIC\_CHANGE\_OF\_LIBRARY\_STATES\_PERFORMED
| Type: boolean
| Default: ``False``
| Set this to True if you can make sure that the interface of library states is not programmatically changed anywhere inside your state machines. This will speed up loading of libraries.
If you use template state machines that insert states during runtime, this must be disabled.
EXECUTION\_HISTORY\_ENABLE
IN\_MEMORY\_EXECUTION\_HISTORY\_ENABLE
| Type: boolean
| Default: ``True``
| Enables execution history. The execution history is required for backward execution and execution logging to the file system.
EXECUTION\_LOG\_ENABLE
FILE\_SYSTEM\_EXECUTION\_HISTORY\_ENABLE
| Type: boolean
| Default: ``True``
| Enables the logging of rafcon execution histories to the file system. Every time a statemachine is executed, a python shelve is created in the execution log directory, e.g. ``/tmp/rafcon_execution_logs/rafcon_execution_log_99-Bottles-of-Beer_2017-08-31-16-07-17.shelve``. Some helpful utility functions for working with log files through python are in: ``import rafcon.utils.execution_log``. A tiny tiny code snippet which shows how to use the pandas.DataFrame representation to query the outcomes of a state named ‘CheckFinished’ is here: ``https://rmc-github.robotic.dlr.de/common/rafcon/pull/324#issuecomment-2520``
Expand All @@ -128,13 +129,6 @@ SCRIPT\_RECOMPILATION\_ON\_STATE\_EXECUTION:
resetting all global variables. For reasons of backwards compatibility, the default value is ``True``. It is
recommended to set the value to ``False``, causing a recompilation only when the execution of a state machine is
newly started, which is a bit faster and allows to share data between consecutive state executions.
SCRIPT\_COMPILE\_ON\_FILESYSTEM\_LOAD:
| Type: boolean
| Default: ``True``
| If True, the script of an ``ExecutionState`` will be recompiled each time the state is loaded from file-system.
For faster loading times the setting can be changed to false.
Then, however, it might be the case that during runtime, script compilation error occur.
GUI Configuration
-----------------
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ Similarly, the ``path_to_state_machine`` must point to an already existing state
rafcon_start.pre_setup_plugins()
rafcon_start.setup_environment()
rafcon_start.setup_configuration("/home/user/.config/rafcon/config.yaml")
rafcon_global_config.set_config_value("EXECUTION_LOG_ENABLE", True)
rafcon_global_config.set_config_value("FILE_SYSTEM_EXECUTION_HISTORY_ENABLE", True)
print("Set and load state machine ... ")
path_to_state_machine = '/home/user/rafcon/source/rafcon/share/rafcon/examples/tutorials/99_bottles_of_beer/statemachine.json'
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "rafcon"
version = "2.1.2" # Handled by bump2version
version = "2.1.3" # Handled by bump2version
description = "Develop your robotic tasks with hierarchical state machines using an intuitive graphical user interface"
keywords = ["state machine", "robotic", "FSM", "development", "GUI", "visual programming"]
readme = "README.rst"
Expand Down
2 changes: 1 addition & 1 deletion source/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies = [
"jsonconversion<1.0.0,>=0.2.13",
]
name = "rafcon-core"
version = "2.1.2" # Handled by bump2version
version = "2.1.3" # Handled by bump2version
description = "Develop your robotic tasks with hierarchical state machines"
keywords = [
"state machine",
Expand Down
28 changes: 17 additions & 11 deletions source/rafcon/core/state_elements/data_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,23 @@ def __str__(self):
default_string = "Data flow - from_state: %s, from_key: %s, to_state: %s, to_key: %s, id: %s" % \
(self._from_state, self._from_key, self._to_state, self._to_key, self._data_flow_id)
if self.parent:
from_port = None
if self.from_state == self.parent.state_id:
from_port = self.parent.get_data_port_by_id(self.from_key)
else:
from_port = self.parent.states[self.from_state].get_data_port_by_id(self.from_key)

to_port = None
if self.to_state == self.parent.state_id:
to_port = self.parent.get_data_port_by_id(self.to_key)
else:
to_port = self.parent.states[self.to_state].get_data_port_by_id(self.to_key)
try:
from_port = None
if self.from_state == self.parent.state_id:
from_port = self.parent.get_data_port_by_id(self.from_key)
else:
from_port = self.parent.states[self.from_state].get_data_port_by_id(self.from_key)
except:
pass

try:
to_port = None
if self.to_state == self.parent.state_id:
to_port = self.parent.get_data_port_by_id(self.to_key)
else:
to_port = self.parent.states[self.to_state].get_data_port_by_id(self.to_key)
except:
pass

if from_port and to_port:
return "Data flow - from_state: %s, from_port_key: %s, from_port_name: %s, " \
Expand Down
2 changes: 1 addition & 1 deletion source/rafcon/core/state_elements/state_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def parent(self, parent):
raise RecoveryModeException("{0} invalid within state \"{1}\" (id {2}): {3}".format(
class_name, parent.name, parent.state_id, message), do_delete_item=do_delete_item)
else:
raise ValueError("{0} invalid within state \"{1}\" (id {2}): {3} {4}".format(
raise ValueError("{0} invalid within state \"{1}\" (id {2}): {3} for {4}".format(
class_name, parent.name, parent.state_id, message, self))

@property
Expand Down
2 changes: 2 additions & 0 deletions source/rafcon/gui/controllers/execution_ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
from rafcon.gui.controllers.utils.extended_controller import ExtendedController
from rafcon.gui.models.state_machine_execution_engine import StateMachineExecutionEngineModel

# noinspection PyUnresolvedReferences
from rafcon.gui.mygaphas import guide
import rafcon.gui.singleton

from rafcon.utils import log
Expand Down
2 changes: 2 additions & 0 deletions source/rafcon/gui/controllers/graphical_editor_gaphas.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
from rafcon.gui.models.signals import MetaSignalMsg
from rafcon.gui.models.state_machine import StateMachineModel
from rafcon.gui.mygaphas.canvas import MyCanvas
# noinspection PyUnresolvedReferences
from rafcon.gui.mygaphas import guide
from rafcon.gui.mygaphas.items.connection import DataFlowView, TransitionView
from rafcon.gui.mygaphas.items.ports import OutcomeView, DataPortView, ScopedVariablePortView
from rafcon.gui.mygaphas.items.state import StateView, NameView
Expand Down
4 changes: 2 additions & 2 deletions source/rafcon/gui/controllers/utils/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def _undo(self, *event, **kwargs):
if react_to_event(self.view, self.view.textview, event) and hasattr(buffer, 'can_undo') and buffer.can_undo():
logger.debug('Run undo on {}'.format(self.__class__.__name__))
return buffer.undo()
return False
return True

def _redo(self, *event, **kwargs):
if not self.view:
Expand All @@ -87,7 +87,7 @@ def _redo(self, *event, **kwargs):
if react_to_event(self.view, self.view.textview, event) and hasattr(buffer, 'can_redo') and buffer.can_redo():
logger.debug('Run redo on {}'.format(self.__class__.__name__))
return buffer.redo()
return False
return True

def _apply(self, *event, **kwargs):

Expand Down
2 changes: 1 addition & 1 deletion source/rafcon/gui/glade/linkage_overview_one.glade
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
Expand Down
2 changes: 1 addition & 1 deletion source/rafcon/share/themes/RAFCON/colors-dark.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
"NAME_RESIZE_HANDLE_BORDER": "#333",
"STATE_MACHINE_ACTIVE": "#39af57",
"STATE_MACHINE_NOT_ACTIVE": "#fefefe",
"GUIDE_COLOR": "#00f"
"GUIDE_COLOR": "#97a2ad"
}
2 changes: 1 addition & 1 deletion source/rafcon/share/themes/RAFCON/colors.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
"NAME_RESIZE_HANDLE_BORDER": "#333",
"STATE_MACHINE_ACTIVE": "#39af57",
"STATE_MACHINE_NOT_ACTIVE": "#fefefe",
"GUIDE_COLOR": "#00f"
"GUIDE_COLOR": "SELECTED_BG_COLOR"
}

0 comments on commit 9b223de

Please sign in to comment.