No version for distro humble showing jazzy. Known supported distros are highlighted in the buttons above.
Package symbol

sm_retry_logic_1 package from SMACC2 repo

smacc2 cl_foundation_pose cl_gcalcli cl_generic_sensor cl_http cl_keyboard cl_lifecycle_node cl_mission_tracker cl_modbus_tcp_relay cl_moveit2z cl_nav2z backward_global_planner backward_local_planner forward_global_planner forward_local_planner nav2z_planners_common pure_spinning_local_planner undo_path_global_planner cl_px4_mr cl_ros2_timer eg_conditional_generator eg_random_generator smacc2_msgs sm_atomic_performance_trace_1 sm_atomic_subscribers_performance_test sm_coretest_action_client_1 sm_coretest_callback_rate_1 sm_coretest_exceptions_1 sm_coretest_features_1 sm_coretest_forced_finish_1 sm_coretest_idle_load_1 sm_coretest_object_churn_1 sm_coretest_poll_shutdown_1 sm_coretest_post_during_exit_1 sm_coretest_reactor_order_1 sm_coretest_signal_key_1 sm_coretest_timer_handoff_1 sm_coretest_transition_speed_1 sm_advanced_recovery_1 sm_atomic sm_atomic_http sm_atomic_lifecycle sm_atomic_mode_states sm_branching sm_cl_gcalcli_test_1 sm_cl_keyboard_unit_test_1 sm_cl_px4_mr_test_1 sm_cl_px4_mr_test_2 sm_cl_px4_mr_test_3 sm_cl_px4_mr_test_4 sm_cl_px4_mr_test_5 sm_cl_ros2_timer_unit_test_1 sm_data_sharing_1 sm_data_sharing_2 sm_modbus_tcp_relay_test_1 sm_mode_state_behavior_1 sm_multi_stage_1 sm_multithread_test_1 sm_nav2_gazebo_test_1 sm_nav2_gazebo_test_2 sm_nav2_gazebo_test_3 sm_nav2_gazebo_test_4 sm_pack_ml sm_panda_cl_moveit2z_cb_inventory sm_panda_cl_moveit2z_cb_inventory_isaacsim sm_retry_logic_1 sm_simple_action_client sm_three_some sr_all_events_go sr_conditional sr_event_countdown

ROS Distro
jazzy

Package Summary

Version 3.1.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-20
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Demonstrates SrEventCountdown in a superstate: counts failures (timer timeouts and 'f' keypresses) across inner state transitions, with a 3-attempt retry limit.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_retry_logic_1

Demonstrates a state reactor (SrEventCountdown) defined in a superstate. The reactor counts failures across inner state transitions, implementing a 3-attempt retry limit before giving up. This pattern answers the question: can a parent state accumulate event history that persists while its inner states cycle? The answer is yes — and this machine shows how.

What it demonstrates

  • SrEventCountdown(3) lives in SsAttemptTask (a superstate), not in any leaf state.
  • The reactor counts timer timeouts and explicit ‘f’ keypresses as failures.
  • The failure count persists across StIdle ↔ StAttempting inner transitions — it is not reset when the inner states change.
  • After 3 total failures (any combination), the superstate transitions to StExhausted.
  • Pressing s at any point during an attempt — or while waiting in StIdle — transitions immediately to StSuccess.

State hierarchy

SmRetryLogic1
├── OrTimer    (ClRos2Timer)
└── OrKeyboard (ClKeyboard)

SmRetryLogic1
├── SsAttemptTask  ←  superstate; owns SrEventCountdown(3)
│   │              Reactor input events: EvTimer, EvKeyPressF
│   │              Reactor output event: EvCountdownEnd → StExhausted
│   │              Also reacts: EvKeyPressS → StSuccess
│   │
│   ├── StIdle       (initial)  — waiting for 'n' to start an attempt
│   └── StAttempting            — attempt in progress; 10s timeout
│
├── StSuccess    — reached by pressing 's' at any time
└── StExhausted  — reached after 3 total failures

Build

cd /home/brettpac/workspaces/isaac_ros-dev
colcon build --packages-select sm_retry_logic_1
source install/setup.bash

Launch

ros2 launch sm_retry_logic_1 sm_retry_logic_1.launch.py

This opens two konsole terminals: the state machine node and the keyboard server.

Keyboard controls

Key Effect Active in
n Start an attempt (StIdle → StAttempting) StIdle
f Manually fail the current attempt (StAttempting → StIdle, counts as 1 failure) StAttempting
s Succeed immediately (→ StSuccess) StIdle or StAttempting
(timer) 10-second timeout = auto-fail (StAttempting → StIdle, counts as 1 failure) StAttempting

Send keystrokes via ROS 2 topic (if not using the konsole keyboard server):

ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 110" --once  # n
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 102" --once  # f
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 115" --once  # s

Example walkthroughs

Reach StExhausted via 3 manual failures

Start → StIdle
  → press n → StAttempting
  → press f → StIdle          (failure count: 2 remaining)
  → press n → StAttempting
  → press f → StIdle          (failure count: 1 remaining)
  → press n → StAttempting
  → press f → StExhausted     (failure count: 0, EvCountdownEnd fires)

Reach StExhausted via 3 timer timeouts

Start → StIdle
  → press n → StAttempting → wait 10s → StIdle   (failure count: 2 remaining)
  → press n → StAttempting → wait 10s → StIdle   (failure count: 1 remaining)
  → press n → StAttempting → wait 10s → StExhausted

Reach StSuccess after 2 failures

