diff --git a/.github/workflows/flexbe_ci.yml b/.github/workflows/flexbe_ci.yml index d066c66..da63089 100644 --- a/.github/workflows/flexbe_ci.yml +++ b/.github/workflows/flexbe_ci.yml @@ -8,10 +8,14 @@ jobs: test: strategy: matrix: - ros: [rolling] + ros: [jazzy] #, rolling] include: + # - os: ubuntu-24.04 + # ros: rolling + # python: python3 + # ci_branch: ros2-devel - os: ubuntu-24.04 - ros: rolling + ros: jazzy python: python3 ci_branch: ros2-devel diff --git a/flexbe_core/flexbe_core/core/operatable_state.py b/flexbe_core/flexbe_core/core/operatable_state.py index 3b3970a..1fc9a01 100644 --- a/flexbe_core/flexbe_core/core/operatable_state.py +++ b/flexbe_core/flexbe_core/core/operatable_state.py @@ -85,7 +85,7 @@ def _operatable_execute(self, *args, **kwargs): # autonomy level is high enough, report the executed transition elif outcome is not None and outcome in self.outcomes: - Logger.localinfo(f"controlled State '{self.name}' from '{self.path}'permitting outcome '{outcome}' {self.__class__.__name__}") + # Logger.localinfo(f"controlled State '{self.name}' from '{self.path}'permitting outcome '{outcome}' {self.__class__.__name__}") self._force_transition = False return outcome @@ -101,8 +101,8 @@ def _publish_outcome(self, outcome): return outcome_index = self.outcomes.index(outcome) - Logger.localinfo('Publish outcome: State result: %s > %s (%d) (%d) (%s)' - % (self.name, outcome, outcome_index, self.state_id, self.__class__.__name__)) + # Logger.localinfo('Publish outcome: State result: %s > %s (%d) (%d) (%s)' + # % (self.name, outcome, outcome_index, self.state_id, self.__class__.__name__)) # 0 outcome status denotes no outcome, not index so add +1 for valid outcome (subtract in mirror) self._pub.publish(Topics._OUTCOME_TOPIC, UInt32(data=StateMap.hash(self, outcome_index))) self._pub.publish(Topics._DEBUG_TOPIC, String(data='%s > %s' % (self.path, outcome))) diff --git a/flexbe_core/test/test_core.py b/flexbe_core/test/test_core.py index 7ad2fe7..d73e3ab 100755 --- a/flexbe_core/test/test_core.py +++ b/flexbe_core/test/test_core.py @@ -117,8 +117,8 @@ class TestCore(unittest.TestCase): test = 0 - __TIME_SLEEP = 0.025 # Sleep time for loops - __EXECUTE_TIMEOUT_SEC = 0.025 # Timeout in executor loops for spin once + __EXECUTE_TIMEOUT_SEC = 0.2 # 0.025 # Timeout in executor loops for spin once + __TIME_SLEEP = 0.2 # 0.025 # Sleep time for loops __LOOP_COUNT = 50 # Number of times to execute loops for checking (total time ~ LOOP_COUNT*(TIME_SLEEP + TIMEOUT)) def __init__(self, *args, **kwargs): diff --git a/flexbe_core/test/test_exceptions.py b/flexbe_core/test/test_exceptions.py index e67417a..8a072e9 100755 --- a/flexbe_core/test/test_exceptions.py +++ b/flexbe_core/test/test_exceptions.py @@ -45,8 +45,8 @@ class TestExceptions(unittest.TestCase): """Test FlexBE Exception handling.""" test = 0 - __EXECUTE_TIMEOUT_SEC=0.025 - __TIME_SLEEP = 0.05 # Sleep time for loops + __EXECUTE_TIMEOUT_SEC = 0.2 # 0.025 # Timeout in executor loops for spin once + __TIME_SLEEP = 0.2 # 0.025 # Sleep time for loops def __init__(self, *args, **kwargs): """Initialize TestExceptions instance.""" diff --git a/flexbe_core/test/test_exceptions_spin.py b/flexbe_core/test/test_exceptions_spin.py index cc087f3..fca7b03 100644 --- a/flexbe_core/test/test_exceptions_spin.py +++ b/flexbe_core/test/test_exceptions_spin.py @@ -45,8 +45,8 @@ class TestExceptionsSpin(unittest.TestCase): """Test FlexBE Exception handling.""" test = 0 - __EXECUTE_TIMEOUT_SEC=0.025 - __TIME_SLEEP = 0.05 # Sleep time for loops + __EXECUTE_TIMEOUT_SEC = 0.2 # 0.025 # Timeout in executor loops for spin once + __TIME_SLEEP = 0.2 # 0.025 # Sleep time for loops def __init__(self, *args, **kwargs): """Initialize TestExceptionsSpin instance.""" diff --git a/flexbe_core/test/test_logger.py b/flexbe_core/test/test_logger.py index a3b14e5..630d023 100644 --- a/flexbe_core/test/test_logger.py +++ b/flexbe_core/test/test_logger.py @@ -45,8 +45,8 @@ class TestLogger(unittest.TestCase): """Test FlexBE Logger handling.""" test = 0 - __EXECUTE_TIMEOUT_SEC=0.025 - __TIME_SLEEP = 0.05 # Sleep time for loops + __EXECUTE_TIMEOUT_SEC = 0.2 # 0.025 # Timeout in executor loops for spin once + __TIME_SLEEP = 0.2 # 0.025 # Sleep time for loops def __init__(self, *args, **kwargs): """Initialize TestLogger instance.""" diff --git a/flexbe_core/test/test_proxies.py b/flexbe_core/test/test_proxies.py index 560e337..261191a 100755 --- a/flexbe_core/test/test_proxies.py +++ b/flexbe_core/test/test_proxies.py @@ -54,8 +54,8 @@ class TestProxies(unittest.TestCase): """Test the FlexBE proxies.""" test = 0 - __EXECUTE_TIMEOUT_SEC=0.025 - __TIME_SLEEP = 0.05 # Sleep time for loops + __EXECUTE_TIMEOUT_SEC = 0.2 # 0.025 # Timeout in executor loops for spin once + __TIME_SLEEP = 0.2 # 0.025 # Sleep time for loops def __init__(self, *args, **kwargs): """Initialize TestProxies instance.""" diff --git a/flexbe_onboard/tests/test_onboard.py b/flexbe_onboard/tests/test_onboard.py index 858b5b4..0370419 100755 --- a/flexbe_onboard/tests/test_onboard.py +++ b/flexbe_onboard/tests/test_onboard.py @@ -211,7 +211,7 @@ def test_onboard_behaviors(self): self.clear_extra_heartbeat_ready_messages() # send the same behavior with different parameters - self.node.get_logger().info('Republish modified behavior ...') + self.node.get_logger().info('\n\nRepublish modified behavior ...') request.arg_keys = ['param', 'invalid'] request.arg_values = ['value_1', 'should be ignored'] request.input_keys = [] @@ -224,7 +224,8 @@ def test_onboard_behaviors(self): behavior_logs = [] # Wait for published message - end_time = time.time() + 1 + self.node.get_logger().info('\n\nExecute modified behavior ...') + end_time = time.time() + 2 try: while time.time() < end_time: self.executor.spin_once(timeout_sec=0.1) @@ -237,6 +238,7 @@ def test_onboard_behaviors(self): self.executor.spin_once(timeout_sec=0.1) except Exception as exc: print(f'\x1b[91mException in executor: {exc}\x1b[0m') + self.node.get_logger().info(f'{behavior_logs}') self.assertIn('value_1', behavior_logs) self.node.get_logger().info('Done onboard testing!') self.executor.spin_once(timeout_sec=0.1)