``` Start → StIdle → press n → StAttempting → press f → StIdle (failure count: 2 remaining) → press n → StAttempting → press f → StIdle (failure count: 1 remaining) → press n → StAttempting

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_retry_logic_1 at Robotics Stack Exchange

Package symbol

sm_retry_logic_1 package from SMACC2 repo

smacc2 cl_foundation_pose cl_gcalcli cl_generic_sensor cl_http cl_keyboard cl_lifecycle_node cl_mission_tracker cl_modbus_tcp_relay cl_moveit2z cl_nav2z backward_global_planner backward_local_planner forward_global_planner forward_local_planner nav2z_planners_common pure_spinning_local_planner undo_path_global_planner cl_px4_mr cl_ros2_timer eg_conditional_generator eg_random_generator smacc2_msgs sm_atomic_performance_trace_1 sm_atomic_subscribers_performance_test sm_coretest_action_client_1 sm_coretest_callback_rate_1 sm_coretest_exceptions_1 sm_coretest_features_1 sm_coretest_forced_finish_1 sm_coretest_idle_load_1 sm_coretest_object_churn_1 sm_coretest_poll_shutdown_1 sm_coretest_post_during_exit_1 sm_coretest_reactor_order_1 sm_coretest_signal_key_1 sm_coretest_timer_handoff_1 sm_coretest_transition_speed_1 sm_advanced_recovery_1 sm_atomic sm_atomic_http sm_atomic_lifecycle sm_atomic_mode_states sm_branching sm_cl_gcalcli_test_1 sm_cl_keyboard_unit_test_1 sm_cl_px4_mr_test_1 sm_cl_px4_mr_test_2 sm_cl_px4_mr_test_3 sm_cl_px4_mr_test_4 sm_cl_px4_mr_test_5 sm_cl_ros2_timer_unit_test_1 sm_data_sharing_1 sm_data_sharing_2 sm_modbus_tcp_relay_test_1 sm_mode_state_behavior_1 sm_multi_stage_1 sm_multithread_test_1 sm_nav2_gazebo_test_1 sm_nav2_gazebo_test_2 sm_nav2_gazebo_test_3 sm_nav2_gazebo_test_4 sm_pack_ml sm_panda_cl_moveit2z_cb_inventory sm_panda_cl_moveit2z_cb_inventory_isaacsim sm_retry_logic_1 sm_simple_action_client sm_three_some sr_all_events_go sr_conditional sr_event_countdown

ROS Distro
jazzy

Package Summary

Version 3.1.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-20
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Demonstrates SrEventCountdown in a superstate: counts failures (timer timeouts and 'f' keypresses) across inner state transitions, with a 3-attempt retry limit.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_retry_logic_1

Demonstrates a state reactor (SrEventCountdown) defined in a superstate. The reactor counts failures across inner state transitions, implementing a 3-attempt retry limit before giving up. This pattern answers the question: can a parent state accumulate event history that persists while its inner states cycle? The answer is yes — and this machine shows how.

What it demonstrates

  • SrEventCountdown(3) lives in SsAttemptTask (a superstate), not in any leaf state.
  • The reactor counts timer timeouts and explicit ‘f’ keypresses as failures.
  • The failure count persists across StIdle ↔ StAttempting inner transitions — it is not reset when the inner states change.
  • After 3 total failures (any combination), the superstate transitions to StExhausted.
  • Pressing s at any point during an attempt — or while waiting in StIdle — transitions immediately to StSuccess.

State hierarchy

SmRetryLogic1
├── OrTimer    (ClRos2Timer)
└── OrKeyboard (ClKeyboard)

SmRetryLogic1
├── SsAttemptTask  ←  superstate; owns SrEventCountdown(3)
│   │              Reactor input events: EvTimer, EvKeyPressF
│   │              Reactor output event: EvCountdownEnd → StExhausted
│   │              Also reacts: EvKeyPressS → StSuccess
│   │
│   ├── StIdle       (initial)  — waiting for 'n' to start an attempt
│   └── StAttempting            — attempt in progress; 10s timeout
│
├── StSuccess    — reached by pressing 's' at any time
└── StExhausted  — reached after 3 total failures

Build

cd /home/brettpac/workspaces/isaac_ros-dev
colcon build --packages-select sm_retry_logic_1
source install/setup.bash

Launch

ros2 launch sm_retry_logic_1 sm_retry_logic_1.launch.py

This opens two konsole terminals: the state machine node and the keyboard server.

Keyboard controls

Key Effect Active in
n Start an attempt (StIdle → StAttempting) StIdle
f Manually fail the current attempt (StAttempting → StIdle, counts as 1 failure) StAttempting
s Succeed immediately (→ StSuccess) StIdle or StAttempting
(timer) 10-second timeout = auto-fail (StAttempting → StIdle, counts as 1 failure) StAttempting

Send keystrokes via ROS 2 topic (if not using the konsole keyboard server):

ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 110" --once  # n
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 102" --once  # f
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 115" --once  # s

Example walkthroughs

Reach StExhausted via 3 manual failures

Start → StIdle
  → press n → StAttempting
  → press f → StIdle          (failure count: 2 remaining)
  → press n → StAttempting
  → press f → StIdle          (failure count: 1 remaining)
  → press n → StAttempting
  → press f → StExhausted     (failure count: 0, EvCountdownEnd fires)

Reach StExhausted via 3 timer timeouts

Start → StIdle
  → press n → StAttempting → wait 10s → StIdle   (failure count: 2 remaining)
  → press n → StAttempting → wait 10s → StIdle   (failure count: 1 remaining)
  → press n → StAttempting → wait 10s → StExhausted

Reach StSuccess after 2 failures

``` Start → StIdle → press n → StAttempting → press f → StIdle (failure count: 2 remaining) → press n → StAttempting → press f → StIdle (failure count: 1 remaining) → press n → StAttempting

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_retry_logic_1 at Robotics Stack Exchange

No version for distro kilted showing jazzy. Known supported distros are highlighted in the buttons above.
Package symbol

sm_retry_logic_1 package from SMACC2 repo

smacc2 cl_foundation_pose cl_gcalcli cl_generic_sensor cl_http cl_keyboard cl_lifecycle_node cl_mission_tracker cl_modbus_tcp_relay cl_moveit2z cl_nav2z backward_global_planner backward_local_planner forward_global_planner forward_local_planner nav2z_planners_common pure_spinning_local_planner undo_path_global_planner cl_px4_mr cl_ros2_timer eg_conditional_generator eg_random_generator smacc2_msgs sm_atomic_performance_trace_1 sm_atomic_subscribers_performance_test sm_coretest_action_client_1 sm_coretest_callback_rate_1 sm_coretest_exceptions_1 sm_coretest_features_1 sm_coretest_forced_finish_1 sm_coretest_idle_load_1 sm_coretest_object_churn_1 sm_coretest_poll_shutdown_1 sm_coretest_post_during_exit_1 sm_coretest_reactor_order_1 sm_coretest_signal_key_1 sm_coretest_timer_handoff_1 sm_coretest_transition_speed_1 sm_advanced_recovery_1 sm_atomic sm_atomic_http sm_atomic_lifecycle sm_atomic_mode_states sm_branching sm_cl_gcalcli_test_1 sm_cl_keyboard_unit_test_1 sm_cl_px4_mr_test_1 sm_cl_px4_mr_test_2 sm_cl_px4_mr_test_3 sm_cl_px4_mr_test_4 sm_cl_px4_mr_test_5 sm_cl_ros2_timer_unit_test_1 sm_data_sharing_1 sm_data_sharing_2 sm_modbus_tcp_relay_test_1 sm_mode_state_behavior_1 sm_multi_stage_1 sm_multithread_test_1 sm_nav2_gazebo_test_1 sm_nav2_gazebo_test_2 sm_nav2_gazebo_test_3 sm_nav2_gazebo_test_4 sm_pack_ml sm_panda_cl_moveit2z_cb_inventory sm_panda_cl_moveit2z_cb_inventory_isaacsim sm_retry_logic_1 sm_simple_action_client sm_three_some sr_all_events_go sr_conditional sr_event_countdown

ROS Distro
jazzy

Package Summary

Version 3.1.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-20
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Demonstrates SrEventCountdown in a superstate: counts failures (timer timeouts and 'f' keypresses) across inner state transitions, with a 3-attempt retry limit.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_retry_logic_1

Demonstrates a state reactor (SrEventCountdown) defined in a superstate. The reactor counts failures across inner state transitions, implementing a 3-attempt retry limit before giving up. This pattern answers the question: can a parent state accumulate event history that persists while its inner states cycle? The answer is yes — and this machine shows how.

What it demonstrates

  • SrEventCountdown(3) lives in SsAttemptTask (a superstate), not in any leaf state.
  • The reactor counts timer timeouts and explicit ‘f’ keypresses as failures.
  • The failure count persists across StIdle ↔ StAttempting inner transitions — it is not reset when the inner states change.
  • After 3 total failures (any combination), the superstate transitions to StExhausted.
  • Pressing s at any point during an attempt — or while waiting in StIdle — transitions immediately to StSuccess.

State hierarchy

SmRetryLogic1
├── OrTimer    (ClRos2Timer)
└── OrKeyboard (ClKeyboard)

SmRetryLogic1
├── SsAttemptTask  ←  superstate; owns SrEventCountdown(3)
│   │              Reactor input events: EvTimer, EvKeyPressF
│   │              Reactor output event: EvCountdownEnd → StExhausted
│   │              Also reacts: EvKeyPressS → StSuccess
│   │
│   ├── StIdle       (initial)  — waiting for 'n' to start an attempt
│   └── StAttempting            — attempt in progress; 10s timeout
│
├── StSuccess    — reached by pressing 's' at any time
└── StExhausted  — reached after 3 total failures

Build

cd /home/brettpac/workspaces/isaac_ros-dev
colcon build --packages-select sm_retry_logic_1
source install/setup.bash

Launch

ros2 launch sm_retry_logic_1 sm_retry_logic_1.launch.py

This opens two konsole terminals: the state machine node and the keyboard server.

Keyboard controls

Key Effect Active in
n Start an attempt (StIdle → StAttempting) StIdle
f Manually fail the current attempt (StAttempting → StIdle, counts as 1 failure) StAttempting
s Succeed immediately (→ StSuccess) StIdle or StAttempting
(timer) 10-second timeout = auto-fail (StAttempting → StIdle, counts as 1 failure) StAttempting

Send keystrokes via ROS 2 topic (if not using the konsole keyboard server):

ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 110" --once  # n
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 102" --once  # f
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 115" --once  # s

Example walkthroughs

Reach StExhausted via 3 manual failures

Start → StIdle
  → press n → StAttempting
  → press f → StIdle          (failure count: 2 remaining)
  → press n → StAttempting
  → press f → StIdle          (failure count: 1 remaining)
  → press n → StAttempting
  → press f → StExhausted     (failure count: 0, EvCountdownEnd fires)

Reach StExhausted via 3 timer timeouts

Start → StIdle
  → press n → StAttempting → wait 10s → StIdle   (failure count: 2 remaining)
  → press n → StAttempting → wait 10s → StIdle   (failure count: 1 remaining)
  → press n → StAttempting → wait 10s → StExhausted

Reach StSuccess after 2 failures

``` Start → StIdle → press n → StAttempting → press f → StIdle (failure count: 2 remaining) → press n → StAttempting → press f → StIdle (failure count: 1 remaining) → press n → StAttempting

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_retry_logic_1 at Robotics Stack Exchange

No version for distro lyrical showing jazzy. Known supported distros are highlighted in the buttons above.
Package symbol

sm_retry_logic_1 package from SMACC2 repo

smacc2 cl_foundation_pose cl_gcalcli cl_generic_sensor cl_http cl_keyboard cl_lifecycle_node cl_mission_tracker cl_modbus_tcp_relay cl_moveit2z cl_nav2z backward_global_planner backward_local_planner forward_global_planner forward_local_planner nav2z_planners_common pure_spinning_local_planner undo_path_global_planner cl_px4_mr cl_ros2_timer eg_conditional_generator eg_random_generator smacc2_msgs sm_atomic_performance_trace_1 sm_atomic_subscribers_performance_test sm_coretest_action_client_1 sm_coretest_callback_rate_1 sm_coretest_exceptions_1 sm_coretest_features_1 sm_coretest_forced_finish_1 sm_coretest_idle_load_1 sm_coretest_object_churn_1 sm_coretest_poll_shutdown_1 sm_coretest_post_during_exit_1 sm_coretest_reactor_order_1 sm_coretest_signal_key_1 sm_coretest_timer_handoff_1 sm_coretest_transition_speed_1 sm_advanced_recovery_1 sm_atomic sm_atomic_http sm_atomic_lifecycle sm_atomic_mode_states sm_branching sm_cl_gcalcli_test_1 sm_cl_keyboard_unit_test_1 sm_cl_px4_mr_test_1 sm_cl_px4_mr_test_2 sm_cl_px4_mr_test_3 sm_cl_px4_mr_test_4 sm_cl_px4_mr_test_5 sm_cl_ros2_timer_unit_test_1 sm_data_sharing_1 sm_data_sharing_2 sm_modbus_tcp_relay_test_1 sm_mode_state_behavior_1 sm_multi_stage_1 sm_multithread_test_1 sm_nav2_gazebo_test_1 sm_nav2_gazebo_test_2 sm_nav2_gazebo_test_3 sm_nav2_gazebo_test_4 sm_pack_ml sm_panda_cl_moveit2z_cb_inventory sm_panda_cl_moveit2z_cb_inventory_isaacsim sm_retry_logic_1 sm_simple_action_client sm_three_some sr_all_events_go sr_conditional sr_event_countdown

ROS Distro
jazzy

Package Summary

Version 3.1.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-20
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Demonstrates SrEventCountdown in a superstate: counts failures (timer timeouts and 'f' keypresses) across inner state transitions, with a 3-attempt retry limit.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_retry_logic_1

Demonstrates a state reactor (SrEventCountdown) defined in a superstate. The reactor counts failures across inner state transitions, implementing a 3-attempt retry limit before giving up. This pattern answers the question: can a parent state accumulate event history that persists while its inner states cycle? The answer is yes — and this machine shows how.

What it demonstrates

  • SrEventCountdown(3) lives in SsAttemptTask (a superstate), not in any leaf state.
  • The reactor counts timer timeouts and explicit ‘f’ keypresses as failures.
  • The failure count persists across StIdle ↔ StAttempting inner transitions — it is not reset when the inner states change.
  • After 3 total failures (any combination), the superstate transitions to StExhausted.
  • Pressing s at any point during an attempt — or while waiting in StIdle — transitions immediately to StSuccess.

State hierarchy

SmRetryLogic1
├── OrTimer    (ClRos2Timer)
└── OrKeyboard (ClKeyboard)

SmRetryLogic1
├── SsAttemptTask  ←  superstate; owns SrEventCountdown(3)
│   │              Reactor input events: EvTimer, EvKeyPressF
│   │              Reactor output event: EvCountdownEnd → StExhausted
│   │              Also reacts: EvKeyPressS → StSuccess
│   │
│   ├── StIdle       (initial)  — waiting for 'n' to start an attempt
│   └── StAttempting            — attempt in progress; 10s timeout
│
├── StSuccess    — reached by pressing 's' at any time
└── StExhausted  — reached after 3 total failures

Build

cd /home/brettpac/workspaces/isaac_ros-dev
colcon build --packages-select sm_retry_logic_1
source install/setup.bash

Launch

ros2 launch sm_retry_logic_1 sm_retry_logic_1.launch.py

This opens two konsole terminals: the state machine node and the keyboard server.

Keyboard controls

Key Effect Active in
n Start an attempt (StIdle → StAttempting) StIdle
f Manually fail the current attempt (StAttempting → StIdle, counts as 1 failure) StAttempting
s Succeed immediately (→ StSuccess) StIdle or StAttempting
(timer) 10-second timeout = auto-fail (StAttempting → StIdle, counts as 1 failure) StAttempting

Send keystrokes via ROS 2 topic (if not using the konsole keyboard server):

ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 110" --once  # n
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 102" --once  # f
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 115" --once  # s

Example walkthroughs

Reach StExhausted via 3 manual failures

Start → StIdle
  → press n → StAttempting
  → press f → StIdle          (failure count: 2 remaining)
  → press n → StAttempting
  → press f → StIdle          (failure count: 1 remaining)
  → press n → StAttempting
  → press f → StExhausted     (failure count: 0, EvCountdownEnd fires)

Reach StExhausted via 3 timer timeouts

Start → StIdle
  → press n → StAttempting → wait 10s → StIdle   (failure count: 2 remaining)
  → press n → StAttempting → wait 10s → StIdle   (failure count: 1 remaining)
  → press n → StAttempting → wait 10s → StExhausted

Reach StSuccess after 2 failures

``` Start → StIdle → press n → StAttempting → press f → StIdle (failure count: 2 remaining) → press n → StAttempting → press f → StIdle (failure count: 1 remaining) → press n → StAttempting

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_retry_logic_1 at Robotics Stack Exchange

No version for distro rolling showing jazzy. Known supported distros are highlighted in the buttons above.
Package symbol

sm_retry_logic_1 package from SMACC2 repo

smacc2 cl_foundation_pose cl_gcalcli cl_generic_sensor cl_http cl_keyboard cl_lifecycle_node cl_mission_tracker cl_modbus_tcp_relay cl_moveit2z cl_nav2z backward_global_planner backward_local_planner forward_global_planner forward_local_planner nav2z_planners_common pure_spinning_local_planner undo_path_global_planner cl_px4_mr cl_ros2_timer eg_conditional_generator eg_random_generator smacc2_msgs sm_atomic_performance_trace_1 sm_atomic_subscribers_performance_test sm_coretest_action_client_1 sm_coretest_callback_rate_1 sm_coretest_exceptions_1 sm_coretest_features_1 sm_coretest_forced_finish_1 sm_coretest_idle_load_1 sm_coretest_object_churn_1 sm_coretest_poll_shutdown_1 sm_coretest_post_during_exit_1 sm_coretest_reactor_order_1 sm_coretest_signal_key_1 sm_coretest_timer_handoff_1 sm_coretest_transition_speed_1 sm_advanced_recovery_1 sm_atomic sm_atomic_http sm_atomic_lifecycle sm_atomic_mode_states sm_branching sm_cl_gcalcli_test_1 sm_cl_keyboard_unit_test_1 sm_cl_px4_mr_test_1 sm_cl_px4_mr_test_2 sm_cl_px4_mr_test_3 sm_cl_px4_mr_test_4 sm_cl_px4_mr_test_5 sm_cl_ros2_timer_unit_test_1 sm_data_sharing_1 sm_data_sharing_2 sm_modbus_tcp_relay_test_1 sm_mode_state_behavior_1 sm_multi_stage_1 sm_multithread_test_1 sm_nav2_gazebo_test_1 sm_nav2_gazebo_test_2 sm_nav2_gazebo_test_3 sm_nav2_gazebo_test_4 sm_pack_ml sm_panda_cl_moveit2z_cb_inventory sm_panda_cl_moveit2z_cb_inventory_isaacsim sm_retry_logic_1 sm_simple_action_client sm_three_some sr_all_events_go sr_conditional sr_event_countdown

ROS Distro
jazzy

Package Summary

Version 3.1.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-20
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Demonstrates SrEventCountdown in a superstate: counts failures (timer timeouts and 'f' keypresses) across inner state transitions, with a 3-attempt retry limit.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_retry_logic_1

Demonstrates a state reactor (SrEventCountdown) defined in a superstate. The reactor counts failures across inner state transitions, implementing a 3-attempt retry limit before giving up. This pattern answers the question: can a parent state accumulate event history that persists while its inner states cycle? The answer is yes — and this machine shows how.

What it demonstrates

  • SrEventCountdown(3) lives in SsAttemptTask (a superstate), not in any leaf state.
  • The reactor counts timer timeouts and explicit ‘f’ keypresses as failures.
  • The failure count persists across StIdle ↔ StAttempting inner transitions — it is not reset when the inner states change.
  • After 3 total failures (any combination), the superstate transitions to StExhausted.
  • Pressing s at any point during an attempt — or while waiting in StIdle — transitions immediately to StSuccess.

State hierarchy

SmRetryLogic1
├── OrTimer    (ClRos2Timer)
└── OrKeyboard (ClKeyboard)

SmRetryLogic1
├── SsAttemptTask  ←  superstate; owns SrEventCountdown(3)
│   │              Reactor input events: EvTimer, EvKeyPressF
│   │              Reactor output event: EvCountdownEnd → StExhausted
│   │              Also reacts: EvKeyPressS → StSuccess
│   │
│   ├── StIdle       (initial)  — waiting for 'n' to start an attempt
│   └── StAttempting            — attempt in progress; 10s timeout
│
├── StSuccess    — reached by pressing 's' at any time
└── StExhausted  — reached after 3 total failures

Build

cd /home/brettpac/workspaces/isaac_ros-dev
colcon build --packages-select sm_retry_logic_1
source install/setup.bash

Launch

ros2 launch sm_retry_logic_1 sm_retry_logic_1.launch.py

This opens two konsole terminals: the state machine node and the keyboard server.

Keyboard controls

Key Effect Active in
n Start an attempt (StIdle → StAttempting) StIdle
f Manually fail the current attempt (StAttempting → StIdle, counts as 1 failure) StAttempting
s Succeed immediately (→ StSuccess) StIdle or StAttempting
(timer) 10-second timeout = auto-fail (StAttempting → StIdle, counts as 1 failure) StAttempting

Send keystrokes via ROS 2 topic (if not using the konsole keyboard server):

ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 110" --once  # n
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 102" --once  # f
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 115" --once  # s

Example walkthroughs

Reach StExhausted via 3 manual failures

Start → StIdle
  → press n → StAttempting
  → press f → StIdle          (failure count: 2 remaining)
  → press n → StAttempting
  → press f → StIdle          (failure count: 1 remaining)
  → press n → StAttempting
  → press f → StExhausted     (failure count: 0, EvCountdownEnd fires)

Reach StExhausted via 3 timer timeouts

Start → StIdle
  → press n → StAttempting → wait 10s → StIdle   (failure count: 2 remaining)
  → press n → StAttempting → wait 10s → StIdle   (failure count: 1 remaining)
  → press n → StAttempting → wait 10s → StExhausted

Reach StSuccess after 2 failures

``` Start → StIdle → press n → StAttempting → press f → StIdle (failure count: 2 remaining) → press n → StAttempting → press f → StIdle (failure count: 1 remaining) → press n → StAttempting

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_retry_logic_1 at Robotics Stack Exchange

No version for distro github showing jazzy. Known supported distros are highlighted in the buttons above.
Package symbol

sm_retry_logic_1 package from SMACC2 repo

smacc2 cl_foundation_pose cl_gcalcli cl_generic_sensor cl_http cl_keyboard cl_lifecycle_node cl_mission_tracker cl_modbus_tcp_relay cl_moveit2z cl_nav2z backward_global_planner backward_local_planner forward_global_planner forward_local_planner nav2z_planners_common pure_spinning_local_planner undo_path_global_planner cl_px4_mr cl_ros2_timer eg_conditional_generator eg_random_generator smacc2_msgs sm_atomic_performance_trace_1 sm_atomic_subscribers_performance_test sm_coretest_action_client_1 sm_coretest_callback_rate_1 sm_coretest_exceptions_1 sm_coretest_features_1 sm_coretest_forced_finish_1 sm_coretest_idle_load_1 sm_coretest_object_churn_1 sm_coretest_poll_shutdown_1 sm_coretest_post_during_exit_1 sm_coretest_reactor_order_1 sm_coretest_signal_key_1 sm_coretest_timer_handoff_1 sm_coretest_transition_speed_1 sm_advanced_recovery_1 sm_atomic sm_atomic_http sm_atomic_lifecycle sm_atomic_mode_states sm_branching sm_cl_gcalcli_test_1 sm_cl_keyboard_unit_test_1 sm_cl_px4_mr_test_1 sm_cl_px4_mr_test_2 sm_cl_px4_mr_test_3 sm_cl_px4_mr_test_4 sm_cl_px4_mr_test_5 sm_cl_ros2_timer_unit_test_1 sm_data_sharing_1 sm_data_sharing_2 sm_modbus_tcp_relay_test_1 sm_mode_state_behavior_1 sm_multi_stage_1 sm_multithread_test_1 sm_nav2_gazebo_test_1 sm_nav2_gazebo_test_2 sm_nav2_gazebo_test_3 sm_nav2_gazebo_test_4 sm_pack_ml sm_panda_cl_moveit2z_cb_inventory sm_panda_cl_moveit2z_cb_inventory_isaacsim sm_retry_logic_1 sm_simple_action_client sm_three_some sr_all_events_go sr_conditional sr_event_countdown

ROS Distro
jazzy

Package Summary

Version 3.1.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-20
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Demonstrates SrEventCountdown in a superstate: counts failures (timer timeouts and 'f' keypresses) across inner state transitions, with a 3-attempt retry limit.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_retry_logic_1

Demonstrates a state reactor (SrEventCountdown) defined in a superstate. The reactor counts failures across inner state transitions, implementing a 3-attempt retry limit before giving up. This pattern answers the question: can a parent state accumulate event history that persists while its inner states cycle? The answer is yes — and this machine shows how.

What it demonstrates

  • SrEventCountdown(3) lives in SsAttemptTask (a superstate), not in any leaf state.
  • The reactor counts timer timeouts and explicit ‘f’ keypresses as failures.
  • The failure count persists across StIdle ↔ StAttempting inner transitions — it is not reset when the inner states change.
  • After 3 total failures (any combination), the superstate transitions to StExhausted.
  • Pressing s at any point during an attempt — or while waiting in StIdle — transitions immediately to StSuccess.

State hierarchy

SmRetryLogic1
├── OrTimer    (ClRos2Timer)
└── OrKeyboard (ClKeyboard)

SmRetryLogic1
├── SsAttemptTask  ←  superstate; owns SrEventCountdown(3)
│   │              Reactor input events: EvTimer, EvKeyPressF
│   │              Reactor output event: EvCountdownEnd → StExhausted
│   │              Also reacts: EvKeyPressS → StSuccess
│   │
│   ├── StIdle       (initial)  — waiting for 'n' to start an attempt
│   └── StAttempting            — attempt in progress; 10s timeout
│
├── StSuccess    — reached by pressing 's' at any time
└── StExhausted  — reached after 3 total failures

Build

cd /home/brettpac/workspaces/isaac_ros-dev
colcon build --packages-select sm_retry_logic_1
source install/setup.bash

Launch

ros2 launch sm_retry_logic_1 sm_retry_logic_1.launch.py

This opens two konsole terminals: the state machine node and the keyboard server.

Keyboard controls

Key Effect Active in
n Start an attempt (StIdle → StAttempting) StIdle
f Manually fail the current attempt (StAttempting → StIdle, counts as 1 failure) StAttempting
s Succeed immediately (→ StSuccess) StIdle or StAttempting
(timer) 10-second timeout = auto-fail (StAttempting → StIdle, counts as 1 failure) StAttempting

Send keystrokes via ROS 2 topic (if not using the konsole keyboard server):

ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 110" --once  # n
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 102" --once  # f
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 115" --once  # s

Example walkthroughs

Reach StExhausted via 3 manual failures

Start → StIdle
  → press n → StAttempting
  → press f → StIdle          (failure count: 2 remaining)
  → press n → StAttempting
  → press f → StIdle          (failure count: 1 remaining)
  → press n → StAttempting
  → press f → StExhausted     (failure count: 0, EvCountdownEnd fires)

Reach StExhausted via 3 timer timeouts

Start → StIdle
  → press n → StAttempting → wait 10s → StIdle   (failure count: 2 remaining)
  → press n → StAttempting → wait 10s → StIdle   (failure count: 1 remaining)
  → press n → StAttempting → wait 10s → StExhausted

Reach StSuccess after 2 failures

``` Start → StIdle → press n → StAttempting → press f → StIdle (failure count: 2 remaining) → press n → StAttempting → press f → StIdle (failure count: 1 remaining) → press n → StAttempting

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_retry_logic_1 at Robotics Stack Exchange

No version for distro galactic showing jazzy. Known supported distros are highlighted in the buttons above.
Package symbol

sm_retry_logic_1 package from SMACC2 repo

smacc2 cl_foundation_pose cl_gcalcli cl_generic_sensor cl_http cl_keyboard cl_lifecycle_node cl_mission_tracker cl_modbus_tcp_relay cl_moveit2z cl_nav2z backward_global_planner backward_local_planner forward_global_planner forward_local_planner nav2z_planners_common pure_spinning_local_planner undo_path_global_planner cl_px4_mr cl_ros2_timer eg_conditional_generator eg_random_generator smacc2_msgs sm_atomic_performance_trace_1 sm_atomic_subscribers_performance_test sm_coretest_action_client_1 sm_coretest_callback_rate_1 sm_coretest_exceptions_1 sm_coretest_features_1 sm_coretest_forced_finish_1 sm_coretest_idle_load_1 sm_coretest_object_churn_1 sm_coretest_poll_shutdown_1 sm_coretest_post_during_exit_1 sm_coretest_reactor_order_1 sm_coretest_signal_key_1 sm_coretest_timer_handoff_1 sm_coretest_transition_speed_1 sm_advanced_recovery_1 sm_atomic sm_atomic_http sm_atomic_lifecycle sm_atomic_mode_states sm_branching sm_cl_gcalcli_test_1 sm_cl_keyboard_unit_test_1 sm_cl_px4_mr_test_1 sm_cl_px4_mr_test_2 sm_cl_px4_mr_test_3 sm_cl_px4_mr_test_4 sm_cl_px4_mr_test_5 sm_cl_ros2_timer_unit_test_1 sm_data_sharing_1 sm_data_sharing_2 sm_modbus_tcp_relay_test_1 sm_mode_state_behavior_1 sm_multi_stage_1 sm_multithread_test_1 sm_nav2_gazebo_test_1 sm_nav2_gazebo_test_2 sm_nav2_gazebo_test_3 sm_nav2_gazebo_test_4 sm_pack_ml sm_panda_cl_moveit2z_cb_inventory sm_panda_cl_moveit2z_cb_inventory_isaacsim sm_retry_logic_1 sm_simple_action_client sm_three_some sr_all_events_go sr_conditional sr_event_countdown

ROS Distro
jazzy

Package Summary

Version 3.1.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-20
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Demonstrates SrEventCountdown in a superstate: counts failures (timer timeouts and 'f' keypresses) across inner state transitions, with a 3-attempt retry limit.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_retry_logic_1

Demonstrates a state reactor (SrEventCountdown) defined in a superstate. The reactor counts failures across inner state transitions, implementing a 3-attempt retry limit before giving up. This pattern answers the question: can a parent state accumulate event history that persists while its inner states cycle? The answer is yes — and this machine shows how.

What it demonstrates

  • SrEventCountdown(3) lives in SsAttemptTask (a superstate), not in any leaf state.
  • The reactor counts timer timeouts and explicit ‘f’ keypresses as failures.
  • The failure count persists across StIdle ↔ StAttempting inner transitions — it is not reset when the inner states change.
  • After 3 total failures (any combination), the superstate transitions to StExhausted.
  • Pressing s at any point during an attempt — or while waiting in StIdle — transitions immediately to StSuccess.

State hierarchy

SmRetryLogic1
├── OrTimer    (ClRos2Timer)
└── OrKeyboard (ClKeyboard)

SmRetryLogic1
├── SsAttemptTask  ←  superstate; owns SrEventCountdown(3)
│   │              Reactor input events: EvTimer, EvKeyPressF
│   │              Reactor output event: EvCountdownEnd → StExhausted
│   │              Also reacts: EvKeyPressS → StSuccess
│   │
│   ├── StIdle       (initial)  — waiting for 'n' to start an attempt
│   └── StAttempting            — attempt in progress; 10s timeout
│
├── StSuccess    — reached by pressing 's' at any time
└── StExhausted  — reached after 3 total failures

Build

cd /home/brettpac/workspaces/isaac_ros-dev
colcon build --packages-select sm_retry_logic_1
source install/setup.bash

Launch

ros2 launch sm_retry_logic_1 sm_retry_logic_1.launch.py

This opens two konsole terminals: the state machine node and the keyboard server.

Keyboard controls

Key Effect Active in
n Start an attempt (StIdle → StAttempting) StIdle
f Manually fail the current attempt (StAttempting → StIdle, counts as 1 failure) StAttempting
s Succeed immediately (→ StSuccess) StIdle or StAttempting
(timer) 10-second timeout = auto-fail (StAttempting → StIdle, counts as 1 failure) StAttempting

Send keystrokes via ROS 2 topic (if not using the konsole keyboard server):

ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 110" --once  # n
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 102" --once  # f
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 115" --once  # s

Example walkthroughs

Reach StExhausted via 3 manual failures

Start → StIdle
  → press n → StAttempting
  → press f → StIdle          (failure count: 2 remaining)
  → press n → StAttempting
  → press f → StIdle          (failure count: 1 remaining)
  → press n → StAttempting
  → press f → StExhausted     (failure count: 0, EvCountdownEnd fires)

Reach StExhausted via 3 timer timeouts

Start → StIdle
  → press n → StAttempting → wait 10s → StIdle   (failure count: 2 remaining)
  → press n → StAttempting → wait 10s → StIdle   (failure count: 1 remaining)
  → press n → StAttempting → wait 10s → StExhausted

Reach StSuccess after 2 failures

``` Start → StIdle → press n → StAttempting → press f → StIdle (failure count: 2 remaining) → press n → StAttempting → press f → StIdle (failure count: 1 remaining) → press n → StAttempting

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_retry_logic_1 at Robotics Stack Exchange

No version for distro iron showing jazzy. Known supported distros are highlighted in the buttons above.
Package symbol

sm_retry_logic_1 package from SMACC2 repo

smacc2 cl_foundation_pose cl_gcalcli cl_generic_sensor cl_http cl_keyboard cl_lifecycle_node cl_mission_tracker cl_modbus_tcp_relay cl_moveit2z cl_nav2z backward_global_planner backward_local_planner forward_global_planner forward_local_planner nav2z_planners_common pure_spinning_local_planner undo_path_global_planner cl_px4_mr cl_ros2_timer eg_conditional_generator eg_random_generator smacc2_msgs sm_atomic_performance_trace_1 sm_atomic_subscribers_performance_test sm_coretest_action_client_1 sm_coretest_callback_rate_1 sm_coretest_exceptions_1 sm_coretest_features_1 sm_coretest_forced_finish_1 sm_coretest_idle_load_1 sm_coretest_object_churn_1 sm_coretest_poll_shutdown_1 sm_coretest_post_during_exit_1 sm_coretest_reactor_order_1 sm_coretest_signal_key_1 sm_coretest_timer_handoff_1 sm_coretest_transition_speed_1 sm_advanced_recovery_1 sm_atomic sm_atomic_http sm_atomic_lifecycle sm_atomic_mode_states sm_branching sm_cl_gcalcli_test_1 sm_cl_keyboard_unit_test_1 sm_cl_px4_mr_test_1 sm_cl_px4_mr_test_2 sm_cl_px4_mr_test_3 sm_cl_px4_mr_test_4 sm_cl_px4_mr_test_5 sm_cl_ros2_timer_unit_test_1 sm_data_sharing_1 sm_data_sharing_2 sm_modbus_tcp_relay_test_1 sm_mode_state_behavior_1 sm_multi_stage_1 sm_multithread_test_1 sm_nav2_gazebo_test_1 sm_nav2_gazebo_test_2 sm_nav2_gazebo_test_3 sm_nav2_gazebo_test_4 sm_pack_ml sm_panda_cl_moveit2z_cb_inventory sm_panda_cl_moveit2z_cb_inventory_isaacsim sm_retry_logic_1 sm_simple_action_client sm_three_some sr_all_events_go sr_conditional sr_event_countdown

ROS Distro
jazzy

Package Summary

Version 3.1.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-20
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Demonstrates SrEventCountdown in a superstate: counts failures (timer timeouts and 'f' keypresses) across inner state transitions, with a 3-attempt retry limit.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_retry_logic_1

Demonstrates a state reactor (SrEventCountdown) defined in a superstate. The reactor counts failures across inner state transitions, implementing a 3-attempt retry limit before giving up. This pattern answers the question: can a parent state accumulate event history that persists while its inner states cycle? The answer is yes — and this machine shows how.

What it demonstrates

  • SrEventCountdown(3) lives in SsAttemptTask (a superstate), not in any leaf state.
  • The reactor counts timer timeouts and explicit ‘f’ keypresses as failures.
  • The failure count persists across StIdle ↔ StAttempting inner transitions — it is not reset when the inner states change.
  • After 3 total failures (any combination), the superstate transitions to StExhausted.
  • Pressing s at any point during an attempt — or while waiting in StIdle — transitions immediately to StSuccess.

State hierarchy

SmRetryLogic1
├── OrTimer    (ClRos2Timer)
└── OrKeyboard (ClKeyboard)

SmRetryLogic1
├── SsAttemptTask  ←  superstate; owns SrEventCountdown(3)
│   │              Reactor input events: EvTimer, EvKeyPressF
│   │              Reactor output event: EvCountdownEnd → StExhausted
│   │              Also reacts: EvKeyPressS → StSuccess
│   │
│   ├── StIdle       (initial)  — waiting for 'n' to start an attempt
│   └── StAttempting            — attempt in progress; 10s timeout
│
├── StSuccess    — reached by pressing 's' at any time
└── StExhausted  — reached after 3 total failures

Build

cd /home/brettpac/workspaces/isaac_ros-dev
colcon build --packages-select sm_retry_logic_1
source install/setup.bash

Launch

ros2 launch sm_retry_logic_1 sm_retry_logic_1.launch.py

This opens two konsole terminals: the state machine node and the keyboard server.

Keyboard controls

Key Effect Active in
n Start an attempt (StIdle → StAttempting) StIdle
f Manually fail the current attempt (StAttempting → StIdle, counts as 1 failure) StAttempting
s Succeed immediately (→ StSuccess) StIdle or StAttempting
(timer) 10-second timeout = auto-fail (StAttempting → StIdle, counts as 1 failure) StAttempting

Send keystrokes via ROS 2 topic (if not using the konsole keyboard server):

ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 110" --once  # n
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 102" --once  # f
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 115" --once  # s

Example walkthroughs

Reach StExhausted via 3 manual failures

Start → StIdle
  → press n → StAttempting
  → press f → StIdle          (failure count: 2 remaining)
  → press n → StAttempting
  → press f → StIdle          (failure count: 1 remaining)
  → press n → StAttempting
  → press f → StExhausted     (failure count: 0, EvCountdownEnd fires)

Reach StExhausted via 3 timer timeouts

Start → StIdle
  → press n → StAttempting → wait 10s → StIdle   (failure count: 2 remaining)
  → press n → StAttempting → wait 10s → StIdle   (failure count: 1 remaining)
  → press n → StAttempting → wait 10s → StExhausted

Reach StSuccess after 2 failures

``` Start → StIdle → press n → StAttempting → press f → StIdle (failure count: 2 remaining) → press n → StAttempting → press f → StIdle (failure count: 1 remaining) → press n → StAttempting

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_retry_logic_1 at Robotics Stack Exchange

No version for distro melodic showing jazzy. Known supported distros are highlighted in the buttons above.
Package symbol

sm_retry_logic_1 package from SMACC2 repo

smacc2 cl_foundation_pose cl_gcalcli cl_generic_sensor cl_http cl_keyboard cl_lifecycle_node cl_mission_tracker cl_modbus_tcp_relay cl_moveit2z cl_nav2z backward_global_planner backward_local_planner forward_global_planner forward_local_planner nav2z_planners_common pure_spinning_local_planner undo_path_global_planner cl_px4_mr cl_ros2_timer eg_conditional_generator eg_random_generator smacc2_msgs sm_atomic_performance_trace_1 sm_atomic_subscribers_performance_test sm_coretest_action_client_1 sm_coretest_callback_rate_1 sm_coretest_exceptions_1 sm_coretest_features_1 sm_coretest_forced_finish_1 sm_coretest_idle_load_1 sm_coretest_object_churn_1 sm_coretest_poll_shutdown_1 sm_coretest_post_during_exit_1 sm_coretest_reactor_order_1 sm_coretest_signal_key_1 sm_coretest_timer_handoff_1 sm_coretest_transition_speed_1 sm_advanced_recovery_1 sm_atomic sm_atomic_http sm_atomic_lifecycle sm_atomic_mode_states sm_branching sm_cl_gcalcli_test_1 sm_cl_keyboard_unit_test_1 sm_cl_px4_mr_test_1 sm_cl_px4_mr_test_2 sm_cl_px4_mr_test_3 sm_cl_px4_mr_test_4 sm_cl_px4_mr_test_5 sm_cl_ros2_timer_unit_test_1 sm_data_sharing_1 sm_data_sharing_2 sm_modbus_tcp_relay_test_1 sm_mode_state_behavior_1 sm_multi_stage_1 sm_multithread_test_1 sm_nav2_gazebo_test_1 sm_nav2_gazebo_test_2 sm_nav2_gazebo_test_3 sm_nav2_gazebo_test_4 sm_pack_ml sm_panda_cl_moveit2z_cb_inventory sm_panda_cl_moveit2z_cb_inventory_isaacsim sm_retry_logic_1 sm_simple_action_client sm_three_some sr_all_events_go sr_conditional sr_event_countdown

ROS Distro
jazzy

Package Summary

Version 3.1.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-20
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Demonstrates SrEventCountdown in a superstate: counts failures (timer timeouts and 'f' keypresses) across inner state transitions, with a 3-attempt retry limit.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_retry_logic_1

Demonstrates a state reactor (SrEventCountdown) defined in a superstate. The reactor counts failures across inner state transitions, implementing a 3-attempt retry limit before giving up. This pattern answers the question: can a parent state accumulate event history that persists while its inner states cycle? The answer is yes — and this machine shows how.

What it demonstrates

  • SrEventCountdown(3) lives in SsAttemptTask (a superstate), not in any leaf state.
  • The reactor counts timer timeouts and explicit ‘f’ keypresses as failures.
  • The failure count persists across StIdle ↔ StAttempting inner transitions — it is not reset when the inner states change.
  • After 3 total failures (any combination), the superstate transitions to StExhausted.
  • Pressing s at any point during an attempt — or while waiting in StIdle — transitions immediately to StSuccess.

State hierarchy

SmRetryLogic1
├── OrTimer    (ClRos2Timer)
└── OrKeyboard (ClKeyboard)

SmRetryLogic1
├── SsAttemptTask  ←  superstate; owns SrEventCountdown(3)
│   │              Reactor input events: EvTimer, EvKeyPressF
│   │              Reactor output event: EvCountdownEnd → StExhausted
│   │              Also reacts: EvKeyPressS → StSuccess
│   │
│   ├── StIdle       (initial)  — waiting for 'n' to start an attempt
│   └── StAttempting            — attempt in progress; 10s timeout
│
├── StSuccess    — reached by pressing 's' at any time
└── StExhausted  — reached after 3 total failures

Build

cd /home/brettpac/workspaces/isaac_ros-dev
colcon build --packages-select sm_retry_logic_1
source install/setup.bash

Launch

ros2 launch sm_retry_logic_1 sm_retry_logic_1.launch.py

This opens two konsole terminals: the state machine node and the keyboard server.

Keyboard controls

Key Effect Active in
n Start an attempt (StIdle → StAttempting) StIdle
f Manually fail the current attempt (StAttempting → StIdle, counts as 1 failure) StAttempting
s Succeed immediately (→ StSuccess) StIdle or StAttempting
(timer) 10-second timeout = auto-fail (StAttempting → StIdle, counts as 1 failure) StAttempting

Send keystrokes via ROS 2 topic (if not using the konsole keyboard server):

ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 110" --once  # n
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 102" --once  # f
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 115" --once  # s

Example walkthroughs

Reach StExhausted via 3 manual failures

Start → StIdle
  → press n → StAttempting
  → press f → StIdle          (failure count: 2 remaining)
  → press n → StAttempting
  → press f → StIdle          (failure count: 1 remaining)
  → press n → StAttempting
  → press f → StExhausted     (failure count: 0, EvCountdownEnd fires)

Reach StExhausted via 3 timer timeouts

Start → StIdle
  → press n → StAttempting → wait 10s → StIdle   (failure count: 2 remaining)
  → press n → StAttempting → wait 10s → StIdle   (failure count: 1 remaining)
  → press n → StAttempting → wait 10s → StExhausted

Reach StSuccess after 2 failures

``` Start → StIdle → press n → StAttempting → press f → StIdle (failure count: 2 remaining) → press n → StAttempting → press f → StIdle (failure count: 1 remaining) → press n → StAttempting

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_retry_logic_1 at Robotics Stack Exchange

No version for distro noetic showing jazzy. Known supported distros are highlighted in the buttons above.
Package symbol

sm_retry_logic_1 package from SMACC2 repo

smacc2 cl_foundation_pose cl_gcalcli cl_generic_sensor cl_http cl_keyboard cl_lifecycle_node cl_mission_tracker cl_modbus_tcp_relay cl_moveit2z cl_nav2z backward_global_planner backward_local_planner forward_global_planner forward_local_planner nav2z_planners_common pure_spinning_local_planner undo_path_global_planner cl_px4_mr cl_ros2_timer eg_conditional_generator eg_random_generator smacc2_msgs sm_atomic_performance_trace_1 sm_atomic_subscribers_performance_test sm_coretest_action_client_1 sm_coretest_callback_rate_1 sm_coretest_exceptions_1 sm_coretest_features_1 sm_coretest_forced_finish_1 sm_coretest_idle_load_1 sm_coretest_object_churn_1 sm_coretest_poll_shutdown_1 sm_coretest_post_during_exit_1 sm_coretest_reactor_order_1 sm_coretest_signal_key_1 sm_coretest_timer_handoff_1 sm_coretest_transition_speed_1 sm_advanced_recovery_1 sm_atomic sm_atomic_http sm_atomic_lifecycle sm_atomic_mode_states sm_branching sm_cl_gcalcli_test_1 sm_cl_keyboard_unit_test_1 sm_cl_px4_mr_test_1 sm_cl_px4_mr_test_2 sm_cl_px4_mr_test_3 sm_cl_px4_mr_test_4 sm_cl_px4_mr_test_5 sm_cl_ros2_timer_unit_test_1 sm_data_sharing_1 sm_data_sharing_2 sm_modbus_tcp_relay_test_1 sm_mode_state_behavior_1 sm_multi_stage_1 sm_multithread_test_1 sm_nav2_gazebo_test_1 sm_nav2_gazebo_test_2 sm_nav2_gazebo_test_3 sm_nav2_gazebo_test_4 sm_pack_ml sm_panda_cl_moveit2z_cb_inventory sm_panda_cl_moveit2z_cb_inventory_isaacsim sm_retry_logic_1 sm_simple_action_client sm_three_some sr_all_events_go sr_conditional sr_event_countdown

ROS Distro
jazzy

Package Summary

Version 3.1.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-20
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Demonstrates SrEventCountdown in a superstate: counts failures (timer timeouts and 'f' keypresses) across inner state transitions, with a 3-attempt retry limit.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_retry_logic_1

Demonstrates a state reactor (SrEventCountdown) defined in a superstate. The reactor counts failures across inner state transitions, implementing a 3-attempt retry limit before giving up. This pattern answers the question: can a parent state accumulate event history that persists while its inner states cycle? The answer is yes — and this machine shows how.

What it demonstrates

  • SrEventCountdown(3) lives in SsAttemptTask (a superstate), not in any leaf state.
  • The reactor counts timer timeouts and explicit ‘f’ keypresses as failures.
  • The failure count persists across StIdle ↔ StAttempting inner transitions — it is not reset when the inner states change.
  • After 3 total failures (any combination), the superstate transitions to StExhausted.
  • Pressing s at any point during an attempt — or while waiting in StIdle — transitions immediately to StSuccess.

State hierarchy

SmRetryLogic1
├── OrTimer    (ClRos2Timer)
└── OrKeyboard (ClKeyboard)

SmRetryLogic1
├── SsAttemptTask  ←  superstate; owns SrEventCountdown(3)
│   │              Reactor input events: EvTimer, EvKeyPressF
│   │              Reactor output event: EvCountdownEnd → StExhausted
│   │              Also reacts: EvKeyPressS → StSuccess
│   │
│   ├── StIdle       (initial)  — waiting for 'n' to start an attempt
│   └── StAttempting            — attempt in progress; 10s timeout
│
├── StSuccess    — reached by pressing 's' at any time
└── StExhausted  — reached after 3 total failures

Build

cd /home/brettpac/workspaces/isaac_ros-dev
colcon build --packages-select sm_retry_logic_1
source install/setup.bash

Launch

ros2 launch sm_retry_logic_1 sm_retry_logic_1.launch.py

This opens two konsole terminals: the state machine node and the keyboard server.

Keyboard controls

Key Effect Active in
n Start an attempt (StIdle → StAttempting) StIdle
f Manually fail the current attempt (StAttempting → StIdle, counts as 1 failure) StAttempting
s Succeed immediately (→ StSuccess) StIdle or StAttempting
(timer) 10-second timeout = auto-fail (StAttempting → StIdle, counts as 1 failure) StAttempting

Send keystrokes via ROS 2 topic (if not using the konsole keyboard server):

ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 110" --once  # n
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 102" --once  # f
ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 "data: 115" --once  # s

Example walkthroughs

Reach StExhausted via 3 manual failures

Start → StIdle
  → press n → StAttempting
  → press f → StIdle          (failure count: 2 remaining)
  → press n → StAttempting
  → press f → StIdle          (failure count: 1 remaining)
  → press n → StAttempting
  → press f → StExhausted     (failure count: 0, EvCountdownEnd fires)

Reach StExhausted via 3 timer timeouts

Start → StIdle
  → press n → StAttempting → wait 10s → StIdle   (failure count: 2 remaining)
  → press n → StAttempting → wait 10s → StIdle   (failure count: 1 remaining)
  → press n → StAttempting → wait 10s → StExhausted

Reach StSuccess after 2 failures

``` Start → StIdle → press n → StAttempting → press f → StIdle (failure count: 2 remaining) → press n → StAttempting → press f → StIdle (failure count: 1 remaining) → press n → StAttempting

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_retry_logic_1 at Robotics Stack Exchange