[
  {
    "path": ".clang-format",
    "content": "---\nLanguage:        Cpp\nBasedOnStyle:  Google\n\nColumnLimit: 100\nAccessModifierOffset: -2\nAlignAfterOpenBracket: AlwaysBreak\nBreakBeforeBraces: Allman\nConstructorInitializerIndentWidth: 0\nContinuationIndentWidth: 2\nDerivePointerAlignment: false\nPointerAlignment: Middle\nReflowComments: false\nIncludeBlocks: Preserve\n...\n"
  },
  {
    "path": ".claude/settings.json",
    "content": "{\n  \"permissions\": {\n    \"allow\": [\n    \"WebSearch\",\n    \"Bash(find:*)\",\n    \"Bash(colcon build:*)\",\n    \"Bash(source:*)\",\n    \"Bash(ros2 node:*)\",\n    \"Bash(/opt/ros/jazzy/setup.bash && colcon build --packages-select smacc2)\",\n    \"Bash(source install/setup.bash && ros2 topic echo:*)\",\n    \"Bash(source install/setup.bash && timeout 5 ros2 topic echo /*/smacc/event_log)\",\n    \"Bash(ros2 topic pub:*)\",\n    \"Bash(ros2 launch:*)\",\n    \"Bash(for i in {1..8})\",\n    \"Bash(source install/setup.bash && do ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 \\\"data: 110\\\" --once)\",\n    \"Bash(done)\",\n    \"Bash(ros2 run:*)\",\n    \"Bash(for i in {1..10})\",\n    \"Bash(source install/setup.bash && do ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 \\\"data: 110\\\" --once)\",\n    \"Bash(source install/setup.bash && timeout 5 ros2 topic echo /*/smacc/status)\",\n    \"Bash(source install/setup.bash && timeout 3 ros2 topic echo /joint_states --once)\",\n    \"Bash(source install/setup.bash && do ros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 \\\"data: 110\\\" --once)\",\n    \"Bash(for i in {1..15})\",\n    \"Bash(for i in {1..20})\",\n    \"Bash(source install/setup.bash && timeout 5 ros2 topic echo /joint_states --once)\",\n    \"Bash(unset:*)\",\n    \"Bash(ros2 pkg list:*)\",\n    \"Bash(pkill:*)\",\n    \"Bash(timeout 3 ros2 topic echo:*)\",\n    \"Bash(for i in {1..5})\",\n    \"Bash(timeout 5 ros2 topic echo:*)\",\n    \"Bash(timeout 10 ros2 topic echo /panda_arm_controller/follow_joint_trajectory/_action/send_goal --once)\"\n    ],\n    \"deny\": [\n     \n    ]\n  },\n  \"env\": {\n  }\n}\n"
  },
  {
    "path": ".github/Doxyfile",
    "content": "# Doxyfile 1.8.11\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) for a project.\n#\n# All text after a double hash (##) is considered a comment and is placed in\n# front of the TAG it is preceding.\n#\n# All text after a single hash (#) is considered a comment and will be ignored.\n# The format is:\n# TAG = value [value, ...]\n# For lists, items can also be appended using:\n# TAG += value [value, ...]\n# Values that contain spaces should be placed between quotes (\\\" \\\").\n\n#---------------------------------------------------------------------------\n# Project related configuration options\n#---------------------------------------------------------------------------\n\n# This tag specifies the encoding used for all characters in the config file\n# that follow. The default is UTF-8 which is also the encoding used for all text\n# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv\n# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv\n# for the list of possible encodings.\n# The default value is: UTF-8.\n\nDOXYFILE_ENCODING      = UTF-8\n\n# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by\n# double-quotes, unless you are using Doxywizard) that should identify the\n# project for which the documentation is generated. This name is used in the\n# title of most generated pages and in a few other places.\n# The default value is: My Project.\n\nPROJECT_NAME           = \"SMACC2\"\n\n# The PROJECT_NUMBER tag can be used to enter a project or revision number. This\n# could be handy for archiving the generated documentation or if some version\n# control system is used.\n\nPROJECT_NUMBER         =\n\n# Using the PROJECT_BRIEF tag one can provide an optional one line description\n# for a project that appears at the top of each page and should give viewer a\n# quick idea about the purpose of the project. Keep the description short.\n\nPROJECT_BRIEF          =\n\n# With the PROJECT_LOGO tag one can specify a logo or an icon that is included\n# in the documentation. The maximum height of the logo should not exceed 55\n# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy\n# the logo to the output directory.\n\nPROJECT_LOGO           =\n\n# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path\n# into which the generated documentation will be written. If a relative path is\n# entered, it will be relative to the location where doxygen was started. If\n# left blank the current directory will be used.\n\nOUTPUT_DIRECTORY       = docs/\n\n# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-\n# directories (in 2 levels) under the output directory of each output format and\n# will distribute the generated files over these directories. Enabling this\n# option can be useful when feeding doxygen a huge amount of source files, where\n# putting all generated files in the same directory would otherwise causes\n# performance problems for the file system.\n# The default value is: NO.\n\nCREATE_SUBDIRS         = NO\n\n# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII\n# characters to appear in the names of generated files. If set to NO, non-ASCII\n# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode\n# U+3044.\n# The default value is: NO.\n\nALLOW_UNICODE_NAMES    = NO\n\n# The OUTPUT_LANGUAGE tag is used to specify the language in which all\n# documentation generated by doxygen is written. Doxygen will use this\n# information to generate all constant output in the proper language.\n# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,\n# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),\n# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,\n# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),\n# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,\n# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,\n# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,\n# Ukrainian and Vietnamese.\n# The default value is: English.\n\nOUTPUT_LANGUAGE        = English\n\n# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member\n# descriptions after the members that are listed in the file and class\n# documentation (similar to Javadoc). Set to NO to disable this.\n# The default value is: YES.\n\nBRIEF_MEMBER_DESC      = YES\n\n# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief\n# description of a member or function before the detailed description\n#\n# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the\n# brief descriptions will be completely suppressed.\n# The default value is: YES.\n\nREPEAT_BRIEF           = YES\n\n# This tag implements a quasi-intelligent brief description abbreviator that is\n# used to form the text in various listings. Each string in this list, if found\n# as the leading text of the brief description, will be stripped from the text\n# and the result, after processing the whole list, is used as the annotated\n# text. Otherwise, the brief description is used as-is. If left blank, the\n# following values are used ($name is automatically replaced with the name of\n# the entity):The $name class, The $name widget, The $name file, is, provides,\n# specifies, contains, represents, a, an and the.\n\nABBREVIATE_BRIEF       =\n\n# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then\n# doxygen will generate a detailed section even if there is only a brief\n# description.\n# The default value is: NO.\n\nALWAYS_DETAILED_SEC    = NO\n\n# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all\n# inherited members of a class in the documentation of that class as if those\n# members were ordinary class members. Constructors, destructors and assignment\n# operators of the base classes will not be shown.\n# The default value is: NO.\n\nINLINE_INHERITED_MEMB  = NO\n\n# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path\n# before files name in the file list and in the header files. If set to NO the\n# shortest path that makes the file name unique will be used\n# The default value is: YES.\n\nFULL_PATH_NAMES        = YES\n\n# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.\n# Stripping is only done if one of the specified strings matches the left-hand\n# part of the path. The tag can be used to show relative paths in the file list.\n# If left blank the directory from which doxygen is run is used as the path to\n# strip.\n#\n# Note that you can specify absolute paths here, but also relative paths, which\n# will be relative from the directory where doxygen is started.\n# This tag requires that the tag FULL_PATH_NAMES is set to YES.\n\nSTRIP_FROM_PATH        =\n\n# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the\n# path mentioned in the documentation of a class, which tells the reader which\n# header file to include in order to use a class. If left blank only the name of\n# the header file containing the class definition is used. Otherwise one should\n# specify the list of include paths that are normally passed to the compiler\n# using the -I flag.\n\nSTRIP_FROM_INC_PATH    =\n\n# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but\n# less readable) file names. This can be useful is your file systems doesn't\n# support long names like on DOS, Mac, or CD-ROM.\n# The default value is: NO.\n\nSHORT_NAMES            = NO\n\n# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the\n# first line (until the first dot) of a Javadoc-style comment as the brief\n# description. If set to NO, the Javadoc-style will behave just like regular Qt-\n# style comments (thus requiring an explicit @brief command for a brief\n# description.)\n# The default value is: NO.\n\nJAVADOC_AUTOBRIEF      = NO\n\n# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first\n# line (until the first dot) of a Qt-style comment as the brief description. If\n# set to NO, the Qt-style will behave just like regular Qt-style comments (thus\n# requiring an explicit \\brief command for a brief description.)\n# The default value is: NO.\n\nQT_AUTOBRIEF           = NO\n\n# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a\n# multi-line C++ special comment block (i.e. a block of //! or /// comments) as\n# a brief description. This used to be the default behavior. The new default is\n# to treat a multi-line C++ comment block as a detailed description. Set this\n# tag to YES if you prefer the old behavior instead.\n#\n# Note that setting this tag to YES also means that rational rose comments are\n# not recognized any more.\n# The default value is: NO.\n\nMULTILINE_CPP_IS_BRIEF = NO\n\n# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the\n# documentation from any documented member that it re-implements.\n# The default value is: YES.\n\nINHERIT_DOCS           = YES\n\n# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new\n# page for each member. If set to NO, the documentation of a member will be part\n# of the file/class/namespace that contains it.\n# The default value is: NO.\n\nSEPARATE_MEMBER_PAGES  = NO\n\n# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen\n# uses this value to replace tabs by spaces in code fragments.\n# Minimum value: 1, maximum value: 16, default value: 4.\n\nTAB_SIZE               = 4\n\n# This tag can be used to specify a number of aliases that act as commands in\n# the documentation. An alias has the form:\n# name=value\n# For example adding\n# \"sideeffect=@par Side Effects:\\n\"\n# will allow you to put the command \\sideeffect (or @sideeffect) in the\n# documentation, which will result in a user-defined paragraph with heading\n# \"Side Effects:\". You can put \\n's in the value part of an alias to insert\n# newlines.\n\nALIASES                =\n\n# This tag can be used to specify a number of word-keyword mappings (TCL only).\n# A mapping has the form \"name=value\". For example adding \"class=itcl::class\"\n# will allow you to use the command class in the itcl::class meaning.\n\nTCL_SUBST              =\n\n# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources\n# only. Doxygen will then generate output that is more tailored for C. For\n# instance, some of the names that are used will be different. The list of all\n# members will be omitted, etc.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_FOR_C  = NO\n\n# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or\n# Python sources only. Doxygen will then generate output that is more tailored\n# for that language. For instance, namespaces will be presented as packages,\n# qualified scopes will look different, etc.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_JAVA   = NO\n\n# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran\n# sources. Doxygen will then generate output that is tailored for Fortran.\n# The default value is: NO.\n\nOPTIMIZE_FOR_FORTRAN   = NO\n\n# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL\n# sources. Doxygen will then generate output that is tailored for VHDL.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_VHDL   = NO\n\n# Doxygen selects the parser to use depending on the extension of the files it\n# parses. With this tag you can assign which parser to use for a given\n# extension. Doxygen has a built-in mapping, but you can override or extend it\n# using this tag. The format is ext=language, where ext is a file extension, and\n# language is one of the parsers supported by doxygen: IDL, Java, Javascript,\n# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:\n# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:\n# Fortran. In the later case the parser tries to guess whether the code is fixed\n# or free formatted code, this is the default for Fortran type files), VHDL. For\n# instance to make doxygen treat .inc files as Fortran files (default is PHP),\n# and .f files as C (default is Fortran), use: inc=Fortran f=C.\n#\n# Note: For files without extension you can use no_extension as a placeholder.\n#\n# Note that for custom extensions you also need to set FILE_PATTERNS otherwise\n# the files are not read by doxygen.\n\nEXTENSION_MAPPING      =\n\n# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments\n# according to the Markdown format, which allows for more readable\n# documentation. See http://daringfireball.net/projects/markdown/ for details.\n# The output of markdown processing is further processed by doxygen, so you can\n# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in\n# case of backward compatibilities issues.\n# The default value is: YES.\n\nMARKDOWN_SUPPORT       = YES\n\n# When enabled doxygen tries to link words that correspond to documented\n# classes, or namespaces to their corresponding documentation. Such a link can\n# be prevented in individual cases by putting a % sign in front of the word or\n# globally by setting AUTOLINK_SUPPORT to NO.\n# The default value is: YES.\n\nAUTOLINK_SUPPORT       = YES\n\n# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want\n# to include (a tag file for) the STL sources as input, then you should set this\n# tag to YES in order to let doxygen match functions declarations and\n# definitions whose arguments contain STL classes (e.g. func(std::string);\n# versus func(std::string) {}). This also make the inheritance and collaboration\n# diagrams that involve STL classes more complete and accurate.\n# The default value is: NO.\n\nBUILTIN_STL_SUPPORT    = NO\n\n# If you use Microsoft's C++/CLI language, you should set this option to YES to\n# enable parsing support.\n# The default value is: NO.\n\nCPP_CLI_SUPPORT        = NO\n\n# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:\n# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen\n# will parse them like normal C++ but will assume all classes use public instead\n# of private inheritance when no explicit protection keyword is present.\n# The default value is: NO.\n\nSIP_SUPPORT            = NO\n\n# For Microsoft's IDL there are propget and propput attributes to indicate\n# getter and setter methods for a property. Setting this option to YES will make\n# doxygen to replace the get and set methods by a property in the documentation.\n# This will only work if the methods are indeed getting or setting a simple\n# type. If this is not the case, or you want to show the methods anyway, you\n# should set this option to NO.\n# The default value is: YES.\n\nIDL_PROPERTY_SUPPORT   = YES\n\n# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC\n# tag is set to YES then doxygen will reuse the documentation of the first\n# member in the group (if any) for the other members of the group. By default\n# all members of a group must be documented explicitly.\n# The default value is: NO.\n\nDISTRIBUTE_GROUP_DOC   = NO\n\n# If one adds a struct or class to a group and this option is enabled, then also\n# any nested class or struct is added to the same group. By default this option\n# is disabled and one has to add nested compounds explicitly via \\ingroup.\n# The default value is: NO.\n\nGROUP_NESTED_COMPOUNDS = NO\n\n# Set the SUBGROUPING tag to YES to allow class member groups of the same type\n# (for instance a group of public functions) to be put as a subgroup of that\n# type (e.g. under the Public Functions section). Set it to NO to prevent\n# subgrouping. Alternatively, this can be done per class using the\n# \\nosubgrouping command.\n# The default value is: YES.\n\nSUBGROUPING            = YES\n\n# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions\n# are shown inside the group in which they are included (e.g. using \\ingroup)\n# instead of on a separate page (for HTML and Man pages) or section (for LaTeX\n# and RTF).\n#\n# Note that this feature does not work in combination with\n# SEPARATE_MEMBER_PAGES.\n# The default value is: NO.\n\nINLINE_GROUPED_CLASSES = NO\n\n# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions\n# with only public data fields or simple typedef fields will be shown inline in\n# the documentation of the scope in which they are defined (i.e. file,\n# namespace, or group documentation), provided this scope is documented. If set\n# to NO, structs, classes, and unions are shown on a separate page (for HTML and\n# Man pages) or section (for LaTeX and RTF).\n# The default value is: NO.\n\nINLINE_SIMPLE_STRUCTS  = NO\n\n# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or\n# enum is documented as struct, union, or enum with the name of the typedef. So\n# typedef struct TypeS {} TypeT, will appear in the documentation as a struct\n# with name TypeT. When disabled the typedef will appear as a member of a file,\n# namespace, or class. And the struct will be named TypeS. This can typically be\n# useful for C code in case the coding convention dictates that all compound\n# types are typedef'ed and only the typedef is referenced, never the tag name.\n# The default value is: NO.\n\nTYPEDEF_HIDES_STRUCT   = NO\n\n# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This\n# cache is used to resolve symbols given their name and scope. Since this can be\n# an expensive process and often the same symbol appears multiple times in the\n# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small\n# doxygen will become slower. If the cache is too large, memory is wasted. The\n# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range\n# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536\n# symbols. At the end of a run doxygen will report the cache usage and suggest\n# the optimal cache size from a speed point of view.\n# Minimum value: 0, maximum value: 9, default value: 0.\n\nLOOKUP_CACHE_SIZE      = 0\n\n#---------------------------------------------------------------------------\n# Build related configuration options\n#---------------------------------------------------------------------------\n\n# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in\n# documentation are documented, even if no documentation was available. Private\n# class members and static file members will be hidden unless the\n# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.\n# Note: This will also disable the warnings about undocumented members that are\n# normally produced when WARNINGS is set to YES.\n# The default value is: NO.\n\nEXTRACT_ALL            = YES\n\n# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will\n# be included in the documentation.\n# The default value is: NO.\n\nEXTRACT_PRIVATE        = YES\n\n# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal\n# scope will be included in the documentation.\n# The default value is: NO.\n\nEXTRACT_PACKAGE        = YES\n\n# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be\n# included in the documentation.\n# The default value is: NO.\n\nEXTRACT_STATIC         = YES\n\n# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined\n# locally in source files will be included in the documentation. If set to NO,\n# only classes defined in header files are included. Does not have any effect\n# for Java sources.\n# The default value is: YES.\n\nEXTRACT_LOCAL_CLASSES  = YES\n\n# This flag is only useful for Objective-C code. If set to YES, local methods,\n# which are defined in the implementation section but not in the interface are\n# included in the documentation. If set to NO, only methods in the interface are\n# included.\n# The default value is: NO.\n\nEXTRACT_LOCAL_METHODS  = YES\n\n# If this flag is set to YES, the members of anonymous namespaces will be\n# extracted and appear in the documentation as a namespace called\n# 'anonymous_namespace{file}', where file will be replaced with the base name of\n# the file that contains the anonymous namespace. By default anonymous namespace\n# are hidden.\n# The default value is: NO.\n\nEXTRACT_ANON_NSPACES   = YES\n\n# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all\n# undocumented members inside documented classes or files. If set to NO these\n# members will be included in the various overviews, but no documentation\n# section is generated. This option has no effect if EXTRACT_ALL is enabled.\n# The default value is: NO.\n\nHIDE_UNDOC_MEMBERS     = NO\n\n# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all\n# undocumented classes that are normally visible in the class hierarchy. If set\n# to NO, these classes will be included in the various overviews. This option\n# has no effect if EXTRACT_ALL is enabled.\n# The default value is: NO.\n\nHIDE_UNDOC_CLASSES     = NO\n\n# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend\n# (class|struct|union) declarations. If set to NO, these declarations will be\n# included in the documentation.\n# The default value is: NO.\n\nHIDE_FRIEND_COMPOUNDS  = NO\n\n# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any\n# documentation blocks found inside the body of a function. If set to NO, these\n# blocks will be appended to the function's detailed documentation block.\n# The default value is: NO.\n\nHIDE_IN_BODY_DOCS      = NO\n\n# The INTERNAL_DOCS tag determines if documentation that is typed after a\n# \\internal command is included. If the tag is set to NO then the documentation\n# will be excluded. Set it to YES to include the internal documentation.\n# The default value is: NO.\n\nINTERNAL_DOCS          = NO\n\n# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file\n# names in lower-case letters. If set to YES, upper-case letters are also\n# allowed. This is useful if you have classes or files whose names only differ\n# in case and if your file system supports case sensitive file names. Windows\n# and Mac users are advised to set this option to NO.\n# The default value is: system dependent.\n\nCASE_SENSE_NAMES       = YES\n\n# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with\n# their full class and namespace scopes in the documentation. If set to YES, the\n# scope will be hidden.\n# The default value is: NO.\n\nHIDE_SCOPE_NAMES       = NO\n\n# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will\n# append additional text to a page's title, such as Class Reference. If set to\n# YES the compound reference will be hidden.\n# The default value is: NO.\n\nHIDE_COMPOUND_REFERENCE= NO\n\n# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of\n# the files that are included by a file in the documentation of that file.\n# The default value is: YES.\n\nSHOW_INCLUDE_FILES     = YES\n\n# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each\n# grouped member an include statement to the documentation, telling the reader\n# which file to include in order to use the member.\n# The default value is: NO.\n\nSHOW_GROUPED_MEMB_INC  = NO\n\n# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include\n# files with double quotes in the documentation rather than with sharp brackets.\n# The default value is: NO.\n\nFORCE_LOCAL_INCLUDES   = NO\n\n# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the\n# documentation for inline members.\n# The default value is: YES.\n\nINLINE_INFO            = YES\n\n# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the\n# (detailed) documentation of file and class members alphabetically by member\n# name. If set to NO, the members will appear in declaration order.\n# The default value is: YES.\n\nSORT_MEMBER_DOCS       = YES\n\n# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief\n# descriptions of file, namespace and class members alphabetically by member\n# name. If set to NO, the members will appear in declaration order. Note that\n# this will also influence the order of the classes in the class list.\n# The default value is: NO.\n\nSORT_BRIEF_DOCS        = NO\n\n# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the\n# (brief and detailed) documentation of class members so that constructors and\n# destructors are listed first. If set to NO the constructors will appear in the\n# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.\n# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief\n# member documentation.\n# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting\n# detailed member documentation.\n# The default value is: NO.\n\nSORT_MEMBERS_CTORS_1ST = NO\n\n# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy\n# of group names into alphabetical order. If set to NO the group names will\n# appear in their defined order.\n# The default value is: NO.\n\nSORT_GROUP_NAMES       = NO\n\n# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by\n# fully-qualified names, including namespaces. If set to NO, the class list will\n# be sorted only by class name, not including the namespace part.\n# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.\n# Note: This option applies only to the class list, not to the alphabetical\n# list.\n# The default value is: NO.\n\nSORT_BY_SCOPE_NAME     = NO\n\n# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper\n# type resolution of all parameters of a function it will reject a match between\n# the prototype and the implementation of a member function even if there is\n# only one candidate or it is obvious which candidate to choose by doing a\n# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still\n# accept a match between prototype and implementation in such cases.\n# The default value is: NO.\n\nSTRICT_PROTO_MATCHING  = NO\n\n# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo\n# list. This list is created by putting \\todo commands in the documentation.\n# The default value is: YES.\n\nGENERATE_TODOLIST      = YES\n\n# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test\n# list. This list is created by putting \\test commands in the documentation.\n# The default value is: YES.\n\nGENERATE_TESTLIST      = YES\n\n# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug\n# list. This list is created by putting \\bug commands in the documentation.\n# The default value is: YES.\n\nGENERATE_BUGLIST       = YES\n\n# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)\n# the deprecated list. This list is created by putting \\deprecated commands in\n# the documentation.\n# The default value is: YES.\n\nGENERATE_DEPRECATEDLIST= YES\n\n# The ENABLED_SECTIONS tag can be used to enable sr_conditional documentation\n# sections, marked by \\if <section_label> ... \\endif and \\cond <section_label>\n# ... \\endcond blocks.\n\nENABLED_SECTIONS       =\n\n# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the\n# initial value of a variable or macro / define can have for it to appear in the\n# documentation. If the initializer consists of more lines than specified here\n# it will be hidden. Use a value of 0 to hide initializers completely. The\n# appearance of the value of individual variables and macros / defines can be\n# controlled using \\showinitializer or \\hideinitializer command in the\n# documentation regardless of this setting.\n# Minimum value: 0, maximum value: 10000, default value: 30.\n\nMAX_INITIALIZER_LINES  = 30\n\n# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at\n# the bottom of the documentation of classes and structs. If set to YES, the\n# list will mention the files that were used to generate the documentation.\n# The default value is: YES.\n\nSHOW_USED_FILES        = YES\n\n# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This\n# will remove the Files entry from the Quick Index and from the Folder Tree View\n# (if specified).\n# The default value is: YES.\n\nSHOW_FILES             = YES\n\n# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces\n# page. This will remove the Namespaces entry from the Quick Index and from the\n# Folder Tree View (if specified).\n# The default value is: YES.\n\nSHOW_NAMESPACES        = YES\n\n# The FILE_VERSION_FILTER tag can be used to specify a program or script that\n# doxygen should invoke to get the current version for each file (typically from\n# the version control system). Doxygen will invoke the program by executing (via\n# popen()) the command command input-file, where command is the value of the\n# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided\n# by doxygen. Whatever the program writes to standard output is used as the file\n# version. For an example see the documentation.\n\nFILE_VERSION_FILTER    =\n\n# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed\n# by doxygen. The layout file controls the global structure of the generated\n# output files in an output format independent way. To create the layout file\n# that represents doxygen's defaults, run doxygen with the -l option. You can\n# optionally specify a file name after the option, if omitted DoxygenLayout.xml\n# will be used as the name of the layout file.\n#\n# Note that if you run doxygen from a directory containing a file called\n# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE\n# tag is left empty.\n\nLAYOUT_FILE            =\n\n# The CITE_BIB_FILES tag can be used to specify one or more bib files containing\n# the reference definitions. This must be a list of .bib files. The .bib\n# extension is automatically appended if omitted. This requires the bibtex tool\n# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.\n# For LaTeX the style of the bibliography can be controlled using\n# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the\n# search path. See also \\cite for info how to create references.\n\nCITE_BIB_FILES         =\n\n#---------------------------------------------------------------------------\n# Configuration options related to warning and progress messages\n#---------------------------------------------------------------------------\n\n# The QUIET tag can be used to turn on/off the messages that are generated to\n# standard output by doxygen. If QUIET is set to YES this implies that the\n# messages are off.\n# The default value is: NO.\n\nQUIET                  = YES\n\n# The WARNINGS tag can be used to turn on/off the warning messages that are\n# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES\n# this implies that the warnings are on.\n#\n# Tip: Turn warnings on while writing the documentation.\n# The default value is: YES.\n\nWARNINGS               = YES\n\n# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate\n# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag\n# will automatically be disabled.\n# The default value is: YES.\n\nWARN_IF_UNDOCUMENTED   = YES\n\n# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for\n# potential errors in the documentation, such as not documenting some parameters\n# in a documented function, or documenting parameters that don't exist or using\n# markup commands wrongly.\n# The default value is: YES.\n\nWARN_IF_DOC_ERROR      = YES\n\n# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that\n# are documented, but have no documentation for their parameters or return\n# value. If set to NO, doxygen will only warn about wrong or incomplete\n# parameter documentation, but not about the absence of documentation.\n# The default value is: NO.\n\nWARN_NO_PARAMDOC       = NO\n\n# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when\n# a warning is encountered.\n# The default value is: NO.\n\nWARN_AS_ERROR          = NO\n\n# The WARN_FORMAT tag determines the format of the warning messages that doxygen\n# can produce. The string should contain the $file, $line, and $text tags, which\n# will be replaced by the file and line number from which the warning originated\n# and the warning text. Optionally the format may contain $version, which will\n# be replaced by the version of the file (if it could be obtained via\n# FILE_VERSION_FILTER)\n# The default value is: $file:$line: $text.\n\nWARN_FORMAT            = \"$file:$line: $text\"\n\n# The WARN_LOGFILE tag can be used to specify a file to which warning and error\n# messages should be written. If left blank the output is written to standard\n# error (stderr).\n\nWARN_LOGFILE           =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the input files\n#---------------------------------------------------------------------------\n\n# The INPUT tag is used to specify the files and/or directories that contain\n# documented source files. You may enter file names like myfile.cpp or\n# directories like /usr/src/myproject. Separate the files or directories with\n# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING\n# Note: If this tag is empty the current directory is searched.\n\nINPUT                  =\n\n# This tag can be used to specify the character encoding of the source files\n# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses\n# libiconv (or the iconv built into libc) for the transcoding. See the libiconv\n# documentation (see: http://www.gnu.org/software/libiconv) for the list of\n# possible encodings.\n# The default value is: UTF-8.\n\nINPUT_ENCODING         = UTF-8\n\n# If the value of the INPUT tag contains directories, you can use the\n# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and\n# *.h) to filter out the source-files in the directories.\n#\n# Note that for custom extensions or not directly supported extensions you also\n# need to set EXTENSION_MAPPING for the extension otherwise the files are not\n# read by doxygen.\n#\n# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,\n# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,\n# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,\n# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl,\n# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js.\n\nFILE_PATTERNS          = *.c, *.cc, *.cxx, *.cpp, *.c++, *.hh, *.hxx, *.hpp, *.h++, *.h\n\n# The RECURSIVE tag can be used to specify whether or not subdirectories should\n# be searched for input files as well.\n# The default value is: NO.\n\nRECURSIVE              = YES\n\n# The EXCLUDE tag can be used to specify files and/or directories that should be\n# excluded from the INPUT source files. This way you can easily exclude a\n# subdirectory from a directory tree whose root is specified with the INPUT tag.\n#\n# Note that relative paths are relative to the directory from which doxygen is\n# run.\n\nEXCLUDE                =\n\n# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or\n# directories that are symbolic links (a Unix file system feature) are excluded\n# from the input.\n# The default value is: NO.\n\nEXCLUDE_SYMLINKS       = NO\n\n# If the value of the INPUT tag contains directories, you can use the\n# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude\n# certain files from those directories.\n#\n# Note that the wildcards are matched against the file with absolute path, so to\n# exclude all test directories for example use the pattern */test/*\n\nEXCLUDE_PATTERNS       = */test/* */rosdoc_lite/* */smacc_diagnostics/scripts/* */smacc2_sm_reference_library/* */smacc2_performance_tools/* *.py\n\n# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names\n# (namespaces, classes, functions, etc.) that should be excluded from the\n# output. The symbol name can be a fully qualified name, a word, or if the\n# wildcard * is used, a substring. Examples: ANamespace, AClass,\n# AClass::ANamespace, ANamespace::*Test\n#\n# Note that the wildcards are matched against the file with absolute path, so to\n# exclude all test directories use the pattern */test/*\n\nEXCLUDE_SYMBOLS        = \n\n# The EXAMPLE_PATH tag can be used to specify one or more files or directories\n# that contain example code fragments that are included (see the \\include\n# command).\n\nEXAMPLE_PATH           =\n\n# If the value of the EXAMPLE_PATH tag contains directories, you can use the\n# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and\n# *.h) to filter out the source-files in the directories. If left blank all\n# files are included.\n\nEXAMPLE_PATTERNS       =\n\n# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be\n# searched for input files to be used with the \\include or \\dontinclude commands\n# irrespective of the value of the RECURSIVE tag.\n# The default value is: NO.\n\nEXAMPLE_RECURSIVE      = NO\n\n# The IMAGE_PATH tag can be used to specify one or more files or directories\n# that contain images that are to be included in the documentation (see the\n# \\image command).\n\nIMAGE_PATH             =\n\n# The INPUT_FILTER tag can be used to specify a program that doxygen should\n# invoke to filter for each input file. Doxygen will invoke the filter program\n# by executing (via popen()) the command:\n#\n# <filter> <input-file>\n#\n# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the\n# name of an input file. Doxygen will then use the output that the filter\n# program writes to standard output. If FILTER_PATTERNS is specified, this tag\n# will be ignored.\n#\n# Note that the filter must not add or remove lines; it is applied before the\n# code is scanned, but not when the output code is generated. If lines are added\n# or removed, the anchors will not be placed correctly.\n#\n# Note that for custom extensions or not directly supported extensions you also\n# need to set EXTENSION_MAPPING for the extension otherwise the files are not\n# properly processed by doxygen.\n\nINPUT_FILTER           =\n\n# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern\n# basis. Doxygen will compare the file name with each pattern and apply the\n# filter if there is a match. The filters are a list of the form: pattern=filter\n# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how\n# filters are used. If the FILTER_PATTERNS tag is empty or if none of the\n# patterns match the file name, INPUT_FILTER is applied.\n#\n# Note that for custom extensions or not directly supported extensions you also\n# need to set EXTENSION_MAPPING for the extension otherwise the files are not\n# properly processed by doxygen.\n\nFILTER_PATTERNS        =\n\n# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using\n# INPUT_FILTER) will also be used to filter the input files that are used for\n# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).\n# The default value is: NO.\n\nFILTER_SOURCE_FILES    = NO\n\n# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file\n# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and\n# it is also possible to disable source filtering for a specific pattern using\n# *.ext= (so without naming a filter).\n# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.\n\nFILTER_SOURCE_PATTERNS =\n\n# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that\n# is part of the input, its contents will be placed on the main page\n# (index.html). This can be useful if you have a project on for instance GitHub\n# and want to reuse the introduction page also for the doxygen output.\n\nUSE_MDFILE_AS_MAINPAGE =\n\n#---------------------------------------------------------------------------\n# Configuration options related to source browsing\n#---------------------------------------------------------------------------\n\n# If the SOURCE_BROWSER tag is set to YES then a list of source files will be\n# generated. Documented entities will be cross-referenced with these sources.\n#\n# Note: To get rid of all source code in the generated output, make sure that\n# also VERBATIM_HEADERS is set to NO.\n# The default value is: NO.\n\nSOURCE_BROWSER         = YES\n\n# Setting the INLINE_SOURCES tag to YES will include the body of functions,\n# classes and enums directly into the documentation.\n# The default value is: NO.\n\nINLINE_SOURCES         = YES\n\n# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any\n# special comment blocks from generated source code fragments. Normal C, C++ and\n# Fortran comments will always remain visible.\n# The default value is: YES.\n\nSTRIP_CODE_COMMENTS    = YES\n\n# If the REFERENCED_BY_RELATION tag is set to YES then for each documented\n# function all documented functions referencing it will be listed.\n# The default value is: NO.\n\nREFERENCED_BY_RELATION = YES\n\n# If the REFERENCES_RELATION tag is set to YES then for each documented function\n# all documented entities called/used by that function will be listed.\n# The default value is: NO.\n\nREFERENCES_RELATION    = YES\n\n# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set\n# to YES then the hyperlinks from functions in REFERENCES_RELATION and\n# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will\n# link to the documentation.\n# The default value is: YES.\n\nREFERENCES_LINK_SOURCE = YES\n\n# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the\n# source code will show a tooltip with additional information such as prototype,\n# brief description and links to the definition and documentation. Since this\n# will make the HTML file larger and loading of large files a bit slower, you\n# can opt to disable this feature.\n# The default value is: YES.\n# This tag requires that the tag SOURCE_BROWSER is set to YES.\n\nSOURCE_TOOLTIPS        = YES\n\n# If the USE_HTAGS tag is set to YES then the references to source code will\n# point to the HTML generated by the htags(1) tool instead of doxygen built-in\n# source browser. The htags tool is part of GNU's global source tagging system\n# (see http://www.gnu.org/software/global/global.html). You will need version\n# 4.8.6 or higher.\n#\n# To use it do the following:\n# - Install the latest version of global\n# - Enable SOURCE_BROWSER and USE_HTAGS in the config file\n# - Make sure the INPUT points to the root of the source tree\n# - Run doxygen as normal\n#\n# Doxygen will invoke htags (and that will in turn invoke gtags), so these\n# tools must be available from the command line (i.e. in the search path).\n#\n# The result: instead of the source browser generated by doxygen, the links to\n# source code will now point to the output of htags.\n# The default value is: NO.\n# This tag requires that the tag SOURCE_BROWSER is set to YES.\n\nUSE_HTAGS              = NO\n\n# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a\n# verbatim copy of the header file for each class for which an include is\n# specified. Set to NO to disable this.\n# See also: Section \\class.\n# The default value is: YES.\n\nVERBATIM_HEADERS       = YES\n\n# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the\n# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the\n# cost of reduced performance. This can be particularly helpful with template\n# rich C++ code for which doxygen's built-in parser lacks the necessary type\n# information.\n# Note: The availability of this option depends on whether or not doxygen was\n# generated with the -Duse-libclang=ON option for CMake.\n# The default value is: NO.\n\nCLANG_ASSISTED_PARSING = NO\n\n# If clang assisted parsing is enabled you can provide the compiler with command\n# line options that you would normally use when invoking the compiler. Note that\n# the include paths will already be set by doxygen for the files and directories\n# specified with INPUT and INCLUDE_PATH.\n# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.\n\nCLANG_OPTIONS          =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the alphabetical class index\n#---------------------------------------------------------------------------\n\n# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all\n# compounds will be generated. Enable this if the project contains a lot of\n# classes, structs, unions or interfaces.\n# The default value is: YES.\n\nALPHABETICAL_INDEX     = YES\n\n# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in\n# which the alphabetical index list will be split.\n# Minimum value: 1, maximum value: 20, default value: 5.\n# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.\n\nCOLS_IN_ALPHA_INDEX    = 5\n\n# In case all classes in a project start with a common prefix, all classes will\n# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag\n# can be used to specify a prefix (or a list of prefixes) that should be ignored\n# while generating the index headers.\n# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.\n\nIGNORE_PREFIX          =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the HTML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output\n# The default value is: YES.\n\nGENERATE_HTML          = YES\n\n# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: html.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_OUTPUT            = html\n\n# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each\n# generated HTML page (for example: .htm, .php, .asp).\n# The default value is: .html.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_FILE_EXTENSION    = .html\n\n# The HTML_HEADER tag can be used to specify a user-defined HTML header file for\n# each generated HTML page. If the tag is left blank doxygen will generate a\n# standard header.\n#\n# To get valid HTML the header file that includes any scripts and style sheets\n# that doxygen needs, which is dependent on the configuration options used (e.g.\n# the setting GENERATE_TREEVIEW). It is highly recommended to start with a\n# default header using\n# doxygen -w html new_header.html new_footer.html new_stylesheet.css\n# YourConfigFile\n# and then modify the file new_header.html. See also section \"Doxygen usage\"\n# for information on how to generate the default header that doxygen normally\n# uses.\n# Note: The header is subject to change so you typically have to regenerate the\n# default header when upgrading to a newer version of doxygen. For a description\n# of the possible markers and block names see the documentation.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_HEADER            =\n\n# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each\n# generated HTML page. If the tag is left blank doxygen will generate a standard\n# footer. See HTML_HEADER for more information on how to generate a default\n# footer and what special commands can be used inside the footer. See also\n# section \"Doxygen usage\" for information on how to generate the default footer\n# that doxygen normally uses.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_FOOTER            =\n\n# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style\n# sheet that is used by each HTML page. It can be used to fine-tune the look of\n# the HTML output. If left blank doxygen will generate a default style sheet.\n# See also section \"Doxygen usage\" for information on how to generate the style\n# sheet that doxygen normally uses.\n# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as\n# it is more robust and this tag (HTML_STYLESHEET) will in the future become\n# obsolete.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_STYLESHEET        =\n\n# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined\n# cascading style sheets that are included after the standard style sheets\n# created by doxygen. Using this option one can overrule certain style aspects.\n# This is preferred over using HTML_STYLESHEET since it does not replace the\n# standard style sheet and is therefore more robust against future updates.\n# Doxygen will copy the style sheet files to the output directory.\n# Note: The order of the extra style sheet files is of importance (e.g. the last\n# style sheet in the list overrules the setting of the previous ones in the\n# list). For an example see the documentation.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_EXTRA_STYLESHEET  =\n\n# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or\n# other source files which should be copied to the HTML output directory. Note\n# that these files will be copied to the base HTML output directory. Use the\n# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these\n# files. In the HTML_STYLESHEET file, use the file name only. Also note that the\n# files will be copied as-is; there are no commands or markers available.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_EXTRA_FILES       =\n\n# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen\n# will adjust the colors in the style sheet and background images according to\n# this color. Hue is specified as an angle on a colorwheel, see\n# http://en.wikipedia.org/wiki/Hue for more information. For instance the value\n# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300\n# purple, and 360 is red again.\n# Minimum value: 0, maximum value: 359, default value: 220.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_HUE    = 220\n\n# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors\n# in the HTML output. For a value of 0 the output will use grayscales only. A\n# value of 255 will produce the most vivid colors.\n# Minimum value: 0, maximum value: 255, default value: 100.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_SAT    = 100\n\n# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the\n# luminance component of the colors in the HTML output. Values below 100\n# gradually make the output lighter, whereas values above 100 make the output\n# darker. The value divided by 100 is the actual gamma applied, so 80 represents\n# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not\n# change the gamma.\n# Minimum value: 40, maximum value: 240, default value: 80.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_GAMMA  = 80\n\n# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML\n# page will contain the date and time when the page was generated. Setting this\n# to YES can help to show when doxygen was last run and thus if the\n# documentation is up to date.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_TIMESTAMP         = NO\n\n# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML\n# documentation will contain sections that can be hidden and shown after the\n# page has loaded.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_DYNAMIC_SECTIONS  = NO\n\n# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries\n# shown in the various tree structured indices initially; the user can expand\n# and collapse entries dynamically later on. Doxygen will expand the tree to\n# such a level that at most the specified number of entries are visible (unless\n# a fully collapsed tree already exceeds this amount). So setting the number of\n# entries 1 will produce a full collapsed tree by default. 0 is a special value\n# representing an infinite number of entries and will result in a full expanded\n# tree by default.\n# Minimum value: 0, maximum value: 9999, default value: 100.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_INDEX_NUM_ENTRIES = 100\n\n# If the GENERATE_DOCSET tag is set to YES, additional index files will be\n# generated that can be used as input for Apple's Xcode 3 integrated development\n# environment (see: http://developer.apple.com/tools/xcode/), introduced with\n# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a\n# Makefile in the HTML output directory. Running make will produce the docset in\n# that directory and running make install will install the docset in\n# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at\n# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html\n# for more information.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_DOCSET        = NO\n\n# This tag determines the name of the docset feed. A documentation feed provides\n# an umbrella under which multiple documentation sets from a single provider\n# (such as a company or product suite) can be grouped.\n# The default value is: Doxygen generated docs.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_FEEDNAME        = \"Doxygen generated docs\"\n\n# This tag specifies a string that should uniquely identify the documentation\n# set bundle. This should be a reverse domain-name style string, e.g.\n# com.mycompany.MyDocSet. Doxygen will append .docset to the name.\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_BUNDLE_ID       = org.doxygen.Project\n\n# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify\n# the documentation publisher. This should be a reverse domain-name style\n# string, e.g. com.mycompany.MyDocSet.documentation.\n# The default value is: org.doxygen.Publisher.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_PUBLISHER_ID    = org.doxygen.Publisher\n\n# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.\n# The default value is: Publisher.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_PUBLISHER_NAME  = Publisher\n\n# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three\n# additional HTML index files: index.hhp, index.hhc, and index.hhk. The\n# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop\n# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on\n# Windows.\n#\n# The HTML Help Workshop contains a compiler that can convert all HTML output\n# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML\n# files are now used as the Windows 98 help format, and will replace the old\n# Windows help format (.hlp) on all Windows platforms in the future. Compressed\n# HTML files also contain an index, a table of contents, and you can search for\n# words in the documentation. The HTML workshop also contains a viewer for\n# compressed HTML files.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_HTMLHELP      = NO\n\n# The CHM_FILE tag can be used to specify the file name of the resulting .chm\n# file. You can add a path in front of the file if the result should not be\n# written to the html output directory.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nCHM_FILE               =\n\n# The HHC_LOCATION tag can be used to specify the location (absolute path\n# including file name) of the HTML help compiler (hhc.exe). If non-empty,\n# doxygen will try to run the HTML help compiler on the generated index.hhp.\n# The file has to be specified with full path.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nHHC_LOCATION           =\n\n# The GENERATE_CHI flag controls if a separate .chi index file is generated\n# (YES) or that it should be included in the master .chm file (NO).\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nGENERATE_CHI           = NO\n\n# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)\n# and project file content.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nCHM_INDEX_ENCODING     =\n\n# The BINARY_TOC flag controls whether a binary table of contents is generated\n# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it\n# enables the Previous and Next buttons.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nBINARY_TOC             = NO\n\n# The TOC_EXPAND flag can be set to YES to add extra items for group members to\n# the table of contents of the HTML help documentation and to the tree view.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nTOC_EXPAND             = NO\n\n# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and\n# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that\n# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help\n# (.qch) of the generated HTML documentation.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_QHP           = NO\n\n# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify\n# the file name of the resulting .qch file. The path specified is relative to\n# the HTML output folder.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQCH_FILE               =\n\n# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help\n# Project output. For more information please see Qt Help Project / Namespace\n# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_NAMESPACE          = org.doxygen.Project\n\n# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt\n# Help Project output. For more information please see Qt Help Project / Virtual\n# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-\n# folders).\n# The default value is: doc.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_VIRTUAL_FOLDER     = doc\n\n# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom\n# filter to add. For more information please see Qt Help Project / Custom\n# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-\n# filters).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_CUST_FILTER_NAME   =\n\n# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the\n# custom filter to add. For more information please see Qt Help Project / Custom\n# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-\n# filters).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_CUST_FILTER_ATTRS  =\n\n# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this\n# project's filter section matches. Qt Help Project / Filter Attributes (see:\n# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_SECT_FILTER_ATTRS  =\n\n# The QHG_LOCATION tag can be used to specify the location of Qt's\n# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the\n# generated .qhp file.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHG_LOCATION           =\n\n# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be\n# generated, together with the HTML files, they form an Eclipse help plugin. To\n# install this plugin and make it available under the help contents menu in\n# Eclipse, the contents of the directory containing the HTML and XML files needs\n# to be copied into the plugins directory of eclipse. The name of the directory\n# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.\n# After copying Eclipse needs to be restarted before the help appears.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_ECLIPSEHELP   = NO\n\n# A unique identifier for the Eclipse help plugin. When installing the plugin\n# the directory name containing the HTML and XML files should also have this\n# name. Each documentation set should have its own identifier.\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.\n\nECLIPSE_DOC_ID         = org.doxygen.Project\n\n# If you want full control over the layout of the generated HTML pages it might\n# be necessary to disable the index and replace it with your own. The\n# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top\n# of each HTML page. A value of NO enables the index and the value YES disables\n# it. Since the tabs in the index contain the same information as the navigation\n# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nDISABLE_INDEX          = NO\n\n# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index\n# structure should be generated to display hierarchical information. If the tag\n# value is set to YES, a side panel will be generated containing a tree-like\n# index structure (just like the one that is generated for HTML Help). For this\n# to work a browser that supports JavaScript, DHTML, CSS and frames is required\n# (i.e. any modern browser). Windows users are probably better off using the\n# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can\n# further fine-tune the look of the index. As an example, the default style\n# sheet generated by doxygen has an example that shows how to put an image at\n# the root of the tree instead of the PROJECT_NAME. Since the tree basically has\n# the same information as the tab index, you could consider setting\n# DISABLE_INDEX to YES when enabling this option.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_TREEVIEW      = NO\n\n# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that\n# doxygen will group on one line in the generated HTML documentation.\n#\n# Note that a value of 0 will completely suppress the enum values from appearing\n# in the overview section.\n# Minimum value: 0, maximum value: 20, default value: 4.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nENUM_VALUES_PER_LINE   = 4\n\n# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used\n# to set the initial width (in pixels) of the frame in which the tree is shown.\n# Minimum value: 0, maximum value: 1500, default value: 250.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nTREEVIEW_WIDTH         = 250\n\n# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to\n# external symbols imported via tag files in a separate window.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nEXT_LINKS_IN_WINDOW    = NO\n\n# Use this tag to change the font size of LaTeX formulas included as images in\n# the HTML documentation. When you change the font size after a successful\n# doxygen run you need to manually remove any form_*.png images from the HTML\n# output directory to force them to be regenerated.\n# Minimum value: 8, maximum value: 50, default value: 10.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nFORMULA_FONTSIZE       = 10\n\n# Use the FORMULA_TRANPARENT tag to determine whether or not the images\n# generated for formulas are transparent PNGs. Transparent PNGs are not\n# supported properly for IE 6.0, but are supported on all modern browsers.\n#\n# Note that when changing this option you need to delete any form_*.png files in\n# the HTML output directory before the changes have effect.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nFORMULA_TRANSPARENT    = YES\n\n# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see\n# http://www.mathjax.org) which uses client side Javascript for the rendering\n# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX\n# installed or if you want to formulas look prettier in the HTML output. When\n# enabled you may also need to install MathJax separately and configure the path\n# to it using the MATHJAX_RELPATH option.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nUSE_MATHJAX            = NO\n\n# When MathJax is enabled you can set the default output format to be used for\n# the MathJax output. See the MathJax site (see:\n# http://docs.mathjax.org/en/latest/output.html) for more details.\n# Possible values are: HTML-CSS (which is slower, but has the best\n# compatibility), NativeMML (i.e. MathML) and SVG.\n# The default value is: HTML-CSS.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_FORMAT         = HTML-CSS\n\n# When MathJax is enabled you need to specify the location relative to the HTML\n# output directory using the MATHJAX_RELPATH option. The destination directory\n# should contain the MathJax.js script. For instance, if the mathjax directory\n# is located at the same level as the HTML output directory, then\n# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax\n# Content Delivery Network so you can quickly see the result without installing\n# MathJax. However, it is strongly recommended to install a local copy of\n# MathJax from http://www.mathjax.org before deployment.\n# The default value is: http://cdn.mathjax.org/mathjax/latest.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest\n\n# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax\n# extension names that should be enabled during MathJax rendering. For example\n# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_EXTENSIONS     =\n\n# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces\n# of code that will be used on startup of the MathJax code. See the MathJax site\n# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an\n# example see the documentation.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_CODEFILE       =\n\n# When the SEARCHENGINE tag is enabled doxygen will generate a search box for\n# the HTML output. The underlying search engine uses javascript and DHTML and\n# should work on any modern browser. Note that when using HTML help\n# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)\n# there is already a search function so this one should typically be disabled.\n# For large projects the javascript based search engine can be slow, then\n# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to\n# search using the keyboard; to jump to the search box use <access key> + S\n# (what the <access key> is depends on the OS and browser, but it is typically\n# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down\n# key> to jump into the search results window, the results can be navigated\n# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel\n# the search. The filter options can be selected when the cursor is inside the\n# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>\n# to select a filter and <Enter> or <escape> to activate or cancel the filter\n# option.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nSEARCHENGINE           = YES\n\n# When the SERVER_BASED_SEARCH tag is enabled the search engine will be\n# implemented using a web server instead of a web client using Javascript. There\n# are two flavors of web server based searching depending on the EXTERNAL_SEARCH\n# setting. When disabled, doxygen will generate a PHP script for searching and\n# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing\n# and searching needs to be provided by external tools. See the section\n# \"External Indexing and Searching\" for details.\n# The default value is: NO.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSERVER_BASED_SEARCH    = NO\n\n# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP\n# script for searching. Instead the search results are written to an XML file\n# which needs to be processed by an external indexer. Doxygen will invoke an\n# external search engine pointed to by the SEARCHENGINE_URL option to obtain the\n# search results.\n#\n# Doxygen ships with an example indexer (doxyindexer) and search engine\n# (doxysearch.cgi) which are based on the open source search engine library\n# Xapian (see: http://xapian.org/).\n#\n# See the section \"External Indexing and Searching\" for details.\n# The default value is: NO.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTERNAL_SEARCH        = NO\n\n# The SEARCHENGINE_URL should point to a search engine hosted by a web server\n# which will return the search results when EXTERNAL_SEARCH is enabled.\n#\n# Doxygen ships with an example indexer (doxyindexer) and search engine\n# (doxysearch.cgi) which are based on the open source search engine library\n# Xapian (see: http://xapian.org/). See the section \"External Indexing and\n# Searching\" for details.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSEARCHENGINE_URL       =\n\n# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed\n# search data is written to a file for indexing by an external tool. With the\n# SEARCHDATA_FILE tag the name of this file can be specified.\n# The default file is: searchdata.xml.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSEARCHDATA_FILE        = searchdata.xml\n\n# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the\n# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is\n# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple\n# projects and redirect the results back to the right project.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTERNAL_SEARCH_ID     =\n\n# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen\n# projects other than the one defined by this configuration file, but that are\n# all added to the same external search index. Each project needs to have a\n# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of\n# to a relative location where the documentation can be found. The format is:\n# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTRA_SEARCH_MAPPINGS  =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the LaTeX output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.\n# The default value is: YES.\n\nGENERATE_LATEX         = YES\n\n# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: latex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_OUTPUT           = latex\n\n# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be\n# invoked.\n#\n# Note that when enabling USE_PDFLATEX this option is only used for generating\n# bitmaps for formulas in the HTML output, but not in the Makefile that is\n# written to the output directory.\n# The default file is: latex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_CMD_NAME         = latex\n\n# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate\n# index for LaTeX.\n# The default file is: makeindex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nMAKEINDEX_CMD_NAME     = makeindex\n\n# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX\n# documents. This may be useful for small projects and may help to save some\n# trees in general.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nCOMPACT_LATEX          = NO\n\n# The PAPER_TYPE tag can be used to set the paper type that is used by the\n# printer.\n# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x\n# 14 inches) and executive (7.25 x 10.5 inches).\n# The default value is: a4.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nPAPER_TYPE             = a4\n\n# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names\n# that should be included in the LaTeX output. The package can be specified just\n# by its name or with the correct syntax as to be used with the LaTeX\n# \\usepackage command. To get the times font for instance you can specify :\n# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}\n# To use the option intlimits with the amsmath package you can specify:\n# EXTRA_PACKAGES=[intlimits]{amsmath}\n# If left blank no extra packages will be included.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nEXTRA_PACKAGES         =\n\n# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the\n# generated LaTeX document. The header should contain everything until the first\n# chapter. If it is left blank doxygen will generate a standard header. See\n# section \"Doxygen usage\" for information on how to let doxygen write the\n# default header to a separate file.\n#\n# Note: Only use a user-defined header if you know what you are doing! The\n# following commands have a special meaning inside the header: $title,\n# $datetime, $date, $doxygenversion, $projectname, $projectnumber,\n# $projectbrief, $projectlogo. Doxygen will replace $title with the empty\n# string, for the replacement values of the other commands the user is referred\n# to HTML_HEADER.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_HEADER           =\n\n# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the\n# generated LaTeX document. The footer should contain everything after the last\n# chapter. If it is left blank doxygen will generate a standard footer. See\n# LATEX_HEADER for more information on how to generate a default footer and what\n# special commands can be used inside the footer.\n#\n# Note: Only use a user-defined footer if you know what you are doing!\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_FOOTER           =\n\n# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined\n# LaTeX style sheets that are included after the standard style sheets created\n# by doxygen. Using this option one can overrule certain style aspects. Doxygen\n# will copy the style sheet files to the output directory.\n# Note: The order of the extra style sheet files is of importance (e.g. the last\n# style sheet in the list overrules the setting of the previous ones in the\n# list).\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_EXTRA_STYLESHEET =\n\n# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or\n# other source files which should be copied to the LATEX_OUTPUT output\n# directory. Note that the files will be copied as-is; there are no commands or\n# markers available.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_EXTRA_FILES      =\n\n# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is\n# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will\n# contain links (just like the HTML output) instead of page references. This\n# makes the output suitable for online browsing using a PDF viewer.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nPDF_HYPERLINKS         = YES\n\n# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate\n# the PDF file directly from the LaTeX files. Set this option to YES, to get a\n# higher quality PDF documentation.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nUSE_PDFLATEX           = YES\n\n# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode\n# command to the generated LaTeX files. This will instruct LaTeX to keep running\n# if errors occur, instead of asking the user for help. This option is also used\n# when generating formulas in HTML.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_BATCHMODE        = NO\n\n# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the\n# index chapters (such as File Index, Compound Index, etc.) in the output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_HIDE_INDICES     = NO\n\n# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source\n# code with syntax highlighting in the LaTeX output.\n#\n# Note that which sources are shown also depends on other settings such as\n# SOURCE_BROWSER.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_SOURCE_CODE      = NO\n\n# The LATEX_BIB_STYLE tag can be used to specify the style to use for the\n# bibliography, e.g. plainnat, or ieeetr. See\n# http://en.wikipedia.org/wiki/BibTeX and \\cite for more info.\n# The default value is: plain.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_BIB_STYLE        = plain\n\n# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated\n# page will contain the date and time when the page was generated. Setting this\n# to NO can help when comparing the output of multiple runs.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_TIMESTAMP        = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the RTF output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The\n# RTF output is optimized for Word 97 and may not look too pretty with other RTF\n# readers/editors.\n# The default value is: NO.\n\nGENERATE_RTF           = NO\n\n# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: rtf.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_OUTPUT             = rtf\n\n# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF\n# documents. This may be useful for small projects and may help to save some\n# trees in general.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nCOMPACT_RTF            = NO\n\n# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will\n# contain hyperlink fields. The RTF file will contain links (just like the HTML\n# output) instead of page references. This makes the output suitable for online\n# browsing using Word or some other Word compatible readers that support those\n# fields.\n#\n# Note: WordPad (write) and others do not support links.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_HYPERLINKS         = NO\n\n# Load stylesheet definitions from file. Syntax is similar to doxygen's config\n# file, i.e. a series of assignments. You only have to provide replacements,\n# missing definitions are set to their default value.\n#\n# See also section \"Doxygen usage\" for information on how to generate the\n# default style sheet that doxygen normally uses.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_STYLESHEET_FILE    =\n\n# Set optional variables used in the generation of an RTF document. Syntax is\n# similar to doxygen's config file. A template extensions file can be generated\n# using doxygen -e rtf extensionFile.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_EXTENSIONS_FILE    =\n\n# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code\n# with syntax highlighting in the RTF output.\n#\n# Note that which sources are shown also depends on other settings such as\n# SOURCE_BROWSER.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_SOURCE_CODE        = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the man page output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for\n# classes and files.\n# The default value is: NO.\n\nGENERATE_MAN           = NO\n\n# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it. A directory man3 will be created inside the directory specified by\n# MAN_OUTPUT.\n# The default directory is: man.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_OUTPUT             = man\n\n# The MAN_EXTENSION tag determines the extension that is added to the generated\n# man pages. In case the manual section does not start with a number, the number\n# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is\n# optional.\n# The default value is: .3.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_EXTENSION          = .3\n\n# The MAN_SUBDIR tag determines the name of the directory created within\n# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by\n# MAN_EXTENSION with the initial . removed.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_SUBDIR             =\n\n# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it\n# will generate one additional man file for each entity documented in the real\n# man page(s). These additional files only source the real man page, but without\n# them the man command would be unable to find the correct page.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_LINKS              = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the XML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that\n# captures the structure of the code including all documentation.\n# The default value is: NO.\n\nGENERATE_XML           = NO\n\n# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: xml.\n# This tag requires that the tag GENERATE_XML is set to YES.\n\nXML_OUTPUT             = xml\n\n# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program\n# listings (including syntax highlighting and cross-referencing information) to\n# the XML output. Note that enabling this will significantly increase the size\n# of the XML output.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_XML is set to YES.\n\nXML_PROGRAMLISTING     = YES\n\n#---------------------------------------------------------------------------\n# Configuration options related to the DOCBOOK output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files\n# that can be used to generate PDF.\n# The default value is: NO.\n\nGENERATE_DOCBOOK       = NO\n\n# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in\n# front of it.\n# The default directory is: docbook.\n# This tag requires that the tag GENERATE_DOCBOOK is set to YES.\n\nDOCBOOK_OUTPUT         = docbook\n\n# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the\n# program listings (including syntax highlighting and cross-referencing\n# information) to the DOCBOOK output. Note that enabling this will significantly\n# increase the size of the DOCBOOK output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_DOCBOOK is set to YES.\n\nDOCBOOK_PROGRAMLISTING = NO\n\n#---------------------------------------------------------------------------\n# Configuration options for the AutoGen Definitions output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an\n# AutoGen Definitions (see http://autogen.sf.net) file that captures the\n# structure of the code including all documentation. Note that this feature is\n# still experimental and incomplete at the moment.\n# The default value is: NO.\n\nGENERATE_AUTOGEN_DEF   = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the Perl module output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module\n# file that captures the structure of the code including all documentation.\n#\n# Note that this feature is still experimental and incomplete at the moment.\n# The default value is: NO.\n\nGENERATE_PERLMOD       = NO\n\n# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary\n# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI\n# output from the Perl module output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_LATEX          = NO\n\n# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely\n# formatted so it can be parsed by a human reader. This is useful if you want to\n# understand what is going on. On the other hand, if this tag is set to NO, the\n# size of the Perl module output will be much smaller and Perl will parse it\n# just the same.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_PRETTY         = YES\n\n# The names of the make variables in the generated doxyrules.make file are\n# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful\n# so different doxyrules.make files included by the same Makefile don't\n# overwrite each other's variables.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_MAKEVAR_PREFIX =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the preprocessor\n#---------------------------------------------------------------------------\n\n# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all\n# C-preprocessor directives found in the sources and include files.\n# The default value is: YES.\n\nENABLE_PREPROCESSING   = YES\n\n# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names\n# in the source code. If set to NO, only sr_conditional compilation will be\n# performed. Macro expansion can be done in a controlled way by setting\n# EXPAND_ONLY_PREDEF to YES.\n# The default value is: NO.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nMACRO_EXPANSION        = NO\n\n# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then\n# the macro expansion is limited to the macros specified with the PREDEFINED and\n# EXPAND_AS_DEFINED tags.\n# The default value is: NO.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nEXPAND_ONLY_PREDEF     = NO\n\n# If the SEARCH_INCLUDES tag is set to YES, the include files in the\n# INCLUDE_PATH will be searched if a #include is found.\n# The default value is: YES.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nSEARCH_INCLUDES        = YES\n\n# The INCLUDE_PATH tag can be used to specify one or more directories that\n# contain include files that are not input files but should be processed by the\n# preprocessor.\n# This tag requires that the tag SEARCH_INCLUDES is set to YES.\n\nINCLUDE_PATH           =\n\n# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard\n# patterns (like *.h and *.hpp) to filter out the header-files in the\n# directories. If left blank, the patterns specified with FILE_PATTERNS will be\n# used.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nINCLUDE_FILE_PATTERNS  =\n\n# The PREDEFINED tag can be used to specify one or more macro names that are\n# defined before the preprocessor is started (similar to the -D option of e.g.\n# gcc). The argument of the tag is a list of macros of the form: name or\n# name=definition (no spaces). If the definition and the \"=\" are omitted, \"=1\"\n# is assumed. To prevent a macro definition from being undefined via #undef or\n# recursively expanded use the := operator instead of the = operator.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nPREDEFINED             =\n\n# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this\n# tag can be used to specify a list of macro names that should be expanded. The\n# macro definition that is found in the sources will be used. Use the PREDEFINED\n# tag if you want to use a different macro definition that overrules the\n# definition found in the source code.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nEXPAND_AS_DEFINED      =\n\n# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will\n# remove all references to function-like macros that are alone on a line, have\n# an all uppercase name, and do not end with a semicolon. Such function macros\n# are typically used for boiler-plate code, and will confuse the parser if not\n# removed.\n# The default value is: YES.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nSKIP_FUNCTION_MACROS   = YES\n\n#---------------------------------------------------------------------------\n# Configuration options related to external references\n#---------------------------------------------------------------------------\n\n# The TAGFILES tag can be used to specify one or more tag files. For each tag\n# file the location of the external documentation should be added. The format of\n# a tag file without this location is as follows:\n# TAGFILES = file1 file2 ...\n# Adding location for the tag files is done as follows:\n# TAGFILES = file1=loc1 \"file2 = loc2\" ...\n# where loc1 and loc2 can be relative or absolute paths or URLs. See the\n# section \"Linking to external documentation\" for more information about the use\n# of tag files.\n# Note: Each tag file must have a unique name (where the name does NOT include\n# the path). If a tag file is not located in the directory in which doxygen is\n# run, you must also specify the path to the tagfile here.\n\nTAGFILES               =\n\n# When a file name is specified after GENERATE_TAGFILE, doxygen will create a\n# tag file that is based on the input files it reads. See section \"Linking to\n# external documentation\" for more information about the usage of tag files.\n\nGENERATE_TAGFILE       =\n\n# If the ALLEXTERNALS tag is set to YES, all external class will be listed in\n# the class index. If set to NO, only the inherited external classes will be\n# listed.\n# The default value is: NO.\n\nALLEXTERNALS           = NO\n\n# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed\n# in the modules index. If set to NO, only the current project's groups will be\n# listed.\n# The default value is: YES.\n\nEXTERNAL_GROUPS        = YES\n\n# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in\n# the related pages index. If set to NO, only the current project's pages will\n# be listed.\n# The default value is: YES.\n\nEXTERNAL_PAGES         = YES\n\n# The PERL_PATH should be the absolute path and name of the perl script\n# interpreter (i.e. the result of 'which perl').\n# The default file (with absolute path) is: /usr/bin/perl.\n\nPERL_PATH              = /usr/bin/perl\n\n#---------------------------------------------------------------------------\n# Configuration options related to the dot tool\n#---------------------------------------------------------------------------\n\n# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram\n# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to\n# NO turns the diagrams off. Note that this option also works with HAVE_DOT\n# disabled, but it is recommended to install and use dot, since it yields more\n# powerful graphs.\n# The default value is: YES.\n\nCLASS_DIAGRAMS         = YES\n\n# You can define message sequence charts within doxygen comments using the \\msc\n# command. Doxygen will then run the mscgen tool (see:\n# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the\n# documentation. The MSCGEN_PATH tag allows you to specify the directory where\n# the mscgen tool resides. If left empty the tool is assumed to be found in the\n# default search path.\n\nMSCGEN_PATH            =\n\n# You can include diagrams made with dia in doxygen documentation. Doxygen will\n# then run dia to produce the diagram and insert it in the documentation. The\n# DIA_PATH tag allows you to specify the directory where the dia binary resides.\n# If left empty dia is assumed to be found in the default search path.\n\nDIA_PATH               =\n\n# If set to YES the inheritance and collaboration graphs will hide inheritance\n# and usage relations if the target is undocumented or is not a class.\n# The default value is: YES.\n\nHIDE_UNDOC_RELATIONS   = NO\n\n# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is\n# available from the path. This tool is part of Graphviz (see:\n# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent\n# Bell Labs. The other options in this section have no effect if this option is\n# set to NO\n# The default value is: YES.\n\nHAVE_DOT               = YES\n\n# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed\n# to run in parallel. When set to 0 doxygen will base this on the number of\n# processors available in the system. You can set it explicitly to a value\n# larger than 0 to get control over the balance between CPU load and processing\n# speed.\n# Minimum value: 0, maximum value: 32, default value: 0.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_NUM_THREADS        = 0\n\n# When you want a differently looking font in the dot files that doxygen\n# generates you can specify the font name using DOT_FONTNAME. You need to make\n# sure dot is able to find the font, which can be done by putting it in a\n# standard location or by setting the DOTFONTPATH environment variable or by\n# setting DOT_FONTPATH to the directory containing the font.\n# The default value is: Helvetica.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_FONTNAME           = Helvetica\n\n# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of\n# dot graphs.\n# Minimum value: 4, maximum value: 24, default value: 10.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_FONTSIZE           = 10\n\n# By default doxygen will tell dot to use the default font as specified with\n# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set\n# the path where dot can find it using this tag.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_FONTPATH           =\n\n# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for\n# each documented class showing the direct and indirect inheritance relations.\n# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCLASS_GRAPH            = YES\n\n# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a\n# graph for each documented class showing the direct and indirect implementation\n# dependencies (inheritance, containment, and class references variables) of the\n# class with other documented classes.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCOLLABORATION_GRAPH    = YES\n\n# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for\n# groups, showing the direct groups dependencies.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGROUP_GRAPHS           = YES\n\n# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and\n# collaboration diagrams in a style similar to the OMG's Unified Modeling\n# Language.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nUML_LOOK               = YES\n\n# If the UML_LOOK tag is enabled, the fields and methods are shown inside the\n# class node. If there are many fields or methods and many nodes the graph may\n# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the\n# number of items for each type to make the size more manageable. Set this to 0\n# for no limit. Note that the threshold may be exceeded by 50% before the limit\n# is enforced. So when you set the threshold to 10, up to 15 fields may appear,\n# but if the number exceeds 15, the total amount of fields shown is limited to\n# 10.\n# Minimum value: 0, maximum value: 100, default value: 10.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nUML_LIMIT_NUM_FIELDS   = 50\n\n# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and\n# collaboration graphs will show the relations between templates and their\n# instances.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nTEMPLATE_RELATIONS     = YES\n\n# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to\n# YES then doxygen will generate a graph for each documented file showing the\n# direct and indirect include dependencies of the file with other documented\n# files.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINCLUDE_GRAPH          = YES\n\n# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are\n# set to YES then doxygen will generate a graph for each documented file showing\n# the direct and indirect include dependencies of the file with other documented\n# files.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINCLUDED_BY_GRAPH      = YES\n\n# If the CALL_GRAPH tag is set to YES then doxygen will generate a call\n# dependency graph for every global function or class method.\n#\n# Note that enabling this option will significantly increase the time of a run.\n# So in most cases it will be better to enable call graphs for selected\n# functions only using the \\callgraph command. Disabling a call graph can be\n# accomplished by means of the command \\hidecallgraph.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCALL_GRAPH             = YES\n\n# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller\n# dependency graph for every global function or class method.\n#\n# Note that enabling this option will significantly increase the time of a run.\n# So in most cases it will be better to enable caller graphs for selected\n# functions only using the \\callergraph command. Disabling a caller graph can be\n# accomplished by means of the command \\hidecallergraph.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCALLER_GRAPH           = YES\n\n# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical\n# hierarchy of all classes instead of a textual one.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGRAPHICAL_HIERARCHY    = YES\n\n# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the\n# dependencies a directory has on other directories in a graphical way. The\n# dependency relations are determined by the #include relations between the\n# files in the directories.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDIRECTORY_GRAPH        = YES\n\n# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images\n# generated by dot. For an explanation of the image formats see the section\n# output formats in the documentation of the dot tool (Graphviz (see:\n# http://www.graphviz.org/)).\n# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order\n# to make the SVG files visible in IE 9+ (other browsers do not have this\n# requirement).\n# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,\n# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,\n# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,\n# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and\n# png:gdiplus:gdiplus.\n# The default value is: png.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_IMAGE_FORMAT       = png\n\n# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to\n# enable generation of interactive SVG images that allow zooming and panning.\n#\n# Note that this requires a modern browser other than Internet Explorer. Tested\n# and working are Firefox, Chrome, Safari, and Opera.\n# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make\n# the SVG files visible. Older versions of IE do not have SVG support.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINTERACTIVE_SVG        = NO\n\n# The DOT_PATH tag can be used to specify the path where the dot tool can be\n# found. If left blank, it is assumed the dot tool can be found in the path.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_PATH               =\n\n# The DOTFILE_DIRS tag can be used to specify one or more directories that\n# contain dot files that are included in the documentation (see the \\dotfile\n# command).\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOTFILE_DIRS           =\n\n# The MSCFILE_DIRS tag can be used to specify one or more directories that\n# contain msc files that are included in the documentation (see the \\mscfile\n# command).\n\nMSCFILE_DIRS           =\n\n# The DIAFILE_DIRS tag can be used to specify one or more directories that\n# contain dia files that are included in the documentation (see the \\diafile\n# command).\n\nDIAFILE_DIRS           =\n\n# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the\n# path where java can find the plantuml.jar file. If left blank, it is assumed\n# PlantUML is not used or called during a preprocessing step. Doxygen will\n# generate a warning when it encounters a \\startuml command in this case and\n# will not generate output for the diagram.\n\nPLANTUML_JAR_PATH      =\n\n# When using plantuml, the specified paths are searched for files specified by\n# the !include statement in a plantuml block.\n\nPLANTUML_INCLUDE_PATH  =\n\n# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes\n# that will be shown in the graph. If the number of nodes in a graph becomes\n# larger than this value, doxygen will truncate the graph, which is visualized\n# by representing a node as a red box. Note that doxygen if the number of direct\n# children of the root node in a graph is already larger than\n# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that\n# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.\n# Minimum value: 0, maximum value: 10000, default value: 50.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_GRAPH_MAX_NODES    = 150\n\n# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs\n# generated by dot. A depth value of 3 means that only nodes reachable from the\n# root by following a path via at most 3 edges will be shown. Nodes that lay\n# further from the root node will be omitted. Note that setting this option to 1\n# or 2 may greatly reduce the computation time needed for large code bases. Also\n# note that the size of a graph can be further restricted by\n# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.\n# Minimum value: 0, maximum value: 1000, default value: 0.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nMAX_DOT_GRAPH_DEPTH    = 0\n\n# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent\n# background. This is disabled by default, because dot on Windows does not seem\n# to support this out of the box.\n#\n# Warning: Depending on the platform used, enabling this option may lead to\n# badly anti-aliased labels on the edges of a graph (i.e. they become hard to\n# read).\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_TRANSPARENT        = NO\n\n# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output\n# files in one run (i.e. multiple -o and -T options on the command line). This\n# makes dot run faster, but since only newer versions of dot (>1.8.10) support\n# this, this feature is disabled by default.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_MULTI_TARGETS      = NO\n\n# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page\n# explaining the meaning of the various boxes and arrows in the dot generated\n# graphs.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGENERATE_LEGEND        = YES\n\n# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot\n# files that are used to generate the various graphs.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_CLEANUP            = YES\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/compilation_error_report.md",
    "content": "---\nname: Compilation error report\nabout: Create a report to help us catch compilation errors and correct them\ntitle: ''\nlabels: bug\nassignees: ''\n---\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Environment (please complete the following information):**\n\n*ROS DETAILS*:\n- OS: [e.g. Ubuntu 20.04 LTS]\n- Version [e.g. Rolling]\n\n*REPO DETAILS*:\n- Repository: [e.g. robosoft-ai/SMACC2]\n- Branch: [e.g. master]\n- Commit (First 5 Digits): [e.g. 6bade]\n\n*BUILDSPACE DETAILS (List all packages)*:\n- [e.g. ros2_control - 6bbde]\n- [e.g. moveit2 - 6bbde]\n- ...\n\n*BUILD DETAILS*\n- Build Command: [e.g. colcon build --symlink-install]\n\n**Additional context**\n- Anything that may be unusual about your environment\n\nAdd any other context about the problem here, especially include any modifications to smacc2 that relate to this issue.\n\n\n**Error Details**\n```\nCut and Paste Here... (e.g. terminal output)\n```\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/runtime_error_report.md",
    "content": "---\nname: Runtime error report\nabout: Create a report to help us catch runtime errors and improve\ntitle: ''\nlabels: bug\nassignees: ''\n---\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Environment (please complete the following information):**\n\n*ROS DETAILS*:\n- OS: [e.g. Ubuntu 20.04 LTS]\n- Version [e.g. Rolling]\n\n*REPO DETAILS*:\n- Repository: [e.g. robosoft-ai/SMACC2]\n- Branch: [e.g. master]\n- Commit (First 5 Digits): [e.g. 6bade]\n\n*BUILDSPACE DETAILS (List all packages)*:\n- [e.g. ros2_control - 6bbde]\n- [e.g. moveit2 - 6bbde]\n- ...\n\n*BUILD DETAILS*\n- Build Command: [e.g. colcon build --symlink-install]\n\n*TEST DETAILS*\n- Launch file: [e.g. ros2 launch sm_dance_bot sm_dance_bot_launch.py]\n\n\n**Additional context**\n- Anything that may be unusual about your environment\n\nAdd any other context about the problem here, especially include any modifications to smacc2 that relate to this issue.\n\n\n**Error Details**\n```\nCut and Paste Here... (e.g. terminal output)\n```\n"
  },
  {
    "path": ".github/SMACC2-not-released.jazzy.repos",
    "content": "repositories:\n#  moveit2:\n#    type: git\n#    url: https://github.com/ros-planning/moveit2.git\n#    version: feature/multiple_namespace_support_from_parameters\n#\n#  ros2_control:\n#    type: git\n#    url: https://github.com/ros-controls/ros2_control.git\n#    version: 30131b42f082a06032507040840c7ca4c48a6241\n#\n#  ros2_controllers:\n#    type: git\n#    url: https://github.com/ros-controls/ros2_controllers.git\n#    version: f08c3789e81b72f64858eccfb4a1553fd9ed801f # 2.15.0\n#\n#  realtime_tools:\n#    type: git\n#    url: https://github.com/ros-controls/realtime_tools.git\n#    version: 2.4.0\n#\n#  ros_param_shortcuts:\n#    type: git\n#    url: https://github.com/PickNikRobotics/rosparam_shortcuts\n#    version: 0.5.0\n#\n#  generate_parameter_library:\n#    type: git\n#    url: https://github.com/PickNikRobotics/generate_parameter_library.git\n#    version: 0.3.0\n#\n#  rsl:\n#    type: git\n#    url: https://github.com/PickNikRobotics/RSL.git\n#    version: 0.2.0\n#\n#  moveit_resources:\n#    type: git\n#    url: https://github.com/ros-planning/moveit_resources.git\n#    version: ros2\n#  kinematics_interface:\n#    type: git\n#    url: https://github.com/ros-controls/kinematics_interface.git\n#    version: master\n"
  },
  {
    "path": ".github/SMACC2.jazzy.repos",
    "content": "repositories:\n  px4_msgs:\n    type: git\n    url: https://github.com/PX4/px4_msgs.git\n    version: release/1.16\n  micro-ROS-Agent:\n    type: git\n    url: https://github.com/micro-ROS/micro-ROS-Agent.git\n    version: jazzy\n"
  },
  {
    "path": ".github/mergify.yml",
    "content": "pull_request_rules:\n  - name: ask to resolve conflict\n    conditions:\n      - conflict\n      - author!=mergify\n    actions:\n        comment:\n          message: This pull request is in conflict. Could you fix it @{{author}}?\n\n  - name: Backport to galactic at reviewers discretion\n    conditions:\n      - base=master\n      - \"label=backport-galactic\"\n    actions:\n      backport:\n        branches:\n          - galactic\n\n  - name: backport to foxy at reviewers discretion\n    conditions:\n      - base=master\n      - \"label=backport-foxy\"\n    actions:\n      backport:\n        branches:\n          - foxy\n"
  },
  {
    "path": ".github/workflows/README.md",
    "content": "## Repository Status, Packages and Documentation - Detailed overview\n\nROS2 Distro | Branch | Build status | Documentation | Released packages\n:---------: | :----: | :----------: | :-----------: | :---------------:\n**Foxy** | [`foxy`](https://github.com/robosoft-ai/SMACC2/tree/foxy) | [![Foxy Binary Build](https://github.com/robosoft-ai/SMACC2/actions/workflows/foxy-binary-build.yml/badge.svg?branch=foxy)](https://github.com/robosoft-ai/SMACC2/actions/workflows/foxy-binary-build.yml?branch=foxy) <br /> [![Foxy Semi-Binary Build](https://github.com/robosoft-ai/SMACC2/actions/workflows/foxy-semi-binary-build.yml/badge.svg?branch=foxy)](https://github.com/robosoft-ai/SMACC2/actions/workflows/foxy-semi-binary-build.yml?branch=foxy) <br /> [![Foxy Source Build](https://github.com/robosoft-ai/SMACC2/actions/workflows/foxy-source-build.yml/badge.svg?branch=foxy)](https://github.com/robosoft-ai/SMACC2/actions/workflows/foxy-source-build.yml?branch=foxy) | [![Doxygen Doc Deployment](https://github.com/robosoft-ai/SMACC2/actions/workflows/doxygen-deploy.yml/badge.svg)](https://github.com/robosoft-ai/SMACC2/actions/workflows/doxygen-deploy.yml) <br /> [Generated Doc](https://robosoft-ai.github.io/smacc2_doxygen/foxy/html/namespacesmacc2.html) | [SMACC2](https://index.ros.org/p/smacc2/github-robosoft-ai-SMACC2/#foxy)\n**Galactic** | [`galactic`](https://github.com/robosoft-ai/SMACC2/tree/galactic) | [![Galactic Binary Build](https://github.com/robosoft-ai/SMACC2/actions/workflows/galactic-binary-build.yml/badge.svg?branch=galactic)](https://github.com/robosoft-ai/SMACC2/actions/workflows/galactic-binary-build.yml?branch=galactic) <br /> [![Galactic Binary Build (testing)](https://github.com/robosoft-ai/SMACC2/actions/workflows/galactic-binary-build-testing.yml/badge.svg?branch=galactic)](https://github.com/robosoft-ai/SMACC2/actions/workflows/galactic-binary-build-testing.yml?branch=galactic) <br /> [![Galactic Semi-Binary Build](https://github.com/robosoft-ai/SMACC2/actions/workflows/galactic-semi-binary-build.yml/badge.svg?branch=galactic)](https://github.com/robosoft-ai/SMACC2/actions/workflows/galactic-semi-binary-build.yml?branch=galactic) <br /> [![Galactic Semi-Binary Build (testing)](https://github.com/robosoft-ai/SMACC2/actions/workflows/galactic-semi-binary-build-testing.yml/badge.svg?branch=galactic)](https://github.com/robosoft-ai/SMACC2/actions/workflows/galactic-semi-binary-build-testing.yml?branch=galactic) | [![Doxygen Doc Deployment](https://github.com/robosoft-ai/SMACC2/actions/workflows/doxygen-deploy.yml/badge.svg)](https://github.com/robosoft-ai/SMACC2/actions/workflows/doxygen-deploy.yml) <br /> [Generated Doc](https://robosoft-ai.github.io/smacc2_doxygen/galactic/html/namespacesmacc2.html) | [SMACC2](https://index.ros.org/p/smacc2/github-robosoft-ai-SMACC2/#galactic)\n**Rolling** | [`rolling`](https://github.com/robosoft-ai/SMACC2/tree/rolling) | [![Rolling Binary Build](https://github.com/robosoft-ai/SMACC2/actions/workflows/rolling-binary-build.yml/badge.svg?branch=rolling)](https://github.com/robosoft-ai/SMACC2/actions/workflows/rolling-binary-build.yml?branch=rolling) <br /> [![Rolling Binary Build (testing)](https://github.com/robosoft-ai/SMACC2/actions/workflows/rolling-binary-build-testing.yml/badge.svg?branch=rolling)](https://github.com/robosoft-ai/SMACC2/actions/workflows/rolling-binary-build-testing.yml?branch=rolling) <br /> [![Rolling Semi-Binary Build](https://github.com/robosoft-ai/SMACC2/actions/workflows/rolling-semi-binary-build.yml/badge.svg?branch=rolling)](https://github.com/robosoft-ai/SMACC2/actions/workflows/rolling-semi-binary-build.yml?branch=rolling) <br /> [![Rolling Semi-Binary Build (testing)](https://github.com/robosoft-ai/SMACC2/actions/workflows/rolling-semi-binary-build-testing.yml/badge.svg?branch=rolling)](https://github.com/robosoft-ai/SMACC2/actions/workflows/rolling-semi-binary-build-testing.yml?branch=rolling) | [![Doxygen Doc Deployment](https://github.com/robosoft-ai/SMACC2/actions/workflows/doxygen-deploy.yml/badge.svg)](https://github.com/robosoft-ai/SMACC2/actions/workflows/doxygen-deploy.yml) <br /> [Generated Doc](https://robosoft-ai.github.io/smacc2_doxygen/master/html/namespacesmacc2.html) | [SMACC2](https://index.ros.org/p/smacc2/github-robosoft-ai-SMACC2/#rolling)\n"
  },
  {
    "path": ".github/workflows/ci-format.yml",
    "content": "# This is a format job. Pre-commit has a first-party GitHub action, so we use\n# that: https://github.com/pre-commit/action\n\nname: Format\n\non:\n  workflow_dispatch:\n  pull_request:\n\njobs:\n  pre-commit:\n    name: Format\n    runs-on: ubuntu-latest\n    container:\n      image: osrf/ros:jazzy-desktop\n\n    steps:\n    - uses: actions/checkout@v2\n\n    - name: Install clang-format\n      run: |\n       apt update\n       apt install -y python3-pip clang-format ros-jazzy-ament-cppcheck pre-commit\n       git config --global --add safe.directory `pwd`\n    - name: pre-commit\n      shell: bash\n      run: |\n        source /opt/ros/jazzy/setup.bash\n        pre-commit run -a\n"
  },
  {
    "path": ".github/workflows/ci-ros-lint.yaml",
    "content": "name: ROS Lint\non:\n  pull_request:\n\njobs:\n  ament_lint:\n    name: ament_${{ matrix.linter }}\n    runs-on: ubuntu-24.04\n    strategy:\n      fail-fast: false\n      matrix:\n        linter: [copyright, cppcheck, lint_cmake]\n    steps:\n    - uses: actions/checkout@v1\n    - uses: ros-tooling/setup-ros@v0.2\n    - uses: ros-tooling/action-ros-lint@v0.1\n      with:\n        distribution: jazzy\n        linter: ${{ matrix.linter }}\n        package-name:\n          smacc2\n\n          cl_keyboard\n\n          backward_global_planner\n          backward_local_planner\n          forward_global_planner\n          forward_local_planner\n          nav2z_planners_common\n          pure_spinning_local_planner\n          undo_path_global_planner\n          cl_nav2z\n\n          cl_generic_sensor\n          cl_ros2_timer\n\n          eg_conditional_generator\n          eg_random_generator\n\n          smacc2_msgs\n\n          sm_advanced_recovery_1\n          sm_atomic\n          sm_atomic_http\n          sm_atomic_lifecycle\n          sm_atomic_mode_states\n          sm_branching\n          sm_cl_keyboard_unit_test_1\n          sm_cl_ros2_timer_unit_test_1\n          sm_multi_stage_1\n          sm_pack_ml\n          sm_panda_cl_moveit2z_cb_inventory\n          sm_simple_action_client\n          sm_three_some\n\n          sr_all_events_go\n          sr_conditional\n          sr_event_countdown\n"
  },
  {
    "path": ".github/workflows/doxygen-check-build.yml",
    "content": "name: \"Pull request Doc Check\"\non:\n  pull_request:\n\njobs:\n  check-doc:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v2\n    - uses: mattnotmitt/doxygen-action@v1\n      with:\n        doxyfile-path: '.github/Doxyfile'\n"
  },
  {
    "path": ".github/workflows/doxygen-deploy.yml",
    "content": "name: \"Doxygen Deployment\"\non:\n  workflow_dispatch:\n  push:\n    branches: [jazzy]\n\njobs:\n  deploy-doc:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v2\n    - name: Set output\n      id: vars\n      run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/}\n    - uses: mattnotmitt/doxygen-action@v1\n      with:\n        doxyfile-path: '.github/Doxyfile'\n\n    - uses: peaceiris/actions-gh-pages@v3\n      with:\n        deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}\n        external_repository:  robosoft-ai/smacc2_doxygen\n        # publish_branch: gh-pages\n        publish_dir: docs/\n        destination_dir: ${{ steps.vars.outputs.short_ref }}  # Branch name\n        commit_message: ${{ github.event.head_commit.message }}\n"
  },
  {
    "path": ".github/workflows/jazzy-binary-build.yml",
    "content": "name: jazzy Binary Build\non:\n   pull_request:\n      branches:\n         - jazzy\n   push:\n      branches:\n         - jazzy\n   schedule: # Run every morning to detect flakiness and broken dependencies\n         - cron: '43 3 * * *'\n\njobs:\n  ci:\n    name: jazzy binary build\n    runs-on: ubuntu-24.04\n    container:\n        image: osrf/ros:jazzy-desktop\n\n    steps:\n        - uses: actions/checkout@v1\n\n        - name: dependencies and build\n          shell: bash\n          run: |\n                apt-get update\n                rm /etc/ros/rosdep/sources.list.d/20-default.list\n                rosdep init\n                rosdep update\n                vcs import < .github/SMACC2.jazzy.repos\n                rosdep install --from-paths . --ignore-src -r -y\n                source /opt/ros/jazzy/setup.bash\n                # Skip packages that require special dependencies or configurations:\n                colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-skip sm_panda_cl_moveit2z_cb_inventory sm_pack_ml sm_atomic sm_atomic_lifecycle sm_atomic_mode_states sm_advanced_recovery_1 sm_branching sm_multi_stage_1 sm_multithread_test_1 sm_three_some sm_cl_keyboard_unit_test_1 sm_cl_ros2_timer_unit_test_1\n"
  },
  {
    "path": ".github/workflows/jazzy-bloom-release.yml",
    "content": "name: jazzy bloom-release\n\non:\n  push:\n    paths:\n       - package.xml\n       - '*/package.xml'\n    branches: jazzy\n  workflow_dispatch:\n\njobs:\n  bloom-release:\n    runs-on: ubuntu-latest\n    container:\n      image: osrf/ros:jazzy-desktop\n    env:\n      ROS_DISTRO: jazzy\n      PRERELEASE: true\n      BASEDIR: ${{ github.workspace }}/.work\n\n    steps:\n      - name: checkout\n        uses: actions/checkout@v3\n\n      - shell: bash\n        run: |\n          apt-get update\n          apt-get install -y python3-colcon-* python3-colcon-coveragepy-result\n          source /opt/ros/jazzy/setup.bash\n          rosdep update\n          rosdep install --from-paths . --ignore-src -r -y --skip-keys warehouse_ros_mongo\n          colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to smacc2 smacc2_msgs\n\n      # BLOOM RELEASE\n      - name: bloom release\n        uses: at-wat/bloom-release-action@v0\n        with:\n          ros_distro: ${{ env.ROS_DISTRO }}\n          github_token_bloom: ${{ secrets.GITTOKEN_BLOOM2 }}\n          github_user: pabloinigoblasco\n          git_user: pabloinigoblasco\n          git_email: pablo@ibrobotics.com\n          release_repository_push_url: https://github.com/robosoft-ai/SMACC2-release\n          tag_and_release: true\n          open_pr: true\n"
  },
  {
    "path": ".github/workflows/jazzy-semi-binary-build.yml",
    "content": "name: jazzy Semi-Binary Build\non:\n   pull_request:\n      branches:\n         - jazzy\n   push:\n      branches:\n         - jazzy\n   schedule: # Run every morning to detect flakiness and broken dependencies\n         - cron: '43 3 * * *'\n\njobs:\n  ci:\n    name: jazzy semi-binary build\n    runs-on: ubuntu-24.04\n    container:\n        image: osrf/ros:jazzy-desktop\n\n    steps:\n        - uses: actions/checkout@v1\n\n        - name: dependencies and build\n          shell: bash\n          run: |\n                apt-get update\n                rm /etc/ros/rosdep/sources.list.d/20-default.list\n                rosdep init\n                rosdep update\n                vcs import < .github/SMACC2.jazzy.repos\n                rosdep install --from-paths . --ignore-src -r -y\n                source /opt/ros/jazzy/setup.bash\n\n                # Skip packages that require special dependencies or configurations:\n                colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-skip sm_panda_moveit2z_cb_inventory sm_panda_cl_moveit2z_cb_inventory sm_pack_ml sm_atomic sm_atomic_lifecycle sm_atomic_mode_states sm_advanced_recovery_1 sm_branching sm_multi_stage_1 sm_three_some\n"
  },
  {
    "path": ".gitignore",
    "content": "dependencies\nbuild\ninstall\nlog\nbin\n.ccache\n.work\n"
  },
  {
    "path": ".pre-commit-config.yaml",
    "content": "# To use:\n#\n#     pre-commit run -a\n#\n# Or:\n#\n#     pre-commit install  # (runs every time you commit in git)\n#\n# To update this file:\n#\n#     pre-commit autoupdate\n#\n# See https://github.com/pre-commit/pre-commit\n\nrepos:\n  # Standard hooks\n  - repo: https://github.com/pre-commit/pre-commit-hooks\n    rev: v4.1.0\n    hooks:\n      - id: check-added-large-files\n      - id: check-ast\n      - id: check-case-conflict\n      - id: check-docstring-first\n      - id: check-merge-conflict\n      - id: check-symlinks\n      - id: check-xml\n      #- id: check-yaml\n      - id: debug-statements\n      - id: end-of-file-fixer\n      - id: mixed-line-ending\n      #- id: trailing-whitespace\n      - id: fix-byte-order-marker\n\n  # Python hooks\n  - repo: https://github.com/asottile/pyupgrade\n    rev: v2.31.0\n    hooks:\n    -   id: pyupgrade\n        args: [--py36-plus]\n\n  - repo: https://github.com/psf/black\n    rev: 22.3.0\n    hooks:\n      - id: black\n        args: [\"--line-length=99\"]\n\n  # PEP 257\n  # - repo: https://github.com/FalconSocial/pre-commit-mirrors-pep257\n  #   rev: v0.3.3\n  #   hooks:\n  #   - id: pep257\n  #     args: [\"--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404\"]\n\n  #- repo: https://github.com/pycqa/flake8\n  #  rev: 4.0.1\n  #  hooks:\n  #  - id: flake8\n  #    args: [\"--ignore=E501,W503\"]\n\n  # CPP hooks\n  - repo: local\n    hooks:\n      - id: clang-format\n        name: clang-format\n        description: Format files with ClangFormat.\n        entry: clang-format\n        language: system\n        files: \\.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$\n        args: ['-fallback-style=none', '-i']\n        exclude: smacc2_sm_reference_library/\n\n  # - repo: local\n  #   hooks:\n  #     - id: ament_cppcheck\n  #       name: ament_cppcheck\n  #       description: Static code analysis of C/C++ files.\n  #       stages: [commit]\n  #       entry: ament_cppcheck\n  #       language: system\n  #       files: \\.(h\\+\\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\\+\\+|cxx|tpp|txx)$\n\n  # Maybe use https://github.com/cpplint/cpplint instead\n  #- repo: local\n    #hooks:\n      #- id: ament_cpplint\n        #name: ament_cpplint\n        #description: Static code analysis of C/C++ files.\n        #stages: [commit]\n        #entry: ament_cpplint\n        #language: system\n        #files: \\.(h\\+\\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\\+\\+|cxx|tpp|txx)$\n        #args: [\"--linelength=100\", \"--filter=-whitespace/newline,-build/header_guard,-build/include_order,-build/namespaces\"]\n\n  # Cmake hooks\n  - repo: local\n    hooks:\n      - id: ament_lint_cmake\n        name: ament_lint_cmake\n        description: Check format of CMakeLists.txt files.\n        stages: [commit]\n        entry: ament_lint_cmake\n        language: system\n        files: CMakeLists\\.txt$\n\n  # Copyright\n  - repo: local\n    hooks:\n      - id: ament_copyright\n        name: ament_copyright\n        description: Check if copyright notice is available in all files.\n        stages: [commit]\n        entry: ament_copyright\n        language: system\n\n  # Docs - RestructuredText hooks\n  - repo: https://github.com/PyCQA/doc8\n    rev: 0.10.1\n    hooks:\n      - id: doc8\n        args: ['--max-line-length=100', '--ignore=D001']\n        exclude: CHANGELOG\\.rst$\n\n  - repo: https://github.com/pre-commit/pygrep-hooks\n    rev: v1.9.0\n    hooks:\n      - id: rst-backticks\n        exclude: CHANGELOG\\.rst$\n      - id: rst-directive-colons\n      - id: rst-inline-touching-normal\n"
  },
  {
    "path": "CLAUDE.md",
    "content": "//////////////////////////////////////////////////////////////////////////////\n\n# SMACC2 Object Lifetimes\nSMACC2 runtime objects can be categorized according to object lifetimes. \nState machine-scoped objects persist throughout the entire state machine\nexecution, while state-scoped objects are dynamically created and destroyed with\nstate transitions.\n  \n  ### State Scoped Objects (Lifetime tied to individual states)\n  - States (St)\n  - Client Behaviors (Cb)\n  - State Reactors (Sr)\n  - Event Generators (Eg)\n\n  ### State Machine Scoped Objects (Lifetime tied to the State Machine)\n  - State Machines (Sm) \n  - Orthogonals (Or)\n  - Clients (Cl)\n  - Components (Cp)\n\n//////////////////////////////////////////////////////////////////////////////\n\n# SMACC Signals\nSmaccSignal is a communication mechanism (template wrapper around boost::signals2).\n\n  ### Runtime architecture\n  The actual runtime object is the SignalDetector (State Machine Scoped)\n  - No prefix - singleton per state machine\n  - Lifetime: State machine lifetime\n  - Purpose: Polls and processes all signals in the system\n  - Key responsibilities:\n    - Manages signal processing loop\n    - Finds and updates ISmaccUpdatable objects\n    - Coordinates signal connections/disconnections\n    - Handles execution model (single-threaded vs multi-threaded)\n\n  ### Signal Connection Lifetime Management\n  Signal connections are managed through the state machine's\n  createSignalConnection() which:\n  1. Creates smacc2::SmaccSignalConnection connections between signal sources and\n  callbacks\n  2. Tracks connections by object pointer\n  3. Automatically disconnects when objects are destroyed via\n  disconnectSmaccSignalObject()\n  4. Ensures proper cleanup when states exit (disconnecting state-scoped\n  object signals)\n\n  ### Important Core Files\n  - smacc2/include/smacc2/common.hpp\n  - smacc2/include/smacc2/smacc_signal.hpp\n  - smacc2/include/smacc2/smacc_state_machine.hpp\n  - smacc2/include/smacc2/impl/smacc_state_machine_impl.hpp\n  - smacc2/include/smacc2/smacc_client.hpp\n  - smacc2/include/smacc2/impl/smacc_client_impl.hpp\n  - smacc2/include/smacc2/callback_counter_semaphore.hpp\n  - smacc2/src/smacc2/orthogonal.cpp\n\n  ### Important Client Library Related Files\n  - smacc2/include/smacc2/smacc_asynchronous_client_behavior.hpp\n  - smacc2/include/smacc2/client_core_components/cp_topic_subscriber.hpp\n  - smacc2/include/smacc2/impl/smacc_asynchronous_client_behavior_impl.hpp\n  - smacc2/include/smacc2/client_bases/smacc_action_client_base.hpp\n  - smacc2/include/smacc2/client_bases/smacc_service_server_client.hpp\n\n  ### Important Classes\n  - SmaccSignal\n\n  ### Usage in SMACC Client Libraries\n  - Clients have signals: onSucceeded_, onAborted_, onMessageReceived_\n  - Components have signals: onMessageTimeout_, onResponseReceived_\n  - ClientBehaviors have signals: onSuccess_, onFailure_, onFinished_\n\n  ### Example usage in Clients:\n  - smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/cl_lifecycle_node.hpp\n  - smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/cl_ros_timer.hpp\n  - smacc2_client_library/moveit2z_client/include/moveit2z_client/cl_moveit2z.hpp\n  - smacc2_client_library/nav2z_client/nav2z_client/include/nav2z_client/nav2z_client.hpp\n  - smacc2_client_library/http_client/include/http_client/cl_http_client.hpp\n  - smacc2_client_library/cl_keyboard/include/cl_keyboard/cl_keyboard.hpp\n\n  ### Example usage in Client Behaviors:\n  - smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp\n\n  ### Example usage in Components:\n  - smacc2_client_library/nav2z_client/nav2z_client/include/nav2z_client/components/waypoints_navigator/cp_waypoints_navigator.hpp\n\n  ### Boost Signals2 Documentation\n  https://www.boost.org/doc/libs/1_89_0/doc/html/signals2.html\n\n  ### Boost Signals2 Source Code\n  https://github.com/boostorg/signals2\n\n  ## Problems related to incorrectly using boost signal raw instead of the SmaccSignal approach.\n  After analyzing the SMACC signal architecture, using raw boost::signals2\n  would cause catastrophic failures:\n\n  ### Memory Leaks from Orphaned Connections\n  Client behaviors create signal connections in onEntry() but without disconnectSmaccSignalObject() being called automatically at state exit, these connections would persist indefinitely. \n  Each state transition would accumulate more dead connections, eventually exhausting memory.\n\n  ### Segmentation Faults from Dangling Callbacks\n  Most critical for client behaviors: When a CbNavigateForward subscribes to ClNav2Z::onSucceeded_ signal using raw boost::signals2, the connection would outlive the behavior. \n  When navigation completes after the state has exited, the signal would invoke a callback on a destroyed behavior object → immediate segfault.\n\n  ### State Machine Corruption\n  Without EventLifeTime::CURRENT_STATE enforcement, client behaviors could post events after their state exits. \n  Example: An async CbTimer using raw signals could fire EvTimer<TsFinished> into the wrong state, triggering invalid transitions and breaking the entire state flow.\n\n  ### Race Conditions in Multi-threaded Execution\n  The SignalDetector synchronizes signal processing through its polling loop and scheduler. \n  Raw boost::signals2 connections would fire callbacks directly from arbitrary threads (ROS executor threads, timer threads), causing:\n  - Concurrent state modifications\n  - Non-deterministic event ordering\n  - Data races in state machine internals\n\n  ### Invisible Signal Flows\n  createSignalConnection() registers connections with the state machine for introspection. \n  Raw connections would be invisible to:\n  - State machine visualization tools\n  - Runtime debugging\n  - Signal flow analysis\n  - Connection leak detection\n\n  ### Async Client Behavior Breakdown\n  SmaccAsyncClientBehavior relies on signals (onSuccess_, onFailure_, onFinished_) managed by the framework. \n  Raw signal usage would:\n  - Break the async behavior protocol\n  - Prevent proper requestForceFinish() handling\n  - Cause behaviors to \"hang\" indefinitely\n  - Make waitOnEntryThread_ synchronization fail\n\n  ### Connection Lifecycle Chaos\n  Without centralized management through signalConnectionsManager_, developers would need to manually track every connection and ensure disconnection at the exact right moment - an error-prone nightmare in complex state machines with dozens of concurrent behaviors.\n\n  The SmaccSignal approach isn't just convenience - it's essential for correctness. The automatic lifecycle management prevents an entire class of runtime failures that would be nearly impossible to debug in production.\n\n\n//////////////////////////////////////////////////////////////////////////////\n\n# SMACC2 Threading & Asynchronous I/O\nSMACC2's threading architectureuses a sophisticated hybrid concurrency model that solves a fundamental robotics challenge: maintaining deterministic state machine behavior while handling inherently asynchronous real-world I/O.\n\nSMACC2 uses what can be referred to as event-queue-mediated concurrency: async operations run in separate threads but communicate exclusively through a synchronized event queue, never directly touching state machine internals.\n\n  ## Thread Hierarchy & Roles\n\n  ### 1. State Machine Main Thread (Deterministic Core)\n  - Executes all state logic, transitions, and onEntry()/onExit() calls\n  - Only thread allowed to modify state machine state\n  - Processes events sequentially from SmaccFifoScheduler queue\n  - Guaranteed deterministic behavior regardless of event timing\n\n  ### 2. SignalDetector Coordination Thread\n  - Bridges async world to synchronous state machine\n  - Runs at configurable frequency (default 20Hz) via pollingLoop()\n  - Critical responsibilities:\n    - Calls executeUpdate() on all ISmaccUpdatable objects\n    - Processes ROS2 callbacks via rclcpp::spin_some()\n    - Manages updatable object lifecycle (finds new ones, cleans up\n  destroyed ones)\n    - Enforces state transition barriers (no updates during transitions)\n\n  ### 3. Async Behavior Worker Threads\n  - Spawned via std::async(std::launch::async) for each\n  SmaccAsyncClientBehavior\n  - Run completely independent operations (navigation, manipulation, long\n  computations)\n  - Controlled termination: requestForceFinish_ flag monitored by behavior\n  implementations\n  - Lifecycle synchronization: State exit blocks until all async behaviors\n  complete via waitOnEntryThread()\n\n  ### 4. ROS2 Executor Threads\n  - Handle ROS2 subscriptions, timers, service calls\n  - Never directly modify state machine - only post events through signal\n  connections\n  - Two modes: SINGLE_THREAD_SPINNER or MULTI_THREAD_SPINNER for callback\n  concurrency\n\n  ## Async I/O Patterns & Use Cases\n\n  ### Pattern 1: Long-Running Operations (SmaccAsyncClientBehavior)\n  ```cpp\n  // Navigation behavior runs in separate thread\n  class CbNavigateForward : public SmaccAsyncClientBehavior {\n    void onEntry() override {\n      // This runs in dedicated thread, doesn't block state machine\n      navigationClient_->sendGoal(target);\n      // Behavior posts success/failure events when complete\n    }\n  };\n  ```\n  - Use case: Navigation, manipulation, file I/O, network requests\n  - Lifecycle: Thread spawned on state entry, must complete before state\n  exit\n  - Communication: Posts EvCbSuccess/EvCbFailure events to queue\n\n  ### Pattern 2: Periodic Monitoring (ISmaccUpdatable)\n  ```cpp\n  // Component that monitors sensor data\n  class CpLidarMonitor : public ISmaccComponent, public ISmaccUpdatable {\n    void update() override {\n      // Called every 50ms by SignalDetector\n      if (checkObstacleDetected()) {\n        postEvent<EvObstacleDetected>();\n      }\n    }\n  };\n  ```\n  - Use case: Sensor monitoring, watchdogs, periodic calculations\n  - Lifecycle: Updated while component/behavior is active\n  - Frequency: Controlled by SignalDetector loop rate\n\n  ### Pattern 3: Event-Driven I/O (ROS2 Callbacks)\n  ```cpp\n  // Timer fires in ROS executor thread\n  timer_->registerCallback([this]() {\n    // This runs in ROS thread, posts event to state machine\n    onTimerTick_.emit();  // Signal connection handles thread-safe event \n  posting\n  });\n  ```\n  - Use case: ROS2 subscriptions, timers, service responses\n  - Lifecycle: Managed by ROS2 executor\n  - Thread safety: Signals automatically queue events to main thread\n\n ## Synchronization Mechanisms\n\n  ### 1. Event Queue as Synchronization Primitive\n  - All async→sync communication flows through SmaccFifoScheduler event\n  queue\n  - Thread-safe event posting from any thread\n  - Sequential processing in main thread ensures determinism\n\n  ### 2. State Transition Barriers\n  - Updates suspended during STATE_CONFIGURING, STATE_ENTERING,\n  STATE_EXITING\n  - Prevents race conditions during state machine topology changes\n  - Async behaviors must complete before state exit proceeds\n\n  ### 3. Automatic Resource Management\n  - Signal connections track object lifetimes\n  - disconnectSmaccSignalObject() prevents callbacks to destroyed objects\n  - State-scoped objects automatically cleaned up on state exit\n\n  ## Design Strengths\n\n  - Determinism Without Blocking: State machine logic remains predictable\n  while I/O operations run concurrently.\n\n  - Deadlock Prevention: Multiple escape mechanisms (requestForceFinish_,\n  timeouts, force disconnections) prevent system hangs.\n\n  - Memory Safety: Automatic lifecycle management prevents dangling pointers\n  and callback-after-destruction bugs.\n\n  - Flexible Concurrency: Three distinct patterns handle different async I/O\n  requirements without forcing a one-size-fits-all solution.\n\n  - Debugging Simplicity: Single-threaded state logic is much easier to debug\n   than fully concurrent state machines.\n\n  The architecture achieves controlled chaos - allowing the inherently\n  chaotic async world to coexist with the deterministic requirements of\n  state machine logic through careful interface boundaries and\n  synchronization primitives.\n\n\n//////////////////////////////////////////////////////////////////////////////\n\n# Other SMACC2 Documentation File Locations\n\n  ### Client Library\n  SMACC2/smacc2_client_library/CLAUDE.md\n\n  ### Reference Library\n  SMACC2/smacc2_sm_reference_library/CLAUDE.md\n\n  ### Project Settings\n  SMACC2/.claude/settings.json\n\n  ### Release Process\n  SMACC2/RELEASING.md - Comprehensive guide for creating SMACC2 releases\n\n//////////////////////////////////////////////////////////////////////////////\n\n## Token Conservation\n- Summarize lengthy outputs instead of showing full logs\n- Group similar error messages\n- Skip routine background process messages\n- Prioritize actionable information over verbose logging\n\n//////////////////////////////////////////////////////////////////////////////\n\n# Other References\n\n  ### Boost Statechart Documentation\n  https://www.boost.org/doc/libs/1_80_0/libs/statechart/doc/index.html\n\n  ### Boost Statechart Source Code\n  https://github.com/boostorg/statechart\n\n  ### Boost ASIO Documentation\n  https://www.boost.org/doc/libs/1_89_0/doc/html/boost_asio.html\n\n  ### Boost ASIO Source Code\n  https://github.com/boostorg/asio\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing Guidelines\nThank you for your interest in contributing to `smacc2`.\nWhether it's a bug report, new feature, correction, or additional\ndocumentation, we greatly value feedback and contributions from our community.\n\nPlease read through this document before submitting any issues or pull requests to ensure we have all the necessary\ninformation to effectively respond to your bug report or contribution.\n\n\n## Reporting Bugs/Feature Requests\nWe welcome you to use the GitHub issue tracker to report bugs or suggest features.\n\nWhen filing an issue, please check [existing open][issues], or [recently closed][closed-issues], issues to make sure\n somebody else hasn't already reported the issue.\nPlease try to include as much information as you can. Details like these are incredibly useful:\n\n* A reproducible test case or series of steps\n* The version of our code being used\n* Any modifications you've made relevant to the bug\n* Anything unusual about your environment or deployment\n\n\n## Contributing via Pull Requests\nContributions via pull requests are much appreciated.\nBefore sending us a pull request, please ensure that:\n\n1. Limited scope. Your PR should do one thing or one set of things. Avoid adding “random fixes” to PRs. Put those on separate PRs.\n2. Give your PR a descriptive title. Add a short summary, if required.\n3. Make sure the pipeline is green.\n4. Don’t be afraid to request reviews from maintainers.\n5. New code = new tests. If you are adding new functionality, always make sure to add some tests exercising the code and serving as live documentation of your original intention.\n\nTo send us a pull request, please:\n\n1. Fork the repository.\n2. Modify the source; please focus on the specific change you are contributing.\n  If you also reformat all the code, it will be hard for us to focus on your change.\n3. Ensure local tests pass. (`colcon test` and `pre-commit run -a` (requires you to install pre-commit by `sudo apt install pre-commit` on Ubuntu 24.04+)\n4. Commit to your fork using clear commit messages.\n5. Send a pull request, answering any default questions in the pull request interface.\n6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.\n\nGitHub provides additional documentation on [forking a repository](https://help.github.com/articles/fork-a-repo/) and\n[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).\n\n\n## Finding contributions to work on\nLooking at the existing issues is a great way to find something to contribute on.\nAs this project, by default, uses the default GitHub issue labels\n  (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'][help-wanted] issues\n  is a great place to start.\n\n\n## Licensing\nAny contribution that you make to this repository will be under the Apache 2 License, as dictated by that [license](http://www.apache.org/licenses/LICENSE-2.0.html):\n\n~~~\n5. Submission of Contributions. Unless You explicitly state otherwise,\n   any Contribution intentionally submitted for inclusion in the Work\n   by You to the Licensor shall be under the terms and conditions of\n   this License, without any additional terms or conditions.\n   Notwithstanding the above, nothing herein shall supersede or modify\n   the terms of any separate license agreement you may have executed\n   with Licensor regarding such Contributions.\n~~~\n\n[issues]: https://github.com/robosoft-ai/SMACC2/issues\n[closed-issues]: https://github.com/robosoft-ai/SMACC2/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20\n[help-wanted]: https://github.com/robosoft-ai/SMACC2/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22\n[license]: http://www.apache.org/licenses/LICENSE-2.0.html\n"
  },
  {
    "path": "LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "# SMACC2\n\nSMACC2 is an event-driven, asynchronous, behavioral state machine library for real-time ROS 2 (Robotic Operating System) applications written in C++, designed to allow programmers to build robot control applications for multicomponent robots, in an intuitive and systematic manner.\n\n## Repository Status, Packages and Documentation\n\nROS 2 Distro | Branch | Build status | Documentation | Released packages\n:---------: | :----: | :----------: | :-----------: | :---------------:\n**Foxy** | [`foxy`](https://github.com/robosoft-ai/SMACC2/tree/foxy) | [![Foxy Binary Build](https://github.com/robosoft-ai/SMACC2/actions/workflows/foxy-binary-build.yml/badge.svg?branch=foxy)](https://github.com/robosoft-ai/SMACC2/actions/workflows/foxy-binary-build.yml?branch=foxy) <br /> [![Foxy Semi-Binary Build](https://github.com/robosoft-ai/SMACC2/actions/workflows/foxy-semi-binary-build.yml/badge.svg?branch=foxy)](https://github.com/robosoft-ai/SMACC2/actions/workflows/foxy-semi-binary-build.yml?branch=foxy) | [![Doxygen Doc Deployment](https://github.com/robosoft-ai/SMACC2/actions/workflows/doxygen-deploy.yml/badge.svg)](https://github.com/robosoft-ai/SMACC2/actions/workflows/doxygen-deploy.yml) <br /> [Generated Doc](https://robosoft-ai.github.io/smacc2_doxygen/foxy/html/namespaces.html) | [![ROS Build Farm](https://build.ros2.org/job/Hsrc_uJ__smacc2__ubuntu_jammy__source/badge/icon?style=plastic&subject=ros-buildfarm&status=E.O.L&color=lightgray)](http://docs.ros.org/en/humble/Releases/End-of-Life.html) <br/>[SMACC2](https://index.ros.org/p/smacc2/github-robosoft-ai-SMACC2/#foxy)\n**Humble** | [`humble`](https://github.com/robosoft-ai/SMACC2/tree/humble) | [![Humble Binary Build](https://github.com/robosoft-ai/SMACC2/actions/workflows/humble-binary-build.yml/badge.svg?branch=humble)](https://github.com/robosoft-ai/SMACC2/actions/workflows/humble-binary-build.yml?branch=humble)<br/> [![Humble Semi-Binary Build](https://github.com/robosoft-ai/SMACC2/actions/workflows/humble-semi-binary-build.yml/badge.svg?branch=humble)](https://github.com/robosoft-ai/SMACC2/actions/workflows/humble-semi-binary-build.yml?branch=humble) | [![Doxygen Deployment](https://github.com/robosoft-ai/SMACC2/actions/workflows/doxygen-deploy.yml/badge.svg?branch=humble)](https://github.com/robosoft-ai/SMACC2/actions/workflows/doxygen-deploy.yml) <br /> [Generated Doc](https://robosoft-ai.github.io/smacc2_doxygen/humble/html/namespaces.html)| [![Build Status](https://build.ros2.org/job/Hsrc_uJ__smacc2__ubuntu_jammy__source/badge/icon?subject=ros-buildfarm)](https://build.ros2.org/job/Hsrc_uJ__smacc2__ubuntu_jammy__source/)<br/> [SMACC2](https://index.ros.org/p/smacc2/github-robosoft-ai-SMACC2/#humble)\n**Jazzy** | [`jazzy`](https://github.com/robosoft-ai/SMACC2/tree/jazzy) | [![Jazzy Binary Build](https://github.com/robosoft-ai/SMACC2/actions/workflows/jazzy-binary-build.yml/badge.svg?branch=jazzy)](https://github.com/robosoft-ai/SMACC2/actions/workflows/jazzy-binary-build.yml?branch=jazzy) <br /> [![Jazzy Semi-Binary Build](https://github.com/robosoft-ai/SMACC2/actions/workflows/jazzy-semi-binary-build.yml/badge.svg?branch=jazzy)](https://github.com/robosoft-ai/SMACC2/actions/workflows/jazzy-semi-binary-build.yml?branch=jazzy) | [![Doxygen Deployment](https://github.com/robosoft-ai/SMACC2/actions/workflows/doxygen-deploy.yml/badge.svg?branch=jazzy)](https://github.com/robosoft-ai/SMACC2/actions/workflows/doxygen-deploy.yml) <br /> [Generated Doc](https://robosoft-ai.github.io/smacc2_doxygen/jazzy/html/namespaces.html) | [SMACC2](https://index.ros.org/p/smacc2/github-robosoft-ai-SMACC2/#jazzy)\n\n**NOTE**: There are three build stages checking current and future compatibility of the package.\n\n1. Binary builds - against released packages (main and testing) in ROS distributions. Shows that direct local build is possible.\n\n   Uses repos file: `src/SMACC2/.github/SMACC2-not-released.<ros-distro>.repos`\n\n1. Semi-binary builds - against released core ROS packages (main and testing), but the immediate dependencies are pulled from source.\n   Shows that local build with dependencies is possible and if fails there we can expect that after the next package sync we will not be able to build.\n\n   Uses repos file: `src/SMACC2/.github/SMACC2.repos`\n\n1. Source build - also core ROS packages are build from source. It shows potential issues in the mid future.\n\n## Getting started - ROS Jazzy\n\n1. [Install ROS 2 Jazzy](https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debians.html).\n\n2. Make sure that `colcon`, its extensions, `vcs`, and development tools are installed:\n   ```\n   sudo apt install python3-colcon-common-extensions python3-vcstool clang-format pre-commit\n   ```\n3. Create a new ROS 2 workspace if necessary:\n   ```\n   export COLCON_WS=~/workspace/jazzy_ws\n   mkdir -p $COLCON_WS/src\n   ```\n4. Or just navigate to your workspace source folder:\n   ```\n   cd ~/workspace/jazzy_ws/src\n   ```\n5. Clone the repo:\n   ```\n   git clone https://github.com/robosoft-ai/SMACC2.git\n   ```\n6. Checkout the Jazzy branch:\n   ```\n   cd ~/workspace/jazzy_ws/src/SMACC2\n   git checkout jazzy\n   ```\n7. Navigate to the workspace:\n   ```\n   cd ~/workspace/jazzy_ws\n   ```\n8. Update System:\n   ```\n   sudo apt update\n   sudo apt upgrade\n   ```\n9. Source the workspace:\n   ```\n   source /opt/ros/jazzy/setup.bash\n   ```\n10. Update dependencies:\n   ```\n   rosdep update\n   ```\n11. Pull relevant packages and install dependencies:\n   ```\n   vcs import src --skip-existing --input src/SMACC2/.github/SMACC2.jazzy.repos\n   rosdep install --ignore-src --from-paths src -y -r\n   ```\n12. Compile:\n   ```\n   colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release\n   ```\n\n\n## Features\n *  ***Powered by ROS 2:*** SMACC2 has been developed specifically to work with ROS 2. It supports ROS 2 topics, services and actions, right out of the box.\n *   ***Written in C++:*** Until now, ROS 2 has lacked a library to develop task-level behavioral state machines in C++. Although libraries have been developed in scripting languages such as python, these are unsuitable for real-world industrial environments where real-time requirements are demanded.\n *   ***Orthogonals:*** Originally conceived by David Harel in 1987, orthogonality is absolutely crucial to developing state machines for complex robotic systems. This is because complex robots are always a collection of hardware devices which require communication protocols, start-up determinism, etc. With orthogonals, it is an intuitive and relatively straight forward exercise (at least conceptually;) to code a state machine for a robot comprising a mobile base, a robotic arm, a gripper, two lidar sensors, a gps transceiver and an imu, for instance.\n *  ***Static State Machine Checking:*** One of the features that SMACC2 inherits from Boost Statechart is that you get compile time validation checking. This benefits developers in that the amount of runtime testing necessary to ship quality software that is both stable and safe is dramatically reduced. Our philosophy is \"Wherever possible, let the compiler do it\".\n *  ***State Machine Reference Library:*** With a constantly growing library of out-of-the-box reference state machines, (found in the folder [sm_reference_library](smacc2_sm_reference_library)) guaranteed to compile and run, you can jumpstart your development efforts by choosing a reference machine that is closest to your needs, and then customize and extend to meet the specific requirements of your robotic application. All the while knowing that the library supports advanced functionalities that are practically universal among actual working robots.\n *  ***SMACC2 Client Library:*** SMACC2 also features a constantly growing library of [clients](smacc2_client_library) that support ROS 2 Action Servers, Service Servers and other nodes right out-of-the box. The clients within the SMACC2 Client library have been built utilizing a component based architecture that allows for developer to build powerful clients of their own. Current clients of note include MoveBaseZ, a full featured Action Client built to integrate with Nav2, the cl_ros2_timer, the multi_role_sensor_client, and a cl_keyboard used extensively for state machine drafting & debugging.\n  *  ***Extensive Documentation:*** Although many ROS users are familiar with doxygen, our development team has spent a lot of time researching the more advanced features of doxygen such as uml style class diagrams and call graphs, and we've used them to document the SMACC2 library. Have a look to [our doxygen sites](https://robosoft-ai.github.io/smacc2_doxygen/master/html/namespaces.html) and we think you'll be blown away at what Doxygen looks like when [it's done right](https://robosoft-ai.github.io/smacc2_doxygen/master/html/classsmacc2_1_1ISmaccStateMachine.html) and it becomes a powerful tool to research a codebase.\n  *  ***SMACC2 Runtime Analyzer:*** The SMACC2 library works out of the box with the SMACC2 RTA. This allows developers to visualize and runtime debug the state machines they are working on. The SMACC2 RTA is closed source, but is free for individual and academic use. It can be found [here](https://robosoft.ai/product-category/smacc2-runtime-analyzer/).\n\n## Repository Structure\n- `smacc2` - core library of SMACC2.\n- `smacc2_client_library` - client libraries for SMACC2, e.g., Navigation2 (`nav2z_client`), MoveIt2 (`moveit2z_client`).\n- `smacc2_event_generators` - ...\n- `smacc2_msgs` - ROS 2 messages for SMACC2 framework.\n- `smacc2_sm_reference_library` - libraries with reference implementations of state-machines used for demonstration and testing of functionalities.\n- `↓smacc2_state_reactor_library` - ...\n- `smacc2_performance_tools` - ...\n\n## SMACC2 applications\nFrom it's inception, SMACC2 was written to support the programming of multi-component, complex robots. If your project involves small, solar-powered insect robots, that simply navigate towards a light source, then SMACC2 might not be the right choice for you. But if you are trying to program a robot with a mobile base, a robotic arm, a gripper, two lidar sensors, a gps transceiver and an imu, then you've come to the right place.\n\n## Run a State Machine\nThe easiest way to get started is by selecting one of the state machines in our [reference library](smacc2_sm_reference_library), and then hacking it to meet your needs.\n\nEach state machine in the reference library comes with it's own README.md file, which contains the appropriate operating instructions, so that all you have to do is simply copy & paste some commands into your terminal.\n\n\n  *  If you are looking for a minimal example, we recommend [sm_atomic](smacc2_sm_reference_library/sm_atomic).\n\n  *  If you are looking for a minimal example but with a looping superstate, try [sm_three_some](smacc2_sm_reference_library/sm_three_some).\n\n  *  If you want to get started with the ROS Navigation stack right away, try [sm_nav2_test_7](https://github.com/robosoft-ai/nova_carter_sm_library/tree/main/sm_nav2_test_7).\n\nOperating instructions can be found in each reference state machines readme file.\n\nHappy Coding!\n\n## Support\nIf you are interested in getting involved or need a little support, feel free to contact us by emailing techsupport@robosoft.ai\n"
  },
  {
    "path": "docs/cl_modbus_tcp_relay_plan.md",
    "content": "# cl_modbus_tcp_relay Implementation Plan\n\n## Overview\nCreate a SMACC2 client library for controlling an 8-channel Modbus TCP relay (Waveshare POE ETH Relay). The client uses **libmodbus** directly for Modbus TCP communication (mbpoll available separately for CLI debugging) and follows SMACC2's pure component-based architecture.\n\n## Design Decisions\n- **Library**: libmodbus C library (direct integration, not subprocess)\n- **Location**: `src/SMACC2/smacc2_client_library/cl_modbus_tcp_relay/`\n- **Behaviors**: SmaccAsyncClientBehavior for non-blocking relay operations\n\n## Target Hardware\n- **Device**: Waveshare 8-Channel POE ETH Relay\n- **Protocol**: Modbus TCP\n- **Default IP**: 192.168.1.254\n- **Default Port**: 502\n- **Slave ID**: 0x01\n- **Coil Addresses**: 0x0000-0x0007 (channels 1-8), 0x00FF (all channels)\n\n---\n\n## Architecture\n\n### Client: ClModbusTcpRelay\nPure orchestrator that creates and configures components during initialization.\n\n**Constructor Parameters:** None - all configuration loaded from YAML config file.\n\n**YAML Configuration (in state machine's config directory):**\n```yaml\n# sm_example/config/sm_example_config.yaml\nsm_example:\n  ros__parameters:\n    modbus_relay:\n      ip_address: \"192.168.1.254\"\n      port: 502\n      slave_id: 1\n      heartbeat_interval_ms: 1000\n      connect_on_init: true\n```\n\n**Default Values (if not specified in config):**\n- `ip_address`: \"192.168.1.254\"\n- `port`: 502\n- `slave_id`: 1\n- `heartbeat_interval_ms`: 1000\n- `connect_on_init`: true\n\n### Components\n\n#### 1. CpModbusConnection\nManages libmodbus context lifecycle, TCP connection, and heartbeat monitoring.\n\n**Responsibilities:**\n- Create/destroy modbus_t context\n- Manage TCP connection state\n- Periodic heartbeat via ISmaccUpdatable (reads coil status to verify connectivity)\n- Emit connection state change signals\n- Thread-safe connection access via mutex\n\n**Signals:**\n- `onConnectionLost_` - Emitted when heartbeat fails\n- `onConnectionRestored_` - Emitted when reconnection succeeds\n- `onConnectionError_` - Emitted on connection errors with error message\n\n**Methods:**\n- `connect()` - Establish TCP connection\n- `disconnect()` - Close connection gracefully\n- `reconnect()` - Close and re-establish connection\n- `isConnected()` - Check connection state\n- `getContext()` - Get modbus_t* for operations (thread-safe)\n\n**Pattern Reference:**\n- `CpHttpConnectionManager` for connection lifecycle\n- `CpMessageTimeout` for heartbeat/watchdog pattern\n- `ISmaccUpdatable` for periodic monitoring\n\n#### 2. CpModbusRelay\nHandles Modbus coil read/write operations for the 8-channel relay.\n\n**Responsibilities:**\n- Write single coil (channel on/off)\n- Write all coils simultaneously\n- Read single coil status\n- Read all coil statuses\n- Emit operation result signals\n\n**Signals:**\n- `onWriteSuccess_` - Emitted on successful write with channel info\n- `onWriteFailure_` - Emitted on write failure with error\n- `onReadComplete_` - Emitted with current relay states (8-bit mask)\n\n**Methods:**\n- `writeCoil(int channel, bool state)` - Write single channel (1-8)\n- `writeAllCoils(bool state)` - Write all channels\n- `writeAllCoils(uint8_t mask)` - Write all channels with bitmask\n- `readCoil(int channel)` - Read single channel state\n- `readAllCoils()` - Read all channel states\n\n**Modbus Protocol Mapping:**\n| Operation | Function Code | Address |\n|-----------|---------------|---------|\n| Single Relay ON/OFF | 0x05 | 0x0000-0x0007 |\n| All Relays ON/OFF | 0x0F | 0x0000 (8 coils) |\n| Read Single Coil | 0x01 | 0x0000-0x0007 |\n| Read All Coils | 0x01 | 0x0000 (8 coils) |\n\n---\n\n### Events\n\n```cpp\n// Connection events\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvConnectionLost : sc::event<EvConnectionLost<TSource, TOrthogonal>> {};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvConnectionRestored : sc::event<EvConnectionRestored<TSource, TOrthogonal>> {};\n\n// Relay operation events\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvRelayWriteSuccess : sc::event<EvRelayWriteSuccess<TSource, TOrthogonal>> {};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvRelayWriteFailure : sc::event<EvRelayWriteFailure<TSource, TOrthogonal>> {};\n```\n\n---\n\n### Client Behaviors\n\n#### CbRelayOn\nTurn on a specific relay channel.\n\n```cpp\nclass CbRelayOn : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbRelayOn(int channel);  // channel 1-8\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation();\n\n  void onEntry() override;\n\nprivate:\n  int channel_;\n  CpModbusRelay* relayComponent_;\n};\n```\n\n#### CbRelayOff\nTurn off a specific relay channel.\n\n#### CbAllRelaysOn\nTurn on all 8 relay channels simultaneously.\n\n#### CbAllRelaysOff\nTurn off all 8 relay channels simultaneously.\n\n#### CbRelayStatus\nRead the status of relay channels (can be configured for single channel or all).\n\n```cpp\nclass CbRelayStatus : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbRelayStatus();                    // Read all channels\n  CbRelayStatus(int channel);         // Read specific channel\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation();\n\n  void onEntry() override;\n\n  // Callback for read completion\n  virtual void onStatusRead(uint8_t channelStates);\n\nprivate:\n  std::optional<int> channel_;\n  CpModbusRelay* relayComponent_;\n};\n```\n\n---\n\n## Package Structure\n\n```\nsrc/SMACC2/smacc2_client_library/cl_modbus_tcp_relay/\n├── include/cl_modbus_tcp_relay/\n│   ├── cl_modbus_tcp_relay.hpp           # Main client header\n│   ├── client_behaviors/\n│   │   ├── cb_relay_on.hpp\n│   │   ├── cb_relay_off.hpp\n│   │   ├── cb_all_relays_on.hpp\n│   │   ├── cb_all_relays_off.hpp\n│   │   └── cb_relay_status.hpp\n│   └── components/\n│       ├── cp_modbus_connection.hpp\n│       └── cp_modbus_relay.hpp\n├── src/cl_modbus_tcp_relay/\n│   ├── cl_modbus_tcp_relay.cpp\n│   └── components/\n│       ├── cp_modbus_connection.cpp\n│       └── cp_modbus_relay.cpp\n├── CMakeLists.txt\n├── package.xml\n└── README.md\n```\n\n---\n\n## Implementation Details\n\n### CpModbusConnection Implementation\n\n```cpp\nclass CpModbusConnection : public smacc2::ISmaccComponent, public smacc2::ISmaccUpdatable\n{\npublic:\n  CpModbusConnection();  // No constructor params - config from YAML\n\n  void onInitialize() override;\n  ~CpModbusConnection();\n\n  // Connection management\n  bool connect();\n  void disconnect();\n  bool reconnect();\n  bool isConnected() const;\n\n  // Thread-safe context access\n  modbus_t* getContext();\n  std::mutex& getMutex();\n\n  // Signals\n  smacc2::SmaccSignal<void()> onConnectionLost_;\n  smacc2::SmaccSignal<void()> onConnectionRestored_;\n  smacc2::SmaccSignal<void(const std::string&)> onConnectionError_;\n\n  // Event posting (set during onStateOrthogonalAllocation)\n  template <typename TOrthogonal, typename TClient>\n  void onStateOrthogonalAllocation();\n\nprotected:\n  void update() override;  // Heartbeat check\n\nprivate:\n  // Configuration loaded from YAML in onInitialize()\n  std::string ip_address_;\n  int port_;\n  int slave_id_;\n  int heartbeat_interval_ms_;\n  bool connect_on_init_;\n\n  modbus_t* ctx_;\n  bool connected_;\n  mutable std::mutex mutex_;\n\n  std::function<void()> postConnectionLostEvent_;\n  std::function<void()> postConnectionRestoredEvent_;\n\n  // Helper for parameter loading\n  template <typename T>\n  void declareAndLoadParam(const std::string& name, T& value, const T& default_val);\n};\n```\n\n### Parameter Loading (in onInitialize())\n\n```cpp\nvoid CpModbusConnection::onInitialize()\n{\n  auto node = getNode();\n\n  // Load configuration from YAML with defaults\n  ip_address_ = \"192.168.1.254\";\n  declareAndLoadParam(\"modbus_relay.ip_address\", ip_address_, ip_address_);\n\n  port_ = 502;\n  declareAndLoadParam(\"modbus_relay.port\", port_, port_);\n\n  slave_id_ = 1;\n  declareAndLoadParam(\"modbus_relay.slave_id\", slave_id_, slave_id_);\n\n  heartbeat_interval_ms_ = 1000;\n  declareAndLoadParam(\"modbus_relay.heartbeat_interval_ms\", heartbeat_interval_ms_, heartbeat_interval_ms_);\n\n  connect_on_init_ = true;\n  declareAndLoadParam(\"modbus_relay.connect_on_init\", connect_on_init_, connect_on_init_);\n\n  RCLCPP_INFO(getLogger(), \"[CpModbusConnection] Config: %s:%d (slave=%d, heartbeat=%dms)\",\n    ip_address_.c_str(), port_, slave_id_, heartbeat_interval_ms_);\n\n  // Set update period for heartbeat\n  this->setUpdatePeriod(rclcpp::Duration::from_seconds(heartbeat_interval_ms_ / 1000.0));\n\n  // Create modbus context\n  ctx_ = modbus_new_tcp(ip_address_.c_str(), port_);\n  if (ctx_)\n  {\n    modbus_set_slave(ctx_, slave_id_);\n    modbus_set_response_timeout(ctx_, 1, 0);  // 1 second timeout\n\n    if (connect_on_init_)\n    {\n      connect();\n    }\n  }\n  else\n  {\n    RCLCPP_ERROR(getLogger(), \"[CpModbusConnection] Failed to create modbus context\");\n  }\n}\n\ntemplate <typename T>\nvoid CpModbusConnection::declareAndLoadParam(const std::string& name, T& value, const T& default_val)\n{\n  auto node = getNode();\n  if (!node->has_parameter(name))\n  {\n    node->declare_parameter(name, default_val);\n  }\n  node->get_parameter(name, value);\n  RCLCPP_INFO(getLogger(), \"[CpModbusConnection] %s: %s\", name.c_str(), std::to_string(value).c_str());\n}\n```\n\n### Heartbeat Implementation (in update())\n\n```cpp\nvoid CpModbusConnection::update()\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n\n  if (!ctx_) return;\n\n  // Try to read a single coil as heartbeat\n  uint8_t status;\n  int rc = modbus_read_bits(ctx_, 0x0000, 1, &status);\n\n  if (rc == -1)\n  {\n    if (connected_)\n    {\n      connected_ = false;\n      RCLCPP_WARN(getLogger(), \"Modbus connection lost: %s\", modbus_strerror(errno));\n      onConnectionLost_();\n      if (postConnectionLostEvent_) postConnectionLostEvent_();\n    }\n  }\n  else\n  {\n    if (!connected_)\n    {\n      connected_ = true;\n      RCLCPP_INFO(getLogger(), \"Modbus connection restored\");\n      onConnectionRestored_();\n      if (postConnectionRestoredEvent_) postConnectionRestoredEvent_();\n    }\n  }\n}\n```\n\n---\n\n## package.xml\n\n```xml\n<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>cl_modbus_tcp_relay</name>\n  <version>1.0.0</version>\n  <description>SMACC2 client for Modbus TCP relay control (8-channel)</description>\n  <maintainer email=\"your-email@example.com\">Your Name</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n  <buildtool_depend>pkg-config</buildtool_depend>\n\n  <depend>smacc2</depend>\n\n  <!-- System dependency: sudo apt install libmodbus-dev -->\n  <build_depend>libmodbus-dev</build_depend>\n  <exec_depend>libmodbus5</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n```\n\n---\n\n## CMakeLists.txt\n\n**Prerequisites**: Install libmodbus via `sudo apt install libmodbus-dev`\n\n```cmake\ncmake_minimum_required(VERSION 3.5)\nproject(cl_modbus_tcp_relay)\n\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(PkgConfig REQUIRED)\n\n# Find system-installed libmodbus\npkg_check_modules(MODBUS REQUIRED libmodbus)\n\ninclude_directories(\n  include\n  ${smacc2_INCLUDE_DIRS}\n  ${MODBUS_INCLUDE_DIRS}\n)\n\nadd_library(${PROJECT_NAME}\n  src/cl_modbus_tcp_relay/cl_modbus_tcp_relay.cpp\n  src/cl_modbus_tcp_relay/components/cp_modbus_connection.cpp\n  src/cl_modbus_tcp_relay/components/cp_modbus_relay.cpp\n)\n\ntarget_link_libraries(${PROJECT_NAME}\n  ${smacc2_LIBRARIES}\n  ${MODBUS_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME} smacc2)\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\n\ninstall(DIRECTORY include/ DESTINATION include)\ninstall(TARGETS ${PROJECT_NAME} DESTINATION lib/)\n\nament_package()\n```\n\n---\n\n## Usage Example\n\n### YAML Configuration File\n\n```yaml\n# sm_relay_test/config/sm_relay_test_config.yaml\nsm_relay_test:\n  ros__parameters:\n    modbus_relay:\n      ip_address: \"192.168.1.254\"\n      port: 502\n      slave_id: 1\n      heartbeat_interval_ms: 1000\n      connect_on_init: true\n```\n\n### In Orthogonal Definition\n\n```cpp\nclass OrRelay : public smacc2::Orthogonal<OrRelay>\n{\npublic:\n  void onInitialize() override\n  {\n    // No constructor params - config loaded from YAML\n    auto relay_client = this->createClient<cl_modbus_tcp_relay::ClModbusTcpRelay>();\n  }\n};\n```\n\n### In State Definition\n\n```cpp\nstruct StActivateRelay : smacc2::SmaccState<StActivateRelay, SmRelayTest>\n{\n  using SmaccState::SmaccState;\n\n  using reactions = boost::mpl::list<\n    smacc2::Transition<EvCbSuccess<CbRelayOn, OrRelay>, StNextState>,\n    smacc2::Transition<EvCbFailure<CbRelayOn, OrRelay>, StError>,\n    smacc2::Transition<EvConnectionLost<CpModbusConnection, OrRelay>, StReconnect>\n  >;\n\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrRelay, cl_modbus_tcp_relay::CbRelayOn>(1);  // Turn on channel 1\n  }\n};\n```\n\n### In Launch File\n\n```python\n# sm_relay_test/launch/sm_relay_test.launch.py\ndef generate_launch_description():\n    # Load config file\n    config_file = os.path.join(\n        get_package_share_directory('sm_relay_test'),\n        'config',\n        'sm_relay_test_config.yaml'\n    )\n\n    return LaunchDescription([\n        Node(\n            package='sm_relay_test',\n            executable='sm_relay_test_node',\n            name='sm_relay_test',\n            output='screen',\n            parameters=[config_file]\n        )\n    ])\n```\n\n---\n\n## mbpoll CLI Reference\n\nFor manual testing and debugging:\n\n```bash\n# Read all 8 coil states\nmbpoll -m tcp -a 1 -t 0 -r 1 -c 8 192.168.1.254\n\n# Write single coil ON (channel 1)\nmbpoll -m tcp -a 1 -t 0 -r 1 192.168.1.254 1\n\n# Write single coil OFF (channel 1)\nmbpoll -m tcp -a 1 -t 0 -r 1 192.168.1.254 0\n\n# Write all coils ON\nmbpoll -m tcp -a 1 -t 0 -r 1 -c 8 192.168.1.254 1 1 1 1 1 1 1 1\n```\n\n---\n\n## Implementation Phases (Incremental Build & Test)\n\n### Phase 1: Package Skeleton & Minimal Client (COMPILES)\n**Goal:** Create package structure that compiles with empty client.\n\nFiles to create:\n- `cl_modbus_tcp_relay/package.xml`\n- `cl_modbus_tcp_relay/CMakeLists.txt`\n- `cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/cl_modbus_tcp_relay.hpp` (minimal)\n- `cl_modbus_tcp_relay/src/cl_modbus_tcp_relay/cl_modbus_tcp_relay.cpp` (minimal)\n\n**Build command:** `colcon build --packages-select cl_modbus_tcp_relay`\n\n---\n\n### Phase 2: CpModbusConnection Component (COMPILES)\n**Goal:** Connection management with libmodbus that compiles and loads config.\n\nFiles to create:\n- `cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/components/cp_modbus_connection.hpp`\n- `cl_modbus_tcp_relay/src/cl_modbus_tcp_relay/components/cp_modbus_connection.cpp`\n\nUpdate:\n- `cl_modbus_tcp_relay.hpp` to create CpModbusConnection in onComponentInitialization()\n\n**Build command:** `colcon build --packages-select cl_modbus_tcp_relay`\n\n---\n\n### Phase 3: Test State Machine - Connection Only (RUNS)\n**Goal:** Test state machine that connects to relay and monitors heartbeat.\n\nCreate new package: `sm_modbus_tcp_relay_test_1`\n\nFiles to create:\n- `sm_modbus_tcp_relay_test_1/package.xml`\n- `sm_modbus_tcp_relay_test_1/CMakeLists.txt`\n- `sm_modbus_tcp_relay_test_1/config/sm_modbus_tcp_relay_test_1_config.yaml`\n- `sm_modbus_tcp_relay_test_1/launch/sm_modbus_tcp_relay_test_1.launch.py`\n- `sm_modbus_tcp_relay_test_1/include/sm_modbus_tcp_relay_test_1/sm_modbus_tcp_relay_test_1.hpp`\n- `sm_modbus_tcp_relay_test_1/include/sm_modbus_tcp_relay_test_1/orthogonals/or_relay.hpp`\n- `sm_modbus_tcp_relay_test_1/include/sm_modbus_tcp_relay_test_1/states/st_connect.hpp`\n- `sm_modbus_tcp_relay_test_1/include/sm_modbus_tcp_relay_test_1/states/st_connected.hpp`\n- `sm_modbus_tcp_relay_test_1/src/sm_modbus_tcp_relay_test_1/sm_modbus_tcp_relay_test_1.cpp`\n\n**Build command:** `colcon build --packages-select cl_modbus_tcp_relay sm_modbus_tcp_relay_test_1`\n**Run command:** `ros2 launch sm_modbus_tcp_relay_test_1 sm_modbus_tcp_relay_test_1.launch.py`\n\n---\n\n### Phase 4: CpModbusRelay Component (COMPILES)\n**Goal:** Add relay read/write operations.\n\nFiles to create:\n- `cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/components/cp_modbus_relay.hpp`\n- `cl_modbus_tcp_relay/src/cl_modbus_tcp_relay/components/cp_modbus_relay.cpp`\n\nUpdate:\n- `cl_modbus_tcp_relay.hpp` to create CpModbusRelay in onComponentInitialization()\n\n**Build command:** `colcon build --packages-select cl_modbus_tcp_relay`\n\n---\n\n### Phase 5: CbRelayOn/CbRelayOff Behaviors (RUNS)\n**Goal:** Basic on/off behaviors with test states.\n\nFiles to create:\n- `cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/client_behaviors/cb_relay_on.hpp`\n- `cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/client_behaviors/cb_relay_off.hpp`\n\nUpdate test state machine:\n- Add `st_relay_on.hpp` - turns on channel 1\n- Add `st_relay_off.hpp` - turns off channel 1\n- Add transitions between states\n\n**Build command:** `colcon build --packages-select cl_modbus_tcp_relay sm_modbus_tcp_relay_test_1`\n**Run command:** `ros2 launch sm_modbus_tcp_relay_test_1 sm_modbus_tcp_relay_test_1.launch.py`\n\n---\n\n### Phase 6: CbAllRelaysOn/CbAllRelaysOff (RUNS)\n**Goal:** Batch relay operations.\n\nFiles to create:\n- `cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/client_behaviors/cb_all_relays_on.hpp`\n- `cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/client_behaviors/cb_all_relays_off.hpp`\n\nUpdate test state machine:\n- Add test states for all-on/all-off operations\n\n**Build command:** `colcon build --packages-select cl_modbus_tcp_relay sm_modbus_tcp_relay_test_1`\n\n---\n\n### Phase 7: CbRelayStatus Behavior (RUNS)\n**Goal:** Status reading behavior.\n\nFiles to create:\n- `cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/client_behaviors/cb_relay_status.hpp`\n\nUpdate test state machine:\n- Add status monitoring state\n\n**Build command:** `colcon build --packages-select cl_modbus_tcp_relay sm_modbus_tcp_relay_test_1`\n\n---\n\n### Phase 8: Documentation & README (COMPLETE)\n**Goal:** Complete documentation.\n\nFiles to create:\n- `cl_modbus_tcp_relay/README.md`\n- `sm_modbus_tcp_relay_test_1/README.md`\n\n---\n\n## Test State Machine: sm_modbus_tcp_relay_test_1\n\n### State Machine Design\n\n```\n┌─────────────────┐\n│   StConnect     │ ── EvCbSuccess ──► StRelayOn\n│  (wait connect) │ ── EvConnectionLost ──► StConnect (retry)\n└─────────────────┘\n        │\n        ▼\n┌─────────────────┐\n│   StRelayOn     │ ── EvCbSuccess ──► StWait1\n│  (channel 1 ON) │ ── EvCbFailure ──► StError\n└─────────────────┘\n        │\n        ▼\n┌─────────────────┐\n│    StWait1      │ ── EvTimer ──► StRelayOff\n│  (2 sec delay)  │\n└─────────────────┘\n        │\n        ▼\n┌─────────────────┐\n│   StRelayOff    │ ── EvCbSuccess ──► StWait2\n│  (channel 1 OFF)│ ── EvCbFailure ──► StError\n└─────────────────┘\n        │\n        ▼\n┌─────────────────┐\n│    StWait2      │ ── EvTimer ──► StAllOn\n│  (2 sec delay)  │\n└─────────────────┘\n        │\n        ▼\n┌─────────────────┐\n│    StAllOn      │ ── EvCbSuccess ──► StWait3\n│  (all channels) │\n└─────────────────┘\n        │\n        ▼\n┌─────────────────┐\n│    StWait3      │ ── EvTimer ──► StAllOff\n│  (2 sec delay)  │\n└─────────────────┘\n        │\n        ▼\n┌─────────────────┐\n│    StAllOff     │ ── EvCbSuccess ──► StComplete\n│  (all channels) │\n└─────────────────┘\n        │\n        ▼\n┌─────────────────┐\n│   StComplete    │ ── (logs success, stays) ───►\n│  (test passed)  │\n└─────────────────┘\n```\n\n### Test State Machine Config\n\n```yaml\n# sm_modbus_tcp_relay_test_1/config/sm_modbus_tcp_relay_test_1_config.yaml\nsm_modbus_tcp_relay_test_1:\n  ros__parameters:\n    # Modbus relay configuration\n    modbus_relay:\n      ip_address: \"192.168.1.254\"\n      port: 502\n      slave_id: 1\n      heartbeat_interval_ms: 1000\n      connect_on_init: true\n\n    # Timer configuration for wait states\n    wait_duration_ms: 2000\n```\n\n### Test State Machine Package Structure\n\n```\nsmacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/\n├── config/\n│   └── sm_modbus_tcp_relay_test_1_config.yaml\n├── include/sm_modbus_tcp_relay_test_1/\n│   ├── orthogonals/\n│   │   ├── or_relay.hpp\n│   │   └── or_timer.hpp\n│   ├── states/\n│   │   ├── st_connect.hpp\n│   │   ├── st_relay_on.hpp\n│   │   ├── st_relay_off.hpp\n│   │   ├── st_all_on.hpp\n│   │   ├── st_all_off.hpp\n│   │   ├── st_wait.hpp\n│   │   ├── st_complete.hpp\n│   │   └── st_error.hpp\n│   └── sm_modbus_tcp_relay_test_1.hpp\n├── launch/\n│   └── sm_modbus_tcp_relay_test_1.launch.py\n├── src/sm_modbus_tcp_relay_test_1/\n│   └── sm_modbus_tcp_relay_test_1.cpp\n├── CMakeLists.txt\n├── package.xml\n└── README.md\n```\n\n---\n\n## Files to Create\n\n### Client Library: `src/SMACC2/smacc2_client_library/cl_modbus_tcp_relay/`\n\n| File | Purpose |\n|------|---------|\n| `package.xml` | ROS2 package manifest |\n| `CMakeLists.txt` | Build configuration with libmodbus |\n| `include/cl_modbus_tcp_relay/cl_modbus_tcp_relay.hpp` | Main client |\n| `include/cl_modbus_tcp_relay/components/cp_modbus_connection.hpp` | Connection component |\n| `include/cl_modbus_tcp_relay/components/cp_modbus_relay.hpp` | Relay control component |\n| `include/cl_modbus_tcp_relay/client_behaviors/cb_relay_on.hpp` | Turn on behavior |\n| `include/cl_modbus_tcp_relay/client_behaviors/cb_relay_off.hpp` | Turn off behavior |\n| `include/cl_modbus_tcp_relay/client_behaviors/cb_all_relays_on.hpp` | All on behavior |\n| `include/cl_modbus_tcp_relay/client_behaviors/cb_all_relays_off.hpp` | All off behavior |\n| `include/cl_modbus_tcp_relay/client_behaviors/cb_relay_status.hpp` | Status read behavior |\n| `src/cl_modbus_tcp_relay/cl_modbus_tcp_relay.cpp` | Client implementation |\n| `src/cl_modbus_tcp_relay/components/cp_modbus_connection.cpp` | Connection impl |\n| `src/cl_modbus_tcp_relay/components/cp_modbus_relay.cpp` | Relay control impl |\n| `README.md` | Documentation with mbpoll examples |\n\n### Test State Machine: `src/SMACC2/smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/`\n\n| File | Purpose |\n|------|---------|\n| `package.xml` | ROS2 package manifest |\n| `CMakeLists.txt` | Build configuration |\n| `config/sm_modbus_tcp_relay_test_1_config.yaml` | Modbus & timer config |\n| `launch/sm_modbus_tcp_relay_test_1.launch.py` | Launch file |\n| `include/sm_modbus_tcp_relay_test_1/sm_modbus_tcp_relay_test_1.hpp` | Main SM header |\n| `include/sm_modbus_tcp_relay_test_1/orthogonals/or_relay.hpp` | Relay orthogonal |\n| `include/sm_modbus_tcp_relay_test_1/orthogonals/or_timer.hpp` | Timer orthogonal |\n| `include/sm_modbus_tcp_relay_test_1/states/st_connect.hpp` | Initial connection state |\n| `include/sm_modbus_tcp_relay_test_1/states/st_relay_on.hpp` | Turn on channel 1 |\n| `include/sm_modbus_tcp_relay_test_1/states/st_relay_off.hpp` | Turn off channel 1 |\n| `include/sm_modbus_tcp_relay_test_1/states/st_all_on.hpp` | Turn on all channels |\n| `include/sm_modbus_tcp_relay_test_1/states/st_all_off.hpp` | Turn off all channels |\n| `include/sm_modbus_tcp_relay_test_1/states/st_wait.hpp` | Timer wait state (template) |\n| `include/sm_modbus_tcp_relay_test_1/states/st_complete.hpp` | Test complete state |\n| `include/sm_modbus_tcp_relay_test_1/states/st_error.hpp` | Error handling state |\n| `src/sm_modbus_tcp_relay_test_1/sm_modbus_tcp_relay_test_1.cpp` | Main SM source |\n| `README.md` | Test instructions |\n\n---\n\n## Reference Files (for implementation patterns)\n\n- `src/SMACC2/smacc2_client_library/cl_http/include/cl_http/cl_http.hpp`\n- `src/SMACC2/smacc2_client_library/cl_http/include/cl_http/components/cp_http_connection_manager.hpp`\n- `src/SMACC2/smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_activate.hpp`\n- `src/SMACC2/smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/components/cp_timer_listener_1.hpp`\n- `src/libmodbus/src/modbus.h`\n- `src/libmodbus/src/modbus-tcp.h`\n"
  },
  {
    "path": "smacc2/CHANGELOG.rst",
    "content": "Changelog for package smacc2\n================================\n\n3.0.1 (2025-01-16)\n-------------------\n### Added\n- **ROS2 Jazzy Support**: Official support for ROS2 Jazzy Jalisco\n\n  SMACC2 now defaults to ROS2 Jazzy (Ubuntu 24.04 Noble) as the primary development branch.\n  This marks the transition to the latest LTS ROS2 distribution with improved performance\n  and new features.\n\n### Fixed\n- **CI Format Pipeline**: Fixed PEP 668 externally-managed-environment errors in GitHub Actions\n\n  Updated CI workflow and documentation to use apt-installed `pre-commit` and `clang-format`\n  instead of pip, ensuring compatibility with Ubuntu 24.04's PEP 668 Python packaging\n  restrictions. This provides a more robust and future-proof CI/CD pipeline.\n\n  - Updated `.github/workflows/ci-format.yml` to install pre-commit via apt\n  - Updated `CONTRIBUTING.md` with correct installation instructions\n  - Updated `README.md` to include development tools in setup instructions\n\n### Documentation\n- Enhanced developer documentation for Ubuntu 24.04+ environments\n- Added comprehensive PEP 668 compliance documentation\n\n### Contributors\n- Brett Aldrich (@brettpac)\n\n2.3.20 (2025-11-01)\n-------------------\n### Fixed\n- **CRITICAL**: Fix double onExit() calls in client behaviors (`#556 <https://github.com/robosoft-ai/SMACC2/issues/556>`_, `#558 <https://github.com/robosoft-ai/SMACC2/issues/558>`_)\n\n  Client behavior's onExit method was being invoked twice during state transitions due to\n  duplicate notifyOnStateExitting() call. This caused issues including deadlocks in behaviors\n  with thread joins in onExit. Fixed by removing redundant call outside mutex lock.\n\n  - Root cause identified by @yassiezar\n  - Issue reported in apt packages by @Crowdedlight\n\n- Fix toggle functionality (`#587 <https://github.com/robosoft-ai/SMACC2/issues/587>`_)\n\n### Added\n- New cl_moveit2z client library (`#638 <https://github.com/robosoft-ai/SMACC2/issues/638>`_)\n- New cl_keyboard client and removal of sm_pubsub_1 (`#621 <https://github.com/robosoft-ai/SMACC2/issues/621>`_)\n- New cl_ros2_timer unit test (`#616 <https://github.com/robosoft-ai/SMACC2/issues/616>`_)\n- Nova Carter navigation behaviors (`#608 <https://github.com/robosoft-ai/SMACC2/issues/608>`_)\n- Progress on requiresComponent (`#628 <https://github.com/robosoft-ai/SMACC2/issues/628>`_)\n\n### Changed\n- Refactoring of cl_moveit2z to component-based architecture & header-only implementation (`#639 <https://github.com/robosoft-ai/SMACC2/issues/639>`_)\n- Refactoring cl_nav2z to remove legacy API support and update client behaviors (`#625 <https://github.com/robosoft-ai/SMACC2/issues/625>`_)\n- Refactor of cl_nav2z to component-based architecture (`#624 <https://github.com/robosoft-ai/SMACC2/issues/624>`_)\n- Refactor of cl_nav2z, moved cp_nav2_action_interface.hpp into folder (`#626 <https://github.com/robosoft-ai/SMACC2/issues/626>`_)\n- Refactor of cl_ros2_timer namespace structure (include paths) (`#623 <https://github.com/robosoft-ai/SMACC2/issues/623>`_)\n- Refactored cl_ros2_timer components to header-only (`#619 <https://github.com/robosoft-ai/SMACC2/issues/619>`_)\n- Refactoring cl_ros2_timer to component-based architecture (`#618 <https://github.com/robosoft-ai/SMACC2/issues/618>`_)\n- Refactoring cl_ros2_timer to header-lite (`#617 <https://github.com/robosoft-ai/SMACC2/issues/617>`_)\n- Final keyboard client refactor changes with formatting (`#599 <https://github.com/robosoft-ai/SMACC2/issues/599>`_)\n- Refactor keyboard client to remove cb.cpp file (`#609 <https://github.com/robosoft-ai/SMACC2/issues/609>`_)\n- Refactoring: renaming onOrthogonalAllocation (`#600 <https://github.com/robosoft-ai/SMACC2/issues/600>`_)\n- Refactor base components (`#606 <https://github.com/robosoft-ai/SMACC2/issues/606>`_)\n- sm_panda_moveit2z_cb_inventory refactor (`#633 <https://github.com/robosoft-ai/SMACC2/issues/633>`_)\n- Moving reference library from ros_timer_client and keyboard_client to cl_ros2_timer and cl_keyboard (`#645 <https://github.com/robosoft-ai/SMACC2/issues/645>`_)\n- Trimming sm_atomic_services and sm_atomic_24hr from sm_reference_library (`#644 <https://github.com/robosoft-ai/SMACC2/issues/644>`_)\n- Update ROS distribution from Galactic to Humble (`#631 <https://github.com/robosoft-ai/SMACC2/issues/631>`_)\n- Update include path for cl_ros2_timer (`#629 <https://github.com/robosoft-ai/SMACC2/issues/629>`_)\n\n### Documentation\n- Updating CLAUDE.md files (`#643 <https://github.com/robosoft-ai/SMACC2/issues/643>`_)\n- CLAUDE.MD file for client behavior libraries (`#586 <https://github.com/robosoft-ai/SMACC2/issues/586>`_)\n- Fixing sm readmes (`#632 <https://github.com/robosoft-ai/SMACC2/issues/632>`_)\n- Updating sm_simple_action_client launch file (`#642 <https://github.com/robosoft-ai/SMACC2/issues/642>`_)\n- Update README.md (`#576 <https://github.com/robosoft-ai/SMACC2/issues/576>`_)\n\n### Contributors\n- Pablo Iñigo Blasco (@pabloinigoblasco)\n- Brett Aldrich (@brettpac)\n- Jaycee Lock (@yassiezar)\n- Crowdedlight (@Crowdedlight)\n\n0.4.0 (2022-04-04)\n------------------\n### Added\n- Feature/fixing type string walker (`#263 <https://github.com/StoglRobotics-forks/SMACC2/issues/263>`_)\n- Feature/fixing husky build rolling (`#258 <https://github.com/StoglRobotics-forks/SMACC2/issues/258>`_)\n- Merging code from backport foxy and updates about autoware (`#208 <https://github.com/StoglRobotics-forks/SMACC2/issues/208>`_)\n- wharehouse2 progress (`#179 <https://github.com/StoglRobotics-forks/SMACC2/issues/179>`_)\n- Feature/aws navigation sm dance bot (`#174 <https://github.com/StoglRobotics-forks/SMACC2/issues/174>`_)\n- Feature/sm dance bot strikes back refactoring (`#152 <https://github.com/StoglRobotics-forks/SMACC2/issues/152>`_)\n- Feature/cb pause slam (`#98 <https://github.com/StoglRobotics-forks/SMACC2/issues/98>`_)\n- Merge branch 'renameTracingEvents' of https://github.com/DecDury/SMACC2 into DecDury-renameTracingEvents\n\n### Contributors\n- David Revay, DecDury, Denis Štogl, Pablo Iñigo Blasco, pabloinigoblasco, reelrbtx\n\n0.1.0 (2021-08-31)\n------------------\n### Added\n- Initial release of SMACC2 core\n\n### Contributors\n- Brett Aldrich, Pablo Inigo Blasco, Denis Štogl\n\n2.3.16 (2023-07-16)\n-------------------\n### Added\n- Merge branch 'humble' of https://github.com/robosoft-ai/SMACC2 into humble\n\n### Fixed\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempt to fix weird issue with ros buildfarm\n  - More on this buildfarm issue\n\n### Contributors\n- brettpac, pabloinigoblasco\n\n2.3.6 (2023-03-12)\n------------------\n\n1.22.1 (2022-11-09)\n-------------------\n### Added\n- pre-release\n\n### Contributors\n- pabloinigoblasco\n\n0.0.0 (2021-08-30)\n------------------\n### Added\n- Initial release of SMACC2 core\n\n### Contributors\n- Pablo Inigo Blasco\n"
  },
  {
    "path": "smacc2/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(smacc2)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(rclcpp REQUIRED)\nfind_package(rclcpp_action REQUIRED)\nfind_package(smacc2_msgs REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\nfind_package(tracetools)\nfind_package(LTTngUST REQUIRED)\n\nset(dependencies\n  rclcpp\n  smacc2_msgs\n  rclcpp_action\n  tracetools\n)\n\ninclude_directories(include ${LTTNGUST_INCLUDE_DIRS})\n\nfile(GLOB_RECURSE SRC_FILES src *.cpp)\nadd_library(smacc2 SHARED ${SRC_FILES})\n\n# removes unused parameters warning related with lttng, compiler warning\nset_source_files_properties(\n  src/smacc2/smacc_tracing.cpp\n  PROPERTIES\n  COMPILE_FLAGS \"-Wno-unused-parameter\"\n)\n\nament_target_dependencies(smacc2 ${dependencies})\ntarget_link_libraries(smacc2\n  ${Boost_LIBRARIES}\n  ${LTTNGUST_LIBRARIES}\n)\n\nament_export_include_directories(include)\nament_export_libraries(smacc2)\nament_export_dependencies(${dependencies})\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(TARGETS\n  smacc2\n  DESTINATION lib/)\n\ninstall(FILES\n  scripts/trace.sh\n  PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE\n  DESTINATION lib/${PROJECT_NAME}\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2/include/smacc2/callback_counter_semaphore.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <condition_variable>\n#include <iostream>\n#include <mutex>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc_signal.hpp>\n#include <thread>\n\nnamespace smacc2\n{\nclass CallbackCounterSemaphore\n{\npublic:\n  CallbackCounterSemaphore(std::string name, int count = 0);\n  bool acquire();\n\n  void release();\n\n  void finalize();\n\n  void addConnection(smacc2::SmaccSignalConnection conn);\n\nprivate:\n  int count_;\n  std::mutex mutex_;\n  std::condition_variable cv_;\n  std::vector<smacc2::SmaccSignalConnection> connections_;\n  bool finalized = false;\n  std::string name_;\n};\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_bases/smacc_action_client.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/smacc_client.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n\n#include <rclcpp_action/client.hpp>\n\nnamespace smacc2\n{\nnamespace client_bases\n{\n// This class interface shows the basic set of methods that\n// a SMACC \"resource\" or \"plugin\" Action Client has\nclass ISmaccActionClient : public ISmaccClient\n{\npublic:\n  ISmaccActionClient();\n\n  // The destructor. This is called when the object is not\n  // referenced anymore by its owner\n  virtual ~ISmaccActionClient();\n\n  // Gets the ros path of the action...\n  inline std::string getNamespace() const { return name_; }\n\n  virtual bool cancelGoal() = 0;\n\n  virtual std::shared_ptr<rclcpp_action::ClientBase> getClientBase() = 0;\n\n  virtual std::string getName() const { return name_; }\n\nprotected:\n  // The ros path where the action server is located\n  std::string name_;\n};\n}  // namespace client_bases\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_bases/smacc_action_client_base.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/client_bases/smacc_action_client.hpp>\n#include <smacc2/smacc_default_events.hpp>\n#include <smacc2/smacc_signal.hpp>\n\n#include <optional>\n#include <rclcpp_action/rclcpp_action.hpp>\n\nnamespace smacc2\n{\nnamespace client_bases\n{\nusing namespace smacc2::default_events;\n\ntemplate <typename ActionType>\nclass SmaccActionClientBase : public ISmaccActionClient\n{\npublic:\n  // Inside this macro you can find the typedefs for Goal and other types\n  // ACTION_DEFINITION(ActionType);\n  typedef rclcpp_action::Client<ActionType> ActionClient;\n  // typedef actionlib::SimpleActionClient<ActionType> GoalHandle;\n\n  // typedef typename ActionClient::SimpleDoneCallback SimpleDoneCallback;\n  // typedef typename ActionClient::SimpleActiveCallback SimpleActiveCallback;\n  // typedef typename ActionClient::SimpleFeedbackCallback SimpleFeedbackCallback;\n\n  using Goal = typename ActionClient::Goal;\n  using Feedback = typename ActionClient::Feedback;\n  using GoalHandle = rclcpp_action::ClientGoalHandle<ActionType>;\n  typedef typename GoalHandle::WrappedResult WrappedResult;\n\n  using SendGoalOptions = typename ActionClient::SendGoalOptions;\n  using GoalResponseCallback =\n    std::function<void(std::shared_future<typename GoalHandle::SharedPtr>)>;\n  using FeedbackCallback = typename GoalHandle::FeedbackCallback;\n  using ResultCallback = typename GoalHandle::ResultCallback;\n  using CancelRequest = typename ActionType::Impl::CancelGoalService::Request;\n  using CancelResponse = typename ActionType::Impl::CancelGoalService::Response;\n  using CancelCallback = std::function<void(typename CancelResponse::SharedPtr)>;\n\n  typedef smacc2::SmaccSignal<void(const WrappedResult &)> SmaccActionResultSignal;\n\n  std::string action_endpoint_;\n  SmaccActionClientBase(std::string actionServerName) : ISmaccActionClient()\n  {\n    action_endpoint_ = actionServerName;\n  }\n\n  SmaccActionClientBase() : ISmaccActionClient() { name_ = \"\"; }\n\n  virtual ~SmaccActionClientBase() {}\n\n  virtual std::shared_ptr<rclcpp_action::ClientBase> getClientBase() override { return client_; }\n\n  void onInitialize() override\n  {\n    if (name_ == \"\") name_ = smacc2::demangleSymbol(typeid(*this).name());\n    this->client_ = rclcpp_action::create_client<ActionType>(getNode(), action_endpoint_);\n    // RCLCPP_INFO_STREAM(\n    //   this->getLogger(),\n    //   \"Waiting for action server '\" << name_ << \"' of type: \" << demangledTypeName<ActionType>());\n    //client_->wait_for_action_server();\n  }\n\n  void waitForServer()\n  {\n    RCLCPP_INFO_STREAM(\n      this->getLogger(),\n      \"Waiting for action server '\" << name_ << \"' of type: \" << demangledTypeName<ActionType>());\n    client_->wait_for_action_server();\n  }\n\n  static std::string getEventLabel()\n  {\n    auto type = TypeInfo::getTypeInfoFromType<ActionType>();\n    return type->getNonTemplatedTypeName();\n  }\n\n  std::optional<std::shared_future<typename GoalHandle::SharedPtr>> lastRequest_;\n  // typename GoalHandle::SharedPtr goalHandle_;\n  std::optional<std::shared_future<typename CancelResponse::SharedPtr>> lastCancelResponse_;\n\n  SmaccActionResultSignal onSucceeded_;\n  SmaccActionResultSignal onAborted_;\n  // SmaccActionResultSignal onPreempted_;\n  // SmaccActionResultSignal onRejected_;\n  SmaccActionResultSignal onCancelled_;\n\n  // event creation/posting factory functions\n  std::function<void(WrappedResult)> postSuccessEvent;\n  std::function<void(WrappedResult)> postAbortedEvent;\n  std::function<void(WrappedResult)> postCancelledEvent;\n  // std::function<void(WrappedResult)> postPreemptedEvent;\n  // std::function<void(WrappedResult)> postRejectedEvent;\n\n  std::function<void(const Feedback &)> postFeedbackEvent;\n\n  FeedbackCallback feedback_cb;\n\n  template <typename EvType>\n  void postResultEvent(WrappedResult & /*result*/)\n  {\n    auto * ev = new EvType();\n    // ev->client = this;\n    // ev->resultMessage = *result;\n    RCLCPP_INFO(\n      getLogger(), \"Action client Posting EVENT %s\", demangleSymbol(typeid(ev).name()).c_str());\n    this->postEvent(ev);\n  }\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    // we create here all the event factory functions capturing the TOrthogonal\n    postSuccessEvent = [this](auto msg)\n    { this->postResultEvent<EvActionSucceeded<TSourceObject, TOrthogonal>>(msg); };\n    postAbortedEvent = [this](auto msg)\n    { this->postResultEvent<EvActionAborted<TSourceObject, TOrthogonal>>(msg); };\n\n    postCancelledEvent = [this](auto msg)\n    { this->postResultEvent<EvActionCancelled<TSourceObject, TOrthogonal>>(msg); };\n\n    postFeedbackEvent = [this](auto msg)\n    {\n      auto actionFeedbackEvent = new EvActionFeedback<Feedback, TOrthogonal>();\n      actionFeedbackEvent->client = this;\n      actionFeedbackEvent->feedbackMessage = msg;\n      this->postEvent(actionFeedbackEvent);\n      RCLCPP_DEBUG(getLogger(), \"[%s] FEEDBACK EVENT\", demangleType(typeid(*this)).c_str());\n    };\n\n    feedback_cb = [this](auto client, auto feedback) { this->onFeedback(client, feedback); };\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onSucceeded(void (T::*callback)(WrappedResult &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onSucceeded_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onSucceeded(std::function<void(WrappedResult &)> callback)\n  {\n    return this->getStateMachine()->createSignalConnection(onSucceeded_, callback);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onAborted(void (T::*callback)(WrappedResult &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onAborted_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onAborted(std::function<void(WrappedResult &)> callback)\n  {\n    return this->getStateMachine()->createSignalConnection(onAborted_, callback);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onCancelled(void (T::*callback)(WrappedResult &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onCancelled_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onCancelled(std::function<void(WrappedResult &)> callback)\n  {\n    return this->getStateMachine()->createSignalConnection(onCancelled_, callback);\n  }\n\n  /*\n  template <typename T>\n  smacc2::SmaccSignalConnection onPreempted(void (T::*callback)(WrappedResult &), T *object)\n  {\n      return this->getStateMachine()->createSignalConnection(onPreempted_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onPreempted(std::function<void(WrappedResult &)> callback)\n  {\n      return this->getStateMachine()->createSignalConnection(onPreempted_, callback);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onRejected(void (T::*callback)(WrappedResult &), T *object)\n  {\n      return this->getStateMachine()->createSignalConnection(onRejected_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onRejected(std::function<void(WrappedResult &)> callback)\n  {\n      return this->getStateMachine()->createSignalConnection(onRejected_, callback);\n  }\n  */\n\n  virtual bool cancelGoal() override\n  {\n    lastCancelResponse_ = this->client_->async_cancel_all_goals();\n\n    // if (lastRequest_ && lastRequest_->valid())\n    // {\n\n    //   // rclcpp::spin_until_future_complete(getNode(), *lastRequest_);\n    //   auto req = lastRequest_->get();\n    //   RCLCPP_INFO_STREAM(\n    //     getLogger(), \"[\" << getName() << \"] Cancelling goal. req id: \"\n    //                      << rclcpp_action::to_string(req->get_goal_id()));\n    //   auto cancelresult = client_->async_cancel_goal(req);\n\n    //   // wait actively\n    //   // rclcpp::spin_until_future_complete(getNode(), cancelresult);\n    //   //lastRequest_.reset();\n    //   return true;\n    // }\n    // else\n    // {\n    //   RCLCPP_ERROR(\n    //     getLogger(), \"%s [at %s]: not connected with actionserver, skipping cancel goal ...\",\n    //     getName().c_str(), getNamespace().c_str());\n    //   return false;\n    // }\n\n    return true;\n  }\n\n  std::shared_future<typename GoalHandle::SharedPtr> sendGoal(\n    Goal & goal, typename SmaccActionResultSignal::WeakPtr resultCallback =\n                   typename SmaccActionResultSignal::WeakPtr())\n  //ResultCallback resultCallback = nullptr)  // bug related with the cancel action and the issue\n  {\n    // client_->sendGoal(goal, result_cb, active_cb, feedback_cb);\n    // std::shared_future<typename GoalHandle::SharedPtr>\n\n    SendGoalOptions options;\n\n    // GoalResponseCallback\n    // options.goal_response_callback;\n\n    /// Function called whenever feedback is received for the goal.\n    // FeedbackCallback\n    options.feedback_callback = feedback_cb;\n\n    /// Function called when the result for the goal is received.\n    // ResultCallback result_callback;\n    // options.result_callback = result_cb;\n\n    options.result_callback =\n      [this, resultCallback](\n        const typename rclcpp_action::ClientGoalHandle<ActionType>::WrappedResult & result)\n    {\n      // TODO(#1652): a work around until rcl_action interface is updated\n      // if goal ids are not matched, the older goa call this callback so ignore the result\n      // if matched, it must be processed (including aborted)\n\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << getName() << \"]  Action result callback, getting shared future\");\n      // auto goalHandle = result->get();\n      // goalHandle_ = lastRequest_->get();\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << getName() << \"]  Action client Result goal id: \"\n                         << rclcpp_action::to_string(result.goal_id));\n\n      // if (goalHandle_->get_goal_id() == result.goal_id)\n      // {\n      //   // goal_result_available_ = true;\n      //   // result_ = result;\n      //   RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"]  Result CB Goal id matches with last request\");\n\n      auto resultCallbackPtr = resultCallback.lock();\n\n      if (resultCallbackPtr != nullptr)\n      {\n        RCLCPP_INFO_STREAM(\n          getLogger(), \"[\" << getName() << \"]  Result CB calling user callback:\"\n                           << demangleSymbol(typeid(*resultCallbackPtr).name()));\n        (*resultCallbackPtr)(result);\n      }\n      else\n      {\n        RCLCPP_INFO_STREAM(\n          getLogger(), \"[\" << getName() << \"]  Result CB calling default callback\");\n        this->onResult(result);\n      }\n\n      // }\n      // else\n      // {\n      //   RCLCPP_ERROR_STREAM(getLogger(), \"[\" << getName() << \"]  Result CB Goal id DOES NOT match with last request. Skipping, incorrect behavior.\");\n      // }\n    };\n\n    // if (lastRequest_ && lastRequest_->valid())\n    // {\n    //   RCLCPP_INFO_STREAM(getLogger(), getName() << \": checking previous request is really finished.\");\n    //   auto res = this->lastRequest_->get();\n    //   RCLCPP_INFO_STREAM(getLogger(), getName() << \": okay\");\n    // }\n    // else\n    // {\n    //   RCLCPP_INFO_STREAM(getLogger(), getName() << \": no previous request.\");\n    // }\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << getName() << \"] client ready clients: \"\n                       << this->client_->get_number_of_ready_clients());\n    RCLCPP_INFO_STREAM(\n      getLogger(),\n      \"[\" << getName() << \"] Waiting it is ready? \" << client_->action_server_is_ready());\n\n    RCLCPP_INFO_STREAM(getLogger(), getName() << \": async send goal.\");\n    auto lastRequest = this->client_->async_send_goal(goal, options);\n    this->lastRequest_ = lastRequest;\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << getName() << \"] Action request \"\n      // << rclcpp_action::to_string(this->goalHandle_->get_goal_id()) <<\". Goal sent to \" << this->action_endpoint_\n      // << \"\\\": \" << std::endl\n      // << goal\n    );\n\n    // if (client_->isServerConnected())\n    // {\n    // RCLCPP_INFO_STREAM(getLogger(), getName() << \": Goal sent:\" << goal);\n\n    // RCLCPP_INFO_STREAM(getLogger(), getName() << \": Goal Id: \"  <<\n    // rclcpp_action::to_string(lastRequest_->get()->get_goal_id()));\n\n    // for (auto& gh: this->goal_handles_)\n    // {\n\n    // }\n\n    // RCLCPP_INFO_STREAM(getLogger(), getName() << \": spinning until completed\");\n    // if (rclcpp::spin_until_future_complete(this->getNode(), lastRequest_, std::chrono::seconds(2))\n    // !=rclcpp::executor::FutureReturnCode::SUCCESS)\n    // {\n    //   throw std::runtime_error(\"send_goal failed\");\n    // }\n\n    // goalHandle_ = lastRequest_->get();\n    // if (!goalHandle_) {\n    //   throw std::runtime_error(\"Goal was rejected by the action server\");\n    // }\n\n    // }\n    // else\n    // {\n    //     RCLCPP_ERROR(getLogger(),\"%s [at %s]: not connected with actionserver, skipping goal request\n    //     ...\", getName().c_str(), getNamespace().c_str());\n    //     //client_->waitForServer();\n    // }\n\n    return lastRequest;\n  }\n\nprotected:\n  typename ActionClient::SharedPtr client_;\n\n  void onFeedback(\n    typename GoalHandle::SharedPtr /*goalhandle*/,\n    const std::shared_ptr<const Feedback> feedback_msg)\n  {\n    postFeedbackEvent(*feedback_msg);\n  }\n\n  void onResult(const WrappedResult & result_msg)\n  {\n    // auto *actionResultEvent = new EvActionResult<TDerived>();\n    // actionResultEvent->client = this;\n    // actionResultEvent->resultMessage = *result_msg;\n\n    // const auto &resultType = this->getState();\n    const auto & resultType = result_msg.code;\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << this->getName() << \"] response result [\"\n                       << rclcpp_action::to_string(result_msg.goal_id) << \"]: \" << (int)resultType);\n\n    if (resultType == rclcpp_action::ResultCode::SUCCEEDED)\n    {\n      RCLCPP_INFO(getLogger(), \"[%s] request result: Success\", this->getName().c_str());\n      onSucceeded_(result_msg);\n      postSuccessEvent(result_msg);\n    }\n    else if (resultType == rclcpp_action::ResultCode::ABORTED)\n    {\n      RCLCPP_INFO(getLogger(), \"[%s] request result: Aborted\", this->getName().c_str());\n      onAborted_(result_msg);\n      postAbortedEvent(result_msg);\n    }\n    else if (resultType == rclcpp_action::ResultCode::CANCELED)\n    {\n      RCLCPP_INFO(getLogger(), \"[%s] request result: Cancelled\", this->getName().c_str());\n      onCancelled_(result_msg);\n      postCancelledEvent(result_msg);\n    }\n    /*\n    else if (resultType == actionlib::SimpleClientGoalState::REJECTED)\n    {\n        RCLCPP_INFO(getLogger(),\"[%s] request result: Rejected\", this->getName().c_str());\n        onRejected_(result_msg);\n        postRejectedEvent(result_msg);\n    }\n    else if (resultType == actionlib::SimpleClientGoalState::PREEMPTED)\n    {\n        RCLCPP_INFO(getLogger(),\"[%s] request result: Preempted\", this->getName().c_str());\n        onPreempted_(result_msg);\n        postPreemptedEvent(result_msg);\n    }*/\n    else\n    {\n      RCLCPP_INFO(\n        getLogger(), \"[%s] request result: NOT HANDLED TYPE: %d\", this->getName().c_str(),\n        (int)resultType);\n    }\n  }\n};\n\n}  // namespace client_bases\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_bases/smacc_publisher_client.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <optional>\n#include <smacc2/smacc_client.hpp>\n\nnamespace smacc2\n{\nnamespace client_bases\n{\nclass SmaccPublisherClient : public smacc2::ISmaccClient\n{\npublic:\n  std::optional<std::string> topicName;\n  std::optional<int> queueSize;\n  std::optional<rmw_qos_durability_policy_t> durability;\n  std::optional<rmw_qos_reliability_policy_t> reliability;\n\n  SmaccPublisherClient();\n  virtual ~SmaccPublisherClient();\n\n  template <typename MessageType>\n  void configure(std::string topicName)\n  {\n    this->topicName = topicName;\n    if (!initialized_)\n    {\n      if (!this->topicName)\n      {\n        RCLCPP_ERROR(getLogger(), \"topic publisher with no topic name set. Skipping advertising.\");\n        return;\n      }\n\n      if (!queueSize) queueSize = 1;\n      if (!durability) durability = RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT;\n      if (!reliability) reliability = RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT;\n      rclcpp::SensorDataQoS qos;\n      qos.keep_last(*queueSize);\n      qos.durability(*durability);\n      qos.reliability(*reliability);\n\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << this->getName() << \"] Client Publisher to topic: \" << topicName);\n      pub_ = getNode()->create_publisher<MessageType>(*(this->topicName), qos);\n\n      this->initialized_ = true;\n    }\n  }\n\n  template <typename MessageType>\n  void publish(const MessageType & msg)\n  {\n    //pub_->publish(msg);\n    std::dynamic_pointer_cast<rclcpp::Publisher<MessageType>>(pub_)->publish(msg);\n  }\n\n  rclcpp::PublisherBase::SharedPtr pub_;\n\nprivate:\n  bool initialized_;\n};\n}  // namespace client_bases\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_bases/smacc_ros_launch_client.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/smacc_client.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n\n#include <rclcpp_action/client.hpp>\n#include <thread>\n\nnamespace smacc2\n{\nnamespace client_bases\n{\nclass ClRosLaunch : public ISmaccClient\n{\npublic:\n  ClRosLaunch(std::string packageName, std::string launchFilename);\n\n  virtual ~ClRosLaunch();\n\n  void launch();\n\n  void stop();\n\n  static std::future<std::string> executeRosLaunch(\n    std::string packageName, std::string launchFilename, std::function<bool()> cancelCondition);\n\n  std::string packageName_;\n\n  std::string launchFileName_;\n\nprotected:\n  std::future<std::string> result_;\n\n  typedef std::function<void> cancelCallback;\n\n  static std::map<std::future<void>, cancelCallback> detached_futures_;\n\n  std::atomic<bool> cancellationToken_ = ATOMIC_VAR_INIT(false);\n};\n}  // namespace client_bases\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_bases/smacc_ros_launch_client_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/smacc_client.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n\n#include <rclcpp_action/client.hpp>\n#include <thread>\n\nnamespace smacc2\n{\nnamespace client_bases\n{\nstruct ProcessInfo\n{\n  pid_t pid;    // PID del proceso hijo\n  FILE * pipe;  // Pipe para la salida del proceso hijo\n};\n\nProcessInfo runProcess(const char * command);\nvoid killGrandchildren(pid_t originalPid);\nvoid killProcessesRecursive(pid_t pid);\n\nclass ClRosLaunch2 : public ISmaccClient\n{\npublic:\n  ClRosLaunch2();\n\n  ClRosLaunch2(std::string packageName, std::string launchFilename);\n\n  virtual ~ClRosLaunch2();\n\n  void launch();\n\n  void stop();\n\n  static std::future<std::string> executeRosLaunch(\n    std::string packageName, std::string launchFilename, std::function<bool()> cancelCondition,\n    ClRosLaunch2 * client = nullptr);\n\n  // static std::string executeRosLaunch(\n  //    std::string packageName, std::string launchFilename, std::function<bool()> cancelCondition);\n\n  std::string packageName_;\n\n  std::string launchFileName_;\n\n  pid_t launchPid_;\n\nprotected:\n  // std::future<std::string> result_;\n  std::future<std::string> result_;\n\n  typedef std::function<void> cancelCallback;\n\n  static std::map<std::future<void>, cancelCallback> detached_futures_;\n\n  std::atomic<bool> cancellationToken_ = ATOMIC_VAR_INIT(false);\n};\n}  // namespace client_bases\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_bases/smacc_service_client.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <optional>\n#include <smacc2/smacc_client.hpp>\n\nnamespace smacc2\n{\nnamespace client_bases\n{\ntemplate <typename ServiceType>\nclass SmaccServiceClient : public smacc2::ISmaccClient\n{\npublic:\n  std::optional<std::string> serviceName_;\n\n  SmaccServiceClient(std::string serviceName) : serviceName_(serviceName) { initialized_ = false; }\n\n  SmaccServiceClient() { initialized_ = false; }\n\n  void onInitialize() override\n  {\n    if (!initialized_)\n    {\n      if (!serviceName_)\n      {\n        RCLCPP_ERROR(getLogger(), \"service client with no service name set. Skipping.\");\n      }\n      else\n      {\n        RCLCPP_INFO_STREAM(\n          getLogger(), \"[\" << this->getName() << \"] Client Service: \" << *serviceName_);\n        this->initialized_ = true;\n        client_ = getNode()->create_client<ServiceType>(*serviceName_);\n      }\n    }\n  }\n\n  std::shared_ptr<typename ServiceType::Response> call(\n    std::shared_ptr<typename ServiceType::Request> & request)\n  {\n    auto result = client_->async_send_request(request);\n    //rclcpp::spin_until_future_complete(getNode(), result);\n    return result.get();\n  }\n\nprotected:\n  //rclcpp::NodeHandle nh_;\n  std::shared_ptr<rclcpp::Client<ServiceType>> client_;\n  bool initialized_;\n};\n}  // namespace client_bases\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_bases/smacc_service_server_client.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <optional>\n#include <smacc2/smacc_client.hpp>\n#include <smacc2/smacc_signal.hpp>\n\nnamespace smacc2\n{\nnamespace client_bases\n{\ntemplate <typename TService>\nclass SmaccServiceServerClient : public smacc2::ISmaccClient\n{\n  using TServiceRequest = typename TService::Request;\n  using TServiceResponse = typename TService::Response;\n\npublic:\n  std::optional<std::string> serviceName_;\n  SmaccServiceServerClient() { initialized_ = false; }\n  SmaccServiceServerClient(std::string service_name)\n  {\n    serviceName_ = service_name;\n    initialized_ = false;\n  }\n\n  virtual ~SmaccServiceServerClient() {}\n\n  smacc2::SmaccSignal<void(\n    const std::shared_ptr<typename TService::Request>,\n    std::shared_ptr<typename TService::Response>)>\n    onServiceRequestReceived_;\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onServiceRequestReceived(\n    void (T::*callback)(\n      const std::shared_ptr<typename TService::Request>,\n      std::shared_ptr<typename TService::Response>),\n    T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(\n      onServiceRequestReceived_, callback, object);\n  }\n\n  void onInitialize() override\n  {\n    if (!initialized_)\n    {\n      if (!serviceName_)\n      {\n        RCLCPP_ERROR_STREAM(\n          getLogger(),\n          \"[\" << this->getName() << \"] service server with no service name set. Skipping.\");\n      }\n      else\n      {\n        RCLCPP_INFO_STREAM(\n          getLogger(), \"[\" << this->getName() << \"] Client Service: \" << *serviceName_);\n\n        server_ = getNode()->create_service<TService>(\n          *serviceName_, std::bind(\n                           &SmaccServiceServerClient<TService>::serviceCallback, this,\n                           std::placeholders::_1, std::placeholders::_2));\n\n        this->initialized_ = true;\n      }\n    }\n  }\n\nprivate:\n  void serviceCallback(\n    const std::shared_ptr<typename TService::Request> req,\n    std::shared_ptr<typename TService::Response> res)\n  {\n    onServiceRequestReceived_(req, res);\n  }\n  typename rclcpp::Service<TService>::SharedPtr server_;\n  bool initialized_;\n};\n}  // namespace client_bases\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_bases/smacc_subscriber_client.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <optional>\n#include <smacc2/smacc_client.hpp>\n#include <smacc2/smacc_signal.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n\nnamespace smacc2\n{\nnamespace client_bases\n{\nusing namespace smacc2::default_events;\n\n// This client class warps a ros subscriber and publishes two kind of\n// smacc events: EvTopicMessage (always a ros topic message is received)\n// and EvTopicInitialMessage (only once)\ntemplate <typename MessageType>\nclass SmaccSubscriberClient : public smacc2::ISmaccClient\n{\npublic:\n  std::optional<std::string> topicName;\n  std::optional<int> queueSize;\n\n  typedef MessageType TMessageType;\n\n  SmaccSubscriberClient() { initialized_ = false; }\n\n  SmaccSubscriberClient(std::string topicname)\n  {\n    initialized_ = false;\n    topicName = topicname;\n  }\n\n  virtual ~SmaccSubscriberClient() {}\n\n  smacc2::SmaccSignal<void(const MessageType &)> onFirstMessageReceived_;\n  smacc2::SmaccSignal<void(const MessageType &)> onMessageReceived_;\n\n  std::function<void(const MessageType &)> postMessageEvent;\n  std::function<void(const MessageType &)> postInitialMessageEvent;\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onMessageReceived(\n    void (T::*callback)(const MessageType &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onMessageReceived_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onFirstMessageReceived(\n    void (T::*callback)(const MessageType &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(\n      onFirstMessageReceived_, callback, object);\n  }\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    // ros topic message received smacc event callback\n    this->postMessageEvent = [this](auto msg)\n    {\n      auto event = new EvTopicMessage<TSourceObject, TOrthogonal>();\n      event->msgData = msg;\n      this->postEvent(event);\n    };\n\n    // initial ros topic message received smacc event callback\n    this->postInitialMessageEvent = [this](auto msg)\n    {\n      auto event = new EvTopicInitialMessage<TSourceObject, TOrthogonal>();\n      event->msgData = msg;\n      this->postEvent(event);\n    };\n  }\n\nprotected:\n  void onInitialize() override\n  {\n    if (!initialized_)\n    {\n      firstMessage_ = true;\n\n      if (!queueSize) queueSize = 1;\n\n      if (!topicName)\n      {\n        RCLCPP_ERROR(getLogger(), \"topic client with no topic name set. Skipping subscribing\");\n      }\n      else\n      {\n        RCLCPP_INFO_STREAM(\n          getLogger(), \"[\" << this->getName() << \"] Subscribing to topic: \" << *topicName);\n\n        rclcpp::SensorDataQoS qos;\n        if (queueSize) qos.keep_last(*queueSize);\n\n        std::function<void(typename MessageType::SharedPtr)> fn = [this](auto msg)\n        { this->messageCallback(*msg); };\n        sub_ = getNode()->create_subscription<MessageType>(*topicName, qos, fn);\n        this->initialized_ = true;\n      }\n    }\n  }\n\nprivate:\n  typename rclcpp::Subscription<MessageType>::SharedPtr sub_;\n  bool firstMessage_;\n  bool initialized_;\n\n  void messageCallback(const MessageType & msg)\n  {\n    if (firstMessage_)\n    {\n      postInitialMessageEvent(msg);\n      onFirstMessageReceived_(msg);\n      firstMessage_ = false;\n    }\n\n    postMessageEvent(msg);\n    onMessageReceived_(msg);\n  }\n};\n}  // namespace client_bases\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_behaviors/cb_call_service.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n#include <smacc2/impl/smacc_asynchronous_client_behavior_impl.hpp>\n#include <smacc2/smacc_client_behavior.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nusing namespace std::chrono_literals;\ntemplate <typename ServiceType>\nclass CbServiceCall : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbServiceCall(const char * serviceName) : serviceName_(serviceName)\n  {\n    request_ = std::make_shared<typename ServiceType::Request>();\n    pollRate_ = 100ms;\n  }\n\n  CbServiceCall(\n    const char * serviceName, std::shared_ptr<typename ServiceType::Request> request,\n    std::chrono::milliseconds pollRate = 100ms)\n  : serviceName_(serviceName), request_(request), result_(nullptr), pollRate_(pollRate)\n  {\n  }\n\n  void onEntry() override\n  {\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << this->getName() << \"] creating ros service client: \" << serviceName_);\n\n    client_ = getNode()->create_client<ServiceType>(serviceName_);\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << this->getName() << \"] making service request to \" << serviceName_);\n\n    resultFuture_ = client_->async_send_request(request_).future.share();\n\n    std::future_status status = resultFuture_.wait_for(0s);\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"thread state: \" << (int)status << \" ok \" << rclcpp::ok() << \" shutdown \"\n                                    << this->isShutdownRequested() << \"\");\n\n    while (status != std::future_status::ready && rclcpp::ok() && !this->isShutdownRequested())\n    {\n      RCLCPP_INFO_STREAM_THROTTLE(\n        getLogger(), *getNode()->get_clock(), 1000,\n        \"[\" << this->getName() << \"] waiting response \");\n      rclcpp::sleep_for(pollRate_);\n      status = resultFuture_.wait_for(0s);\n    }\n\n    if (status == std::future_status::ready)\n    {\n      RCLCPP_INFO_STREAM(getLogger(), \"[\" << this->getName() << \"] response received \");\n      result_ = resultFuture_.get();\n      onServiceResponse(result_);\n      this->postSuccessEvent();\n    }\n    else\n    {\n      RCLCPP_INFO_STREAM(getLogger(), \"[\" << this->getName() << \"] response not received \");\n      this->postFailureEvent();\n    }\n  }\n\n  std::shared_future<std::shared_ptr<typename ServiceType::Response>> resultFuture_;\n\nprotected:\n  //rclcpp::NodeHandle nh_;\n  std::shared_ptr<rclcpp::Client<ServiceType>> client_;\n  std::string serviceName_;\n  std::shared_ptr<typename ServiceType::Request> request_;\n  typename std::shared_ptr<typename ServiceType::Response> result_;\n  std::chrono::milliseconds pollRate_;\n\n  virtual void onServiceResponse(std::shared_ptr<typename ServiceType::Response> /*result*/)\n  {\n    RCLCPP_INFO_STREAM(getLogger(), \"[\" << this->getName() << \"] response received \");\n  }\n};\n\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_behaviors/cb_ros_launch.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <smacc2/client_bases/smacc_ros_launch_client.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nenum class RosLaunchMode\n{\n  LAUNCH_DETTACHED,\n  LAUNCH_CLIENT_BEHAVIOR_LIFETIME\n};\n\nclass CbRosLaunch : public smacc2::SmaccAsyncClientBehavior\n{\nprivate:\n  static std::vector<std::future<std::string>> detached_futures_;\n\npublic:\n  CbRosLaunch();\n\n  CbRosLaunch(std::string package, std::string launchfile, RosLaunchMode);\n\n  // CbRosLaunch(std::string packageName, std::string launchFileName);\n\n  virtual ~CbRosLaunch();\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n  }\n\n  void onEntry() override;\n\n  std::optional<std::string> packageName_;\n  std::optional<std::string> launchFileName_;\n\n  RosLaunchMode launchMode_;\n\nprotected:\n  std::string result_;\n\n  smacc2::client_bases::ClRosLaunch * client_;\n\n  std::future<std::string> future_;\n};\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_behaviors/cb_ros_launch_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <smacc2/client_bases/smacc_ros_launch_client_2.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nenum class RosLaunchMode\n{\n  LAUNCH_DETTACHED,\n  LAUNCH_CLIENT_BEHAVIOR_LIFETIME\n};\n\nclass CbRosLaunch2 : public smacc2::SmaccAsyncClientBehavior\n{\nprivate:\n  static std::vector<std::future<std::string>> detached_futures_;\n\npublic:\n  CbRosLaunch2();\n\n  CbRosLaunch2(std::string package, std::string launchfile, RosLaunchMode);\n\n  // CbRosLaunch2(std::string packageName, std::string launchFileName);\n\n  virtual ~CbRosLaunch2();\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n  }\n\n  void onEntry() override;\n\n  std::optional<std::string> packageName_;\n  std::optional<std::string> launchFileName_;\n\n  RosLaunchMode launchMode_;\n\nprotected:\n  std::future<std::string> result_;\n\n  smacc2::client_bases::ClRosLaunch2 * client_;\n\n  std::future<std::string> future_;\n};\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_behaviors/cb_ros_stop_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <smacc2/client_bases/smacc_ros_launch_client_2.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nclass CbRosStop2 : public smacc2::SmaccAsyncClientBehavior\n{\nprivate:\n  static std::vector<std::future<std::string>> detached_futures_;\n\npublic:\n  CbRosStop2();\n\n  CbRosStop2(pid_t launchPid);\n\n  // CbRosStop2(std::string packageName, std::string launchFileName);\n\n  virtual ~CbRosStop2();\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n  }\n\n  void onEntry() override;\n\n  std::optional<std::string> packageName_;\n  std::optional<std::string> launchFileName_;\n\nprotected:\n  std::future<std::string> result_;\n\n  smacc2::client_bases::ClRosLaunch2 * client_;\n\n  std::future<std::string> future_;\n};\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_behaviors/cb_sequence.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <functional>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nclass CbSequence : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbSequence();\n\n  // template <typename TOrthogonal, typename TBehavior>\n  // static void configure_orthogonal_runtime(\n  //   std::function<void(TBehavior & bh, MostDerived &)> initializationFunction)\n  // {\n  //   configure_orthogonal_internal<TOrthogonal, TBehavior>([=](ISmaccState * state) {\n  //     // auto bh = std::make_shared<TBehavior>(args...);\n  //     // auto bh = state->configure<TOrthogonal, TBehavior>();\n  //     initializationFunction(*bh, *(static_cast<MostDerived *>(state)));\n  //   });\n  // }\n\n  void onEntry() override;\n\n  void onExit() override { sequenceNodes_.clear(); }\n\n  template <typename TOrthogonal, typename TBehavior, typename... Args>\n  CbSequence * then(Args &&... args)\n  {\n    std::function<std::shared_ptr<smacc2::SmaccAsyncClientBehavior>()> delayedCBFactoryFn =\n      [this, args...]()\n    {\n      RCLCPP_INFO(\n        getLogger(), \"[CbSequence] then creating new sub behavior %s \",\n        demangleSymbol<TBehavior>().c_str());\n      auto createdBh = std::shared_ptr<TBehavior>(new TBehavior(args...));\n\n      this->getCurrentState()->getOrthogonal<TOrthogonal>()->addClientBehavior(createdBh);\n      createdBh->template onStateOrthogonalAllocation<TOrthogonal, TBehavior>();\n\n      return createdBh;\n    };\n\n    sequenceNodes_.push_back(delayedCBFactoryFn);\n\n    return this;\n  }\n\nprivate:\n  void onSubNodeSuccess();\n  void onSubNodeAbort();\n  void recursiveConsumeNext();\n\n  std::list<std::function<std::shared_ptr<smacc2::SmaccAsyncClientBehavior>()>> sequenceNodes_;\n  smacc2::SmaccSignalConnection conn_;\n  smacc2::SmaccSignalConnection conn2_;\n\n  std::shared_ptr<smacc2::SmaccAsyncClientBehavior> bh_;\n  std::atomic<int> consume_{0};\n};\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_behaviors/cb_service_server_callback_base.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <smacc2/smacc_client_behavior.hpp>\n\nnamespace smacc2\n{\ntemplate <typename TService>\nclass CbServiceServerCallbackBase : public smacc2::SmaccClientBehavior\n{\npublic:\n  virtual void onEntry() override\n  {\n    this->requiresClient(attachedClient_);\n    attachedClient_->onServiceRequestReceived(\n      &CbServiceServerCallbackBase::onServiceRequestReceived, this);\n  }\n\n  virtual void onServiceRequestReceived(\n    const std::shared_ptr<typename TService::Request> req,\n    std::shared_ptr<typename TService::Response> res) = 0;\n\nprotected:\n  smacc2::client_bases::SmaccServiceServerClient<TService> * attachedClient_ = nullptr;\n};\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_behaviors/cb_sleep_for.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <rclcpp/duration.hpp>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace smacc2::client_behaviors\n{\nusing namespace std::chrono_literals;\n\nclass CbSleepFor : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbSleepFor(rclcpp::Duration sleeptime) : sleeptime_(sleeptime) {}\n\n  void onEntry() override\n  {\n    auto starttime = getNode()->now();\n    while (!this->isShutdownRequested() && (getNode()->now() - starttime) < sleeptime_)\n    {\n      rclcpp::sleep_for(10ms);\n    }\n\n    //rclcpp::sleep_for(std::chrono::nanoseconds(sleeptime_.nanoseconds()));\n    this->postSuccessEvent();\n  }\n\n  void onExit() override {}\n\nprivate:\n  rclcpp::Duration sleeptime_;\n};\n}  // namespace smacc2::client_behaviors\n"
  },
  {
    "path": "smacc2/include/smacc2/client_behaviors/cb_subscription_callback_base.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n#include <smacc2/smacc_client_behavior.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\ntemplate <typename TMsg>\nclass CbSubscriptionCallbackBase : public smacc2::SmaccClientBehavior\n{\npublic:\n  void onEntry() override\n  {\n    this->requiresClient(attachedClient_);\n    attachedClient_->onMessageReceived(&CbSubscriptionCallbackBase::onMessageReceived, this);\n  }\n\n  virtual void onMessageReceived(const TMsg & msg) = 0;\n\nprotected:\n  smacc2::client_bases::SmaccSubscriberClient<TMsg> * attachedClient_ = nullptr;\n};\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_behaviors/cb_wait_action_server.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/client_bases/smacc_action_client_base.hpp>\n#include <smacc2/client_core_components/cp_action_client.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nusing namespace smacc2::client_bases;\nusing namespace smacc2::client_core_components;\n\n// waits the action server is available in the current orthogonal\nclass CbWaitActionServer : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbWaitActionServer(std::chrono::milliseconds timeout);\n  virtual ~CbWaitActionServer();\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    // requires an action client\n    this->requiresClient(client_);\n  }\n\n  void onEntry() override;\n\nprivate:\n  ISmaccActionClient * client_;\n\n  std::chrono::milliseconds timeout_;\n};\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_behaviors/cb_wait_action_server_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/client_bases/smacc_action_client_base.hpp>\n#include <smacc2/client_core_components/cp_action_client.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nusing namespace smacc2::client_bases;\nusing namespace smacc2::client_core_components;\n\n// waits the action server is available in the current orthogonal\ntemplate <typename ActionT>\nclass CbWaitActionServer2 : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    this->requiresComponent(cp_action_client_, ComponentRequirement::SOFT);\n  }\n\n  CbWaitActionServer2(std::chrono::milliseconds timeout) : timeout_(timeout) {}\n\n  virtual ~CbWaitActionServer2() {}\n\n  void onEntry()\n  {\n    if (cp_action_client_ != nullptr)\n    {\n      RCLCPP_INFO(\n        getLogger(), \"[CbWaitActionServer] waiting for action server (using CpActionClient)...\");\n      bool found = false;\n      auto starttime = getNode()->now();\n      while (!this->isShutdownRequested() && !found && (getNode()->now() - starttime) < timeout_)\n      {\n        auto client_base = cp_action_client_->getActionClient();\n        found = client_base->wait_for_action_server(std::chrono::milliseconds(1000));\n      }\n\n      if (found)\n      {\n        RCLCPP_INFO(getLogger(), \"[CbWaitActionServer] action server already available\");\n        this->postSuccessEvent();\n      }\n      else\n      {\n        RCLCPP_INFO(getLogger(), \"[CbWaitActionServer] action server not found, timeout\");\n        this->postFailureEvent();\n      }\n    }\n    else\n    {\n      RCLCPP_INFO(getLogger(), \"[CbWaitActionServer] there is no action client in this orthogonal\");\n      this->postFailureEvent();\n    }\n  }\n\nprivate:\n  CpActionClient<ActionT> * cp_action_client_;\n\n  std::chrono::milliseconds timeout_;\n};\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_behaviors/cb_wait_node.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <functional>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace smacc2::client_behaviors\n{\nusing namespace std::chrono_literals;\n\n// Asynchronous behavior that waits to a topic message to send EvCbSuccess event\n// a guard function can be set to use conditions on the contents\nclass CbWaitNode : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbWaitNode(std::string nodeName);\n\n  void onEntry() override;\n\nprotected:\n  std::string nodeName_;\n\n  rclcpp::Rate rate_;\n};\n}  // namespace smacc2::client_behaviors\n"
  },
  {
    "path": "smacc2/include/smacc2/client_behaviors/cb_wait_topic.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <functional>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace smacc2::client_behaviors\n{\nusing namespace std::chrono_literals;\n\n// Asynchronous behavior that waits to a topic message to send EvCbSuccess event\n// a guard function can be set to use conditions on the contents\nclass CbWaitTopic : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbWaitTopic(std::string topicName);\n\n  virtual ~CbWaitTopic();\n\n  void onEntry() override;\n\nprotected:\n  std::string topicName_;\n\n  rclcpp::Rate rate_;\n};\n}  // namespace smacc2::client_behaviors\n"
  },
  {
    "path": "smacc2/include/smacc2/client_behaviors/cb_wait_topic_message.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <functional>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nusing namespace std::chrono_literals;\n\n// Asynchronous behavior that waits to a topic message to send EvCbSuccess event\n// a guard function can be set to use conditions on the contents\ntemplate <typename TMessage>\nclass CbWaitTopicMessage : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbWaitTopicMessage(\n    const char * topicname, std::function<bool(const TMessage &)> guardFunction = nullptr)\n  {\n    topicname_ = topicname;\n    guardFn_ = guardFunction;\n  }\n\n  virtual ~CbWaitTopicMessage() {}\n\n  void onEntry() override\n  {\n    rclcpp::SensorDataQoS qos;\n    // qos.reliable();\n    // rclcpp::SubscriptionOptions sub_option;\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[CbWaitTopicMessage] waiting message from topic: \"\n                     << topicname_ << \"[\" << demangledTypeName<TMessage>() << \"]\");\n\n    // sub_ = getNode()->create_subscription<TMessage>(\n    //   topicname_, qos,\n    //   std::bind(&CbWaitTopicMessage<TMessage>::onMessageReceived, this, std::placeholders::_1),\n    //   sub_option);\n\n    std::function<void(typename TMessage::SharedPtr)> fn = [this](auto msg)\n    { this->onMessageReceived(msg); };\n\n    auto nh = getNode();\n    sub_ = nh->create_subscription<TMessage>(topicname_, qos, fn);\n  }\n\n  void onMessageReceived(const typename TMessage::SharedPtr msg)\n  {\n    if (guardFn_ == nullptr || guardFn_(*msg))\n    {\n      RCLCPP_INFO(getLogger(), \"[CbWaitTopicMessage] message received.\");\n      success = true;\n      this->postSuccessEvent();\n    }\n  }\n\nprotected:\n  bool success = false;\n  typename rclcpp::Subscription<TMessage>::SharedPtr sub_;\n  std::function<bool(const TMessage &)> guardFn_;\n  std::string topicname_;\n};\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_core_components/cp_action_client.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/component.hpp>\n#include <smacc2/smacc_default_events.hpp>\n#include <smacc2/smacc_signal.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n\n#include <chrono>\n#include <functional>\n#include <future>\n#include <mutex>\n#include <optional>\n#include <rclcpp_action/rclcpp_action.hpp>\n\nnamespace smacc2\n{\nnamespace client_core_components\n{\nusing namespace smacc2::default_events;\n\ntemplate <typename ActionType>\nclass CpActionClient : public smacc2::ISmaccComponent\n{\npublic:\n  // Type aliases\n  using ActionClient = rclcpp_action::Client<ActionType>;\n  using Goal = typename ActionType::Goal;\n  using Feedback = typename ActionType::Feedback;\n  using Result = typename ActionType::Result;\n  using GoalHandle = rclcpp_action::ClientGoalHandle<ActionType>;\n  using WrappedResult = typename GoalHandle::WrappedResult;\n  using SendGoalOptions = typename ActionClient::SendGoalOptions;\n  using GoalResponseCallback =\n    std::function<void(std::shared_future<typename GoalHandle::SharedPtr>)>;\n  using FeedbackCallback = typename GoalHandle::FeedbackCallback;\n  using ResultCallback = typename GoalHandle::ResultCallback;\n\n  // Configuration options\n  std::optional<std::string> actionServerName;\n  std::optional<std::chrono::milliseconds> serverTimeout;\n\n  // SMACC2 Signals for component communication\n  smacc2::SmaccSignal<void(const WrappedResult &)> onActionSucceeded_;\n  smacc2::SmaccSignal<void(const WrappedResult &)> onActionAborted_;\n  smacc2::SmaccSignal<void(const WrappedResult &)> onActionCancelled_;\n  smacc2::SmaccSignal<void(const Feedback &)> onActionFeedback_;\n  smacc2::SmaccSignal<void()> onGoalAccepted_;\n  smacc2::SmaccSignal<void()> onGoalRejected_;\n\n  // Event posting functions (set during orthogonal allocation)\n  std::function<void(const WrappedResult &)> postSuccessEvent;\n  std::function<void(const WrappedResult &)> postAbortedEvent;\n  std::function<void(const WrappedResult &)> postCancelledEvent;\n  std::function<void(const Feedback &)> postFeedbackEvent;\n\n  // Constructor\n  CpActionClient() = default;\n\n  CpActionClient(const std::string & actionServerName) : actionServerName(actionServerName) {}\n\n  virtual ~CpActionClient() = default;\n\n  // Public API\n  std::shared_future<typename GoalHandle::SharedPtr> sendGoal(\n    Goal & goal, typename smacc2::SmaccSignal<void(const WrappedResult &)>::WeakPtr resultCallback =\n                   typename smacc2::SmaccSignal<void(const WrappedResult &)>::WeakPtr())\n  {\n    std::lock_guard<std::mutex> lock(actionMutex_);\n\n    SendGoalOptions options;\n\n    // Set up feedback callback\n    options.feedback_callback = feedbackCallback_;\n\n    // Set up result callback\n    options.result_callback = [this, resultCallback](const WrappedResult & result)\n    {\n      std::lock_guard<std::mutex> lock(actionMutex_);\n\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << this->getName() << \"] Action result callback, goal id: \"\n                         << rclcpp_action::to_string(result.goal_id));\n\n      auto resultCallbackPtr = resultCallback.lock();\n      if (resultCallbackPtr != nullptr)\n      {\n        RCLCPP_INFO_STREAM(getLogger(), \"[\" << this->getName() << \"] Calling user result callback\");\n        (*resultCallbackPtr)(result);\n      }\n      else\n      {\n        RCLCPP_INFO_STREAM(\n          getLogger(), \"[\" << this->getName() << \"] Using default result handling\");\n        this->onResult(result);\n      }\n    };\n\n    RCLCPP_INFO_STREAM(\n      getLogger(),\n      \"[\" << this->getName() << \"] Sending goal to action server: \" << (long)client_.get());\n\n    auto goalFuture = client_->async_send_goal(goal, options);\n    lastRequest_ = goalFuture;\n\n    return goalFuture;\n  }\n\n  bool cancelGoal()\n  {\n    std::lock_guard<std::mutex> lock(actionMutex_);\n\n    if (lastRequest_ && lastRequest_->valid())\n    {\n      RCLCPP_INFO_STREAM(getLogger(), \"[\" << this->getName() << \"] Cancelling current goal\");\n\n      auto cancelFuture = client_->async_cancel_all_goals();\n      lastCancelResponse_ = cancelFuture;\n      return true;\n    }\n    else\n    {\n      RCLCPP_WARN_STREAM(getLogger(), \"[\" << this->getName() << \"] No active goal to cancel\");\n      return false;\n    }\n  }\n\n  bool isServerReady() const { return client_ && client_->action_server_is_ready(); }\n\n  void waitForServer()\n  {\n    if (client_)\n    {\n      RCLCPP_INFO_STREAM(\n        getLogger(),\n        \"[\" << this->getName() << \"] Waiting for action server: \" << *actionServerName);\n      client_->wait_for_action_server();\n    }\n  }\n\n  // Component lifecycle\n  void onInitialize() override\n  {\n    if (!actionServerName)\n    {\n      RCLCPP_ERROR_STREAM(getLogger(), \"[\" << this->getName() << \"] Action server name not set!\");\n      return;\n    }\n\n    RCLCPP_INFO_STREAM(\n      getLogger(),\n      \"[\" << this->getName() << \"] Initializing action client for: \" << *actionServerName);\n\n    client_ = rclcpp_action::create_client<ActionType>(getNode(), *actionServerName);\n    RCLCPP_INFO_STREAM(\n      getLogger(),\n      \"[\" << this->getName() << \"] DONE Initializing action client for: \" << *actionServerName);\n\n    // Set up feedback callback\n    feedbackCallback_ = [this](auto goalHandle, auto feedback)\n    { this->onFeedback(goalHandle, feedback); };\n  }\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onComponentInitialization()\n  {\n    // Set up event posting functions with proper template parameters\n    postSuccessEvent = [this](const WrappedResult & result)\n    { this->postResultEvent<EvActionSucceeded<TSourceObject, TOrthogonal>>(result); };\n\n    postAbortedEvent = [this](const WrappedResult & result)\n    { this->postResultEvent<EvActionAborted<TSourceObject, TOrthogonal>>(result); };\n\n    postCancelledEvent = [this](const WrappedResult & result)\n    { this->postResultEvent<EvActionCancelled<TSourceObject, TOrthogonal>>(result); };\n\n    postFeedbackEvent = [this](const Feedback & feedback)\n    {\n      auto actionFeedbackEvent = new EvActionFeedback<Feedback, TOrthogonal>();\n      // actionFeedbackEvent->client = this->owner_;\n      actionFeedbackEvent->feedbackMessage = feedback;\n      this->postEvent(actionFeedbackEvent);\n      RCLCPP_DEBUG(getLogger(), \"[%s] FEEDBACK EVENT\", this->getName().c_str());\n    };\n  }\n\n  // Signal connection methods\n  template <typename T>\n  smacc2::SmaccSignalConnection onSucceeded(void (T::*callback)(const WrappedResult &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onActionSucceeded_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onAborted(void (T::*callback)(const WrappedResult &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onActionAborted_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onCancelled(void (T::*callback)(const WrappedResult &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onActionCancelled_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onFeedback(void (T::*callback)(const Feedback &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onActionFeedback_, callback, object);\n  }\n\n  // Access to underlying client for advanced usage\n  std::shared_ptr<ActionClient> getActionClient() const { return client_; }\n\nprivate:\n  std::shared_ptr<ActionClient> client_ = nullptr;\n  std::optional<std::shared_future<typename GoalHandle::SharedPtr>> lastRequest_;\n  std::optional<\n    std::shared_future<typename rclcpp_action::Client<ActionType>::CancelResponse::SharedPtr>>\n    lastCancelResponse_;\n  FeedbackCallback feedbackCallback_;\n  std::mutex actionMutex_;\n\n  void onFeedback(\n    typename GoalHandle::SharedPtr /* goalHandle */,\n    const std::shared_ptr<const Feedback> feedback_msg)\n  {\n    onActionFeedback_(*feedback_msg);\n    postFeedbackEvent(*feedback_msg);\n  }\n\n  void onResult(const WrappedResult & result_msg)\n  {\n    const auto & resultType = result_msg.code;\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << this->getName() << \"] Action result [\"\n                       << rclcpp_action::to_string(result_msg.goal_id) << \"]: \" << (int)resultType);\n\n    if (resultType == rclcpp_action::ResultCode::SUCCEEDED)\n    {\n      RCLCPP_INFO(getLogger(), \"[%s] Action result: Success\", this->getName().c_str());\n      onActionSucceeded_(result_msg);\n      postSuccessEvent(result_msg);\n    }\n    else if (resultType == rclcpp_action::ResultCode::ABORTED)\n    {\n      RCLCPP_INFO(getLogger(), \"[%s] Action result: Aborted\", this->getName().c_str());\n      onActionAborted_(result_msg);\n      postAbortedEvent(result_msg);\n    }\n    else if (resultType == rclcpp_action::ResultCode::CANCELED)\n    {\n      RCLCPP_INFO(getLogger(), \"[%s] Action result: Cancelled\", this->getName().c_str());\n      onActionCancelled_(result_msg);\n      postCancelledEvent(result_msg);\n    }\n    else\n    {\n      RCLCPP_WARN(\n        getLogger(), \"[%s] Action result: Unhandled type: %d\", this->getName().c_str(),\n        (int)resultType);\n    }\n  }\n\n  template <typename EvType>\n  void postResultEvent(const WrappedResult & result)\n  {\n    auto * ev = new EvType();\n    ev->resultMessage = result;\n    RCLCPP_INFO(\n      getLogger(), \"[%s] Posting event: %s\", this->getName().c_str(),\n      smacc2::demangleSymbol(typeid(ev).name()).c_str());\n    this->postEvent(ev);\n  }\n};\n\n}  // namespace client_core_components\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_core_components/cp_ros2_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <optional>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/common.hpp>\n#include <smacc2/component.hpp>\n#include <smacc2/smacc_signal.hpp>\n\nnamespace smacc2\n{\nnamespace client_core_components\n{\nusing namespace smacc2::default_events;\n\nclass CpRos2Timer : public smacc2::ISmaccComponent\n{\npublic:\n  CpRos2Timer(rclcpp::Duration duration, bool oneshot = false)\n  : duration_(duration), oneshot_(oneshot), initialized_(false)\n  {\n  }\n\n  virtual ~CpRos2Timer()\n  {\n    if (timer_)\n    {\n      timer_->cancel();\n    }\n  }\n\n  void onInitialize() override\n  {\n    if (!initialized_)\n    {\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << this->getName() << \"] Initializing ROS2 Timer with duration: \"\n                         << duration_.seconds() << \"s, oneshot: \" << (oneshot_ ? \"true\" : \"false\"));\n\n      auto clock = this->getNode()->get_clock();\n      timer_ = rclcpp::create_timer(\n        this->getNode(), clock, duration_, std::bind(&CpRos2Timer::timerCallback, this));\n\n      this->initialized_ = true;\n    }\n  }\n\n  smacc2::SmaccSignal<void()> onTimerTick_;\n\n  void startTimer()\n  {\n    if (timer_ && timer_->is_canceled())\n    {\n      RCLCPP_INFO_STREAM(getLogger(), \"[\" << this->getName() << \"] Starting timer\");\n      timer_->reset();\n    }\n  }\n\n  void stopTimer()\n  {\n    if (timer_)\n    {\n      RCLCPP_INFO_STREAM(getLogger(), \"[\" << this->getName() << \"] Stopping timer\");\n      timer_->cancel();\n    }\n  }\n\n  void cancelTimer()\n  {\n    if (timer_)\n    {\n      RCLCPP_INFO_STREAM(getLogger(), \"[\" << this->getName() << \"] Cancelling timer\");\n      timer_->cancel();\n    }\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onTimerTick(void (T::*callback)(), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onTimerTick_, callback, object);\n  }\n\nprivate:\n  void timerCallback()\n  {\n    RCLCPP_DEBUG_STREAM(getLogger(), \"[\" << this->getName() << \"] Timer tick\");\n\n    if (!onTimerTick_.empty())\n    {\n      onTimerTick_();\n    }\n\n    if (oneshot_)\n    {\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << this->getName() << \"] Oneshot timer completed, cancelling\");\n      timer_->cancel();\n    }\n  }\n  rclcpp::TimerBase::SharedPtr timer_;\n  rclcpp::Duration duration_;\n  bool oneshot_;\n  bool initialized_;\n};\n\n}  // namespace client_core_components\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_core_components/cp_service_client.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/component.hpp>\n#include <smacc2/smacc_default_events.hpp>\n#include <smacc2/smacc_signal.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n\n#include <chrono>\n#include <functional>\n#include <future>\n#include <mutex>\n#include <optional>\n#include <rclcpp/rclcpp.hpp>\n\nnamespace smacc2\n{\nnamespace client_core_components\n{\nusing namespace smacc2::default_events;\n\n/**\n * @brief Generic ROS2 service client component for SMACC2\n *\n * CpServiceClient provides a reusable service client component that can be used\n * by any SMACC2 client library requiring ROS2 service communication. It follows\n * the same pattern as CpActionClient, providing signals, event posting, and\n * thread-safe service call management.\n *\n * Key Features:\n * - Template-based for type safety with any ROS2 service type\n * - SMACC2 signal integration for event-driven responses\n * - Automatic SMACC2 event posting via template configuration\n * - Both synchronous and asynchronous service call support\n * - Thread-safe service call execution\n * - Service availability checking and waiting\n *\n * Usage Example:\n * @code\n * // In your client's onInitialize():\n * auto serviceClient = this->createComponent<\n *   smacc2::client_core_components::CpServiceClient<my_msgs::srv::MyService>>(\n *   \"/my_service_name\");\n *\n * // Send a request:\n * auto request = std::make_shared<my_msgs::srv::MyService::Request>();\n * request->data = 42;\n * serviceClient->sendRequestSync(request);\n * @endcode\n *\n * @tparam ServiceType ROS2 service type (e.g., std_srvs::srv::SetBool)\n */\ntemplate <typename ServiceType>\nclass CpServiceClient : public smacc2::ISmaccComponent\n{\npublic:\n  // Type aliases for cleaner code\n  using Client = rclcpp::Client<ServiceType>;\n  using Request = typename ServiceType::Request;\n  using Response = typename ServiceType::Response;\n  using SharedRequest = typename Request::SharedPtr;\n  using SharedResponse = typename Response::SharedPtr;\n  using SharedFuture = typename rclcpp::Client<ServiceType>::SharedFuture;\n\n  // Configuration options (set before onInitialize() or via constructor)\n  std::optional<std::string> serviceName;\n  std::optional<std::chrono::milliseconds> serviceTimeout;\n\n  // SMACC2 Signals for component communication\n  // These signals are emitted when service events occur, allowing other\n  // components and behaviors to react to service responses\n  smacc2::SmaccSignal<void(const SharedResponse &)> onServiceResponse_;\n  smacc2::SmaccSignal<void()> onServiceRequestSent_;\n  smacc2::SmaccSignal<void()> onServiceFailure_;\n\n  // Event posting functions (configured during component initialization)\n  // These lambdas are set up with proper template parameters to post\n  // type-safe SMACC2 events to the state machine\n  std::function<void(const SharedResponse &)> postResponseEvent;\n  std::function<void()> postRequestSentEvent;\n  std::function<void()> postFailureEvent;\n\n  /**\n   * @brief Default constructor\n   */\n  CpServiceClient() = default;\n\n  /**\n   * @brief Constructor with service name\n   * @param serviceName ROS2 service name (e.g., \"/my_node/my_service\")\n   */\n  CpServiceClient(const std::string & serviceName) : serviceName(serviceName) {}\n\n  /**\n   * @brief Constructor with service name and timeout\n   * @param serviceName ROS2 service name\n   * @param serviceTimeout Maximum time to wait for service response\n   */\n  CpServiceClient(const std::string & serviceName, std::chrono::milliseconds serviceTimeout)\n  : serviceName(serviceName), serviceTimeout(serviceTimeout)\n  {\n  }\n\n  virtual ~CpServiceClient() = default;\n\n  /**\n   * @brief Send a service request asynchronously\n   *\n   * Sends a service request and returns a future. The caller can wait on\n   * the future or let the component handle the response via signals/events.\n   *\n   * @param request Shared pointer to the service request\n   * @return SharedFuture Future for the service response\n   */\n  SharedFuture sendRequest(SharedRequest request)\n  {\n    std::lock_guard<std::mutex> lock(serviceMutex_);\n\n    if (!client_)\n    {\n      RCLCPP_ERROR_STREAM(\n        getLogger(), \"[\" << this->getName() << \"] Service client not initialized!\");\n      throw std::runtime_error(\"Service client not initialized\");\n    }\n\n    if (!client_->service_is_ready())\n    {\n      RCLCPP_WARN_STREAM(\n        getLogger(), \"[\" << this->getName() << \"] Service not ready: \" << *serviceName);\n    }\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << this->getName() << \"] Sending service request to: \" << *serviceName);\n\n    // Send the async request\n    auto future = client_->async_send_request(request);\n    lastRequest_ = future;\n\n    // Emit signal that request was sent\n    onServiceRequestSent_();\n    if (postRequestSentEvent) postRequestSentEvent();\n\n    return future;\n  }\n\n  /**\n   * @brief Send a service request synchronously (blocking)\n   *\n   * Sends a service request and blocks until the response is received or\n   * a timeout occurs. This is a convenience method that wraps sendRequest()\n   * with a blocking wait.\n   *\n   * @param request Shared pointer to the service request\n   * @return SharedResponse Response from the service\n   * @throws std::runtime_error if service call fails or times out\n   */\n  SharedResponse sendRequestSync(SharedRequest request)\n  {\n    auto future = sendRequest(request);\n\n    // Wait for response with timeout\n    std::future_status status;\n    if (serviceTimeout)\n    {\n      status = future.wait_for(*serviceTimeout);\n      if (status == std::future_status::timeout)\n      {\n        RCLCPP_ERROR_STREAM(\n          getLogger(), \"[\" << this->getName() << \"] Service call timed out: \" << *serviceName);\n        onServiceFailure_();\n        if (postFailureEvent) postFailureEvent();\n        throw std::runtime_error(\"Service call timeout\");\n      }\n    }\n    else\n    {\n      future.wait();\n    }\n\n    // Get the response\n    try\n    {\n      auto response = future.get();\n\n      RCLCPP_INFO_STREAM(\n        getLogger(),\n        \"[\" << this->getName() << \"] Service response received from: \" << *serviceName);\n\n      // Emit signals and events\n      onServiceResponse_(response);\n      if (postResponseEvent) postResponseEvent(response);\n\n      return response;\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_ERROR_STREAM(\n        getLogger(),\n        \"[\" << this->getName() << \"] Service call failed: \" << *serviceName << \" - \" << e.what());\n      onServiceFailure_();\n      if (postFailureEvent) postFailureEvent();\n      throw;\n    }\n  }\n\n  /**\n   * @brief Check if the service server is ready\n   * @return true if service is available, false otherwise\n   */\n  bool isServiceReady() const { return client_ && client_->service_is_ready(); }\n\n  /**\n   * @brief Wait for the service to become available\n   *\n   * Blocks until the service server is ready to accept requests.\n   * Uses a default timeout or the configured serviceTimeout.\n   */\n  void waitForService()\n  {\n    if (client_)\n    {\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << this->getName() << \"] Waiting for service: \" << *serviceName);\n\n      if (serviceTimeout)\n      {\n        auto timeout = std::chrono::duration_cast<std::chrono::nanoseconds>(*serviceTimeout);\n        if (!client_->wait_for_service(timeout))\n        {\n          RCLCPP_WARN_STREAM(\n            getLogger(), \"[\" << this->getName() << \"] Service wait timed out: \" << *serviceName);\n        }\n      }\n      else\n      {\n        client_->wait_for_service();\n      }\n\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << this->getName() << \"] Service ready: \" << *serviceName);\n    }\n  }\n\n  /**\n   * @brief Component initialization - creates the ROS2 service client\n   *\n   * Called by SMACC2 framework during component initialization.\n   * Creates the underlying rclcpp::Client for the specified service.\n   */\n  void onInitialize() override\n  {\n    if (!serviceName)\n    {\n      RCLCPP_ERROR_STREAM(getLogger(), \"[\" << this->getName() << \"] Service name not set!\");\n      return;\n    }\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << this->getName() << \"] Initializing service client for: \" << *serviceName);\n\n    client_ = getNode()->create_client<ServiceType>(*serviceName);\n\n    RCLCPP_INFO_STREAM(\n      getLogger(),\n      \"[\" << this->getName() << \"] DONE Initializing service client for: \" << *serviceName);\n  }\n\n  /**\n   * @brief Configure event posting with proper template parameters\n   *\n   * This method is called during component allocation to set up the event\n   * posting lambdas with the correct orthogonal and source object types.\n   * This enables type-safe event posting to the state machine.\n   *\n   * @tparam TOrthogonal The orthogonal type that owns this component\n   * @tparam TSourceObject The source object type (typically the client)\n   */\n  template <typename TOrthogonal, typename TSourceObject>\n  void onComponentInitialization()\n  {\n    // Set up event posting functions with proper template parameters\n    postResponseEvent = [this](const SharedResponse & response)\n    {\n      auto * ev = new EvServiceResponse<TSourceObject, TOrthogonal, Response>();\n      ev->response = *response;\n      this->postEvent(ev);\n      RCLCPP_DEBUG(getLogger(), \"[%s] SERVICE RESPONSE EVENT\", this->getName().c_str());\n    };\n\n    postRequestSentEvent = [this]()\n    {\n      auto * ev = new EvServiceRequestSent<TSourceObject, TOrthogonal>();\n      this->postEvent(ev);\n      RCLCPP_DEBUG(getLogger(), \"[%s] SERVICE REQUEST SENT EVENT\", this->getName().c_str());\n    };\n\n    postFailureEvent = [this]()\n    {\n      auto * ev = new EvServiceFailure<TSourceObject, TOrthogonal>();\n      this->postEvent(ev);\n      RCLCPP_DEBUG(getLogger(), \"[%s] SERVICE FAILURE EVENT\", this->getName().c_str());\n    };\n  }\n\n  /**\n   * @brief Helper method to connect a callback to the response signal\n   *\n   * Provides a convenient way to connect member functions to the service\n   * response signal with proper lifetime management.\n   *\n   * @tparam T Type of the callback object\n   * @param callback Member function pointer to call on response\n   * @param object Object instance that owns the callback\n   * @return Signal connection handle\n   */\n  template <typename T>\n  smacc2::SmaccSignalConnection onResponse(void (T::*callback)(const SharedResponse &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onServiceResponse_, callback, object);\n  }\n\n  /**\n   * @brief Helper method to connect a callback to the request sent signal\n   *\n   * @tparam T Type of the callback object\n   * @param callback Member function pointer to call when request is sent\n   * @param object Object instance that owns the callback\n   * @return Signal connection handle\n   */\n  template <typename T>\n  smacc2::SmaccSignalConnection onRequestSent(void (T::*callback)(), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onServiceRequestSent_, callback, object);\n  }\n\n  /**\n   * @brief Helper method to connect a callback to the failure signal\n   *\n   * @tparam T Type of the callback object\n   * @param callback Member function pointer to call on failure\n   * @param object Object instance that owns the callback\n   * @return Signal connection handle\n   */\n  template <typename T>\n  smacc2::SmaccSignalConnection onFailure(void (T::*callback)(), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onServiceFailure_, callback, object);\n  }\n\n  /**\n   * @brief Get the underlying ROS2 service client\n   *\n   * Provides access to the raw rclcpp::Client for advanced usage scenarios.\n   *\n   * @return Shared pointer to the rclcpp service client\n   */\n  std::shared_ptr<Client> getServiceClient() const { return client_; }\n\nprivate:\n  std::shared_ptr<Client> client_ = nullptr;\n  std::optional<SharedFuture> lastRequest_;\n  std::mutex serviceMutex_;\n};\n\n}  // namespace client_core_components\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_core_components/cp_subprocess_executor.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <functional>\n#include <mutex>\n#include <string>\n\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/common.hpp>\n#include <smacc2/component.hpp>\n#include <smacc2/smacc_signal.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n\nnamespace smacc2\n{\nnamespace client_core_components\n{\n\n/**\n * @brief Result of a subprocess execution\n */\nstruct SubprocessResult\n{\n  int exit_code;\n  std::string stdout_output;\n  std::string stderr_output;\n  bool timed_out;\n  std::chrono::milliseconds execution_time;\n};\n\n/**\n * @brief Generic subprocess execution component for running CLI tools\n *\n * This component provides a thread-safe way to execute external commands\n * and capture their output. It can be used by any client that needs to\n * interact with command-line tools.\n *\n * Example usage:\n *   auto result = executor->executeCommand(\"gcalcli list\", 5000);\n *   if (result.exit_code == 0) {\n *     // Process result.stdout_output\n *   }\n */\nclass CpSubprocessExecutor : public smacc2::ISmaccComponent\n{\npublic:\n  CpSubprocessExecutor() : initialized_(false) {}\n\n  virtual ~CpSubprocessExecutor() = default;\n\n  void onInitialize() override\n  {\n    if (!initialized_)\n    {\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << this->getName() << \"] CpSubprocessExecutor initialized\");\n      initialized_ = true;\n    }\n  }\n\n  /**\n   * @brief Execute a command synchronously\n   *\n   * @param command The command to execute (passed to shell)\n   * @param timeout_ms Timeout in milliseconds (0 = no timeout)\n   * @return SubprocessResult containing exit code, stdout, stderr\n   */\n  SubprocessResult executeCommand(const std::string & command, int timeout_ms = 30000)\n  {\n    std::lock_guard<std::mutex> lock(execution_mutex_);\n\n    SubprocessResult result;\n    result.exit_code = -1;\n    result.timed_out = false;\n\n    auto start_time = std::chrono::steady_clock::now();\n\n    RCLCPP_DEBUG_STREAM(getLogger(), \"[\" << this->getName() << \"] Executing: \" << command);\n\n    // Execute command and capture output\n    std::string full_command = command + \" 2>&1\";\n    FILE * pipe = popen(full_command.c_str(), \"r\");\n\n    if (!pipe)\n    {\n      result.stderr_output = \"Failed to execute command: popen() failed\";\n      RCLCPP_ERROR_STREAM(getLogger(), \"[\" << this->getName() << \"] \" << result.stderr_output);\n      onCommandFailed_(result.stderr_output);\n      return result;\n    }\n\n    // Read output\n    std::array<char, 4096> buffer;\n    std::string output;\n\n    while (fgets(buffer.data(), buffer.size(), pipe) != nullptr)\n    {\n      output += buffer.data();\n\n      // Check timeout\n      if (timeout_ms > 0)\n      {\n        auto elapsed = std::chrono::steady_clock::now() - start_time;\n        if (std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count() > timeout_ms)\n        {\n          pclose(pipe);\n          result.timed_out = true;\n          result.stderr_output = \"Command timed out after \" + std::to_string(timeout_ms) + \"ms\";\n          RCLCPP_WARN_STREAM(getLogger(), \"[\" << this->getName() << \"] \" << result.stderr_output);\n          onCommandFailed_(result.stderr_output);\n          return result;\n        }\n      }\n    }\n\n    int status = pclose(pipe);\n    result.exit_code = WEXITSTATUS(status);\n    result.stdout_output = output;\n\n    auto end_time = std::chrono::steady_clock::now();\n    result.execution_time =\n      std::chrono::duration_cast<std::chrono::milliseconds>(end_time - start_time);\n\n    RCLCPP_DEBUG_STREAM(\n      getLogger(), \"[\" << this->getName() << \"] Command completed with exit code \"\n                       << result.exit_code << \" in \" << result.execution_time.count() << \"ms\");\n\n    if (result.exit_code == 0)\n    {\n      onCommandCompleted_(result.exit_code, result.stdout_output);\n    }\n    else\n    {\n      onCommandFailed_(result.stdout_output);\n    }\n\n    return result;\n  }\n\n  /**\n   * @brief Execute a command asynchronously (fire and forget)\n   *\n   * The command runs in a separate thread. Results are delivered via signals.\n   *\n   * @param command The command to execute\n   * @param timeout_ms Timeout in milliseconds\n   */\n  void executeCommandAsync(const std::string & command, int timeout_ms = 30000)\n  {\n    std::thread([this, command, timeout_ms]() { this->executeCommand(command, timeout_ms); })\n      .detach();\n  }\n\n  // Signals\n  smacc2::SmaccSignal<void(int exit_code, const std::string & output)> onCommandCompleted_;\n  smacc2::SmaccSignal<void(const std::string & error)> onCommandFailed_;\n\n  // Signal connection helpers\n  template <typename T>\n  smacc2::SmaccSignalConnection onCommandCompleted(\n    void (T::*callback)(int, const std::string &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onCommandCompleted_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onCommandFailed(\n    void (T::*callback)(const std::string &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onCommandFailed_, callback, object);\n  }\n\nprivate:\n  bool initialized_;\n  std::mutex execution_mutex_;\n};\n\n}  // namespace client_core_components\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_core_components/cp_topic_publisher.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <optional>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/common.hpp>\n#include <smacc2/component.hpp>\n\nnamespace smacc2\n{\nnamespace client_core_components\n{\nusing namespace smacc2::default_events;\n\ntemplate <typename MessageType>\nclass CpTopicPublisher : public smacc2::ISmaccComponent\n{\npublic:\n  std::optional<int> queueSize;\n  std::optional<rmw_qos_durability_policy_t> durability;\n  std::optional<rmw_qos_reliability_policy_t> reliability;\n\n  typedef MessageType TMessageType;\n\n  CpTopicPublisher(std::string topicname)\n  {\n    this->topicName_ = topicname;\n    initialized_ = false;\n  }\n\n  virtual ~CpTopicPublisher() {}\n\n  void publish(const MessageType & msg) { pub_->publish(msg); }\n\n  void onInitialize() override;\n\nprivate:\n  typename rclcpp::Publisher<MessageType>::SharedPtr pub_;\n  //rclcpp::PublisherBase::SharedPtr pub_;\n\n  bool initialized_;\n  std::string topicName_;\n};\n\ntemplate <typename T>\nvoid CpTopicPublisher<T>::onInitialize()\n{\n  if (!initialized_)\n  {\n    if (!queueSize) queueSize = 1;\n    if (!durability) durability = RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT;\n    if (!reliability) reliability = RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT;\n    rclcpp::SensorDataQoS qos;\n    qos.keep_last(*queueSize);\n    qos.durability(*durability);\n    qos.reliability(*reliability);\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << this->getName() << \"] Publisher to topic: \" << topicName_);\n\n    auto nh = this->getNode();\n    pub_ = nh->template create_publisher<T>(this->topicName_, qos);\n\n    this->initialized_ = true;\n  }\n}\n\n}  // namespace client_core_components\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/client_core_components/cp_topic_subscriber.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <optional>\n#include <smacc2/client_bases/smacc_subscriber_client.hpp>\n#include <smacc2/component.hpp>\n#include <smacc2/smacc_signal.hpp>\n\nnamespace smacc2\n{\nnamespace client_core_components\n{\nusing namespace smacc2::default_events;\n\ntemplate <typename MessageType>\nclass CpTopicSubscriber : public smacc2::ISmaccComponent\n{\npublic:\n  std::optional<int> queueSize;\n\n  typedef MessageType TMessageType;\n\n  CpTopicSubscriber() { initialized_ = false; }\n\n  CpTopicSubscriber(std::string topicname)\n  {\n    topicName_ = topicname;\n    initialized_ = false;\n  }\n\n  virtual ~CpTopicSubscriber() {}\n\n  std::function<void(const MessageType &)> postMessageEvent;\n  std::function<void(const MessageType &)> postInitialMessageEvent;\n\n  smacc2::SmaccSignal<void(const MessageType &)> onFirstMessageReceived_;\n  smacc2::SmaccSignal<void(const MessageType &)> onMessageReceived_;\n\n  // signal subscription method. This signal will be triggered when the first message is received\n  template <typename T>\n  smacc2::SmaccSignalConnection onMessageReceived(\n    void (T::*callback)(const MessageType &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onMessageReceived_, callback, object);\n  }\n\n  // signal subscription method. This signal will be triggered when the first message is received\n  template <typename T>\n  smacc2::SmaccSignalConnection onFirstMessageReceived(\n    void (T::*callback)(const MessageType &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(\n      onFirstMessageReceived_, callback, object);\n  }\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    this->postMessageEvent = [=](auto msg)\n    {\n      auto event = new EvTopicMessage<TSourceObject, TOrthogonal, MessageType>();\n      event->msgData = msg;\n      this->postEvent(event);\n    };\n\n    this->postInitialMessageEvent = [=](auto msg)\n    {\n      auto event = new EvTopicInitialMessage<TSourceObject, TOrthogonal, MessageType>();\n      event->msgData = msg;\n      this->postEvent(event);\n    };\n  }\n\n  void onInitialize() override\n  {\n    if (!initialized_)\n    {\n      firstMessage_ = true;\n\n      if (!queueSize) queueSize = 1;\n\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << this->getName() << \"] Subscribing to topic: \" << topicName_);\n\n      rclcpp::SensorDataQoS qos;\n      if (queueSize) qos.keep_last(*queueSize);\n\n      std::function<void(typename MessageType::SharedPtr)> fn = [this](auto msg)\n      { this->messageCallback(*msg); };\n\n      sub_ = this->getNode()->template create_subscription<MessageType>(topicName_, qos, fn);\n      this->initialized_ = true;\n    }\n  }\n\nprivate:\n  typename rclcpp::Subscription<MessageType>::SharedPtr sub_;\n  bool firstMessage_;\n  bool initialized_;\n  std::string topicName_;\n\n  void messageCallback(const MessageType & msg)\n  {\n    if (firstMessage_)\n    {\n      postInitialMessageEvent(msg);\n      onFirstMessageReceived_(msg);\n      firstMessage_ = false;\n    }\n\n    postMessageEvent(msg);\n    onMessageReceived_(msg);\n  }\n};\n}  // namespace client_core_components\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/common.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n// boost statechart\n#define BOOST_BIND_NO_PLACEHOLDERS\n#include <boost/statechart/asynchronous_state_machine.hpp>\n#include <boost/statechart/custom_reaction.hpp>\n#include <boost/statechart/deep_history.hpp>\n#include <boost/statechart/event.hpp>\n#include <boost/statechart/simple_state.hpp>\n#include <boost/statechart/state.hpp>\n\n// other boost includes\n#include <boost/algorithm/string.hpp>\n#include <boost/any.hpp>\n#include <boost/config.hpp>\n#include <boost/function.hpp>\n#include <boost/intrusive_ptr.hpp>\n#include <boost/mpl/list.hpp>\n\n#include <mutex>\n#include <rclcpp/rclcpp.hpp>\n\n#include <smacc2/introspection/introspection.hpp>\n#include <smacc2/smacc_fifo_scheduler.hpp>\n#include <smacc2/smacc_types.hpp>\n\ntypedef boost::statechart::processor_container<\n  boost::statechart::fifo_scheduler<>, boost::function0<void>,\n  std::allocator<boost::statechart::none>>::processor_context my_context;\n\nnamespace smacc2\n{\ntemplate <class T>\nusing deep_history = sc::deep_history<T>;\n\nnamespace utils\n{\n// demangles the type name to be used as a ros node name\nstd::string cleanShortTypeName(const std::type_info & tinfo);\n\ntemplate <typename T>\nstd::string cleanShortTypeName()\n{\n  return cleanShortTypeName(typeid(T));\n}\n}  // namespace utils\n\nenum class SMRunMode\n{\n  DEBUG,\n  RELEASE\n};\n\nenum class ComponentRequirement\n{\n  SOFT,\n  HARD\n};\n\n}  // namespace smacc2\n\n#include <smacc2/smacc_default_events.hpp>\n#include <smacc2/smacc_transition.hpp>\n"
  },
  {
    "path": "smacc2/include/smacc2/component.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <string>\n\n#include <boost/optional.hpp>\n#include <smacc2/common.hpp>\n\nnamespace smacc2\n{\nclass ISmaccComponent\n{\npublic:\n  ISmaccComponent();\n\n  virtual ~ISmaccComponent();\n\n  // Returns a custom identifier defined by the specific plugin implementation\n  virtual std::string getName() const;\n\nprotected:\n  // this is the basic initialization method that each specific component should\n  // implement. The owner and the node are already available when it is invoked by the client.\n  virtual void onInitialize();\n\n  // component initialization with type information of the orthogonal and client that owns it\n  template <typename TOrthogonal, typename TClient>\n  void onComponentInitialization();\n\n  template <typename EventType>\n  void postEvent(const EventType & ev);\n\n  template <typename EventType>\n  void postEvent();\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n  }\n\n  template <typename TComponent>\n  void requiresComponent(\n    TComponent *& requiredComponentStorage,\n    ComponentRequirement requirementType = ComponentRequirement::SOFT);\n\n  template <typename TComponent>\n  void requiresComponent(\n    std::string name, TComponent *& requiredComponentStorage,\n    ComponentRequirement requirementType = ComponentRequirement::SOFT);\n\n  template <typename TClient>\n  void requiresClient(TClient *& requiredClientStorage);\n\n  template <typename SmaccComponentType, typename TOrthogonal, typename TClient, typename... TArgs>\n  SmaccComponentType * createSiblingComponent(TArgs... targs);\n\n  template <typename SmaccComponentType, typename TOrthogonal, typename TClient, typename... TArgs>\n  SmaccComponentType * createSiblingNamedComponent(std::string name, TArgs... targs);\n\n  rclcpp::Node::SharedPtr getNode();\n\n  rclcpp::Logger getLogger() const;\n\n  //inline\n  ISmaccStateMachine * getStateMachine();\n\n  // A reference to the state machine object that owns this resource\n  ISmaccStateMachine * stateMachine_;\n\n  ISmaccClient * owner_;\n\nprivate:\n  // friend method invoked by the client.\n  void initialize(ISmaccClient * owner);\n\n  // friend method invoked by the client.\n  // Assigns the owner of this resource to the given state machine parameter object\n  void setStateMachine(ISmaccStateMachine * stateMachine);\n\n  friend class ISmaccOrthogonal;\n  friend class ISmaccClient;\n};\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/impl/smacc_asynchronous_client_behavior_impl.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n\nnamespace smacc2\n{\n\ntemplate <typename TOrthogonal, typename TSourceObject>\nvoid SmaccAsyncClientBehavior::onStateOrthogonalAllocation()\n{\n  if (postFinishEventFn_ || postSuccessEventFn_ || postFailureEventFn_)\n  {\n    RCLCPP_WARN(\n      getLogger(),\n      \"SmaccAsyncClientBehavior already has event posting functions assigned. Skipping \"\n      \"re-assignment. This could be a problem if you are using the same behavior in multiple \"\n      \"states. This may be related with the deprecation of onStateOrthogonalAllocation in favor of \"\n      \"onStateOrthogonalAllocation.\");\n\n    return;\n  }\n\n  postFinishEventFn_ = [this]\n  {\n    this->onFinished_();\n    this->postEvent<EvCbFinished<TSourceObject, TOrthogonal>>();\n  };\n\n  postSuccessEventFn_ = [this]\n  {\n    this->onSuccess_();\n    this->postEvent<EvCbSuccess<TSourceObject, TOrthogonal>>();\n  };\n\n  postFailureEventFn_ = [this]\n  {\n    this->onFailure_();\n    this->postEvent<EvCbFailure<TSourceObject, TOrthogonal>>();\n  };\n}\n\ntemplate <typename TCallbackMethod, typename T>\nsmacc2::SmaccSignalConnection SmaccAsyncClientBehavior::onSuccess(\n  TCallbackMethod callback, T * object)\n{\n  return this->getStateMachine()->createSignalConnection(onSuccess_, callback, object);\n}\n\ntemplate <typename TCallbackMethod, typename T>\nsmacc2::SmaccSignalConnection SmaccAsyncClientBehavior::onFinished(\n  TCallbackMethod callback, T * object)\n{\n  return this->getStateMachine()->createSignalConnection(onFinished_, callback, object);\n}\n\ntemplate <typename TCallbackMethod, typename T>\nsmacc2::SmaccSignalConnection SmaccAsyncClientBehavior::onFailure(\n  TCallbackMethod callback, T * object)\n{\n  return this->getStateMachine()->createSignalConnection(onFailure_, callback, object);\n}\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/impl/smacc_client_behavior_impl.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/smacc_client_behavior.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n\nnamespace smacc2\n{\ntemplate <typename EventType>\nvoid ISmaccClientBehavior::postEvent(const EventType & ev)\n{\n  if (stateMachine_ == nullptr)\n  {\n    RCLCPP_ERROR(\n      getLogger(),\n      \"The client behavior cannot post events before being assigned to an orthogonal. Ignoring \"\n      \"post event call.\");\n  }\n  else\n  {\n    stateMachine_->postEvent(ev, EventLifeTime::CURRENT_STATE);\n  }\n}\n\ntemplate <typename EventType>\nvoid ISmaccClientBehavior::postEvent()\n{\n  if (stateMachine_ == nullptr)\n  {\n    RCLCPP_ERROR(\n      getLogger(),\n      \"The client behavior cannot post events before being assigned to an orthogonal. Ignoring \"\n      \"post event call.\");\n  }\n  else\n  {\n    stateMachine_->template postEvent<EventType>(EventLifeTime::CURRENT_STATE);\n  }\n}\n\n//inline\nISmaccStateMachine * ISmaccClientBehavior::getStateMachine() { return this->stateMachine_; }\n\n//inline\nISmaccState * ISmaccClientBehavior::getCurrentState() { return this->currentState; }\n\ntemplate <typename SmaccClientType>\nvoid ISmaccClientBehavior::requiresClient(SmaccClientType *& storage)\n{\n  currentOrthogonal->requiresClient(storage);\n}\n\ntemplate <typename SmaccComponentType>\nvoid ISmaccClientBehavior::requiresComponent(\n  SmaccComponentType *& storage, ComponentRequirement requirementType)\n{\n  if (stateMachine_ == nullptr)\n  {\n    RCLCPP_ERROR(\n      getLogger(),\n      \"Cannot use the requiresComponent funcionality before assigning the client behavior to an \"\n      \"orthogonal. Try using the OnEntry method to capture required components.\");\n  }\n  else\n  {\n    stateMachine_->requiresComponent(storage, requirementType);\n  }\n}\n\ntemplate <typename TOrthogonal, typename TSourceObject>\nvoid ISmaccClientBehavior::onStateOrthogonalAllocation()\n{\n}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/impl/smacc_client_impl.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/impl/smacc_state_machine_impl.hpp>\n#include <smacc2/smacc_client.hpp>\n\nnamespace smacc2\n{\ntemplate <typename EventType>\nvoid ISmaccClient::postEvent(const EventType & ev)\n{\n  stateMachine_->postEvent(ev);\n}\n\ntemplate <typename EventType>\nvoid ISmaccClient::postEvent()\n{\n  stateMachine_->postEvent<EventType>();\n}\n\ntemplate <typename TComponent>\nTComponent * ISmaccClient::getComponent()\n{\n  return this->getComponent<TComponent>(std::string());\n}\n\ntemplate <typename TComponent>\nTComponent * ISmaccClient::getComponent(int index)\n{\n  int count = 0;\n  for (auto & component : components_)\n  {\n    auto * tcomponent = dynamic_cast<TComponent *>(component.second.get());\n    if (tcomponent != nullptr)\n    {\n      if (count == index)\n      {\n        return tcomponent;\n      }\n      else\n      {\n        count++;\n        continue;\n      }\n    }\n  }\n\n  return nullptr;\n}\n\ntemplate <typename TComponent>\nTComponent * ISmaccClient::getComponent(std::string name)\n{\n  for (auto & component : components_)\n  {\n    if (!name.empty() && component.first.name != name) continue;\n\n    auto * tcomponent = dynamic_cast<TComponent *>(component.second.get());\n    if (tcomponent != nullptr)\n    {\n      return tcomponent;\n    }\n  }\n\n  return nullptr;\n}\n\n//inline\nISmaccStateMachine * ISmaccClient::getStateMachine() { return this->stateMachine_; }\n\ntemplate <typename SmaccComponentType, typename TOrthogonal, typename TClient, typename... TArgs>\nSmaccComponentType * ISmaccClient::createNamedComponent(std::string name, TArgs... targs)\n{\n  ComponentKey componentkey(&typeid(SmaccComponentType), name);\n\n  std::shared_ptr<SmaccComponentType> ret;\n\n  auto it = this->components_.find(componentkey);\n\n  if (it == this->components_.end())\n  {\n    auto tname = demangledTypeName<SmaccComponentType>();\n    RCLCPP_INFO(\n      getLogger(),\n      \"Creating a new component of type: %s smacc component is required by client '%s'. Creating a \"\n      \"new instance %s\",\n      this->getName().c_str(), demangledTypeName<SmaccComponentType>().c_str(), tname.c_str());\n\n    ret = std::shared_ptr<SmaccComponentType>(new SmaccComponentType(targs...));\n    ret->setStateMachine(this->getStateMachine());\n    ret->owner_ = this;\n    ret->initialize(this);\n\n    ret->template onComponentInitialization<TOrthogonal, TClient>();\n\n    this->components_[componentkey] =\n      ret;  //std::dynamic_pointer_cast<smacc2::ISmaccComponent>(ret);\n    RCLCPP_DEBUG(getLogger(), \"%s resource is required. Done.\", tname.c_str());\n  }\n  else\n  {\n    RCLCPP_INFO(\n      getLogger(), \"%s resource is required. Found resource in cache.\",\n      demangledTypeName<SmaccComponentType>().c_str());\n    ret = dynamic_pointer_cast<SmaccComponentType>(it->second);\n  }\n\n  ret->template onStateOrthogonalAllocation<TOrthogonal, TClient>();\n\n  return ret.get();\n}\n\ntemplate <typename SmaccComponentType, typename TOrthogonal, typename TClient, typename... TArgs>\nSmaccComponentType * ISmaccClient::createComponent(TArgs... targs)\n{\n  return this->createNamedComponent<SmaccComponentType, TOrthogonal, TClient>(\n    std::string(), targs...);\n}\n\ntemplate <typename TSmaccSignal, typename T>\nvoid ISmaccClient::connectSignal(TSmaccSignal & signal, void (T::*callback)(), T * object)\n{\n  return this->getStateMachine()->createSignalConnection(signal, callback, object);\n}\n\ntemplate <typename SmaccClientType>\nvoid ISmaccClient::requiresClient(SmaccClientType *& storage)\n{\n  this->orthogonal_->requiresClient(storage);\n}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/impl/smacc_component_impl.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <string>\n\n#include <smacc2/component.hpp>\n#include <smacc2/impl/smacc_state_machine_impl.hpp>\n\nnamespace smacc2\n{\ntemplate <typename EventType>\nvoid ISmaccComponent::postEvent(const EventType & ev)\n{\n  stateMachine_->postEvent(ev);\n}\n\ntemplate <typename EventType>\nvoid ISmaccComponent::postEvent()\n{\n  auto ev = new EventType();\n  stateMachine_->postEvent(ev);\n}\n\ntemplate <typename TComponent>\nvoid ISmaccComponent::requiresComponent(\n  TComponent *& requiredComponentStorage, ComponentRequirement requirementType)\n{\n  requiredComponentStorage = this->owner_->getComponent<TComponent>();\n\n  if (requiredComponentStorage == nullptr && requirementType == ComponentRequirement::HARD)\n  {\n    RCLCPP_DEBUG_STREAM(\n      this->getLogger(), std::string(\"Required component \") +\n                           demangleSymbol(typeid(TComponent).name()) +\n                           \" not found. Available components:\");\n\n    std::vector<std::shared_ptr<ISmaccComponent>> components;\n    this->owner_->getComponents(components);\n\n    for (auto c : components)\n    {\n      RCLCPP_DEBUG(this->getLogger(), \"- Component %s\", c->getName().c_str());\n    }\n\n    throw std::runtime_error(\n      std::string(\"Component \") + demangleSymbol(typeid(TComponent).name()) + \" not found\");\n  }\n}\n\ntemplate <typename TComponent>\nvoid ISmaccComponent::requiresComponent(\n  std::string name, TComponent *& requiredComponentStorage, ComponentRequirement requirementType)\n{\n  requiredComponentStorage = this->owner_->getComponent<TComponent>(name);\n\n  if (requiredComponentStorage == nullptr && requirementType == ComponentRequirement::HARD)\n  {\n    RCLCPP_DEBUG_STREAM(\n      this->getLogger(), std::string(\"Required component with name: '\") + name + \"'\" +\n                           demangleSymbol(typeid(TComponent).name()) +\n                           \" not found. Available components:\");\n\n    std::vector<std::shared_ptr<ISmaccComponent>> components;\n    this->owner_->getComponents(components);\n\n    for (auto c : components)\n    {\n      RCLCPP_DEBUG(this->getLogger(), \" - Component %s\", c->getName().c_str());\n    }\n\n    throw std::runtime_error(\n      std::string(\"Component \") + demangleSymbol(typeid(TComponent).name()) +\n      std::string(\" not found\"));\n  }\n}\n\ntemplate <typename TClient>\nvoid ISmaccComponent::requiresClient(TClient *& requiredClientStorage)\n{\n  this->owner_->requiresClient(requiredClientStorage);\n}\n\ntemplate <typename SmaccComponentType, typename TOrthogonal, typename TClient, typename... TArgs>\nSmaccComponentType * ISmaccComponent::createSiblingComponent(TArgs... targs)\n{\n  return this->owner_->createComponent<SmaccComponentType, TOrthogonal, TClient>(targs...);\n}\n\ntemplate <typename SmaccComponentType, typename TOrthogonal, typename TClient, typename... TArgs>\nSmaccComponentType * ISmaccComponent::createSiblingNamedComponent(std::string name, TArgs... targs)\n{\n  return this->owner_->createNamedComponent<SmaccComponentType, TOrthogonal, TClient>(\n    name, targs...);\n}\n\ntemplate <typename TOrthogonal, typename TClient>\nvoid ISmaccComponent::onComponentInitialization()\n{\n}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/impl/smacc_event_generator_impl.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <smacc2/introspection/introspection.hpp>\n#include <smacc2/smacc_event_generator.hpp>\n\nnamespace smacc2\n{\ntemplate <typename EventType>\nvoid SmaccEventGenerator::postEvent(const EventType & ev)\n{\n  ownerState_->postEvent(ev);\n}\n\ntemplate <typename EventType>\nvoid SmaccEventGenerator::postEvent()\n{\n  ownerState_->postEvent<EventType>();\n}\n\ntemplate <typename TState, typename TSource>\nvoid SmaccEventGenerator::onStateOrthogonalAllocation()\n{\n}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/impl/smacc_orthogonal_impl.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <cassert>\n#include <smacc2/introspection/introspection.hpp>\n#include <smacc2/smacc_client.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n\nnamespace smacc2\n{\ntemplate <typename SmaccClientType>\nbool ISmaccOrthogonal::requiresClient(SmaccClientType *& storage)\n{\n  for (auto & client : clients_)\n  {\n    storage = dynamic_cast<SmaccClientType *>(client.get());\n    if (storage != nullptr) return true;\n  }\n\n  auto requiredClientName = demangledTypeName<SmaccClientType>();\n  RCLCPP_WARN_STREAM(\n    getLogger(), \"Required client [\"\n                   << requiredClientName\n                   << \"] not found in current orthogonal. Searching in other orthogonals.\");\n\n  for (auto & orthoentry : this->getStateMachine()->getOrthogonals())\n  {\n    for (auto & client : orthoentry.second->getClients())\n    {\n      storage = dynamic_cast<SmaccClientType *>(client.get());\n      if (storage != nullptr)\n      {\n        RCLCPP_WARN_STREAM(\n          getLogger(),\n          \"Required client  [\" << requiredClientName << \"] found in other orthogonal.\");\n        return true;\n      }\n    }\n  }\n\n  RCLCPP_ERROR_STREAM(\n    getLogger(), \"Required client [\"\n                   << requiredClientName\n                   << \"] not found even in other orthogonals. Returning null pointer. If the \"\n                      \"requested client is used may result in a segmentation fault.\");\n  return false;\n}\n\ntemplate <typename SmaccComponentType>\nvoid ISmaccOrthogonal::requiresComponent(SmaccComponentType *& storage)\n{\n  if (stateMachine_ == nullptr)\n  {\n    RCLCPP_ERROR(\n      getLogger(),\n      \"Cannot use the requiresComponent funcionality from an orthogonal before onInitialize\");\n  }\n  else\n  {\n    stateMachine_->requiresComponent(storage);\n  }\n}\n\ntemplate <typename TOrthogonal, typename TClient>\nvoid ISmaccOrthogonal::assignClientToOrthogonal(TClient * client)\n{\n  client->setStateMachine(getStateMachine());\n  client->setOrthogonal(this);\n\n  client->template onStateOrthogonalAllocation<TOrthogonal, TClient>();\n}\n\ntemplate <typename TClientBehavior>\nTClientBehavior * ISmaccOrthogonal::getClientBehavior(int index)\n{\n  int i = 0;\n  for (auto & cb : this->clientBehaviors_.back())\n  {\n    auto * ret = dynamic_cast<TClientBehavior *>(cb.get());\n    if (ret != nullptr)\n    {\n      if (i == index)\n        return ret;\n      else\n        i++;\n    }\n  }\n\n  return nullptr;\n}\ninline const std::vector<std::shared_ptr<smacc2::ISmaccClient>> & ISmaccOrthogonal::getClients()\n{\n  return clients_;\n}\n\ninline const std::vector<std::vector<std::shared_ptr<smacc2::ISmaccClientBehavior>>> &\nISmaccOrthogonal::getClientBehaviors() const\n{\n  return this->clientBehaviors_;\n}\n\ntemplate <typename T>\nvoid ISmaccOrthogonal::setGlobalSMData(std::string name, T value)\n{\n  this->getStateMachine()->setGlobalSMData(name, value);\n}\n\ntemplate <typename T>\nbool ISmaccOrthogonal::getGlobalSMData(std::string name, T & ret)\n{\n  return this->getStateMachine()->getGlobalSMData(name, ret);\n}\n\n//inline\nISmaccStateMachine * ISmaccOrthogonal::getStateMachine() { return this->stateMachine_; }\n\ntemplate <typename TOrthogonal, typename TClient>\nclass ClientHandler : public TClient\n{\npublic:\n  template <typename... TArgs>\n  ClientHandler(TArgs... args) : TClient(args...)\n  {\n  }\n\n  ClientHandler() : TClient() {}\n\n  template <typename SmaccComponentType, typename... TArgs>\n  SmaccComponentType * createComponent(TArgs... targs)\n  {\n    return ISmaccClient::createComponent<SmaccComponentType, TOrthogonal, TClient, TArgs...>(\n      targs...);\n  }\n\n  template <typename SmaccComponentType, typename... TArgs>\n  SmaccComponentType * createNamedComponent(std::string name, TArgs... targs)\n  {\n    return ISmaccClient::createNamedComponent<SmaccComponentType, TOrthogonal, TClient, TArgs...>(\n      name, targs...);\n  }\n\n  smacc2::introspection::TypeInfo::Ptr getType() override\n  {\n    return smacc2::introspection::TypeInfo::getTypeInfoFromType<TClient>();\n  }\n};\n\ntemplate <typename TOrthogonal>\nclass Orthogonal : public ISmaccOrthogonal\n{\npublic:\n  template <typename TClient, typename... TArgs>\n  std::shared_ptr<ClientHandler<TOrthogonal, TClient>> createClient(TArgs... args)\n  {\n    //static_assert(std::is_base_of<ISmaccOrthogonal, TOrthogonal>::value, \"The object Tag must be the orthogonal type where the client was created\");\n    // if (typeid(*this) != typeid(TOrthogonal))\n    // {\n    //     RCLCPP_ERROR_STREAM(getLogger(),\"Error creating client. The object Tag must be the type of the orthogonal where the client was created:\" << demangleType(typeid(*this)) << \". The object creation was skipped and a nullptr was returned\");\n    //     return nullptr;\n    // }\n\n    RCLCPP_INFO(\n      getLogger(), \"[%s] Creating client object, type:'%s' object tag: '%s'\",\n      demangleType(typeid(*this)).c_str(), demangledTypeName<TClient>().c_str(),\n      demangledTypeName<TOrthogonal>().c_str());\n\n    auto client = std::make_shared<ClientHandler<TOrthogonal, TClient>>(args...);\n    this->template assignClientToOrthogonal<TOrthogonal, TClient>(client.get());\n\n    // Call the component initialization hook\n    TClient * clientPtr = static_cast<TClient *>(client.get());\n    clientPtr->template onComponentInitialization<TOrthogonal, TClient>();\n\n    // it is stored the client (not the client handler)\n    this->clients_.push_back(client);\n\n    return client;\n  }\n};\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/impl/smacc_state_impl.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <smacc2/introspection/introspection.hpp>\n#include <smacc2/smacc_client_behavior.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n#include <smacc2/smacc_state.hpp>\n#include <smacc2/smacc_state_reactor.hpp>\n//#include <smacc2/smacc_event_generator.hpp>\n#include <smacc2/introspection/smacc_type_info.hpp>\n#include <smacc2/smacc_client_behavior.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n\nnamespace smacc2\n{\nusing namespace smacc2::introspection;\n#define THIS_STATE_NAME ((demangleSymbol(typeid(*this).name()).c_str()))\ntemplate <typename TOrthogonal, typename TBehavior, typename... Args>\nstd::shared_ptr<TBehavior> ISmaccState::configure(Args &&... args)\n{\n  std::string orthogonalkey = demangledTypeName<TOrthogonal>();\n  RCLCPP_INFO(\n    getLogger(), \"[%s] Configuring orthogonal: %s\", THIS_STATE_NAME, orthogonalkey.c_str());\n\n  TOrthogonal * orthogonal = this->getOrthogonal<TOrthogonal>();\n  if (orthogonal != nullptr)\n  {\n    auto clientBehavior =\n      std::shared_ptr<TBehavior>(new TBehavior(args...));  // is there an error here? are the\n                                                           // behavior constructor parameters right?\n    orthogonal->addClientBehavior(clientBehavior);\n    clientBehavior->template onStateOrthogonalAllocation<TOrthogonal, TBehavior>();\n    return clientBehavior;\n  }\n  else\n  {\n    RCLCPP_ERROR(\n      getLogger(), \"[%s] Skipping client behavior creation in orthogonal [%s]. It does not exist.\",\n      THIS_STATE_NAME, orthogonalkey.c_str());\n    return nullptr;\n  }\n}\n//-------------------------------------------------------------------------------------------------------\n\ntemplate <typename SmaccComponentType>\nvoid ISmaccState::requiresComponent(SmaccComponentType *& storage)\n{\n  this->getStateMachine().requiresComponent(storage);\n}\n//-------------------------------------------------------------------------------------------------------\n\ntemplate <typename SmaccClientType>\nvoid ISmaccState::requiresClient(SmaccClientType *& storage)\n{\n  const char * sname = (demangleSymbol(typeid(*this).name()).c_str());\n  storage = nullptr;\n  auto & orthogonals = this->getStateMachine().getOrthogonals();\n  for (auto & ortho : orthogonals)\n  {\n    ortho.second->requiresClient(storage);\n    if (storage != nullptr) return;\n  }\n\n  RCLCPP_ERROR(\n    getLogger(),\n    \"[%s] Client of type '%s' not found in any orthogonal of the current state machine. This may \"\n    \"produce a segmentation fault if the returned reference is used.\",\n    sname, demangleSymbol<SmaccClientType>().c_str());\n}\n//-------------------------------------------------------------------------------------------------------\n\ntemplate <typename T>\nbool ISmaccState::getGlobalSMData(std::string name, T & ret)\n{\n  return this->getStateMachine().getGlobalSMData(name, ret);\n}\n//-------------------------------------------------------------------------------------------------------\n\n// Store globally in this state machine. (By value parameter )\ntemplate <typename T>\nvoid ISmaccState::setGlobalSMData(std::string name, T value)\n{\n  this->getStateMachine().setGlobalSMData(name, value);\n}\n//-------------------------------------------------------------------------------------------------------\n\ntemplate <typename TStateReactor, typename... TEvArgs>\nstd::shared_ptr<TStateReactor> ISmaccState::createStateReactor(TEvArgs... args)\n{\n  auto sr = std::make_shared<TStateReactor>(args...);\n  // sb->initialize(this, mock);\n  // sb->setOutputEvent(typelist<TTriggerEvent>());\n  stateReactors_.push_back(sr);\n  return sr;\n}\n\ntemplate <typename TEventGenerator, typename... TEvArgs>\nstd::shared_ptr<TEventGenerator> ISmaccState::createEventGenerator(TEvArgs... args)\n{\n  auto eg = std::make_shared<TEventGenerator>(args...);\n  eventGenerators_.push_back(eg);\n  return eg;\n}\n\n// used to iterate on the source events list and fill the information of the stateReactorInfo structure\ntemplate <typename TEventList>\nstruct AddTEventTypeStateReactorInfo\n{\n  smacc2::SmaccStateReactorInfo * srInfo_;\n  AddTEventTypeStateReactorInfo(smacc2::SmaccStateReactorInfo * srInfo) : srInfo_(srInfo) {}\n\n  template <typename T>\n  void operator()(T)\n  {\n    auto evinfo = std::make_shared<SmaccEventInfo>(TypeInfo::getTypeInfoFromType<T>());\n    srInfo_->sourceEventTypes.push_back(evinfo);\n    EventLabel<T>(evinfo->label);\n  }\n};\n\n// used to iterate on the source events list and fill the information of the stateReactorInfo structure\n// (is it required alreadyy having the AddTEventTypeStateReactorInfo?)\ntemplate <typename TEventList>\nstruct AddTEventTypeStateReactor\n{\n  smacc2::StateReactor * sr_;\n  AddTEventTypeStateReactor(smacc2::StateReactor * sr) : sr_(sr) {}\n\n  template <typename T>\n  void operator()(T)\n  {\n    sr_->addInputEvent<T>();\n  }\n};\n\ntemplate <typename TStateReactor, typename TTriggerEvent, typename TEventList, typename... TEvArgs>\nstd::shared_ptr<TStateReactor> ISmaccState::createStateReactor(TEvArgs... args)\n{\n  auto sr = std::make_shared<TStateReactor>(args...);\n  sr->initialize(this);\n  sr->template setOutputEvent<TTriggerEvent>();\n\n  using boost::mpl::_1;\n  using wrappedList = typename boost::mpl::transform<TEventList, _1>::type;\n  AddTEventTypeStateReactor<TEventList> op(sr.get());\n  boost::mpl::for_each<wrappedList>(op);\n\n  stateReactors_.push_back(sr);\n  return sr;\n}\n\ntemplate <typename TOrthogonal>\nTOrthogonal * ISmaccState::getOrthogonal()\n{\n  return this->getStateMachine().getOrthogonal<TOrthogonal>();\n}\n\ntemplate <typename TOrthogonal, typename TClientBehavior>\nTClientBehavior * ISmaccState::getClientBehavior(int index)\n{\n  return this->getStateMachine().getClientBehavior<TOrthogonal, TClientBehavior>(index);\n}\n\ntemplate <typename TEventGenerator>\nTEventGenerator * ISmaccState::getEventGenerator()\n{\n  TEventGenerator * ret = nullptr;\n  for (auto & evg : this->eventGenerators_)\n  {\n    ret = dynamic_cast<TEventGenerator *>(evg.get());\n    if (ret != nullptr) break;\n  }\n  return ret;\n}\n\ntemplate <typename TStateReactor>\nTStateReactor * ISmaccState::getStateReactor()\n{\n  TStateReactor * ret = nullptr;\n  for (auto & sr : this->eventGenerators_)\n  {\n    ret = dynamic_cast<TStateReactor *>(sr.get());\n    if (ret != nullptr) break;\n  }\n  return ret;\n}\n\n// template <typename TStateReactor, typename TTriggerEvent, typename... TEvArgs>\n// std::shared_ptr<TStateReactor> ISmaccState::createStateReactor(TEvArgs... args)\n// {\n//     auto sb = std::make_shared<TStateReactor>(std::forward(args...));\n//     sb->initialize(this, typelist<TEvArgs...>());\n//     sb->setOutputEvent(typelist<TTriggerEvent>());\n//     stateReactors_.push_back(sb);\n\n//     return sb;\n// }\n//-------------------------------------------------------------------------------------------------------\n\ntemplate <typename EventType>\nvoid ISmaccState::postEvent(const EventType & ev)\n{\n  getStateMachine().postEvent(ev);\n}\n\ntemplate <typename EventType>\nvoid ISmaccState::postEvent()\n{\n  getStateMachine().postEvent<EventType>();\n}\n//-------------------------------------------------------------------------------------------------------\n\ntemplate <typename TransitionType>\nvoid ISmaccState::notifyTransition()\n{\n  auto transitionType = TypeInfo::getTypeInfoFromType<TransitionType>();\n  this->notifyTransitionFromTransitionTypeInfo(transitionType);\n}\n\n//-------------------------------------------------------------------------------------------------------------------\n\n}  // namespace smacc2\n\n// implementation depends on state definition\n#include <smacc2/impl/smacc_event_generator_impl.hpp>\n#include <smacc2/impl/smacc_state_reactor_impl.hpp>\n"
  },
  {
    "path": "smacc2/include/smacc2/impl/smacc_state_machine_impl.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n **************************************************************************************************/\n\n#pragma once\n\n#include <memory>\n#include <sstream>\n#include <string>\n\n#include <smacc2/introspection/introspection.hpp>\n#include <smacc2/smacc_client.hpp>\n#include <smacc2/smacc_event_generator.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n#include <smacc2/smacc_signal_detector.hpp>\n#include <smacc2/smacc_state.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n#include <smacc2/smacc_state_reactor.hpp>\n\n#include <smacc2/introspection/introspection.hpp>\n#include <smacc2/smacc_client.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n#include <smacc2/smacc_signal_detector.hpp>\n#include <smacc2/smacc_state.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n#include <smacc2/smacc_state_reactor.hpp>\n\n#include <boost/function_types/function_arity.hpp>\n#include <boost/function_types/function_type.hpp>\n#include <boost/function_types/parameter_types.hpp>\n#include <smacc2/smacc_tracing/smacc_tracing.hpp>\n#include <smacc2_msgs/msg/smacc_status.hpp>\n\nnamespace smacc2\n{\nusing namespace smacc2::introspection;\n\ntemplate <typename TOrthogonal>\nTOrthogonal * ISmaccStateMachine::getOrthogonal()\n{\n  std::lock_guard<std::recursive_mutex> lock(m_mutex_);\n\n  std::string orthogonalkey = demangledTypeName<TOrthogonal>();\n  TOrthogonal * ret;\n\n  auto it = orthogonals_.find(orthogonalkey);\n\n  if (it != orthogonals_.end())\n  {\n    RCLCPP_DEBUG(\n      getLogger(),\n      \"Orthogonal %s resource is being required from some state, client or component. Found \"\n      \"resource in \"\n      \"cache.\",\n      orthogonalkey.c_str());\n    ret = dynamic_cast<TOrthogonal *>(it->second.get());\n    return ret;\n  }\n  else\n  {\n    std::stringstream ss;\n    ss << \"Orthogonal not found \" << orthogonalkey.c_str() << std::endl;\n    ss << \"The existing orthogonals are the following: \" << std::endl;\n    for (auto & orthogonal : orthogonals_)\n    {\n      ss << \" - \" << orthogonal.first << std::endl;\n    }\n\n    RCLCPP_WARN_STREAM(getLogger(), ss.str());\n\n    return nullptr;\n  }\n}\n\n//-------------------------------------------------------------------------------------------------------\ntemplate <typename TOrthogonal>\nvoid ISmaccStateMachine::createOrthogonal()\n{\n  //this->lockStateMachine(\"create orthogonal\");\n  std::lock_guard<std::recursive_mutex> guard(m_mutex_);\n\n  std::string orthogonalkey = demangledTypeName<TOrthogonal>();\n\n  if (orthogonals_.count(orthogonalkey) == 0)\n  {\n    auto ret = std::make_shared<TOrthogonal>();\n    orthogonals_[orthogonalkey] = dynamic_pointer_cast<smacc2::ISmaccOrthogonal>(ret);\n\n    ret->setStateMachine(this);\n\n    RCLCPP_INFO(getLogger(), \"%s Orthogonal is created\", orthogonalkey.c_str());\n  }\n  else\n  {\n    RCLCPP_WARN_STREAM(\n      getLogger(), \"There were already one existing orthogonal of type \"\n                     << orthogonalkey.c_str() << \". Skipping creation orthogonal request. \");\n    std::stringstream ss;\n    ss << \"The existing orthogonals are the following: \" << std::endl;\n    for (auto & orthogonal : orthogonals_)\n    {\n      ss << \" - \" << orthogonal.first << std::endl;\n    }\n    RCLCPP_WARN_STREAM(getLogger(), ss.str());\n  }\n  //this->unlockStateMachine(\"create orthogonal\");\n}\n\n//-------------------------------------------------------------------------------------------------------\ntemplate <typename SmaccComponentType>\nvoid ISmaccStateMachine::requiresComponent(\n  SmaccComponentType *& storage, ComponentRequirement requirementType)\n{\n  bool throwsException = requirementType == ComponentRequirement::HARD;\n  RCLCPP_DEBUG(\n    getLogger(), \"component %s is required\",\n    demangleSymbol(typeid(SmaccComponentType).name()).c_str());\n  std::lock_guard<std::recursive_mutex> lock(m_mutex_);\n\n  for (auto ortho : this->orthogonals_)\n  {\n    for (auto & client : ortho.second->clients_)\n    {\n      storage = client->getComponent<SmaccComponentType>();\n      if (storage != nullptr)\n      {\n        return;\n      }\n    }\n  }\n\n  RCLCPP_WARN(\n    getLogger(), \"component %s is required but it was not found in any orthogonal\",\n    demangleSymbol(typeid(SmaccComponentType).name()).c_str());\n\n  if (throwsException)\n    throw std::runtime_error(\"component is required but it was not found in any orthogonal\");\n\n  // std::string componentkey = demangledTypeName<SmaccComponentType>();\n  // SmaccComponentType *ret;\n\n  // auto it = components_.find(componentkey);\n\n  // if (it == components_.end())\n  // {\n  //     RCLCPP_DEBUG(getLogger(),\"%s smacc component is required. Creating a new instance.\",\n  //     componentkey.c_str());\n\n  //     ret = new SmaccComponentType();\n  //     ret->setStateMachine(this);\n  //     components_[componentkey] = static_cast<smacc2::ISmaccComponent *>(ret);\n  //     RCLCPP_DEBUG(getLogger(),\"%s resource is required. Done.\", componentkey.c_str());\n  // }\n  // else\n  // {\n  //     RCLCPP_DEBUG(getLogger(),\"%s resource is required. Found resource in cache.\",\n  //     componentkey.c_str()); ret = dynamic_cast<SmaccComponentType *>(it->second);\n  // }\n\n  // storage = ret;\n}\n//-------------------------------------------------------------------------------------------------------\ntemplate <typename EventType>\nvoid ISmaccStateMachine::postEvent(EventType * ev, EventLifeTime evlifetime)\n{\n  std::lock_guard<std::recursive_mutex> guard(eventQueueMutex_);\n\n#define eventtypename demangleSymbol<EventType>().c_str()\n\n  TRACETOOLS_TRACEPOINT(smacc2_event, eventtypename);\n\n  {\n    auto evinfo = SmaccEventInfo(TypeInfo::getTypeInfoFromType<EventType>());\n    EventLabel<EventType>(evinfo.label);\n\n    smacc2_msgs::msg::SmaccEvent event;\n    event.event_type = evinfo.getEventTypeName();\n    event.event_source = evinfo.getEventSourceName();\n    event.event_object_tag = evinfo.getOrthogonalName();\n    event.label = evinfo.label;\n\n    if (this->eventsLogPub_)\n    {\n      this->eventsLogPub_->publish(event);\n    }\n  }\n\n  if (\n    evlifetime == EventLifeTime::CURRENT_STATE &&\n    (stateMachineCurrentAction == StateMachineInternalAction::STATE_EXITING ||\n     stateMachineCurrentAction == StateMachineInternalAction::TRANSITIONING))\n  {\n    RCLCPP_WARN_STREAM(\n      getLogger(),\n      \"[ISmaccStateMachine] CURRENT STATE SCOPED EVENT DISCARDED, state is exiting/transitioning \"\n        << eventtypename);\n    return;\n    // in this case we may lose/skip events, if this is not right for some cases we should create a\n    // queue to lock the events during the transitions. This issues appeared when a client\n    // asyncbehavior was posting an event meanwhile we were doing the transition, but the main\n    // thread was waiting for its correct finalization (with thread.join)\n  }\n\n  // when a postting event is requested by any component, client, or client behavior\n  // we reach this place. Now, we propagate the events to all the state state reactors to generate\n  // some more events\n\n  RCLCPP_DEBUG_STREAM(getLogger(), \"[PostEvent entry point] \" << eventtypename);\n  for (auto currentState : currentState_)\n  {\n    propagateEventToStateReactors(currentState, ev);\n  }\n\n  this->signalDetector_->postEvent(ev);\n}\n\ntemplate <typename EventType>\nvoid ISmaccStateMachine::postEvent(EventLifeTime evlifetime)\n{\n  auto evname = smacc2::introspection::demangleSymbol<EventType>();\n  RCLCPP_INFO_STREAM(getLogger(), \"Event: \" << evname);\n  auto * ev = new EventType();\n  this->postEvent(ev, evlifetime);\n}\n\ntemplate <typename T>\nbool ISmaccStateMachine::getGlobalSMData(std::string name, T & ret)\n{\n  std::lock_guard<std::recursive_mutex> lock(m_mutex_);\n  // RCLCPP_WARN(getLogger(),\"get SM Data lock acquire\");\n  bool success = false;\n\n  if (!globalData_.count(name))\n  {\n    // RCLCPP_WARN(getLogger(),\"get SM Data - data do not exist\");\n    success = false;\n  }\n  else\n  {\n    // RCLCPP_WARN(getLogger(),\"get SM DAta -data exist. accessing\");\n    try\n    {\n      auto & v = globalData_[name];\n\n      // RCLCPP_WARN(getLogger(),\"get SM DAta -data exist. any cast\");\n      ret = boost::any_cast<T>(v.second);\n      success = true;\n      // RCLCPP_WARN(getLogger(),\"get SM DAta -data exist. success\");\n    }\n    catch (boost::bad_any_cast & ex)\n    {\n      RCLCPP_ERROR(getLogger(), \"bad any cast: %s\", ex.what());\n      success = false;\n    }\n  }\n\n  // RCLCPP_WARN(getLogger(),\"get SM Data lock release\");\n  return success;\n}\n\ntemplate <typename T>\nvoid ISmaccStateMachine::setGlobalSMData(std::string name, T value)\n{\n  {\n    std::lock_guard<std::recursive_mutex> lock(m_mutex_);\n    // RCLCPP_WARN(getLogger(),\"set SM Data lock acquire\");\n\n    globalData_[name] = {\n      [this, name]()\n      {\n        std::stringstream ss;\n        auto val = any_cast<T>(globalData_[name].second);\n        ss << val;\n        return ss.str();\n      },\n      value};\n  }\n\n  this->updateStatusMessage();\n}\n\n//template <typename StateField, typename BehaviorType>\n//void ISmaccStateMachine::mapBehavior()\n//{\n//  std::string stateFieldName = demangleSymbol(typeid(StateField).name());\n//  std::string behaviorType = demangleSymbol(typeid(BehaviorType).name());\n//  RCLCPP_INFO(\n//    getLogger(), \"Mapping state field '%s' to stateReactor '%s'\", stateFieldName.c_str(),\n//    behaviorType.c_str());\n//  smacc2::ISmaccClientBehavior * globalreference;\n//  if (!this->getGlobalSMData(stateFieldName, globalreference))\n//  {\n//    // Using the requires component approach, we force a unique existence\n//    // of this component\n//    BehaviorType * behavior;\n//    this->requiresComponent(behavior);\n//    globalreference = dynamic_cast<smacc2::ISmaccClientBehavior *>(behavior);\n//\n//    this->setGlobalSMData(stateFieldName, globalreference);\n//  }\n//}\n\nnamespace utils\n{\ntemplate <int arity>\nstruct Bind\n{\n  template <typename TSmaccSignal, typename TMemberFunctionPrototype, typename TSmaccObjectType>\n  smacc2::SmaccSignalConnection bindaux(\n    TSmaccSignal & signal, TMemberFunctionPrototype callback, TSmaccObjectType * object,\n    std::shared_ptr<CallbackCounterSemaphore> callbackCounter);\n};\n\ntemplate <>\nstruct Bind<1>\n{\n  template <typename TSmaccSignal, typename TMemberFunctionPrototype, typename TSmaccObjectType>\n  smacc2::SmaccSignalConnection bindaux(\n    TSmaccSignal & signal, TMemberFunctionPrototype callback, TSmaccObjectType * object,\n    std::shared_ptr<CallbackCounterSemaphore> callbackCounter)\n  {\n    return signal.connect(\n\n      [=]()\n      {\n        if (callbackCounter == nullptr)\n        {\n          (object->*callback)();\n        }\n        else if (callbackCounter->acquire())\n        {\n          (object->*callback)();\n          callbackCounter->release();\n        }\n      });\n  }\n};\n\ntemplate <>\nstruct Bind<2>\n{\n  template <typename TSmaccSignal, typename TMemberFunctionPrototype, typename TSmaccObjectType>\n  smacc2::SmaccSignalConnection bindaux(\n    TSmaccSignal & signal, TMemberFunctionPrototype callback, TSmaccObjectType * object,\n    std::shared_ptr<CallbackCounterSemaphore> callbackCounter)\n  {\n    return signal.connect(\n      [=](auto a1)\n      {\n        if (callbackCounter == nullptr)\n        {\n          return (object->*callback)(a1);\n        }\n        else if (callbackCounter->acquire())\n        {\n          (object->*callback)(a1);\n          callbackCounter->release();\n        }\n      });\n  }\n};\n\ntemplate <>\nstruct Bind<3>\n{\n  template <typename TSmaccSignal, typename TMemberFunctionPrototype, typename TSmaccObjectType>\n  smacc2::SmaccSignalConnection bindaux(\n    TSmaccSignal & signal, TMemberFunctionPrototype callback, TSmaccObjectType * object,\n    std::shared_ptr<CallbackCounterSemaphore> callbackCounter)\n  {\n    return signal.connect(\n      [=](auto a1, auto a2)\n      {\n        if (callbackCounter == nullptr)\n        {\n          return (object->*callback)(a1, a2);\n        }\n        else if (callbackCounter->acquire())\n        {\n          (object->*callback)(a1, a2);\n          callbackCounter->release();\n        }\n      });\n  }\n};\n\ntemplate <>\nstruct Bind<4>\n{\n  template <typename TSmaccSignal, typename TMemberFunctionPrototype, typename TSmaccObjectType>\n  smacc2::SmaccSignalConnection bindaux(\n    TSmaccSignal & signal, TMemberFunctionPrototype callback, TSmaccObjectType * object,\n    std::shared_ptr<CallbackCounterSemaphore> callbackCounter)\n  {\n    return signal.connect(\n      [=](auto a1, auto a2, auto a3)\n      {\n        if (callbackCounter == nullptr)\n        {\n          return (object->*callback)(a1, a2, a3);\n        }\n        else if (callbackCounter->acquire())\n        {\n          (object->*callback)(a1, a2, a3);\n          callbackCounter->release();\n        }\n      });\n  }\n};\n}  // namespace utils\nusing namespace smacc2::utils;\n\ntemplate <typename TSmaccSignal, typename TMemberFunctionPrototype, typename TSmaccObjectType>\nsmacc2::SmaccSignalConnection ISmaccStateMachine::createSignalConnection(\n  TSmaccSignal & signal, TMemberFunctionPrototype callback, TSmaccObjectType * object)\n{\n  std::lock_guard<std::recursive_mutex> lock(m_mutex_);\n\n  static_assert(\n    std::is_base_of<ISmaccState, TSmaccObjectType>::value ||\n      std::is_base_of<ISmaccClient, TSmaccObjectType>::value ||\n      std::is_base_of<ISmaccClientBehavior, TSmaccObjectType>::value ||\n      std::is_base_of<StateReactor, TSmaccObjectType>::value ||\n      std::is_base_of<ISmaccComponent, TSmaccObjectType>::value,\n    \"Only are accepted smacc types as subscribers for smacc signals\");\n\n  typedef decltype(callback) ft;\n  Bind<boost::function_types::function_arity<ft>::value> binder;\n  smacc2::SmaccSignalConnection connection;\n\n  // long life-time objects\n  if (\n    std::is_base_of<ISmaccComponent, TSmaccObjectType>::value ||\n    std::is_base_of<ISmaccClient, TSmaccObjectType>::value ||\n    std::is_base_of<ISmaccOrthogonal, TSmaccObjectType>::value ||\n    std::is_base_of<ISmaccStateMachine, TSmaccObjectType>::value)\n  {\n    RCLCPP_INFO(\n      getLogger(),\n      \"[StateMachine] Long life-time SMACC signal subscription created. Subscriber is %s. Callback \"\n      \"is: %s\",\n      demangledTypeName<TSmaccObjectType>().c_str(),\n      demangleSymbol(typeid(callback).name()).c_str());\n\n    connection = binder.bindaux(signal, callback, object, nullptr);\n  }\n  else if (\n    std::is_base_of<ISmaccState, TSmaccObjectType>::value ||\n    std::is_base_of<StateReactor, TSmaccObjectType>::value ||\n    std::is_base_of<ISmaccClientBehavior, TSmaccObjectType>::value)\n  {\n    RCLCPP_INFO(\n      getLogger(),\n      \"[StateMachine] Life-time constrained SMACC signal subscription created. Subscriber is %s\",\n      demangledTypeName<TSmaccObjectType>().c_str());\n\n    std::shared_ptr<CallbackCounterSemaphore> callbackCounterSemaphore;\n    if (stateCallbackConnections.count(object))\n    {\n      callbackCounterSemaphore = stateCallbackConnections[object];\n    }\n    else\n    {\n      callbackCounterSemaphore =\n        std::make_shared<CallbackCounterSemaphore>(demangledTypeName<TSmaccObjectType>().c_str());\n      stateCallbackConnections[object] = callbackCounterSemaphore;\n    }\n\n    connection = binder.bindaux(signal, callback, object, callbackCounterSemaphore);\n    callbackCounterSemaphore->addConnection(connection);\n  }\n  else  // state life-time objects\n  {\n    RCLCPP_WARN(\n      getLogger(),\n      \"[StateMachine] Connecting signal to an unknown object with unknown lifetime \"\n      \"behavior. An exception may occur if the object is destroyed during the execution.\");\n\n    connection = binder.bindaux(signal, callback, object, nullptr);\n  }\n\n  return connection;\n}\n\ntemplate <typename StateType>\nvoid ISmaccStateMachine::notifyOnStateEntryStart(StateType * state)\n{\n  std::lock_guard<std::recursive_mutex> lock(m_mutex_);\n\n  RCLCPP_DEBUG(\n    getLogger(),\n    \"[State Machine] Initializing a new state '%s' and updating current state. Getting state \"\n    \"meta-information. number of orthogonals: %ld\",\n    demangleSymbol(typeid(StateType).name()).c_str(), this->orthogonals_.size());\n\n  stateSeqCounter_++;\n  currentState_.push_back(state);\n  currentStateInfo_ = stateMachineInfo_->getState<StateType>();\n}\n\ntemplate <typename StateType>\nvoid ISmaccStateMachine::notifyOnStateEntryEnd(StateType *)\n{\n  RCLCPP_INFO(\n    getLogger(), \"[%s] State OnEntry code finished.\",\n    demangleSymbol(typeid(StateType).name()).c_str());\n\n  auto currentState = this->currentState_.back();\n  for (auto pair : this->orthogonals_)\n  {\n    RCLCPP_DEBUG(getLogger(), \"Orthogonal onEntry: %s.\", pair.second->getName().c_str());\n    auto & orthogonal = pair.second;\n    try\n    {\n      orthogonal->onEntry();\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_ERROR(\n        getLogger(),\n        \"[Orthogonal %s] Exception on Entry - continuing with next orthogonal. Exception info: %s\",\n        pair.second->getName().c_str(), e.what());\n    }\n  }\n\n  for (auto & sr : currentState->getStateReactors())\n  {\n    auto srname = smacc2::demangleSymbol(typeid(*sr).name());\n    RCLCPP_INFO_STREAM(getLogger(), \"State reactor onEntry: \" << srname);\n    try\n    {\n      sr->onEntry();\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_ERROR(\n        getLogger(),\n        \"[State Reactor %s] Exception on Entry - continuing with next state reactor. Exception \"\n        \"info: %s\",\n        srname.c_str(), e.what());\n    }\n  }\n\n  for (auto & eg : currentState->getEventGenerators())\n  {\n    auto egname = smacc2::demangleSymbol(typeid(*eg).name());\n    RCLCPP_INFO_STREAM(getLogger(), \"Event generator onEntry: \" << egname);\n    try\n    {\n      eg->onEntry();\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_ERROR(\n        getLogger(),\n        \"[Event generator %s] Exception on Entry - continuing with next state reactor. Exception \"\n        \"info: %s\",\n        egname.c_str(), e.what());\n    }\n  }\n\n  {\n    std::lock_guard<std::recursive_mutex> lock(m_mutex_);\n    this->updateStatusMessage();\n    stateMachineCurrentAction = StateMachineInternalAction::STATE_RUNNING;\n  }\n}\n\ntemplate <typename StateType>\nvoid ISmaccStateMachine::notifyOnRuntimeConfigurationFinished(StateType *)\n{\n  for (auto pair : this->orthogonals_)\n  {\n    // RCLCPP_INFO(getLogger(),\"ortho onruntime configure: %s\", pair.second->getName().c_str());\n    auto & orthogonal = pair.second;\n    orthogonal->runtimeConfigure();\n  }\n\n  {\n    std::lock_guard<std::recursive_mutex> lock(m_mutex_);\n    this->updateStatusMessage();\n    this->signalDetector_->notifyStateConfigured(this->currentState_.back());\n\n    stateMachineCurrentAction = StateMachineInternalAction::STATE_ENTERING;\n  }\n}\n\ntemplate <typename StateType>\nvoid ISmaccStateMachine::notifyOnRuntimeConfigured(StateType *)\n{\n  stateMachineCurrentAction = StateMachineInternalAction::STATE_CONFIGURING;\n}\n\ntemplate <typename StateType>\nvoid ISmaccStateMachine::notifyOnStateExitting(StateType * state)\n{\n  stateMachineCurrentAction = StateMachineInternalAction::STATE_EXITING;\n  auto fullname = demangleSymbol(typeid(StateType).name());\n  RCLCPP_WARN_STREAM(getLogger(), \"Exiting state: \" << fullname);\n  // this->set_parameter(\"destroyed\", true);\n\n  RCLCPP_INFO_STREAM(getLogger(), \"Notification state exit: leaving state \" << state);\n  for (auto pair : this->orthogonals_)\n  {\n    auto & orthogonal = pair.second;\n    try\n    {\n      orthogonal->onExit();\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_ERROR(\n        getLogger(),\n        \"[Orthogonal %s] Exception onExit - continuing with next orthogonal. Exception info: %s\",\n        pair.second->getName().c_str(), e.what());\n    }\n  }\n\n  for (auto & sr : state->getStateReactors())\n  {\n    auto srname = smacc2::demangleSymbol(typeid(*sr).name());\n    RCLCPP_INFO_STREAM(getLogger(), \"State reactor OnExit: \" << srname);\n    try\n    {\n      sr->onExit();\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_ERROR(\n        getLogger(),\n        \"[State Reactor %s] Exception on OnExit - continuing with next state reactor. Exception \"\n        \"info: %s\",\n        srname.c_str(), e.what());\n    }\n  }\n\n  for (auto & eg : state->getEventGenerators())\n  {\n    auto egname = smacc2::demangleSymbol(typeid(*eg).name());\n    RCLCPP_INFO_STREAM(getLogger(), \"Event generator OnExit: \" << egname);\n    try\n    {\n      eg->onExit();\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_ERROR(\n        getLogger(),\n        \"[State Reactor %s] Exception on OnExit - continuing with next state reactor. Exception \"\n        \"info: %s\",\n        egname.c_str(), e.what());\n    }\n  }\n}\n\ntemplate <typename StateType>\nvoid ISmaccStateMachine::notifyOnStateExited(StateType * state)\n{\n  this->lockStateMachine(\"state exit\");\n\n  signalDetector_->notifyStateExited(state);\n\n  auto fullname = demangleSymbol(typeid(StateType).name());\n  RCLCPP_WARN_STREAM(getLogger(), \"Exiting state: \" << fullname);\n\n  RCLCPP_INFO_STREAM(getLogger(), \"Notification state disposing: leaving state\" << state);\n  for (auto pair : this->orthogonals_)\n  {\n    auto & orthogonal = pair.second;\n    try\n    {\n      orthogonal->onDispose();\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_ERROR(\n        getLogger(),\n        \"[Orthogonal %s] Exception onDispose - continuing with next orthogonal. Exception info: %s\",\n        pair.second->getName().c_str(), e.what());\n    }\n  }\n\n  for (auto & sr : state->getStateReactors())\n  {\n    auto srname = smacc2::demangleSymbol(typeid(*sr).name()).c_str();\n    RCLCPP_INFO(getLogger(), \"State reactor disposing: %s\", srname);\n    try\n    {\n      this->disconnectSmaccSignalObject(sr.get());\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_ERROR(\n        getLogger(),\n        \"[State Reactor %s] Exception on OnDispose - continuing with next state reactor. Exception \"\n        \"info: %s\",\n        srname, e.what());\n    }\n  }\n\n  for (auto & eg : state->getEventGenerators())\n  {\n    auto egname = smacc2::demangleSymbol(typeid(*eg).name()).c_str();\n    RCLCPP_INFO(getLogger(), \"Event generator disposing: %s\", egname);\n    try\n    {\n      this->disconnectSmaccSignalObject(eg.get());\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_ERROR(\n        getLogger(),\n        \"[State Reactor %s] Exception on OnDispose - continuing with next state reactor. Exception \"\n        \"info: %s\",\n        egname, e.what());\n    }\n  }\n\n  this->stateCallbackConnections.clear();\n  currentState_.pop_back();\n\n  // then call exit state\n  RCLCPP_WARN_STREAM(getLogger(), \"State exit: \" << fullname);\n\n  stateMachineCurrentAction = StateMachineInternalAction::TRANSITIONING;\n  this->unlockStateMachine(\"state exit\");\n}\n//------------------------------------------------------------------------------------------------\ntemplate <typename EventType>\nvoid ISmaccStateMachine::propagateEventToStateReactors(ISmaccState * st, EventType * ev)\n{\n  RCLCPP_DEBUG(\n    getLogger(), \"PROPAGATING EVENT [%s] TO SRs [%s]: \", demangleSymbol<EventType>().c_str(),\n    st->getClassName().c_str());\n  for (auto & sb : st->getStateReactors())\n  {\n    sb->notifyEvent(ev);\n  }\n\n  auto * pst = st->getParentState();\n  if (pst != nullptr)\n  {\n    propagateEventToStateReactors(pst, ev);\n  }\n}\n\ntemplate <typename InitialStateType>\nvoid ISmaccStateMachine::buildStateMachineInfo()\n{\n  this->stateMachineInfo_ = std::make_shared<SmaccStateMachineInfo>(this->getNode());\n  this->stateMachineInfo_->buildStateMachineInfo<InitialStateType>();\n  this->stateMachineInfo_->assembleSMStructureMessage(this);\n  this->checkStateMachineConsistence();\n}\n\nint64_t ISmaccStateMachine::getCurrentStateCounter() const { return this->stateSeqCounter_; }\n\nISmaccState * ISmaccStateMachine::getCurrentState() const { return this->currentState_.back(); }\n\nconst smacc2::introspection::SmaccStateMachineInfo & ISmaccStateMachine::getStateMachineInfo()\n{\n  return *this->stateMachineInfo_;\n}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/impl/smacc_state_reactor_impl.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <smacc2/introspection/introspection.hpp>\n#include <smacc2/smacc_state_reactor.hpp>\n\nnamespace smacc2\n{\ntemplate <typename EventType>\nvoid StateReactor::postEvent(const EventType & ev)\n{\n  ownerState->postEvent(ev);\n}\n\ntemplate <typename EventType>\nvoid StateReactor::postEvent()\n{\n  ownerState->postEvent<EventType>();\n}\n\ntemplate <typename TEv>\nvoid StateReactor::setOutputEvent()\n{\n  this->postEventFn = [this]()\n  {\n    RCLCPP_INFO_STREAM(\n      this->getLogger(), \"[State Reactor Base] postingfn posting event: \" << demangleSymbol<TEv>());\n    auto * ev = new TEv();\n    this->ownerState->getStateMachine().postEvent(ev);\n  };\n}\n\ntemplate <typename TEv>\nvoid StateReactor::addInputEvent()\n{\n  this->eventTypes.push_back(&typeid(TEv));\n}\n\ntemplate <typename T, typename TClass>\nvoid StateReactor::createEventCallback(void (TClass::*callback)(T *), TClass * object)\n{\n  const auto * eventtype = &typeid(T);\n  this->eventCallbacks_[eventtype] = [=](void * msg)\n  {\n    T * evptr = (T *)msg;\n    (object->*callback)(evptr);\n  };\n}\n\ntemplate <typename T>\nvoid StateReactor::createEventCallback(std::function<void(T *)> callback)\n{\n  const auto * eventtype = &typeid(T);\n  this->eventCallbacks_[eventtype] = [=](void * msg)\n  {\n    T * evptr = (T *)msg;\n    callback(evptr);\n  };\n}\n\nnamespace introspection\n{\ntemplate <typename TEv>\nvoid StateReactorHandler::addInputEvent()\n{\n  StateReactorCallbackFunctor functor;\n  functor.fn = [this](std::shared_ptr<smacc2::StateReactor> sr)\n  {\n    RCLCPP_INFO(\n      nh_->get_logger(), \"[%s] State Reactor adding input event: %s\",\n      srInfo_->stateReactorType->getFullName().c_str(), demangledTypeName<TEv>().c_str());\n    sr->addInputEvent<TEv>();\n  };\n\n  this->callbacks_.push_back(functor);\n\n  auto evtype = TypeInfo::getFromStdTypeInfo(typeid(TEv));\n  auto evinfo = std::make_shared<SmaccEventInfo>(evtype);\n  EventLabel<TEv>(evinfo->label);\n\n  srInfo_->sourceEventTypes.push_back(evinfo);\n}\n\ntemplate <typename TEv>\nvoid StateReactorHandler::setOutputEvent()\n{\n  StateReactorCallbackFunctor functor;\n  functor.fn = [this](std::shared_ptr<smacc2::StateReactor> sr)\n  {\n    RCLCPP_INFO(\n      nh_->get_logger(), \"[%s] State Reactor setting output event: %s\",\n      srInfo_->stateReactorType->getFullName().c_str(), demangledTypeName<TEv>().c_str());\n    sr->setOutputEvent<TEv>();\n  };\n\n  this->callbacks_.push_back(functor);\n}\n}  // namespace introspection\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/introspection/introspection.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <boost/statechart/event.hpp>\n#include <boost/statechart/simple_state.hpp>\n#include <boost/statechart/state.hpp>\n\n#include <boost/mpl/for_each.hpp>\n#include <boost/mpl/list.hpp>\n#include <boost/mpl/transform.hpp>\n#include <rclcpp/rclcpp.hpp>\n#include <typeinfo>\n\n#include <smacc2/introspection/smacc_state_info.hpp>\n#include <smacc2/introspection/smacc_type_info.hpp>\n#include <smacc2/smacc_types.hpp>\n\n#include <cxxabi.h>\n#include \"smacc2_msgs/msg/smacc_transition.hpp\"\n\nnamespace sc = boost::statechart;\n\nnamespace smacc2\n{\nnamespace introspection\n{\nusing namespace boost;\nusing namespace smacc2::default_transition_tags;\n\nvoid transitionInfoToMsg(\n  const SmaccTransitionInfo & transition, smacc2_msgs::msg::SmaccTransition & transitionMsg);\n\ntypedef std::allocator<boost::statechart::none> SmaccAllocator;\n\ntemplate <class T>\nauto optionalNodeHandle(std::shared_ptr<T> & obj) -> T *\n{\n  //return obj->getNode();\n  return obj.get;\n}\n\ntemplate <class T>\nauto optionalNodeHandle(boost::intrusive_ptr<T> & obj) -> T *\n{\n  //return obj->getNode();\n  return obj.get();\n}\n\ntemplate <class T>\nauto optionalNodeHandle(T * obj) -> T *\n{\n  return obj;\n}\n\ninline std::string demangleSymbol(const std::string & name) { return demangleSymbol(name.c_str()); }\n\ninline std::string demangleSymbol(const char * name)\n{\n#if (__GNUC__ && __cplusplus && __GNUC__ >= 3)\n  int status;\n  char * res = abi::__cxa_demangle(name, 0, 0, &status);\n  if (res)\n  {\n    const std::string demangled_name(res);\n    std::free(res);\n    return demangled_name;\n  }\n  // Demangling failed, fallback to mangled name\n  return std::string(name);\n#else\n  return std::string(name);\n#endif\n}\n\ntemplate <typename T>\ninline std::string demangleSymbol()\n{\n  return demangleSymbol(typeid(T).name());\n}\n\ntemplate <class T>\ninline std::string demangledTypeName()\n{\n  return demangleSymbol(typeid(T).name());\n}\n\ninline std::string demangleType(const std::type_info * tinfo)\n{\n  return demangleSymbol(tinfo->name());\n}\n\ninline std::string demangleType(const std::type_info & tinfo)\n{\n  return demangleSymbol(tinfo.name());\n}\n\ntemplate <typename...>\nstruct typelist\n{\n};\n\n//-------------------------------------------------------------------------\ntemplate <typename T>\nclass HasEventLabel\n{\nprivate:\n  typedef char YesType[1];\n  typedef char NoType[2];\n\n  template <typename C>\n  static YesType & test(decltype(&C::getEventLabel));\n  template <typename C>\n  static NoType & test(...);\n\npublic:\n  enum\n  {\n    value = sizeof(test<T>(0)) == sizeof(YesType)\n  };\n};\n\ntemplate <typename T>\ntypename std::enable_if<HasEventLabel<T>::value, void>::type EventLabel(std::string & label)\n{\n  label = T::getEventLabel();\n}\n\ntemplate <typename T>\ntypename std::enable_if<!HasEventLabel<T>::value, void>::type EventLabel(std::string & label)\n{\n  label = \"\";\n}\n//-----------------------------------------------------------------------\n\ntemplate <typename T>\nclass HasAutomaticTransitionTag\n{\nprivate:\n  typedef char YesType[1];\n  typedef char NoType[2];\n\n  template <typename C>\n  static YesType & test(decltype(&C::getDefaultTransitionTag));\n  template <typename C>\n  static NoType & test(...);\n\npublic:\n  enum\n  {\n    value = sizeof(test<T>(0)) == sizeof(YesType)\n  };\n};\n\ntemplate <typename T>\ntypename std::enable_if<HasAutomaticTransitionTag<T>::value, void>::type automaticTransitionTag(\n  std::string & transition_name)\n{\n  transition_name = T::getDefaultTransitionTag();\n}\n\ntemplate <typename T>\ntypename std::enable_if<!HasAutomaticTransitionTag<T>::value, void>::type automaticTransitionTag(\n  std::string & transition_name)\n{\n  transition_name = \"\";\n}\n\n//-------------------------------------------------\ntemplate <typename T>\nclass HasAutomaticTransitionType\n{\nprivate:\n  typedef char YesType[1];\n  typedef char NoType[2];\n\n  template <typename C>\n  static YesType & test(decltype(&C::getDefaultTransitionType));\n  template <typename C>\n  static NoType & test(...);\n\npublic:\n  enum\n  {\n    value = sizeof(test<T>(0)) == sizeof(YesType)\n  };\n};\n\ntemplate <typename T>\ntypename std::enable_if<HasAutomaticTransitionType<T>::value, void>::type automaticTransitionType(\n  std::string & transition_type)\n{\n  transition_type = T::getDefaultTransitionType();\n}\n\ntemplate <typename T>\ntypename std::enable_if<!HasAutomaticTransitionType<T>::value, void>::type automaticTransitionType(\n  std::string & transition_type)\n{\n  transition_type = demangledTypeName<DEFAULT>();\n}\n\n// there are many ways to implement this, for instance adding static methods to the types\ntypedef boost::mpl::list<SUCCESS, ABORT, CANCEL, /*PREEMPT,*/ CONTINUELOOP, ENDLOOP>\n  DEFAULT_TRANSITION_TYPES;\n\n//--------------------------------\n\ntemplate <typename T>\nstruct type_\n{\n  using type = T;\n};\n\n//---------------------------------------------\ntemplate <typename T>\nstruct add_type_wrapper\n{\n  using type = type_<T>;\n};\n\ntemplate <typename TTransition>\nstruct CheckType\n{\n  CheckType(std::string * transitionTypeName) { this->transitionTypeName = transitionTypeName; }\n\n  std::string * transitionTypeName;\n  template <typename T>\n  void operator()(T)\n  {\n    //RCLCPP_INFO_STREAM(nh_->get_logger(),\"comparing..\"<< demangleSymbol<T>() <<\" vs \" << demangleSymbol<TTransition>() );\n    if (std::is_base_of<T, TTransition>::value || std::is_same<T, TTransition>::value)\n    {\n      *(this->transitionTypeName) = demangledTypeName<T>();\n      //RCLCPP_INFO(nh_->get_logger(),\"YESS!\");\n    }\n  }\n};\n\ntemplate <typename TTransition>\nstatic std::string getTransitionType()\n{\n  std::string output;\n  CheckType<TTransition> op(&output);\n  using boost::mpl::_1;\n  using wrappedList = typename boost::mpl::transform<DEFAULT_TRANSITION_TYPES, _1>::type;\n\n  boost::mpl::for_each<wrappedList>(op);\n  return output;\n}\n\n// // BASE CASE\n// template <typename T>\n// static void walkStateReactorsSources(SmaccStateReactorInfo &sbinfo, typelist<T>)\n// {\n//     auto sourceType = TypeInfo::getFromStdTypeInfo(typeid(T));\n//     auto evinfo = std::make_shared<SmaccEventInfo>(sourceType);\n//     EventLabel<T>(evinfo->label);\n//     sbinfo.sourceEventTypes.push_back(evinfo);\n//     RCLCPP_INFO_STREAM(nh_->get_logger(),\"event: \" << sourceType->getFullName());\n//     RCLCPP_INFO_STREAM(nh_->get_logger(),\"event parameters: \" << sourceType->templateParameters.size());\n// }\n\n// // RECURSIVE CASE\n// template <typename TEvHead, typename... TEvArgs>\n// static void walkStateReactorsSources(SmaccStateReactorInfo &sbinfo, typelist<TEvHead, TEvArgs...>)\n// {\n//     auto sourceType = TypeInfo::getFromStdTypeInfo(typeid(TEvHead));\n//     auto evinfo = std::make_shared<SmaccEventInfo>(sourceType);\n//     EventLabel<TEvHead>(evinfo->label);\n//     sbinfo.sourceEventTypes.push_back(evinfo);\n//     RCLCPP_INFO_STREAM(nh_->get_logger(),\"event: \" << sourceType->getFullName());\n//     RCLCPP_INFO_STREAM(nh_->get_logger(),\"event parameters: \" << sourceType->templateParameters.size());\n//     walkStateReactorsSources(sbinfo, typelist<TEvArgs...>());\n// }\n\n}  // namespace introspection\n}  // namespace smacc2\n#include <smacc2/introspection/smacc_state_machine_info.hpp>\n"
  },
  {
    "path": "smacc2/include/smacc2/introspection/smacc_state_info.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <functional>\n#include <memory>\n#include <smacc2/introspection/smacc_type_info.hpp>\n#include <smacc2/smacc_types.hpp>\n#include <vector>\nnamespace smacc2\n{\nnamespace introspection\n{\n//-------------------------------------------------------------\nstruct ClientBehaviorInfoEntry\n{\n  std::function<void(smacc2::ISmaccState *)> factoryFunction;\n  const std::type_info * behaviorType;\n  const std::type_info * orthogonalType;\n};\n\n//---------------------------------------------\n// contains information about an specific event in the statechart\nstruct SmaccEventInfo\n{\n  SmaccEventInfo(std::shared_ptr<TypeInfo> eventType);\n\n  std::string getEventTypeName();\n\n  std::string getEventSourceName();\n\n  // AKA orthogonal\n  std::string getOrthogonalName();\n\n  std::string label;\n\n  std::shared_ptr<TypeInfo> eventType;\n\nprivate:\n};\n\n// contains metainformation about some specific transition in the statechart\nstruct SmaccTransitionInfo\n{\n  SmaccTransitionInfo() {}\n\n  bool historyNode;\n  int index;\n  std::shared_ptr<const SmaccStateInfo> sourceState;\n  std::shared_ptr<const SmaccStateInfo> destinyState;\n\n  std::string transitionTag;\n  std::string transitionType;\n  std::shared_ptr<SmaccEventInfo> eventInfo;\n\n  smacc2::introspection::TypeInfo::Ptr transitionTypeInfo;\n};\n//---------------------------------------------\n\nstruct StateReactorCallbackFunctor\n{\n  std::function<void(std::shared_ptr<smacc2::StateReactor>)> fn;\n};\n\n// This object is used in a static context (when the runtime state reactor is not built yet)\nclass StateReactorHandler\n{\nprivate:\n  std::vector<StateReactorCallbackFunctor> callbacks_;\n\npublic:\n  StateReactorHandler(rclcpp::Node::SharedPtr nh) : nh_(nh) {}\n\n  void configureStateReactor(std::shared_ptr<smacc2::StateReactor> sr);\n\n  template <typename TEv>\n  void addInputEvent();\n\n  template <typename TEv>\n  void setOutputEvent();\n\n  rclcpp::Node::SharedPtr getNode();\n\n  std::shared_ptr<smacc2::introspection::SmaccStateReactorInfo> srInfo_;\n\nprivate:\n  rclcpp::Node::SharedPtr nh_;\n};\n//-------------------------------------------------------------\n\n// This object is used in a static context (when the runtime client behavior is not built yet)\ntemplate <class T>\nclass ClientBehaviorHandler\n{\npublic:\n  ClientBehaviorHandler() {}\n};\n//-------------------------------------------------------------\n// contains metainformation about some specific state reactor in the statechart\nstruct SmaccStateReactorInfo\n{\n  std::shared_ptr<SmaccStateInfo> ownerState;\n  std::function<void(smacc2::ISmaccState *)> factoryFunction;\n\n  //const std::type_info *stateReactorType;\n  std::shared_ptr<TypeInfo> stateReactorType;\n  std::shared_ptr<TypeInfo> outputEventType;\n  std::shared_ptr<TypeInfo> objectTagType;\n  std::vector<std::shared_ptr<SmaccEventInfo>> sourceEventTypes;\n  std::shared_ptr<StateReactorHandler> srh;\n};\n\n//-------------------------------------------------------------\nstruct EventGeneratorCallbackFunctor\n{\n  std::function<void(std::shared_ptr<smacc2::SmaccEventGenerator>)> fn;\n};\n\nclass EventGeneratorHandler\n{\nprivate:\n  std::vector<EventGeneratorCallbackFunctor> callbacks_;\n\npublic:\n  void configureEventGenerator(std::shared_ptr<smacc2::SmaccEventGenerator> eg);\n\n  template <typename TEv>\n  void setOutputEvent();\n\n  std::shared_ptr<smacc2::introspection::SmaccEventGeneratorInfo> egInfo_;\n};\n\n// contains metainformation about some specific event generator in the statechart\nstruct SmaccEventGeneratorInfo\n{\n  std::shared_ptr<SmaccStateInfo> ownerState;\n  std::function<void(smacc2::ISmaccState *)> factoryFunction;\n\n  // const std::type_info *eventGeneratorType;\n  std::shared_ptr<TypeInfo> eventGeneratorType;\n  std::shared_ptr<TypeInfo> outputEventType;\n  std::shared_ptr<TypeInfo> objectTagType;\n  std::vector<std::shared_ptr<SmaccEventInfo>> sourceEventTypes;\n  std::shared_ptr<EventGeneratorHandler> egh;\n};\n//-----------------------------------------------------------------------\nenum class SmaccStateType\n{\n  SUPERSTATE = 2,\n  STATE = 1,\n  SUPERSTATE_ROUTINE = 1\n};\n//-----------------------------------------------------------------------\nclass SmaccStateInfo : public std::enable_shared_from_this<SmaccStateInfo>\n{\npublic:\n  typedef std::shared_ptr<SmaccStateInfo> Ptr;\n\n  static std::map<const std::type_info *, std::vector<ClientBehaviorInfoEntry>> staticBehaviorInfo;\n  static std::map<const std::type_info *, std::vector<std::shared_ptr<SmaccStateReactorInfo>>>\n    stateReactorsInfo;\n  static std::map<const std::type_info *, std::vector<std::shared_ptr<SmaccEventGeneratorInfo>>>\n    eventGeneratorsInfo;\n\n  int stateIndex_;\n  std::string fullStateName;\n  std::string demangledStateName;\n\n  std::shared_ptr<SmaccStateMachineInfo> stateMachine_;\n  std::shared_ptr<SmaccStateInfo> parentState_;\n  std::vector<SmaccTransitionInfo> transitions_;\n\n  std::vector<std::shared_ptr<SmaccStateInfo>> children_;\n  int depth_;\n  const std::type_info * tid_;\n\n  SmaccStateInfo(\n    const std::type_info * tid, std::shared_ptr<SmaccStateInfo> parentState,\n    std::shared_ptr<SmaccStateMachineInfo> stateMachineInfo);\n\n  SmaccStateType getStateLevel();\n\n  inline int depth() const { return depth_; }\n\n  void getAncestors(std::list<const SmaccStateInfo *> & ancestorsList) const;\n\n  std::string getFullPath();\n\n  template <typename StateType>\n  std::shared_ptr<SmaccStateInfo> createChildState();\n\n  template <typename EvType>\n  void declareTransition(\n    std::shared_ptr<SmaccStateInfo> & dstState, std::string transitionTag,\n    std::string transitionType, bool history, TypeInfo::Ptr transitionTypeInfo);\n\n  // template <typename EvSource, template <typename> typename EvType>\n  // void declareTransition(std::shared_ptr<SmaccStateInfo> &dstState, std::string transitionTag, std::string transitionType, bool history);\n\n  const std::string & toShortName() const;\n\n  std::string getDemangledFullName() const;\n  rclcpp::Node::SharedPtr getNode();\n  inline rclcpp::Logger getLogger() { return getNode()->get_logger(); }\n};\n}  // namespace introspection\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/introspection/smacc_state_machine_info.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <map>\n#include <memory>\n#include <string>\n#include <vector>\n\n#include <smacc2/common.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n\n// smacc_msgs\n#include <smacc2_msgs/msg/smacc_event_generator.hpp>\n#include <smacc2_msgs/msg/smacc_orthogonal.hpp>\n#include <smacc2_msgs/msg/smacc_state.hpp>\n#include <smacc2_msgs/msg/smacc_state_reactor.hpp>\n#include <smacc2_msgs/msg/smacc_transition.hpp>\n\nnamespace smacc2\n{\nnamespace introspection\n{\nextern rclcpp::Node::SharedPtr globalNh_;\n\nclass SmaccStateMachineInfo : public std::enable_shared_from_this<SmaccStateMachineInfo>\n{\npublic:\n  explicit SmaccStateMachineInfo(rclcpp::Node::SharedPtr nh) : nh_(nh) {}\n\n  std::map<std::string, std::shared_ptr<SmaccStateInfo>> states;\n\n  std::vector<smacc2_msgs::msg::SmaccState> stateMsgs;\n\n  template <typename InitialStateType>\n  void buildStateMachineInfo();\n\n  template <typename StateType>\n  std::shared_ptr<SmaccStateInfo> createState(std::shared_ptr<SmaccStateInfo> parentState);\n\n  template <typename StateType>\n  bool containsState()\n  {\n    auto typeNameStr = typeid(StateType).name();\n\n    return states.count(typeNameStr) > 0;\n  }\n\n  template <typename StateType>\n  std::shared_ptr<SmaccStateInfo> getState()\n  {\n    if (this->containsState<StateType>())\n    {\n      return states[typeid(StateType).name()];\n    }\n    return nullptr;\n  }\n\n  inline rclcpp::Node::SharedPtr getNode() { return nh_; }\n\n  inline rclcpp::Logger getLogger() { return nh_->get_logger(); }\n\n  template <typename StateType>\n  void addState(std::shared_ptr<StateType> & state);\n  void assembleSMStructureMessage(ISmaccStateMachine * sm);\n\nprivate:\n  rclcpp::Node::SharedPtr nh_;\n};\n\n//---------------------------------------------\nstruct AddSubState\n{\n  std::shared_ptr<SmaccStateInfo> & parentState_;\n  explicit AddSubState(std::shared_ptr<SmaccStateInfo> & parentState) : parentState_(parentState) {}\n\n  template <typename T>\n  void operator()(T);\n};\n\n//---------------------------------------------\nstruct AddTransition\n{\n  std::shared_ptr<SmaccStateInfo> & currentState_;\n\n  explicit AddTransition(std::shared_ptr<SmaccStateInfo> & currentState)\n  : currentState_(currentState)\n  {\n  }\n\n  template <\n    template <typename, typename, typename> typename TTransition, typename TevSource,\n    template <typename> typename EvType, typename Tag, typename DestinyState>\n  void operator()(TTransition<EvType<TevSource>, DestinyState, Tag>);\n\n  template <\n    template <typename, typename> typename TTransition, typename TevSource,\n    template <typename> typename EvType, typename DestinyState>\n  void operator()(TTransition<EvType<TevSource>, DestinyState>);\n\n  template <typename T>\n  void operator()(T);\n};\n\n//---------------------------------------------\ntemplate <typename InitialStateType>\nstruct WalkStatesExecutor\n{\n  static void walkStates(std::shared_ptr<SmaccStateInfo> & currentState, bool rootInitialNode);\n};\n\n//---------------------------------------------\ntemplate <typename T>\nvoid AddSubState::operator()(T)\n{\n  using type_t = typename T::type;\n  //auto childState = this->parentState_->createChildState<type_t>()\n  WalkStatesExecutor<type_t>::walkStates(parentState_, false);\n}\n\n//--------------------------------------------\ntemplate <typename T>\ntypename disable_if<boost::mpl::is_sequence<T>>::type processSubState(\n  std::shared_ptr<SmaccStateInfo> & parentState)\n{\n  WalkStatesExecutor<T>::walkStates(parentState, false);\n}\n\n//---------------------------------------------\ntemplate <typename T>\ntypename enable_if<boost::mpl::is_sequence<T>>::type processSubState(\n  std::shared_ptr<SmaccStateInfo> & parentState)\n{\n  using boost::mpl::_1;\n  using wrappedList = typename boost::mpl::transform<T, add_type_wrapper<_1>>::type;\n  boost::mpl::for_each<wrappedList>(AddSubState(parentState));\n}\n\n//--------------------------------------------\n/*Iterate on All Transitions*/\ntemplate <typename T>\ntypename enable_if<boost::mpl::is_sequence<T>>::type processTransitions(\n  std::shared_ptr<SmaccStateInfo> & sourceState)\n{\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"State %s Walker has transition list\",\n    sourceState->fullStateName.c_str());\n  using boost::mpl::_1;\n  using wrappedList = typename boost::mpl::transform<T, add_type_wrapper<_1>>::type;\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"[DIAG] About to call boost::mpl::for_each for state %s\",\n    sourceState->fullStateName.c_str());\n  boost::mpl::for_each<wrappedList>(AddTransition(sourceState));\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"[DIAG] Completed boost::mpl::for_each for state %s\",\n    sourceState->fullStateName.c_str());\n}\n\ntemplate <typename Ev, typename Dst, typename Tag>\nvoid processTransition(\n  smacc2::Transition<Ev, boost::statechart::deep_history<Dst>, Tag> *,\n  std::shared_ptr<SmaccStateInfo> & sourceState)\n{\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"[DIAG] processTransition [deep_history] START for state %s\",\n    sourceState->toShortName().c_str());\n  auto transitionTypeInfo = TypeInfo::getTypeInfoFromType<\n    smacc2::Transition<Ev, boost::statechart::deep_history<Dst>, Tag>>();\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"[DIAG] processTransition [deep_history] got TypeInfo for state %s\",\n    sourceState->toShortName().c_str());\n  smacc2::Transition<Ev, Dst, Tag> * mock = nullptr;\n  processTransitionAux(mock, sourceState, true, transitionTypeInfo);\n}\n\ntemplate <typename Ev, typename Dst, typename Tag>\nvoid processTransition(\n  smacc2::Transition<Ev, Dst, Tag> * t, std::shared_ptr<SmaccStateInfo> & sourceState)\n{\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"[DIAG] processTransition START for state %s\",\n    sourceState->toShortName().c_str());\n  auto transitionTypeInfo = TypeInfo::getTypeInfoFromType<smacc2::Transition<Ev, Dst, Tag>>();\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"[DIAG] processTransition got TypeInfo for state %s\",\n    sourceState->toShortName().c_str());\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"State %s Walker transition: %s\", sourceState->toShortName().c_str(),\n    demangleSymbol(typeid(Ev).name()).c_str());\n  processTransitionAux(t, sourceState, false, transitionTypeInfo);\n}\n\ntemplate <typename Ev, typename Dst, typename Tag>\nvoid processTransitionAux(\n  smacc2::Transition<Ev, Dst, Tag> *, std::shared_ptr<SmaccStateInfo> & sourceState, bool history,\n  TypeInfo::Ptr & transitionTypeInfo)\n{\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"State %s Walker transition: %s\", sourceState->toShortName().c_str(),\n    demangleSymbol(typeid(Ev).name()).c_str());\n  std::string transitionTag;\n  std::string transitionType;\n\n  if (typeid(Tag) != typeid(default_transition_name))\n  {\n    transitionTag = demangleSymbol<Tag>();\n    transitionType = getTransitionType<Tag>();\n    RCLCPP_DEBUG_STREAM(globalNh_->get_logger(), \"TRANSITION TYPE:\" << transitionType);\n  }\n  else\n  {\n    transitionTag = \"\";\n    automaticTransitionTag<Ev>(transitionTag);\n    automaticTransitionType<Ev>(transitionType);\n  }\n\n  RCLCPP_INFO_STREAM(globalNh_->get_logger(), \"Transition tag: \" << transitionTag);\n\n  if (!sourceState->stateMachine_->containsState<Dst>())\n  {\n    auto realparentState = sourceState->stateMachine_->getState<typename Dst::TContext>();\n    auto siblingnode = sourceState->stateMachine_->createState<Dst>(realparentState);\n\n    // auto siblingnode = sourceState->stateMachine_->createState<Dst>(sourceState->parentState_);\n    WalkStatesExecutor<Dst>::walkStates(siblingnode, true);\n    sourceState->declareTransition<Ev>(\n      siblingnode, transitionTag, transitionType, history, transitionTypeInfo);\n  }\n  else\n  {\n    // auto realparentState = sourceState->stateMachine_->getState<typename Dst::TContext>();\n    // auto siblingnode = sourceState->stateMachine_->createState<Dst>(realparentState);\n\n    auto siblingnode = sourceState->stateMachine_->getState<Dst>();\n    sourceState->declareTransition<Ev>(\n      siblingnode, transitionTag, transitionType, history, transitionTypeInfo);\n  }\n}\n\n//---------------------------------------------\ntemplate <typename EvType>\nvoid SmaccStateInfo::declareTransition(\n  std::shared_ptr<SmaccStateInfo> & dstState, std::string transitionTag, std::string transitionType,\n  bool history, TypeInfo::Ptr transitionTypeInfo)\n{\n  auto evtype = demangledTypeName<EvType>();\n\n  SmaccTransitionInfo transitionInfo;\n  transitionInfo.index = transitions_.size();\n  transitionInfo.sourceState = shared_from_this();\n  transitionInfo.destinyState = dstState;\n  transitionInfo.transitionTypeInfo = transitionTypeInfo;\n\n  if (transitionTag != \"\")\n    transitionInfo.transitionTag = transitionTag;\n  else\n    transitionInfo.transitionTag = \"Transition_\" + std::to_string(transitionInfo.index);\n\n  transitionInfo.transitionType = transitionType;\n  transitionInfo.historyNode = history;\n\n  transitionInfo.eventInfo =\n    std::make_shared<SmaccEventInfo>(transitionTypeInfo->templateParameters.front());\n\n  EventLabel<EvType>(transitionInfo.eventInfo->label);\n  // RCLCPP_DEBUG_STREAM(getLogger(), \"LABEL: \" << transitionInfo.eventInfo->label);\n\n  transitions_.push_back(transitionInfo);\n}\n//---------------------------------------------\n\n//------------------ staticConfigure -----------------------------\n\n// SFINAE test\ntemplate <typename T>\nclass HasOnDefinition\n{\nprivate:\n  typedef char YesType[1];\n  typedef char NoType[2];\n\n  template <typename C>\n  static YesType & test(decltype(&C::staticConfigure));\n  template <typename C>\n  static NoType & test(...);\n\npublic:\n  enum\n  {\n    value = sizeof(test<T>(0)) == sizeof(YesType)\n  };\n};\n\n// template <typename TevSource, template <typename> typename EvType>\n// void SmaccStateInfo::declareTransition(std::shared_ptr<SmaccStateInfo> &dstState, std::string transitionTag, std::string transitionType, bool history)\n// {\n//     auto evtype = demangledTypeName<EvType<TevSource>>();\n\n//     SmaccTransitionInfo transitionInfo;\n//     transitionInfo.index = transitions_.size();\n//     transitionInfo.sourceState = shared_from_this();\n//     transitionInfo.destinyState = dstState;\n\n//     if (transitionTag != \"\")\n//         transitionInfo.transitionTag = transitionTag;\n//     else\n//         transitionInfo.transitionTag = \"Transition_\" + std::to_string(transitionInfo.index);\n\n//     transitionInfo.transitionType = transitionType;\n\n//     transitionInfo.eventInfo = std::make_shared<SmaccEventInfo>(TypeInfo::getTypeInfoFromString(demangleSymbol(typeid(EvType<TevSource>).name())));\n\n//     EventLabel<EvType<TevSource>>(transitionInfo.eventInfo->label);\n//     RCLCPP_ERROR_STREAM(getLogger(),\"LABEL: \" << transitionInfo.eventInfo->label);\n\n//     transitions_.push_back(transitionInfo);\n// }\n\n//---------------------------------------------\ntemplate <typename Ev, typename Dst>\nvoid processTransition(\n  statechart::transition<Ev, Dst> *, std::shared_ptr<SmaccStateInfo> & sourceState)\n{\n  // RCLCPP_INFO_STREAM(getLogger(),\"GOTCHA\");\n}\n\ntemplate <typename Ev>\nvoid processTransition(\n  statechart::custom_reaction<Ev> *, std::shared_ptr<SmaccStateInfo> & sourceState)\n{\n  // RCLCPP_INFO_STREAM(getLogger(),\"GOTCHA\");\n}\n\n//---------------------------------------------\n// only reached if it is a leaf transition in the mpl::list\n\ntemplate <typename T>\ntypename disable_if<boost::mpl::is_sequence<T>>::type processTransitions(\n  std::shared_ptr<SmaccStateInfo> & sourceState)\n{\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"[DIAG] processTransitions [single/leaf] called for state %s\",\n    sourceState->fullStateName.c_str());\n  T * dummy = nullptr;\n  processTransition(dummy, sourceState);\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"[DIAG] processTransitions [single/leaf] completed for state %s\",\n    sourceState->fullStateName.c_str());\n}\n\ntemplate <typename T>\ntypename std::enable_if<HasOnDefinition<T>::value, void>::type CallOnDefinition()\n{\n  /* something when T has toString ... */\n  RCLCPP_INFO_STREAM(\n    globalNh_->get_logger(), \"EXECUTING ONDEFINITION: \" << demangleSymbol(typeid(T).name()));\n  T::staticConfigure();\n}\n\ntemplate <typename T>\ntypename std::enable_if<!HasOnDefinition<T>::value, void>::type CallOnDefinition()\n{\n  RCLCPP_INFO_STREAM(\n    globalNh_->get_logger(),\n    \"static OnDefinition: dont exist for \" << demangleSymbol(typeid(T).name()));\n  /* something when T has toString ... */\n}\n\n/*\n// only reached if it is a leaf transition in the mpl::list\ntemplate <template <typename,typename,typename> typename TTransition, typename TevSource,\ntemplate <typename> typename EvType, typename Tag, typename DestinyState >\ntypename disable_if<boost::mpl::is_sequence<TTransition<EvType<TevSource>,DestinyState, Tag>>>::type\nprocessTransitions(std::shared_ptr<SmaccStateInfo> &sourceState)\n{\n    RCLCPP_INFO(getLogger(),\"DETECTED COMPLEX TRANSITION **************\");\n    // RCLCPP_INFO_STREAM(getLogger(),\"state transition from: \" << sourceState->demangledStateName\n    << \" of type: \" << demangledTypeName<T>());\n    TTransition<EvType<TevSource>,DestinyState, Tag> *dummy;\n    processTransition(dummy, sourceState);\n}\n\ntemplate <template <typename,typename> typename TTransition, typename TevSource,\ntemplate <typename> typename EvType, typename DestinyState >\ntypename disable_if<boost::mpl::is_sequence<TTransition<EvType<TevSource>,DestinyState>>>::type\nprocessTransitions(std::shared_ptr<SmaccStateInfo> &sourceState)\n{\n    RCLCPP_INFO(getLogger(),\"DETECTED COMPLEX TRANSITION **************\");\n    // RCLCPP_INFO_STREAM(getLogger(),\"state transition from: \" << sourceState->demangledStateName\n    << \" of type: \" << demangledTypeName<T>());\n    TTransition<EvType<TevSource>,DestinyState> *dummy;\n    processTransition(dummy, sourceState);\n}\n*/\n\n//--------------------------------------------\n\ntemplate <\n  template <typename, typename, typename> typename TTransition, typename TevSource,\n  template <typename> typename EvType, typename Tag, typename DestinyState>\nvoid AddTransition::operator()(TTransition<EvType<TevSource>, DestinyState, Tag>)\n{\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"[DIAG] AddTransition::operator() [3-param] called for state %s\",\n    currentState_->fullStateName.c_str());\n  processTransitions<TTransition<EvType<TevSource>, DestinyState, Tag>>(currentState_);\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"[DIAG] AddTransition::operator() [3-param] completed for state %s\",\n    currentState_->fullStateName.c_str());\n}\n\n//--------------------------------------------\n\ntemplate <\n  template <typename, typename> typename TTransition, typename TevSource,\n  template <typename> typename EvType, typename DestinyState>\nvoid AddTransition::operator()(TTransition<EvType<TevSource>, DestinyState>)\n{\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"[DIAG] AddTransition::operator() [2-param] called for state %s\",\n    currentState_->fullStateName.c_str());\n  processTransitions<TTransition<EvType<TevSource>, DestinyState>>(currentState_);\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"[DIAG] AddTransition::operator() [2-param] completed for state %s\",\n    currentState_->fullStateName.c_str());\n}\n\ntemplate <typename TTrans>\nvoid AddTransition::operator()(TTrans)\n{\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"[DIAG] AddTransition::operator() [generic] called for state %s\",\n    currentState_->fullStateName.c_str());\n  using type_t = typename TTrans::type;\n  processTransitions<type_t>(currentState_);\n  RCLCPP_INFO(\n    globalNh_->get_logger(), \"[DIAG] AddTransition::operator() [generic] completed for state %s\",\n    currentState_->fullStateName.c_str());\n}\n\n/*\nvoid CallOnDefinition(...)\n{\n\n}*/\n\n//-----------------------------------------------------------------------------------\ntemplate <typename InitialStateType>\nvoid WalkStatesExecutor<InitialStateType>::walkStates(\n  std::shared_ptr<SmaccStateInfo> & parentState, bool rootInitialNode)\n{\n  //rclcpp::Duration(1).sleep();\n  auto currentname = demangledTypeName<InitialStateType>();\n\n  std::shared_ptr<SmaccStateInfo> targetState;\n\n  if (!rootInitialNode)\n  {\n    if (parentState->stateMachine_->containsState<InitialStateType>())\n    {\n      // it already exist: break;\n      return;\n    }\n\n    targetState = parentState->createChildState<InitialStateType>();\n  }\n  else\n  {\n    targetState = parentState;\n  }\n\n  CallOnDefinition<InitialStateType>();\n\n  typedef\n    typename std::remove_pointer<decltype(InitialStateType::smacc_inner_type)>::type InnerType;\n  processSubState<InnerType>(targetState);\n\n  // -------------------- REACTIONS --------------------\n  typedef typename InitialStateType::reactions reactions;\n  // RCLCPP_INFO_STREAM(getLogger(),\"state machine initial state reactions: \"\n  // << demangledTypeName<reactions>());\n\n  processTransitions<reactions>(targetState);\n}\n\n//------------------------------------------------\n\ntemplate <typename InitialStateType>\nvoid SmaccStateMachineInfo::buildStateMachineInfo()\n{\n  auto initialState = this->createState<InitialStateType>(nullptr);\n  WalkStatesExecutor<InitialStateType>::walkStates(initialState, true);\n}\n\ntemplate <typename StateType>\nstd::shared_ptr<SmaccStateInfo> SmaccStateMachineInfo::createState(\n  std::shared_ptr<SmaccStateInfo> parent)\n{\n  auto thisptr = this->shared_from_this();\n  auto * statetid = &(typeid(StateType));\n\n  auto demangledName = demangledTypeName<StateType>();\n  RCLCPP_INFO_STREAM(getLogger(), \"Creating State Info: \" << demangledName);\n\n  auto state = std::make_shared<SmaccStateInfo>(statetid, parent, thisptr);\n  state->demangledStateName = demangledName;\n  state->fullStateName = typeid(StateType).name();\n  state->stateIndex_ = states.size();\n\n  if (parent != nullptr)\n  {\n    parent->children_.push_back(state);\n  }\n\n  this->addState(state);\n\n  return state;\n}\n\ntemplate <typename StateType>\nvoid SmaccStateMachineInfo::addState(std::shared_ptr<StateType> & state)\n{\n  states[state->fullStateName] = state;\n}\n\ntemplate <typename StateType>\nstd::shared_ptr<SmaccStateInfo> SmaccStateInfo::createChildState()\n{\n  auto realparentState = this->stateMachine_->getState<typename StateType::TContext>();\n\n  auto childState = this->stateMachine_->createState<StateType>(realparentState);\n\n  RCLCPP_WARN_STREAM(\n    getLogger(), \"Real parent state> \" << demangleSymbol<typename StateType::TContext>());\n\n  /*auto contextInfo = TypeInfo::getTypeInfoFromType<InitialStateType>();\n    auto parentState2= getState<InitialStateType::TContext>();\n    parentState2->createChildState<InitialStateType>();*/\n\n  // this->stateMachine_->addState(childState);\n  // stateMachineInfo.addState(stateMachineInfo)\n  // stateNames.push_back(currentname);\n  // RCLCPP_INFO(getLogger(),\"------------\");\n  // RCLCPP_INFO_STREAM(getLogger(),\"** STATE state: \"<< this->demangledStateName);\n\n  return childState;\n}\n}  // namespace introspection\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/introspection/smacc_type_info.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <map>\n#include <memory>\n#include <string>\n#include <typeinfo>\n#include <vector>\n\nnamespace smacc2\n{\nnamespace introspection\n{\nclass TypeInfo\n{\npublic:\n  typedef std::shared_ptr<TypeInfo> Ptr;\n\n  //---- FACTORY STATIC METHODS -----------\n  static TypeInfo::Ptr getTypeInfoFromString(std::string inputtext);\n  static TypeInfo::Ptr getFromStdTypeInfo(const std::type_info & tid);\n\n  template <typename T>\n  static TypeInfo::Ptr getTypeInfoFromType()\n  {\n    return TypeInfo::getFromStdTypeInfo(typeid(T));\n  }\n  //---------------------------------------\n\n  std::vector<Ptr> templateParameters;\n\n  TypeInfo(std::string tkey, std::string codedtype, std::string finaltype)\n  {\n    this->tkey = tkey;\n    this->codedtype = codedtype;\n    this->finaltype = finaltype;\n  }\n\n  std::string toString() { return this->tkey + \":\" + this->finaltype; }\n\n  std::string getNonTemplatedTypeName()\n  {\n    auto index = this->finaltype.find(\"<\");\n    return this->finaltype.substr(0, index);\n  }\n\n  const std::string & getFullName() { return this->finaltype; }\n\n  static std::map<std::string, Ptr> typeInfoDatabase;\n\nprivate:\n  std::string tkey;\n  std::string codedtype;\n  std::string finaltype;\n};\n}  // namespace introspection\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/introspection/state_traits.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\nnamespace smacc2\n{\ntemplate <typename T, typename TransitionTagName>\nclass HasSpecificNamedOnExit\n{\n  template <typename U, void (U::*)(TransitionTagName)>\n  struct Check;\n  template <typename U>\n  static char func(Check<U, &U::onExit> *);\n  template <typename U>\n  static int func(...);\n\npublic:\n  typedef HasSpecificNamedOnExit type;\n  enum\n  {\n    value = sizeof(func<T>(0)) == sizeof(char)\n  };\n};\n\ntemplate <typename TState, typename TTransitionTagName>\nvoid specificNamedOnExit(TState & st, TTransitionTagName tn, std::true_type)\n{\n  st.onExit(tn);\n}\n\ntemplate <typename TState, typename TTransitionTagName>\nvoid specificNamedOnExit(TState &, TTransitionTagName, std::false_type)\n{\n}\n\ntemplate <typename TState, typename TTransitionTagName>\nvoid specificNamedOnExit(TState & m, TTransitionTagName tn)\n{\n  specificNamedOnExit(\n    m, tn,\n    std::integral_constant<bool, HasSpecificNamedOnExit<TState, TTransitionTagName>::value>());\n}\n\n//-------------------------------------------------\n\ntemplate <typename T>\nclass HasStandardOnExit\n{\n  template <typename U, void (U::*)()>\n  struct Check;\n  template <typename U>\n  static char func(Check<U, &U::onExit> *);\n  template <typename U>\n  static int func(...);\n\npublic:\n  typedef HasStandardOnExit type;\n  enum\n  {\n    value = sizeof(func<T>(0)) == sizeof(char)\n  };\n};\n\ntemplate <typename TState>\nvoid standardOnExit(TState & st, std::true_type)\n{\n  st.onExit();\n}\n\ntemplate <typename TState>\nvoid standardOnExit(TState &, std::false_type)\n{\n}\n\ntemplate <typename TState>\nvoid standardOnExit(TState & m)\n{\n  standardOnExit(m, std::integral_constant<bool, HasStandardOnExit<TState>::value>());\n}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n#include <smacc2/common.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n#include <smacc2/smacc_default_events.hpp>\n#include <smacc2/smacc_signal_detector.hpp>\n#include <smacc2/smacc_state_machine_base.hpp>\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_asynchronous_client_behavior.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <future>\n#include <smacc2/smacc_client_behavior_base.hpp>\n#include <smacc2/smacc_signal.hpp>\n\nnamespace smacc2\n{\ntemplate <typename AsyncCB, typename Orthogonal>\nstruct EvCbFinished : sc::event<EvCbFinished<AsyncCB, Orthogonal>>\n{\n};\n\ntemplate <typename AsyncCB, typename Orthogonal>\nstruct EvCbSuccess : sc::event<EvCbSuccess<AsyncCB, Orthogonal>>\n{\n};\n\ntemplate <typename AsyncCB, typename Orthogonal>\nstruct EvCbFailure : sc::event<EvCbFailure<AsyncCB, Orthogonal>>\n{\n};\n\n// INTRODUCTION: Conceptually, AsynchronousClientBehaviors start in parallel on state entry.\n// Asnchronous client behaviors are used when the onEntry or onExit function execution could be too much slow and\n// could block the state machine thread.\n// AsynchronousClientBehaviors are related with the concept orthogonality of Smacc State Machines.\n// ASYNCHRONOUS STATE MACHINES DESIGN NOTES: Asynchronous behaviors can safely post events and use its local methods,\n//  but the interaction with other components or elements of\n// the state machine is not by-default thread safe and must be manually implemented. For example, if some element of the architecture\n// (components, states, clients) need to access to this behavior client information it is needed to implement a mutex for the internal\n// state of this behavior. Other example: if this behavior access to some component located in other thread, it is also may be needed\n// to some mutex for that component\n// ALTERNATIVE: for long duration behaviors: using default-synchromous SmaccClientBehaviors with the update method\n\nclass SmaccAsyncClientBehavior : public ISmaccClientBehavior\n{\npublic:\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation();\n\n  virtual ~SmaccAsyncClientBehavior();\n\n  template <typename TCallback, typename T>\n  smacc2::SmaccSignalConnection onSuccess(TCallback callback, T * object);\n\n  template <typename TCallback, typename T>\n  smacc2::SmaccSignalConnection onFinished(TCallback callback, T * object);\n\n  template <typename TCallback, typename T>\n  smacc2::SmaccSignalConnection onFailure(TCallback callback, T * object);\n\n  void requestForceFinish();\n\n  // executes onExit in a new thread\n  void executeOnEntry() override;\n\n  // executes onExit in a new thread, waits first onEntry thread if it is still running\n  void executeOnExit() override;\n  void waitOnEntryThread(bool requestFinish);\n\nprotected:\n  void postSuccessEvent();\n  void postFailureEvent();\n\n  virtual void dispose() override;\n\n  /// \\brief onEntry is executed in a new thread. However the current state cannot be left\n  /// until the onEntry thread finishes. This flag can be checked from the onEntry thread to force finishing the thread.\n  // All asyncrhonous client behaviors should implement the ability of interrupting the onEntry thread.\n  // to avoid blocking the state machine.\n\n  // inline bool isShutdownRequested() { return isShutdownRequested_; }\n  bool isShutdownRequested();\n\nprivate:\n  void waitFutureIfNotFinished(std::optional<std::future<int>> & threadfut, bool requestFinish);\n\n  std::optional<std::future<int>> onEntryThread_;\n  std::optional<std::future<int>> onExitThread_;\n\n  std::function<void()> postFinishEventFn_;\n  std::function<void()> postSuccessEventFn_;\n  std::function<void()> postFailureEventFn_;\n\n  SmaccSignal<void()> onFinished_;\n  SmaccSignal<void()> onSuccess_;\n  SmaccSignal<void()> onFailure_;\n\n  bool isShutdownRequested_ = false;\n};\n}  // namespace smacc2\n\n#include <smacc2/impl/smacc_asynchronous_client_behavior_impl.hpp>\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_client.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <smacc2/common.hpp>\n#include <smacc2/component.hpp>\n#include <typeinfo>\n\nnamespace smacc2\n{\nstruct ComponentKey\n{\n  ComponentKey(const std::type_info * typeinfo, std::string name)\n  {\n    this->name = name;\n    this->typeinfo = typeinfo;\n    encodedKey = std::to_string((long)(void *)typeinfo) + \"_\" + name;\n  }\n  std::string encodedKey;\n  const std::type_info * typeinfo;\n  std::string name;\n\n  bool operator<(const ComponentKey & other) const { return this->encodedKey < other.encodedKey; }\n  bool operator==(const ComponentKey & other) const { return this->encodedKey == other.encodedKey; }\n};\n\nclass ISmaccClient\n{\npublic:\n  ISmaccClient();\n  virtual ~ISmaccClient();\n\n  virtual void onInitialize();\n\n  // Returns a custom identifier defined by the specific plugin implementation\n  virtual std::string getName() const;\n\n  template <typename TComponent>\n  TComponent * getComponent();\n\n  template <typename TComponent>\n  TComponent * getComponent(std::string name);\n\n  // Gets the i-th component of type TComponent\n  template <typename TComponent>\n  TComponent * getComponent(int index);\n\n  virtual smacc2::introspection::TypeInfo::Ptr getType();\n\n  inline ISmaccStateMachine * getStateMachine();\n\n  template <typename TSmaccSignal, typename T>\n  void connectSignal(TSmaccSignal & signal, void (T::*callback)(), T * object);\n\n  template <typename SmaccClientType>\n  void requiresClient(SmaccClientType *& storage);\n\n  void getComponents(std::vector<std::shared_ptr<ISmaccComponent>> & components);\n\n  const std::vector<std::shared_ptr<ISmaccComponent>> & iterateComponents() const;\n\n  // now this needs to be public because sub-components needs to use. This is something to improve.\n  template <typename EventType>\n  void postEvent(const EventType & ev);\n\n  // now this needs to be public because sub-components needs to use. This is something to improve.\n  template <typename EventType>\n  void postEvent();\n\nprotected:\n  // Called when the orthogonal creates this client - used to initialize components\n  template <typename TOrthogonal, typename TClient>\n  void onComponentInitialization()\n  {\n  }\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n  }\n\n  // components\n  std::map<ComponentKey, std::shared_ptr<smacc2::ISmaccComponent>> components_;\n\n  template <typename SmaccComponentType, typename TOrthogonal, typename TClient, typename... TArgs>\n  SmaccComponentType * createComponent(TArgs... targs);\n\n  template <typename SmaccComponentType, typename TOrthogonal, typename TClient, typename... TArgs>\n  SmaccComponentType * createNamedComponent(std::string name, TArgs... targs);\n\n  rclcpp::Node::SharedPtr getNode();\n\n  inline rclcpp::Logger getLogger() { return getNode()->get_logger(); }\n\nprivate:\n  // A reference to the state machine object that owns this resource\n  ISmaccStateMachine * stateMachine_;\n  ISmaccOrthogonal * orthogonal_;\n\n  // friend method called by orthogonal\n  void initialize();\n\n  // friend method called by orthogonal\n  // Assigns the owner of this resource to the given state machine parameter object\n  void setStateMachine(ISmaccStateMachine * stateMachine);\n\n  // friend method called by orthogonal\n  void setOrthogonal(ISmaccOrthogonal * orthogonal);\n\n  friend class ISmaccOrthogonal;\n  friend class ISmaccComponent;\n\n  template <typename TOrthogonal>\n  friend class Orthogonal;\n};\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_client_behavior.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <smacc2/smacc_client_behavior_base.hpp>\n\nnamespace smacc2\n{\nclass SmaccClientBehavior : public ISmaccClientBehavior\n{\npublic:\n  virtual ~SmaccClientBehavior() {}\n  void onEntry() override;\n  void onExit() override;\n};\n}  // namespace smacc2\n\n#include <smacc2/impl/smacc_client_behavior_impl.hpp>\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_client_behavior_base.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <string>\n\n#include <smacc2/common.hpp>\n\nnamespace smacc2\n{\n\nclass ISmaccClientBehavior\n{\npublic:\n  ISmaccClientBehavior();\n\n  virtual ~ISmaccClientBehavior();\n\n  inline ISmaccStateMachine * getStateMachine();\n\n  std::string getName() const;\n\n  template <typename SmaccClientType>\n  void requiresClient(SmaccClientType *& storage);\n\n  template <typename SmaccComponentType>\n  void requiresComponent(\n    SmaccComponentType *& storage,\n    ComponentRequirement requirementType = ComponentRequirement::SOFT);\n\n  virtual void onEntry() {}\n\n  virtual void onExit() {}\n\n  //internal visibility (private + friend)\n  virtual void executeOnEntry();\n\n  //internal visibility (private + friend)\n  virtual void executeOnExit();\n\nprotected:\n  virtual void runtimeConfigure();\n\n  template <typename EventType>\n  void postEvent(const EventType & ev);\n\n  template <typename EventType>\n  void postEvent();\n\n  inline ISmaccState * getCurrentState();\n\n  virtual void dispose();\n\n  virtual rclcpp::Node::SharedPtr getNode() const;\n\n  virtual rclcpp::Logger getLogger() const;\n\nprivate:\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation();\n\n  // a reference to the owner state machine\n  ISmaccStateMachine * stateMachine_;\n\n  // a reference to the state where the client behavior is being executed\n  ISmaccState * currentState;\n  smacc2::ISmaccOrthogonal * currentOrthogonal;\n\n  friend class ISmaccState;\n  friend class ISmaccOrthogonal;\n  friend class ISmaccAsynchronousClientBehavior;\n};\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_default_events.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/smacc_types.hpp>\n\n#include <boost/statechart/event.hpp>\n#include <boost/statechart/state.hpp>\n\nnamespace smacc2\n{\n// template <typename T>\n// using  event=sc::event<T>;\n\nnamespace default_events\n{\nusing namespace smacc2::introspection;\nusing namespace smacc2::default_transition_tags;\n\n//-------------- ACTION EVENTS --------------------------------------------------------\ntemplate <typename ActionFeedback, typename TOrthogonal>\nstruct EvActionFeedback : sc::event<EvActionFeedback<ActionFeedback, TOrthogonal>>\n{\n  smacc2::client_bases::ISmaccActionClient * client;\n  ActionFeedback feedbackMessage;\n  // boost::any feedbackMessage;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvActionResult : sc::event<EvActionResult<TSource, TOrthogonal>>\n{\n  typename TSource::WrappedResult resultMessage;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvActionSucceeded : sc::event<EvActionSucceeded<TSource, TOrthogonal>>\n{\n  typename TSource::WrappedResult resultMessage;\n\n  static std::string getEventLabel()\n  {\n    // show ros message type\n    std::string label;\n    EventLabel<TSource>(label);\n    return label;\n  }\n\n  static std::string getDefaultTransitionTag() { return demangledTypeName<SUCCESS>(); }\n\n  static std::string getDefaultTransitionType() { return demangledTypeName<SUCCESS>(); }\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvActionAborted : sc::event<EvActionAborted<TSource, TOrthogonal>>\n{\n  typename TSource::WrappedResult resultMessage;\n\n  static std::string getEventLabel()\n  {\n    // show ros message type\n    std::string label;\n    EventLabel<TSource>(label);\n    return label;\n  }\n\n  static std::string getDefaultTransitionTag() { return demangledTypeName<ABORT>(); }\n\n  static std::string getDefaultTransitionType() { return demangledTypeName<ABORT>(); }\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvActionCancelled : sc::event<EvActionCancelled<TSource, TOrthogonal>>\n{\n  typename TSource::WrappedResult resultMessage;\n\n  static std::string getEventLabel()\n  {\n    // show ros message type\n    std::string label;\n    EventLabel<TSource>(label);\n    return label;\n  }\n\n  static std::string getDefaultTransitionTag() { return demangledTypeName<CANCEL>(); }\n\n  static std::string getDefaultTransitionType() { return demangledTypeName<CANCEL>(); }\n};\n\n//-------------- SERVICE EVENTS --------------------------------------------------------\ntemplate <typename TSource, typename TOrthogonal, typename TResponse>\nstruct EvServiceResponse : sc::event<EvServiceResponse<TSource, TOrthogonal, TResponse>>\n{\n  TResponse response;\n\n  static std::string getEventLabel()\n  {\n    std::string label;\n    EventLabel<TSource>(label);\n    return label;\n  }\n\n  static std::string getDefaultTransitionTag() { return demangledTypeName<SUCCESS>(); }\n\n  static std::string getDefaultTransitionType() { return demangledTypeName<SUCCESS>(); }\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvServiceRequestSent : sc::event<EvServiceRequestSent<TSource, TOrthogonal>>\n{\n  static std::string getEventLabel()\n  {\n    std::string label;\n    EventLabel<TSource>(label);\n    return label;\n  }\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvServiceFailure : sc::event<EvServiceFailure<TSource, TOrthogonal>>\n{\n  static std::string getEventLabel()\n  {\n    std::string label;\n    EventLabel<TSource>(label);\n    return label;\n  }\n\n  static std::string getDefaultTransitionTag() { return demangledTypeName<ABORT>(); }\n\n  static std::string getDefaultTransitionType() { return demangledTypeName<ABORT>(); }\n};\n\n//---------- CONTROL FLOW EVENTS ----------------------------------------------------------\n\ntemplate <typename StateType>\nstruct EvStateRequestFinish : sc::event<EvStateRequestFinish<StateType>>\n{\n};\n\ntemplate <typename StateType>\nstruct EvSequenceFinished : sc::event<EvSequenceFinished<StateType>>\n{\n};\n\ntemplate <typename TSource>\nstruct EvLoopContinue : sc::event<EvLoopContinue<TSource>>\n{\n  static std::string getDefaultTransitionTag() { return demangledTypeName<CONTINUELOOP>(); }\n\n  static std::string getDefaultTransitionType() { return demangledTypeName<CONTINUELOOP>(); }\n};\n\ntemplate <typename TSource>\nstruct EvLoopEnd : sc::event<EvLoopEnd<TSource>>\n{\n  static std::string getDefaultTransitionTag() { return demangledTypeName<ENDLOOP>(); }\n\n  static std::string getDefaultTransitionType() { return demangledTypeName<ENDLOOP>(); }\n};\n\n//---------- CONTROL FLOW EVENTS ----------------------------------------------------------\ntemplate <\n  typename TSource, typename TOrthogonal, typename TMessageType = typename TSource::TMessageType>\nstruct EvTopicInitialMessage : sc::event<EvTopicInitialMessage<TSource, TOrthogonal, TMessageType>>\n{\n  // typename EvTopicInitialMessage<SensorBehaviorType>::TMessageType msgData;\n  static std::string getEventLabel()\n  {\n    auto typeinfo = TypeInfo::getTypeInfoFromType<TMessageType>();\n\n    std::string label = typeinfo->getNonTemplatedTypeName();\n    return label;\n  }\n\n  TMessageType msgData;\n};\n\ntemplate <\n  typename TSource, typename TOrthogonal, typename TMessageType = typename TSource::TMessageType>\nstruct EvTopicMessage : sc::event<EvTopicMessage<TSource, TOrthogonal, TMessageType>>\n{\n  static std::string getEventLabel()\n  {\n    auto typeinfo = TypeInfo::getTypeInfoFromType<TMessageType>();\n\n    std::string label = typeinfo->getNonTemplatedTypeName();\n    return label;\n  }\n\n  TMessageType msgData;\n};\n}  // namespace default_events\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_event_generator.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <algorithm>\n#include <boost/statechart/event.hpp>\n#include <functional>\n#include <map>\n#include <memory>\n#include <smacc2/introspection/introspection.hpp>\n#include <vector>\n\nnamespace smacc2\n{\nclass ISmaccState;\nclass ISMaccStateMachine;\n\nclass SmaccEventGenerator\n{\npublic:\n  SmaccEventGenerator();\n  virtual ~SmaccEventGenerator();\n\n  template <typename TState, typename TSource>\n  void onStateOrthogonalAllocation();\n\n  virtual void onEntry();\n  virtual void onExit();\n\n  template <typename EventType>\n  void postEvent(const EventType & ev);\n\n  template <typename EventType>\n  void postEvent();\n\n  void initialize(ISmaccState * ownerState);\n  virtual void onInitialized();\n\nprivate:\n  ISmaccState * ownerState_;\n  friend ISmaccStateMachine;\n};\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_fifo_scheduler.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <boost/statechart/fifo_scheduler.hpp>\n#include <smacc2/smacc_fifo_worker.hpp>\n\ntypedef boost::statechart::fifo_scheduler<SmaccFifoWorker, SmaccAllocator> SmaccFifoScheduler;\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_fifo_worker.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <boost/statechart/fifo_worker.hpp>\n\n// typedef std::allocator<void> SmaccAllocator;\ntypedef std::allocator<boost::statechart::none> SmaccAllocator;\ntypedef boost::statechart::fifo_worker<SmaccAllocator> SmaccFifoWorker;\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_orthogonal.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <smacc2/common.hpp>\n#include <utility>\n\nnamespace smacc2\n{\nclass ISmaccOrthogonal\n{\npublic:\n  void setStateMachine(ISmaccStateMachine * value);\n\n  inline ISmaccStateMachine * getStateMachine();\n\n  void initState(ISmaccState * state);\n\n  void addClientBehavior(std::shared_ptr<smacc2::ISmaccClientBehavior> clientBehavior);\n\n  void runtimeConfigure();\n\n  void onEntry();\n\n  void onExit();\n\n  void onDispose();\n\n  virtual std::string getName() const;\n\n  template <typename SmaccComponentType>\n  void requiresComponent(SmaccComponentType *& storage);\n\n  template <typename SmaccClientType>\n  bool requiresClient(SmaccClientType *& storage);\n\n  inline const std::vector<std::shared_ptr<smacc2::ISmaccClient>> & getClients();\n\n  inline const std::vector<std::vector<std::shared_ptr<smacc2::ISmaccClientBehavior>>> &\n  getClientBehaviors() const;\n\n  template <typename T>\n  void setGlobalSMData(std::string name, T value);\n\n  template <typename T>\n  bool getGlobalSMData(std::string name, T & ret);\n\n  // returns a client behavior of a given type. If the client behavior is not found, it returns nullptr\n  // the index parameter is used to specify the client behavior in case there are more than one\n  template <typename TClientBehavior>\n  TClientBehavior * getClientBehavior(int index = 0);\n\n  rclcpp::Node::SharedPtr getNode();\n  inline rclcpp::Logger getLogger() { return getNode()->get_logger(); }\n\nprotected:\n  virtual void onInitialize();\n\n  void initializeClients();\n\n  template <typename TOrthogonal, typename TClient>\n  void assignClientToOrthogonal(TClient * client);\n\n  std::vector<std::shared_ptr<smacc2::ISmaccClient>> clients_;\n\nprivate:\n  ISmaccStateMachine * stateMachine_;\n\n  std::vector<std::vector<std::shared_ptr<smacc2::ISmaccClientBehavior>>> clientBehaviors_;\n  friend class ISmaccStateMachine;\n\n  std::mutex mutex_;\n};\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_signal.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <boost/any.hpp>\n#include <boost/signals2/connection.hpp>\n#include <boost/signals2/signal.hpp>\n\nnamespace smacc2\n{\nusing namespace boost;\nusing namespace boost::signals2;\nusing namespace boost::signals2::detail;\n\ntypedef boost::signals2::connection SmaccSignalConnection;\n\ntemplate <\n  typename Signature,\n  typename Combiner = optional_last_value<typename boost::function_traits<Signature>::result_type>,\n  typename Group = int, typename GroupCompare = std::less<Group>,\n  typename SlotFunction = function<Signature>,\n  typename ExtendedSlotFunction =\n    typename extended_signature<function_traits<Signature>::arity, Signature>::function_type,\n  typename Mutex = boost::signals2::mutex>\nclass SmaccSignal\n: public boost::signals2::signal<\n    Signature, Combiner, Group, GroupCompare, SlotFunction, ExtendedSlotFunction, Mutex>\n{\npublic:\n  typedef std::shared_ptr<SmaccSignal<\n    Signature, Combiner, Group, GroupCompare, SlotFunction, ExtendedSlotFunction, Mutex>>\n    SharedPtr;\n  typedef std::weak_ptr<SmaccSignal<\n    Signature, Combiner, Group, GroupCompare, SlotFunction, ExtendedSlotFunction, Mutex>>\n    WeakPtr;\n};\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_signal_detector.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <atomic>\n#include <boost/thread.hpp>\n#include <smacc2/common.hpp>\n#include <smacc2_msgs/msg/smacc_status.hpp>\n\nnamespace smacc2\n{\nenum class ExecutionModel\n{\n  SINGLE_THREAD_SPINNER,\n  MULTI_THREAD_SPINNER\n};\n\n// Mostly define the state machine ros thread and receive events state machine components (clients, state elements)\n// This class also contains the event queue of the state machine\nclass SignalDetector\n{\npublic:\n  SignalDetector(\n    SmaccFifoScheduler * scheduler,\n    ExecutionModel executionModel = ExecutionModel::SINGLE_THREAD_SPINNER);\n\n  void initialize(ISmaccStateMachine * stateMachine);\n\n  void setProcessorHandle(SmaccFifoScheduler::processor_handle processorHandle);\n\n  // Runs the polling loop into a thread...\n  void runThread();\n\n  // Waits for the polling thread to end...\n  void join();\n\n  void stop();\n\n  void terminateScheduler();\n\n  void pollingLoop();\n\n  template <typename EventType>\n  void postEvent(EventType * ev)\n  {\n    boost::intrusive_ptr<EventType> weakPtrEvent = ev;\n    this->scheduler_->queue_event(processorHandle_, weakPtrEvent);\n  }\n\n  rclcpp::Node::SharedPtr getNode();\n  inline rclcpp::Logger getLogger() { return getNode()->get_logger(); }\n\n  void notifyStateConfigured(ISmaccState * currentState);\n\n  void notifyStateExited(ISmaccState * currentState);\n\n  // Called after state machine ROS initialization is complete (initializeROS)\n  // This signals that orthogonals, clients, and ROS objects are ready\n  void notifyRosInitialized();\n\nprivate:\n  void pollOnce();\n\n  ISmaccStateMachine * smaccStateMachine_;\n\n  std::vector<ISmaccUpdatable *> updatableClients_;\n\n  std::vector<std::vector<ISmaccUpdatable *>> updatableStateElements_;\n  std::atomic<int64_t> lastState_;\n\n  void findUpdatableClientsAndComponents();\n\n  void findUpdatableStateElements(ISmaccState * currentState);\n\n  // Loop frequency of the signal detector (to check answers from actionservers)\n  double loop_rate_hz;\n\n  std::atomic<bool> end_;\n\n  std::atomic<bool> initialized_;\n\n  // Flag set after initializeROS() completes - indicates ROS objects are ready\n  std::atomic<bool> rosInitialized_;\n\n  rclcpp::Publisher<smacc2_msgs::msg::SmaccStatus>::SharedPtr statusPub_;\n\n  // ---- boost statechart related ----\n\n  SmaccFifoScheduler * scheduler_;\n\n  SmaccFifoScheduler::processor_handle processorHandle_;\n\n  boost::thread signalDetectorThread_;\n\n  ExecutionModel executionModel_;\n};\n\nvoid onSigQuit(int sig);\n\n// Signal handler for graceful shutdown (SIGINT/SIGTERM)\nvoid onSignalShutdown(int sig);\n\n// Singleton class managing SMACC execution lifecycle\n// Replaces global g_signal_detector for signal handler access\nclass SmExecution\n{\npublic:\n  // Get singleton instance\n  static SmExecution & getInstance();\n\n  // Delete copy and move constructors/operators\n  SmExecution(const SmExecution &) = delete;\n  SmExecution & operator=(const SmExecution &) = delete;\n  SmExecution(SmExecution &&) = delete;\n  SmExecution & operator=(SmExecution &&) = delete;\n\n  boost::thread * schedulerThread;\n  boost::thread * signalDetectorLoop;\n  SignalDetector * signalDetector;\n  SmaccFifoScheduler * scheduler1;\n  SmaccFifoScheduler::processor_handle sm;\n\nprivate:\n  // Private constructor for singleton\n  SmExecution();\n};\n\n// Main entry point for any SMACC state machine\n// It instantiates and starts the specified state machine type\n// it uses two threads: a new thread and the current one.\n// The created thread is for the state machine process\n// it locks the current thread to handle events of the state machine\ntemplate <typename StateMachineType>\nvoid run(ExecutionModel executionModel = ExecutionModel::SINGLE_THREAD_SPINNER)\n{\n  // Register signal handlers for graceful shutdown\n  ::signal(SIGINT, onSignalShutdown);\n  ::signal(SIGTERM, onSignalShutdown);\n  ::signal(SIGQUIT, onSigQuit);\n\n  // Get singleton instance\n  SmExecution & smExecution = SmExecution::getInstance();\n\n  // create the asynchronous state machine scheduler\n  SmaccFifoScheduler scheduler1(true);\n\n  // create the signalDetector component\n  SignalDetector signalDetector(&scheduler1, executionModel);\n\n  // Store in singleton for signal handler access\n  smExecution.signalDetector = &signalDetector;\n  smExecution.scheduler1 = &scheduler1;\n\n  // create the asynchronous state machine processor\n  SmaccFifoScheduler::processor_handle sm =\n    scheduler1.create_processor<StateMachineType>(&signalDetector);\n\n  // initialize the asynchronous state machine processor\n  signalDetector.setProcessorHandle(sm);\n  smExecution.sm = sm;\n\n  scheduler1.initiate_processor(sm);\n\n  //create a thread for the asynchronous state machine processor execution\n  boost::thread schedulerThread(boost::bind(&sc::fifo_scheduler<>::operator(), &scheduler1, 0));\n  smExecution.schedulerThread = &schedulerThread;\n\n  // use the  main thread for the signal detector component (waiting actionclient requests)\n  signalDetector.pollingLoop();\n\n  // After polling loop exits (due to shutdown), terminate the scheduler from main thread\n  // This is safe to call here (not from signal handler) as we're in the main thread context\n  RCLCPP_INFO(rclcpp::get_logger(\"SMACC\"), \"Polling loop exited. Terminating scheduler...\");\n  signalDetector.terminateScheduler();\n\n  // Wait for scheduler thread to finish\n  RCLCPP_INFO(rclcpp::get_logger(\"SMACC\"), \"Waiting for scheduler thread to join...\");\n  schedulerThread.join();\n  RCLCPP_INFO(rclcpp::get_logger(\"SMACC\"), \"Scheduler thread terminated. Shutdown complete.\");\n\n  // Clear singleton references\n  smExecution.signalDetector = nullptr;\n  smExecution.scheduler1 = nullptr;\n  smExecution.schedulerThread = nullptr;\n}\n\ntemplate <typename StateMachineType>\nSmExecution & run_async()\n{\n  // Register signal handlers for graceful shutdown\n  ::signal(SIGINT, onSignalShutdown);\n  ::signal(SIGTERM, onSignalShutdown);\n  ::signal(SIGQUIT, onSigQuit);\n\n  // Get singleton instance\n  SmExecution & smExecution = SmExecution::getInstance();\n\n  // create the asynchronous state machine scheduler\n  smExecution.scheduler1 = new SmaccFifoScheduler(true);\n\n  // create the signalDetector component\n  smExecution.signalDetector = new SignalDetector(smExecution.scheduler1);\n\n  // create the asynchronous state machine processor\n  smExecution.sm =\n    smExecution.scheduler1->create_processor<StateMachineType>(smExecution.signalDetector);\n\n  // initialize the asynchronous state machine processor\n  smExecution.signalDetector->setProcessorHandle(smExecution.sm);\n\n  smExecution.scheduler1->initiate_processor(smExecution.sm);\n\n  //create a thread for the asynchronous state machine processor execution\n  smExecution.schedulerThread =\n    new boost::thread(boost::bind(&sc::fifo_scheduler<>::operator(), smExecution.scheduler1, NULL));\n  smExecution.signalDetectorLoop =\n    new boost::thread(boost::bind(&SignalDetector::pollingLoop, smExecution.signalDetector));\n\n  return smExecution;\n}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_state.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n#include <smacc2/common.hpp>\n\nnamespace smacc2\n{\nclass ISmaccState\n{\npublic:\n  virtual ISmaccStateMachine & getStateMachine() = 0;\n\n  virtual std::string getName() = 0;\n\n  inline ISmaccState * getParentState() { return parentState_; }\n\n  inline rclcpp::Node::SharedPtr & getNode() { return node_; }\n\n  inline rclcpp::Logger getLogger() { return *logger_; }\n\n  virtual std::string getClassName();\n\n  template <typename TOrthogonal, typename TBehavior, typename... Args>\n  std::shared_ptr<TBehavior> configure(Args &&... args);\n\n  template <typename SmaccComponentType>\n  void requiresComponent(SmaccComponentType *& storage);\n\n  template <typename SmaccClientType>\n  void requiresClient(SmaccClientType *& storage);\n\n  template <typename T>\n  bool getGlobalSMData(std::string name, T & ret);\n\n  // Store globally in this state machine. (By value parameter )\n  template <typename T>\n  void setGlobalSMData(std::string name, T value);\n\n  template <\n    typename TStateReactor, typename TTriggerEvent, typename TEventList, typename... TEvArgs>\n  std::shared_ptr<TStateReactor> createStateReactor(TEvArgs... args);\n\n  template <typename TStateReactor, typename... TEvArgs>\n  std::shared_ptr<TStateReactor> createStateReactor(TEvArgs... args);\n\n  template <typename TEventGenerator, typename... TEvArgs>\n  std::shared_ptr<TEventGenerator> createEventGenerator(TEvArgs... args);\n\n  template <typename EventType>\n  void postEvent(const EventType & ev);\n\n  template <typename EventType>\n  void postEvent();\n\n  // used for transition logging\n  template <typename TransitionType>\n  void notifyTransition();\n\n  // used for transition logging\n  void notifyTransitionFromTransitionTypeInfo(\n    std::shared_ptr<smacc2::introspection::TypeInfo> & transitionTypeInfo);\n\n  inline std::vector<std::shared_ptr<StateReactor>> & getStateReactors() { return stateReactors_; }\n\n  inline std::vector<std::shared_ptr<SmaccEventGenerator>> & getEventGenerators()\n  {\n    return eventGenerators_;\n  }\n\n  template <typename TOrthogonal>\n  TOrthogonal * getOrthogonal();\n\n  // gets the client behavior given the client type and orthogonal type\n  // if the client behavior is not found, it returns nullptr\n  // the index parameter is used to specify the client behavior in case there are more than one\n  template <typename TOrthogonal, typename TClientBehavior>\n  TClientBehavior * getClientBehavior(int index = 0);\n\n  template <typename TEventGenerator>\n  TEventGenerator * getEventGenerator();\n\n  template <typename TStateReactor>\n  TStateReactor * getStateReactor();\n\nprotected:\n  rclcpp::Node::SharedPtr node_;\n  std::shared_ptr<rclcpp::Logger> logger_;\n  std::vector<std::shared_ptr<StateReactor>> stateReactors_;\n  std::vector<std::shared_ptr<smacc2::SmaccEventGenerator>> eventGenerators_;\n\n  ISmaccState * parentState_;\n\n  const smacc2::introspection::SmaccStateInfo * stateInfo_;\n};\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_state_base.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <smacc2/introspection/state_traits.hpp>\n#include <smacc2/smacc_event_generator.hpp>\n#include <smacc2/smacc_state.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n#include <smacc2/smacc_state_reactor.hpp>\n#include <smacc2/smacc_tracing/trace_provider.hpp>\n\n#define STATE_NAME (demangleSymbol(typeid(MostDerived).name()).c_str())\n\nnamespace smacc2\n{\nusing namespace smacc2::introspection;\nusing namespace smacc2::default_events;\n\ntemplate <\n  class MostDerived, class Context, class InnerInitial = mpl::list<>,\n  sc::history_mode historyMode = sc::has_deep_history>\nclass SmaccState : public sc::simple_state<MostDerived, Context, InnerInitial, historyMode>,\n                   public ISmaccState\n{\n  typedef sc::simple_state<MostDerived, Context, InnerInitial, historyMode> base_type;\n\npublic:\n  typedef Context TContext;\n  typedef typename Context::inner_context_type context_type;\n  typedef typename context_type::state_iterator state_iterator;\n\n  typedef InnerInitial LastDeepState;\n\n  bool finishStateThrown;\n  InnerInitial * smacc_inner_type;\n\n  //////////////////////////////////////////////////////////////////////////\n  struct my_context\n  {\n    my_context(typename base_type::context_ptr_type pContext) : pContext_(pContext) {}\n\n    typename base_type::context_ptr_type pContext_;\n  };\n\n  SmaccState() = delete;\n\n  // Constructor that initializes the state ros node handle\n  SmaccState(my_context ctx)\n  {\n    static_assert(\n      std::is_base_of<ISmaccState, Context>::value ||\n        std::is_base_of<ISmaccStateMachine, Context>::value,\n      \"The context class must be a SmaccState or a SmaccStateMachine\");\n    static_assert(\n      !std::is_same<MostDerived, Context>::value,\n      \"The context must be a different state or state machine \"\n      \"than the current state\");\n\n    logger_.reset(new rclcpp::Logger(\n      rclcpp::get_logger(smacc2::utils::cleanShortTypeName(typeid(MostDerived)))));\n\n    RCLCPP_INFO(getLogger(), \"[%s] Creating state \", STATE_NAME);\n    this->set_context(ctx.pContext_);\n\n    node_ = this->getStateMachine().getNode();\n\n    this->stateInfo_ = getStateInfo();\n\n    // storing a reference to the parent state\n    auto & ps = this->template context<Context>();\n    parentState_ = dynamic_cast<ISmaccState *>(&ps);\n    finishStateThrown = false;\n  }\n\n  virtual ~SmaccState() {}\n\n  const smacc2::introspection::SmaccStateInfo * getStateInfo()\n  {\n    auto smInfo = this->getStateMachine().getStateMachineInfo();\n\n    auto key = typeid(MostDerived).name();\n    if (smInfo.states.count(key))\n    {\n      return smInfo.states[key].get();\n    }\n    else\n    {\n      return nullptr;\n    }\n  }\n\n  std::string getName() override { return getShortName(); }\n\n  std::string getFullName() { return demangleSymbol(typeid(MostDerived).name()); }\n\n  std::string getShortName() { return smacc2::utils::cleanShortTypeName(typeid(MostDerived)); }\n\n  virtual ISmaccState * getParentState()\n  {\n    // auto* ctx = dynamic_cast<ISmaccState*>(this->template context<Context *>());\n\n    return parentState_;\n  }\n\n  // this function is called by boot statechart before the destructor call\n  void exit()\n  {\n    auto * derivedThis = static_cast<MostDerived *>(this);\n    // this->getStateMachine().notifyOnStateExitting(derivedThis);\n    {\n      std::lock_guard<std::recursive_mutex> lock(this->getStateMachine().getMutex());\n      this->getStateMachine().notifyOnStateExitting(derivedThis);\n      try\n      {\n        TRACETOOLS_TRACEPOINT(smacc2_state_onExit_start, STATE_NAME);\n        // static_cast<MostDerived *>(this)->onExit();\n        standardOnExit(*derivedThis);\n        TRACETOOLS_TRACEPOINT(smacc2_state_onExit_end, STATE_NAME);\n      }\n      catch (...)\n      {\n      }\n      this->getStateMachine().notifyOnStateExited(derivedThis);\n    }\n  }\n\npublic:\n  // This method is static-polymorphic because of the curiously recurring template pattern. It\n  // calls to the most derived class onEntry method if declared on smacc state construction\n  void runtimeConfigure() {}\n\n  // This method is static-polymorphic because of the curiously recurring template pattern. It\n  // calls to the most derived class onEntry method if declared on smacc state construction\n  void onEntry() {}\n\n  // this method is static-polimorphic because of the curiously recurreing pattern. It\n  // calls to the most derived class onExit method if declared on smacc state destruction\n  void onExit() {}\n\n  template <typename T>\n  bool getGlobalSMData(std::string name, T & ret)\n  {\n    return base_type::outermost_context().getGlobalSMData(name, ret);\n  }\n\n  // Store globally in this state machine. (By value parameter )\n  template <typename T>\n  void setGlobalSMData(std::string name, T value)\n  {\n    base_type::outermost_context().setGlobalSMData(name, value);\n  }\n\n  template <typename SmaccComponentType>\n  void requiresComponent(SmaccComponentType *& storage)\n  {\n    base_type::outermost_context().requiresComponent(storage);\n  }\n\n  virtual ISmaccStateMachine & getStateMachine() { return base_type::outermost_context(); }\n\n  template <typename TOrthogonal, typename TBehavior>\n  static void configure_orthogonal_runtime(\n    std::function<void(TBehavior & bh, MostDerived &)> initializationFunction)\n  {\n    configure_orthogonal_internal<TOrthogonal, TBehavior>(\n      [=](ISmaccState * state)\n      {\n        // auto bh = std::make_shared<TBehavior>(args...);\n        auto bh = state->configure<TOrthogonal, TBehavior>();\n        initializationFunction(*bh, *(static_cast<MostDerived *>(state)));\n      });\n  }\n\n  template <typename TOrthogonal, typename TBehavior>\n  static void configure_orthogonal_runtime(\n    std::function<void(TBehavior & bh)> initializationFunction)\n  {\n    configure_orthogonal_internal<TOrthogonal, TBehavior>(\n      [=](ISmaccState * state)\n      {\n        // auto bh = std::make_shared<TBehavior>(args...);\n        auto bh = state->configure<TOrthogonal, TBehavior>();\n        initializationFunction(*bh);\n      });\n  }\n\n  template <typename TOrthogonal, typename TBehavior, typename... Args>\n  static void configure_orthogonal(Args &&... args)\n  {\n    configure_orthogonal_internal<TOrthogonal, TBehavior>(\n      [=](ISmaccState * state)\n      {\n        // auto bh = std::make_shared<TBehavior>(args...);\n        state->configure<TOrthogonal, TBehavior>(args...);\n      });\n  }\n\n  template <\n    typename TStateReactor, typename TOutputEvent, typename TInputEventList, typename... TArgs>\n  static std::shared_ptr<smacc2::introspection::StateReactorHandler> static_createStateReactor(\n    TArgs... args)\n  {\n    auto srh = std::make_shared<smacc2::introspection::StateReactorHandler>(globalNh_);\n    auto srinfo = std::make_shared<SmaccStateReactorInfo>();\n\n    srinfo->stateReactorType = TypeInfo::getTypeInfoFromType<TStateReactor>();\n    srinfo->outputEventType = TypeInfo::getTypeInfoFromType<TOutputEvent>();\n\n    if (srinfo->outputEventType->templateParameters.size() == 2)\n    {\n      srinfo->objectTagType = srinfo->outputEventType->templateParameters[1];\n    }\n    else if (srinfo->outputEventType->templateParameters.size() == 1)\n    {\n      srinfo->objectTagType = TypeInfo::getTypeInfoFromType<state_reactors::EmptyObjectTag>();\n    }\n    else\n    {\n      assert(\n        false &&\n        \"state reactor output events should have one or two parameters (SourceType, ObjectTag)\");\n    }\n\n    // iterate statically on all event sources\n    using boost::mpl::_1;\n    using wrappedList = typename boost::mpl::transform<TInputEventList, _1>::type;\n    AddTEventTypeStateReactorInfo<TInputEventList> op(srinfo.get());\n    boost::mpl::for_each<wrappedList>(op);\n\n    srinfo->srh = srh;\n    srh->srInfo_ = srinfo;\n\n    const std::type_info * tindex = &(typeid(MostDerived));  // get identifier of the current state\n\n    if (!SmaccStateInfo::stateReactorsInfo.count(tindex))\n      SmaccStateInfo::stateReactorsInfo[tindex] =\n        std::vector<std::shared_ptr<SmaccStateReactorInfo>>();\n\n    srinfo->factoryFunction = [&, srh, args...](ISmaccState * state)\n    {\n      auto sr =\n        state->createStateReactor<TStateReactor, TOutputEvent, TInputEventList, TArgs...>(args...);\n      srh->configureStateReactor(sr);\n      sr->initialize(state);\n      return sr;\n    };\n\n    SmaccStateInfo::stateReactorsInfo[tindex].push_back(srinfo);\n\n    return srh;\n  }\n\n  template <typename TEventGenerator, typename... TUArgs>\n  static std::shared_ptr<smacc2::introspection::EventGeneratorHandler> static_createEventGenerator(\n    TUArgs... args)\n  {\n    auto egh = std::make_shared<smacc2::introspection::EventGeneratorHandler>();\n    auto eginfo = std::make_shared<SmaccEventGeneratorInfo>();\n    eginfo->eventGeneratorType = TypeInfo::getTypeInfoFromType<TEventGenerator>();\n\n    eginfo->egh = egh;\n    egh->egInfo_ = eginfo;\n\n    const std::type_info * tindex = &(typeid(MostDerived));  // get identifier of the current state\n\n    if (!SmaccStateInfo::eventGeneratorsInfo.count(tindex))\n      SmaccStateInfo::eventGeneratorsInfo[tindex] =\n        std::vector<std::shared_ptr<SmaccEventGeneratorInfo>>();\n\n    eginfo->factoryFunction = [&, egh, args...](ISmaccState * state)\n    {\n      auto eg = state->createEventGenerator<TEventGenerator>(args...);\n      egh->configureEventGenerator(eg);\n      eg->initialize(state);\n\n      eg->template onStateOrthogonalAllocation<MostDerived, TEventGenerator>();\n      eg->template onStateOrthogonalAllocation<MostDerived, TEventGenerator>();\n      return eg;\n    };\n\n    SmaccStateInfo::eventGeneratorsInfo[tindex].push_back(eginfo);\n    return egh;\n  }\n\n  template <typename TStateReactor, typename... TUArgs>\n  static std::shared_ptr<smacc2::introspection::StateReactorHandler> static_createStateReactor_aux(\n    TUArgs... args)\n  {\n    auto srh = std::make_shared<smacc2::introspection::StateReactorHandler>(globalNh_);\n    auto srinfo = std::make_shared<SmaccStateReactorInfo>();\n\n    srinfo->stateReactorType = TypeInfo::getTypeInfoFromType<TStateReactor>();\n    srinfo->srh = srh;\n    srh->srInfo_ = srinfo;\n\n    const std::type_info * tindex = &(typeid(MostDerived));  // get identifier of the current state\n\n    if (!SmaccStateInfo::stateReactorsInfo.count(tindex))\n      SmaccStateInfo::stateReactorsInfo[tindex] =\n        std::vector<std::shared_ptr<SmaccStateReactorInfo>>();\n\n    srinfo->factoryFunction = [&, srh, args...](ISmaccState * state)\n    {\n      auto sr = state->createStateReactor<TStateReactor>(args...);\n      srh->configureStateReactor(sr);\n      sr->initialize(state);\n      return sr;\n    };\n\n    SmaccStateInfo::stateReactorsInfo[tindex].push_back(srinfo);\n\n    return srh;\n  }\n\n  void checkWhileLoopConditionAndThrowEvent(bool (MostDerived::*conditionFn)())\n  {\n    auto * thisobject = static_cast<MostDerived *>(this);\n    auto condition = boost::bind(conditionFn, thisobject);\n    bool conditionResult = condition();\n\n    // RCLCPP_INFO(\"LOOP EVENT CONDITION: %d\", conditionResult);\n    if (conditionResult)\n    {\n      this->postEvent<EvLoopContinue<MostDerived>>();\n    }\n    else\n    {\n      this->postEvent<EvLoopEnd<MostDerived>>();\n    }\n    RCLCPP_INFO(getLogger(), \"[%s] POST THROW CONDITION\", STATE_NAME);\n  }\n\n  void throwSequenceFinishedEvent() { this->postEvent<EvSequenceFinished<MostDerived>>(); }\n\n  //////////////////////////////////////////////////////////////////////////\n  // The following declarations should be private.\n  // They are only public because many compilers lack template friends.\n  //////////////////////////////////////////////////////////////////////////\n  // See base class for documentation\n  typedef typename base_type::outermost_context_base_type outermost_context_base_type;\n  typedef typename base_type::inner_context_ptr_type inner_context_ptr_type;\n  typedef typename base_type::context_ptr_type context_ptr_type;\n  typedef typename base_type::inner_initial_list inner_initial_list;\n\n  static void initial_deep_construct(outermost_context_base_type & outermostContextBase)\n  {\n    deep_construct(&outermostContextBase, outermostContextBase);\n  }\n\n  // See base class for documentation\n  static void deep_construct(\n    const context_ptr_type & pContext, outermost_context_base_type & outermostContextBase)\n  {\n    const inner_context_ptr_type pInnerContext(shallow_construct(pContext, outermostContextBase));\n    base_type::template deep_construct_inner<inner_initial_list>(\n      pInnerContext, outermostContextBase);\n  }\n\n  static inner_context_ptr_type shallow_construct(\n    const context_ptr_type & pContext, outermost_context_base_type & outermostContextBase)\n  {\n    // allocating in memory\n    auto state = new MostDerived(\n      SmaccState<MostDerived, Context, InnerInitial, historyMode>::my_context(pContext));\n    const inner_context_ptr_type pInnerContext(state);\n\n    TRACETOOLS_TRACEPOINT(smacc2_state_onEntry_start, STATE_NAME);\n    state->entryStateInternal();\n    TRACETOOLS_TRACEPOINT(smacc2_state_onEntry_end, STATE_NAME);\n\n    outermostContextBase.add(pInnerContext);\n    return pInnerContext;\n  }\n\nprivate:\n  template <typename TOrthogonal, typename TBehavior>\n  static void configure_orthogonal_internal(\n    std::function<void(ISmaccState * state)> initializationFunction)\n  {\n    ClientBehaviorInfoEntry bhinfo;\n    bhinfo.factoryFunction = initializationFunction;\n\n    bhinfo.behaviorType = &(typeid(TBehavior));\n    bhinfo.orthogonalType = &(typeid(TOrthogonal));\n\n    const std::type_info * tindex = &(typeid(MostDerived));\n    if (!SmaccStateInfo::staticBehaviorInfo.count(tindex))\n      SmaccStateInfo::staticBehaviorInfo[tindex] = std::vector<ClientBehaviorInfoEntry>();\n\n    SmaccStateInfo::staticBehaviorInfo[tindex].push_back(bhinfo);\n    RCLCPP_INFO_STREAM(\n      rclcpp::get_logger(\"static\"), \"[states walking] State \"\n                                      << smacc2::utils::cleanShortTypeName(*tindex)\n                                      << \"client behavior count: \"\n                                      << SmaccStateInfo::staticBehaviorInfo[tindex].size());\n  }\n\n  void entryStateInternal()\n  {\n    // finally we go to the derived state onEntry Function\n\n    RCLCPP_DEBUG(getLogger(), \"[%s] State object created. Initializating...\", STATE_NAME);\n    this->getStateMachine().notifyOnStateEntryStart(static_cast<MostDerived *>(this));\n\n    RCLCPP_DEBUG_STREAM(\n      getLogger(), \"[\" << smacc2::utils::cleanShortTypeName(typeid(MostDerived)).c_str()\n                       << \"] creating ros subnode\");\n\n    // before dynamic runtimeConfigure, we execute the staticConfigure behavior configurations\n    {\n      RCLCPP_DEBUG(getLogger(), \"[%s] -- STATIC STATE DESCRIPTION --\", STATE_NAME);\n\n      for (const auto & clientBehavior : SmaccStateInfo::staticBehaviorInfo)\n      {\n        RCLCPP_DEBUG(\n          getLogger(), \"[%s] client behavior info: %s\", STATE_NAME,\n          demangleSymbol(clientBehavior.first->name()).c_str());\n        for (auto & cbinfo : clientBehavior.second)\n        {\n          RCLCPP_DEBUG(\n            getLogger(), \"[%s] client behavior: %s\", STATE_NAME,\n            demangleSymbol(cbinfo.behaviorType->name()).c_str());\n        }\n      }\n\n      const std::type_info * tindex = &(typeid(MostDerived));\n      auto & staticDefinedBehaviors = SmaccStateInfo::staticBehaviorInfo[tindex];\n      auto & staticDefinedStateReactors = SmaccStateInfo::stateReactorsInfo[tindex];\n      auto & staticDefinedEventGenerators = SmaccStateInfo::eventGeneratorsInfo[tindex];\n\n      for (auto & ortho : this->getStateMachine().getOrthogonals())\n      {\n        RCLCPP_INFO(\n          getLogger(), \"[%s] Initializing orthogonal: %s\", STATE_NAME,\n          demangleSymbol(typeid(*ortho.second).name()).c_str());\n        ortho.second->initState(this);\n      }\n\n      RCLCPP_DEBUG_STREAM(\n        getLogger(), \"Finding static client behaviors. State Database: \"\n                       << SmaccStateInfo::staticBehaviorInfo.size() << \". Current state \"\n                       << cleanShortTypeName(*tindex)\n                       << \" cbs: \" << SmaccStateInfo::staticBehaviorInfo[tindex].size());\n      for (auto & bhinfo : staticDefinedBehaviors)\n      {\n        RCLCPP_DEBUG(\n          getLogger(), \"[%s] Creating static client behavior: %s\", STATE_NAME,\n          demangleSymbol(bhinfo.behaviorType->name()).c_str());\n        bhinfo.factoryFunction(this);\n      }\n\n      for (auto & sr : staticDefinedStateReactors)\n      {\n        RCLCPP_DEBUG(\n          getLogger(), \"[%s] Creating static state reactor: %s\", STATE_NAME,\n          sr->stateReactorType->getFullName().c_str());\n        sr->factoryFunction(this);\n      }\n\n      for (auto & eg : staticDefinedEventGenerators)\n      {\n        RCLCPP_DEBUG(\n          getLogger(), \"[%s] Creating static event generator: %s\", STATE_NAME,\n          eg->eventGeneratorType->getFullName().c_str());\n        eg->factoryFunction(this);\n      }\n\n      RCLCPP_DEBUG(getLogger(), \"[%s] ---- END STATIC DESCRIPTION\", STATE_NAME);\n    }\n\n    RCLCPP_DEBUG(getLogger(), \"[%s] State runtime configuration\", STATE_NAME);\n\n    auto * derivedthis = static_cast<MostDerived *>(this);\n\n    // second the orthogonals are internally configured\n    this->getStateMachine().notifyOnRuntimeConfigured(derivedthis);\n\n    TRACETOOLS_TRACEPOINT(smacc2_state_onRuntimeConfigure_start, STATE_NAME);\n    // first we runtime configure the state, where we create client behaviors\n    static_cast<MostDerived *>(this)->runtimeConfigure();\n    TRACETOOLS_TRACEPOINT(smacc2_state_onRuntimeConfigure_end, STATE_NAME);\n\n    this->getStateMachine().notifyOnRuntimeConfigurationFinished(derivedthis);\n\n    RCLCPP_DEBUG(getLogger(), \"[%s] State OnEntry\", STATE_NAME);\n\n    static_cast<MostDerived *>(this)->onEntry();\n\n    // here orthogonals and client behaviors are entered OnEntry\n    this->getStateMachine().notifyOnStateEntryEnd(derivedthis);\n  }\n};\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_state_machine.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <boost/any.hpp>\n#include <map>\n#include <mutex>\n\n#include <smacc2/common.hpp>\n#include <smacc2/introspection/introspection.hpp>\n#include <smacc2/introspection/smacc_state_machine_info.hpp>\n#include <smacc2/smacc_signal.hpp>\n#include <smacc2/smacc_updatable.hpp>\n\n#include <smacc2_msgs/msg/smacc_state_machine.hpp>\n#include <smacc2_msgs/msg/smacc_status.hpp>\n#include <smacc2_msgs/msg/smacc_transition_log_entry.hpp>\n#include <smacc2_msgs/srv/smacc_get_transition_history.hpp>\n\n#include <smacc2/callback_counter_semaphore.hpp>\n#include <smacc2/smacc_state.hpp>\n#include <smacc2/smacc_state_reactor.hpp>\n//#include <smacc2/smacc_event_generator.hpp>\n\nnamespace smacc2\n{\nusing namespace smacc2::introspection;\n\nenum class EventLifeTime\n{\n  ABSOLUTE,\n  CURRENT_STATE /*events are discarded if we are leaving the state it were created. I is used for client behaviors whose lifetime is associated to state*/\n};\n\nenum class StateMachineInternalAction\n{\n  STATE_CONFIGURING,\n  STATE_ENTERING,\n  STATE_RUNNING,\n  STATE_EXITING,\n  TRANSITIONING\n};\n\n// This class describes the concept of Smacc State Machine in an abastract way.\n// The SmaccStateMachineBase inherits from this state machine and from\n// statechart::StateMachine<> (via multiple inheritance)\nclass ISmaccStateMachine\n{\npublic:\n  ISmaccStateMachine(\n    std::string stateMachineName, SignalDetector * signalDetector,\n    rclcpp::NodeOptions nodeOptions = rclcpp::NodeOptions());\n\n  virtual ~ISmaccStateMachine();\n\n  virtual void reset();\n\n  virtual void stop();\n\n  virtual void eStop();\n\n  template <typename TOrthogonal>\n  TOrthogonal * getOrthogonal();\n\n  // gets the client behavior in a given orthogonal\n  // the index is used to distinguish between multiple client behaviors of the same type\n  template <typename TOrthogonal, typename TClientBehavior>\n  inline TClientBehavior * getClientBehavior(int index = 0)\n  {\n    auto orthogonal = this->template getOrthogonal<TOrthogonal>();\n\n    return orthogonal->template getClientBehavior<TClientBehavior>(index);\n  }\n\n  const std::map<std::string, std::shared_ptr<smacc2::ISmaccOrthogonal>> & getOrthogonals() const;\n\n  template <typename SmaccComponentType>\n  void requiresComponent(SmaccComponentType *& storage, ComponentRequirement requirementType);\n\n  template <typename EventType>\n  void postEvent(EventType * ev, EventLifeTime evlifetime = EventLifeTime::ABSOLUTE);\n\n  template <typename EventType>\n  void postEvent(EventLifeTime evlifetime = EventLifeTime::ABSOLUTE);\n\n  // gets data from the state machine blackboard\n  template <typename T>\n  bool getGlobalSMData(std::string name, T & ret);\n\n  // sets data in the state machine blackboard\n  template <typename T>\n  void setGlobalSMData(std::string name, T value);\n\n  //template <typename StateField, typename BehaviorType>\n  //void mapBehavior();\n\n  std::string getStateMachineName();\n\n  void state_machine_visualization();\n\n  inline std::shared_ptr<SmaccStateInfo> getCurrentStateInfo() { return currentStateInfo_; }\n\n  void publishTransition(const SmaccTransitionInfo & transitionInfo);\n\n  /// this function should be implemented by the user to create the orthogonals\n  virtual void onInitialize();\n\n  void getTransitionLogHistory(\n    const std::shared_ptr<rmw_request_id_t> request_header,\n    const std::shared_ptr<smacc2_msgs::srv::SmaccGetTransitionHistory::Request> req,\n    std::shared_ptr<smacc2_msgs::srv::SmaccGetTransitionHistory::Response> res);\n\n  template <typename TSmaccSignal, typename TMemberFunctionPrototype, typename TSmaccObjectType>\n  smacc2::SmaccSignalConnection createSignalConnection(\n    TSmaccSignal & signal, TMemberFunctionPrototype callback, TSmaccObjectType * object);\n\n  void disconnectSmaccSignalObject(void * object);\n\n  template <typename StateType>\n  void notifyOnStateEntryStart(StateType * state);\n\n  template <typename StateType>\n  void notifyOnStateEntryEnd(StateType * state);\n\n  template <typename StateType>\n  void notifyOnRuntimeConfigured(StateType * state);\n\n  template <typename StateType>\n  void notifyOnStateExitting(StateType * state);\n\n  template <typename StateType>\n  void notifyOnStateExited(StateType * state);\n\n  template <typename StateType>\n  void notifyOnRuntimeConfigurationFinished(StateType * state);\n\n  inline int64_t getCurrentStateCounter() const;\n\n  inline ISmaccState * getCurrentState() const;\n\n  inline const SmaccStateMachineInfo & getStateMachineInfo();\n\n  template <typename InitialStateType>\n  void buildStateMachineInfo();\n\n  rclcpp::Node::SharedPtr getNode();\n\n  inline rclcpp::Logger getLogger() { return nh_->get_logger(); }\n\n  inline std::recursive_mutex & getMutex() { return this->m_mutex_; }\n\nprotected:\n  void checkStateMachineConsistence();\n\n  void initializeROS(std::string smshortname);\n\n  void onInitialized();\n\n  template <typename TOrthogonal>\n  void createOrthogonal();\n\n  // The node handle for this state\n  rclcpp::Node::SharedPtr nh_;\n\n  rclcpp::TimerBase::SharedPtr timer_;\n  rclcpp::Publisher<smacc2_msgs::msg::SmaccStateMachine>::SharedPtr stateMachinePub_;\n  rclcpp::Publisher<smacc2_msgs::msg::SmaccStatus>::SharedPtr stateMachineStatusPub_;\n  rclcpp::Publisher<smacc2_msgs::msg::SmaccTransitionLogEntry>::SharedPtr transitionLogPub_;\n\n  rclcpp::Publisher<smacc2_msgs::msg::SmaccEvent>::SharedPtr eventsLogPub_;\n\n  rclcpp::Service<smacc2_msgs::srv::SmaccGetTransitionHistory>::SharedPtr transitionHistoryService_;\n\n  // if it is null, you may be located in a transition. There is a small gap of time where internally\n  // this currentState_ is null. This may change in the future.\n  std::vector<ISmaccState *> currentState_;\n\n  std::shared_ptr<SmaccStateInfo> currentStateInfo_;\n\n  smacc2_msgs::msg::SmaccStatus status_msg_;\n\n  // orthogonals\n  std::map<std::string, std::shared_ptr<smacc2::ISmaccOrthogonal>> orthogonals_;\n\nprotected:\n  std::shared_ptr<SmaccStateMachineInfo> stateMachineInfo_;\n\nprivate:\n  std::recursive_mutex m_mutex_;\n  std::recursive_mutex eventQueueMutex_;\n\n  StateMachineInternalAction stateMachineCurrentAction;\n\n  std::map<void *, std::shared_ptr<CallbackCounterSemaphore>> stateCallbackConnections;\n\n  // shared variables\n  std::map<std::string, std::pair<std::function<std::string()>, boost::any>> globalData_;\n\n  // contains the whole history of transitions of the state machine\n  std::vector<smacc2_msgs::msg::SmaccTransitionLogEntry> transitionLogHistory_;\n\n  smacc2::SMRunMode runMode_;\n\n  // Event to notify to the signaldetection thread that a request has been created...\n  SignalDetector * signalDetector_;\n\n  int64_t stateSeqCounter_;\n\n  void lockStateMachine(std::string msg);\n\n  void unlockStateMachine(std::string msg);\n\n  template <typename EventType>\n  void propagateEventToStateReactors(ISmaccState * st, EventType * ev);\n\n  void updateStatusMessage();\n\n  friend class ISmaccState;\n  friend class SignalDetector;\n};\n}  // namespace smacc2\n\n#include <smacc2/impl/smacc_client_impl.hpp>\n#include <smacc2/impl/smacc_component_impl.hpp>\n#include <smacc2/impl/smacc_orthogonal_impl.hpp>\n#include <smacc2/impl/smacc_state_impl.hpp>\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_state_machine_base.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n#include <smacc2/common.hpp>\n\n#include <smacc2/smacc_state_base.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n\nnamespace smacc2\n{\n/// State Machine\ntemplate <typename DerivedStateMachine, typename InitialStateType>\nstruct SmaccStateMachineBase\n: public ISmaccStateMachine,\n  public sc::asynchronous_state_machine<\n    DerivedStateMachine, InitialStateType, SmaccFifoScheduler, SmaccAllocator>\n{\npublic:\n  SmaccStateMachineBase(\n    my_context ctx, SignalDetector * signalDetector,\n    rclcpp::NodeOptions node_options = rclcpp::NodeOptions())\n  : ISmaccStateMachine(\n      smacc2::utils::cleanShortTypeName<DerivedStateMachine>(), signalDetector, node_options),\n    sc::asynchronous_state_machine<\n      DerivedStateMachine, InitialStateType, SmaccFifoScheduler, SmaccAllocator>(ctx)\n  {\n  }\n\n  virtual ~SmaccStateMachineBase()\n  {\n    //updateCurrentState<InitialStateType>(false);\n  }\n\n  void reset() override\n  {\n    ISmaccStateMachine::reset();\n    this->terminate();\n    smacc2::run<DerivedStateMachine>();\n  }\n\n  void stop() override\n  {\n    ISmaccStateMachine::stop();\n    this->terminate();\n  }\n\n  void eStop() override\n  {\n    ISmaccStateMachine::eStop();\n    this->terminate();\n  }\n\n  void initiate_impl() override\n  {\n    globalNh_ = this->getNode();\n\n    // this is before because this creates orthogonals\n    this->onInitialize();\n\n    RCLCPP_INFO(getLogger(), \"[SmaccStateMachine] Introspecting state machine via typeWalker\");\n    this->buildStateMachineInfo<InitialStateType>();\n\n    RCLCPP_INFO(getLogger(), \"[SmaccStateMachine] initiate_impl\");\n    auto shortname = smacc2::utils::cleanShortTypeName(typeid(DerivedStateMachine));\n\n    this->initializeROS(shortname);\n\n    RCLCPP_INFO(getLogger(), \"[SmaccStateMachine] Initializing ROS communication mechanisms\");\n    this->onInitialized();\n\n    // publish startup state machine transition info\n    auto transitionInfo = std::make_shared<SmaccTransitionInfo>();\n    transitionInfo->destinyState = this->stateMachineInfo_->getState<InitialStateType>();\n    this->publishTransition(*transitionInfo);\n\n    RCLCPP_INFO(getLogger(), \"[SmaccStateMachine] Initializing state machine\");\n    sc::state_machine<DerivedStateMachine, InitialStateType, SmaccAllocator>::initiate();\n  }\n};\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_state_reactor.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <algorithm>\n#include <boost/statechart/event.hpp>\n#include <functional>\n#include <map>\n#include <memory>\n#include <smacc2/introspection/introspection.hpp>\n#include <vector>\n\nnamespace smacc2\n{\nclass ISmaccState;\nclass ISMaccStateMachine;\n\nnamespace state_reactors\n{\nstruct EmptyObjectTag\n{\n};\n}  // namespace state_reactors\n\nclass StateReactor\n{\npublic:\n  ISmaccState * ownerState;\n  std::function<void()> postEventFn;\n  std::vector<const std::type_info *> eventTypes;\n  std::map<const std::type_info *, std::function<void(void *)>> eventCallbacks_;\n\n  StateReactor();\n  virtual ~StateReactor();\n\n  virtual void onInitialized();\n\n  virtual void onEntry();\n  virtual void onExit();\n\n  virtual void onEventNotified(const std::type_info * eventType);\n\n  template <typename EventType>\n  void postEvent(const EventType & ev);\n\n  template <typename EventType>\n  void postEvent();\n\n  // type based event callback\n  template <typename T, typename TClass>\n  void createEventCallback(void (TClass::*callback)(T *), TClass * object);\n\n  // type based event callback\n  template <typename T>\n  void createEventCallback(std::function<void(T *)> callback);\n\n  void update();\n\n  //must returns true when the output event is triggered\n  virtual bool triggers() = 0;\n\n  template <typename TEv>\n  void addInputEvent();\n\n  template <typename TEv>\n  void setOutputEvent();\n\n  //TDerived\n  void initialize(ISmaccState * ownerState);\n\n  rclcpp::Node::SharedPtr & getNode();\n\n  rclcpp::Logger getLogger();\n\nprivate:\n  friend ISmaccStateMachine;\n\n  template <typename TEvent>\n  void notifyEvent(TEvent * ev)\n  {\n    //the state machine uses this method to notify this state reactor some event happened.\n    auto tid = &(typeid(TEvent));\n    if (std::find(eventTypes.begin(), eventTypes.end(), tid) != eventTypes.end())\n    {\n      this->onEventNotified(tid);\n      this->update();\n\n      if (eventCallbacks_.count(tid))\n      {\n        eventCallbacks_[tid]((void *)ev);\n      }\n    }\n  }\n};\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_tracing/smacc_tracing.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <tracetools/tracetools.h>\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n  _DECLARE_TRACEPOINT(spinOnce)\n\n  _DECLARE_TRACEPOINT(smacc2_event, const char * event_type)\n\n  _DECLARE_TRACEPOINT(smacc2_state_update_start, const char * updatable_element_name)\n\n  _DECLARE_TRACEPOINT(smacc2_state_update_end, const char * updatable_element_name)\n\n  _DECLARE_TRACEPOINT(smacc2_state_onRuntimeConfigure_start, const char * state_name)\n\n  _DECLARE_TRACEPOINT(smacc2_state_onRuntimeConfigure_end, const char * state_name)\n\n  _DECLARE_TRACEPOINT(smacc2_state_onEntry_start, const char * state_name)\n\n  _DECLARE_TRACEPOINT(smacc2_state_onEntry_end, const char * state_name)\n\n  _DECLARE_TRACEPOINT(smacc2_state_onExit_start, const char * state_name)\n\n  _DECLARE_TRACEPOINT(smacc2_state_onExit_end, const char * state_name)\n\n  _DECLARE_TRACEPOINT(\n    smacc2_client_behavior_on_entry_start, const char * state_name, const char * orthogonal_name,\n    const char * client_behavior_name)\n\n  _DECLARE_TRACEPOINT(\n    smacc2_client_behavior_on_entry_end, const char * state_name, const char * orthogonal_name,\n    const char * client_behavior_name)\n\n  _DECLARE_TRACEPOINT(\n    smacc2_client_behavior_on_exit_start, const char * state_name, const char * orthogonal_name,\n    const char * client_behavior_name)\n\n  _DECLARE_TRACEPOINT(\n    smacc2_client_behavior_on_exit_end, const char * state_name, const char * orthogonal_name,\n    const char * client_behavior_name)\n\n#ifdef __cplusplus\n}\n#endif\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_tracing/trace_provider.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// the pragma once does not work here\n// #pragma once\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#undef TRACEPOINT_PROVIDER\n#define TRACEPOINT_PROVIDER ros2\n\n#undef TRACEPOINT_INCLUDE\n#define TRACEPOINT_INCLUDE \"smacc2/smacc_tracing/trace_provider.hpp\"\n\n#if !defined(_TRACEPOINT_PROVIDER_PROVIDER_H) || defined(TRACEPOINT_HEADER_MULTI_READ)\n#define _TRACEPOINT_PROVIDER_PROVIDER_H\n\n#include <lttng/tracepoint.h>\n\nTRACEPOINT_EVENT(ros2, spinOnce, TP_ARGS(), TP_FIELDS())\n\nTRACEPOINT_EVENT(\n  ros2, smacc2_event, TP_ARGS(const char *, event_type),\n  TP_FIELDS(ctf_string(event_type, event_type)))\n\nTRACEPOINT_EVENT(\n  ros2, smacc2_state_update_start, TP_ARGS(const char *, updatable_element_name),\n  TP_FIELDS(ctf_string(updatable_element_name, updatable_element_name)))\n\nTRACEPOINT_EVENT(\n  ros2, smacc2_state_update_end, TP_ARGS(const char *, updatable_element_name),\n  TP_FIELDS(ctf_string(updatable_element_name, updatable_element_name)))\n\nTRACEPOINT_EVENT(\n  ros2, smacc2_state_onRuntimeConfigure_start, TP_ARGS(const char *, state_name),\n  TP_FIELDS(ctf_string(state_name, state_name)))\n\nTRACEPOINT_EVENT(\n  ros2, smacc2_state_onRuntimeConfigure_end, TP_ARGS(const char *, state_name),\n  TP_FIELDS(ctf_string(state_name, state_name)))\n\nTRACEPOINT_EVENT(\n  ros2, smacc2_state_onEntry_start, TP_ARGS(const char *, state_name),\n  TP_FIELDS(ctf_string(state_name, state_name)))\n\nTRACEPOINT_EVENT(\n  ros2, smacc2_state_onEntry_end, TP_ARGS(const char *, state_name),\n  TP_FIELDS(ctf_string(state_name, state_name)))\n\nTRACEPOINT_EVENT(\n  ros2, smacc2_state_onExit_start, TP_ARGS(const char *, state_name),\n  TP_FIELDS(ctf_string(state_name, state_name)))\n\nTRACEPOINT_EVENT(\n  ros2, smacc2_state_onExit_end, TP_ARGS(const char *, state_name),\n  TP_FIELDS(ctf_string(state_name, state_name)))\n\nTRACEPOINT_EVENT(\n  ros2, smacc2_client_behavior_on_entry_start,\n  TP_ARGS(\n    const char *, state_name, const char *, orthogonal_name, const char *, client_behavior_name),\n  TP_FIELDS(ctf_string(state_name, state_name) ctf_string(orthogonal_name, orthogonal_name)\n              ctf_string(client_behavior_name, client_behavior_name)))\n\nTRACEPOINT_EVENT(\n  ros2, smacc2_client_behavior_on_entry_end,\n  TP_ARGS(\n    const char *, state_name, const char *, orthogonal_name, const char *, client_behavior_name),\n  TP_FIELDS(ctf_string(state_name, state_name) ctf_string(orthogonal_name, orthogonal_name)\n              ctf_string(client_behavior_name, client_behavior_name)))\n\nTRACEPOINT_EVENT(\n  ros2, smacc2_client_behavior_on_exit_start,\n  TP_ARGS(\n    const char *, state_name, const char *, orthogonal_name, const char *, client_behavior_name),\n  TP_FIELDS(ctf_string(state_name, state_name) ctf_string(orthogonal_name, orthogonal_name)\n              ctf_string(client_behavior_name, client_behavior_name)))\n\nTRACEPOINT_EVENT(\n  ros2, smacc2_client_behavior_on_exit_end,\n  TP_ARGS(\n    const char *, state_name, const char *, orthogonal_name, const char *, client_behavior_name),\n  TP_FIELDS(ctf_string(state_name, state_name) ctf_string(orthogonal_name, orthogonal_name)\n              ctf_string(client_behavior_name, client_behavior_name)))\n\n#endif /* _TRACEPOINT_PROVIDER_PROVIDER_H */\n\n#include <lttng/tracepoint-event.h>\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_transition.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/introspection/introspection.hpp>\n#include <smacc2/introspection/state_traits.hpp>\nnamespace smacc2\n{\n//////////////////////////////////////////////////////////////////////////////\ntemplate <\n  class Event, class Destination, typename Tag, class TransitionContext,\n  void (TransitionContext::*pTransitionAction)(const Event &)>\nclass Transition\n{\npublic:\n  typedef Tag TRANSITION_TAG;\n\nprivate:\n  //////////////////////////////////////////////////////////////////////////\n  template <class State>\n  struct reactions\n  {\n    static boost::statechart::result react_without_action(State & stt)\n    {\n      RCLCPP_DEBUG(stt.getLogger(), \"[Smacc Transition] REACT WITHOUT ACTION\");\n      typedef smacc2::Transition<Event, Destination, Tag, TransitionContext, pTransitionAction>\n        Transtype;\n      TRANSITION_TAG mock;\n      specificNamedOnExit(stt, mock);\n\n      stt.template notifyTransition<Transtype>();\n      return stt.template transit<Destination>();\n    }\n\n    static boost::statechart::result react_with_action(State & stt, const Event & evt)\n    {\n      RCLCPP_DEBUG(stt.getLogger(), \"[Smacc Transition] REACT WITH ACTION AND EVENT\");\n      typedef smacc2::Transition<Event, Destination, Tag, TransitionContext, pTransitionAction>\n        Transtype;\n      TRANSITION_TAG mock;\n      specificNamedOnExit(stt, mock);\n      stt.template notifyTransition<Transtype>();\n      return stt.template transit<Destination>(pTransitionAction, evt);\n    }\n  };\n\npublic:\n  //////////////////////////////////////////////////////////////////////////\n  // The following declarations should be private.\n  // They are only public because many compilers lack template friends.\n  //////////////////////////////////////////////////////////////////////////\n  template <class State, class EventBase, class IdType>\n  static boost::statechart::detail::reaction_result react(\n    State & stt, const EventBase & evt, const IdType & eventType)\n  {\n    typedef boost::statechart::detail::reaction_dispatcher<\n      reactions<State>, State, EventBase, Event, TransitionContext, IdType>\n      dispatcher;\n    return dispatcher::react(stt, evt, eventType);\n  }\n};\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_types.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <boost/statechart/transition.hpp>\n\nnamespace smacc2\n{\nclass ISmaccState;\nclass ISmaccStateMachine;\nclass ISmaccClient;\nclass ISmaccUpdatable;\nclass ISmaccComponent;\nclass ISmaccClientBehavior;\nclass SmaccClientBehavior;\nclass SmaccAsyncClientBehavior;\nclass SignalDetector;\n\nclass StateReactor;\nclass SmaccEventGenerator;\n\nnamespace client_bases\n{\nclass ISmaccActionClient;\nclass ISmaccSubscriber;\n}  // namespace client_bases\n\nnamespace introspection\n{\nclass SmaccStateMachineInfo;\nclass SmaccStateInfo;\nclass StateReactorHandler;\nclass SmaccStateReactorInfo;\nclass SmaccEventGeneratorInfo;\nclass TypeInfo;\n}  // namespace introspection\n\n// ----TAGS FOR TRANSITIONS -----\n\nnamespace default_transition_tags\n{\n// you can also use these other labels in order to have\n// a better code readability and also to improve the visual representation\n// in the viewer\nstruct DEFAULT\n{\n};\n\nstruct ABORT\n{\n};\n\nstruct SUCCESS\n{\n};\n\nstruct CANCEL\n{\n};\n\n/*\nstruct PREEMPT\n{\n};\n\n\nstruct REJECT\n{\n};*/\n\nstruct CONTINUELOOP\n{\n};\nstruct ENDLOOP\n{\n};\n\nstruct default_transition_name : SUCCESS\n{\n};\n}  // namespace default_transition_tags\n\ntemplate <\n  class Event, class Destination, typename Tag = default_transition_tags::default_transition_name,\n  class TransitionContext = boost::statechart::detail::no_context<Event>,\n  void (TransitionContext::*pTransitionAction)(const Event &) =\n    &boost::statechart::detail::no_context<Event>::no_function>\nclass Transition;\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/include/smacc2/smacc_updatable.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <chrono>\n#include <optional>\n\n#include \"rclcpp/clock.hpp\"\n#include \"rclcpp/duration.hpp\"\n#include \"rclcpp/rclcpp.hpp\"\n#include \"rclcpp/time.hpp\"\n\nnamespace smacc2\n{\nclass ISmaccUpdatable\n{\npublic:\n  ISmaccUpdatable();\n  explicit ISmaccUpdatable(rclcpp::Duration duration);\n\n  void executeUpdate(rclcpp::Node::SharedPtr node);\n  void setUpdatePeriod(rclcpp::Duration duration);\n\nprotected:\n  virtual void update() = 0;\n\nprivate:\n  std::optional<rclcpp::Duration> periodDuration_;\n  std::optional<rclcpp::Time> lastUpdate_;\n};\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>smacc2</name>\n  <version>3.0.1</version>\n\n  <description>An Event-Driven, Asynchronous, Behavioral State Machine Library for ROS2 (Robotic Operating System) applications written in C++.</description>\n\n  <author email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</author>\n  <author email=\"brett@robosoft.ai\">Brett Aldrich</author>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <build_depend>libboost-thread-dev</build_depend>\n\n  <depend>liblttng-ust-dev</depend>\n  <depend>rcl</depend>\n  <depend>rclcpp</depend>\n  <depend>rclcpp_action</depend>\n  <depend>smacc2_msgs</depend>\n  <depend>tracetools</depend>\n  <depend>tracetools_trace</depend>\n  <depend>tracetools_launch</depend>\n\n  <exec_depend>libboost-thread</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2/scripts/trace.sh",
    "content": "#!/bin/bash\nros2 trace -u ros2:smacc2_event ros2:smacc2_client_behavior_on_exit_end ros2:smacc2_client_behavior_on_exit_start ros2:smacc2_client_behavior_on_entry_end ros2:smacc2_client_behavior_on_entry_start ros2:client_behavior_on_runtimeConfigure_end ros2:client_behavior_on_runtimeConfigure_start ros2:smacc2_state_onExit_end ros2:smacc2_state_onExit_start ros2:smacc2_state_onEntry_end ros2:smacc2_state_onEntry_start ros2:smacc2_state_update_end ros2:smacc2_state_update_start ros2:spinOnce ros2:rcl_init ros2:rcl_node_init ros2:rcl_publisher_init ros2:rcl_publish ros2:rclcpp_publish ros2:rcl_subscription_init ros2:rclcpp_subscription_init ros2:rclcpp_subscription_callback_added ros2:rcl_service_init ros2:rclcpp_service_callback_added ros2:rcl_client_init ros2:rcl_timer_init ros2:rclcpp_timer_callback_added ros2:rclcpp_timer_link_node ros2:rclcpp_callback_register ros2:callback_start ros2:callback_end ros2:rcl_lifecycle_state_machine_init ros2:rcl_lifecycle_transition\n"
  },
  {
    "path": "smacc2/src/smacc2/callback_counter_semaphore.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n#include <condition_variable>\n#include <iostream>\n#include <mutex>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/callback_counter_semaphore.hpp>\n#include <thread>\n\nnamespace smacc2\n{\nCallbackCounterSemaphore::CallbackCounterSemaphore(std::string name, int count)\n: count_(count), name_(name)\n{\n}\n\nbool CallbackCounterSemaphore::acquire()\n{\n  std::unique_lock<std::mutex> lock(mutex_);\n  RCLCPP_DEBUG(\n    rclcpp::get_logger(name_), \"[CallbackCounterSemaphore] acquire callback %s %ld\", name_.c_str(),\n    (long)this);\n\n  if (finalized)\n  {\n    RCLCPP_DEBUG(\n      rclcpp::get_logger(name_), \"[CallbackCounterSemaphore] callback rejected %s %ld\",\n      name_.c_str(), (long)this);\n    return false;\n  }\n\n  ++count_;\n  cv_.notify_one();\n\n  RCLCPP_DEBUG(\n    rclcpp::get_logger(name_), \"[CallbackCounterSemaphore] callback accepted %s %ld\", name_.c_str(),\n    (long)this);\n  return true;\n}\n\nvoid CallbackCounterSemaphore::release()\n{\n  std::unique_lock<std::mutex> lock(mutex_);\n  --count_;\n  cv_.notify_one();\n\n  RCLCPP_DEBUG(\n    rclcpp::get_logger(name_), \"[CallbackCounterSemaphore] callback finished %s %ld\", name_.c_str(),\n    (long)this);\n}\n\nvoid CallbackCounterSemaphore::finalize()\n{\n  std::unique_lock<std::mutex> lock(mutex_);\n\n  while (count_ > 0)\n  {\n    cv_.wait(lock);\n  }\n  finalized = true;\n\n  for (auto conn : connections_)\n  {\n    conn.disconnect();\n  }\n\n  connections_.clear();\n  RCLCPP_DEBUG(\n    rclcpp::get_logger(name_), \"[CallbackCounterSemaphore] callbacks finalized %s %ld\",\n    name_.c_str(), (long)this);\n}\n\nvoid CallbackCounterSemaphore::addConnection(smacc2::SmaccSignalConnection conn)\n{\n  std::unique_lock<std::mutex> lock(mutex_);\n\n  if (finalized)\n  {\n    RCLCPP_DEBUG(\n      rclcpp::get_logger(name_),\n      \"[CallbackCounterSemaphore] ignoring adding callback, already finalized %s %ld\",\n      name_.c_str(), (long)this);\n    return;\n  }\n\n  connections_.push_back(conn);\n}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/client.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/impl/smacc_client_impl.hpp>\n#include <smacc2/smacc_client.hpp>\n\nnamespace smacc2\n{\nISmaccClient::ISmaccClient() {}\n\nISmaccClient::~ISmaccClient() {}\n\nvoid ISmaccClient::initialize() { this->onInitialize(); }\n\nvoid ISmaccClient::onInitialize() {}\n\nvoid ISmaccClient::getComponents(std::vector<std::shared_ptr<ISmaccComponent>> & components)\n{\n  for (auto & ce : components_)\n  {\n    components.push_back(ce.second);\n  }\n}\n\nstd::string ISmaccClient::getName() const\n{\n  std::string keyname = demangleSymbol(typeid(*this).name());\n  return keyname;\n}\n\nvoid ISmaccClient::setStateMachine(ISmaccStateMachine * stateMachine)\n{\n  stateMachine_ = stateMachine;\n}\n\nvoid ISmaccClient::setOrthogonal(ISmaccOrthogonal * orthogonal) { orthogonal_ = orthogonal; }\n\nsmacc2::introspection::TypeInfo::Ptr ISmaccClient::getType()\n{\n  return smacc2::introspection::TypeInfo::getFromStdTypeInfo(typeid(*this));\n}\n\nrclcpp::Node::SharedPtr ISmaccClient::getNode() { return this->getStateMachine()->getNode(); }\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/client_bases/smacc_action_client.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include \"smacc2/client_bases/smacc_action_client.hpp\"\n\nnamespace smacc2\n{\nnamespace client_bases\n{\nISmaccActionClient::ISmaccActionClient() {}\n\nISmaccActionClient::~ISmaccActionClient() {}\n\n}  // namespace client_bases\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/client_bases/smacc_publisher_client.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/client_bases/smacc_publisher_client.hpp>\n\nnamespace smacc2\n{\nnamespace client_bases\n{\nSmaccPublisherClient::SmaccPublisherClient() { initialized_ = false; }\n\nSmaccPublisherClient::~SmaccPublisherClient() {}\n}  // namespace client_bases\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/client_bases/smacc_ros_launch_client.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/client_bases/smacc_ros_launch_client.hpp>\n\nnamespace smacc2\n{\nnamespace client_bases\n{\nClRosLaunch::ClRosLaunch(std::string packageName, std::string launchFilename)\n: packageName_(packageName), launchFileName_(launchFilename), cancellationToken_(false)\n{\n}\n\nClRosLaunch::~ClRosLaunch() {}\n\nvoid ClRosLaunch::launch()\n{\n  this->result_ = executeRosLaunch(\n    packageName_, launchFileName_, [this]() { return this->cancellationToken_.load(); });\n}\n\nvoid ClRosLaunch::stop() { cancellationToken_.store(true); }\n\nstd::future<std::string> ClRosLaunch::executeRosLaunch(\n  std::string packageName, std::string launchFileName, std::function<bool()> cancelCondition)\n{\n  return std::async(\n    std::launch::async,\n    [=]()\n    {\n      RCLCPP_WARN_STREAM(\n        rclcpp::get_logger(\"smacc2\"), \"[ClRosLaunch static] starting ros launch thread \");\n\n      std::stringstream cmd;\n      cmd << \"ros2 launch \" << packageName << \" \" << launchFileName;\n\n      std::array<char, 128> buffer;\n      std::string result;\n      auto pipe_deleter = [](FILE * fp)\n      {\n        if (fp) pclose(fp);\n      };\n      std::unique_ptr<FILE, decltype(pipe_deleter)> pipe(\n        popen(cmd.str().c_str(), \"r\"), pipe_deleter);\n      if (!pipe)\n      {\n        throw std::runtime_error(\"popen() failed!\");\n      }\n\n      std::stringstream ss;\n      bool cancelled = false;\n      try\n      {\n        while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr &&\n               !(cancelled = cancelCondition()))\n        {\n          ss << buffer.data();\n          if (cancelled)  // break_pipe\n          {\n            RCLCPP_WARN_STREAM(\n              rclcpp::get_logger(\"smacc2\"), \"[ClRosLaunch static] cancelling ros launch thread \");\n\n            // break pipe\n            pclose(pipe.release());\n\n            break;\n          }\n        }\n      }\n      catch (const std::exception & e)\n      {\n        std::cerr << e.what() << '\\n';\n      }\n\n      result = ss.str();\n      RCLCPP_WARN_STREAM(\n        rclcpp::get_logger(\"smacc2\"), \"[ClRosLaunch static]] RESULT = \\n \" << ss.str());\n      return result;\n    });\n}\n\n}  // namespace client_bases\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/client_bases/smacc_ros_launch_client_2.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <errno.h>  // Agrega esta inclusión\n#include <fcntl.h>  // Agrega esta inclusión\n#include <poll.h>\n#include <signal.h>\n#include <stdio.h>\n#include <sys/types.h>\n#include <sys/wait.h>\n#include <unistd.h>\n#include <cstdio>\n#include <cstdlib>\n#include <cstring>\n#include <future>\n#include <iostream>\n#include <smacc2/client_bases/smacc_ros_launch_client_2.hpp>\n#include <thread>\n\nnamespace smacc2\n{\nnamespace client_bases\n{\nusing namespace std::chrono_literals;\nClRosLaunch2::ClRosLaunch2(/*std::string packageName, std::string launchFilename*/)\n: /*packageName_(std::nullopt), launchFileName_(std::nullopt),*/ cancellationToken_(false)\n{\n}\n\nClRosLaunch2::ClRosLaunch2(std::string packageName, std::string launchFilename)\n: packageName_(packageName), launchFileName_(launchFilename), cancellationToken_(false)\n{\n}\n\nClRosLaunch2::~ClRosLaunch2() {}\n\nvoid ClRosLaunch2::launch()\n{\n  cancellationToken_.store(false);\n  // Iniciar el hilo para la ejecución del lanzamiento\n  this->result_ = /*std::async([this]()*/\n                  // {\n    executeRosLaunch(packageName_, launchFileName_, [this]() { return cancellationToken_.load(); });\n  // });\n}\n\nvoid ClRosLaunch2::stop()\n{\n  // Establecer la bandera de cancelación\n  cancellationToken_.store(true);\n}\n\nstd::future<std::string> ClRosLaunch2::executeRosLaunch(\n  std::string packageName, std::string launchFileName, std::function<bool()> cancelCondition,\n  ClRosLaunch2 * client)\n// std::string ClRosLaunch2::executeRosLaunch(std::string packageName, std::string launchFileName, std::function<bool()> cancelCondition)\n{\n  return std::async(\n    std::launch::async,\n    [packageName, launchFileName, cancelCondition, client]()\n    {\n      RCLCPP_WARN_STREAM(rclcpp::get_logger(\"smacc2\"), \"[ClRosLaunch2] Starting ros launch thread\");\n\n      std::stringstream cmd;\n      cmd << \"ros2 launch \" << packageName << \" \" << launchFileName;\n      std::array<char, 128> buffer;\n      std::string result;\n\n      auto child = runProcess(cmd.str().c_str());\n\n      if (!child.pipe)\n      {\n        throw std::runtime_error(\"popen() failed!\");\n      }\n      if (client != nullptr)\n      {\n        client->launchPid_ = child.pid;\n      }\n\n      int fd = fileno(child.pipe);\n\n      int flags = fcntl(fd, F_GETFL, 0);\n      fcntl(fd, F_SETFL, flags | O_NONBLOCK);\n\n      bool cancelled = false;\n\n      // while (!cancelCondition())\n      while (!cancelled)\n      {\n        cancelled = cancelCondition();\n        size_t bytesRead = fread(buffer.data(), 1, buffer.size(), /*data*/ child.pipe);\n\n        if (bytesRead > 0)\n        {\n          result.append(buffer.data(), bytesRead);\n        }\n        else if (bytesRead == 0)\n        {\n          // No se han leído más datos\n          std::this_thread::sleep_for(\n            std::chrono::milliseconds(100));  // Espera antes de intentar nuevamente\n        }\n        else\n        {\n          // Error de lectura\n          RCLCPP_ERROR(rclcpp::get_logger(\"smacc2\"), \"Error de lectura en pipe\");\n          break;\n        }\n      }\n\n      rclcpp::sleep_for(2s);\n      if (child.pid > 0)\n      {\n        killGrandchildren(child.pid);\n        rclcpp::sleep_for(2s);\n      }\n\n      int status;\n      pid_t child_pid = child.pid;\n      if (waitpid(child_pid, &status, 0) != -1)\n      {\n        if (WIFEXITED(status))\n        {\n          int exit_status = WEXITSTATUS(status);\n          RCLCPP_INFO(\n            rclcpp::get_logger(\"smacc2\"), \"Child process exited with status: %d\", exit_status);\n        }\n        else if (WIFSIGNALED(status))\n        {\n          int term_signal = WTERMSIG(status);\n          RCLCPP_WARN(\n            rclcpp::get_logger(\"smacc2\"), \"Child process terminated by signal: %d\", term_signal);\n        }\n      }\n      else\n      {\n        RCLCPP_ERROR(rclcpp::get_logger(\"smacc2\"), \"Error waiting for child process.\");\n      }\n\n      pclose(child.pipe);\n      close(child.pipe->_fileno);  // Close pipe file descriptor but not processes\n\n      RCLCPP_WARN_STREAM(rclcpp::get_logger(\"smacc2\"), \"[ClRosLaunch2] RESULT:\\n\" << result);\n\n      // Devuelve una std::future con el resultado\n      // return std::async(std::launch::async, [result]() { return result; });\n      return result;\n    });\n}\n\n/**Aditional functions**/\n/////////////////////////////////////////////////////\n\nProcessInfo runProcess(const char * command)\n{\n  ProcessInfo info;\n  info.pid = -1;  // Inicializar el PID a -1 (indicando error)\n  info.pipe = nullptr;\n\n  int pipefd[2];  // Descriptor de archivo para el pipe\n\n  if (pipe(pipefd) == -1)\n  {\n    perror(\"pipe\");\n    return info;\n  }\n\n  pid_t pid = fork();\n\n  if (pid == 0)\n  {\n    // Esto se ejecuta en el proceso hijo\n    close(pipefd[0]);                // Cerramos el extremo de lectura del pipe en el proceso hijo\n    dup2(pipefd[1], STDOUT_FILENO);  // Redireccionamos la salida estándar al pipe\n    close(pipefd[1]);                // Cerramos el extremo de escritura del pipe en el proceso hijo\n\n    execl(\"/bin/sh\", \"/bin/sh\", \"-c\", command, nullptr);  // Ejecuta el comando dado\n\n    // Si execl retorna, significa que hubo un error\n    std::cerr << \"Error al ejecutar el comando: \" << command << std::endl;\n    _exit(1);  // Usar _exit para evitar la ejecución de códigos de salida de manejo de errores\n  }\n  else if (pid > 0)\n  {\n    // Esto se ejecuta en el proceso padre\n    close(pipefd[1]);  // Cerramos el extremo de escritura del pipe en el proceso padre\n    info.pid = pid;\n    info.pipe = fdopen(pipefd[0], \"r\");  // Abrir el descriptor de archivo de lectura en modo texto\n  }\n  else\n  {\n    std::cerr << \"Error al crear el proceso hijo.\" << std::endl;\n  }\n\n  return info;\n}\n\nvoid killProcessesRecursive(pid_t pid)\n{\n  std::string command = \"pgrep -P \" + std::to_string(pid);\n  FILE * pipe = popen(command.c_str(), \"r\");\n\n  if (!pipe)\n  {\n    std::cerr << \"Error executing pgrep command.\" << std::endl;\n    return;\n  }\n\n  char buffer[128];\n  std::string result = \"\";\n\n  while (fgets(buffer, sizeof(buffer), pipe) != NULL)\n  {\n    result += buffer;\n  }\n\n  pclose(pipe);\n\n  std::istringstream iss(result);\n  pid_t childPid;\n  std::vector<pid_t> childPids;\n\n  while (iss >> childPid)\n  {\n    childPids.push_back(childPid);\n  }\n\n  // Kill child processes before killing the parent process\n  for (const pid_t & child : childPids)\n  {\n    killProcessesRecursive(child);\n  }\n\n  // After killing all children, kill the parent process\n  int res = kill(pid, SIGTERM);\n  if (res == 0)\n  {\n    RCLCPP_FATAL(rclcpp::get_logger(\"smacc2\"), \"Killed process %d\", pid);\n  }\n}\n\nvoid killGrandchildren(pid_t originalPid) { killProcessesRecursive(originalPid); }\n}  // namespace client_bases\n}  // namespace smacc2\n\n/*=============DOCUMENTATION=================*/\n\n/**************BASH VERSION*******************/\n/*************RECURSIVE KILL******************/\n// #!/bin/bash\n\n// # PID del proceso original (cambia esto al PID que desees)\n// original_pid=1119572\n\n// # Función recursiva para matar a los nietos\n// kill_grandchildren() {\n//   local parent_pid=$1\n//   local children=$(pgrep -P $parent_pid)\n\n//   for child in $children; do\n//     # Matar al hijo (nieto del proceso original)\n//     kill -9 $child\n\n//     # Llamar a la función de manera recursiva para matar a los nietos\n//     kill_grandchildren $child\n//   done\n// }\n\n// # Llamar a la función para matar a los nietos del proceso original\n// kill_grandchildren $original_pid\n"
  },
  {
    "path": "smacc2/src/smacc2/client_behaviors/cb_ros_launch.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <smacc2/client_behaviors/cb_ros_launch.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nstd::vector<std::future<std::string>> CbRosLaunch::detached_futures_;\n\nCbRosLaunch::CbRosLaunch()\n: packageName_(std::nullopt),\n  launchFileName_(std::nullopt),\n  launchMode_(RosLaunchMode::LAUNCH_CLIENT_BEHAVIOR_LIFETIME)\n{\n}\n\nCbRosLaunch::CbRosLaunch(std::string package, std::string launchfile, RosLaunchMode launchmode)\n: packageName_(package), launchFileName_(launchfile), launchMode_(launchmode)\n{\n}\n\nCbRosLaunch::~CbRosLaunch() {}\n\ntemplate <typename TOrthogonal, typename TSourceObject>\nvoid onStateOrthogonalAllocation()\n{\n  smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n}\n\nvoid CbRosLaunch::onEntry()\n{\n  RCLCPP_INFO_STREAM(getLogger(), \"[CbRosLaunch] OnEntry\");\n\n  std::string packageName, launchFileName;\n  if (launchFileName_ && packageName_)\n  {\n    std::function<bool()> breakfunction;\n\n    if (launchMode_ == RosLaunchMode::LAUNCH_CLIENT_BEHAVIOR_LIFETIME)\n    {\n      breakfunction = [this]() -> bool { return this->isShutdownRequested(); };\n    }\n    else\n    {\n      breakfunction = []() -> bool { return false; };\n    }\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[CbRosLaunch] launching: \" << *packageName_ << \" , \" << *launchFileName_\n                                               << \"LaunchMode: \" << (int)launchMode_);\n\n    auto fut = smacc2::client_bases::ClRosLaunch::executeRosLaunch(\n      *packageName_, *launchFileName_, breakfunction);\n\n    if (launchMode_ == RosLaunchMode::LAUNCH_DETTACHED)\n      detached_futures_.push_back(std::move(fut));\n    else\n      future_ = std::move(fut);\n  }\n  else\n  {\n    RCLCPP_INFO_STREAM(getLogger(), \"[CbRosLaunch] finding Ros Launch client\");\n\n    this->requiresClient(client_);\n    if (client_ != nullptr)\n    {\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[CbRosLaunch] launching from client: \" << client_->packageName_ << \" , \"\n                                                             << client_->launchFileName_);\n\n      client_->launch();\n    }\n    else\n    {\n      RCLCPP_ERROR(\n        getLogger(),\n        \"[CbRosLaunch] Inccorrect ros launch operation. No Ros Launch client specified neither \"\n        \"package/roslaunch file path.\");\n    }\n  }\n}\n\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/client_behaviors/cb_ros_launch_2.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <smacc2/client_behaviors/cb_ros_launch_2.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nstd::vector<std::future<std::string>> CbRosLaunch2::detached_futures_;\n\nCbRosLaunch2::CbRosLaunch2()\n: packageName_(std::nullopt),\n  launchFileName_(std::nullopt),\n  launchMode_(RosLaunchMode::LAUNCH_CLIENT_BEHAVIOR_LIFETIME),\n  client_(nullptr)\n{\n}\n\nCbRosLaunch2::CbRosLaunch2(std::string package, std::string launchfile, RosLaunchMode launchmode)\n: packageName_(package), launchFileName_(launchfile), launchMode_(launchmode), client_(nullptr)\n{\n}\n\nCbRosLaunch2::~CbRosLaunch2() {}\n\ntemplate <typename TOrthogonal, typename TSourceObject>\nvoid onStateOrthogonalAllocation()\n{\n  smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n}\n\nvoid CbRosLaunch2::onEntry()\n{\n  RCLCPP_INFO_STREAM(getLogger(), \"[CbRosLaunch2] OnEntry\");\n\n  std::string packageName, launchFileName;\n  if (\n    launchFileName_ && packageName_ &&\n    launchMode_ == RosLaunchMode::LAUNCH_CLIENT_BEHAVIOR_LIFETIME)\n  {\n    std::function<bool()> breakfunction;\n\n    breakfunction = std::bind(&CbRosLaunch2::isShutdownRequested, this);\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[CbRosLaunch2] launching: \" << *packageName_ << \" , \" << *launchFileName_\n                                                << \"LaunchMode: \" << (int)launchMode_);\n\n    auto result_ = smacc2::client_bases::ClRosLaunch2::executeRosLaunch(\n      // this->result_ = smacc2::client_bases::ClRosLaunch2::executeRosLaunch(\n      *packageName_, *launchFileName_, breakfunction);\n  }\n  else if (launchMode_ == RosLaunchMode::LAUNCH_DETTACHED)\n  {\n    this->requiresClient(client_);\n    if (launchFileName_ && packageName_)\n    {\n      client_->packageName_ = *packageName_;\n      client_->launchFileName_ = *launchFileName_;\n    }\n\n    RCLCPP_INFO_STREAM(getLogger(), \"[CbRosLaunch2] finding Ros Launch client\");\n\n    // this->requiresClient(client_);\n    if (client_ != nullptr)\n    {\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[CbRosLaunch2] launching from client: \" << client_->packageName_ << \" , \"\n                                                              << client_->launchFileName_);\n\n      client_->launch();\n    }\n    else\n    {\n      RCLCPP_ERROR(\n        getLogger(),\n        \"[CbRosLaunch2] Inccorrect ros launch operation. No Ros Launch client specified neither \"\n        \"package/roslaunch file path.\");\n    }\n  }\n  else\n  {\n    RCLCPP_ERROR(\n      getLogger(),\n      \"[CbRosLaunch2] Inccorrect ros launch operation. Not supported case. Invalid argument.\");\n  }\n}\n\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/client_behaviors/cb_ros_stop_2.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <smacc2/client_behaviors/cb_ros_stop_2.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nstd::vector<std::future<std::string>> CbRosStop2::detached_futures_;\n\nCbRosStop2::CbRosStop2() {}\n\nCbRosStop2::CbRosStop2(pid_t /*launchPid*/) {}\n\nCbRosStop2::~CbRosStop2() {}\n\ntemplate <typename TOrthogonal, typename TSourceObject>\nvoid onStateOrthogonalAllocation()\n{\n  smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n}\n\nvoid CbRosStop2::onEntry()\n{\n  this->requiresClient(client_);\n  client_->stop();\n}\n\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/client_behaviors/cb_sequence.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <functional>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/client_behaviors/cb_sequence.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nCbSequence::CbSequence() {}\n\nvoid CbSequence::recursiveConsumeNext()\n{\n  RCLCPP_INFO(\n    getLogger(), \"[SequenceNode %ld] next onEntry: %ld\", (long)this, sequenceNodes_.size());\n\n  auto first = sequenceNodes_.front();\n  auto onDelayedConfigureFn = first;\n\n  RCLCPP_INFO(getLogger(), \"[SequenceNode %ld] Behavior on delayed sequence configure\", (long)this);\n  bh_ = onDelayedConfigureFn();\n  std::string currentNodeName = bh_->getName();\n\n  RCLCPP_INFO(getLogger(), \"[SequenceNode %ld] Subscribing OnSuccess\", (long)this);\n  this->conn_ = bh_->onSuccess(&CbSequence::onSubNodeSuccess, this);\n  this->conn2_ = bh_->onFailure(&CbSequence::onSubNodeAbort, this);\n\n  RCLCPP_INFO(\n    getLogger(), \"[SequenceNode %ld] subnode %s on entry\", (long)this, currentNodeName.c_str());\n  bh_->executeOnEntry();\n  RCLCPP_INFO(\n    getLogger(), \"[SequenceNode %ld] subnode %s on entry finished\", (long)this,\n    currentNodeName.c_str());\n  bh_->waitOnEntryThread(false);  // we do not request to finish to keep on subscriptions\n  RCLCPP_INFO(\n    getLogger(), \"[SequenceNode %ld] subnode %s thread finished\", (long)this,\n    currentNodeName.c_str());\n}\n\nvoid CbSequence::onEntry()\n{\n  this->recursiveConsumeNext();\n  while (!sequenceNodes_.empty())\n  {\n    bool is_shutdown_requested = this->isShutdownRequested();\n    if (is_shutdown_requested)\n    {\n      break;\n    }\n\n    rclcpp::sleep_for(std::chrono::milliseconds(200));\n    RCLCPP_INFO_THROTTLE(\n      getLogger(), *(getNode()->get_clock()), 1000,\n      \"[CbSequence %ld] Waiting for subnodes to finish %ld. Current head Behavior: %s \", (long)this,\n      sequenceNodes_.size(), demangleType(&typeid(*bh_)).c_str());\n\n    if (consume_)\n    {\n      // bh_->waitOnEntryThread();\n      this->conn_.disconnect();\n      this->conn2_.disconnect();\n\n      sequenceNodes_.pop_front();\n      consume_--;\n\n      if (sequenceNodes_.size() > 0)\n      {\n        this->recursiveConsumeNext();\n      }\n    }\n  }\n\n  if (sequenceNodes_.empty())\n  {\n    RCLCPP_INFO(getLogger(), \"[CbSequence %ld] All subnodes finished\", (long)this);\n    this->postSuccessEvent();\n  }\n  else\n  {\n    RCLCPP_INFO(getLogger(), \"[CbSequence %ld] Aborting\", (long)this);\n    this->postFailureEvent();\n  }\n}\n\nvoid CbSequence::onSubNodeSuccess()\n{\n  RCLCPP_INFO(\n    getLogger(), \"[CbSequence %ld] Success NextCbSequence %ld\", (long)this, sequenceNodes_.size());\n  consume_++;\n}\n\nvoid CbSequence::onSubNodeAbort()\n{\n  RCLCPP_INFO(\n    getLogger(), \"[CbSequence %ld] Abort NextCbSequence %ld\", (long)this, sequenceNodes_.size());\n  // bh_->waitOnEntryThread();\n  this->conn_.disconnect();\n  this->conn2_.disconnect();\n\n  this->postFailureEvent();\n  RCLCPP_INFO(\n    getLogger(), \"[CbSequence %ld] Abort NextCbSequence requesting for force finish\", (long)this);\n  this->requestForceFinish();\n  consume_++;\n}\n\n}  // namespace client_behaviors\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/client_behaviors/cb_wait_action_server.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/client_behaviors/cb_wait_action_server.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nCbWaitActionServer::CbWaitActionServer(std::chrono::milliseconds timeout) : timeout_(timeout) {}\n\nCbWaitActionServer::~CbWaitActionServer() {}\n\nvoid CbWaitActionServer::onEntry()\n{\n  if (client_ != nullptr)\n  {\n    bool found = false;\n    auto starttime = getNode()->now();\n    while (!this->isShutdownRequested() && !found && (getNode()->now() - starttime) < timeout_)\n    {\n      std::shared_ptr<rclcpp_action::ClientBase> client_base = client_->getClientBase();\n      RCLCPP_INFO(getLogger(), \"[CbWaitActionServer] waiting action server..\");\n      found = client_base->wait_for_action_server(std::chrono::milliseconds(1000));\n    }\n\n    if (found)\n    {\n      RCLCPP_INFO(getLogger(), \"[CbWaitActionServer] action server already available\");\n      this->postSuccessEvent();\n    }\n    else\n    {\n      RCLCPP_INFO(getLogger(), \"[CbWaitActionServer] action server not found, timeout\");\n      this->postFailureEvent();\n    }\n  }\n  else\n  {\n    RCLCPP_INFO(getLogger(), \"[CbWaitActionServer] there is no action client in this orthogonal\");\n    this->postFailureEvent();\n  }\n}\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/client_behaviors/cb_wait_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/client_behaviors/cb_wait_node.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nCbWaitNode::CbWaitNode(std::string nodeName) : nodeName_(nodeName), rate_(5) {}\n\nvoid CbWaitNode::onEntry()\n{\n  bool found = false;\n  while (!this->isShutdownRequested() && !found)\n  {\n    std::stringstream ss;\n    auto nodenames = getNode()->get_node_names();\n\n    for (auto n : nodenames)\n    {\n      ss << \" - \" << n << std::endl;\n\n      if (n == nodeName_) found = true;\n    }\n\n    auto totalstr = ss.str();\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << getName() << \"] on entry, listing nodes (\" << nodenames.size() << \")\"\n                       << std::endl\n                       << totalstr);\n\n    rate_.sleep();\n  }\n\n  if (found)\n  {\n    this->postSuccessEvent();\n  }\n  else\n  {\n    this->postFailureEvent();\n  }\n}\n\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/client_behaviors/cb_wait_topic.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/client_behaviors/cb_wait_topic.hpp>\n\nnamespace smacc2\n{\nnamespace client_behaviors\n{\nCbWaitTopic::CbWaitTopic(std::string nodeName) : topicName_(nodeName), rate_(5) {}\n\nCbWaitTopic::~CbWaitTopic() {}\n\nvoid CbWaitTopic::onEntry()\n{\n  bool found = false;\n  while (!this->isShutdownRequested() && !found)\n  {\n    RCLCPP_INFO_STREAM_THROTTLE(\n      getLogger(), *(getNode()->get_clock()), 1000,\n      \"[\" << getName() << \"] waiting topic: \" << topicName_);\n    std::stringstream ss;\n    auto topicnames = getNode()->get_topic_names_and_types();\n\n    for (auto & t : topicnames)\n    {\n      ss << t.first << std::endl;\n      if (t.first == topicName_)\n      {\n        found = true;\n      }\n    }\n\n    auto totalstr = ss.str();\n    RCLCPP_INFO_STREAM_THROTTLE(\n      getLogger(), *(getNode()->get_clock()), 5000,\n      \"[\" << getName() << \"] still waiting topic \" << topicName_ << \", listing topics (\"\n          << topicnames.size() << \")\" << std::endl\n          << totalstr);\n\n    rate_.sleep();\n  }\n\n  if (found)\n  {\n    this->postSuccessEvent();\n  }\n  else\n  {\n    this->postFailureEvent();\n  }\n}\n\n}  // namespace client_behaviors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/common.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include \"smacc2/common.hpp\"\n#include \"smacc2/client_bases/smacc_action_client_base.hpp\"\n\nnamespace smacc2\n{\nnamespace utils\n{\nstd::string cleanShortTypeName(const std::type_info & tinfo)\n{\n  auto typeinfo = TypeInfo::getFromStdTypeInfo(tinfo);\n  auto nontemplatedfullclasname = typeinfo->getNonTemplatedTypeName();\n\n  std::vector<std::string> strs;\n  boost::split(strs, nontemplatedfullclasname, boost::is_any_of(\"::\"));\n  std::string classname = strs.back();\n\n  return classname;\n}\n}  // namespace utils\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/introspection/reflection.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/introspection/introspection.hpp>\n#include \"rclcpp/rclcpp.hpp\"\n\nnamespace smacc2\n{\nnamespace introspection\n{\nrclcpp::Node::SharedPtr globalNh_;\n\nvoid transitionInfoToMsg(\n  const SmaccTransitionInfo & transition, smacc2_msgs::msg::SmaccTransition & transitionMsg)\n{\n  transitionMsg.index = transition.index;\n\n  if (transition.sourceState != nullptr)\n  {\n    transitionMsg.source_state_name = transition.sourceState->demangledStateName;\n  }\n\n  transitionMsg.transition_name = transition.transitionTag;\n  transitionMsg.transition_type = transition.transitionType;\n\n  if (transition.eventInfo != nullptr)\n  {\n    transitionMsg.event.event_type = transition.eventInfo->getEventTypeName();\n    transitionMsg.event.event_source = transition.eventInfo->getEventSourceName();\n    transitionMsg.event.event_object_tag = transition.eventInfo->getOrthogonalName();\n    transitionMsg.event.label = transition.eventInfo->label;\n  }\n\n  transitionMsg.history_node = transition.historyNode;\n\n  if (transition.historyNode)\n  {\n    if (transition.destinyState->parentState_ != nullptr)\n    {\n      transitionMsg.destiny_state_name = transition.destinyState->parentState_->demangledStateName;\n    }\n    else\n    {\n      transitionMsg.destiny_state_name = \"\";\n    }\n  }\n  else\n  {\n    transitionMsg.destiny_state_name = transition.destinyState->demangledStateName;\n  }\n}\n}  // namespace introspection\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/introspection/string_type_walker.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/introspection/smacc_type_info.hpp>\n\n#include <algorithm>\n#include <boost/algorithm/string.hpp>\n#include <boost/algorithm/string/find_iterator.hpp>\n#include <boost/algorithm/string/trim.hpp>\n#include <iostream>\n#include <map>\n#include <memory>\n#include <regex>\n#include <set>\n\n#include <smacc2/common.hpp>\n\nnamespace smacc2\n{\nnamespace introspection\n{\nbool replace(std::string & str, const std::string & from, const std::string & to)\n{\n  size_t start_pos = str.find(from);\n  if (start_pos == std::string::npos) return false;\n  str.replace(start_pos, from.length(), to);\n  return true;\n}\n\nstd::string replace_back(\n  std::string roottype, std::vector<std::pair<std::string, std::string>> & orderedtypesdict)\n{\n  while (roottype.find(\"$\") != std::string::npos)\n  {\n    for (auto & t : orderedtypesdict)\n    {\n      auto & tkey = t.first;\n      auto & tval = t.second;\n\n      replace(roottype, tkey, tval);\n    }\n  }\n\n  return roottype;\n\n  //   def replace_back(roottype, typesdict):\n  //     # replace back\n  //     while \"$\" in roottype:\n  //         #print roottype\n  //         for tkey in typesdict:\n  //             tval = typesdict[tkey]\n  //             roottype = roottype.replace(tkey, tval)\n\n  //     return roottype\n}\n\nstd::map<std::string, TypeInfo::Ptr> TypeInfo::typeInfoDatabase;\n\nTypeInfo::Ptr TypeInfo::getFromStdTypeInfo(const std::type_info & tid)\n{\n  return TypeInfo::getTypeInfoFromString(demangleSymbol(tid.name()));\n}\n\nTypeInfo::Ptr TypeInfo::getTypeInfoFromString(std::string inputtext)\n{\n  auto it = typeInfoDatabase.find(inputtext);\n\n  if (it != typeInfoDatabase.end()) return typeInfoDatabase[inputtext];\n\n  bool ok = false;\n  int typecount = 0;\n  std::string originalinputtext = inputtext;\n  std::map<std::string, std::string> typesdict;\n  std::map<std::string, std::string> typesdict_content;\n\n  // ITERATE on the current string to replace internal template types with ids (ie $Tx) replacements\n  // until plain template type\n\n  while (!ok)\n  {\n    //simpletypeRE = r\"[^<>,\\s]+<[^<>]+>\"\n    //print (\"input: \" + inputtext)\n\n    const char * simpletypeRE = \"[^\\\\<\\\\>,\\\\s]+\\\\<[^\\\\<\\\\>]+\\\\>\";\n    //std::cout << inputtext << std::endl;\n\n    // locate moste outer template\n    std::smatch matches;\n    std::regex regex(simpletypeRE);  // matches words beginning by \"sub\"\n\n    std::regex_search(inputtext, matches, regex);\n\n    // checking ending condition\n    if (matches.size() == 0)\n    {\n      if (typesdict.size() == 0)\n      {\n        auto tkey = \"$T\" + std::to_string(typecount);\n        typesdict[tkey] = inputtext;\n      }\n      break;\n    }\n    else\n    {\n      // find and replace all coincidences typestr to tokenid\n      int i = 0;\n      for (auto & m : matches)\n      {\n        std::string tstr = m;\n        auto tkey = \"$T\" + std::to_string(typecount);\n        replace(inputtext, tstr, tkey);\n\n        typecount++;\n        typesdict[tkey] = tstr;\n\n        i++;\n      }\n    }\n  }\n\n  // ---------- SORT by token key to replace back in a single pass --------\n  std::vector<std::pair<std::string, std::string>> orderedTypedict;\n  for (const auto & item : typesdict)\n  {\n    orderedTypedict.emplace_back(item);\n  }\n\n  std::sort(\n    orderedTypedict.begin(), orderedTypedict.end(),\n    [](auto & a, auto & b) { return std::stoi(a.first.substr(2)) > std::stoi(b.first.substr(2)); });\n  // -----------------------------------------------------------------\n\n  std::set<std::string> allbasetypes;\n  for (auto & typeentry : orderedTypedict /*typesdict*/)\n  {\n    auto flat = typeentry.second;\n\n    size_t startindex = flat.find(\"<\");\n    size_t endindex = flat.find(\">\");\n    if (startindex != std::string::npos)\n    {\n      flat = flat.substr(\n        startindex + 1,\n        endindex - startindex - 1);  // gets the list of template parameters in csv format\n\n      typesdict_content[typeentry.first] = flat;\n      std::vector<std::string> localbasetypes;\n\n      std::istringstream iss(flat);\n      std::string token;\n      while (std::getline(iss, token, ','))\n      {\n        boost::trim(token);\n        localbasetypes.push_back(token);\n      }\n\n      for (auto & b : localbasetypes)\n      {\n        size_t found = b.find(\"$\");\n\n        if (found == std::string::npos)\n        {\n          allbasetypes.insert(b);\n        }\n      }\n    }\n\n    // for b in allbasetypes:\n    // typesdict[b] = b\n\n    //refresh\n    for (auto & b : allbasetypes)\n    {\n      typesdict[b] = b;\n    }\n  }\n  // types = []\n  // for tkey in typesdict:\n  //     finaltype = replace_back(typesdict[tkey], typesdict)\n  //     t = TypeInfo(tkey, typesdict[tkey], finaltype)\n  //     types.append(t)\n\n  //     print t\n\n  // append leaf types\n  for (auto & b : allbasetypes)\n  {\n    orderedTypedict.push_back({b, b});\n  }\n\n  //std::cout << \"---------- TYPES -------\" << std::endl;\n  std::vector<TypeInfo::Ptr> types;\n  std::vector<std::string> tokens;\n\n  for (auto t : orderedTypedict)  // must be ordered. to avoid issue, ie: $11 to be replaced in $T14\n  {\n    //auto t = *it;\n    auto & tkey = t.first;\n    auto & tval = t.second;\n    auto finaltype = replace_back(tval, orderedTypedict);\n    auto tinfo = std::make_shared<TypeInfo>(tkey, tval, finaltype);\n    types.push_back(tinfo);\n    tokens.push_back(tkey);\n\n    //std::cout << \"replacing back: \" << finaltype << std::endl;\n  }\n\n  // --------- FINDING THE CURRENT TYPE -------------\n  TypeInfo::Ptr roottype = nullptr;\n  for (auto & t : types)\n  {\n    // std::cout << t->finaltype << \" vs \" <<originalinputtext;\n    if (t->finaltype == originalinputtext)\n    {\n      roottype = t;\n      break;\n    }\n  }\n\n  if (roottype == nullptr && globalNh_ != nullptr)\n  {\n    std::stringstream ss;\n    ss << \"---------------\" << std::endl;\n    ss << \"TYPE STRING WALKER, type was not properly interpreted: \" << std::endl\n       << \" - \" << inputtext.c_str() << std::endl\n       << \" - \" << originalinputtext << std::endl;\n\n    auto strmsg = ss.str();\n    RCLCPP_WARN_STREAM(globalNh_->get_logger(), strmsg);\n  }\n\n  // std::sort(types.begin(), types.end(),[](auto& a, auto& b)\n  // {\n  //     return a->getFullName().size() > b->getFullName().size();\n  // });\n\n  /*\n    std::cout<<\"types order:\" << std::endl;\n    for(auto t: types)\n    {\n        std::cout<< t->codedtype << std::endl;\n    }\n    std::cout<<\"---------\" << std::endl;\n\n    std::cout<<\"types order:\" << std::endl;\n    for(auto t: types)\n    {\n        std::cout<< t->finaltype << std::endl;\n    }\n    std::cout<<\"---------\" << std::endl;\n    */\n\n  // Replacing back tokens in strings to get the whole final name\n  for (size_t i = 0; i < types.size(); i++)\n  {\n    auto t = types[i];\n    auto ttoken = tokens[i];\n\n    //auto t = types[it1];\n    std::vector<std::pair<int, TypeInfo::Ptr>> unorderedTemplateParameters;\n\n    //std::cout << \"original typestr: \" << codedtypecopy << std::endl;\n\n    //auto codedtypecopy = t->codedtype;\n    auto codedtypecopy = typesdict_content[ttoken];\n\n    // std::cout << \"original typestr: \" << codedtypecopy << std::endl;\n    // std::cout << \"original token: \" << ttoken << std::endl;\n    // std::cout << \"original typestr: \" << typesdict_content[ttoken] << std::endl;\n\n    // size_t startindex = codedtypecopy.find(\"<\");\n    // size_t endindex = codedtypecopy.find(\">\");\n\n    // if (startindex != std::string::npos)\n    // {\n    //     codedtypecopy = codedtypecopy.substr(startindex + 1, endindex - startindex - 1);\n    // }\n    //std::cout << \"original typestr: \" << codedtypecopy << std::endl;\n\n    for (auto & t2 : types)\n    //for (auto it2= types.size() -1; it2 >=0; it2--)\n    {\n      //std::cout << it2 << std::endl;\n      //auto t2 = types[it2];\n      //std::cout << t2->getFullName() << std::endl;\n      if (t == t2) continue;\n\n      auto index = codedtypecopy.find(t2->tkey);\n      if (index != std::string::npos)\n      {\n        auto pair = std::make_pair(index, t2);  // this line is important for the order of templates\n        //auto pair = std::make_pair(0, t2);\n        //std::cout << \"matches: \" << t2->tkey <<std::endl;\n        unorderedTemplateParameters.push_back(pair);\n        replace(codedtypecopy, t2->tkey, \"\");  // consume token\n        //std::cout << \"codedtypecopy: \" << codedtypecopy << std::endl;\n      }\n    }\n\n    std::sort(\n      unorderedTemplateParameters.begin(), unorderedTemplateParameters.end(),\n      [](auto & a, auto & b) -> bool { return a.first <= b.first; });\n\n    //RCLCPP_DEBUG_STREAM(nh_->get_logger(),\"------------------\");\n    //RCLCPP_DEBUG_STREAM(nh_->get_logger(),\"CREATING TYPE:\" << t->getFullName());\n\n    for (auto & item : unorderedTemplateParameters)\n    {\n      //RCLCPP_DEBUG_STREAM(nh_->get_logger(),\" - template parameter: \" << item.second->getFullName());\n      t->templateParameters.push_back(item.second);\n    }\n    //RCLCPP_DEBUG_STREAM(nh_->get_logger(),\"------------------\");\n  }\n\n  //RCLCPP_DEBUG_STREAM(nh_->get_logger(),\"ADDING TYPE TO DATABASE: \" << inputtext);\n  //RCLCPP_DEBUG_STREAM(nh_->get_logger(),\"Current Database\");\n  for (auto & en : typeInfoDatabase)\n  {\n    if (globalNh_ != nullptr) RCLCPP_DEBUG_STREAM(globalNh_->get_logger(), \"- \" << en.first);\n  }\n\n  typeInfoDatabase[originalinputtext] = roottype;\n\n  if (roottype == nullptr && globalNh_ != nullptr)\n  {\n    std::stringstream ss;\n    ss << \"---------------\" << std::endl;\n    ss << \"TYPE STRING WALKER, type was not properly interpreted: \" << std::endl\n       << \" - \" << inputtext.c_str() << std::endl\n       << \" - \" << originalinputtext << std::endl;\n\n    ss << \"---- current type (ordered types)\" << std::endl;\n\n    for (auto & en : orderedTypedict)\n    {\n      ss << \"- \" << en.first << \": \" << en.second << std::endl;\n    }\n    ss << \"---------------\" << std::endl;\n\n    ss << \"------current type types --------\" << std::endl;\n\n    for (auto & t : types)\n    {\n      ss << t->finaltype << std::endl;\n    }\n\n    ss << \"----total typeinfo database\" << std::endl;\n\n    for (auto & en : typeInfoDatabase)\n    {\n      ss << \"- \" << en.first << \": \" << en.second << std::endl;\n    }\n\n    auto strmsg = ss.str();\n    RCLCPP_WARN_STREAM(globalNh_->get_logger(), strmsg);\n  }\n\n  return roottype;\n}\n\n/*\n\n    print (typesdict)\n    roottype = [t for t in types if t.finaltype == originalinputtext][0]\n\n    print \"---------------------------------\"\n\n    # fill template parameters\n    for t in types:\n        for t2 in types:\n            if t2.tkey in t.codedtype:\n                index = t.codedtype.index(t2.tkey)\n                t.template_parameters.append((index, t2))\n\n        t.template_parameters = [x[1] for x in sorted(\n            t.template_parameters, key=lambda e: e[0])]\n\n    return roottype\n\n}\n*/\n\n}  // namespace introspection\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/orthogonal.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/impl/smacc_state_machine_impl.hpp>\n#include <smacc2/smacc_client_behavior.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n#include <smacc2/smacc_tracing/smacc_tracing.hpp>\n\n#define statename stateMachine_->getCurrentState()->getClassName().c_str()\n#define orthogonalName getName().c_str()\n#define cbName clBehavior->getName().c_str()\n\nnamespace smacc2\n{\nvoid ISmaccOrthogonal::setStateMachine(ISmaccStateMachine * value)\n{\n  this->stateMachine_ = value;\n  this->onInitialize();\n  this->initializeClients();\n}\n\nvoid ISmaccOrthogonal::initializeClients()\n{\n  for (auto & c : this->clients_)\n  {\n    c->initialize();\n  }\n}\n\nrclcpp::Node::SharedPtr ISmaccOrthogonal::getNode() { return this->stateMachine_->getNode(); }\n\nvoid ISmaccOrthogonal::addClientBehavior(std::shared_ptr<smacc2::ISmaccClientBehavior> clBehavior)\n{\n  std::lock_guard<std::mutex> lock(this->mutex_);\n\n  if (clBehavior != nullptr)\n  {\n    RCLCPP_INFO(\n      getLogger(), \"[Orthogonal: %s] Adding client behavior: %s.\", this->getName().c_str(),\n      clBehavior->getName().c_str());\n    clBehavior->stateMachine_ = this->getStateMachine();\n    clBehavior->currentOrthogonal = this;\n    clBehavior->currentState = clBehavior->stateMachine_->getCurrentState();\n\n    clientBehaviors_.back().push_back(clBehavior);\n  }\n  else\n  {\n    RCLCPP_INFO(\n      getLogger(), \"[Orthogonal: %s] No client behaviors in this state.\", this->getName().c_str());\n  }\n}\n\nvoid ISmaccOrthogonal::onInitialize() {}\n\nvoid ISmaccOrthogonal::initState(ISmaccState * state)\n{\n  RCLCPP_INFO(\n    getLogger(), \"[Orthogonal: %s] InitState: %s.\", this->getName().c_str(),\n    state->getClassName().c_str());\n  clientBehaviors_.push_back(std::vector<std::shared_ptr<smacc2::ISmaccClientBehavior>>());\n}\n\nstd::string ISmaccOrthogonal::getName() const { return demangleSymbol(typeid(*this).name()); }\n\nvoid ISmaccOrthogonal::runtimeConfigure()\n{\n  std::lock_guard<std::mutex> lock(this->mutex_);\n\n  for (auto & clBehavior : clientBehaviors_.back())\n  {\n    RCLCPP_INFO(\n      getLogger(), \"[Orthogonal: %s] runtimeConfigure(), current behavior: %s.\",\n      this->getName().c_str(), clBehavior->getName().c_str());\n\n    clBehavior->runtimeConfigure();\n  }\n}\n\nvoid ISmaccOrthogonal::onEntry()\n{\n  std::lock_guard<std::mutex> lock(this->mutex_);\n\n  if (clientBehaviors_.back().size() > 0)\n  {\n    for (auto & clBehavior : clientBehaviors_.back())\n    {\n      RCLCPP_INFO(\n        getLogger(), \"[Orthogonal: %s] OnEntry, current Behavior: %s\", orthogonalName, cbName);\n\n      try\n      {\n        TRACETOOLS_TRACEPOINT(\n          smacc2_client_behavior_on_entry_start, statename, orthogonalName, cbName);\n        clBehavior->executeOnEntry();\n      }\n      catch (const std::exception & e)\n      {\n        RCLCPP_ERROR(\n          getLogger(),\n          \"[ClientBehavior: %s] Exception on Entry - continuing with next client behavior. \"\n          \"Exception info: \"\n          \"%s\",\n          cbName, e.what());\n      }\n      TRACETOOLS_TRACEPOINT(smacc2_client_behavior_on_entry_end, statename, orthogonalName, cbName);\n    }\n  }\n  else\n  {\n    RCLCPP_INFO(\n      getLogger(), \"[Orthogonal: %s] OnEntry -> empty orthogonal (no client behavior).\",\n      orthogonalName);\n  }\n}\n\nvoid ISmaccOrthogonal::onExit()\n{\n  std::lock_guard<std::mutex> lock(this->mutex_);\n\n  if (clientBehaviors_.back().size() > 0)\n  {\n    for (auto & clBehavior : clientBehaviors_.back())\n    {\n      RCLCPP_INFO(\n        getLogger(), \"[Orthogonal: %s] OnExit, current Behavior: %s\", orthogonalName, cbName);\n      try\n      {\n        TRACETOOLS_TRACEPOINT(\n          smacc2_client_behavior_on_exit_start, statename, orthogonalName, cbName);\n        clBehavior->executeOnExit();\n      }\n      catch (const std::exception & e)\n      {\n        RCLCPP_ERROR(\n          getLogger(),\n          \"[ClientBehavior: %s] Exception onExit - continuing with next client behavior. Exception \"\n          \"info: %s\",\n          cbName, e.what());\n      }\n      TRACETOOLS_TRACEPOINT(smacc2_client_behavior_on_exit_end, statename, orthogonalName, cbName);\n    }\n  }\n  else\n  {\n    RCLCPP_INFO(getLogger(), \"[Orthogonal %s] OnExit().\", orthogonalName);\n  }\n}\n\nvoid ISmaccOrthogonal::onDispose()\n{\n  for (auto & clBehavior : clientBehaviors_.back())\n  {\n    clBehavior->dispose();\n    this->getStateMachine()->disconnectSmaccSignalObject((void *)clBehavior.get());\n  }\n\n  clientBehaviors_.back().clear();\n  clientBehaviors_.pop_back();\n}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/signal_detector.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <signal.h>\n#include <limits>\n#include <memory>\n#include <thread>\n#include <vector>\n\n#include <lttng/tracepoint.h>\n#include <smacc2/client_bases/smacc_action_client_base.hpp>\n#include <smacc2/smacc_signal_detector.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n// #include <smacc2/smacc_tracing/trace_provider.hpp>\n#include <smacc2/smacc_tracing/smacc_tracing.hpp>\n\n//#include \"tracetools/tracetools.h\"\n\nnamespace smacc2\n{\nusing namespace std::chrono_literals;\n\n/**\n******************************************************************************************************************\n* SmExecution singleton implementation\n******************************************************************************************************************\n*/\nSmExecution::SmExecution()\n: schedulerThread(nullptr),\n  signalDetectorLoop(nullptr),\n  signalDetector(nullptr),\n  scheduler1(nullptr)\n{\n}\n\nSmExecution & SmExecution::getInstance()\n{\n  static SmExecution instance;\n  return instance;\n}\n\n/**\n******************************************************************************************************************\n* SignalDetector()\n******************************************************************************************************************\n*/\nSignalDetector::SignalDetector(SmaccFifoScheduler * scheduler, ExecutionModel executionModel)\n{\n  scheduler_ = scheduler;\n  loop_rate_hz = 20.0;\n  end_ = false;\n  initialized_ = false;\n  rosInitialized_ = false;\n  executionModel_ = executionModel;\n}\n\nrclcpp::Node::SharedPtr SignalDetector::getNode() { return this->smaccStateMachine_->getNode(); }\n\n/**\n******************************************************************************************************************\n* initialize()\n******************************************************************************************************************\n*/\nvoid SignalDetector::initialize(ISmaccStateMachine * stateMachine)\n{\n  smaccStateMachine_ = stateMachine;\n  lastState_ = std::numeric_limits<int64_t>::quiet_NaN();\n  findUpdatableClientsAndComponents();\n  this->getNode()->declare_parameter(\"signal_detector_loop_freq\", this->loop_rate_hz);\n\n  initialized_ = true;\n}\n\n/**\n******************************************************************************************************************\n* findUpdatableClientsAndComponents()\n******************************************************************************************************************\n*/\nvoid SignalDetector::findUpdatableClientsAndComponents()\n{\n  this->updatableClients_.clear();\n  for (auto pair : this->smaccStateMachine_->getOrthogonals())\n  {\n    auto & orthogonal = pair.second;\n    auto & clients = orthogonal->getClients();\n\n    for (auto & client : clients)\n    {\n      // updatable client components\n      auto updatableClient = dynamic_cast<ISmaccUpdatable *>(client.get());\n\n      if (updatableClient != nullptr)\n      {\n        RCLCPP_DEBUG_STREAM(\n          getLogger(), \"Adding updatable client: \" << demangleType(typeid(updatableClient)));\n        this->updatableClients_.push_back(updatableClient);\n      }\n\n      // updatable client components\n      std::vector<std::shared_ptr<ISmaccComponent>> components;\n      client->getComponents(components);\n      for (auto & componententry : components)\n      {\n        auto updatableComponent = dynamic_cast<ISmaccUpdatable *>(componententry.get());\n        if (updatableComponent != nullptr)\n        {\n          RCLCPP_DEBUG_STREAM(\n            getLogger(),\n            \"Adding updatable component: \" << demangleType(typeid(*updatableComponent)));\n          this->updatableClients_.push_back(updatableComponent);\n        }\n      }\n    }\n  }\n}\n\n/**\n ******************************************************************************************************************\n * findUpdatableClientBehaviors()\n ******************************************************************************************************************\n */\nvoid SignalDetector::findUpdatableStateElements(ISmaccState * currentState)\n{\n  updatableStateElements_.push_back(std::vector<ISmaccUpdatable *>());\n\n  auto & updatableElements = updatableStateElements_.back();\n\n  for (auto pair : this->smaccStateMachine_->getOrthogonals())\n  {\n    auto & orthogonal = pair.second;\n    auto & behaviors = orthogonal->getClientBehaviors().back();\n\n    for (auto & currentBehavior : behaviors)\n    {\n      ISmaccUpdatable * updatableClientBehavior =\n        dynamic_cast<ISmaccUpdatable *>(currentBehavior.get());\n\n      if (updatableClientBehavior != nullptr)\n      {\n        RCLCPP_DEBUG_STREAM(\n          getLogger(),\n          \"Adding updatable behavior: \" << demangleType(typeid(updatableClientBehavior)));\n        updatableElements.push_back(updatableClientBehavior);\n      }\n    }\n  }\n\n  auto updatableState = dynamic_cast<ISmaccUpdatable *>(currentState);\n  if (updatableState != nullptr)\n  {\n    updatableElements.push_back(updatableState);\n  }\n\n  auto statereactors = currentState->getStateReactors();\n  for (auto & sr : statereactors)\n  {\n    ISmaccUpdatable * updatableStateReactor = dynamic_cast<ISmaccUpdatable *>(sr.get());\n    if (updatableStateReactor != nullptr)\n    {\n      RCLCPP_DEBUG_STREAM(\n        getLogger(),\n        \"Adding updatable stateReactorr: \" << demangleType(typeid(updatableStateReactor)));\n      updatableElements.push_back(updatableStateReactor);\n    }\n  }\n\n  auto eventgenerators = currentState->getEventGenerators();\n  for (auto & eg : eventgenerators)\n  {\n    ISmaccUpdatable * updatableEventGenerator = dynamic_cast<ISmaccUpdatable *>(eg.get());\n    if (updatableEventGenerator != nullptr)\n    {\n      RCLCPP_DEBUG_STREAM(\n        getLogger(),\n        \"Adding updatable eventGenerator: \" << demangleType(typeid(updatableEventGenerator)));\n      updatableElements.push_back(updatableEventGenerator);\n    }\n  }\n}\n\nvoid SignalDetector::notifyStateConfigured(ISmaccState * currentState)\n{\n  this->findUpdatableStateElements(currentState);\n}\n\nvoid SignalDetector::notifyStateExited(ISmaccState * /*currentState*/)\n{\n  this->updatableStateElements_.pop_back();\n}\n\nvoid SignalDetector::notifyRosInitialized()\n{\n  RCLCPP_INFO(getLogger(), \"[SignalDetector] ROS initialization complete, enabling polling loop\");\n  rosInitialized_ = true;\n}\n\n/**\n ******************************************************************************************************************\n * setProcessorHandle()\n ******************************************************************************************************************\n */\nvoid SignalDetector::setProcessorHandle(SmaccFifoScheduler::processor_handle processorHandle)\n{\n  processorHandle_ = processorHandle;\n}\n\n/**\n ******************************************************************************************************************\n * runThread()\n ******************************************************************************************************************\n */\nvoid SignalDetector::runThread()\n{\n  signalDetectorThread_ = boost::thread(boost::bind(&SignalDetector::pollingLoop, this));\n}\n\n/**\n ******************************************************************************************************************\n * join()\n ******************************************************************************************************************\n */\nvoid SignalDetector::join() { signalDetectorThread_.join(); }\n\n/**\n ******************************************************************************************************************\n * stop()\n ******************************************************************************************************************\n */\nvoid SignalDetector::stop() { end_ = true; }\n\n/**\n ******************************************************************************************************************\n * terminateScheduler()\n ******************************************************************************************************************\n */\nvoid SignalDetector::terminateScheduler()\n{\n  if (scheduler_)\n  {\n    RCLCPP_INFO(getLogger(), \"[SignalDetector] Terminating scheduler...\");\n    scheduler_->terminate();\n  }\n}\n\n/**\n ******************************************************************************************************************\n * poll()\n ******************************************************************************************************************\n */\nvoid SignalDetector::pollOnce()\n{\n  // precondition: smaccStateMachine_ != nullptr\n\n  //TRACETOOLS_TRACEPOINT( spinOnce);\n  TRACETOOLS_TRACEPOINT(spinOnce);\n\n  std::lock_guard<std::recursive_mutex> lock(smaccStateMachine_->m_mutex_);\n  try\n  {\n    //smaccStateMachine_->lockStateMachine(\"update behaviors\");\n\n    this->findUpdatableClientsAndComponents();\n    RCLCPP_DEBUG_STREAM(getLogger(), \"Updatable clients: \" << this->updatableClients_.size());\n\n    if (this->updatableClients_.size())\n    {\n      auto node = getNode();\n      for (auto * updatableClient : this->updatableClients_)\n      {\n        auto updatableElementName = demangleType(typeid(*updatableClient)).c_str();\n        try\n        {\n          RCLCPP_DEBUG_STREAM(\n            node->get_logger(),\n            \"[PollOnce] update client call:  \" << demangleType(typeid(*updatableClient)));\n\n          TRACETOOLS_TRACEPOINT(smacc2_state_update_start, updatableElementName);\n          updatableClient->executeUpdate(smaccStateMachine_->getNode());\n          TRACETOOLS_TRACEPOINT(smacc2_state_update_start, updatableElementName);\n        }\n        catch (const std::exception & e)\n        {\n          RCLCPP_ERROR_STREAM(\n            node->get_logger(),\n            \"Error in updatable elemnent \" << updatableElementName << \": \" << e.what() << '\\n');\n        }\n      }\n    }\n\n    // STATE UPDATABLE ELEMENTS\n    if (\n      this->smaccStateMachine_->stateMachineCurrentAction !=\n        StateMachineInternalAction::TRANSITIONING &&\n      this->smaccStateMachine_->stateMachineCurrentAction !=\n        StateMachineInternalAction::STATE_CONFIGURING &&\n      this->smaccStateMachine_->stateMachineCurrentAction !=\n        StateMachineInternalAction::STATE_ENTERING &&\n      this->smaccStateMachine_->stateMachineCurrentAction !=\n        StateMachineInternalAction::STATE_EXITING)\n    {\n      RCLCPP_DEBUG_STREAM(\n        getLogger(), \"Updatable states: \" << this->updatableStateElements_.size());\n\n      for (auto stateElement : this->updatableStateElements_)\n      {\n        for (auto * udpatableStateElement : stateElement)\n        {\n          std::string updatableElementName = demangleType(typeid(*udpatableStateElement));\n          auto updatableElementNameCstr = updatableElementName.c_str();\n\n          RCLCPP_DEBUG_STREAM(\n            getLogger(), \"pollOnce update client behavior call: \"\n                           << demangleType(typeid(*udpatableStateElement)));\n          TRACETOOLS_TRACEPOINT(smacc2_state_update_start, updatableElementNameCstr);\n\n          udpatableStateElement->executeUpdate(smaccStateMachine_->getNode());\n          TRACETOOLS_TRACEPOINT(smacc2_state_update_start, updatableElementNameCstr);\n        }\n      }\n    }\n  }\n  catch (std::exception & ex)\n  {\n    RCLCPP_ERROR(getLogger(), \"Exception during Signal Detector update loop. %s.\", ex.what());\n  }\n\n  auto nh = this->getNode();\n  rclcpp::spin_some(nh);\n  //smaccStateMachine_->unlockStateMachine(\"update behaviors\");\n}\n\n/**\n ******************************************************************************************************************\n * pollingLoop()\n ******************************************************************************************************************\n */\nvoid SignalDetector::pollingLoop()\n{\n  // rclcpp::Node::SharedPtr nh(\"~\"); // use node name as root of the parameter server\n  rclcpp::Node::SharedPtr _;\n  rclcpp::Rate r0(20);\n\n  // Wait for both SignalDetector::initialize() (called from ISmaccStateMachine constructor)\n  // and ROS initialization to complete (initializeROS called from initiate_impl).\n  // This ensures orthogonals, clients, and ROS objects are fully initialized\n  // before we start polling and accessing them.\n  while ((!initialized_ || !rosInitialized_) && rclcpp::ok() && !end_)\n  {\n    r0.sleep();\n  }\n\n  if (!rclcpp::ok() || end_)\n  {\n    RCLCPP_INFO(getLogger(), \"[SignalDetector] Shutdown requested before initialization completed\");\n    return;\n  }\n\n  auto nh = getNode();\n\n  if (!nh->get_parameter(\"signal_detector_loop_freq\", this->loop_rate_hz))\n  {\n    RCLCPP_WARN(\n      getLogger(),\n      \"Signal Detector frequency (ros param signal_detector_loop_freq) was not set, using default \"\n      \"frequency: \"\n      \"%lf\",\n      this->loop_rate_hz);\n  }\n  else\n  {\n    RCLCPP_WARN(\n      getLogger(), \"Signal Detector frequency (ros param signal_detector_loop_freq): %lf\",\n      this->loop_rate_hz);\n  }\n\n  nh->set_parameter(rclcpp::Parameter(\"signal_detector_loop_freq\", this->loop_rate_hz));\n\n  RCLCPP_INFO_STREAM(getLogger(), \"[SignalDetector] Loop rate hz:\" << loop_rate_hz);\n\n  if (this->executionModel_ == ExecutionModel::SINGLE_THREAD_SPINNER)\n  {\n    RCLCPP_INFO_STREAM(getLogger(), \"[SignalDetector] Running in single-threaded mode.\");\n\n    rclcpp::Rate r(loop_rate_hz);\n    while (rclcpp::ok() && !end_)\n    {\n      RCLCPP_INFO_STREAM_THROTTLE(\n        getLogger(), *getNode()->get_clock(), 10000, \"[SignalDetector] Heartbeat\");\n      pollOnce();\n      rclcpp::spin_some(nh);\n      r.sleep();\n    }\n  }\n  else\n  {\n    RCLCPP_INFO_STREAM(getLogger(), \"[SignalDetector] Running in multi-threaded mode.\");\n\n    rclcpp::executors::MultiThreadedExecutor executor;\n    executor.add_node(nh);\n    executor.spin();\n  }\n}\n\nvoid onSignalShutdown(int /*sig*/)\n{\n  // IMPORTANT: Signal handlers can only call async-signal-safe functions\n  // We must NOT call complex C++ methods here (like terminateScheduler)\n  // as they may use mutexes/condition variables which are not signal-safe\n\n  // Stop the signal detector loop (atomic operation - signal-safe)\n  SmExecution & smExecution = SmExecution::getInstance();\n  if (smExecution.signalDetector)\n  {\n    smExecution.signalDetector->stop();\n  }\n\n  // Trigger ROS2 shutdown (this handles its own signal safety)\n  rclcpp::shutdown();\n\n  // Note: Scheduler termination will happen from main thread after polling loop exits\n}\n\nvoid onSigQuit(int)\n{\n  RCLCPP_INFO(rclcpp::get_logger(\"SMACC\"), \"SignalDetector: SIGQUIT received.\");\n  exit(0);\n}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/smacc_client_async_behavior.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace smacc2\n{\nvoid SmaccAsyncClientBehavior::executeOnEntry()\n{\n  RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] asynchronous onEntry thread started\");\n  this->onEntryThread_ = std::async(\n    std::launch::async,\n    [=]\n    {\n      this->onEntry();\n      this->postFinishEventFn_();\n      RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] asynchronous onEntry thread finished\");\n      return 0;\n    });\n}\n\nvoid SmaccAsyncClientBehavior::waitFutureIfNotFinished(\n  std::optional<std::future<int>> & threadfut, bool requestFinish)\n{\n  try\n  {\n    rclcpp::Rate r(100);\n    while (rclcpp::ok())\n    {\n      //bool valid = threadfut.valid();\n      if (threadfut && threadfut->valid())\n      {\n        auto status = threadfut->wait_for(std::chrono::milliseconds(20));\n        if (status == std::future_status::ready)\n        // auto status = threadfut->wait();\n        // if(status)\n        {\n          // done\n          threadfut->get();\n          break;\n        }\n        else\n        {\n          // in progress\n          RCLCPP_INFO_STREAM(\n            getLogger(),\n            \"[\" << getName()\n                << \"] fut valid but waiting for asynchronous onEntry thread to finish: state: \"\n                << (int)status);\n        }\n      }\n      else\n      {\n        RCLCPP_INFO_STREAM(\n          getLogger(),\n          \"[\" << getName()\n              << \"] waiting future onEntryThread. It was not even created. Skipping wait.\");\n        break;\n      }\n\n      // r.sleep();\n      rclcpp::sleep_for(100ms);\n      // rclcpp::spin_some(getNode());\n      RCLCPP_WARN_THROTTLE(\n        getLogger(), *(getNode()->get_clock()), 1000,\n        \"[%s] waiting for finishing client behavior, before leaving the state. Is the client \"\n        \"behavior stuck? requesting force finish\",\n        this->getName().c_str());\n\n      if (requestFinish) requestForceFinish();\n    }\n  }\n  catch (const std::exception & e)\n  {\n    RCLCPP_DEBUG(\n      getLogger(),\n      \"[SmaccAsyncClientBehavior] trying to join function, but it was already finished.\");\n  }\n}\n\nvoid SmaccAsyncClientBehavior::waitOnEntryThread(bool requestFinish)\n{\n  waitFutureIfNotFinished(this->onEntryThread_, requestFinish);\n}\n\nvoid SmaccAsyncClientBehavior::executeOnExit()\n{\n  RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] onExit - join async onEntry thread\");\n  this->waitOnEntryThread(true);\n\n  RCLCPP_INFO_STREAM(\n    getLogger(), \"[\" << getName() << \"] onExit - Creating asynchronous onExit thread\");\n  this->onExitThread_ = std::async(\n    std::launch::async,\n    [=]\n    {\n      this->onExit();\n      RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] asynchronous onExit done.\");\n      return 0;\n    });\n}\n\nvoid SmaccAsyncClientBehavior::dispose()\n{\n  RCLCPP_DEBUG_STREAM(\n    getLogger(), \"[\" << getName()\n                     << \"] Destroying client behavior- Waiting finishing of asynchronous onExit \"\n                        \"thread\");\n  try\n  {\n    if (this->onExitThread_)\n    {\n      // this->onExitThread_->get();\n      this->onExitThread_->get();\n    }\n    //this->onExitThread_->get();\n  }\n  catch (...)\n  {\n    RCLCPP_DEBUG(\n      getLogger(),\n      \"[SmaccAsyncClientBehavior] trying to Join onExit function, but it was already \"\n      \"finished.\");\n  }\n\n  RCLCPP_DEBUG_STREAM(\n    getLogger(), \"[\" << getName()\n                     << \"] Destroying client behavior-  onExit thread finished. Proccedding \"\n                        \"destruction.\");\n}\n\nSmaccAsyncClientBehavior::~SmaccAsyncClientBehavior() {}\n\nvoid SmaccAsyncClientBehavior::postSuccessEvent() { postSuccessEventFn_(); }\n\nvoid SmaccAsyncClientBehavior::postFailureEvent() { postFailureEventFn_(); }\n\nvoid SmaccAsyncClientBehavior::requestForceFinish()\n{\n  RCLCPP_FATAL_STREAM_THROTTLE(\n    getLogger(), *(getNode()->get_clock()), 1000,\n    \"[\" << getName() << \"] \" << ((uint64_t)this) << \" requestForceFinish\");\n  isShutdownRequested_ = true;\n}\n\nbool SmaccAsyncClientBehavior::isShutdownRequested()\n{\n  std::string shut = \"\";\n  if (isShutdownRequested_)\n  {\n    shut = \"True\";\n  }\n  else\n  {\n    shut = \"False\";\n  }\n  // RCLCPP_FATAL_STREAM_THROTTLE(\n  //   getLogger(), *(getNode()->get_clock()), 1000, \"[\" << getName() << \"] \" << ((uint64_t) this ) << \" Is requestForceFinish active? \" << shut );\n  return isShutdownRequested_;\n}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/smacc_client_behavior.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc_client_behavior.hpp>\n\nnamespace smacc2\n{\nvoid SmaccClientBehavior::onEntry()\n{\n  RCLCPP_DEBUG(\n    getLogger(), \"[%s] Default empty SmaccClientBehavior onEntry\", this->getName().c_str());\n}\n\nvoid SmaccClientBehavior::onExit()\n{\n  RCLCPP_DEBUG(\n    getLogger(), \"[%s] Default empty SmaccClientBehavior onExit\", this->getName().c_str());\n}\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/smacc_client_behavior_base.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc_client_behavior.hpp>\n\nnamespace smacc2\n{\nISmaccClientBehavior::ISmaccClientBehavior()\n{\n  stateMachine_ = nullptr;\n  currentState = nullptr;\n}\n\nISmaccClientBehavior::~ISmaccClientBehavior()\n{\n  RCLCPP_WARN_STREAM(getLogger(), \"[\" << getName() << \"]\" << \" Client behavior deallocated\");\n}\n\nstd::string ISmaccClientBehavior::getName() const { return demangleSymbol(typeid(*this).name()); }\n\nrclcpp::Node::SharedPtr ISmaccClientBehavior::getNode() const\n{\n  return this->stateMachine_->getNode();\n}\n\nrclcpp::Logger ISmaccClientBehavior::getLogger() const\n{\n  auto nh = this->getNode();\n  if (nh != nullptr)\n  {\n    return nh->get_logger();\n  }\n  else\n  {\n    return rclcpp::get_logger(\"SMACC\");\n  }\n}\n\nvoid ISmaccClientBehavior::runtimeConfigure()\n{\n  RCLCPP_DEBUG(\n    getLogger(), \"[%s] Default empty SmaccClientBehavior runtimeConfigure()\",\n    this->getName().c_str());\n}\n\nvoid ISmaccClientBehavior::executeOnEntry()\n{\n  RCLCPP_DEBUG(\n    getLogger(), \"[%s] Default empty SmaccClientBehavior onEntry()\", this->getName().c_str());\n  this->onEntry();\n}\n\nvoid ISmaccClientBehavior::executeOnExit()\n{\n  RCLCPP_DEBUG(\n    getLogger(), \"[%s] Default empty SmaccClientBehavior onExit()\", this->getName().c_str());\n  this->onExit();\n}\n\nvoid ISmaccClientBehavior::dispose() {}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/smacc_component.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/component.hpp>\n#include <smacc2/impl/smacc_component_impl.hpp>\nnamespace smacc2\n{\nISmaccComponent::~ISmaccComponent() {}\n\nISmaccComponent::ISmaccComponent() : owner_(nullptr) {}\n\nvoid ISmaccComponent::initialize(ISmaccClient * owner)\n{\n  owner_ = owner;\n  this->onInitialize();\n}\n\nvoid ISmaccComponent::onInitialize() {}\n\nvoid ISmaccComponent::setStateMachine(ISmaccStateMachine * stateMachine)\n{\n  stateMachine_ = stateMachine;\n}\n\nrclcpp::Node::SharedPtr ISmaccComponent::getNode() { return owner_->getNode(); }\n\nrclcpp::Logger ISmaccComponent::getLogger() const { return owner_->getLogger(); }\n\nstd::string ISmaccComponent::getName() const\n{\n  std::string keyname = demangleSymbol(typeid(*this).name());\n  return keyname;\n}\n\nISmaccStateMachine * ISmaccComponent::getStateMachine() { return this->stateMachine_; }\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/smacc_event_generator.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc_event_generator.hpp>\n\nnamespace smacc2\n{\nSmaccEventGenerator::SmaccEventGenerator() {}\n\nSmaccEventGenerator::~SmaccEventGenerator() {}\n\nvoid SmaccEventGenerator::onEntry() {}\n\nvoid SmaccEventGenerator::onExit() {}\n\nvoid SmaccEventGenerator::initialize(smacc2::ISmaccState * ownerState)\n{\n  this->ownerState_ = ownerState;\n  this->onInitialized();\n}\n\nvoid SmaccEventGenerator::onInitialized() {}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/smacc_state.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc_state.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n\nnamespace smacc2\n{\nstd::string ISmaccState::getClassName() { return demangleSymbol(typeid(*this).name()); }\n\nvoid ISmaccState::notifyTransitionFromTransitionTypeInfo(TypeInfo::Ptr & transitionType)\n{\n  RCLCPP_INFO_STREAM(getLogger(), \"TRANSITION RULE TRIGGERED: \" << transitionType->getFullName());\n\n  //auto currstateinfo = this->getStateMachine().getCurrentStateInfo();\n  auto currstateinfo = this->stateInfo_;\n\n  if (currstateinfo != nullptr)\n  {\n    //RCLCPP_ERROR_STREAM(getLogger(),\"CURRENT STATE INFO: \" << currstateinfo->fullStateName);\n    for (auto & transition : currstateinfo->transitions_)\n    {\n      std::string transitionCandidateName = transition.transitionTypeInfo->getFullName();\n      //RCLCPP_ERROR_STREAM(getLogger(),\"candidate transition: \" << transitionCandidateName);\n\n      if (transitionType->getFullName() == transitionCandidateName)\n      {\n        this->getStateMachine().publishTransition(transition);\n        return;\n      }\n    }\n\n    // debug information if not found\n    RCLCPP_ERROR_STREAM(\n      getLogger(),\n      \"Transition happened, from current state \"\n        << currstateinfo->getDemangledFullName()\n        << \" but there is not any transitioninfo match available to publish transition: \"\n        << transitionType->getFullName());\n    std::stringstream ss;\n\n    auto stateinfo = currstateinfo;\n\n    for (auto & transition : currstateinfo->transitions_)\n    {\n      std::string transitionCandidateName = transition.transitionTypeInfo->getFullName();\n      RCLCPP_ERROR_STREAM(getLogger(), \"- candidate transition: \" << transitionCandidateName);\n    }\n\n    RCLCPP_ERROR(getLogger(), \"Ancestors candidates: \");\n\n    std::list<const SmaccStateInfo *> ancestors;\n    stateinfo->getAncestors(ancestors);\n\n    for (auto & ancestor : ancestors)\n    {\n      RCLCPP_ERROR_STREAM(getLogger(), \" * Ancestor \" << ancestor->getDemangledFullName() << \":\");\n      for (auto & transition : ancestor->transitions_)\n      {\n        std::string transitionCandidateName = transition.transitionTypeInfo->getFullName();\n        RCLCPP_ERROR_STREAM(getLogger(), \"- candidate transition: \" << transitionCandidateName);\n        if (transitionType->getFullName() == transitionCandidateName)\n        {\n          RCLCPP_ERROR(getLogger(), \"GOTCHA\");\n        }\n      }\n    }\n  }\n  else\n  {\n    RCLCPP_ERROR_STREAM(\n      getLogger(), \"Transition happened, but current state was not set. Transition candidates:\");\n  }\n}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/smacc_state_info.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/common.hpp>\n#include <smacc2/introspection/introspection.hpp>\n\nnamespace smacc2\n{\nusing namespace smacc2::introspection;\n\nstd::map<const std::type_info *, std::vector<ClientBehaviorInfoEntry>>\n  SmaccStateInfo::staticBehaviorInfo;\nstd::map<\n  const std::type_info *,\n  std::vector<std::shared_ptr<smacc2::introspection::SmaccStateReactorInfo>>>\n  SmaccStateInfo::stateReactorsInfo;\nstd::map<const std::type_info *, std::vector<std::shared_ptr<SmaccEventGeneratorInfo>>>\n  SmaccStateInfo::eventGeneratorsInfo;\n\nSmaccStateInfo::SmaccStateInfo(\n  const std::type_info * tid, std::shared_ptr<SmaccStateInfo> parentState,\n  std::shared_ptr<SmaccStateMachineInfo> stateMachineInfo)\n{\n  tid_ = tid;\n  parentState_ = parentState;\n  stateMachine_ = stateMachineInfo;\n\n  if (parentState_ != nullptr) depth_ = parentState->depth_ + 1;\n}\n\nvoid SmaccStateInfo::getAncestors(std::list<const SmaccStateInfo *> & ancestorsList) const\n{\n  ancestorsList.push_front(this);\n  if (parentState_ != nullptr)\n  {\n    this->parentState_->getAncestors(ancestorsList);\n  }\n}\n\nSmaccStateType SmaccStateInfo::getStateLevel()\n{\n  if (this->children_.size() == 0)\n  {\n    if (this->parentState_ != nullptr)\n    {\n      return SmaccStateType::SUPERSTATE_ROUTINE;\n    }\n    else\n    {\n      return SmaccStateType::STATE;\n    }\n  }\n  else\n  {\n    return SmaccStateType::SUPERSTATE;\n  }\n}\n\nrclcpp::Node::SharedPtr SmaccStateInfo::getNode() { return this->stateMachine_->getNode(); }\n\nstd::string SmaccStateInfo::getFullPath()\n{\n  if (parentState_ == nullptr)\n    return this->toShortName();\n  else\n    return this->parentState_->getFullPath() + \"/\" + this->toShortName();\n}\n\nconst std::string & SmaccStateInfo::toShortName() const { return this->demangledStateName; }\n\nstd::string SmaccStateInfo::getDemangledFullName() const\n{\n  return demangleSymbol(this->fullStateName.c_str());\n}\n//---------------------------------------------\nSmaccEventInfo::SmaccEventInfo(std::shared_ptr<TypeInfo> eventType) { this->eventType = eventType; }\n\nstd::string SmaccEventInfo::getEventSourceName()\n{\n  if (eventType->templateParameters.size() > 0)\n  {\n    auto eventsourcename = demangleSymbol(eventType->templateParameters[0]->getFullName().c_str());\n    return eventsourcename;\n  }\n  else\n  {\n    return \"\";\n  }\n}\n\nstd::string SmaccEventInfo::getEventTypeName()\n{\n  return demangleSymbol(eventType->getNonTemplatedTypeName().c_str());\n}\n\nstd::string SmaccEventInfo::getOrthogonalName()\n{\n  if (eventType->templateParameters.size() > 1)\n  {\n    return demangleSymbol(eventType->templateParameters[1]->getFullName().c_str());\n  }\n  else\n  {\n    return \"\";\n  }\n}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/smacc_state_machine.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <rcl/time.h>\n#include <chrono>\n#include <functional>\n#include <smacc2/client_bases/smacc_action_client.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n#include <smacc2/smacc_signal_detector.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n#include <smacc2_msgs/msg/smacc_status.hpp>\n#include <smacc2_msgs/msg/smacc_transition_log_entry.hpp>\n\nnamespace smacc2\n{\nusing namespace std::chrono_literals;\nusing namespace smacc2::introspection;\nISmaccStateMachine::ISmaccStateMachine(\n  std::string stateMachineName, SignalDetector * signalDetector, rclcpp::NodeOptions nodeOptions)\n: nh_(nullptr), stateSeqCounter_(0)\n{\n  // This enables loading arbitrary parameters\n  // However, best practice would be to declare parameters in the corresponding classes\n  // and provide descriptions about expected use\n  // TODO(henningkayser): remove once all parameters are declared inside the components\n  // node_options.automatically_declare_parameters_from_overrides(true);\n\n  nh_ = rclcpp::Node::make_shared(stateMachineName, nodeOptions);  //\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"Creating state machine base: \" << nh_->get_fully_qualified_name());\n\n  signalDetector_ = signalDetector;\n  signalDetector_->initialize(this);\n\n  std::string runMode;\n  if (nh_->get_parameter(\"run_mode\", runMode))\n  {\n    if (runMode == \"debug\")\n    {\n      runMode_ = SMRunMode::DEBUG;\n    }\n    else if (runMode == \"release\")\n    {\n      runMode_ = SMRunMode::RELEASE;\n    }\n    else\n    {\n      RCLCPP_ERROR(nh_->get_logger(), \"Incorrect run_mode value: %s\", runMode.c_str());\n    }\n  }\n  else\n  {\n    runMode_ = SMRunMode::DEBUG;\n  }\n}\n\nISmaccStateMachine::~ISmaccStateMachine()\n{\n  RCLCPP_INFO(nh_->get_logger(), \"Finishing State Machine\");\n}\n\nvoid ISmaccStateMachine::disconnectSmaccSignalObject(void * object_ptr)\n{\n  RCLCPP_INFO(nh_->get_logger(), \"[SmaccSignal] Object signal disconnecting %ld\", (long)object_ptr);\n  if (stateCallbackConnections.count(object_ptr) > 0)\n  {\n    auto callbackSemaphore = stateCallbackConnections[object_ptr];\n    callbackSemaphore->finalize();\n    stateCallbackConnections.erase(object_ptr);\n  }\n  else\n  {\n    RCLCPP_INFO(nh_->get_logger(), \"[SmaccSignal] No signals found %ld\", (long)object_ptr);\n  }\n}\n\nrclcpp::Node::SharedPtr ISmaccStateMachine::getNode() { return this->nh_; }\n\nvoid ISmaccStateMachine::reset() {}\n\nvoid ISmaccStateMachine::stop() {}\n\nvoid ISmaccStateMachine::eStop() {}\n\nconst std::map<std::string, std::shared_ptr<smacc2::ISmaccOrthogonal>> &\nISmaccStateMachine::getOrthogonals() const\n{\n  return this->orthogonals_;\n}\n\nvoid ISmaccStateMachine::updateStatusMessage()\n{\n  std::lock_guard<std::recursive_mutex> lock(m_mutex_);\n\n  if (currentStateInfo_ != nullptr)\n  {\n    RCLCPP_WARN_STREAM(\n      nh_->get_logger(),\n      \"[StateMachine] Setting state active: \" << currentStateInfo_->getFullPath());\n\n    if (runMode_ == SMRunMode::DEBUG)\n    {\n      status_msg_.current_states.clear();\n      std::list<const SmaccStateInfo *> ancestorList;\n      currentStateInfo_->getAncestors(ancestorList);\n\n      for (auto & ancestor : ancestorList)\n      {\n        status_msg_.current_states.push_back(ancestor->toShortName());\n      }\n\n      status_msg_.global_variable_names.clear();\n      status_msg_.global_variable_values.clear();\n\n      for (auto entry : this->globalData_)\n      {\n        status_msg_.global_variable_names.push_back(entry.first);\n        status_msg_.global_variable_values.push_back(\n          entry.second.first());  // <- invoke to_string()\n      }\n\n      status_msg_.header.stamp = this->nh_->now();\n      stateMachineStatusPub_->publish(status_msg_);\n    }\n  }\n}\n\nvoid ISmaccStateMachine::publishTransition(const SmaccTransitionInfo & transitionInfo)\n{\n  smacc2_msgs::msg::SmaccTransitionLogEntry transitionLogEntry;\n  transitionLogEntry.timestamp = this->nh_->now();\n  transitionInfoToMsg(transitionInfo, transitionLogEntry.transition);\n  this->transitionLogHistory_.push_back(transitionLogEntry);\n\n  transitionLogPub_->publish(transitionLogEntry);\n}\n\nvoid ISmaccStateMachine::onInitialize() {}\n\nvoid ISmaccStateMachine::onInitialized()\n{\n  auto ros_clock = rclcpp::Clock::make_shared();\n  timer_ =\n    rclcpp::create_timer(nh_, ros_clock, 0.5s, [=]() { this->state_machine_visualization(); });\n}\n\nvoid ISmaccStateMachine::initializeROS(std::string shortname)\n{\n  RCLCPP_WARN_STREAM(nh_->get_logger(), \"State machine base creation: \" << shortname);\n  // STATE MACHINE TOPICS\n  stateMachinePub_ = nh_->create_publisher<smacc2_msgs::msg::SmaccStateMachine>(\n    shortname + \"/smacc/state_machine_description\", rclcpp::QoS(1));\n  stateMachineStatusPub_ = nh_->create_publisher<smacc2_msgs::msg::SmaccStatus>(\n    shortname + \"/smacc/status\", rclcpp::QoS(1));\n  transitionLogPub_ = nh_->create_publisher<smacc2_msgs::msg::SmaccTransitionLogEntry>(\n    shortname + \"/smacc/transition_log\", rclcpp::QoS(1));\n\n  eventsLogPub_ = nh_->create_publisher<smacc2_msgs::msg::SmaccEvent>(\n    shortname + \"/smacc/event_log\", rclcpp::QoS(100));\n\n  // STATE MACHINE SERVICES\n  transitionHistoryService_ = nh_->create_service<smacc2_msgs::srv::SmaccGetTransitionHistory>(\n    shortname + \"/smacc/transition_log_history\",\n    std::bind(\n      &ISmaccStateMachine::getTransitionLogHistory, this, std::placeholders::_1,\n      std::placeholders::_2, std::placeholders::_3));\n\n  // Notify signal detector that ROS initialization is complete\n  // This allows the polling loop to start safely accessing ROS objects\n  signalDetector_->notifyRosInitialized();\n}\n\nvoid ISmaccStateMachine::getTransitionLogHistory(\n  const std::shared_ptr<rmw_request_id_t> /*request_header*/,\n  const std::shared_ptr<smacc2_msgs::srv::SmaccGetTransitionHistory::Request> /*req*/,\n  std::shared_ptr<smacc2_msgs::srv::SmaccGetTransitionHistory::Response> res)\n{\n  RCLCPP_WARN(\n    nh_->get_logger(), \"Requesting transition log history, current size: %ld\",\n    this->transitionLogHistory_.size());\n  res->history = this->transitionLogHistory_;\n}\n\nvoid ISmaccStateMachine::state_machine_visualization()\n{\n  std::lock_guard<std::recursive_mutex> lock(m_mutex_);\n\n  smacc2_msgs::msg::SmaccStateMachine state_machine_msg;\n  state_machine_msg.states = stateMachineInfo_->stateMsgs;\n\n  std::sort(\n    state_machine_msg.states.begin(), state_machine_msg.states.end(),\n    [](auto & a, auto & b) { return a.index < b.index; });\n  stateMachinePub_->publish(state_machine_msg);\n\n  status_msg_.header.stamp = this->nh_->now();\n  stateMachineStatusPub_->publish(status_msg_);\n}\n\nvoid ISmaccStateMachine::lockStateMachine(std::string msg)\n{\n  RCLCPP_DEBUG(nh_->get_logger(), \"-- locking SM: %s\", msg.c_str());\n  m_mutex_.lock();\n}\n\nvoid ISmaccStateMachine::unlockStateMachine(std::string msg)\n{\n  RCLCPP_DEBUG(nh_->get_logger(), \"-- unlocking SM: %s\", msg.c_str());\n  m_mutex_.unlock();\n}\n\nstd::string ISmaccStateMachine::getStateMachineName()\n{\n  return demangleSymbol(typeid(*this).name());\n}\n\nvoid ISmaccStateMachine::checkStateMachineConsistence()\n{\n  // transition from an orthogonal that doesn’t exist.\n  // transition from a source that doesn’t exist.\n\n  // std::stringstream errorbuffer;\n  // bool errorFound = false;\n\n  // for (auto &stentry : this->stateMachineInfo_->states)\n  // {\n  //     auto stinfo = stentry.second;\n\n  //     for (auto &transition : stinfo->transitions_)\n  //     {\n  //         auto evinfo = transition.eventInfo;\n  //         bool found = false;\n  //         for (auto &orthogonal : orthogonals_)\n  //         {\n  //             if (orthogonal.first == evinfo->getOrthogonalName())\n  //             {\n  //                 found = true;\n  //                 break;\n  //             }\n  //         }\n\n  //         if (!found)\n  //         {\n  //             errorbuffer << \"---------\" << std::endl\n  //                         << \"[Consistency Checking] Transition event refers not existing orthogonal.\" << std::endl\n  //                         << \"State: \" << demangleType(*stinfo->tid_) << std::endl\n  //                         << \"Transition: \" << transition.transitionTypeInfo->getFullName() << std::endl\n  //                         << \"Orthogonal: \" << evinfo->getOrthogonalName() << std::endl\n  //                         << \"---------\" << std::endl;\n\n  //             errorFound = true;\n  //         }\n  //         //std::string getEventSourceName();\n  //         //std::string getOrthogonalName();\n  //     }\n  // }\n\n  // if (errorFound)\n  // {\n  //     RCLCPP_WARN_STREAM(nh_->get_logger(),\"== STATE MACHINE CONSISTENCY CHECK: ==\" << std::endl\n  //                                                              << errorbuffer.str() << std::endl\n  //                                                              << \"=================\");\n  // }\n  // cb from a client that doesn’t exist – don’t worry about making clients dynamically.\n}\n\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/smacc_state_machine_info.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/introspection/introspection.hpp>\n#include <smacc2/smacc_state_machine.hpp>\n\nnamespace smacc2\n{\nvoid SmaccStateMachineInfo::assembleSMStructureMessage(ISmaccStateMachine * sm)\n{\n  std::stringstream ss;\n\n  ss << \"----------- PRINT STATE MACHINE STRUCTURE -------------------\" << std::endl;\n  stateMsgs.clear();\n  for (auto & val : this->states)\n  {\n    smacc2_msgs::msg::SmaccState stateMsg;\n    auto state = val.second;\n    stateMsg.index = state->stateIndex_;\n\n    ss << \"**** State: \" << demangleSymbol(val.first.c_str()) << std::endl;\n\n    stateMsg.name = state->getDemangledFullName();\n    stateMsg.level = (int)state->getStateLevel();\n\n    ss << \"Index: \" << stateMsg.index << std::endl;\n    ss << \"StateLevel: \" << stateMsg.level << std::endl;\n\n    ss << \" Childstates:\" << std::endl;\n\n    for (auto & child : state->children_)\n    {\n      auto childStateName = child->getDemangledFullName();\n      stateMsg.children_states.push_back(childStateName);\n\n      ss << \" - \" << childStateName << std::endl;\n    }\n\n    ss << \" Transitions:\" << std::endl;\n\n    for (auto & transition : state->transitions_)\n    {\n      smacc2_msgs::msg::SmaccTransition transitionMsg;\n\n      transitionInfoToMsg(transition, transitionMsg);\n\n      ss << \" - Transition.  \" << std::endl;\n      ss << \"      - Index: \" << transitionMsg.index << std::endl;\n      ss << \"      - Transition Name: \" << transitionMsg.transition_name << std::endl;\n      ss << \"      - Transition Type: \" << transitionMsg.transition_type << std::endl;\n      ss << \"      - Event Type :\" << transitionMsg.event.event_type << std::endl;\n      ss << \"      - Event Source: \" << transitionMsg.event.event_source << std::endl;\n      ss << \"      - Event ObjectTag: \" << transitionMsg.event.event_object_tag << std::endl;\n      ss << \"      - Event Label: \" << transitionMsg.event.label << std::endl;\n      ss << \"      - Destiny State: \" << transitionMsg.destiny_state_name << std::endl;\n      ss << \"      - Owner State: \" << transitionMsg.destiny_state_name << std::endl;\n      ss << \"      - Is History Node: \" << std::to_string(transitionMsg.history_node) << std::endl;\n      ss << \"      - TransitionC++Type: \" << transition.transitionTypeInfo->getFullName()\n         << std::endl;\n      ss << \"      - EventC++Type: \" << transition.eventInfo->eventType->getFullName() << std::endl;\n\n      stateMsg.transitions.push_back(transitionMsg);\n    }\n\n    const std::type_info * statetid = state->tid_;\n\n    std::map<const std::type_info *, std::vector<smacc2::ClientBehaviorInfoEntry *>>\n      smaccBehaviorInfoMappingByOrthogonalType;\n\n    ss << \" Orthogonals:\" << std::endl;\n    if (SmaccStateInfo::staticBehaviorInfo.count(statetid) > 0)\n    {\n      for (auto & bhinfo : SmaccStateInfo::staticBehaviorInfo[statetid])\n      {\n        if (smaccBehaviorInfoMappingByOrthogonalType.count(bhinfo.orthogonalType) == 0)\n        {\n          smaccBehaviorInfoMappingByOrthogonalType[bhinfo.orthogonalType] =\n            std::vector<smacc2::ClientBehaviorInfoEntry *>();\n        }\n\n        smaccBehaviorInfoMappingByOrthogonalType[bhinfo.orthogonalType].push_back(&bhinfo);\n      }\n    }\n\n    auto & runtimeOrthogonals = sm->getOrthogonals();\n\n    for (auto & orthogonal : runtimeOrthogonals)\n    {\n      smacc2_msgs::msg::SmaccOrthogonal orthogonalMsg;\n\n      const auto * orthogonaltid = &typeid(*(orthogonal.second));\n      orthogonalMsg.name = demangleSymbol(orthogonaltid->name());\n\n      ss << \" - orthogonal: \" << orthogonalMsg.name << std::endl;\n\n      if (smaccBehaviorInfoMappingByOrthogonalType[orthogonaltid].size() > 0)\n      {\n        auto & behaviors = smaccBehaviorInfoMappingByOrthogonalType[orthogonaltid];\n        for (auto & bhinfo : behaviors)\n        {\n          auto ClientBehaviorName = demangleSymbol(bhinfo->behaviorType->name());\n          orthogonalMsg.client_behavior_names.push_back(ClientBehaviorName);\n          ss << \"          - client behavior: \" << ClientBehaviorName << std::endl;\n        }\n      }\n      else\n      {\n        ss << \"          - NO CLIENT BEHAVIORS -\" << std::endl;\n      }\n\n      auto & clients = orthogonal.second->getClients();\n      if (clients.size() > 0)\n      {\n        for (auto & client : clients)\n        {\n          auto clientTid = client->getType();\n          auto clientName = clientTid->getNonTemplatedTypeName();\n          orthogonalMsg.client_names.push_back(clientName);\n          ss << \"          - client: \" << clientName << std::endl;\n        }\n      }\n      else\n      {\n        ss << \"          - NO CLIENTS - \" << std::endl;\n      }\n      stateMsg.orthogonals.push_back(orthogonalMsg);\n    }\n\n    ss << \" State event generators:\" << std::endl;\n    if (SmaccStateInfo::eventGeneratorsInfo.count(statetid) > 0)\n    {\n      int k = 0;\n      for (auto & eginfo : SmaccStateInfo::eventGeneratorsInfo[statetid])\n      {\n        smacc2_msgs::msg::SmaccEventGenerator eventGeneratorMsg;\n        eventGeneratorMsg.index = k++;\n        eventGeneratorMsg.type_name = eginfo->eventGeneratorType->getFullName();\n\n        ss << \" - event generator: \" << eventGeneratorMsg.type_name << std::endl;\n        if (eginfo->objectTagType != nullptr)\n        {\n          eventGeneratorMsg.object_tag = eginfo->objectTagType->getFullName();\n          ss << \"        - object tag: \" << eventGeneratorMsg.object_tag << std::endl;\n        }\n        stateMsg.event_generators.push_back(eventGeneratorMsg);\n      }\n    }\n\n    ss << \" State reactors:\" << std::endl;\n    if (SmaccStateInfo::stateReactorsInfo.count(statetid) > 0)\n    {\n      int k = 0;\n      for (auto & srinfo : SmaccStateInfo::stateReactorsInfo[statetid])\n      {\n        smacc2_msgs::msg::SmaccStateReactor stateReactorMsg;\n        stateReactorMsg.index = k++;\n        stateReactorMsg.type_name = srinfo->stateReactorType->getFullName();\n\n        ss << \" - state reactor: \" << stateReactorMsg.type_name << std::endl;\n        if (srinfo->objectTagType != nullptr)\n        {\n          stateReactorMsg.object_tag = srinfo->objectTagType->getFullName();\n          ss << \"        - object tag: \" << stateReactorMsg.object_tag << std::endl;\n        }\n\n        for (auto & tev : srinfo->sourceEventTypes)\n        {\n          // WE SHOULD CREATE A SMACC_EVENT_INFO TYPE, also using in typewalker transition\n          auto eventTypeName = tev->getEventTypeName();\n          smacc2_msgs::msg::SmaccEvent event;\n\n          ss << \"             - triggering event: \" << tev->getEventTypeName() << std::endl;\n          event.event_type = eventTypeName;\n\n          event.event_source = tev->getEventSourceName();\n          ss << \"                 - source type: \" << event.event_source << std::endl;\n\n          event.event_object_tag = tev->getOrthogonalName();\n          ss << \"                 - source object: \" << event.event_object_tag << std::endl;\n\n          event.label = tev->label;\n          ss << \"                 - event label: \" << event.label << std::endl;\n\n          stateReactorMsg.event_sources.push_back(event);\n        }\n\n        stateMsg.state_reactors.push_back(stateReactorMsg);\n      }\n    }\n    else\n    {\n      ss << \"- NO STATE REACTORS - \" << std::endl;\n    }\n\n    ss << \"----------------------------------------------------------\" << std::endl;\n\n    auto resumeMsg = ss.str();\n    RCLCPP_DEBUG(getLogger(), \"%s\", resumeMsg.c_str());\n    stateMsgs.push_back(stateMsg);\n  }\n}\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/smacc_tracing.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc_tracing/smacc_tracing.hpp>\n\n#ifdef TRACETOOLS_LTTNG_ENABLED\n#include <smacc2/smacc_tracing/trace_provider.hpp>\n#define CONDITIONAL_TP(...) tracepoint(TRACETOOLS_TRACEPOINT_PROVIDER, __VA_ARGS__)\n#else\n#define CONDITIONAL_TP(...)\n#endif\n\nvoid ros_trace_spinOnce() { CONDITIONAL_TP(spinOnce); }\n\nvoid ros_trace_smacc2_event(const char * event_type) { CONDITIONAL_TP(smacc2_event, event_type); }\n\nvoid ros_trace_smacc2_state_update_start(const char * updatable_element_name)\n{\n  CONDITIONAL_TP(smacc2_state_update_start, updatable_element_name);\n}\n\nvoid ros_trace_smacc2_state_update_end(const char * updatable_element_name)\n{\n  CONDITIONAL_TP(smacc2_state_update_end, updatable_element_name);\n}\n\nvoid ros_trace_smacc2_state_onRuntimeConfigure_start(const char * state_name)\n{\n  CONDITIONAL_TP(smacc2_state_onRuntimeConfigure_start, state_name);\n}\n\nvoid ros_trace_smacc2_state_onRuntimeConfigure_end(const char * state_name)\n{\n  CONDITIONAL_TP(smacc2_state_onRuntimeConfigure_end, state_name);\n}\n\nvoid ros_trace_smacc2_state_onEntry_start(const char * state_name)\n{\n  CONDITIONAL_TP(smacc2_state_onEntry_start, state_name);\n}\n\nvoid ros_trace_smacc2_state_onEntry_end(const char * state_name)\n{\n  CONDITIONAL_TP(smacc2_state_onEntry_end, state_name);\n}\n\nvoid ros_trace_smacc2_state_onExit_start(const char * state_name)\n{\n  CONDITIONAL_TP(smacc2_state_onExit_start, state_name);\n}\n\nvoid ros_trace_smacc2_state_onExit_end(const char * state_name)\n{\n  CONDITIONAL_TP(smacc2_state_onExit_end, state_name);\n}\n\nvoid ros_trace_smacc2_client_behavior_on_entry_start(\n  const char * state_name, const char * orthogonal_name, const char * client_behavior_name)\n{\n  CONDITIONAL_TP(\n    smacc2_client_behavior_on_entry_start, state_name, orthogonal_name, client_behavior_name);\n}\n\nvoid ros_trace_smacc2_client_behavior_on_entry_end(\n  const char * state_name, const char * orthogonal_name, const char * client_behavior_name)\n{\n  CONDITIONAL_TP(\n    smacc2_client_behavior_on_entry_end, state_name, orthogonal_name, client_behavior_name);\n}\n\nvoid ros_trace_smacc2_client_behavior_on_exit_start(\n  const char * state_name, const char * orthogonal_name, const char * client_behavior_name)\n{\n  CONDITIONAL_TP(\n    smacc2_client_behavior_on_exit_start, state_name, orthogonal_name, client_behavior_name);\n}\n\nvoid ros_trace_smacc2_client_behavior_on_exit_end(\n  const char * state_name, const char * orthogonal_name, const char * client_behavior_name)\n{\n  CONDITIONAL_TP(\n    smacc2_client_behavior_on_exit_end, state_name, orthogonal_name, client_behavior_name);\n}\n"
  },
  {
    "path": "smacc2/src/smacc2/smacc_updatable.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc_updatable.hpp>\n\nnamespace smacc2\n{\nISmaccUpdatable::ISmaccUpdatable() {}\n\nISmaccUpdatable::ISmaccUpdatable(rclcpp::Duration duration) : periodDuration_(duration) {}\n\nvoid ISmaccUpdatable::setUpdatePeriod(rclcpp::Duration duration) { periodDuration_ = duration; }\n\nvoid ISmaccUpdatable::executeUpdate(rclcpp::Node::SharedPtr node)\n{\n  bool triggerUpdateMethod = true;\n  if (periodDuration_)\n  {\n    auto now = node->get_clock()->now();\n\n    if (!lastUpdate_)\n    {\n      lastUpdate_ = now;\n    }\n\n    auto elapsed = now - *lastUpdate_;\n    triggerUpdateMethod = elapsed > *periodDuration_;\n    if (triggerUpdateMethod)\n    {\n      this->lastUpdate_ = now;\n    }\n  }\n\n  if (triggerUpdateMethod)\n  {\n    this->update();\n  }\n}\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/state_reactor.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <memory>\n\n#include <smacc2/smacc_state.hpp>\n#include <smacc2/smacc_state_reactor.hpp>\n#include \"rclcpp/rclcpp.hpp\"\n\nnamespace smacc2\n{\nStateReactor::StateReactor() {}\n\nStateReactor::~StateReactor() {}\n\nvoid StateReactor::initialize(smacc2::ISmaccState * ownerState)\n{\n  this->ownerState = ownerState;\n  this->onInitialized();\n}\n\nvoid StateReactor::onInitialized() {}\n\nvoid StateReactor::onEventNotified(const std::type_info * /*eventType*/) {}\n\nvoid StateReactor::onEntry() {}\n\nvoid StateReactor::onExit() {}\n\nvoid StateReactor::update()\n{\n  if (this->triggers())\n  {\n    RCLCPP_INFO(getLogger(), \"State reactor base REALLY TRIGGERS!!\");\n    this->postEventFn();\n  }\n}\n\nrclcpp::Node::SharedPtr & StateReactor::getNode() { return ownerState->getNode(); }\n\nrclcpp::Logger StateReactor::getLogger() { return ownerState->getLogger(); }\n\nnamespace introspection\n{\nvoid StateReactorHandler::configureStateReactor(std::shared_ptr<smacc2::StateReactor> sb)\n{\n  for (auto callback : this->callbacks_)\n  {\n    callback.fn(sb);\n  }\n}\n\nvoid EventGeneratorHandler::configureEventGenerator(std::shared_ptr<smacc2::SmaccEventGenerator> eg)\n{\n  for (auto callback : this->callbacks_)\n  {\n    callback.fn(eg);\n  }\n}\n}  // namespace introspection\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2/src/smacc2/trace_provider.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#define TRACEPOINT_CREATE_PROBES\n#define TRACEPOINT_DEFINE\n\n#include <smacc2/smacc_tracing/trace_provider.hpp>\n"
  },
  {
    "path": "smacc2_client_library/CLAUDE.md",
    "content": "\r\n//////////////////////////////////////////////////////////////////////////////\r\n\r\n# Code style guidelines\r\n\r\n### Naming Conventions\r\n\r\n- **Packages:** `snake_case` (e.g., `cl_nav2z`)\r\n- **Classes:** `PascalCase` with prefixes:\r\n  - Clients: `Cl` prefix (e.g., `ClNav2Z`)\r\n  - Client Behaviors: `Cb` prefix (e.g., `CbNavigateForward`)  \r\n  - Components: `Cp` prefix (e.g., `CpOdomTracker`)\r\n- **Namespaces:** Match package name (e.g., `cl_nav2z`)\r\n- **Events:** `Ev` prefix (e.g., `EvNavigationSuccess`)\r\n\r\n\r\n### Code Organization\r\n\r\n```\r\ncl_example/\r\n├── include/cl_example/\r\n│   ├── cl_example.hpp              # Main client\r\n│   ├── client_behaviors.hpp          # Behavior includes (optional)\r\n│   ├── client_behaviors/\r\n│   │   ├── cb_behavior_1.hpp\r\n│   │   └── cb_behavior_2.hpp\r\n│   └── components/\r\n│       ├── cp_component_1.hpp\r\n│       └── cp_component_2.hpp\r\n├── src/cl_example/\r\n│   ├── cl_example.cpp\r\n│   ├── client_behaviors/\r\n│   │   ├── cb_behavior_1.cpp\r\n│   │   └── cb_behavior_2.cpp\r\n│   └── components/\r\n│       ├── cp_component_1.cpp\r\n│       └── cp_component_2.cpp\r\n├── CMakeLists.txt\r\n├── package.xml\r\n└── README.md\r\n```\r\n\r\n\r\n//////////////////////////////////////////////////////////////////////////////\r\n\r\n# Client Library Binary representation\r\nso, header files, cpp, state machine.\r\n \r\n - A client library is a ros package that generates a library (.so file)\r\n - .so files cannot be executed directly, they are just linked to other executables and loaded at runtime (startup)\r\n - The .so file could be a combination of one or multiple cpp files compiled together (but there is no main function in the cpp files)\r\n - The code body of the clients, components and client behaviors such as onEntry or onExit are compiled into the .so file\r\n - The onEntry and onExit function code body is not shown in the header file, we only see the declaration (ended in ;)\r\n - The binary implementation of a function depends on which cpp the body of the function is defined. \r\n - If the body of the function is defined in the header file, it will be compiled into the cpp that includes the header file, not in the .so file.\r\n - We could generate the .so file with one single cpp file that includes all the cpp files of the package. However, the key point is not how many cpp files we have but where the body of the functions are defined. If they are defined in the header file, they will be compiled into the executable that includes the header file, not in the .so file.\r\n - If we define the body of the functions in the hpp files, the body of the functions will be compiled both in the .so file and in the executable that includes the header file. This is not a problem because the linker will take care of it. However, it increases the compilation time because every time we change a header file, all the cpp files that include the header file need to be recompiled.\r\n\r\n\r\n//////////////////////////////////////////////////////////////////////////////\r\n\r\n# Overview\r\n\r\nThe SMACC2 Client Library provides modular, reusable clients for robot behaviors within the SMACC2 state machine framework. Each client encapsulates specific functionality and can be used across different state machines. The preferred style for clients is a **pure component-based architecture** where clients act as orchestrators that compose reusable components.\r\n\r\n### Current Clients\r\n\r\n| Client | Purpose | Core Components |\r\n|--------|---------|-----------------|\r\n| `cl_nav2z` | Navigation with Nav2 | CpActionClient, CpNav2ActionInterface |\r\n| `cl_moveit2z` | Manipulation with MoveIt2 | CpMoveItInterface |\r\n| `cl_keyboard` | Keyboard input handling | CpTopicSubscriber, CpKeyboardListener1 |\r\n| `cl_ros2_timer` | Timer-based behaviors | CpRos2Timer, CpTimerListener1 |\r\n| `cl_http` | HTTP requests | CpHttpConnectionManager, CpHttpRequestExecutor |\r\n| `cl_lifecycle_node` | ROS2 lifecycle management | CpLifecycleEventMonitor |\r\n| `cl_generic_sensor` | Generic sensor input | CpTopicSubscriber, CpMessageTimeout |\r\n\r\n## Architecture Patterns\r\n\r\n### Core Components\r\n\r\nEvery SMACC2 client follows an architecture with 3 object types:\r\n\r\n1. **Client Objects** \r\n   - Usually, a Client is an entity that is a counterpart of a remote node, in a form of client server relationship. But this is not always the case.\r\n\r\n2. **Client Behavior Objects**\r\n   - Implements specific actions/behaviors\r\n\r\n3. **Component Objects**\r\n   - Provides reusable functionality\r\n   - Manages internal state and data\r\n   - Offers utility services\r\n\r\n\r\n//////////////////////////////////////////////////////////////////////////////\r\n\r\n# Pure Component-Based Architecture\r\n\r\nAll SMACC2 clients follow a **pure orchestrator pattern**:\r\n\r\n1. **Clients are orchestrators only** - They create and configure components but implement no business logic\r\n2. **Components implement functionality** - All actual functionality lives in reusable components\r\n3. **Behaviors consume components** - Behaviors access components via `requiresComponent()`\r\n\r\n\r\n### Inheritance Hierarchy\r\n\r\n```cpp\r\n// Client: Pure orchestrator - creates components only\r\nclass ClExample : public smacc2::ISmaccClient\r\n\r\n// Component: Implements actual functionality\r\nclass CpExample : public smacc2::ISmaccComponent\r\n\r\n// Synchronous behavior: Accesses components via requiresComponent()\r\nclass CbSyncBehavior : public smacc2::SmaccClientBehavior\r\n\r\n// Asynchronous behavior: For long-running operations\r\nclass CbAsyncBehavior : public smacc2::SmaccAsyncClientBehavior\r\n```\r\n\r\n\r\n### Key Template Methods\r\n\r\n| Method | Called When | Purpose |\r\n|--------|-------------|---------|\r\n| `onComponentInitialization<TOrthogonal, TClient>()` | Orthogonal init | Create components with type context |\r\n| `onStateOrthogonalAllocation<TOrthogonal, TSourceObject>()` | State entry | Set up event posting lambdas |\r\n| `onInitialize()` | Component creation | Component setup, require dependencies |\r\n| `onEntry()` / `onExit()` | State transitions | Behavior execution lifecycle |\r\n\r\n\r\n//////////////////////////////////////////////////////////////////////////////\r\n\r\n# Framework Core Components\r\n\r\nLocated in `smacc2/include/smacc2/client_core_components/`\r\n\r\n### CpActionClient<ActionType>\r\nGeneric ROS2 action client with signals for result handling.\r\n- **Signals:** `onActionSucceeded_`, `onActionAborted_`, `onActionCancelled_`, `onActionFeedback_`\r\n- **Methods:** `sendGoal()`, `cancelGoal()`, `waitForServer()`\r\n- [cp_action_client.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2/include/smacc2/client_core_components/cp_action_client.hpp)\r\n- `src/SMACC2/smacc2/include/smacc2/client_core_components/cp_action_client.hpp`\r\n\r\n### CpTopicSubscriber<MessageType>\r\nGeneric ROS2 topic subscription with event posting.\r\n- **Signals:** `onFirstMessageReceived_`, `onMessageReceived_`\r\n- **Events:** `EvTopicMessage`, `EvTopicInitialMessage`\r\n- [cp_topic_subscriber.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2/include/smacc2/client_core_components/cp_topic_subscriber.hpp)\r\n- `src/SMACC2/smacc2/include/smacc2/client_core_components/cp_topic_subscriber.hpp`\r\n\r\n### CpTopicPublisher<MessageType>\r\nGeneric ROS2 topic publisher with QoS configuration.\r\n- **Methods:** `publish(const MessageType & msg)`\r\n- [cp_topic_publisher.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2/include/smacc2/client_core_components/cp_topic_publisher.hpp)\r\n- `src/SMACC2/smacc2/include/smacc2/client_core_components/cp_topic_publisher.hpp`\r\n\r\n### CpServiceClient<ServiceType>\r\nGeneric ROS2 service client with async/sync support.\r\n- **Signals:** `onServiceResponse_`, `onServiceFailure_`\r\n- **Methods:** `sendRequest()`, `sendRequestSync()`\r\n- [cp_service_client.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2/include/smacc2/client_core_components/cp_service_client.hpp)\r\n- `src/SMACC2/smacc2/include/smacc2/client_core_components/cp_service_client.hpp`\r\n\r\n### CpRos2Timer\r\nTimer component for periodic or one-shot execution.\r\n- **Signal:** `onTimerTick_`\r\n- **Methods:** `startTimer()`, `stopTimer()`\r\n- [cp_ros2_timer.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2/include/smacc2/client_core_components/cp_ros2_timer.hpp)\r\n- `src/SMACC2/smacc2/include/smacc2/client_core_components/cp_ros2_timer.hpp`\r\n\r\n\r\n//////////////////////////////////////////////////////////////////////////////\r\n\r\n# Client Packages Reference\r\n\r\n| Client | Purpose | Main Header |\r\n|--------|---------|-------------|\r\n| cl_nav2z | Navigation with Nav2 | [cl_nav2z.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/cl_nav2z.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/cl_nav2z.hpp` |\r\n| cl_moveit2z | Manipulation with MoveIt2 | [cl_moveit2z.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/cl_moveit2z.hpp) / `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/cl_moveit2z.hpp` |\r\n| cl_keyboard | Keyboard input handling | [cl_keyboard.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_keyboard/include/cl_keyboard/cl_keyboard.hpp) / `src/SMACC2/smacc2_client_library/cl_keyboard/include/cl_keyboard/cl_keyboard.hpp` |\r\n| cl_ros2_timer | Timer-based behaviors | [cl_ros_timer.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/cl_ros_timer.hpp) / `src/SMACC2/smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/cl_ros_timer.hpp` |\r\n| cl_http | HTTP requests | [cl_http_client.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_http/include/cl_http/cl_http_client.hpp) / `src/SMACC2/smacc2_client_library/cl_http/include/cl_http/cl_http_client.hpp` |\r\n| cl_lifecycle_node | ROS2 lifecycle management | [cl_lifecycle_node.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/cl_lifecycle_node.hpp) / `src/SMACC2/smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/cl_lifecycle_node.hpp` |\r\n| cl_mission_tracker | Mission state management | [cl_mission_tracker.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_mission_tracker/include/cl_mission_tracker/cl_mission_tracker.hpp) / `src/SMACC2/smacc2_client_library/cl_mission_tracker/include/cl_mission_tracker/cl_mission_tracker.hpp` |\r\n| cl_isaac_apriltag | AprilTag detection | [cl_isaac_apriltag.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/cl_isaac_apriltag.hpp) / `src/SMACC2/smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/cl_isaac_apriltag.hpp` |\r\n| cl_foundation_pose | Object pose tracking | [cl_foundation_pose.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/cl_foundation_pose.hpp) / `src/SMACC2/smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/cl_foundation_pose.hpp` |\r\n\r\n\r\n\r\n//////////////////////////////////////////////////////////////////////////////\r\n\r\n# Client Behavior Patterns\r\n\r\nBehaviors access components via `requiresComponent()` and connect to component signals.\r\n   \r\n## 1. Action-Based Behaviors\r\n\r\n**Purpose:** Long-running, goal-oriented operations with feedback (navigation, manipulation).\r\n\r\n**Base Class:** `SmaccAsyncClientBehavior`\r\n\r\n**Key Characteristics:**\r\n- Inherits from `SmaccAsyncClientBehavior` for non-blocking execution\r\n- Connects to action client signals (`onSucceeded_`, `onAborted_`)\r\n- Posts `EvCbSuccess` / `EvCbFailure` events on completion\r\n\r\n**Best Reference:**\r\n- [cb_navigate_global_position.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_global_position.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_global_position.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Behavior | Description | Links |\r\n|----------|-------------|-------|\r\n| cb_navigate_forward | Forward navigation to goal | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_forward.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_forward.hpp` |\r\n| cb_navigate_backwards | Backward navigation | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_backwards.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_backwards.hpp` |\r\n| cb_navigate_named_waypoint | Navigate to predefined waypoint | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_named_waypoint.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_named_waypoint.hpp` |\r\n| cb_navigate_next_waypoint | Sequential waypoint navigation | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_next_waypoint.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_next_waypoint.hpp` |\r\n| cb_abort_navigation | Cancel active navigation | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_abort_navigation.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_abort_navigation.hpp` |\r\n| cb_move_end_effector | Move arm end-effector to pose | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_move_end_effector.hpp) / `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_move_end_effector.hpp` |\r\n| cb_move_joints | Direct joint control | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_move_joints.hpp) / `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_move_joints.hpp` |\r\n| cb_move_known_state | Move to predefined configuration | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_move_known_state.hpp) / `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_move_known_state.hpp` |\r\n| cb_move_cartesian_relative2 | Relative Cartesian movement | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_move_cartesian_relative2.hpp) / `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_move_cartesian_relative2.hpp` |\r\n\r\n---\r\n\r\n## 2. Event-Driven Behaviors\r\n\r\n**Purpose:** React to external stimuli (keyboard input, timer ticks, sensor messages).\r\n\r\n**Base Class:** `SmaccClientBehavior` or `SmaccAsyncClientBehavior`\r\n\r\n**Key Characteristics:**\r\n- Uses `onStateOrthogonalAllocation<TOrthogonal, TSourceObject>()` for type-safe event posting\r\n- Connects to component signals in `onEntry()`\r\n- Event posting via stored lambda functions\r\n\r\n**Best Reference:**\r\n- [cb_default_keyboard_behavior.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_keyboard/include/cl_keyboard/client_behaviors/cb_default_keyboard_behavior.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_keyboard/include/cl_keyboard/client_behaviors/cb_default_keyboard_behavior.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Behavior | Description | Links |\r\n|----------|-------------|-------|\r\n| cb_timer_countdown_once | Single timer expiration | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp) / `src/SMACC2/smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp` |\r\n| cb_timer_countdown_loop | Recurring timer events | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/client_behaviors/cb_timer_countdown_loop.hpp) / `src/SMACC2/smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/client_behaviors/cb_timer_countdown_loop.hpp` |\r\n| cb_ros2_timer | Generic timer behavior | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/client_behaviors/cb_ros2_timer.hpp) / `src/SMACC2/smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/client_behaviors/cb_ros2_timer.hpp` |\r\n| cb_detect_apriltag | AprilTag detection events | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/client_behaviors/cb_detect_apriltag.hpp) / `src/SMACC2/smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/client_behaviors/cb_detect_apriltag.hpp` |\r\n\r\n---\r\n\r\n## 3. Continuous Update Behaviors\r\n\r\n**Purpose:** Persistent monitoring, tracking, or periodic calculations during state execution.\r\n\r\n**Base Class:** `SmaccClientBehavior` + `ISmaccUpdatable` (multiple inheritance)\r\n\r\n**Key Characteristics:**\r\n- Inherits from both `SmaccClientBehavior` and `ISmaccUpdatable`\r\n- Implements `update()` method called at ~20Hz by SignalDetector\r\n- Enable/disable tracking in `onEntry()` / `onExit()`\r\n\r\n**Best Reference:**\r\n- [cb_track_object_pose.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/client_behaviors/cb_track_object_pose.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/client_behaviors/cb_track_object_pose.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Behavior | Description | Links |\r\n|----------|-------------|-------|\r\n| cb_track_path_odometry | Odometry-based path tracking | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_track_path_odometry.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_track_path_odometry.hpp` |\r\n| cb_track_path_slam | SLAM-based path tracking | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_track_path_slam.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_track_path_slam.hpp` |\r\n| cb_position_control_free_space | Continuous position control | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_position_control_free_space.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_position_control_free_space.hpp` |\r\n| cb_battery_decission | Battery monitoring for mission control | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_mission_tracker/include/cl_mission_tracker/client_behaviors/cb_battery_decission.hpp) / `src/SMACC2/smacc2_client_library/cl_mission_tracker/include/cl_mission_tracker/client_behaviors/cb_battery_decission.hpp` |\r\n\r\n---\r\n\r\n## 4. Configuration/Lifecycle Behaviors\r\n\r\n**Purpose:** System state management, ROS2 lifecycle transitions, waiting for readiness.\r\n\r\n**Base Class:** `SmaccAsyncClientBehavior`\r\n\r\n**Key Characteristics:**\r\n- Connects to lifecycle transition signals\r\n- Posts success/failure events on transition completion\r\n- Often used in initialization states\r\n\r\n**Best Reference:**\r\n- [cb_activate.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_activate.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_activate.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Behavior | Description | Links |\r\n|----------|-------------|-------|\r\n| cb_configure | Configure lifecycle node | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_configure.hpp) / `src/SMACC2/smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_configure.hpp` |\r\n| cb_deactivate | Deactivate lifecycle node | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_deactivate.hpp) / `src/SMACC2/smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_deactivate.hpp` |\r\n| cb_cleanup | Cleanup lifecycle node | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_cleanup.hpp) / `src/SMACC2/smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_cleanup.hpp` |\r\n| cb_pause_slam | Pause SLAM operations | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_pause_slam.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_pause_slam.hpp` |\r\n| cb_resume_slam | Resume SLAM operations | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_resume_slam.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_resume_slam.hpp` |\r\n| cb_wait_nav2_nodes | Wait for Nav2 system readiness | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_wait_nav2_nodes.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_wait_nav2_nodes.hpp` |\r\n| cb_wait_pose | Wait for pose availability | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_wait_pose.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_wait_pose.hpp` |\r\n| cb_wait_transform | Wait for TF transforms | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_wait_transform.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_wait_transform.hpp` |\r\n\r\n---\r\n\r\n## 5. Motion Control Behaviors\r\n\r\n**Purpose:** Direct robot movement control (rotation, spinning, specialized motion patterns).\r\n\r\n**Base Class:** `SmaccAsyncClientBehavior` or client-specific base (e.g., `CbNav2ZClientBehaviorBase`)\r\n\r\n**Key Characteristics:**\r\n- Motion parameters as member variables (angles, distances, speeds)\r\n- Optional planner/controller selection via `std::optional<>`\r\n- TF buffer access for coordinate calculations\r\n\r\n**Best Reference:**\r\n- [cb_rotate.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_rotate.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_rotate.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Behavior | Description | Links |\r\n|----------|-------------|-------|\r\n| cb_absolute_rotate | Rotate to absolute heading | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_absolute_rotate.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_absolute_rotate.hpp` |\r\n| cb_rotate_look_at | Rotate to face target | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_rotate_look_at.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_rotate_look_at.hpp` |\r\n| cb_pure_spinning | Continuous spinning motion | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_pure_spinning.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_pure_spinning.hpp` |\r\n| cb_spiral_motion | Spiral search patterns | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_spiral_motion.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_spiral_motion.hpp` |\r\n| cb_undo_path_backwards | Reverse path following | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_undo_path_backwards.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_undo_path_backwards.hpp` |\r\n| cb_active_stop | Emergency stop behavior | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_active_stop.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_active_stop.hpp` |\r\n| cb_end_effector_rotate | End-effector rotation | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_end_effector_rotate.hpp) / `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_end_effector_rotate.hpp` |\r\n| cb_circular_pivot_motion | Circular motion patterns | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_circular_pivot_motion.hpp) / `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_circular_pivot_motion.hpp` |\r\n\r\n---\r\n\r\n## 6. Communication Behaviors\r\n\r\n**Purpose:** Data exchange via HTTP, object manipulation in planning scenes.\r\n\r\n**Base Class:** `SmaccAsyncClientBehavior`\r\n\r\n**Key Characteristics:**\r\n- Deferred operation lambdas for template-safe execution\r\n- Response callback virtual methods\r\n- Request method configuration\r\n\r\n**Best Reference:**\r\n- [cb_http_get_request.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_http/include/cl_http/client_behaviors/cb_http_get_request.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_http/include/cl_http/client_behaviors/cb_http_get_request.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Behavior | Description | Links |\r\n|----------|-------------|-------|\r\n| cb_http_post_request | HTTP POST operations | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_http/include/cl_http/client_behaviors/cb_http_post_request.hpp) / `src/SMACC2/smacc2_client_library/cl_http/include/cl_http/client_behaviors/cb_http_post_request.hpp` |\r\n| cb_http_request | Generic HTTP request base | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_http/include/cl_http/client_behaviors/cb_http_request.hpp) / `src/SMACC2/smacc2_client_library/cl_http/include/cl_http/client_behaviors/cb_http_request.hpp` |\r\n| cb_attach_object | Attach objects in planning scene | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_attach_object.hpp) / `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_attach_object.hpp` |\r\n| cb_detach_object | Detach objects from planning scene | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_detach_object.hpp) / `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_detach_object.hpp` |\r\n\r\n---\r\n\r\n## 7. Utility/Helper Behaviors\r\n\r\n**Purpose:** Support functions, file loading, waypoint management, retry logic.\r\n\r\n**Base Class:** `SmaccClientBehavior` or `SmaccAsyncClientBehavior`\r\n\r\n**Key Characteristics:**\r\n- Minimal state, often just configuration parameters\r\n- Simple `onEntry()` operations\r\n- Building blocks for complex behaviors\r\n\r\n**Best Reference:**\r\n- [cb_load_waypoints_file.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_load_waypoints_file.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_load_waypoints_file.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Behavior | Description | Links |\r\n|----------|-------------|-------|\r\n| cb_seek_waypoint | Search for specific waypoints | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_seek_waypoint.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_seek_waypoint.hpp` |\r\n| cb_retry_behavior | Retry failed operations | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_retry_behavior.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_retry_behavior.hpp` |\r\n| cb_undo_last_trajectory | Reverse previous motion | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_undo_last_trajectory.hpp) / `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_undo_last_trajectory.hpp` |\r\n| cb_save_slam_map | Save current SLAM map | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_save_slam_map.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/client_behaviors/cb_save_slam_map.hpp` |\r\n| cb_pause_object_tracking | Pause tracking operations | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/client_behaviors/cb_pause_object_tracking.hpp) / `src/SMACC2/smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/client_behaviors/cb_pause_object_tracking.hpp` |\r\n\r\n\r\n//////////////////////////////////////////////////////////////////////////////\r\n\r\n# Component Patterns\r\n\r\n## 1. Action Interface Components\r\n\r\n**Purpose:** Wrap generic action clients with domain-specific interfaces.\r\n\r\n**Key Characteristics:**\r\n- Creates domain-specific signals from generic action client\r\n- Provides high-level methods (e.g., `sendNavigationGoal()`)\r\n- Uses `requiresComponent()` to access underlying `CpActionClient`\r\n\r\n**Best Reference:**\r\n- [cp_nav2_action_interface.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/nav2_action_interface/cp_nav2_action_interface.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/nav2_action_interface/cp_nav2_action_interface.hpp`\r\n\r\n---\r\n\r\n## 2. Event Listener Components\r\n\r\n**Purpose:** Connect to ROS topics/timers and emit signals for event posting.\r\n\r\n**Key Characteristics:**\r\n- Uses `onStateOrthogonalAllocation()` to set up event posting lambdas\r\n- Connects to `CpTopicSubscriber` or `CpRos2Timer` in `onInitialize()`\r\n- Emits signals that behaviors connect to\r\n\r\n**Best Reference:**\r\n- [cp_keyboard_listener_1.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_keyboard/include/cl_keyboard/components/cp_keyboard_listener_1.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_keyboard/include/cl_keyboard/components/cp_keyboard_listener_1.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Component | Description | Links |\r\n|-----------|-------------|-------|\r\n| cp_timer_listener_1 | Timer tick event generator | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/components/cp_timer_listener_1.hpp) / `src/SMACC2/smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/components/cp_timer_listener_1.hpp` |\r\n| cp_lifecycle_event_monitor | Lifecycle transition event monitoring | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/components/cp_lifecycle_event_monitor.hpp) / `src/SMACC2/smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/components/cp_lifecycle_event_monitor.hpp` |\r\n\r\n---\r\n\r\n## 3. State Tracking Components\r\n\r\n**Purpose:** Maintain internal state and provide state query interfaces.\r\n\r\n**Key Characteristics:**\r\n- Uses `enum class` for type-safe state representation\r\n- Inline getter methods for state access\r\n- Dedicated methods for state transitions\r\n\r\n**Best Reference:**\r\n- [cp_slam_toolbox.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/slam_toolbox/cp_slam_toolbox.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/slam_toolbox/cp_slam_toolbox.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Component | Description | Links |\r\n|-----------|-------------|-------|\r\n| cp_grasping_objects | Grasping object state and collision management | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_grasping_objects.hpp) / `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_grasping_objects.hpp` |\r\n| cp_apriltag_mission_state | AprilTag mission state management | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/components/cp_apriltag_mission_state.hpp) / `src/SMACC2/smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/components/cp_apriltag_mission_state.hpp` |\r\n| cp_decision_manager | Decision counter and state management | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_mission_tracker/include/cl_mission_tracker/components/cp_decision_manager.hpp) / `src/SMACC2/smacc2_client_library/cl_mission_tracker/include/cl_mission_tracker/components/cp_decision_manager.hpp` |\r\n\r\n---\r\n\r\n## 4. Configuration Management Components\r\n\r\n**Purpose:** Runtime parameter switching and configuration publishing.\r\n\r\n**Key Characteristics:**\r\n- Publisher-based configuration broadcasting\r\n- Preset configuration methods (e.g., `setBackwardPlanner()`)\r\n- Deferred execution via `commit` parameter\r\n\r\n**Best Reference:**\r\n- [cp_planner_switcher.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/planner_switcher/cp_planner_switcher.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/planner_switcher/cp_planner_switcher.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Component | Description | Links |\r\n|-----------|-------------|-------|\r\n| cp_goal_checker_switcher | Goal checker algorithm selection | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.hpp` |\r\n| cp_costmap_switch | Costmap layer enable/disable | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/costmap_switch/cp_costmap_switch.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/costmap_switch/cp_costmap_switch.hpp` |\r\n\r\n---\r\n\r\n## 5. Data Buffer Components\r\n\r\n**Purpose:** Store and retrieve sequential or historical data.\r\n\r\n**Key Characteristics:**\r\n- Vector-based storage with metadata structs\r\n- Stack-like push/pop semantics\r\n- Thread-safe operations with `std::mutex`\r\n- Index-based retrieval with bounds checking\r\n\r\n**Best Reference:**\r\n- [cp_odom_tracker.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Component | Description | Links |\r\n|-----------|-------------|-------|\r\n| cp_trajectory_history | Trajectory execution history | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_trajectory_history.hpp) / `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_trajectory_history.hpp` |\r\n\r\n---\r\n\r\n## 6. Transform Management Components\r\n\r\n**Purpose:** Handle spatial coordinate systems and pose tracking.\r\n\r\n**Key Characteristics:**\r\n- Static resource sharing for expensive TF resources\r\n- `ISmaccUpdatable` for real-time pose updates\r\n- Thread-safe access with mutex protection\r\n- `std::optional<>` returns for potentially failing operations\r\n\r\n**Best Reference:**\r\n- [cp_pose.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/pose/cp_pose.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/pose/cp_pose.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Component | Description | Links |\r\n|-----------|-------------|-------|\r\n| cp_tf_listener | Transform listener wrapper | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_tf_listener.hpp) / `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_tf_listener.hpp` |\r\n| cp_object_tracker_tf | TF-based object pose tracking | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/components/cp_object_tracker_tf.hpp) / `src/SMACC2/smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/components/cp_object_tracker_tf.hpp` |\r\n| cp_object_tracker_1 | Vision-based object detection tracking | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/components/cp_object_tracker_1.hpp) / `src/SMACC2/smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/components/cp_object_tracker_1.hpp` |\r\n\r\n---\r\n\r\n## 7. Waypoint/Mission Control Components\r\n\r\n**Purpose:** Orchestrate multi-waypoint mission execution.\r\n\r\n**Key Characteristics:**\r\n- Abstract base class with template method pattern\r\n- Signal-based event coordination for waypoint completion\r\n- Waypoint list management with rewind capability\r\n\r\n**Best Reference:**\r\n- [cp_waypoints_navigator.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Component | Description | Links |\r\n|-----------|-------------|-------|\r\n| cp_waypoints_navigator_base | Abstract waypoint navigation foundation | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator_base.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator_base.hpp` |\r\n| cp_waypoints_event_dispatcher | Waypoint navigation event coordination | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/waypoints_navigator/cp_waypoints_event_dispatcher.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/waypoints_navigator/cp_waypoints_event_dispatcher.hpp` |\r\n| cp_waypoints_visualizer | Waypoint visualization | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/waypoints_navigator/cp_waypoints_visualizer.hpp) / `src/SMACC2/smacc2_client_library/cl_nav2z/include/cl_nav2z/components/waypoints_navigator/cp_waypoints_visualizer.hpp` |\r\n\r\n---\r\n\r\n## 8. HTTP/Protocol Components\r\n\r\n**Purpose:** Manage HTTP connections, sessions, and request execution.\r\n\r\n**Key Characteristics:**\r\n- Separation of concerns: connection, session, execution\r\n- Component dependencies via `setDependencies()`\r\n- Async request execution with result signals\r\n\r\n**Best Reference:**\r\n- [cp_http_request_executor.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_http/include/cl_http/components/cp_http_request_executor.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_http/include/cl_http/components/cp_http_request_executor.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Component | Description | Links |\r\n|-----------|-------------|-------|\r\n| cp_http_session_manager | HTTP session state management | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_http/include/cl_http/components/cp_http_session_manager.hpp) / `src/SMACC2/smacc2_client_library/cl_http/include/cl_http/components/cp_http_session_manager.hpp` |\r\n| cp_http_connection_manager | HTTP connection lifecycle management | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_http/include/cl_http/components/cp_http_connection_manager.hpp) / `src/SMACC2/smacc2_client_library/cl_http/include/cl_http/components/cp_http_connection_manager.hpp` |\r\n\r\n---\r\n\r\n## 9. Motion Planning Components (cl_moveit2z)\r\n\r\n**Purpose:** MoveIt2 motion planning and trajectory execution.\r\n\r\n**Best Reference:**\r\n- [cp_motion_planner.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_motion_planner.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_motion_planner.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Component | Description | Links |\r\n|-----------|-------------|-------|\r\n| cp_trajectory_executor | Trajectory execution controller | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_trajectory_executor.hpp) / `src/SMACC2/smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_trajectory_executor.hpp` |\r\n\r\n---\r\n\r\n## 10. Perception/Tracking Components\r\n\r\n**Purpose:** AprilTag and object detection/tracking.\r\n\r\n**Best Reference:**\r\n- [cp_apriltag_tracker.hpp](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/components/cp_apriltag_tracker.hpp)\r\n- `src/SMACC2/smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/components/cp_apriltag_tracker.hpp`\r\n\r\n**Additional Examples:**\r\n\r\n| Component | Description | Links |\r\n|-----------|-------------|-------|\r\n| cp_april_visualization | AprilTag visualization | [GitHub](https://github.com/robosoft-ai/SMACC2/blob/jazzy/smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/components/cp_april_visualization.hpp) / `src/SMACC2/smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/components/cp_april_visualization.hpp` |\r\n\r\n//////////////////////////////////////////////////////////////////////////////\r\n\r\n## Common Component Patterns\r\n\r\n1. **Base Class:** All inherit from `smacc2::ISmaccComponent`\r\n2. **Dependencies:** Use `requiresComponent()` to access other components\r\n3. **Signals:** Use `smacc2::SmaccSignal<>` for decoupled communication\r\n4. **Lifecycle:** Implement `onInitialize()` for setup\r\n5. **Event Posting:** Use `onStateOrthogonalAllocation()` for templated events\r\n6. **Thread Safety:** Use `std::mutex` for shared data\r\n7. **Real-Time:** Inherit from `ISmaccUpdatable` for periodic updates\r\n\r\n\r\n//////////////////////////////////////////////////////////////////////////////\r\n\r\n# Common Architectural Patterns\r\n\r\nThese patterns appear consistently across all behavior and component types:\r\n\r\n1. **Base Class Inheritance**\r\n   - Behaviors: `SmaccClientBehavior` (sync) or `SmaccAsyncClientBehavior` (async)\r\n   - Components: `ISmaccComponent`\r\n   - For periodic updates: Add `ISmaccUpdatable` via multiple inheritance\r\n\r\n2. **Template-Based Orthogonal Allocation**\r\n   - `onStateOrthogonalAllocation<TOrthogonal, TSourceObject>()` captures type info\r\n   - Enables type-safe event posting with correct orthogonal context\r\n\r\n3. **Dependency Declaration**\r\n   - `requiresClient(client_)` - get reference to owning client\r\n   - `requiresComponent(component_)` - get reference to sibling component\r\n\r\n4. **Signal-Callback Architecture**\r\n   - Components expose `SmaccSignal<>` members\r\n   - Behaviors connect via `signal.connect(&Class::method, this)`\r\n   - Automatic lifecycle management prevents dangling callbacks\r\n\r\n5. **Optional Configuration**\r\n   - `std::optional<>` for flexible parameterization\r\n   - Allows defaults while enabling explicit overrides\r\n\r\n6. **Thread Safety**\r\n   - `std::mutex` for shared data protection\r\n   - Lock guards in accessor methods\r\n\r\n\r\n//////////////////////////////////////////////////////////////////////////////\r\n\r\n# Architecture Benefits\r\n\r\n1. **Pure Separation of Concerns**\r\n   - Clients orchestrate only - no business logic\r\n   - Components implement all functionality\r\n   - Behaviors consume components via `requiresComponent()`\r\n\r\n2. **Composability**\r\n   - Components can be mixed and matched\r\n   - New clients compose existing components\r\n   - Framework provides reusable core components\r\n\r\n3. **Testability**\r\n   - Each component can be tested independently\r\n   - Clear interfaces between components\r\n\r\n4. **Type Safety**\r\n   - Template parameters ensure correct event typing\r\n   - Compile-time orthogonal resolution\r\n\r\n5. **Signal-Based Communication**\r\n   - Loose coupling via SmaccSignal connections\r\n   - Automatic lifecycle management\r\n\r\n\r\n//////////////////////////////////////////////////////////////////////////////\r\n\r\n# References\r\n\r\n## Repo\r\nhttps://github.com/robosoft-ai/SMACC2\r\n\r\n## Usage Repo\r\nhttps://github.com/robosoft-ai/nova_carter_sm_library\r\n\r\n## Doxygen\r\nhttps://robosoft-ai.github.io/smacc2_doxygen/jazzy/html/index.html\r\n\r\n## Documentation\r\nhttps://smacc2.robosoft.ai/\r\n"
  },
  {
    "path": "smacc2_client_library/cl_foundation_pose/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(cl_foundation_pose)\n\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(vision_msgs REQUIRED)\nfind_package(tf2_ros REQUIRED)\nfind_package(tf2_geometry_msgs REQUIRED)\nfind_package(geometry_msgs REQUIRED)\n\ninclude_directories(include)\n\nament_export_include_directories(include)\nament_export_dependencies(\n  smacc2\n  vision_msgs\n  tf2_ros\n  tf2_geometry_msgs\n  geometry_msgs\n)\n\ninstall(DIRECTORY include/ DESTINATION include)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/cl_foundation_pose.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <smacc2/smacc_client.hpp>\n#include <vision_msgs/msg/detection3_d_array.hpp>\n\n#include <smacc2/client_core_components/cp_topic_subscriber.hpp>\n\nnamespace cl_foundation_pose\n{\nusing namespace smacc2::client_core_components;\n\nclass ClFoundationPose : public smacc2::ISmaccClient\n{\npublic:\n  ClFoundationPose() {}\n\n  void onInitialize() override\n  {\n    auto subcomponent =\n      this->createComponent<CpTopicSubscriber<vision_msgs::msg::Detection3DArray>>(\n        \"/detection3d_array\");\n  }\n};\n\n}  // namespace cl_foundation_pose\n"
  },
  {
    "path": "smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/client_behaviors/cb_pause_object_tracking.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <smacc2/smacc.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_foundation_pose\n{\n\nclass CbTrackObjectPause : public smacc2::SmaccClientBehavior\n{\nprivate:\n  cl_foundation_pose::CpObjectTrackerTf * objectTracker_ = nullptr;\n\npublic:\n  CbTrackObjectPause() {}\n\n  virtual ~CbTrackObjectPause() {}\n\n  virtual void onEntry() override\n  {\n    requiresComponent(objectTracker_);\n    RCLCPP_INFO(getLogger(), \"CbTrackObjectPause onEntry - disabling tracking\");\n    objectTracker_->setEnabled(false);\n  }\n\n  virtual void onExit() override\n  {\n    RCLCPP_INFO(getLogger(), \"CbTrackObjectPause onExit - re-enabling tracking\");\n    objectTracker_->setEnabled(true);\n  }\n};\n}  // namespace cl_foundation_pose\n"
  },
  {
    "path": "smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/client_behaviors/cb_track_object_pose.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <smacc2/smacc.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_foundation_pose\n{\n\nclass CbTrackObjectPose : public smacc2::SmaccClientBehavior, public smacc2::ISmaccUpdatable\n{\nprivate:\n  std::string globalFrame_;\n  std::string objectToTrackId_;\n  cl_foundation_pose::CpObjectTrackerTf * objectTracker_ = nullptr;\n\npublic:\n  CbTrackObjectPose(std::string objectToTrackId, std::string globalFrame = \"map\")\n  : globalFrame_(globalFrame), objectToTrackId_(objectToTrackId)\n  {\n  }\n\n  virtual ~CbTrackObjectPose() {}\n\n  virtual void onEntry() override\n  {\n    requiresComponent(objectTracker_, true);\n    RCLCPP_INFO(getLogger(), \"CbTrackObjectPose onEntry\");\n    RCLCPP_INFO(getLogger(), \"CbTrackObjectPose onEntry - enabled\");\n    objectTracker_->setEnabled(true);\n    RCLCPP_INFO(\n      getLogger(),\n      \"CbTrackObjectPose onEntry - updateAndGetGlobalPose, objectToTrackId: %s, globalFrame: %s\",\n      objectToTrackId_.c_str(), globalFrame_.c_str());\n    objectTracker_->updateAndGetGlobalPose(objectToTrackId_, globalFrame_);\n  }\n\n  virtual void onExit() override { objectTracker_->setEnabled(false); }\n\n  virtual void update() override\n  {\n    if (objectTracker_ != nullptr && objectTracker_->isEnabled())\n    {\n      RCLCPP_INFO(getLogger(), \"CbTrackObjectPose update\");\n      objectTracker_->updateAndGetGlobalPose(objectToTrackId_, globalFrame_);\n    }\n  }\n};\n}  // namespace cl_foundation_pose\n"
  },
  {
    "path": "smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/components/cp_object_tracker_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <cl_foundation_pose/components/tracker_utils.hpp>\n#include <smacc2/client_core_components/cp_topic_subscriber.hpp>\n#include <smacc2/component.hpp>\n#include <vision_msgs/msg/detection3_d_array.hpp>\n\nnamespace cl_foundation_pose\n{\n\nusing namespace smacc2::client_core_components;\n\nclass CpObjectTracker1 : public smacc2::ISmaccComponent\n{\npublic:\n  // Declare the Component's default constructor.\n  void onInitialize()\n  {\n    // Gain access to the foundationpose subscriber component.\n    requiresComponent(fondationPoseTopic_);\n\n    // Then hook each received message to store it into our little map/database.\n    fondationPoseTopic_->onMessageReceived(&CpObjectTracker1::onDetection3DArrayReceived, this);\n  }\n\n  void onDetection3DArrayReceived(const vision_msgs::msg::Detection3DArray & msg)\n  {\n    RCLCPP_INFO(getLogger(), \"Received %ld detections\", msg.detections.size());\n\n    for (auto & detection : msg.detections)\n    {\n      auto previouslyExistingObjectEntry = detectedObjects.find(detection.id);\n\n      // if we have seen this object before...\n      if (previouslyExistingObjectEntry != detectedObjects.end())\n      {\n        auto & previouslyExistingObject = previouslyExistingObjectEntry->second;\n        previouslyExistingObject.msg = detection;\n      }\n      else\n      {\n        DetectedObject detectedObject;\n        detectedObject.msg = detection;\n        detectedObjects[detection.id] = detectedObject;\n      }\n\n      this->postEvent<EvObjectDetected>();\n    }\n  }\n\n  std::optional<geometry_msgs::msg::PoseStamped> getPose(const std::string & object_id)\n  {\n    auto object = detectedObjects.find(object_id);\n    if (object != detectedObjects.end())\n    {\n      geometry_msgs::msg::PoseStamped pose;\n      pose.header = object->second.msg.header;\n      pose.pose = object->second.msg.results[0].pose.pose;\n      return pose;\n    }\n    return std::nullopt;\n  }\n\nprivate:\n  // Declare the subscriber component.\n  CpTopicSubscriber<vision_msgs::msg::Detection3DArray> * fondationPoseTopic_;\n\n  // Declare a data structure to store the detected objects.\n  std::map<std::string, DetectedObject> detectedObjects;\n};\n\n}  // namespace cl_foundation_pose\n"
  },
  {
    "path": "smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/components/cp_object_tracker_tf.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <tf2_ros/buffer.h>\n#include <tf2_ros/transform_broadcaster.h>\n#include <tf2_ros/transform_listener.h>\n#include <smacc2/component.hpp>\n#include <smacc2/smacc_updatable.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n\n#include <cl_foundation_pose/components/tracker_utils.hpp>\n\nnamespace cl_foundation_pose\n{\n\nusing namespace smacc2::client_core_components;\n\nclass CpObjectTrackerTf : public smacc2::ISmaccComponent, public smacc2::ISmaccUpdatable\n{\nprivate:\n  std::shared_ptr<tf2_ros::Buffer> tfBuffer_;\n  std::shared_ptr<tf2_ros::TransformListener> tfListener_;\n  std::shared_ptr<tf2_ros::TransformBroadcaster> tfBroadcaster_;\n\n  std::string global_frame_id_;\n  bool enabled_ = false;\n\n  // Declare a data structure to store the detected objects.\n  std::map<std::string, DetectedObject> detectedObjects;\n  std::mutex m_mutex_;\n\npublic:\n  CpObjectTrackerTf(std::string global_frame_id = \"map\") : global_frame_id_(global_frame_id) {}\n\n  void setEnabled(bool enabled)\n  {\n    resetPoseEstimation();\n    enabled_ = enabled;\n  }\n\n  bool isEnabled() { return enabled_; }\n\n  void resetPoseEstimation()\n  {\n    std::lock_guard<std::mutex> lock(m_mutex_);\n\n    RCLCPP_INFO(\n      getLogger(), \"CpObjectTrackerTf::resetPoseEstimation() tracked objects: %ld\",\n      detectedObjects.size());\n    for (auto & detectedObject : detectedObjects)\n    {\n      auto & detectedObjectInfo = detectedObject.second;\n      RCLCPP_INFO(\n        getLogger(), \"CpObjectTrackerTf::resetPoseEstimation() tracking object: %s\",\n        detectedObject.first.c_str());\n\n      detectedObjectInfo.filtered_pose.reset();\n      detectedObjectInfo.historicalPoses_.clear();\n    }\n    detectedObjects.clear();\n  }\n\n  void update() override\n  {\n    RCLCPP_INFO(\n      getLogger(), \"CpObjectTrackerTf::update() tracked objects: %ld\", detectedObjects.size());\n    std::lock_guard<std::mutex> lock(m_mutex_);\n\n    if (!enabled_) return;\n\n    RCLCPP_INFO(\n      getLogger(), \"CpObjectTrackerTf::update() heartbeat, tracked objects: %ld\",\n      detectedObjects.size());\n\n    // refresh tracked object poses\n    for (auto & detectedObject : detectedObjects)\n    {\n      RCLCPP_INFO(\n        getLogger(), \"CpObjectTrackerTf::update() tracking object: %s\",\n        detectedObject.first.c_str());\n\n      auto globalObjectPose = this->updateAndGetGlobalPose(detectedObject.first, global_frame_id_);\n      if (globalObjectPose)\n      {\n        detectedObject.second.filtered_pose = *globalObjectPose;\n      }\n    }\n  }\n\n  void onInitialize()\n  {\n    tfBuffer_ = std::make_shared<tf2_ros::Buffer>(this->getNode()->get_clock());\n    tfListener_ = std::make_shared<tf2_ros::TransformListener>(*tfBuffer_);\n    tfBroadcaster_ = std::make_shared<tf2_ros::TransformBroadcaster>(this->getNode());\n  }\n\n  std::optional<geometry_msgs::msg::PoseStamped> updateAndGetGlobalPose(\n    const std::string & child_frame_id, const std::string & frame_id)\n  {\n    RCLCPP_INFO(\n      getLogger(), \"[CpObjectTrackerTf] updateAndGetGlobalPose('%s', '%s')\", child_frame_id.c_str(),\n      frame_id.c_str());\n    // check in database if the object is already tracked\n    auto object = detectedObjects.find(child_frame_id);\n    DetectedObject * detectedObject = nullptr;\n    if (object != detectedObjects.end())  // already tracked\n    {\n      detectedObject = &object->second;\n      RCLCPP_INFO(\n        getLogger(), \"[CpObjectTrackerTf] tracking existing object: %s\", child_frame_id.c_str());\n    }\n    else\n    {\n      detectedObjects[child_frame_id] = DetectedObject();\n      detectedObject = &detectedObjects[child_frame_id];\n      RCLCPP_INFO(\n        getLogger(), \"[CpObjectTrackerTf] tracking new object: %s\", child_frame_id.c_str());\n    }\n\n    if (tfBuffer_->canTransform(frame_id, child_frame_id, rclcpp::Time(0)))\n    {\n      geometry_msgs::msg::PoseStamped pose;\n\n      auto transformStamped = tfBuffer_->lookupTransform(frame_id, child_frame_id, rclcpp::Time(0));\n      pose.header = transformStamped.header;\n      pose.pose.position.x = transformStamped.transform.translation.x;\n      pose.pose.position.y = transformStamped.transform.translation.y;\n      pose.pose.position.z = transformStamped.transform.translation.z;\n      pose.pose.orientation = transformStamped.transform.rotation;\n\n      RCLCPP_INFO(\n        getLogger(), \"[CpObjectTrackerTf] *updateAndGetGlobalPose('%s', '%s') pose: %f, %f, %f\",\n        child_frame_id.c_str(), frame_id.c_str(), pose.pose.position.x, pose.pose.position.y,\n        tf2::getYaw(pose.pose.orientation));\n\n      auto & historicalPoses_ = detectedObject->historicalPoses_;\n      RCLCPP_INFO(\n        getLogger(), \"[CpObjectTrackerTf] updateAndGetGlobalPose('%s', '%s') historical poses: %ld\",\n        child_frame_id.c_str(), frame_id.c_str(), historicalPoses_.size());\n\n      const size_t MAX_HISTORY = 512;\n      if (historicalPoses_.size() > MAX_HISTORY)\n      {\n        RCLCPP_INFO(\n          getLogger(),\n          \"[CpObjectTrackerTf] updateAndGetGlobalPose('%s', '%s') historical poses, popping oldest \"\n          \"pose\",\n          child_frame_id.c_str(), frame_id.c_str());\n        historicalPoses_.erase(historicalPoses_.begin());\n      }\n      RCLCPP_INFO(\n        getLogger(),\n        \"[CpObjectTrackerTf] updateAndGetGlobalPose('%s', '%s') historical poses, pushing new pose\",\n        child_frame_id.c_str(), frame_id.c_str());\n      historicalPoses_.push_back(pose);\n\n      RCLCPP_INFO(\n        getLogger(),\n        \"[CpObjectTrackerTf] updateAndGetGlobalPose('%s', '%s') -presort- historical poses: %ld\",\n        child_frame_id.c_str(), frame_id.c_str(), historicalPoses_.size());\n\n      // compute median position in x\n      std::sort(\n        historicalPoses_.begin(), historicalPoses_.end(),\n        [](const geometry_msgs::msg::PoseStamped & a, const geometry_msgs::msg::PoseStamped & b)\n        { return a.pose.position.x < b.pose.position.x; });\n\n      RCLCPP_INFO(\n        getLogger(),\n        \"[CpObjectTrackerTf] updateAndGetGlobalPose('%s', '%s')- presort- historical poses: %ld\",\n        child_frame_id.c_str(), frame_id.c_str(), historicalPoses_.size());\n\n      geometry_msgs::msg::PoseStamped medianPose;\n      medianPose.pose.position.x = historicalPoses_[historicalPoses_.size() / 2].pose.position.x;\n\n      // compute median position in y\n      std::sort(\n        historicalPoses_.begin(), historicalPoses_.end(),\n        [](const geometry_msgs::msg::PoseStamped & a, const geometry_msgs::msg::PoseStamped & b)\n        { return a.pose.position.y < b.pose.position.y; });\n\n      medianPose.pose.position.y = historicalPoses_[historicalPoses_.size() / 2].pose.position.y;\n      medianPose.header = pose.header;\n\n      detectedObject->filtered_pose = medianPose;\n\n      RCLCPP_INFO(\n        getLogger(),\n        \"[CpObjectTrackerTf] updateAndGetGlobalPose('%s', '%s') filtered pose [%ld samples]: %f, \"\n        \"%f, %f\",\n        child_frame_id.c_str(), frame_id.c_str(), detectedObject->historicalPoses_.size(),\n        detectedObject->filtered_pose->pose.position.x,\n        detectedObject->filtered_pose->pose.position.y,\n        tf2::getYaw(detectedObject->filtered_pose->pose.orientation));\n      this->postEvent<EvObjectDetected>();\n\n      return detectedObject->filtered_pose;\n    }\n\n    RCLCPP_INFO(\n      getLogger(), \"[CpObjectTrackerTf] updateAndGetGlobalPose('%s', '%s') failed\",\n      child_frame_id.c_str(), frame_id.c_str());\n\n    return std::nullopt;\n  }\n};\n\n}  // namespace cl_foundation_pose\n"
  },
  {
    "path": "smacc2_client_library/cl_foundation_pose/include/cl_foundation_pose/components/tracker_utils.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <smacc2/component.hpp>\n#include <vision_msgs/msg/detection3_d_array.hpp>\n\nnamespace cl_foundation_pose\n{\n\nstruct DetectedObject\n{\n  vision_msgs::msg::Detection3D msg;\n\n  std::optional<geometry_msgs::msg::PoseStamped> filtered_pose;\n\n  std::vector<geometry_msgs::msg::PoseStamped> historicalPoses_;\n\n  DetectedObject() { historicalPoses_.clear(); }\n};\n\nstruct EvObjectDetected : sc::event<EvObjectDetected>\n{\n};\n\n}  // namespace cl_foundation_pose\n"
  },
  {
    "path": "smacc2_client_library/cl_foundation_pose/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>cl_foundation_pose</name>\n  <version>3.0.1</version>\n  <description>SMACC2 client for NVIDIA Foundation Pose object tracking</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n  <depend>vision_msgs</depend>\n  <depend>tf2_ros</depend>\n  <depend>tf2_geometry_msgs</depend>\n  <depend>geometry_msgs</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(cl_gcalcli)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(Boost COMPONENTS thread regex REQUIRED)\n\ninclude_directories(\n  ${PROJECT_NAME}\n  include\n  ${smacc2_INCLUDE_DIRS}\n)\n\nadd_library(${PROJECT_NAME}\n  src/cl_gcalcli/cl_gcalcli.cpp\n  src/cl_gcalcli/components/cp_gcalcli_connection.cpp\n  src/cl_gcalcli/components/cp_calendar_poller.cpp\n  src/cl_gcalcli/components/cp_calendar_event_listener.cpp\n  src/cl_gcalcli/client_behaviors/cb_detect_calendar_event.cpp\n  src/cl_gcalcli/client_behaviors/cb_status.cpp\n  src/cl_gcalcli/client_behaviors/cb_wait_connection.cpp\n  src/cl_gcalcli/client_behaviors/cb_monitor_connection.cpp\n  src/cl_gcalcli/client_behaviors/cb_quick_add.cpp\n  src/cl_gcalcli/client_behaviors/cb_refresh_agenda.cpp\n)\n\ntarget_link_libraries(${PROJECT_NAME} SHARED ${Boost_LIBRARIES} smacc2)\nament_target_dependencies(${PROJECT_NAME} smacc2)\n\nament_export_include_directories(include)\nament_export_dependencies(smacc2 Boost)\nament_export_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(TARGETS\n  ${PROJECT_NAME}\n  DESTINATION lib/)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/README.md",
    "content": "# cl_gcalcli - SMACC2 Google Calendar Client\n\nA SMACC2 client library for Google Calendar integration via the `gcalcli` CLI tool. This client enables state machines to react to Google Calendar events.\n\n## Prerequisites\n\n- gcalcli installed and authenticated (`pip install gcalcli`)\n- Google Calendar API credentials configured\n- ROS2 and SMACC2 installed\n\n## Architecture\n\n```\nClGcalcli (Orchestrator)\n    ├── CpSubprocessExecutor (smacc2 core - generic subprocess execution)\n    ├── CpGcalcliConnection (connection health monitoring)\n    ├── CpCalendarPoller (agenda polling + TSV parsing)\n    └── CpCalendarEventListener (pattern matching + event dispatch)\n```\n\n## Components\n\n| Component | Purpose |\n|-----------|---------|\n| `CpSubprocessExecutor` | Generic subprocess execution (smacc2 core) |\n| `CpGcalcliConnection` | Connection health monitoring, heartbeat, authentication |\n| `CpCalendarPoller` | Periodic agenda fetching and parsing |\n| `CpCalendarEventListener` | Event pattern matching and triggering |\n\n## Client Behaviors\n\n| Behavior | Type | Purpose |\n|----------|------|---------|\n| `CbDetectCalendarEvent` | Async | Wait until matching event's start time arrives |\n| `CbStatus` | Sync | Get connection state and current events |\n| `CbWaitConnection` | Async | Wait for gcalcli connection with timeout |\n| `CbMonitorConnection` | Sync | Continuous connection monitoring |\n| `CbQuickAdd` | Async | Add event via `gcalcli quick` |\n| `CbRefreshAgenda` | Sync | Force immediate agenda refresh |\n\n### CbDetectCalendarEvent Parameters\n\n```cpp\nconfigure_orthogonal<OrCalendar, CbDetectCalendarEvent>(\"TestEvent\", false, 5);\n//                                                       pattern    regex  minutes_before\n```\n\nThe `minutes_before` parameter controls when the behavior triggers relative to the event's start time. The value `5` means \"trigger 5 minutes before the event's start time.\"\n\nThis is intentional - it allows the robot/system to prepare before a meeting actually starts. You can change it:\n\n- `0` = trigger exactly at start time\n- `5` = trigger 5 minutes early\n- `10` = trigger 10 minutes early\n\nIf you want to trigger at the actual start time, change it to:\n\n```cpp\nconfigure_orthogonal<OrCalendar, CbDetectCalendarEvent>(\"TestEvent\", false, 0);\n```\n\n## Events\n\n```cpp\n// Connection events\nEvConnectionLost<TSource, TOrthogonal>\nEvConnectionRestored<TSource, TOrthogonal>\nEvAuthenticationRequired<TSource, TOrthogonal>\n\n// Calendar events\nEvCalendarEventDetected<TSource, TOrthogonal>  // Contains: event, matched_pattern\nEvCalendarEventStarted<TSource, TOrthogonal>   // Contains: event\nEvCalendarEventEnded<TSource, TOrthogonal>     // Contains: event\nEvAgendaUpdated<TSource, TOrthogonal>          // Contains: events vector\n```\n\n## Usage Example\n\n### Orthogonal Setup\n\n```cpp\n#include <cl_gcalcli/cl_gcalcli.hpp>\n#include <cl_gcalcli/client_behaviors.hpp>\n\nclass OrCalendar : public smacc2::Orthogonal<OrCalendar>\n{\n  void onInitialize() override\n  {\n    cl_gcalcli::GcalcliConfig config;\n    config.gcalcli_path = \"gcalcli\";  // from PATH\n    config.poll_interval = std::chrono::seconds{30};\n    config.heartbeat_interval = std::chrono::seconds{60};\n    config.agenda_days = 7;\n\n    this->createClient<cl_gcalcli::ClGcalcli>(config);\n  }\n};\n```\n\n### State Machine Example\n\n```cpp\n#include <cl_gcalcli/cl_gcalcli.hpp>\n#include <cl_gcalcli/client_behaviors.hpp>\n#include <cl_gcalcli/events.hpp>\n\nusing namespace cl_gcalcli;\n\n// Wait for connection state\nstruct StWaitConnection : smacc2::SmaccState<StWaitConnection, SmMain>\n{\n  using reactions = mpl::list<\n    Transition<EvCbSuccess<CbWaitConnection, OrCalendar>, StWaitForMeeting>,\n    Transition<EvCbFailure<CbWaitConnection, OrCalendar>, StConnectionError>\n  >;\n\n  static void staticConfigure()\n  {\n    configure<OrCalendar, CbWaitConnection>(std::chrono::seconds{30});\n  }\n};\n\n// Wait for meeting to start\nstruct StWaitForMeeting : smacc2::SmaccState<StWaitForMeeting, SmMain>\n{\n  using reactions = mpl::list<\n    // Transition when \"Standup\" event START TIME arrives (5 min before)\n    Transition<EvCbSuccess<CbDetectCalendarEvent, OrCalendar>, StMeetingStarted>,\n    // Handle connection loss\n    Transition<EvConnectionLost<CpGcalcliConnection, OrCalendar>, StConnectionError>\n  >;\n\n  static void staticConfigure()\n  {\n    // Wait for \"Standup\" (regex), trigger 5 minutes before start time\n    configure<OrCalendar, CbDetectCalendarEvent>(\".*Standup.*\", /*regex=*/true, /*minutes_before=*/5);\n    // Monitor connection health\n    configure<OrCalendar, CbMonitorConnection>();\n  }\n};\n\n// Meeting started state\nstruct StMeetingStarted : smacc2::SmaccState<StMeetingStarted, SmMain>\n{\n  static void staticConfigure()\n  {\n    configure<OrCalendar, CbStatus>();\n  }\n\n  void onEntry()\n  {\n    // Access detected event from behavior\n    CbDetectCalendarEvent* behavior;\n    this->getOrthogonal<OrCalendar>()->getClientBehavior(behavior);\n    if (behavior)\n    {\n      auto event = behavior->getDetectedEvent();\n      if (event)\n      {\n        RCLCPP_INFO(getLogger(), \"Meeting: %s\", event->title.c_str());\n      }\n    }\n  }\n};\n```\n\n### Quick Add Example\n\n```cpp\nstruct StAddEvent : smacc2::SmaccState<StAddEvent, SmMain>\n{\n  using reactions = mpl::list<\n    Transition<EvCbSuccess<CbQuickAdd, OrCalendar>, StDone>,\n    Transition<EvCbFailure<CbQuickAdd, OrCalendar>, StError>\n  >;\n\n  static void staticConfigure()\n  {\n    configure<OrCalendar, CbQuickAdd>(\"Team meeting tomorrow at 3pm for 1 hour\");\n  }\n};\n```\n\n## Configuration\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| `gcalcli_path` | `\"gcalcli\"` | Path to gcalcli executable |\n| `config_folder` | `std::nullopt` | Optional gcalcli config folder |\n| `calendars` | `{}` | Calendars to monitor (empty = all) |\n| `poll_interval` | `30s` | How often to poll agenda |\n| `heartbeat_interval` | `60s` | How often to check connection |\n| `agenda_days` | `7` | Days ahead to fetch |\n| `max_consecutive_failures` | `3` | Failures before connection lost |\n\n## Data Structures\n\n### CalendarEvent\n\n```cpp\nstruct CalendarEvent {\n  std::string id;\n  std::string title;\n  std::string calendar_name;\n  std::string location;\n  std::string description;\n  std::chrono::system_clock::time_point start_time;\n  std::chrono::system_clock::time_point end_time;\n  bool is_all_day;\n\n  bool isActiveNow() const;\n  bool willStartWithinMinutes(int minutes) const;\n  bool hasEnded() const;\n  int minutesUntilStart() const;\n};\n```\n\n### EventWatch\n\n```cpp\nstruct EventWatch {\n  std::string pattern;       // Pattern to match event titles\n  bool use_regex = false;    // True = regex, False = substring match\n  int minutes_before = 0;    // Trigger N minutes before start\n  bool trigger_on_start = true;\n  bool trigger_on_end = false;\n  bool continuous = false;   // Keep watching or one-shot\n};\n```\n\n## Dependencies\n\n- smacc2\n- Boost (thread, regex)\n- gcalcli (external CLI tool)\n\n## Getting Started\n\n### Step 1: Install gcalcli\n\n```bash\n# Option A: Using apt (Debian/Ubuntu)\nsudo apt install gcalcli\n\n# Option B: Using pipx (recommended for latest version)\npipx install gcalcli\n```\n\n### Step 2: Set Up Google Calendar API Credentials\n\nThe default gcalcli OAuth token is restricted. You need to create your own Google API credentials:\n\n#### 2.1 Create a Google Cloud Project\n\n1. Go to https://console.cloud.google.com/\n2. Click \"Select a project\" → \"New Project\"\n3. Name it something like `gcalcli-personal`\n4. Click **Create**\n\n#### 2.2 Enable the Calendar API\n\n1. Go to **APIs & Services** → **Library**\n2. Search for \"Google Calendar API\"\n3. Click on it and click **Enable**\n\n#### 2.3 Configure OAuth Consent Screen\n\n1. Go to **APIs & Services** → **OAuth consent screen**\n2. Select **External** → **Create**\n3. Fill in:\n   - App name: `gcalcli`\n   - User support email: your email\n   - Developer contact: your email\n4. Click **Save and Continue**\n5. On Scopes page, click **Add or Remove Scopes**\n6. Add: `https://www.googleapis.com/auth/calendar`\n7. Click **Save and Continue**\n8. Add your email as a test user\n9. Click **Save and Continue**\n\n#### 2.4 Create OAuth Credentials\n\n1. Go to **APIs & Services** → **Credentials**\n2. Click **Create Credentials** → **OAuth client ID**\n3. Application type: **Desktop app**\n4. Name: `gcalcli`\n5. Click **Create**\n6. Copy the **Client ID** and **Client Secret**\n\n### Step 3: Initialize gcalcli\n\n```bash\ngcalcli --client-id=YOUR_CLIENT_ID.apps.googleusercontent.com init\n```\n\nWhen prompted, enter your Client Secret. A browser window will open for OAuth authentication.\n\n### Step 4: Verify Installation\n\n```bash\n# List your calendars\ngcalcli list\n\n# View upcoming events\ngcalcli agenda\n```\n\n## Troubleshooting\n\n### OAuth Redirect Failed\n\nIf you see \"Unable to start local webserver on port 8080\", old gcalcli processes may be blocking the port:\n\n```bash\n# Kill any stuck gcalcli processes\npkill -f gcalcli\n\n# Try again\ngcalcli --client-id=YOUR_CLIENT_ID.apps.googleusercontent.com init\n```\n\n### Creating a Dedicated Robot Calendar\n\nFor testing or robot-specific events, create a separate calendar:\n\n1. Go to https://calendar.google.com/\n2. Click the **+** next to \"Other calendars\"\n3. Select \"Create new calendar\"\n4. Name it (e.g., \"Robot\")\n5. Click **Create calendar**\n\nThen configure cl_gcalcli to use it:\n\n```cpp\ncl_gcalcli::GcalcliConfig config;\nconfig.calendars = {\"Robot\"};  // Only monitor this calendar\nthis->createClient<cl_gcalcli::ClGcalcli>(config);\n```\n\n### Testing Event Detection\n\nCreate a test event and verify detection:\n\n```bash\n# Create an event 10 minutes from now\ngcalcli --calendar=\"Robot\" quick \"TestEvent at 2:30pm today for 15 minutes\"\n\n# Verify it appears\ngcalcli --calendar=\"Robot\" agenda\n```\n\n## Reference\n\n- [gcalcli GitHub](https://github.com/insanum/gcalcli)\n- [gcalcli API Auth Documentation](https://github.com/insanum/gcalcli/blob/HEAD/docs/api-auth.md)\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/docs/cl_gcalcli_implementation_plan.md",
    "content": "# Implementation Plan: cl_gcalcli SMACC2 Client Library\n\n## Overview\n\nCreate a new SMACC2 client library (`cl_gcalcli`) that integrates Google Calendar functionality via the `gcalcli` CLI tool, enabling state machines to react to calendar events.\n\n**Key Decisions:**\n- CpTerminalManager → Generic `CpSubprocessExecutor` in smacc2 core (reusable)\n- gcalcli path → System `gcalcli` from PATH (installed via pip)\n- CbEventDetect → Triggers when event START TIME arrives\n- Behaviors → Full set implementation\n\n## Architecture\n\n```\nClGcalcli (Orchestrator)\n    ├── CpSubprocessExecutor (CORE - generic subprocess execution)\n    ├── CpGcalcliConnection (gcalcli-specific connection health)\n    ├── CpCalendarPoller (agenda polling + TSV parsing)\n    └── CpCalendarEventListener (event matching + dispatch)\n```\n\n## Components\n\n### 1. CpSubprocessExecutor (smacc2 core component)\n**Location:** `smacc2/include/smacc2/client_core_components/cp_subprocess_executor.hpp`\n**Purpose:** Generic subprocess execution for any CLI tool\n\n- Executes shell commands via `popen()` subprocess\n- Captures stdout/stderr with configurable timeout\n- Thread-safe with mutex protection\n- Signals: `onCommandCompleted_(int exit_code, std::string output)`, `onCommandFailed_(std::string error)`\n\n### 2. CpGcalcliConnection (cl_gcalcli component)\n**Purpose:** gcalcli-specific connection health monitoring\n\n- Uses CpSubprocessExecutor to run gcalcli commands\n- Implements `ISmaccUpdatable` for periodic heartbeat (uses `gcalcli list`)\n- Tracks consecutive failures, emits `EvConnectionLost` after 3 failures\n- Provides `restartConnection()` method\n- Signals: `onConnectionLost_`, `onConnectionRestored_`, `onAuthenticationRequired_`\n\n### 3. CpCalendarPoller\n**Purpose:** Poll calendar and parse event data\n\n- Uses CpGcalcliConnection to execute `gcalcli agenda --tsv`\n- Parses TSV output into `CalendarEvent` structs\n- Maintains cached event list with mutex protection\n- Implements `ISmaccUpdatable` for periodic polling\n- Signal: `onAgendaUpdated_(std::vector<CalendarEvent>)`\n\n### 4. CpCalendarEventListener\n**Purpose:** Match events against patterns and dispatch (time-based triggering)\n\n- Subscribes to CpCalendarPoller's data signal\n- Supports regex or exact-match pattern watching\n- Tracks triggered events to prevent duplicates\n- Detects event start/end times\n- Signals: `onEventDetected_`, `onEventStarted_`, `onEventEnded_`\n\n## Events\n\n```cpp\n// Connection events\nEvConnectionLost<TSource, TOrthogonal>\nEvConnectionRestored<TSource, TOrthogonal>\nEvAuthenticationRequired<TSource, TOrthogonal>\n\n// Calendar events\nEvCalendarEventDetected<TSource, TOrthogonal> { CalendarEvent event; std::string pattern; }\nEvCalendarEventStarted<TSource, TOrthogonal> { CalendarEvent event; }\nEvCalendarEventEnded<TSource, TOrthogonal> { CalendarEvent event; }\nEvAgendaUpdated<TSource, TOrthogonal> { std::vector<CalendarEvent> events; }\n```\n\n## Data Structures\n\n```cpp\nstruct CalendarEvent {\n  std::string id, title, calendar_name, location, description;\n  std::chrono::system_clock::time_point start_time, end_time;\n  bool is_all_day;\n  bool isActiveNow() const;\n  bool willStartWithinMinutes(int minutes) const;\n};\n\nstruct GcalcliConfig {\n  std::string gcalcli_path = \"gcalcli\";\n  std::vector<std::string> calendars;  // empty = all\n  std::chrono::seconds poll_interval{30};\n  std::chrono::seconds heartbeat_interval{60};\n  int agenda_days{7};\n};\n```\n\n## Client Behaviors\n\n| Behavior | Type | Purpose |\n|----------|------|---------|\n| `CbEventDetect` | Async | Wait until matching event's START TIME arrives (regex/exact, minutes before) |\n| `CbStatus` | Sync | Get connection state and current events |\n| `CbWaitConnection` | Async | Wait for gcalcli connection with timeout |\n| `CbMonitorConnection` | Sync+Updatable | Continuous connection monitoring, posts events on loss |\n| `CbQuickAdd` | Async | Add event via `gcalcli quick \"text\"` |\n| `CbRefreshAgenda` | Sync | Force immediate agenda refresh |\n\n## File Structure\n\n### smacc2 Core Addition\n```\nsrc/SMACC2/smacc2/include/smacc2/client_core_components/\n└── cp_subprocess_executor.hpp   # NEW - generic subprocess component\n\nsrc/SMACC2/smacc2/src/smacc2/\n└── cp_subprocess_executor.cpp   # NEW\n```\n\n### cl_gcalcli Package\n```\nsrc/SMACC2/smacc2_client_library/cl_gcalcli/\n├── include/cl_gcalcli/\n│   ├── cl_gcalcli.hpp\n│   ├── types.hpp\n│   ├── events.hpp\n│   ├── client_behaviors/\n│   │   ├── cb_event_detect.hpp\n│   │   ├── cb_status.hpp\n│   │   ├── cb_wait_connection.hpp\n│   │   ├── cb_monitor_connection.hpp\n│   │   ├── cb_quick_add.hpp\n│   │   └── cb_refresh_agenda.hpp\n│   └── components/\n│       ├── cp_gcalcli_connection.hpp\n│       ├── cp_calendar_poller.hpp\n│       └── cp_calendar_event_listener.hpp\n├── src/cl_gcalcli/\n│   ├── cl_gcalcli.cpp\n│   ├── client_behaviors/*.cpp\n│   └── components/*.cpp\n├── CMakeLists.txt\n├── package.xml\n└── README.md\n```\n\n## Implementation Order\n\n### Phase 1: smacc2 Core Addition\n1. Implement CpSubprocessExecutor in smacc2/client_core_components/ (generic subprocess)\n2. Update smacc2 CMakeLists.txt to include new component\n\n### Phase 2: cl_gcalcli Package Setup\n3. Create cl_gcalcli package structure (CMakeLists.txt, package.xml)\n4. Define types.hpp (CalendarEvent, GcalcliConfig, ConnectionState)\n5. Define events.hpp (all event templates)\n\n### Phase 3: cl_gcalcli Components\n6. Implement CpGcalcliConnection (uses CpSubprocessExecutor, heartbeat monitoring)\n7. Implement CpCalendarPoller (TSV parsing + caching)\n8. Implement CpCalendarEventListener (pattern matching, time-based triggering)\n9. Implement ClGcalcli client (component orchestration)\n\n### Phase 4: Client Behaviors\n10. Implement CbEventDetect (triggers when event start time arrives)\n11. Implement CbStatus\n12. Implement CbWaitConnection\n13. Implement CbMonitorConnection\n14. Implement CbQuickAdd\n15. Implement CbRefreshAgenda\n\n### Phase 5: Documentation\n16. Create README.md with usage examples\n\n## Key Implementation Details\n\n### gcalcli Command Execution (via CpSubprocessExecutor)\n```cpp\n// CpSubprocessExecutor provides generic interface\nbool executeCommand(const std::string& command, std::string& stdout, std::string& stderr, int timeout_ms);\n\n// CpGcalcliConnection uses it for calendar commands\nstd::string output, error;\nsubprocessExecutor_->executeCommand(\"gcalcli agenda --tsv --nocolor\", output, error, 30000);\n```\n\n### TSV Parsing (gcalcli agenda --tsv)\nColumns: Start_Date | Start_Time | End_Date | End_Time | Title | Location | Description | Calendar\n\n### Heartbeat Strategy\n- Execute `gcalcli list` every 60 seconds\n- 3 consecutive failures → EvConnectionLost\n- Parse error messages for auth failures\n\n### Polling Recommendations\n- Heartbeat: 60 seconds\n- Agenda poll: 30 seconds\n- Event matching: Every update cycle (~50ms, in-memory)\n\n## Reference Files\n\n- Pattern: `smacc2_client_library/cl_ros2_timer/` (timer client structure)\n- Pattern: `smacc2_client_library/cl_keyboard/` (event listener component)\n- Pattern: `smacc2_client_library/cl_http/` (async behaviors)\n- gcalcli: `src/gcalcli/gcalcli/gcal.py` (command output formats)\n\n## Configuration\n\n- **gcalcli executable:** `gcalcli` (from PATH, installed via pip)\n- **Credentials location:** `~/.local/share/gcalcli/oauth` or `~/.config/gcalcli/`\n- **Default poll interval:** 30 seconds\n- **Default heartbeat interval:** 60 seconds\n\n## Usage Example\n\n```cpp\n// Orthogonal setup\nclass OrCalendar : public smacc2::Orthogonal<OrCalendar> {\n  void onInitialize() override {\n    cl_gcalcli::GcalcliConfig config;\n    config.gcalcli_path = \"gcalcli\";  // from PATH\n    config.poll_interval = std::chrono::seconds{30};\n    this->createClient<cl_gcalcli::ClGcalcli>(config);\n  }\n};\n\n// State that waits for calendar event START TIME to arrive\nstruct StWaitForMeeting : smacc2::SmaccState<StWaitForMeeting, SmMain> {\n  using reactions = mpl::list<\n    // Transition when \"Standup\" event START TIME arrives (5 min before)\n    Transition<EvCalendarEventStarted<CpCalendarEventListener, OrCalendar>, StMeetingStarted>,\n    // Handle connection loss\n    Transition<EvConnectionLost<CpGcalcliConnection, OrCalendar>, StConnectionError>\n  >;\n\n  static void staticConfigure() {\n    // Wait for \"Standup\" (regex), trigger 5 minutes before start time\n    configure<OrCalendar, CbEventDetect>(\".*Standup.*\", /*regex=*/true, /*minutes_before=*/5);\n    // Monitor connection health\n    configure<OrCalendar, CbMonitorConnection>();\n  }\n};\n```\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/include/cl_gcalcli/cl_gcalcli.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/client_core_components/cp_subprocess_executor.hpp>\n#include <smacc2/smacc_client.hpp>\n\n#include <cl_gcalcli/components/cp_calendar_event_listener.hpp>\n#include <cl_gcalcli/components/cp_calendar_poller.hpp>\n#include <cl_gcalcli/components/cp_gcalcli_connection.hpp>\n#include <cl_gcalcli/events.hpp>\n#include <cl_gcalcli/types.hpp>\n\nnamespace cl_gcalcli\n{\n\n/**\n * @brief SMACC2 Client for Google Calendar integration via gcalcli\n *\n * This client provides Google Calendar functionality through the gcalcli\n * command-line tool. It follows the pure orchestrator pattern, creating\n * and configuring components that implement the actual functionality.\n *\n * Components:\n * - CpSubprocessExecutor: Generic subprocess execution (from smacc2 core)\n * - CpGcalcliConnection: Connection health monitoring and command execution\n * - CpCalendarPoller: Agenda polling and event parsing\n * - CpCalendarEventListener: Pattern matching and event triggering\n *\n * Usage example:\n * @code\n * class OrCalendar : public smacc2::Orthogonal<OrCalendar> {\n *   void onInitialize() override {\n *     cl_gcalcli::GcalcliConfig config;\n *     config.poll_interval = std::chrono::seconds{30};\n *     this->createClient<cl_gcalcli::ClGcalcli>(config);\n *   }\n * };\n * @endcode\n */\nclass ClGcalcli : public smacc2::ISmaccClient\n{\npublic:\n  ClGcalcli();\n  explicit ClGcalcli(const GcalcliConfig & config);\n  virtual ~ClGcalcli() = default;\n\n  /**\n   * @brief Set configuration before initialization\n   */\n  void configure(const GcalcliConfig & config);\n\n  /**\n   * @brief Get current configuration\n   */\n  const GcalcliConfig & getConfig() const { return config_; }\n\n  /**\n   * @brief Template method for component initialization with orthogonal context\n   */\n  template <typename TOrthogonal, typename TClient>\n  void onComponentInitialization()\n  {\n    // Create the subprocess executor (from smacc2 core)\n    this->createComponent<\n      smacc2::client_core_components::CpSubprocessExecutor, TOrthogonal, ClGcalcli>();\n\n    // Create gcalcli-specific components\n    auto * connection = this->createComponent<CpGcalcliConnection, TOrthogonal, ClGcalcli>();\n    connection->configure(config_);\n\n    this->createComponent<CpCalendarPoller, TOrthogonal, ClGcalcli>();\n    this->createComponent<CpCalendarEventListener, TOrthogonal, ClGcalcli>();\n\n    RCLCPP_INFO(getLogger(), \"[ClGcalcli] Components created\");\n  }\n\n  // Convenience accessors for components\n  CpGcalcliConnection * getConnection() { return this->getComponent<CpGcalcliConnection>(); }\n\n  CpCalendarPoller * getPoller() { return this->getComponent<CpCalendarPoller>(); }\n\n  CpCalendarEventListener * getEventListener()\n  {\n    return this->getComponent<CpCalendarEventListener>();\n  }\n\nprivate:\n  GcalcliConfig config_;\n};\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/include/cl_gcalcli/client_behaviors/cb_detect_calendar_event.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <string>\n\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\n#include <cl_gcalcli/cl_gcalcli.hpp>\n#include <cl_gcalcli/components/cp_calendar_event_listener.hpp>\n#include <cl_gcalcli/types.hpp>\n\nnamespace cl_gcalcli\n{\n\n/**\n * @brief Async behavior that waits for a calendar event's start time to arrive\n *\n * This behavior configures a watch pattern on the CpCalendarEventListener\n * and waits for an event matching the pattern to start. When the event\n * start time arrives (minus minutes_before), it posts EvCbSuccess.\n *\n * Usage in state:\n * @code\n * static void staticConfigure() {\n *   // Wait for \"Standup\" events, trigger 5 minutes before start\n *   configure<OrCalendar, CbDetectCalendarEvent>(\".*Standup.*\", true, 5);\n * }\n * @endcode\n */\nclass CbDetectCalendarEvent : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  /**\n   * @brief Construct with pattern configuration\n   * @param pattern Pattern to match event titles\n   * @param use_regex If true, use regex matching; if false, substring match\n   * @param minutes_before Trigger N minutes before event starts (0 = at start)\n   */\n  CbDetectCalendarEvent(\n    const std::string & pattern, bool use_regex = false, int minutes_before = 0);\n\n  virtual ~CbDetectCalendarEvent() = default;\n\n  void onEntry() override;\n  void onExit() override;\n\n  /**\n   * @brief Get the detected event (if any)\n   */\n  std::optional<CalendarEvent> getDetectedEvent() const { return detected_event_; }\n\nprivate:\n  /**\n   * @brief Callback when an event starts\n   */\n  void onEventStarted(const CalendarEvent & event);\n\n  std::string pattern_;\n  bool use_regex_;\n  int minutes_before_;\n\n  CpCalendarEventListener * listener_;\n  ClGcalcli * client_;\n\n  std::optional<CalendarEvent> detected_event_;\n  bool triggered_;\n};\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/include/cl_gcalcli/client_behaviors/cb_event_detect.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <string>\n\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\n#include <cl_gcalcli/cl_gcalcli.hpp>\n#include <cl_gcalcli/components/cp_calendar_event_listener.hpp>\n#include <cl_gcalcli/types.hpp>\n\nnamespace cl_gcalcli\n{\n\n/**\n * @brief Async behavior that waits for a calendar event's start time to arrive\n *\n * This behavior configures a watch pattern on the CpCalendarEventListener\n * and waits for an event matching the pattern to start. When the event\n * start time arrives (minus minutes_before), it posts EvCbSuccess.\n *\n * Usage in state:\n * @code\n * static void staticConfigure() {\n *   // Wait for \"Standup\" events, trigger 5 minutes before start\n *   configure<OrCalendar, CbEventDetect>(\".*Standup.*\", true, 5);\n * }\n * @endcode\n */\nclass CbEventDetect : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  /**\n   * @brief Construct with pattern configuration\n   * @param pattern Pattern to match event titles\n   * @param use_regex If true, use regex matching; if false, substring match\n   * @param minutes_before Trigger N minutes before event starts (0 = at start)\n   */\n  CbEventDetect(const std::string & pattern, bool use_regex = false, int minutes_before = 0);\n\n  virtual ~CbEventDetect() = default;\n\n  void onEntry() override;\n  void onExit() override;\n\n  /**\n   * @brief Get the detected event (if any)\n   */\n  std::optional<CalendarEvent> getDetectedEvent() const { return detected_event_; }\n\nprivate:\n  /**\n   * @brief Callback when an event starts\n   */\n  void onEventStarted(const CalendarEvent & event);\n\n  std::string pattern_;\n  bool use_regex_;\n  int minutes_before_;\n\n  CpCalendarEventListener * listener_;\n  ClGcalcli * client_;\n\n  std::optional<CalendarEvent> detected_event_;\n  bool triggered_;\n};\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/include/cl_gcalcli/client_behaviors/cb_monitor_connection.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc_client_behavior.hpp>\n#include <smacc2/smacc_updatable.hpp>\n\n#include <cl_gcalcli/cl_gcalcli.hpp>\n#include <cl_gcalcli/components/cp_gcalcli_connection.hpp>\n\nnamespace cl_gcalcli\n{\n\n/**\n * @brief Sync behavior that continuously monitors connection health\n *\n * This behavior connects to connection state signals and posts\n * EvConnectionLost events when the connection is lost. Use it\n * alongside other behaviors to handle connection failures.\n */\nclass CbMonitorConnection : public smacc2::SmaccClientBehavior\n{\npublic:\n  CbMonitorConnection() = default;\n  virtual ~CbMonitorConnection() = default;\n\n  void onEntry() override;\n  void onExit() override;\n\nprivate:\n  void onConnectionLost();\n  void onConnectionRestored();\n\n  ClGcalcli * client_;\n  CpGcalcliConnection * connection_;\n};\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/include/cl_gcalcli/client_behaviors/cb_quick_add.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <string>\n\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\n#include <cl_gcalcli/cl_gcalcli.hpp>\n\nnamespace cl_gcalcli\n{\n\n/**\n * @brief Async behavior that adds an event using gcalcli quick add\n *\n * This behavior uses gcalcli's \"quick\" command to add events using\n * natural language. Posts success on completion or failure on error.\n *\n * Example:\n * @code\n * configure<OrCalendar, CbQuickAdd>(\"Team meeting tomorrow at 3pm for 1 hour\");\n * @endcode\n */\nclass CbQuickAdd : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  /**\n   * @brief Construct with event description\n   * @param text Natural language event description\n   * @param calendar Optional specific calendar name\n   */\n  explicit CbQuickAdd(const std::string & text, const std::string & calendar = \"\");\n\n  virtual ~CbQuickAdd() = default;\n\n  void onEntry() override;\n\nprivate:\n  std::string text_;\n  std::string calendar_;\n  ClGcalcli * client_;\n};\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/include/cl_gcalcli/client_behaviors/cb_refresh_agenda.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc_client_behavior.hpp>\n\n#include <cl_gcalcli/cl_gcalcli.hpp>\n\nnamespace cl_gcalcli\n{\n\n/**\n * @brief Sync behavior that forces an immediate agenda refresh\n *\n * This behavior triggers an immediate refresh of the calendar agenda\n * without waiting for the next poll interval.\n */\nclass CbRefreshAgenda : public smacc2::SmaccClientBehavior\n{\npublic:\n  CbRefreshAgenda() = default;\n  virtual ~CbRefreshAgenda() = default;\n\n  void onEntry() override;\n\n  /**\n   * @brief Check if refresh was successful\n   */\n  bool wasSuccessful() const { return success_; }\n\nprivate:\n  ClGcalcli * client_;\n  bool success_;\n};\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/include/cl_gcalcli/client_behaviors/cb_status.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <vector>\n\n#include <smacc2/smacc_client_behavior.hpp>\n\n#include <cl_gcalcli/cl_gcalcli.hpp>\n#include <cl_gcalcli/types.hpp>\n\nnamespace cl_gcalcli\n{\n\n/**\n * @brief Sync behavior that retrieves current calendar status\n *\n * This behavior provides a snapshot of the current connection state\n * and calendar events. Use it to check system status on state entry.\n */\nclass CbStatus : public smacc2::SmaccClientBehavior\n{\npublic:\n  CbStatus() = default;\n  virtual ~CbStatus() = default;\n\n  void onEntry() override;\n\n  /**\n   * @brief Get the connection state captured on entry\n   */\n  ConnectionState getConnectionState() const { return connection_state_; }\n\n  /**\n   * @brief Check if connected\n   */\n  bool isConnected() const { return connection_state_ == ConnectionState::CONNECTED; }\n\n  /**\n   * @brief Get events captured on entry\n   */\n  std::vector<CalendarEvent> getEvents() const { return events_; }\n\n  /**\n   * @brief Get currently active events\n   */\n  std::vector<CalendarEvent> getActiveEvents() const { return active_events_; }\n\nprivate:\n  ClGcalcli * client_;\n  ConnectionState connection_state_;\n  std::vector<CalendarEvent> events_;\n  std::vector<CalendarEvent> active_events_;\n};\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/include/cl_gcalcli/client_behaviors/cb_wait_connection.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\n#include <cl_gcalcli/cl_gcalcli.hpp>\n\nnamespace cl_gcalcli\n{\n\n/**\n * @brief Async behavior that waits for gcalcli connection\n *\n * This behavior attempts to establish a connection to Google Calendar\n * via gcalcli and posts success when connected or failure on timeout.\n */\nclass CbWaitConnection : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  /**\n   * @brief Construct with optional timeout\n   * @param timeout Maximum time to wait for connection\n   */\n  explicit CbWaitConnection(std::chrono::seconds timeout = std::chrono::seconds{30});\n\n  virtual ~CbWaitConnection() = default;\n\n  void onEntry() override;\n\nprivate:\n  std::chrono::seconds timeout_;\n  ClGcalcli * client_;\n};\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/include/cl_gcalcli/client_behaviors.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n/**\n * @file client_behaviors.hpp\n * @brief Convenience header that includes all cl_gcalcli client behaviors\n */\n\n#include <cl_gcalcli/client_behaviors/cb_detect_calendar_event.hpp>\n#include <cl_gcalcli/client_behaviors/cb_monitor_connection.hpp>\n#include <cl_gcalcli/client_behaviors/cb_quick_add.hpp>\n#include <cl_gcalcli/client_behaviors/cb_refresh_agenda.hpp>\n#include <cl_gcalcli/client_behaviors/cb_status.hpp>\n#include <cl_gcalcli/client_behaviors/cb_wait_connection.hpp>\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/include/cl_gcalcli/components/cp_calendar_event_listener.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <functional>\n#include <mutex>\n#include <set>\n#include <string>\n#include <vector>\n\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc.hpp>\n\n#include <cl_gcalcli/components/cp_calendar_poller.hpp>\n#include <cl_gcalcli/events.hpp>\n#include <cl_gcalcli/types.hpp>\n\nnamespace cl_gcalcli\n{\n\n/**\n * @brief Component that listens for calendar events and triggers notifications\n *\n * This component subscribes to the CpCalendarPoller and monitors events\n * against configured watch patterns. It triggers events when:\n * - An event matching a pattern is detected (EvCalendarEventDetected)\n * - A watched event starts (EvCalendarEventStarted)\n * - A watched event ends (EvCalendarEventEnded)\n *\n * The component tracks triggered events to prevent duplicate notifications.\n */\nclass CpCalendarEventListener : public smacc2::ISmaccComponent, public smacc2::ISmaccUpdatable\n{\npublic:\n  CpCalendarEventListener();\n  virtual ~CpCalendarEventListener() = default;\n\n  void onInitialize() override;\n\n  /**\n   * @brief Add a watch pattern for event detection\n   */\n  void addWatch(const EventWatch & watch);\n\n  /**\n   * @brief Remove all watch patterns\n   */\n  void clearWatches();\n\n  /**\n   * @brief Get all configured watch patterns\n   */\n  std::vector<EventWatch> getWatches() const;\n\n  /**\n   * @brief Reset triggered event tracking (allows re-triggering)\n   */\n  void resetTriggeredEvents();\n\n  // Signals\n  smacc2::SmaccSignal<void(const CalendarEvent &, const std::string &)> onEventDetected_;\n  smacc2::SmaccSignal<void(const CalendarEvent &)> onEventStarted_;\n  smacc2::SmaccSignal<void(const CalendarEvent &)> onEventEnded_;\n\n  // Signal connection helpers\n  template <typename T>\n  smacc2::SmaccSignalConnection onEventDetected(\n    void (T::*callback)(const CalendarEvent &, const std::string &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onEventDetected_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onEventStarted(\n    void (T::*callback)(const CalendarEvent &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onEventStarted_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onEventEnded(void (T::*callback)(const CalendarEvent &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onEventEnded_, callback, object);\n  }\n\n  // Event posting functions - set via onStateOrthogonalAllocation\n  std::function<void(const CalendarEvent &, const std::string &)> postEventDetectedEvent_;\n  std::function<void(const CalendarEvent &)> postEventStartedEvent_;\n  std::function<void(const CalendarEvent &)> postEventEndedEvent_;\n\n  /**\n   * @brief Template method for type-safe event posting setup\n   */\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    postEventDetectedEvent_ = [this](const CalendarEvent & event, const std::string & pattern)\n    {\n      auto ev = new EvCalendarEventDetected<CpCalendarEventListener, TOrthogonal>();\n      ev->event = event;\n      ev->matched_pattern = pattern;\n      this->postEvent(ev);\n    };\n\n    postEventStartedEvent_ = [this](const CalendarEvent & event)\n    {\n      auto ev = new EvCalendarEventStarted<CpCalendarEventListener, TOrthogonal>();\n      ev->event = event;\n      this->postEvent(ev);\n    };\n\n    postEventEndedEvent_ = [this](const CalendarEvent & event)\n    {\n      auto ev = new EvCalendarEventEnded<CpCalendarEventListener, TOrthogonal>();\n      ev->event = event;\n      this->postEvent(ev);\n    };\n  }\n\nprotected:\n  /**\n   * @brief Periodic update for event time checking (called by SignalDetector)\n   */\n  void update() override;\n\nprivate:\n  /**\n   * @brief Handle agenda update from poller\n   */\n  void onAgendaUpdated(const std::vector<CalendarEvent> & events);\n\n  /**\n   * @brief Check if an event matches a watch pattern\n   */\n  bool matchesPattern(const CalendarEvent & event, const EventWatch & watch) const;\n\n  /**\n   * @brief Check if event start should trigger\n   */\n  bool shouldTriggerStart(const CalendarEvent & event, const EventWatch & watch) const;\n\n  /**\n   * @brief Check if event end should trigger\n   */\n  bool shouldTriggerEnd(const CalendarEvent & event, const EventWatch & watch) const;\n\n  /**\n   * @brief Generate a key for tracking triggered events\n   */\n  std::string getTriggeredKey(const CalendarEvent & event, const std::string & trigger_type) const;\n\n  CpCalendarPoller * poller_;\n  std::vector<EventWatch> watches_;\n  std::set<std::string> triggered_events_;  // Tracks which events have been triggered\n  std::vector<CalendarEvent> current_events_;\n  bool initialized_;\n\n  mutable std::mutex mutex_;\n};\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/include/cl_gcalcli/components/cp_calendar_poller.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <functional>\n#include <mutex>\n#include <string>\n#include <vector>\n\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc.hpp>\n\n#include <cl_gcalcli/components/cp_gcalcli_connection.hpp>\n#include <cl_gcalcli/events.hpp>\n#include <cl_gcalcli/types.hpp>\n\nnamespace cl_gcalcli\n{\n\n/**\n * @brief Component that polls Google Calendar and parses event data\n *\n * This component periodically fetches the agenda from Google Calendar\n * using gcalcli's TSV output format and parses it into CalendarEvent\n * structures.\n *\n * TSV Format:\n * Start_Date | Start_Time | End_Date | End_Time | Title | Location | Description | Calendar\n */\nclass CpCalendarPoller : public smacc2::ISmaccComponent, public smacc2::ISmaccUpdatable\n{\npublic:\n  CpCalendarPoller();\n  virtual ~CpCalendarPoller() = default;\n\n  void onInitialize() override;\n\n  /**\n   * @brief Force an immediate agenda refresh\n   * @return true if refresh was successful\n   */\n  bool refreshAgenda();\n\n  /**\n   * @brief Get cached list of calendar events\n   */\n  std::vector<CalendarEvent> getEvents() const;\n\n  /**\n   * @brief Get events matching a title pattern\n   * @param pattern Pattern to match (regex or exact based on use_regex)\n   * @param use_regex If true, use regex matching\n   */\n  std::vector<CalendarEvent> findEvents(const std::string & pattern, bool use_regex = false) const;\n\n  /**\n   * @brief Get events happening within a time window\n   */\n  std::vector<CalendarEvent> getEventsInWindow(\n    std::chrono::system_clock::time_point start, std::chrono::system_clock::time_point end) const;\n\n  /**\n   * @brief Get currently active events\n   */\n  std::vector<CalendarEvent> getActiveEvents() const;\n\n  /**\n   * @brief Get the time of the last successful poll\n   */\n  std::chrono::system_clock::time_point getLastPollTime() const;\n\n  // Signal for agenda updates\n  smacc2::SmaccSignal<void(const std::vector<CalendarEvent> &)> onAgendaUpdated_;\n\n  // Signal connection helper\n  template <typename T>\n  smacc2::SmaccSignalConnection onAgendaUpdated(\n    void (T::*callback)(const std::vector<CalendarEvent> &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onAgendaUpdated_, callback, object);\n  }\n\n  // Event posting function - set via onStateOrthogonalAllocation\n  std::function<void(const std::vector<CalendarEvent> &)> postAgendaUpdatedEvent_;\n\n  /**\n   * @brief Template method for type-safe event posting setup\n   */\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    postAgendaUpdatedEvent_ = [this](const std::vector<CalendarEvent> & events)\n    {\n      auto ev = new EvAgendaUpdated<CpCalendarPoller, TOrthogonal>();\n      ev->events = events;\n      this->postEvent(ev);\n    };\n  }\n\nprotected:\n  /**\n   * @brief Periodic update for polling (called by SignalDetector)\n   */\n  void update() override;\n\nprivate:\n  /**\n   * @brief Parse TSV output into CalendarEvent structures\n   */\n  std::vector<CalendarEvent> parseTsvOutput(const std::string & output);\n\n  /**\n   * @brief Parse a single TSV line into a CalendarEvent\n   */\n  std::optional<CalendarEvent> parseTsvLine(const std::string & line);\n\n  /**\n   * @brief Parse date and time strings into time_point\n   * @param date_str Date string (MM/DD/YYYY or similar)\n   * @param time_str Time string (HH:MM or similar)\n   */\n  std::optional<std::chrono::system_clock::time_point> parseDateTime(\n    const std::string & date_str, const std::string & time_str);\n\n  /**\n   * @brief Generate a unique ID for an event\n   */\n  std::string generateEventId(const CalendarEvent & event);\n\n  CpGcalcliConnection * connection_;\n  std::vector<CalendarEvent> cached_events_;\n  std::chrono::system_clock::time_point last_poll_time_;\n  std::chrono::steady_clock::time_point last_poll_attempt_;\n  bool initialized_;\n\n  mutable std::mutex events_mutex_;\n};\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/include/cl_gcalcli/components/cp_gcalcli_connection.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <functional>\n#include <mutex>\n#include <string>\n\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/client_core_components/cp_subprocess_executor.hpp>\n#include <smacc2/smacc.hpp>\n\n#include <cl_gcalcli/events.hpp>\n#include <cl_gcalcli/types.hpp>\n\nnamespace cl_gcalcli\n{\n\n/**\n * @brief Component that manages gcalcli connection health\n *\n * This component monitors the connection to Google Calendar via gcalcli.\n * It performs periodic heartbeat checks using \"gcalcli list\" and tracks\n * consecutive failures. After max_consecutive_failures, it emits\n * EvConnectionLost events.\n *\n * The component uses CpSubprocessExecutor from smacc2 core for command execution.\n */\nclass CpGcalcliConnection : public smacc2::ISmaccComponent, public smacc2::ISmaccUpdatable\n{\npublic:\n  CpGcalcliConnection();\n  virtual ~CpGcalcliConnection() = default;\n\n  void onInitialize() override;\n\n  /**\n   * @brief Configure the gcalcli connection parameters\n   */\n  void configure(const GcalcliConfig & config);\n\n  /**\n   * @brief Get current connection state\n   */\n  ConnectionState getConnectionState() const;\n\n  /**\n   * @brief Check if connected to Google Calendar\n   */\n  bool isConnected() const;\n\n  /**\n   * @brief Manually trigger a connection check\n   * @return true if connection succeeded\n   */\n  bool checkConnection();\n\n  /**\n   * @brief Restart connection after failure\n   */\n  void restartConnection();\n\n  /**\n   * @brief Execute a gcalcli command\n   * @param args Command arguments (e.g., \"agenda --tsv\")\n   * @param timeout_ms Command timeout in milliseconds\n   * @return SubprocessResult with output and exit code\n   */\n  smacc2::client_core_components::SubprocessResult executeGcalcli(\n    const std::string & args, int timeout_ms = 30000);\n\n  /**\n   * @brief Get the gcalcli configuration\n   */\n  const GcalcliConfig & getConfig() const { return config_; }\n\n  // Signals\n  smacc2::SmaccSignal<void()> onConnectionLost_;\n  smacc2::SmaccSignal<void()> onConnectionRestored_;\n  smacc2::SmaccSignal<void()> onAuthenticationRequired_;\n\n  // Signal connection helpers\n  template <typename T>\n  smacc2::SmaccSignalConnection onConnectionLost(void (T::*callback)(), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onConnectionLost_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onConnectionRestored(void (T::*callback)(), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onConnectionRestored_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onAuthenticationRequired(void (T::*callback)(), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(\n      onAuthenticationRequired_, callback, object);\n  }\n\n  // Event posting function - set via onStateOrthogonalAllocation\n  std::function<void()> postConnectionLostEvent_;\n  std::function<void()> postConnectionRestoredEvent_;\n  std::function<void()> postAuthenticationRequiredEvent_;\n\n  /**\n   * @brief Template method for type-safe event posting setup\n   */\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    postConnectionLostEvent_ = [this]()\n    { this->postEvent<EvConnectionLost<CpGcalcliConnection, TOrthogonal>>(); };\n\n    postConnectionRestoredEvent_ = [this]()\n    { this->postEvent<EvConnectionRestored<CpGcalcliConnection, TOrthogonal>>(); };\n\n    postAuthenticationRequiredEvent_ = [this]()\n    { this->postEvent<EvAuthenticationRequired<CpGcalcliConnection, TOrthogonal>>(); };\n  }\n\nprotected:\n  /**\n   * @brief Periodic update for heartbeat (called by SignalDetector)\n   */\n  void update() override;\n\nprivate:\n  /**\n   * @brief Perform the heartbeat check\n   */\n  void performHeartbeat();\n\n  /**\n   * @brief Handle connection state change\n   */\n  void handleConnectionStateChange(bool success, const std::string & output);\n\n  /**\n   * @brief Check if output indicates authentication failure\n   */\n  bool isAuthenticationError(const std::string & output) const;\n\n  GcalcliConfig config_;\n  ConnectionState connection_state_;\n  int consecutive_failures_;\n  bool initialized_;\n\n  std::chrono::steady_clock::time_point last_heartbeat_time_;\n\n  smacc2::client_core_components::CpSubprocessExecutor * subprocess_executor_;\n  mutable std::mutex state_mutex_;\n};\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/include/cl_gcalcli/events.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <boost/statechart/event.hpp>\n#include <string>\n#include <vector>\n\n#include <cl_gcalcli/types.hpp>\n\nnamespace cl_gcalcli\n{\nnamespace sc = boost::statechart;\n\n/**\n * @brief Event posted when gcalcli connection is lost\n *\n * Posted after consecutive failures exceed max_consecutive_failures.\n */\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvConnectionLost : sc::event<EvConnectionLost<TSource, TOrthogonal>>\n{\n};\n\n/**\n * @brief Event posted when gcalcli connection is restored\n *\n * Posted when connection succeeds after being in a lost state.\n */\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvConnectionRestored : sc::event<EvConnectionRestored<TSource, TOrthogonal>>\n{\n};\n\n/**\n * @brief Event posted when gcalcli authentication is required\n *\n * Posted when gcalcli returns an authentication error.\n */\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvAuthenticationRequired : sc::event<EvAuthenticationRequired<TSource, TOrthogonal>>\n{\n};\n\n/**\n * @brief Event posted when a calendar event matches a watched pattern\n *\n * This is triggered when an event matching the configured pattern is\n * approaching (based on minutes_before setting).\n */\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvCalendarEventDetected : sc::event<EvCalendarEventDetected<TSource, TOrthogonal>>\n{\n  CalendarEvent event;\n  std::string matched_pattern;\n};\n\n/**\n * @brief Event posted when a calendar event starts\n *\n * This is triggered when the current time reaches the event start time\n * (or minutes_before if configured).\n */\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvCalendarEventStarted : sc::event<EvCalendarEventStarted<TSource, TOrthogonal>>\n{\n  CalendarEvent event;\n};\n\n/**\n * @brief Event posted when a calendar event ends\n *\n * This is triggered when the current time reaches the event end time.\n */\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvCalendarEventEnded : sc::event<EvCalendarEventEnded<TSource, TOrthogonal>>\n{\n  CalendarEvent event;\n};\n\n/**\n * @brief Event posted when the agenda is updated\n *\n * Contains the full list of upcoming calendar events from the last poll.\n */\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvAgendaUpdated : sc::event<EvAgendaUpdated<TSource, TOrthogonal>>\n{\n  std::vector<CalendarEvent> events;\n};\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/include/cl_gcalcli/types.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <optional>\n#include <string>\n#include <vector>\n\nnamespace cl_gcalcli\n{\n\n/**\n * @brief Connection state for gcalcli\n */\nenum class ConnectionState\n{\n  CONNECTED,\n  DISCONNECTED,\n  AUTHENTICATING,\n  ERROR\n};\n\n/**\n * @brief Represents a Google Calendar event\n */\nstruct CalendarEvent\n{\n  std::string id;\n  std::string title;\n  std::string calendar_name;\n  std::string location;\n  std::string description;\n  std::chrono::system_clock::time_point start_time;\n  std::chrono::system_clock::time_point end_time;\n  bool is_all_day = false;\n\n  /**\n   * @brief Check if the event is currently active (ongoing)\n   */\n  bool isActiveNow() const\n  {\n    auto now = std::chrono::system_clock::now();\n    return now >= start_time && now < end_time;\n  }\n\n  /**\n   * @brief Check if the event has started within the last N minutes\n   */\n  bool hasStartedWithinMinutes(int minutes) const\n  {\n    auto now = std::chrono::system_clock::now();\n    auto window_start = start_time - std::chrono::minutes(minutes);\n    return now >= window_start && now < end_time;\n  }\n\n  /**\n   * @brief Check if the event will start within the next N minutes\n   */\n  bool willStartWithinMinutes(int minutes) const\n  {\n    auto now = std::chrono::system_clock::now();\n    return now < start_time && now >= (start_time - std::chrono::minutes(minutes));\n  }\n\n  /**\n   * @brief Check if the event has ended\n   */\n  bool hasEnded() const\n  {\n    auto now = std::chrono::system_clock::now();\n    return now >= end_time;\n  }\n\n  /**\n   * @brief Get minutes until event starts (negative if already started)\n   */\n  int minutesUntilStart() const\n  {\n    auto now = std::chrono::system_clock::now();\n    auto diff = std::chrono::duration_cast<std::chrono::minutes>(start_time - now);\n    return static_cast<int>(diff.count());\n  }\n};\n\n/**\n * @brief Configuration for gcalcli client\n */\nstruct GcalcliConfig\n{\n  /// Path to gcalcli executable (default: \"gcalcli\" from PATH)\n  std::string gcalcli_path = \"gcalcli\";\n\n  /// Optional config folder for gcalcli (if not using default)\n  std::optional<std::string> config_folder;\n\n  /// Calendars to monitor (empty = all calendars)\n  std::vector<std::string> calendars;\n\n  /// How often to poll for agenda updates\n  std::chrono::seconds poll_interval{30};\n\n  /// How often to check connection health (heartbeat)\n  std::chrono::seconds heartbeat_interval{60};\n\n  /// Number of days ahead to fetch in agenda\n  int agenda_days = 7;\n\n  /// Number of consecutive failures before connection is considered lost\n  int max_consecutive_failures = 3;\n};\n\n/**\n * @brief Event watch configuration for CpCalendarEventListener\n */\nstruct EventWatch\n{\n  /// Pattern to match event titles (regex or exact)\n  std::string pattern;\n\n  /// True = regex matching, False = exact string matching\n  bool use_regex = false;\n\n  /// Trigger N minutes before event starts (0 = at start time)\n  int minutes_before = 0;\n\n  /// Post event when event starts\n  bool trigger_on_start = true;\n\n  /// Post event when event ends\n  bool trigger_on_end = false;\n\n  /// Keep watching (true) or one-shot (false)\n  bool continuous = false;\n};\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>cl_gcalcli</name>\n  <version>1.0.0</version>\n  <description>SMACC2 client library for Google Calendar integration via gcalcli</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/src/cl_gcalcli/cl_gcalcli.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_gcalcli/cl_gcalcli.hpp>\n\nnamespace cl_gcalcli\n{\n\nClGcalcli::ClGcalcli() {}\n\nClGcalcli::ClGcalcli(const GcalcliConfig & config) : config_(config) {}\n\nvoid ClGcalcli::configure(const GcalcliConfig & config) { config_ = config; }\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/src/cl_gcalcli/client_behaviors/cb_detect_calendar_event.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_gcalcli/client_behaviors/cb_detect_calendar_event.hpp>\n\n#include <algorithm>\n\n#include <boost/regex.hpp>\n\nnamespace cl_gcalcli\n{\n\nCbDetectCalendarEvent::CbDetectCalendarEvent(\n  const std::string & pattern, bool use_regex, int minutes_before)\n: pattern_(pattern),\n  use_regex_(use_regex),\n  minutes_before_(minutes_before),\n  listener_(nullptr),\n  client_(nullptr),\n  triggered_(false)\n{\n}\n\nvoid CbDetectCalendarEvent::onEntry()\n{\n  RCLCPP_INFO(\n    getLogger(),\n    \"[CbDetectCalendarEvent] Waiting for event matching pattern '%s' (regex=%s, minutes_before=%d)\",\n    pattern_.c_str(), use_regex_ ? \"true\" : \"false\", minutes_before_);\n\n  // Get the client and listener component\n  this->requiresClient(client_);\n  if (client_)\n  {\n    listener_ = client_->getEventListener();\n  }\n\n  if (!listener_)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CbDetectCalendarEvent] CpCalendarEventListener not available\");\n    this->postFailureEvent();\n    return;\n  }\n\n  // Reset triggered events to allow re-detection\n  listener_->resetTriggeredEvents();\n\n  // Configure the watch\n  EventWatch watch;\n  watch.pattern = pattern_;\n  watch.use_regex = use_regex_;\n  watch.minutes_before = minutes_before_;\n  watch.trigger_on_start = true;\n  watch.trigger_on_end = false;\n  watch.continuous = false;\n\n  listener_->addWatch(watch);\n\n  // Connect to the event started signal\n  listener_->onEventStarted(&CbDetectCalendarEvent::onEventStarted, this);\n}\n\nvoid CbDetectCalendarEvent::onExit()\n{\n  RCLCPP_DEBUG(getLogger(), \"[CbDetectCalendarEvent] Exiting\");\n}\n\nvoid CbDetectCalendarEvent::onEventStarted(const CalendarEvent & event)\n{\n  if (triggered_)\n  {\n    return;  // Already triggered\n  }\n\n  // Check if this event matches our pattern\n  bool matches = false;\n  if (use_regex_)\n  {\n    try\n    {\n      boost::regex regex(pattern_, boost::regex::icase);\n      matches = boost::regex_search(event.title, regex);\n    }\n    catch (const boost::regex_error &)\n    {\n      matches = false;\n    }\n  }\n  else\n  {\n    std::string title_lower = event.title;\n    std::string pattern_lower = pattern_;\n    std::transform(title_lower.begin(), title_lower.end(), title_lower.begin(), ::tolower);\n    std::transform(pattern_lower.begin(), pattern_lower.end(), pattern_lower.begin(), ::tolower);\n    matches = title_lower.find(pattern_lower) != std::string::npos;\n  }\n\n  if (matches)\n  {\n    triggered_ = true;\n    detected_event_ = event;\n\n    RCLCPP_INFO(getLogger(), \"[CbDetectCalendarEvent] Event detected: %s\", event.title.c_str());\n\n    this->postSuccessEvent();\n  }\n}\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/src/cl_gcalcli/client_behaviors/cb_event_detect.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_gcalcli/client_behaviors/cb_event_detect.hpp>\n\n#include <algorithm>\n\n#include <boost/regex.hpp>\n\nnamespace cl_gcalcli\n{\n\nCbEventDetect::CbEventDetect(const std::string & pattern, bool use_regex, int minutes_before)\n: pattern_(pattern),\n  use_regex_(use_regex),\n  minutes_before_(minutes_before),\n  listener_(nullptr),\n  client_(nullptr),\n  triggered_(false)\n{\n}\n\nvoid CbEventDetect::onEntry()\n{\n  RCLCPP_INFO(\n    getLogger(),\n    \"[CbEventDetect] Waiting for event matching pattern '%s' (regex=%s, minutes_before=%d)\",\n    pattern_.c_str(), use_regex_ ? \"true\" : \"false\", minutes_before_);\n\n  // Get the client and listener component\n  this->requiresClient(client_);\n  if (client_)\n  {\n    listener_ = client_->getEventListener();\n  }\n\n  if (!listener_)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CbEventDetect] CpCalendarEventListener not available\");\n    this->postFailureEvent();\n    return;\n  }\n\n  // Reset triggered events to allow re-detection\n  listener_->resetTriggeredEvents();\n\n  // Configure the watch\n  EventWatch watch;\n  watch.pattern = pattern_;\n  watch.use_regex = use_regex_;\n  watch.minutes_before = minutes_before_;\n  watch.trigger_on_start = true;\n  watch.trigger_on_end = false;\n  watch.continuous = false;\n\n  listener_->addWatch(watch);\n\n  // Connect to the event started signal\n  listener_->onEventStarted(&CbEventDetect::onEventStarted, this);\n}\n\nvoid CbEventDetect::onExit() { RCLCPP_DEBUG(getLogger(), \"[CbEventDetect] Exiting\"); }\n\nvoid CbEventDetect::onEventStarted(const CalendarEvent & event)\n{\n  if (triggered_)\n  {\n    return;  // Already triggered\n  }\n\n  // Check if this event matches our pattern\n  bool matches = false;\n  if (use_regex_)\n  {\n    try\n    {\n      boost::regex regex(pattern_, boost::regex::icase);\n      matches = boost::regex_search(event.title, regex);\n    }\n    catch (const boost::regex_error &)\n    {\n      matches = false;\n    }\n  }\n  else\n  {\n    std::string title_lower = event.title;\n    std::string pattern_lower = pattern_;\n    std::transform(title_lower.begin(), title_lower.end(), title_lower.begin(), ::tolower);\n    std::transform(pattern_lower.begin(), pattern_lower.end(), pattern_lower.begin(), ::tolower);\n    matches = title_lower.find(pattern_lower) != std::string::npos;\n  }\n\n  if (matches)\n  {\n    triggered_ = true;\n    detected_event_ = event;\n\n    RCLCPP_INFO(getLogger(), \"[CbEventDetect] Event detected: %s\", event.title.c_str());\n\n    this->postSuccessEvent();\n  }\n}\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/src/cl_gcalcli/client_behaviors/cb_monitor_connection.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_gcalcli/client_behaviors/cb_monitor_connection.hpp>\n\nnamespace cl_gcalcli\n{\n\nvoid CbMonitorConnection::onEntry()\n{\n  RCLCPP_INFO(getLogger(), \"[CbMonitorConnection] Starting connection monitoring\");\n\n  this->requiresClient(client_);\n\n  if (!client_)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CbMonitorConnection] ClGcalcli client not available\");\n    return;\n  }\n\n  connection_ = client_->getConnection();\n  if (!connection_)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CbMonitorConnection] CpGcalcliConnection not available\");\n    return;\n  }\n\n  // Connect to connection state signals\n  connection_->onConnectionLost(&CbMonitorConnection::onConnectionLost, this);\n  connection_->onConnectionRestored(&CbMonitorConnection::onConnectionRestored, this);\n}\n\nvoid CbMonitorConnection::onExit()\n{\n  RCLCPP_DEBUG(getLogger(), \"[CbMonitorConnection] Stopping connection monitoring\");\n}\n\nvoid CbMonitorConnection::onConnectionLost()\n{\n  RCLCPP_WARN(getLogger(), \"[CbMonitorConnection] Connection lost detected\");\n}\n\nvoid CbMonitorConnection::onConnectionRestored()\n{\n  RCLCPP_INFO(getLogger(), \"[CbMonitorConnection] Connection restored\");\n}\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/src/cl_gcalcli/client_behaviors/cb_quick_add.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_gcalcli/client_behaviors/cb_quick_add.hpp>\n\nnamespace cl_gcalcli\n{\n\nCbQuickAdd::CbQuickAdd(const std::string & text, const std::string & calendar)\n: text_(text), calendar_(calendar), client_(nullptr)\n{\n}\n\nvoid CbQuickAdd::onEntry()\n{\n  RCLCPP_INFO(getLogger(), \"[CbQuickAdd] Adding event: %s\", text_.c_str());\n\n  this->requiresClient(client_);\n\n  if (!client_)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CbQuickAdd] ClGcalcli client not available\");\n    this->postFailureEvent();\n    return;\n  }\n\n  auto * connection = client_->getConnection();\n  if (!connection)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CbQuickAdd] CpGcalcliConnection not available\");\n    this->postFailureEvent();\n    return;\n  }\n\n  // Build the quick add command\n  std::string args = \"quick\";\n\n  if (!calendar_.empty())\n  {\n    args += \" --calendar \\\"\" + calendar_ + \"\\\"\";\n  }\n\n  // Escape the text for shell\n  std::string escaped_text = text_;\n  // Replace double quotes with escaped quotes\n  size_t pos = 0;\n  while ((pos = escaped_text.find('\"', pos)) != std::string::npos)\n  {\n    escaped_text.replace(pos, 1, \"\\\\\\\"\");\n    pos += 2;\n  }\n\n  args += \" \\\"\" + escaped_text + \"\\\"\";\n\n  auto result = connection->executeGcalcli(args, 30000);\n\n  if (result.exit_code == 0 && !result.timed_out)\n  {\n    RCLCPP_INFO(getLogger(), \"[CbQuickAdd] Event added successfully\");\n    this->postSuccessEvent();\n  }\n  else\n  {\n    RCLCPP_ERROR(getLogger(), \"[CbQuickAdd] Failed to add event: %s\", result.stdout_output.c_str());\n    this->postFailureEvent();\n  }\n}\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/src/cl_gcalcli/client_behaviors/cb_refresh_agenda.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_gcalcli/client_behaviors/cb_refresh_agenda.hpp>\n\nnamespace cl_gcalcli\n{\n\nvoid CbRefreshAgenda::onEntry()\n{\n  RCLCPP_INFO(getLogger(), \"[CbRefreshAgenda] Refreshing calendar agenda\");\n\n  success_ = false;\n\n  this->requiresClient(client_);\n\n  if (!client_)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CbRefreshAgenda] ClGcalcli client not available\");\n    return;\n  }\n\n  auto * poller = client_->getPoller();\n  if (!poller)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CbRefreshAgenda] CpCalendarPoller not available\");\n    return;\n  }\n\n  success_ = poller->refreshAgenda();\n\n  if (success_)\n  {\n    auto events = poller->getEvents();\n    RCLCPP_INFO(getLogger(), \"[CbRefreshAgenda] Agenda refreshed: %zu events\", events.size());\n  }\n  else\n  {\n    RCLCPP_WARN(getLogger(), \"[CbRefreshAgenda] Agenda refresh failed\");\n  }\n}\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/src/cl_gcalcli/client_behaviors/cb_status.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_gcalcli/client_behaviors/cb_status.hpp>\n\nnamespace cl_gcalcli\n{\n\nvoid CbStatus::onEntry()\n{\n  this->requiresClient(client_);\n\n  if (!client_)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CbStatus] ClGcalcli client not available\");\n    connection_state_ = ConnectionState::ERROR;\n    return;\n  }\n\n  auto * connection = client_->getConnection();\n  auto * poller = client_->getPoller();\n\n  if (connection)\n  {\n    connection_state_ = connection->getConnectionState();\n  }\n  else\n  {\n    connection_state_ = ConnectionState::DISCONNECTED;\n  }\n\n  if (poller)\n  {\n    events_ = poller->getEvents();\n    active_events_ = poller->getActiveEvents();\n  }\n\n  RCLCPP_INFO(\n    getLogger(), \"[CbStatus] Connection: %s, Events: %zu, Active: %zu\",\n    connection_state_ == ConnectionState::CONNECTED        ? \"CONNECTED\"\n    : connection_state_ == ConnectionState::DISCONNECTED   ? \"DISCONNECTED\"\n    : connection_state_ == ConnectionState::AUTHENTICATING ? \"AUTHENTICATING\"\n                                                           : \"ERROR\",\n    events_.size(), active_events_.size());\n}\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/src/cl_gcalcli/client_behaviors/cb_wait_connection.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_gcalcli/client_behaviors/cb_wait_connection.hpp>\n\n#include <thread>\n\nnamespace cl_gcalcli\n{\n\nCbWaitConnection::CbWaitConnection(std::chrono::seconds timeout)\n: timeout_(timeout), client_(nullptr)\n{\n}\n\nvoid CbWaitConnection::onEntry()\n{\n  RCLCPP_INFO(\n    getLogger(), \"[CbWaitConnection] Waiting for gcalcli connection (timeout: %lds)\",\n    timeout_.count());\n\n  this->requiresClient(client_);\n\n  if (!client_)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CbWaitConnection] ClGcalcli client not available\");\n    this->postFailureEvent();\n    return;\n  }\n\n  auto * connection = client_->getConnection();\n  if (!connection)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CbWaitConnection] CpGcalcliConnection not available\");\n    this->postFailureEvent();\n    return;\n  }\n\n  auto start = std::chrono::steady_clock::now();\n  auto deadline = start + timeout_;\n\n  // Poll for connection with increasing backoff\n  std::chrono::milliseconds poll_interval{500};\n  const std::chrono::milliseconds max_interval{5000};\n\n  while (std::chrono::steady_clock::now() < deadline)\n  {\n    // Check if we should force finish\n    if (this->isShutdownRequested())\n    {\n      RCLCPP_INFO(getLogger(), \"[CbWaitConnection] Shutdown requested\");\n      return;\n    }\n\n    if (connection->checkConnection())\n    {\n      RCLCPP_INFO(getLogger(), \"[CbWaitConnection] Connection established\");\n      this->postSuccessEvent();\n      return;\n    }\n\n    // Wait before next attempt\n    std::this_thread::sleep_for(poll_interval);\n\n    // Increase interval with backoff\n    poll_interval = std::min(poll_interval * 2, max_interval);\n  }\n\n  RCLCPP_ERROR(getLogger(), \"[CbWaitConnection] Connection timeout after %lds\", timeout_.count());\n  this->postFailureEvent();\n}\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/src/cl_gcalcli/components/cp_calendar_event_listener.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_gcalcli/components/cp_calendar_event_listener.hpp>\n\n#include <algorithm>\n\n#include <boost/regex.hpp>\n\nnamespace cl_gcalcli\n{\n\nCpCalendarEventListener::CpCalendarEventListener() : poller_(nullptr), initialized_(false) {}\n\nvoid CpCalendarEventListener::onInitialize()\n{\n  if (!initialized_)\n  {\n    requiresComponent(poller_);\n\n    if (poller_ == nullptr)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CpCalendarEventListener] CpCalendarPoller component not found!\");\n      return;\n    }\n\n    // Subscribe to agenda updates\n    poller_->onAgendaUpdated(&CpCalendarEventListener::onAgendaUpdated, this);\n\n    initialized_ = true;\n    RCLCPP_INFO(getLogger(), \"[CpCalendarEventListener] Initialized\");\n  }\n}\n\nvoid CpCalendarEventListener::addWatch(const EventWatch & watch)\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  watches_.push_back(watch);\n  RCLCPP_INFO(\n    getLogger(), \"[CpCalendarEventListener] Added watch pattern: %s (regex=%s)\",\n    watch.pattern.c_str(), watch.use_regex ? \"true\" : \"false\");\n}\n\nvoid CpCalendarEventListener::clearWatches()\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  watches_.clear();\n  RCLCPP_INFO(getLogger(), \"[CpCalendarEventListener] Cleared all watch patterns\");\n}\n\nstd::vector<EventWatch> CpCalendarEventListener::getWatches() const\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  return watches_;\n}\n\nvoid CpCalendarEventListener::resetTriggeredEvents()\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  triggered_events_.clear();\n  RCLCPP_INFO(getLogger(), \"[CpCalendarEventListener] Reset triggered events tracking\");\n}\n\nvoid CpCalendarEventListener::update()\n{\n  if (!initialized_ || !poller_)\n  {\n    return;\n  }\n\n  std::lock_guard<std::mutex> lock(mutex_);\n\n  // Check each watch pattern against current events\n  for (const auto & watch : watches_)\n  {\n    for (const auto & event : current_events_)\n    {\n      if (!matchesPattern(event, watch))\n      {\n        continue;\n      }\n\n      // Check for start trigger\n      if (watch.trigger_on_start && shouldTriggerStart(event, watch))\n      {\n        std::string key = getTriggeredKey(event, \"start\");\n\n        // Check if already triggered (unless continuous mode)\n        if (watch.continuous || triggered_events_.find(key) == triggered_events_.end())\n        {\n          triggered_events_.insert(key);\n\n          RCLCPP_INFO(\n            getLogger(), \"[CpCalendarEventListener] Event start triggered: %s\",\n            event.title.c_str());\n\n          // Emit signals\n          onEventStarted_(event);\n          if (postEventStartedEvent_)\n          {\n            postEventStartedEvent_(event);\n          }\n        }\n      }\n\n      // Check for end trigger\n      if (watch.trigger_on_end && shouldTriggerEnd(event, watch))\n      {\n        std::string key = getTriggeredKey(event, \"end\");\n\n        if (watch.continuous || triggered_events_.find(key) == triggered_events_.end())\n        {\n          triggered_events_.insert(key);\n\n          RCLCPP_INFO(\n            getLogger(), \"[CpCalendarEventListener] Event end triggered: %s\", event.title.c_str());\n\n          onEventEnded_(event);\n          if (postEventEndedEvent_)\n          {\n            postEventEndedEvent_(event);\n          }\n        }\n      }\n    }\n  }\n}\n\nvoid CpCalendarEventListener::onAgendaUpdated(const std::vector<CalendarEvent> & events)\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  current_events_ = events;\n\n  // Check for newly detected events matching patterns\n  for (const auto & watch : watches_)\n  {\n    for (const auto & event : events)\n    {\n      if (matchesPattern(event, watch))\n      {\n        std::string key = getTriggeredKey(event, \"detected\");\n\n        if (watch.continuous || triggered_events_.find(key) == triggered_events_.end())\n        {\n          triggered_events_.insert(key);\n\n          RCLCPP_DEBUG(\n            getLogger(), \"[CpCalendarEventListener] Event detected matching pattern '%s': %s\",\n            watch.pattern.c_str(), event.title.c_str());\n\n          onEventDetected_(event, watch.pattern);\n          if (postEventDetectedEvent_)\n          {\n            postEventDetectedEvent_(event, watch.pattern);\n          }\n        }\n      }\n    }\n  }\n}\n\nbool CpCalendarEventListener::matchesPattern(\n  const CalendarEvent & event, const EventWatch & watch) const\n{\n  if (watch.use_regex)\n  {\n    try\n    {\n      boost::regex regex(watch.pattern, boost::regex::icase);\n      return boost::regex_search(event.title, regex);\n    }\n    catch (const boost::regex_error & e)\n    {\n      RCLCPP_ERROR(\n        getLogger(), \"[CpCalendarEventListener] Invalid regex pattern '%s': %s\",\n        watch.pattern.c_str(), e.what());\n      return false;\n    }\n  }\n  else\n  {\n    // Case-insensitive exact substring match\n    std::string title_lower = event.title;\n    std::string pattern_lower = watch.pattern;\n    std::transform(title_lower.begin(), title_lower.end(), title_lower.begin(), ::tolower);\n    std::transform(pattern_lower.begin(), pattern_lower.end(), pattern_lower.begin(), ::tolower);\n    return title_lower.find(pattern_lower) != std::string::npos;\n  }\n}\n\nbool CpCalendarEventListener::shouldTriggerStart(\n  const CalendarEvent & event, const EventWatch & watch) const\n{\n  auto now = std::chrono::system_clock::now();\n\n  // Calculate the trigger time (start_time - minutes_before)\n  auto trigger_time = event.start_time - std::chrono::minutes(watch.minutes_before);\n\n  // We trigger if:\n  // 1. Current time is at or past the trigger time\n  // 2. Event hasn't ended yet\n  // 3. We're within a reasonable window (not more than minutes_before + 1 minute past start)\n  auto max_trigger_window = event.start_time + std::chrono::minutes(1);\n\n  return now >= trigger_time && now < event.end_time && now <= max_trigger_window;\n}\n\nbool CpCalendarEventListener::shouldTriggerEnd(\n  const CalendarEvent & event, const EventWatch & /* watch */) const\n{\n  auto now = std::chrono::system_clock::now();\n\n  // Trigger end if:\n  // 1. Current time is at or past the end time\n  // 2. We're within a reasonable window (1 minute past end)\n  auto max_trigger_window = event.end_time + std::chrono::minutes(1);\n\n  return now >= event.end_time && now <= max_trigger_window;\n}\n\nstd::string CpCalendarEventListener::getTriggeredKey(\n  const CalendarEvent & event, const std::string & trigger_type) const\n{\n  // Create a unique key combining event ID and trigger type\n  return event.id + \"_\" + trigger_type;\n}\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/src/cl_gcalcli/components/cp_calendar_poller.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_gcalcli/components/cp_calendar_poller.hpp>\n\n#include <boost/regex.hpp>\n#include <iomanip>\n#include <sstream>\n\nnamespace cl_gcalcli\n{\n\nCpCalendarPoller::CpCalendarPoller() : connection_(nullptr), initialized_(false) {}\n\nvoid CpCalendarPoller::onInitialize()\n{\n  if (!initialized_)\n  {\n    requiresComponent(connection_);\n\n    if (connection_ == nullptr)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CpCalendarPoller] CpGcalcliConnection component not found!\");\n      return;\n    }\n\n    last_poll_attempt_ = std::chrono::steady_clock::now();\n    initialized_ = true;\n\n    RCLCPP_INFO(getLogger(), \"[CpCalendarPoller] Initialized\");\n  }\n}\n\nbool CpCalendarPoller::refreshAgenda()\n{\n  if (!connection_ || !connection_->isConnected())\n  {\n    RCLCPP_WARN(getLogger(), \"[CpCalendarPoller] Cannot refresh - not connected\");\n    return false;\n  }\n\n  const auto & config = connection_->getConfig();\n\n  // Build the agenda command with TSV output\n  std::stringstream args;\n  args << \"agenda --tsv --nocolor\";\n  args << \" --nodeclined\";\n\n  // Add date range\n  auto now = std::chrono::system_clock::now();\n  auto end = now + std::chrono::hours(24 * config.agenda_days);\n\n  auto now_t = std::chrono::system_clock::to_time_t(now);\n  auto end_t = std::chrono::system_clock::to_time_t(end);\n\n  std::tm now_tm = *std::localtime(&now_t);\n  std::tm end_tm = *std::localtime(&end_t);\n\n  args << \" \\\"\" << std::put_time(&now_tm, \"%m/%d/%Y\") << \"\\\"\";\n  args << \" \\\"\" << std::put_time(&end_tm, \"%m/%d/%Y\") << \"\\\"\";\n\n  auto result = connection_->executeGcalcli(args.str(), 30000);\n\n  if (result.exit_code != 0 || result.timed_out)\n  {\n    RCLCPP_WARN(\n      getLogger(), \"[CpCalendarPoller] Agenda fetch failed: %s\", result.stdout_output.c_str());\n    return false;\n  }\n\n  // Parse the TSV output\n  auto events = parseTsvOutput(result.stdout_output);\n\n  {\n    std::lock_guard<std::mutex> lock(events_mutex_);\n    cached_events_ = events;\n    last_poll_time_ = std::chrono::system_clock::now();\n  }\n\n  RCLCPP_DEBUG(getLogger(), \"[CpCalendarPoller] Refreshed agenda: %zu events\", events.size());\n\n  // Emit signal and post event\n  onAgendaUpdated_(events);\n  if (postAgendaUpdatedEvent_)\n  {\n    postAgendaUpdatedEvent_(events);\n  }\n\n  return true;\n}\n\nstd::vector<CalendarEvent> CpCalendarPoller::getEvents() const\n{\n  std::lock_guard<std::mutex> lock(events_mutex_);\n  return cached_events_;\n}\n\nstd::vector<CalendarEvent> CpCalendarPoller::findEvents(\n  const std::string & pattern, bool use_regex) const\n{\n  std::lock_guard<std::mutex> lock(events_mutex_);\n\n  std::vector<CalendarEvent> matches;\n\n  if (use_regex)\n  {\n    try\n    {\n      boost::regex regex(pattern, boost::regex::icase);\n      for (const auto & event : cached_events_)\n      {\n        if (boost::regex_search(event.title, regex))\n        {\n          matches.push_back(event);\n        }\n      }\n    }\n    catch (const boost::regex_error & e)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CpCalendarPoller] Invalid regex pattern: %s\", e.what());\n    }\n  }\n  else\n  {\n    for (const auto & event : cached_events_)\n    {\n      if (event.title.find(pattern) != std::string::npos)\n      {\n        matches.push_back(event);\n      }\n    }\n  }\n\n  return matches;\n}\n\nstd::vector<CalendarEvent> CpCalendarPoller::getEventsInWindow(\n  std::chrono::system_clock::time_point start, std::chrono::system_clock::time_point end) const\n{\n  std::lock_guard<std::mutex> lock(events_mutex_);\n\n  std::vector<CalendarEvent> matches;\n  for (const auto & event : cached_events_)\n  {\n    // Event overlaps with window if it starts before window end and ends after window start\n    if (event.start_time < end && event.end_time > start)\n    {\n      matches.push_back(event);\n    }\n  }\n\n  return matches;\n}\n\nstd::vector<CalendarEvent> CpCalendarPoller::getActiveEvents() const\n{\n  std::lock_guard<std::mutex> lock(events_mutex_);\n\n  std::vector<CalendarEvent> active;\n  for (const auto & event : cached_events_)\n  {\n    if (event.isActiveNow())\n    {\n      active.push_back(event);\n    }\n  }\n\n  return active;\n}\n\nstd::chrono::system_clock::time_point CpCalendarPoller::getLastPollTime() const\n{\n  std::lock_guard<std::mutex> lock(events_mutex_);\n  return last_poll_time_;\n}\n\nvoid CpCalendarPoller::update()\n{\n  if (!initialized_ || !connection_)\n  {\n    return;\n  }\n\n  if (!connection_->isConnected())\n  {\n    return;\n  }\n\n  const auto & config = connection_->getConfig();\n  auto now = std::chrono::steady_clock::now();\n  auto elapsed = std::chrono::duration_cast<std::chrono::seconds>(now - last_poll_attempt_);\n\n  if (elapsed >= config.poll_interval)\n  {\n    refreshAgenda();\n    last_poll_attempt_ = now;\n  }\n}\n\nstd::vector<CalendarEvent> CpCalendarPoller::parseTsvOutput(const std::string & output)\n{\n  std::vector<CalendarEvent> events;\n  std::istringstream stream(output);\n  std::string line;\n\n  while (std::getline(stream, line))\n  {\n    // Skip empty lines\n    if (line.empty() || line.find_first_not_of(\" \\t\\r\\n\") == std::string::npos)\n    {\n      continue;\n    }\n\n    auto event = parseTsvLine(line);\n    if (event.has_value())\n    {\n      events.push_back(event.value());\n    }\n  }\n\n  return events;\n}\n\nstd::optional<CalendarEvent> CpCalendarPoller::parseTsvLine(const std::string & line)\n{\n  // TSV columns: Start_Date | Start_Time | End_Date | End_Time | Title | Location | Description | Calendar\n  std::vector<std::string> fields;\n  std::istringstream stream(line);\n  std::string field;\n\n  while (std::getline(stream, field, '\\t'))\n  {\n    fields.push_back(field);\n  }\n\n  // We need at least 5 fields (date/time + title)\n  if (fields.size() < 5)\n  {\n    RCLCPP_DEBUG(\n      getLogger(), \"[CpCalendarPoller] Skipping line with insufficient fields: %s\", line.c_str());\n    return std::nullopt;\n  }\n\n  CalendarEvent event;\n\n  // Parse start time\n  auto start = parseDateTime(fields[0], fields[1]);\n  if (!start.has_value())\n  {\n    RCLCPP_DEBUG(\n      getLogger(), \"[CpCalendarPoller] Failed to parse start time: %s %s\", fields[0].c_str(),\n      fields[1].c_str());\n    return std::nullopt;\n  }\n  event.start_time = start.value();\n\n  // Parse end time\n  auto end = parseDateTime(fields[2], fields[3]);\n  if (!end.has_value())\n  {\n    RCLCPP_DEBUG(\n      getLogger(), \"[CpCalendarPoller] Failed to parse end time: %s %s\", fields[2].c_str(),\n      fields[3].c_str());\n    return std::nullopt;\n  }\n  event.end_time = end.value();\n\n  // Title (required)\n  event.title = fields[4];\n\n  // Optional fields\n  if (fields.size() > 5) event.location = fields[5];\n  if (fields.size() > 6) event.description = fields[6];\n  if (fields.size() > 7) event.calendar_name = fields[7];\n\n  // Check for all-day event (typically has no time or 00:00)\n  event.is_all_day = (fields[1].empty() || fields[1] == \"00:00\" || fields[1] == \"12:00am\");\n\n  // Generate ID\n  event.id = generateEventId(event);\n\n  return event;\n}\n\nstd::optional<std::chrono::system_clock::time_point> CpCalendarPoller::parseDateTime(\n  const std::string & date_str, const std::string & time_str)\n{\n  std::tm tm = {};\n\n  // Parse date - gcalcli TSV uses YYYY-MM-DD format\n  std::istringstream date_stream(date_str);\n  char sep1, sep2;\n  int year, month, day;\n\n  if (date_stream >> year >> sep1 >> month >> sep2 >> day && sep1 == '-' && sep2 == '-')\n  {\n    // YYYY-MM-DD format (gcalcli TSV)\n    tm.tm_year = year - 1900;\n    tm.tm_mon = month - 1;\n    tm.tm_mday = day;\n  }\n  else\n  {\n    // Try MM/DD/YYYY format as fallback\n    date_stream.clear();\n    date_stream.str(date_str);\n    if (date_stream >> month >> sep1 >> day >> sep2 >> year && sep1 == '/' && sep2 == '/')\n    {\n      tm.tm_mon = month - 1;\n      tm.tm_mday = day;\n      tm.tm_year = year - 1900;\n    }\n    else\n    {\n      RCLCPP_DEBUG(getLogger(), \"[CpCalendarPoller] Failed to parse date: %s\", date_str.c_str());\n      return std::nullopt;\n    }\n  }\n\n  // Parse time - gcalcli TSV uses 24-hour HH:MM format\n  if (!time_str.empty())\n  {\n    std::istringstream time_stream(time_str);\n    char colon;\n    int hour, minute;\n\n    if (time_stream >> hour >> colon >> minute && colon == ':')\n    {\n      tm.tm_hour = hour;\n      tm.tm_min = minute;\n\n      // Check for am/pm suffix (for non-TSV formats)\n      std::string rest;\n      std::getline(time_stream, rest);\n      if (!rest.empty())\n      {\n        // Remove leading spaces\n        size_t start = rest.find_first_not_of(\" \");\n        if (start != std::string::npos)\n        {\n          rest = rest.substr(start);\n        }\n        // Check for am/pm\n        if (rest == \"pm\" || rest == \"PM\" || rest == \"p\" || rest == \"P\")\n        {\n          if (hour != 12) tm.tm_hour += 12;\n        }\n        else if (rest == \"am\" || rest == \"AM\" || rest == \"a\" || rest == \"A\")\n        {\n          if (hour == 12) tm.tm_hour = 0;\n        }\n      }\n    }\n    else\n    {\n      RCLCPP_DEBUG(getLogger(), \"[CpCalendarPoller] Failed to parse time: %s\", time_str.c_str());\n      return std::nullopt;\n    }\n  }\n\n  tm.tm_sec = 0;\n  tm.tm_isdst = -1;  // Let mktime determine DST\n\n  std::time_t time = std::mktime(&tm);\n  if (time == -1)\n  {\n    return std::nullopt;\n  }\n\n  return std::chrono::system_clock::from_time_t(time);\n}\n\nstd::string CpCalendarPoller::generateEventId(const CalendarEvent & event)\n{\n  // Generate a unique ID based on title and start time\n  auto start_t = std::chrono::system_clock::to_time_t(event.start_time);\n  std::stringstream ss;\n  ss << event.title << \"_\" << start_t << \"_\" << event.calendar_name;\n  return ss.str();\n}\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_gcalcli/src/cl_gcalcli/components/cp_gcalcli_connection.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_gcalcli/components/cp_gcalcli_connection.hpp>\n\nnamespace cl_gcalcli\n{\n\nCpGcalcliConnection::CpGcalcliConnection()\n: connection_state_(ConnectionState::DISCONNECTED),\n  consecutive_failures_(0),\n  initialized_(false),\n  subprocess_executor_(nullptr)\n{\n}\n\nvoid CpGcalcliConnection::onInitialize()\n{\n  if (!initialized_)\n  {\n    // Get the subprocess executor component\n    requiresComponent(subprocess_executor_);\n\n    if (subprocess_executor_ == nullptr)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CpGcalcliConnection] CpSubprocessExecutor component not found!\");\n      return;\n    }\n\n    last_heartbeat_time_ = std::chrono::steady_clock::now();\n    initialized_ = true;\n\n    RCLCPP_INFO(\n      getLogger(), \"[CpGcalcliConnection] Initialized with gcalcli path: %s\",\n      config_.gcalcli_path.c_str());\n  }\n}\n\nvoid CpGcalcliConnection::configure(const GcalcliConfig & config)\n{\n  std::lock_guard<std::mutex> lock(state_mutex_);\n  config_ = config;\n  RCLCPP_DEBUG(getLogger(), \"[CpGcalcliConnection] Configuration updated\");\n}\n\nConnectionState CpGcalcliConnection::getConnectionState() const\n{\n  std::lock_guard<std::mutex> lock(state_mutex_);\n  return connection_state_;\n}\n\nbool CpGcalcliConnection::isConnected() const\n{\n  std::lock_guard<std::mutex> lock(state_mutex_);\n  return connection_state_ == ConnectionState::CONNECTED;\n}\n\nbool CpGcalcliConnection::checkConnection()\n{\n  if (!subprocess_executor_)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CpGcalcliConnection] Subprocess executor not available\");\n    return false;\n  }\n\n  // Use \"gcalcli list\" as a lightweight connection test\n  auto result = executeGcalcli(\"list\", 10000);\n\n  bool success = (result.exit_code == 0 && !result.timed_out);\n  handleConnectionStateChange(success, result.stdout_output);\n\n  return success;\n}\n\nvoid CpGcalcliConnection::restartConnection()\n{\n  std::lock_guard<std::mutex> lock(state_mutex_);\n\n  RCLCPP_INFO(getLogger(), \"[CpGcalcliConnection] Restarting connection...\");\n\n  consecutive_failures_ = 0;\n  connection_state_ = ConnectionState::DISCONNECTED;\n}\n\nsmacc2::client_core_components::SubprocessResult CpGcalcliConnection::executeGcalcli(\n  const std::string & args, int timeout_ms)\n{\n  if (!subprocess_executor_)\n  {\n    smacc2::client_core_components::SubprocessResult error_result;\n    error_result.exit_code = -1;\n    error_result.stderr_output = \"Subprocess executor not available\";\n    error_result.timed_out = false;\n    return error_result;\n  }\n\n  // Build the full command\n  std::string command = config_.gcalcli_path;\n\n  // Add config folder if specified\n  if (config_.config_folder.has_value())\n  {\n    command += \" --config-folder \\\"\" + config_.config_folder.value() + \"\\\"\";\n  }\n\n  // Add calendars if specified\n  for (const auto & calendar : config_.calendars)\n  {\n    command += \" --calendar \\\"\" + calendar + \"\\\"\";\n  }\n\n  // Add the command arguments\n  command += \" \" + args;\n\n  RCLCPP_DEBUG(getLogger(), \"[CpGcalcliConnection] Executing: %s\", command.c_str());\n\n  return subprocess_executor_->executeCommand(command, timeout_ms);\n}\n\nvoid CpGcalcliConnection::update()\n{\n  if (!initialized_ || !subprocess_executor_)\n  {\n    return;\n  }\n\n  auto now = std::chrono::steady_clock::now();\n  auto elapsed = std::chrono::duration_cast<std::chrono::seconds>(now - last_heartbeat_time_);\n\n  if (elapsed >= config_.heartbeat_interval)\n  {\n    performHeartbeat();\n    last_heartbeat_time_ = now;\n  }\n}\n\nvoid CpGcalcliConnection::performHeartbeat()\n{\n  RCLCPP_DEBUG(getLogger(), \"[CpGcalcliConnection] Performing heartbeat check...\");\n\n  auto result = executeGcalcli(\"list\", 10000);\n\n  bool success = (result.exit_code == 0 && !result.timed_out);\n  handleConnectionStateChange(success, result.stdout_output);\n}\n\nvoid CpGcalcliConnection::handleConnectionStateChange(bool success, const std::string & output)\n{\n  std::lock_guard<std::mutex> lock(state_mutex_);\n\n  ConnectionState previous_state = connection_state_;\n\n  if (success)\n  {\n    consecutive_failures_ = 0;\n\n    if (connection_state_ != ConnectionState::CONNECTED)\n    {\n      connection_state_ = ConnectionState::CONNECTED;\n      RCLCPP_INFO(getLogger(), \"[CpGcalcliConnection] Connection established\");\n\n      if (\n        previous_state == ConnectionState::ERROR || previous_state == ConnectionState::DISCONNECTED)\n      {\n        onConnectionRestored_();\n        if (postConnectionRestoredEvent_)\n        {\n          postConnectionRestoredEvent_();\n        }\n      }\n    }\n  }\n  else\n  {\n    consecutive_failures_++;\n\n    // Check if this is an authentication error\n    if (isAuthenticationError(output))\n    {\n      connection_state_ = ConnectionState::AUTHENTICATING;\n      RCLCPP_WARN(getLogger(), \"[CpGcalcliConnection] Authentication required\");\n\n      onAuthenticationRequired_();\n      if (postAuthenticationRequiredEvent_)\n      {\n        postAuthenticationRequiredEvent_();\n      }\n    }\n    else if (consecutive_failures_ >= config_.max_consecutive_failures)\n    {\n      if (connection_state_ != ConnectionState::ERROR)\n      {\n        connection_state_ = ConnectionState::ERROR;\n        RCLCPP_ERROR(\n          getLogger(), \"[CpGcalcliConnection] Connection lost after %d consecutive failures\",\n          consecutive_failures_);\n\n        onConnectionLost_();\n        if (postConnectionLostEvent_)\n        {\n          postConnectionLostEvent_();\n        }\n      }\n    }\n    else\n    {\n      RCLCPP_WARN(\n        getLogger(), \"[CpGcalcliConnection] Connection check failed (%d/%d)\", consecutive_failures_,\n        config_.max_consecutive_failures);\n    }\n  }\n}\n\nbool CpGcalcliConnection::isAuthenticationError(const std::string & output) const\n{\n  // Check for common gcalcli authentication error patterns\n  return output.find(\"Authentication\") != std::string::npos ||\n         output.find(\"authorization\") != std::string::npos ||\n         output.find(\"oauth\") != std::string::npos ||\n         output.find(\"credentials\") != std::string::npos ||\n         output.find(\"token\") != std::string::npos;\n}\n\n}  // namespace cl_gcalcli\n"
  },
  {
    "path": "smacc2_client_library/cl_generic_sensor/CHANGELOG.rst",
    "content": "Changelog for package multirole_sensor_client\n=============================================\n\n2.3.16 (2023-07-16)\n-------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2` repository\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for ros buildfarm issue\n  - Further work on buildfarm problem\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n- Contributors: brettpac, pabloinigoblasco\n\n2.3.6 (2023-03-12)\n------------------\n\n1.22.1 (2022-11-09)\n-------------------\n### Added\n- Pre-release\n- Contributors: pabloinigoblasco\n\n0.3.0 (2022-04-04)\n------------------\n\n0.0.0 (2022-11-09)\n------------------\n### Added\n- Progress in humble SMACC2 deb generation\n- Reverted commit dec14a936a877b2ef722a6a32f1bf3df09312542\n- Ignored packages not to be released\n- Feature/master rolling to galactic backport (#236)\n  - Updated mentions of SMACC/ROS to SMACC2/ROS2\n  - Progress on navigation rolling\n  - Renamed folders, deleted tracing.md, edited README.md\n  - Added smacc2_performance_tools\n  - Performance tests improvements\n  - Format cleanup for sm_respira_1\n  - Optimized dependencies in move_base_z_planners_common\n  - Renamed event generator library\n  - CI setup and file renaming\n  - Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch\n  - Added new feature, cb_wait_topic_message\n  - Corrected all linters and formatters\n  - Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>, Denis Štogl <denis@stogl.de>\n- Contributors: Denis Štogl, pabloinigoblasco\n\n0.1.0 (Date: TBD)\n\n- Build-status table\n- Detailed install instructions (adjusted from [here](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver#readme))\n\n- Default build type set to `Release` for faster performance and smaller executables\n- Updated examples section\n\n- Resolved missing dependency in smacc_msgs and reorganized for better overview\n- Fixed build issues\n- Fixed bug in smacc2 component\n- Cleaned up formatting in various packages\n- Optimized dependencies in move_base_z_planners_common\n- Corrected build-overview table\n- Updated and unified CI configurations\n\n- Manual installation of ros-rolling-ros2trace, now automated in setupTracing.sh\n\n- Reverted changes in commit f603166a4b3ccdfe96c64d9f9fb9d8b49fbf0e61\n- Restored all versions to 0.0.0\n- Ignored all packages except smacc2 and smacc2_msgs\n- Updated changelogs\n- Reformatting the whole project\n- Enabled all packages to compile\n- Added getLogger functionality and refactoring\n- Reactivated smacc2 nav clients for rolling via submodules\n- Edited tracing.md to reflect new tracing event names\n- Performance tests improvements\n- Various performance and bug fixes\n- Renamed event generator library\n- Used tf_geometry_msgs.h in galactic\n- Used galactic branches in .repos-file\n- Do not execute clang-format on smacc2_sm_reference_library package\n- Cleaned up trailing spaces\n- Added README tutorial for Dockerfile\n- Updated README.md\n- Updated tracing/ManualTracing.md\n- Added setupTracing.sh for automated installation of ros-rolling-ros2trace\n- Location of sh file assumed if user follows README.md under \"Getting started\"\n\n- Denis Štogl\n- Pablo Iñigo Blasco\n- pabloinigoblasco\n- reelrbtx\n- Declan Dury\n- brettpac\n- David Revay\n"
  },
  {
    "path": "smacc2_client_library/cl_generic_sensor/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(cl_generic_sensor)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(smacc2_msgs REQUIRED)\n\nset(dependencies\n    smacc2\n    smacc2_msgs)\n\ninclude_directories(include)\n\nadd_library(${PROJECT_NAME} SHARED\n            src/${PROJECT_NAME}/cl_generic_sensor.cpp)\n\nament_target_dependencies(${PROJECT_NAME} ${dependencies})\n\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\nament_export_dependencies(${dependencies})\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(TARGETS\n  ${PROJECT_NAME}\n  DESTINATION lib/)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_generic_sensor/README.md",
    "content": "# Generic Sensor Client\n\nA SMACC2 client library for subscribing to ROS topics with optional timeout watchdog functionality. Built using a pure component-based architecture following SMACC2 best practices.\n\n## Features\n\n- **Component-based architecture** - Uses `CpTopicSubscriber` and `CpMessageTimeout` components\n- **Optional timeout watchdog** - Configurable message timeout monitoring\n- **Type-safe** - Template-based for any ROS message type\n- **Event-driven** - Posts SMACC2 events for message reception and timeouts\n- **Flexible configuration** - Configure topic and timeout at construction or runtime\n\n## Architecture\n\nThe multirole sensor client follows the **ClKeyboard pattern** where all functionality is implemented through composable components:\n\n```\nClGenericSensor\n    ├── CpTopicSubscriber (from smacc2 core)\n    │   ├── Subscribes to ROS topic\n    │   ├── Posts EvTopicMessage events\n    │   └── Posts EvTopicInitialMessage events\n    │\n    └── CpMessageTimeout (optional)\n        ├── Monitors message reception\n        ├── Posts EvTopicMessageTimeout events\n        └── Emits onMessageTimeout_ signal\n```\n\n### Events Posted\n\n- `EvTopicMessage<TSource, TOrthogonal, TMessageType>` - Posted on every message\n- `EvTopicInitialMessage<TSource, TOrthogonal, TMessageType>` - Posted on first message only\n- `EvTopicMessageTimeout<TSource, TOrthogonal>` - Posted when timeout occurs (if configured)\n\n## Usage\n\n### Basic Usage (No Timeout)\n\n```cpp\n#include <cl_generic_sensor/cl_generic_sensor.hpp>\n\nnamespace my_sm\n{\n// Create a client for sensor_msgs::LaserScan\nclass ClLidar : public cl_generic_sensor::ClGenericSensor<sensor_msgs::msg::LaserScan>\n{\npublic:\n  ClLidar()\n  {\n    this->topicName_ = \"/scan\";\n    // No timeout configured - watchdog disabled\n  }\n};\n}\n```\n\n### Usage with Timeout Watchdog\n\n```cpp\n#include <cl_generic_sensor/cl_generic_sensor.hpp>\n\nnamespace my_sm\n{\n// Create a client with 5-second timeout\nclass ClGps : public cl_generic_sensor::ClGenericSensor<sensor_msgs::msg::NavSatFix>\n{\npublic:\n  ClGps()\n  {\n    this->topicName_ = \"/gps/fix\";\n    this->timeout_ = rclcpp::Duration(5, 0);  // 5 second timeout\n  }\n};\n}\n```\n\n### Constructor-based Configuration\n\n```cpp\n// Direct construction with topic and timeout\nClGenericSensor<std_msgs::msg::String> sensor(\"/topic_name\", rclcpp::Duration(3, 0));\n```\n\n### Using in Orthogonals\n\n```cpp\nclass OrSensor : public smacc2::Orthogonal<OrSensor>\n{\npublic:\n  void onInitialize() override\n  {\n    auto sensor_client = this->createClient<ClLidar>();\n  }\n};\n```\n\n### State Transitions with Events\n\n```cpp\nstruct StMonitoring : smacc2::SmaccState<StMonitoring, SmMyStateMachine>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    // Transition on message received\n    Transition<EvTopicMessage<ClLidar, OrSensor>, StProcessing>,\n\n    // Transition on first message (initialization)\n    Transition<EvTopicInitialMessage<ClLidar, OrSensor>, StInitialized>,\n\n    // Transition on timeout (if configured)\n    Transition<EvTopicMessageTimeout<ClLidar, OrSensor>, StError>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrSensor, CbDefaultGenericSensorBehavior<ClLidar>>();\n  }\n};\n```\n\n### Using the Default Behavior\n\nThe `CbDefaultGenericSensorBehavior` automatically propagates events from components:\n\n```cpp\n#include <cl_generic_sensor/client_behaviors/cb_default_generic_sensor_behavior.hpp>\n\n// Use directly\nconfigure_orthogonal<OrSensor, cl_generic_sensor::CbDefaultGenericSensorBehavior<ClLidar>>();\n\n// Or create custom behavior\nclass CbCustomSensorBehavior\n  : public cl_generic_sensor::CbDefaultGenericSensorBehavior<ClLidar>\n{\npublic:\n  void onMessageCallback(const sensor_msgs::msg::LaserScan& msg) override\n  {\n    // Custom processing\n    RCLCPP_INFO(getLogger(), \"Received scan with %zu points\", msg.ranges.size());\n  }\n};\n```\n\n## Components\n\nSee [components/README.md](include/cl_generic_sensor/components/README.md) for detailed component documentation.\n\n## Examples\n\n### Example 1: Temperature Sensor with Timeout\n\n```cpp\nclass ClTemperature\n  : public cl_generic_sensor::ClGenericSensor<sensor_msgs::msg::Temperature>\n{\npublic:\n  ClTemperature()\n  {\n    this->topicName_ = \"/temperature\";\n    this->timeout_ = rclcpp::Duration(10, 0);  // 10 second timeout\n  }\n};\n\n// In your state\ntypedef mpl::list<\n  Transition<EvTopicMessage<ClTemperature, OrSensors>, StProcessTemp>,\n  Transition<EvTopicMessageTimeout<ClTemperature, OrSensors>, StSensorFault>\n> reactions;\n```\n\n### Example 2: Image Stream (No Timeout)\n\n```cpp\nclass ClCamera\n  : public cl_generic_sensor::ClGenericSensor<sensor_msgs::msg::Image>\n{\npublic:\n  ClCamera()\n  {\n    this->topicName_ = \"/camera/image_raw\";\n    // No timeout - high-frequency stream\n  }\n};\n```\n\n## Migration from Legacy Version\n\nIf you have code using the old `SmaccSubscriberClient`-based implementation:\n\n**Old:**\n```cpp\nclass ClOldSensor : public smacc2::client_bases::SmaccSubscriberClient<std_msgs::msg::String>\n{\n  // Timeout logic embedded in client\n};\n```\n\n**New:**\n```cpp\nclass ClNewSensor : public cl_generic_sensor::ClGenericSensor<std_msgs::msg::String>\n{\npublic:\n  ClNewSensor()\n  {\n    this->topicName_ = \"/topic\";\n    this->timeout_ = rclcpp::Duration(5, 0);  // Optional\n  }\n};\n```\n\nThe event types remain the same, so state transition tables don't need changes.\n\n## Benefits of Component-Based Design\n\n1. **Separation of Concerns** - Subscription and timeout are separate components\n2. **Reusability** - Components can be used across different clients\n3. **Testability** - Each component can be tested independently\n4. **Flexibility** - Timeout is optional, no overhead if not needed\n5. **Maintainability** - Clear boundaries between functionality\n6. **Extensibility** - Easy to add new components without modifying client\n\n## Design Pattern\n\nThis client follows the **ClKeyboard pattern** established in SMACC2:\n- Client inherits from `ISmaccClient` (not `SmaccSubscriberClient`)\n- Functionality provided through components via `onComponentInitialization()`\n- Components are created using `createComponent<>()`\n- Components communicate via signals and SMACC2 events\n\n## See Also\n\n- [SMACC2 Documentation](https://smacc2.robosoft.ai/)\n- [ClKeyboard Client](../../cl_keyboard/) - Reference implementation of component-based pattern\n- [SMACC2 Client Library Guide](../../CLAUDE.md)\n\n## License\n\nApache License 2.0\n"
  },
  {
    "path": "smacc2_client_library/cl_generic_sensor/include/cl_generic_sensor/cl_generic_sensor.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_generic_sensor/components/cp_message_timeout.hpp>\n#include <optional>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/client_core_components/cp_topic_subscriber.hpp>\n#include <smacc2/smacc_client.hpp>\n\nnamespace cl_generic_sensor\n{\nusing namespace smacc2;\n\n// Pure component-based multirole sensor client\n// This client follows the ClKeyboard pattern where all functionality\n// is implemented through composable components\ntemplate <typename MessageType>\nclass ClGenericSensor : public smacc2::ISmaccClient\n{\npublic:\n  typedef MessageType TMessageType;\n\n  // Optional topic name - if not set, must be configured during component initialization\n  std::optional<std::string> topicName_;\n\n  // Optional timeout duration - if not set, timeout functionality is disabled\n  std::optional<rclcpp::Duration> timeout_;\n\n  ClGenericSensor() {}\n\n  // Constructor with topic name\n  ClGenericSensor(std::string topicName) : topicName_(topicName) {}\n\n  // Constructor with topic name and timeout\n  ClGenericSensor(std::string topicName, rclcpp::Duration timeout)\n  : topicName_(topicName), timeout_(timeout)\n  {\n  }\n\n  virtual ~ClGenericSensor() {}\n\n  // Component-based architecture initialization\n  // This method creates and configures the components that provide\n  // the client's functionality\n  template <typename TOrthogonal, typename TClient>\n  void onComponentInitialization()\n  {\n    RCLCPP_INFO(getLogger(), \"[ClGenericSensor] Initializing component-based sensor client\");\n\n    // Create the topic subscriber component\n    // This component handles ROS topic subscription and posts SMACC events\n    if (!topicName_)\n    {\n      RCLCPP_ERROR(\n        getLogger(),\n        \"[ClGenericSensor] Topic name not set. Please configure topicName_ before \"\n        \"initialization.\");\n      return;\n    }\n\n    this->createComponent<\n      smacc2::client_core_components::CpTopicSubscriber<MessageType>, TOrthogonal, ClGenericSensor>(\n      *topicName_);\n\n    RCLCPP_INFO(\n      getLogger(), \"[ClGenericSensor] Created CpTopicSubscriber for topic: %s\",\n      topicName_->c_str());\n\n    // Create the message timeout component (optional - only if timeout is configured)\n    // This component monitors message reception and posts timeout events\n    if (timeout_)\n    {\n      auto timeoutComponent = this->createComponent<\n        cl_generic_sensor::components::CpMessageTimeout<MessageType>, TOrthogonal,\n        ClGenericSensor>();\n\n      // Configure the timeout duration\n      timeoutComponent->timeout_ = timeout_;\n\n      RCLCPP_INFO(\n        getLogger(), \"[ClGenericSensor] Created CpMessageTimeout with duration: %f seconds\",\n        timeout_->seconds());\n    }\n    else\n    {\n      RCLCPP_INFO(\n        getLogger(), \"[ClGenericSensor] Timeout not configured - watchdog functionality disabled\");\n    }\n  }\n\n  // Convenience method to set topic name after construction\n  void setTopicName(const std::string & topicName) { topicName_ = topicName; }\n\n  // Convenience method to set timeout after construction\n  void setTimeout(const rclcpp::Duration & timeout) { timeout_ = timeout; }\n};\n\n}  // namespace cl_generic_sensor\n"
  },
  {
    "path": "smacc2_client_library/cl_generic_sensor/include/cl_generic_sensor/client_behaviors/cb_default_generic_sensor_behavior.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_generic_sensor/cl_generic_sensor.hpp>\n#include <cl_generic_sensor/components/cp_message_timeout.hpp>\n\n#include <string>\n\n#include <smacc2/client_core_components/cp_topic_subscriber.hpp>\n#include <smacc2/smacc_client_behavior.hpp>\n\nnamespace cl_generic_sensor\n{\n// Component-based default behavior for multirole sensor client\n// This behavior works with ClGenericSensor and propagates events from components\ntemplate <typename ClientType>\nclass CbDefaultGenericSensorBehavior : public smacc2::SmaccClientBehavior\n{\npublic:\n  typedef typename ClientType::TMessageType TMessageType;\n\n  ClientType * sensor_;\n\n  // References to the components we'll use\n  smacc2::client_core_components::CpTopicSubscriber<TMessageType> * subscriberComponent_;\n  cl_generic_sensor::components::CpMessageTimeout<TMessageType> * timeoutComponent_;\n\n  CbDefaultGenericSensorBehavior()\n  : sensor_(nullptr), subscriberComponent_(nullptr), timeoutComponent_(nullptr)\n  {\n  }\n\n  static std::string getEventLabel()\n  {\n    // Show ros message type\n    return smacc2::demangleSymbol(typeid(TMessageType).name());\n  }\n\n  // Deferred event propagation functions - set during orthogonal allocation\n  std::function<void()> deferredComponentConnection;\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    // Setup deferred component connection and event propagation\n    deferredComponentConnection = [this]()\n    {\n      RCLCPP_INFO(\n        getLogger(),\n        \"[CbDefaultGenericSensorBehavior] Connecting to components for client type '%s'\",\n        smacc2::demangleSymbol<ClientType>().c_str());\n\n      // Get the subscriber component from the client\n      this->requiresComponent(subscriberComponent_);\n\n      if (subscriberComponent_ == nullptr)\n      {\n        RCLCPP_ERROR(\n          getLogger(),\n          \"[CbDefaultGenericSensorBehavior] Failed to get CpTopicSubscriber component!\");\n        return;\n      }\n\n      // Connect to subscriber component signals to propagate events\n      subscriberComponent_->onMessageReceived(\n        &CbDefaultGenericSensorBehavior<ClientType>::propagateMessageEvent<\n          smacc2::default_events::EvTopicMessage<TSourceObject, TOrthogonal, TMessageType>>,\n        this);\n\n      subscriberComponent_->onFirstMessageReceived(\n        &CbDefaultGenericSensorBehavior<ClientType>::propagateMessageEvent<\n          smacc2::default_events::EvTopicInitialMessage<TSourceObject, TOrthogonal, TMessageType>>,\n        this);\n\n      RCLCPP_INFO(\n        getLogger(), \"[CbDefaultGenericSensorBehavior] Connected to subscriber component\");\n\n      // Try to get the timeout component (it's optional)\n      try\n      {\n        this->requiresComponent(timeoutComponent_);\n\n        if (timeoutComponent_ != nullptr)\n        {\n          // Connect to timeout component signal to propagate timeout events\n          timeoutComponent_->onMessageTimeout(\n            &CbDefaultGenericSensorBehavior<ClientType>::propagateTimeoutEvent<\n              cl_generic_sensor::components::EvTopicMessageTimeout<TSourceObject, TOrthogonal>>,\n            this);\n\n          RCLCPP_INFO(\n            getLogger(),\n            \"[CbDefaultGenericSensorBehavior] Connected to timeout component (watchdog active)\");\n        }\n      }\n      catch (const std::exception & e)\n      {\n        RCLCPP_INFO(\n          getLogger(),\n          \"[CbDefaultGenericSensorBehavior] Timeout component not found (watchdog disabled): %s\",\n          e.what());\n      }\n    };\n  }\n\n  // Propagate message event with message data\n  template <typename EvType>\n  void propagateMessageEvent(const TMessageType & msg)\n  {\n    RCLCPP_DEBUG(\n      getLogger(), \"[CbDefaultGenericSensorBehavior] Propagating message event: %s\",\n      smacc2::demangleSymbol<EvType>().c_str());\n\n    auto event = new EvType();\n    event->msgData = msg;\n    this->postEvent(event);\n  }\n\n  // Propagate timeout event (no message data)\n  template <typename EvType>\n  void propagateTimeoutEvent()\n  {\n    RCLCPP_WARN(\n      getLogger(), \"[CbDefaultGenericSensorBehavior] Propagating timeout event: %s\",\n      smacc2::demangleSymbol<EvType>().c_str());\n\n    this->postEvent<EvType>();\n  }\n\n  void onEntry() override\n  {\n    RCLCPP_INFO(\n      getLogger(), \"[CbDefaultGenericSensorBehavior] onEntry. Requires client of type '%s'\",\n      smacc2::demangleSymbol<ClientType>().c_str());\n\n    // Get the client if we don't have it yet\n    if (sensor_ == nullptr)\n    {\n      this->requiresClient(sensor_);\n    }\n\n    if (sensor_ == nullptr)\n    {\n      RCLCPP_FATAL_STREAM(\n        getLogger(),\n        \"[CbDefaultGenericSensorBehavior] Sensor client behavior needs a client of type: \"\n          << smacc2::demangleSymbol<ClientType>() << \" but it is not found.\");\n    }\n    else\n    {\n      // Connect to components\n      deferredComponentConnection();\n      RCLCPP_INFO(getLogger(), \"[CbDefaultGenericSensorBehavior] Sensor behavior initialized\");\n    }\n  }\n\n  void onExit() override { RCLCPP_INFO(getLogger(), \"[CbDefaultGenericSensorBehavior] onExit\"); }\n\n  // Virtual callback for custom message processing in derived behaviors\n  virtual void onMessageCallback(const TMessageType & /*msg*/)\n  {\n    // Empty to fill by sensor customization based on inheritance\n  }\n};\n\n}  // namespace cl_generic_sensor\n"
  },
  {
    "path": "smacc2_client_library/cl_generic_sensor/include/cl_generic_sensor/components/README.md",
    "content": "# Multirole Sensor Client Components\n\nThis directory contains reusable components for the multirole sensor client library.\n\n## Components\n\n### CpMessageTimeout\n\nA component that monitors ROS topic message reception and posts timeout events when messages are not received within a specified duration.\n\n#### Features\n- Automatic timeout watchdog functionality\n- Configurable timeout duration\n- Integrates with `CpTopicSubscriber` for message monitoring\n- Posts `EvTopicMessageTimeout` events\n- Emits `onMessageTimeout_` signal\n\n#### Usage\n\nThe `CpMessageTimeout` component is automatically created by `ClGenericSensor` when a timeout duration is configured.\n\n**Example 1: Client with timeout**\n```cpp\n// In your client constructor or initialization\nClGenericSensor<std_msgs::msg::String> sensor(\"/my_topic\", rclcpp::Duration(5, 0));\n```\n\n**Example 2: Configuring timeout after construction**\n```cpp\nClGenericSensor<sensor_msgs::msg::LaserScan> lidarClient;\nlidarClient.topicName_ = \"/scan\";\nlidarClient.timeout_ = rclcpp::Duration(2, 0);  // 2 second timeout\n```\n\n**Example 3: No timeout (optional)**\n```cpp\n// Timeout component will not be created\nClGenericSensor<std_msgs::msg::Int32> sensor(\"/counter\");\n// No timeout configured - component gracefully not created\n```\n\n#### Event Handling\n\nThe timeout component posts `EvTopicMessageTimeout` events that can be used in state transitions:\n\n```cpp\n// In your state transition table\ntypedef mpl::list<\n  Transition<EvTopicMessage<ClSensor, OrSensor>, StProcessing>,\n  Transition<EvTopicMessageTimeout<ClSensor, OrSensor>, StError>\n> reactions;\n```\n\n#### Architecture\n\n`CpMessageTimeout` follows the SMACC2 component pattern:\n- Inherits from `ISmaccComponent`\n- Requires `CpTopicSubscriber<MessageType>` component\n- Subscribes to message reception signals to reset timer\n- Posts events through the state machine event queue\n- Automatic lifecycle management (created/destroyed with client)\n\n#### Design Rationale\n\nThe separation of timeout functionality into a component provides:\n- **Single Responsibility**: Each component has one clear purpose\n- **Reusability**: Can be used with any client that needs timeout monitoring\n- **Optional**: Only created when needed, no overhead if not used\n- **Composability**: Works seamlessly with other components\n\n## See Also\n\n- `CpTopicSubscriber` - Core SMACC2 component for topic subscription\n- `ClGenericSensor` - Main client that uses these components\n- `CbDefaultGenericSensorBehavior` - Behavior that propagates component events\n"
  },
  {
    "path": "smacc2_client_library/cl_generic_sensor/include/cl_generic_sensor/components/cp_message_timeout.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <optional>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/client_core_components/cp_topic_subscriber.hpp>\n#include <smacc2/component.hpp>\n#include <smacc2/smacc_signal.hpp>\n\nnamespace cl_generic_sensor\n{\nnamespace components\n{\nusing namespace smacc2;\n\n// Timeout event definition\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvTopicMessageTimeout : sc::event<EvTopicMessageTimeout<TSource, TOrthogonal>>\n{\n};\n\n// Component that monitors topic message reception and posts timeout events\n// when messages are not received within the specified duration\ntemplate <typename MessageType>\nclass CpMessageTimeout : public smacc2::ISmaccComponent\n{\npublic:\n  typedef MessageType TMessageType;\n\n  // Timeout signal - triggered when timeout occurs\n  SmaccSignal<void()> onMessageTimeout_;\n\n  // Optional timeout duration configuration\n  std::optional<rclcpp::Duration> timeout_;\n\n  CpMessageTimeout() : initialized_(false) {}\n\n  virtual ~CpMessageTimeout() {}\n\n  // Signal subscription method for timeout events\n  template <typename T>\n  smacc2::SmaccSignalConnection onMessageTimeout(void (T::*callback)(), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onMessageTimeout_, callback, object);\n  }\n\n  // Function to post timeout event - set during orthogonal allocation\n  std::function<void()> postTimeoutMessageEvent;\n\n  // Template method called during state orthogonal allocation\n  template <typename TOrthogonal, typename TSourceObject>\n  void onComponentInitialization()\n  {\n    // Setup the event posting function with proper template types\n    this->postTimeoutMessageEvent = [this]()\n    {\n      // Emit signal\n      this->onMessageTimeout_();\n\n      // Post SMACC event\n      auto event = new EvTopicMessageTimeout<TSourceObject, TOrthogonal>();\n      this->postEvent(event);\n    };\n\n    // Require the CpTopicSubscriber component to monitor messages\n    smacc2::client_core_components::CpTopicSubscriber<MessageType> * subscriberComponent;\n    this->requiresComponent(subscriberComponent);\n\n    // Subscribe to message received signal to reset timer\n    subscriberComponent->onMessageReceived(&CpMessageTimeout<MessageType>::resetTimer, this);\n  }\n\n  // Initialize the timeout timer\n  void onInitialize() override\n  {\n    if (!initialized_)\n    {\n      if (timeout_)\n      {\n        RCLCPP_INFO_STREAM(\n          getLogger(), \"[\" << this->getName()\n                           << \"] Initializing message timeout watchdog with duration: \"\n                           << timeout_->seconds() << \"s\");\n\n        // Create the timeout timer\n        timeoutTimer_ = rclcpp::create_timer(\n          this->getNode(), this->getNode()->get_clock(), *timeout_,\n          std::bind(&CpMessageTimeout<MessageType>::timeoutCallback, this));\n\n        timeoutTimer_->reset();\n      }\n      else\n      {\n        RCLCPP_WARN(\n          getLogger(),\n          \"[CpMessageTimeout] Timeout duration not set, skipping timeout watchdog functionality\");\n      }\n\n      initialized_ = true;\n    }\n  }\n\nprotected:\n  // Reset the timer when a message is received\n  void resetTimer(const MessageType & /*msg*/)\n  {\n    if (timeoutTimer_)\n    {\n      timeoutTimer_->reset();\n    }\n  }\n\nprivate:\n  rclcpp::TimerBase::SharedPtr timeoutTimer_;\n  bool initialized_;\n\n  // Timer callback - invoked when timeout occurs\n  void timeoutCallback()\n  {\n    RCLCPP_WARN(\n      getLogger(), \"[CpMessageTimeout] Message timeout occurred after %f seconds\",\n      timeout_->seconds());\n\n    if (postTimeoutMessageEvent)\n    {\n      postTimeoutMessageEvent();\n    }\n  }\n};\n\n}  // namespace components\n}  // namespace cl_generic_sensor\n"
  },
  {
    "path": "smacc2_client_library/cl_generic_sensor/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>cl_generic_sensor</name>\n  <version>3.0.1</version>\n  <description>The cl_generic_sensor package</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n  <depend>smacc2_msgs</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_generic_sensor/src/cl_generic_sensor/cl_generic_sensor.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This file is kept for build system compatibility\n// The cl_generic_sensor is now header-only with component-based architecture\n#include <cl_generic_sensor/cl_generic_sensor.hpp>\n#include <cl_generic_sensor/client_behaviors/cb_default_generic_sensor_behavior.hpp>\n"
  },
  {
    "path": "smacc2_client_library/cl_http/CHANGELOG.rst",
    "content": "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nChangelog for package cl_http\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n2.3.19 (2025-06-17)\n-------------------\n* OpenAI example client ported to SMACC (`#557 <https://github.com/robosoft-ai/SMACC2/issues/557>`_)\n  * initial commit for openAI example\n  * Replaced get with post, added key fetch logic\n  * Added ability to modify the body of an http request for the http client\n  * Added functionality to encode and send image data to ChatGPT\n  * Added APIs to add headers to an outgoing HTTP request\n  * HTTP requests can now deal with CDNs\n  * Expanded example openAI node to submit a more sophisticated request with\n  an image\n  * Using env variable for test iamge location\n  * Fixed commit errors\n  * Renamed instantiation of HTTP request CB to something more specific to OpenAI\n* Moved HTTP client behaviour to client library. Also added GET and POS… (`#549 <https://github.com/robosoft-ai/SMACC2/issues/549>`_)\n  * Moved HTTP client behaviour to client library. Also added GET and POST-specific versions of the smacc HTTP client behaviour to make them easier to use\n  * Added copyrights\n  * Fixed typos\n* Http client (`#522 <https://github.com/robosoft-ai/SMACC2/issues/522>`_)\n  * Ported http work over from smacc1\n  * Added example showasing http requests\n  * Fixed some typos in the HTTP example\n  * Made provision for HTTP GET/POST in the HTTP client\n  * Moved HTTP client into the client_libraries folder and made separate compilation units. Modified examples to use this new client\n  * Update smacc_action_client_base.hpp\n  Pretty sure this change was made accidently.\n  * Update smacc_action_client_base.hpp\n  Messed up first commit\n  * Update http_client.cpp\n  Added License to file to clean up format error\n  * Update http_client.cpp\n  Found better Copyright & License for CI Format error.\n  * Update cb_http_request.hpp\n  Another little format error\n  * Update sm_atomic_http.py\n  Somehow a bracket became a cNode\n  * - Fixed errors with HTTP requests not triggering,\n  - Fixed response callback not triggering correctly and causing a crash\n  - Fixed example not transitioning back to state 1 after a response has been received\n  * Ported http work over from smacc1\n  * Added example showasing http requests\n  * Fixed some typos in the HTTP example\n  * Made provision for HTTP GET/POST in the HTTP client\n  * Moved HTTP client into the client_libraries folder and made separate compilation units. Modified examples to use this new client\n  * Update http_client.cpp\n  Added License to file to clean up format error\n  * Update http_client.cpp\n  Found better Copyright & License for CI Format error.\n  * Update cb_http_request.hpp\n  Another little format error\n  * Update sm_atomic_http.py\n  Somehow a bracket became a cNode\n  * - Fixed errors with HTTP requests not triggering,\n  - Fixed response callback not triggering correctly and causing a crash\n  - Fixed example not transitioning back to state 1 after a response has been received\n  * Added helper class to handle server name related interactions\n  * Added SSL implementation, need to make provision for SSL and non-SSLD requests\n  * Added SLL certs\n  * Split the HTTp session class into own compile unit\n  * Added HTTP session base class and implemented the SSL version. The client can decide between which session to initialise at runtime depending on the server set\n  * Implemented non-ssl HTTP session for clients\n  * Removing hard-coded ssl certs and using the default OpenSSL certs for\n  verification\n  * Run through formatter\n  * Fix bad merge\n  * Remove noisy changelog\n  * Undo change that introduced and error\n  * Added missing copyrights\n  * Revert change to precommit config\n  * Fixing copyright, formatting\n  * Fixed whitespace blocking precommit\n  * Revert change to precommit config\n  ---------\n  Co-authored-by: brettpac <brettpac@users.noreply.github.com>\n* Contributors: Jaycee Lock\n\n2.4.1 (2023-07-06)\n------------------\n\n2.3.18 (2023-07-17)\n-------------------\n\n2.3.8 (2023-03-12 21:50)\n------------------------\n\n2.3.7 (2023-03-12 21:45)\n------------------------\n\n2.3.6 (2023-03-12 20:30)\n------------------------\n\n2.3.5 (2023-03-07 00:14)\n------------------------\n\n2.3.4 (2023-03-07 00:02)\n------------------------\n\n2.3.3 (2023-03-02 22:58)\n------------------------\n\n2.3.2 (2023-03-02 22:22)\n------------------------\n\n2.3.1 (2022-11-28)\n------------------\n\n1.22.1 (2022-11-09 20:22)\n-------------------------\n\n1.22.0 (2022-11-09 19:53)\n-------------------------\n"
  },
  {
    "path": "smacc2_client_library/cl_http/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(cl_http)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\n\ninclude_directories(\n  include\n  ${smacc2_INCLUDE_DIRS}\n)\n\nfile(GLOB_RECURSE SRC_FILES src *.cpp)\n\nadd_library(http_session\n  src/cl_http/ssl_http_session.cpp\n  src/cl_http/http_session.cpp\n)\n\nadd_library(${PROJECT_NAME}\n  src/cl_http/cl_http.cpp\n  # Component sources\n  src/cl_http/components/cp_http_connection_manager.cpp\n  src/cl_http/components/cp_http_session_manager.cpp\n  src/cl_http/components/cp_http_request_executor.cpp\n)\n\ntarget_link_libraries(${PROJECT_NAME}\n  http_session\n  ${smacc2_LIBRARIES}\n)\nament_target_dependencies(${PROJECT_NAME} smacc2)\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME} http_session)\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include)\n\ninstall(TARGETS\n  ${PROJECT_NAME}\n  http_session\n  DESTINATION lib/)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_http/README.md",
    "content": "# HTTP Client (cl_http)\n\nSMACC2 client library for making HTTP/HTTPS requests using Boost.Beast.\n\n## Architecture\n/home/brettpac/workspaces/isaac_ros-dev/src/SMACC2/smacc2_client_library/cl_http\nThe `cl_http` follows a pure component-based architecture with three specialized components:\n\n```\nClHttp (Client - Orchestrator)\n├── CpHttpConnectionManager - io_context and thread management\n├── CpHttpSessionManager - SSL context and session creation\n└── CpHttpRequestExecutor - Request execution and response handling\n```\n\n### Components\n\n#### CpHttpConnectionManager\n**Responsibility**: Manages the asynchronous I/O infrastructure\n\n- Owns boost::asio::io_context\n- Manages worker thread lifecycle\n- Provides strand for thread-safe operations\n\n**Lifetime**: State machine scoped (created with ClHttp, destroyed with state machine)\n\n#### CpHttpSessionManager\n**Responsibility**: Manages HTTP/HTTPS session configuration\n\n- Parses server URLs (protocol, host, port)\n- Manages SSL context for HTTPS connections\n- Creates session objects (http_session or ssl_http_session)\n\n**Lifetime**: State machine scoped\n\n#### CpHttpRequestExecutor\n**Responsibility**: Coordinates HTTP request execution\n\n- Accepts request parameters (method, path, body, headers)\n- Acquires strand from CpHttpConnectionManager\n- Acquires session from CpHttpSessionManager\n- Executes requests and emits response signals\n\n**Lifetime**: State machine scoped\n\n### Signal Flow\n\n```\nUser Code (Behavior)\n    ↓\nCpHttpRequestExecutor::executeRequest()\n    ↓\nSession created (http_session/ssl_http_session)\n    ↓\nRequest executed asynchronously\n    ↓\nResponse received\n    ↓\nCpHttpRequestExecutor::onResponseReceived_ (SmaccSignal)\n    ↓ (backward compatibility)\nClHttp::onResponseReceived_ (forwarded)\n    ↓\nBehavior callback\n```\n\n## Usage\n\n### Quick Start: Using Base Behaviors\n\nThe easiest way to make HTTP requests is using the provided base behaviors:\n\n```cpp\n#include <cl_http/client_behaviors/cb_http_get_request.hpp>\n\nclass StHttpRequest : public smacc2::SmaccState<StHttpRequest, SmExample>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  void runtimeConfigure() override\n  {\n    auto behavior = this->configure<cl_http::CbHttpGetRequest>();\n  }\n};\n```\n\n### Custom Behaviors: Component-Based Approach\n\nFor custom HTTP behavior, inherit from base class and override response handling:\n\n```cpp\n#include <cl_http/client_behaviors/cb_http_request.hpp>\n\nclass CbCustomRequest : public cl_http::CbHttpRequestBase\n{\npublic:\n  CbCustomRequest() : CbHttpRequestBase(CpHttpRequestExecutor::HttpMethod::GET) {}\n\n  void onResponseReceived(const CpHttpRequestExecutor::TResponse& response) override\n  {\n    if (response.result() == boost::beast::http::status::ok)\n    {\n      RCLCPP_INFO(getLogger(), \"Success: %s\", response.body().c_str());\n    }\n  }\n};\n```\n\n### Advanced: Direct Component Access\n\nFor full control, access the executor component directly:\n\n```cpp\nclass CbAdvancedHttp : public smacc2::SmaccClientBehavior\n{\npublic:\n  void runtimeConfigure() override\n  {\n    this->requiresComponent(requestExecutor_);\n    this->getStateMachine()->createSignalConnection(\n      requestExecutor_->onResponseReceived_,\n      &CbAdvancedHttp::onResponse,\n      this\n    );\n  }\n\n  void onEntry() override\n  {\n    std::unordered_map<std::string, std::string> headers = {\n      {\"Accept\", \"application/json\"},\n      {\"Authorization\", \"Bearer token123\"}\n    };\n\n    requestExecutor_->executeRequest(\n      CpHttpRequestExecutor::HttpMethod::POST,\n      \"/api/data\",\n      R\"({\"key\": \"value\"})\",  // JSON body\n      headers\n    );\n  }\n\n  void onResponse(const CpHttpRequestExecutor::TResponse& response)\n  {\n    RCLCPP_INFO(\n      getLogger(),\n      \"HTTP %d: %s\",\n      response.result_int(),\n      response.body().c_str()\n    );\n  }\n\nprivate:\n  CpHttpRequestExecutor* requestExecutor_;\n};\n```\n\n## State Machine Configuration\n\n### Orthogonal Setup\n\n```cpp\nnamespace sm_example\n{\nnamespace clients\n{\nclass ClHttpOrthogonal : public smacc2::Orthogonal<ClHttpOrthogonal>\n{\npublic:\n  void onInitialize() override\n  {\n    auto httpClient = this->createClient<cl_http::ClHttp>(\n      \"https://example.com\",  // Server URL\n      1500                     // Timeout (ms)\n    );\n  }\n};\n}\n}\n```\n\n### Server URL Formats\n\nThe client automatically detects HTTP vs HTTPS based on the URL:\n\n```cpp\n// HTTPS (SSL enabled)\nthis->createClient<cl_http::ClHttp>(\"https://api.example.com\");\n\n// HTTP (no SSL)\nthis->createClient<cl_http::ClHttp>(\"http://api.example.com\");\n\n// Custom port\nthis->createClient<cl_http::ClHttp>(\"https://api.example.com:8443\");\n```\n\n## Supported HTTP Methods\n\n- **GET**: Retrieve data\n- **POST**: Submit data\n- **PUT**: Update/replace data\n\n```cpp\n// Using enum\nCpHttpRequestExecutor::HttpMethod::GET\nCpHttpRequestExecutor::HttpMethod::POST\nCpHttpRequestExecutor::HttpMethod::PUT\n```\n\n## Response Handling\n\nResponses use Boost.Beast's `http::response<http::string_body>` type:\n\n```cpp\nvoid onResponse(const CpHttpRequestExecutor::TResponse& response)\n{\n  // Status code\n  auto status = response.result();  // enum\n  int statusCode = response.result_int();  // int (200, 404, etc.)\n\n  // Headers\n  auto contentType = response[boost::beast::http::field::content_type];\n\n  // Body\n  std::string body = response.body();\n\n  // Check success\n  if (status == boost::beast::http::status::ok)\n  {\n    RCLCPP_INFO(getLogger(), \"Success!\");\n  }\n}\n```\n\n## Pure Component-Based Architecture\n\nThe cl_http package uses a **pure component-based architecture** with no legacy API remnants. All functionality is accessed through components:\n\n- **Direct component access** is the only supported pattern\n- Base behaviors (`CbHttpRequestBase`, `CbHttpGetRequest`, `CbHttpPostRequest`) use components internally \n\n## Examples\n\n### Example 1: Simple GET Request\n\n```cpp\nclass StFetchData : public smacc2::SmaccState<StFetchData, SmExample>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  void runtimeConfigure() override\n  {\n    this->configure<cl_http::CbHttpGetRequest>();\n  }\n\n  // Transitions\n  using Transition = smacc2::transition<EvCbSuccess<CbHttpGetRequest>, StNextState>;\n};\n```\n\n### Example 2: POST with Custom Response Handling\n\n```cpp\nclass CbApiSubmit : public cl_http::CbHttpPostRequest\n{\npublic:\n  void onEntry() override\n  {\n    // Set up POST data\n    requestExecutor_->executeRequest(\n      CpHttpRequestExecutor::HttpMethod::POST,\n      \"/api/submit\",\n      R\"({\"username\": \"robot\", \"action\": \"navigate\"})\",\n      {{\"Content-Type\", \"application/json\"}}\n    );\n  }\n\n  void onResponseReceived(const CpHttpRequestExecutor::TResponse& response) override\n  {\n    if (response.result() == boost::beast::http::status::created)\n    {\n      RCLCPP_INFO(getLogger(), \"Resource created successfully\");\n      this->postSuccessEvent();\n    }\n    else\n    {\n      RCLCPP_ERROR(getLogger(), \"API error: %d\", response.result_int());\n      this->postFailureEvent();\n    }\n  }\n};\n```\n\n### Example 3: Multiple Sequential Requests\n\n```cpp\nclass CbMultiRequest : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  void onEntry() override\n  {\n    this->requiresComponent(requestExecutor_);\n\n    // First request\n    requestExecutor_->executeRequest(\n      CpHttpRequestExecutor::HttpMethod::GET,\n      \"/api/status\"\n    );\n  }\n\n  void onResponse(const CpHttpRequestExecutor::TResponse& response)\n  {\n    if (requestCount_ == 0)\n    {\n      // Handle first response, make second request\n      requestCount_++;\n      requestExecutor_->executeRequest(\n        CpHttpRequestExecutor::HttpMethod::POST,\n        \"/api/update\",\n        response.body()  // Use first response as second request body\n      );\n    }\n    else\n    {\n      // All requests complete\n      this->postSuccessEvent();\n    }\n  }\n\nprivate:\n  int requestCount_ = 0;\n  CpHttpRequestExecutor* requestExecutor_;\n};\n```\n\n## Dependencies\n\n- **Boost.Beast**: HTTP/HTTPS client implementation\n- **Boost.Asio**: Asynchronous I/O\n- **OpenSSL**: HTTPS/TLS support\n- **SMACC2**: State machine framework\n\n## Testing\n\nRun the reference state machine:\n\n```bash\nros2 launch sm_atomic_http sm_atomic_http.py\n```\n\nThis will make GET requests to https://example.com and demonstrate the HTTP client functionality.\n\n## Architecture Benefits\n\n1. **Single Responsibility**: Each component has a focused purpose\n2. **Testability**: Components can be tested independently\n3. **Reusability**: Components can be composed differently for different use cases\n4. **Thread Safety**: Proper strand usage prevents race conditions\n5. **Lifetime Management**: State machine scoped components ensure proper cleanup\n6. **SMACC2 Best Practices**: Follows recommended patterns for client libraries\n\n## Troubleshooting\n\n### SSL Errors\n\nIf you encounter SSL certificate errors:\n\n```\nSSL handshake failed: certificate verify failed\n```\n\nThis is expected for self-signed certificates. The client currently validates certificates. For testing with self-signed certs, you may need to configure OpenSSL context (advanced usage).\n\n### Connection Timeouts\n\nThe default timeout is 1500ms. Adjust when creating the client:\n\n```cpp\nthis->createClient<cl_http::ClHttp>(\"https://slow-api.com\", 5000);  // 5 second timeout\n```\n\n### Port Issues\n\nEnsure the correct port is specified:\n- HTTP: default port 80\n- HTTPS: default port 443\n- Custom: specify in URL (`https://api.example.com:8443`)\n\n## License\n\nCopyright 2023-2024 RobosoftAI Inc.\n\nLicensed under the Apache License, Version 2.0.\n"
  },
  {
    "path": "smacc2_client_library/cl_http/include/cl_http/cl_http.hpp",
    "content": "// Copyright 2023 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Jaycee Lock & Brett Aldrich\n *\n *   Description: HTTP/HTTPS Client using pure component-based architecture\n *\n *   Architecture:\n *     ClHttp (minimal orchestrator) creates and configures three components:\n *       - CpHttpConnectionManager: io_context and thread management\n *       - CpHttpSessionManager: SSL context and session creation\n *       - CpHttpRequestExecutor: Request execution and response signals\n *\n *   Usage:\n *     Behaviors should access CpHttpRequestExecutor component directly via requiresComponent()\n *     and connect to its onResponseReceived_ signal for HTTP responses.\n *\n *   See README.md for complete documentation and examples.\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_http/components/cp_http_connection_manager.hpp>\n#include <cl_http/components/cp_http_request_executor.hpp>\n#include <cl_http/components/cp_http_session_manager.hpp>\n#include <cl_http/http_session_base.hpp>\n#include <smacc2/smacc_client.hpp>\n#include <string>\n\nnamespace cl_http\n{\n/**\n * @brief HTTP/HTTPS client with pure component-based architecture\n *\n * This client acts as a minimal orchestrator that creates and configures\n * three specialized components during initialization. All HTTP functionality\n * is delegated to components.\n *\n * Components created:\n *   - CpHttpConnectionManager: Manages io_context and worker thread\n *   - CpHttpSessionManager: Manages SSL context and creates sessions\n *   - CpHttpRequestExecutor: Executes requests and emits response signals\n *\n * Behaviors should access CpHttpRequestExecutor directly via requiresComponent()\n * rather than using the client interface.\n */\nclass ClHttp : public smacc2::ISmaccClient\n{\npublic:\n  enum class kHttpRequestMethod\n  {\n    GET = static_cast<int>(boost::beast::http::verb::get),\n    POST = static_cast<int>(boost::beast::http::verb::post),\n    PUT = static_cast<int>(boost::beast::http::verb::put),\n  };\n\n  using TResponse = http_session_base::TResponse;\n\n  explicit ClHttp(const std::string & server, const int & timeout = 1500);\n\n  virtual ~ClHttp();\n\n  void onInitialize() override;\n\n  // Component composition during orthogonal initialization\n  template <typename TOrthogonal, typename TClient>\n  void onComponentInitialization()\n  {\n    // Create components\n    connectionManager_ = this->createComponent<CpHttpConnectionManager, TOrthogonal, ClHttp>();\n    sessionManager_ = this->createComponent<CpHttpSessionManager, TOrthogonal, ClHttp>();\n    requestExecutor_ = this->createComponent<CpHttpRequestExecutor, TOrthogonal, ClHttp>();\n\n    // Set component dependencies\n    requestExecutor_->setDependencies(connectionManager_, sessionManager_);\n\n    // Configure session manager with server URL\n    sessionManager_->setServerUrl(server_url_);\n  }\n\nprivate:\n  const int HTTP_VERSION = 11;\n\n  bool initialized_;\n\n  std::string server_url_;  // Server URL for component configuration\n\n  // Component references\n  CpHttpConnectionManager * connectionManager_;\n  CpHttpSessionManager * sessionManager_;\n  CpHttpRequestExecutor * requestExecutor_;\n};\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/include/cl_http/client_behaviors/cb_http_get_request.hpp",
    "content": "// Copyright 2023 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Jaycee Lock & Brett Aldrich \n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_http/cl_http.hpp>\n#include <cl_http/client_behaviors/cb_http_request.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_http\n{\nclass CbHttpGetRequest : public CbHttpRequestBase\n{\npublic:\n  CbHttpGetRequest() : CbHttpRequestBase(CpHttpRequestExecutor::HttpMethod::GET) {}\n};\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/include/cl_http/client_behaviors/cb_http_post_request.hpp",
    "content": "// Copyright 2023 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Jaycee Lock & Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_http/cl_http.hpp>\n#include <cl_http/client_behaviors/cb_http_request.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_http\n{\nclass CbHttpPostRequest : public CbHttpRequestBase\n{\npublic:\n  CbHttpPostRequest() : CbHttpRequestBase(CpHttpRequestExecutor::HttpMethod::POST) {}\n};\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/include/cl_http/client_behaviors/cb_http_request.hpp",
    "content": "// Copyright 2023 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Jaycee Lock & Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_http/cl_http.hpp>\n#include <cl_http/components/cp_http_request_executor.hpp>\n#include <cstring>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_http\n{\n\nclass CbHttpRequestBase : public smacc2::SmaccClientBehavior\n{\npublic:\n  CbHttpRequestBase(const CpHttpRequestExecutor::HttpMethod http_request_type)\n  : kRequestType(http_request_type)\n  {\n  }\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    // Base implementation - can be overridden by derived classes\n  }\n\n  virtual void runtimeConfigure() override\n  {\n    // Access executor component and connect to response signal\n    this->requiresComponent(requestExecutor_);\n    this->getStateMachine()->createSignalConnection(\n      requestExecutor_->onResponseReceived_, &CbHttpRequestBase::onResponseReceived, this);\n  }\n\n  virtual void onResponseReceived(const CpHttpRequestExecutor::TResponse & /*response*/) {}\n\n  virtual void onEntry() override { requestExecutor_->executeRequest(kRequestType); }\n\n  virtual void onExit() override {}\n\nprivate:\n  const CpHttpRequestExecutor::HttpMethod kRequestType;\n\n  CpHttpRequestExecutor * requestExecutor_;\n};\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/include/cl_http/components/cp_http_connection_manager.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// HTTP Connection Manager Component - Manages io_context and thread lifecycle\n// Authors: Claude (Anthropic AI)\n\n#pragma once\n\n#include <boost/asio/any_io_executor.hpp>\n#include <boost/asio/executor_work_guard.hpp>\n#include <boost/asio/io_context.hpp>\n#include <boost/asio/strand.hpp>\n#include <memory>\n#include <smacc2/component.hpp>\n#include <thread>\n\nnamespace cl_http\n{\n\n// Manages io_context and worker thread for HTTP operations\n// Provides strand for thread-safe session operations\nclass CpHttpConnectionManager : public smacc2::ISmaccComponent\n{\npublic:\n  CpHttpConnectionManager();\n  virtual ~CpHttpConnectionManager();\n\n  void onInitialize() override;\n\n  // Get strand for thread-safe session operations\n  boost::asio::any_io_executor getStrand();\n\n  // Access to underlying io_context\n  boost::asio::io_context & getIoContext();\n\nprivate:\n  boost::asio::io_context io_context_;\n  boost::asio::executor_work_guard<decltype(io_context_)::executor_type> worker_guard_;\n  std::thread io_thread_;\n  bool initialized_;\n};\n\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/include/cl_http/components/cp_http_request_executor.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// HTTP Request Executor Component - Executes HTTP requests and coordinates responses\n// Authors: Claude (Anthropic AI)\n\n#pragma once\n\n#include <boost/beast/http.hpp>\n#include <cl_http/http_session_base.hpp>\n#include <smacc2/component.hpp>\n#include <smacc2/smacc_signal.hpp>\n#include <string>\n#include <unordered_map>\n\nnamespace cl_http\n{\n\n// Forward declarations\nclass CpHttpConnectionManager;\nclass CpHttpSessionManager;\n\n// Coordinates HTTP request execution and emits response signals\n// Acquires strand and session from other components\nclass CpHttpRequestExecutor : public smacc2::ISmaccComponent\n{\npublic:\n  // HTTP request methods\n  enum class HttpMethod\n  {\n    GET = static_cast<int>(boost::beast::http::verb::get),\n    POST = static_cast<int>(boost::beast::http::verb::post),\n    PUT = static_cast<int>(boost::beast::http::verb::put),\n  };\n\n  using TResponse = http_session_base::TResponse;\n\n  CpHttpRequestExecutor();\n  virtual ~CpHttpRequestExecutor();\n\n  void onInitialize() override;\n\n  // Set component dependencies (called by client during initialization)\n  void setDependencies(CpHttpConnectionManager * connMgr, CpHttpSessionManager * sessMgr)\n  {\n    connectionManager_ = connMgr;\n    sessionManager_ = sessMgr;\n  }\n\n  // Execute HTTP request with specified method, path, body, and headers\n  void executeRequest(\n    const HttpMethod method, const std::string & path = \"/\", const std::string & body = \"\",\n    const std::unordered_map<std::string, std::string> & headers = {});\n\n  // Signal emitted when HTTP response is received (behaviors connect to this)\n  smacc2::SmaccSignal<void(const TResponse &)> onResponseReceived_;\n\nprivate:\n  static constexpr int HTTP_VERSION = 11;\n\n  CpHttpConnectionManager * connectionManager_;\n  CpHttpSessionManager * sessionManager_;\n\n  std::function<void(TResponse)> responseHandler_;\n};\n\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/include/cl_http/components/cp_http_session_manager.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// HTTP Session Manager Component - Manages SSL context and session creation\n// Authors: Claude (Anthropic AI)\n\n#pragma once\n\n#include <boost/asio/ssl/context.hpp>\n#include <cl_http/http_session.hpp>\n#include <cl_http/http_session_base.hpp>\n#include <cl_http/ssl_http_session.hpp>\n#include <memory>\n#include <smacc2/component.hpp>\n#include <string>\n\nnamespace cl_http\n{\n\n// Manages SSL context and creates HTTP/HTTPS sessions based on URL\n// Parses server URL to determine protocol and port\nclass CpHttpSessionManager : public smacc2::ISmaccComponent\n{\npublic:\n  CpHttpSessionManager();\n  virtual ~CpHttpSessionManager();\n\n  void onInitialize() override;\n\n  // Configure server URL (parses protocol, host, port)\n  void setServerUrl(const std::string & server_url);\n\n  // Create HTTP or HTTPS session based on URL configuration\n  std::shared_ptr<http_session_base> createSession(\n    boost::asio::any_io_executor executor,\n    std::function<void(const http_session_base::TResponse &)> callback);\n\n  // Check if HTTPS is required\n  bool isSSL() const;\n\n  // Get server name without protocol\n  std::string getServerName() const;\n\n  // Get port number (443 for HTTPS, 80 for HTTP)\n  std::string getPort() const;\n\nprivate:\n  // Internal class to parse and store server configuration\n  class ServerConfig\n  {\n  public:\n    explicit ServerConfig(const std::string & server_name);\n\n    bool isSSL() const { return ssl_; }\n    std::string getPort() const { return ssl_ ? \"443\" : \"80\"; }\n    std::string getServerName() const { return server_name_; }\n\n  private:\n    std::string server_name_;\n    bool ssl_;\n  };\n\n  std::unique_ptr<ServerConfig> server_config_;\n  boost::asio::ssl::context ssl_context_;\n  bool initialized_;\n};\n\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/include/cl_http/http_session.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n*\n\nAuthors: Jacobus Lock & Brett Aldrich\n\n******************************************************************************************************************/\n\n#pragma once\n\n#include <boost/asio/executor_work_guard.hpp>\n#include <boost/asio/strand.hpp>\n#include <boost/beast/core.hpp>\n#include <boost/beast/http.hpp>\n#include <boost/beast/version.hpp>\n#include <cl_http/http_session_base.hpp>\n#include <iostream>\n#include <string>\n\nnamespace cl_http\n{\nclass http_session : public std::enable_shared_from_this<http_session>, public http_session_base\n{\npublic:\n  // Objects are constructed with a strand to\n  // ensure that handlers do not execute concurrently.\n  http_session(\n    boost::asio::any_io_executor ioc, const std::function<void(const TResponse &)> response);\n\n  virtual ~http_session() {}\n\n  // Start the asynchronous operation\n  void run(\n    const std::string & host, const std::string & target,\n    const boost::beast::http::verb http_method, const int & version) override;\n\n  std::string getPort() override { return kPort; }\n\nprivate:\n  const std::string kPort = \"80\";\n\n  void on_resolve(\n    boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type results) override;\n  void fail(boost::beast::error_code ec, const char * what) override;\n  void on_connect(\n    boost::beast::error_code ec,\n    boost::asio::ip::tcp::resolver::results_type::endpoint_type) override;\n  void on_write(boost::beast::error_code ec, std::size_t bytes_transferred) override;\n  void on_read(boost::beast::error_code ec, std::size_t bytes_transferred) override;\n  void setBody(const std::string & body) override;\n  void setHeaders(const std::unordered_map<std::string, std::string> & /*headers*/) override {}\n\n  std::function<void(const TResponse &)> onResponse;\n\n  boost::asio::ip::tcp::resolver resolver_;\n  boost::beast::tcp_stream stream_;\n  boost::beast::flat_buffer buffer_;  // (Must persist between reads)\n  boost::beast::http::request<boost::beast::http::string_body> req_;\n  TResponse res_;\n};\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/include/cl_http/http_session_base.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n*\n\nAuthor: Jacobus Lock\n\n******************************************************************************************************************/\n\n#pragma once\n\n#include <boost/asio/executor_work_guard.hpp>\n#include <boost/asio/strand.hpp>\n#include <boost/beast/core.hpp>\n#include <boost/beast/http.hpp>\n#include <boost/beast/ssl.hpp>\n#include <boost/beast/version.hpp>\n#include <string>\n\nnamespace cl_http\n{\nclass http_session_base\n{\npublic:\n  virtual ~http_session_base() {}\n\n  using TResponse = boost::beast::http::response<boost::beast::http::string_body>;\n\n  // Start the asynchronous operation\n  virtual void run(\n    const std::string & host, const std::string & target,\n    const boost::beast::http::verb http_method, const int & version) = 0;\n\n  virtual std::string getPort() = 0;\n  virtual void setBody(const std::string & body) = 0;\n  virtual void setHeaders(const std::unordered_map<std::string, std::string> & headers) = 0;\n\nprotected:\n  virtual void on_resolve(\n    boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type results) = 0;\n  virtual void fail(boost::beast::error_code ec, const char * what) = 0;\n  virtual void on_connect(\n    boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type::endpoint_type) = 0;\n  virtual void on_write(boost::beast::error_code ec, std::size_t bytes_transferred) = 0;\n  virtual void on_read(boost::beast::error_code ec, std::size_t bytes_transferred) = 0;\n\n  // Optional, needed for SSL connections\n  virtual void on_handshake(boost::beast::error_code /*ec*/) {}\n  virtual void on_shutdown(boost::beast::error_code /*ec*/) {}\n};\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/include/cl_http/ssl_http_session.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n*\n\nAuthor: Jacobus Lock\n\n******************************************************************************************************************/\n\n#pragma once\n\n#include <boost/asio/executor_work_guard.hpp>\n#include <boost/asio/strand.hpp>\n#include <boost/beast/core.hpp>\n#include <boost/beast/http.hpp>\n#include <boost/beast/ssl.hpp>\n#include <boost/beast/version.hpp>\n#include <cl_http/http_session_base.hpp>\n#include <iostream>\n#include <string>\n#include <unordered_map>\n\nnamespace cl_http\n{\nclass ssl_http_session : public std::enable_shared_from_this<ssl_http_session>,\n                         public http_session_base\n{\npublic:\n  // Objects are constructed with a strand to\n  // ensure that handlers do not execute concurrently.\n  ssl_http_session(\n    boost::asio::any_io_executor ioc, boost::asio::ssl::context & ssl_context,\n    const std::function<void(const TResponse &)> response);\n\n  virtual ~ssl_http_session() {}\n\n  // Start the asynchronous operation\n  void run(\n    const std::string & host, const std::string & target,\n    const boost::beast::http::verb http_method, const int & version) override;\n\n  std::string getPort() override { return kPort; }\n\nprivate:\n  const std::string kPort = \"443\";\n\n  void on_resolve(\n    boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type results) override;\n  void fail(boost::beast::error_code ec, const char * what) override;\n  void on_connect(\n    boost::beast::error_code ec,\n    boost::asio::ip::tcp::resolver::results_type::endpoint_type) override;\n  void on_handshake(boost::beast::error_code ec) override;\n  void on_write(boost::beast::error_code ec, std::size_t bytes_transferred) override;\n  void on_read(boost::beast::error_code ec, std::size_t bytes_transferred) override;\n  void on_shutdown(boost::beast::error_code ec) override;\n  void setBody(const std::string & body) override;\n  void setHeaders(const std::unordered_map<std::string, std::string> & headers) override;\n  void appendToHeader(const std::string & key, const std::string & val);\n\n  std::function<void(const TResponse &)> onResponse;\n\n  boost::asio::ip::tcp::resolver resolver_;\n  // boost::beast::tcp_stream stream_;\n  boost::beast::ssl_stream<boost::beast::tcp_stream> stream_;\n  boost::beast::flat_buffer buffer_;  // (Must persist between reads)\n  boost::beast::http::request<boost::beast::http::string_body> req_;\n  TResponse res_;\n};\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n <name>cl_http</name>\n  <version>3.0.1</version>\n  <description>The cl_http package</description>\n  <maintainer email=\"jaycee.lock@proton.me\">Jaycee Lock</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_http/src/cl_http/cl_http.cpp",
    "content": "// Copyright 2023 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Jaycee Lock & Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_http/cl_http.hpp>\n\nnamespace cl_http\n{\nClHttp::ClHttp(const std::string & server_name, const int & /*timeout*/)\n: initialized_{false},\n  server_url_{server_name},\n  connectionManager_{nullptr},\n  sessionManager_{nullptr},\n  requestExecutor_{nullptr}\n{\n  // Timeout parameter kept for API compatibility but unused (managed by components)\n}\n\nClHttp::~ClHttp()\n{\n  // Thread cleanup handled by CpHttpConnectionManager destructor\n}\n\nvoid ClHttp::onInitialize()\n{\n  // Components created in onComponentInitialization()\n  this->initialized_ = true;\n}\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/src/cl_http/components/cp_http_connection_manager.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Claude (Anthropic AI)\n *\n ******************************************************************************************************************/\n\n#include <cl_http/components/cp_http_connection_manager.hpp>\n\nnamespace cl_http\n{\n\nCpHttpConnectionManager::CpHttpConnectionManager()\n: worker_guard_(boost::asio::make_work_guard(io_context_.get_executor())), initialized_(false)\n{\n}\n\nCpHttpConnectionManager::~CpHttpConnectionManager()\n{\n  if (initialized_)\n  {\n    worker_guard_.reset();\n    if (io_thread_.joinable())\n    {\n      io_thread_.join();\n    }\n  }\n}\n\nvoid CpHttpConnectionManager::onInitialize()\n{\n  if (!initialized_)\n  {\n    io_thread_ = std::thread([this]() { io_context_.run(); });\n    initialized_ = true;\n  }\n}\n\nboost::asio::any_io_executor CpHttpConnectionManager::getStrand()\n{\n  return boost::asio::make_strand(io_context_);\n}\n\nboost::asio::io_context & CpHttpConnectionManager::getIoContext() { return io_context_; }\n\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/src/cl_http/components/cp_http_request_executor.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Claude (Anthropic AI)\n *\n ******************************************************************************************************************/\n\n#include <cl_http/components/cp_http_connection_manager.hpp>\n#include <cl_http/components/cp_http_request_executor.hpp>\n#include <cl_http/components/cp_http_session_manager.hpp>\n\nnamespace cl_http\n{\n\nCpHttpRequestExecutor::CpHttpRequestExecutor()\n: connectionManager_(nullptr), sessionManager_(nullptr)\n{\n  responseHandler_ = [this](const TResponse & res) { onResponseReceived_(res); };\n}\n\nCpHttpRequestExecutor::~CpHttpRequestExecutor() {}\n\nvoid CpHttpRequestExecutor::onInitialize()\n{\n  // Dependencies set via setDependencies() before onInitialize() is called\n}\n\nvoid CpHttpRequestExecutor::executeRequest(\n  const HttpMethod method, const std::string & path, const std::string & body,\n  const std::unordered_map<std::string, std::string> & headers)\n{\n  auto path_used = path;\n  if (path.empty() || path[0] != '/')\n  {\n    path_used = \"/\" + path;\n  }\n\n  RCLCPP_INFO(\n    this->getLogger(), \"Executing request: SSL=%d Server=%s Path=%s Port=%s\",\n    sessionManager_->isSSL(), sessionManager_->getServerName().c_str(), path_used.c_str(),\n    sessionManager_->getPort().c_str());\n\n  auto executor = connectionManager_->getStrand();\n  auto session = sessionManager_->createSession(executor, responseHandler_);\n\n  session->setBody(body);\n  session->setHeaders(headers);\n  session->run(\n    sessionManager_->getServerName(), path_used, static_cast<boost::beast::http::verb>(method),\n    HTTP_VERSION);\n}\n\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/src/cl_http/components/cp_http_session_manager.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Claude (Anthropic AI)\n *\n ******************************************************************************************************************/\n\n#include <cl_http/components/cp_http_session_manager.hpp>\n\n#include <algorithm>\n\nnamespace cl_http\n{\n\nCpHttpSessionManager::ServerConfig::ServerConfig(const std::string & server_name)\n: server_name_(server_name), ssl_(true)\n{\n  if (!server_name_.substr(0, 7).compare(\"http://\"))\n  {\n    ssl_ = false;\n    server_name_.erase(0, 7);\n  }\n  else if (!server_name_.substr(0, 8).compare(\"https://\"))\n  {\n    server_name_.erase(0, 8);\n    ssl_ = true;\n  }\n}\n\nCpHttpSessionManager::CpHttpSessionManager()\n: ssl_context_(boost::asio::ssl::context::tlsv13_client), initialized_(false)\n{\n  ssl_context_.set_default_verify_paths();\n  ssl_context_.set_verify_mode(boost::asio::ssl::verify_peer);\n}\n\nCpHttpSessionManager::~CpHttpSessionManager() {}\n\nvoid CpHttpSessionManager::onInitialize() { initialized_ = true; }\n\nvoid CpHttpSessionManager::setServerUrl(const std::string & server_url)\n{\n  server_config_ = std::make_unique<ServerConfig>(server_url);\n}\n\nstd::shared_ptr<http_session_base> CpHttpSessionManager::createSession(\n  boost::asio::any_io_executor executor,\n  std::function<void(const http_session_base::TResponse &)> callback)\n{\n  if (!server_config_)\n  {\n    throw std::runtime_error(\"Server URL not configured\");\n  }\n\n  if (server_config_->isSSL())\n  {\n    return std::make_shared<ssl_http_session>(executor, ssl_context_, callback);\n  }\n  else\n  {\n    return std::make_shared<http_session>(executor, callback);\n  }\n}\n\nbool CpHttpSessionManager::isSSL() const\n{\n  return server_config_ ? server_config_->isSSL() : false;\n}\n\nstd::string CpHttpSessionManager::getServerName() const\n{\n  return server_config_ ? server_config_->getServerName() : \"\";\n}\n\nstd::string CpHttpSessionManager::getPort() const\n{\n  return server_config_ ? server_config_->getPort() : \"\";\n}\n\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/src/cl_http/http_session.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n*\n\nAuthors: Jacobus Lock & Brett Aldrich\n\n******************************************************************************************************************/\n\n#include <cl_http/http_session.hpp>\n\nnamespace cl_http\n{\n\nhttp_session::http_session(\n  boost::asio::any_io_executor ioc, const std::function<void(const TResponse &)> response)\n: onResponse{response}, resolver_{ioc}, stream_{ioc}\n{\n}\n\nvoid http_session::setBody(const std::string & body) { req_.body() = body; }\n\nvoid http_session::run(\n  const std::string & host, const std::string & target, const boost::beast::http::verb http_method,\n  const int & version)\n{\n  // Set up an HTTP request\n  req_.version(version);\n  req_.method(http_method);\n  req_.target(target);\n  req_.set(boost::beast::http::field::host, host);\n  req_.set(boost::beast::http::field::user_agent, BOOST_BEAST_VERSION_STRING);\n\n  // Look up the domain name\n  resolver_.async_resolve(\n    host.c_str(), kPort.c_str(),\n    boost::beast::bind_front_handler(&http_session::on_resolve, shared_from_this()));\n}\n\nvoid http_session::on_resolve(\n  boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type results)\n{\n  if (ec) return fail(ec, \"resolve\");\n\n  // Set a timeout on the operation\n  stream_.expires_after(std::chrono::seconds(1));\n\n  // Make the connection on the IP address we get from a lookup\n  stream_.async_connect(\n    results, boost::beast::bind_front_handler(&http_session::on_connect, shared_from_this()));\n}\n\nvoid http_session::fail(boost::beast::error_code ec, char const * what)\n{\n  std::cout << \"Failure!...\" << std::endl;\n  std::cerr << what << \": \" << ec.message() << \"\\n\";\n  res_.result(boost::beast::http::status::bad_request);\n  res_.reason() = ec.message();\n  onResponse(res_);\n}\n\nvoid http_session::on_connect(\n  boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type::endpoint_type)\n{\n  if (ec) return fail(ec, \"connect\");\n\n  // Set a timeout on the operation\n  stream_.expires_after(std::chrono::seconds(1));\n\n  // Send the HTTP request to the remote host\n  boost::beast::http::async_write(\n    stream_, req_, boost::beast::bind_front_handler(&http_session::on_write, shared_from_this()));\n}\n\nvoid http_session::on_write(boost::beast::error_code ec, std::size_t bytes_transferred)\n{\n  boost::ignore_unused(bytes_transferred);\n\n  if (ec) return fail(ec, \"write\");\n\n  // Receive the HTTP response\n  boost::beast::http::async_read(\n    stream_, buffer_, res_,\n    boost::beast::bind_front_handler(&http_session::on_read, shared_from_this()));\n}\n\nvoid http_session::on_read(boost::beast::error_code ec, std::size_t bytes_transferred)\n{\n  boost::ignore_unused(bytes_transferred);\n\n  if (ec) return fail(ec, \"read\");\n\n  // Gracefully close the socket\n  stream_.socket().shutdown(boost::asio::ip::tcp::socket::shutdown_both, ec);\n\n  // not_connected happens sometimes so don't bother reporting it.\n  if (ec && ec != boost::beast::errc::not_connected) return fail(ec, \"shutdown\");\n\n  // If we get here then the connection is closed gracefully\n  onResponse(res_);\n}\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_http/src/cl_http/ssl_http_session.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n*\n\nAuthor: Jacobus Lock\n\n******************************************************************************************************************/\n\n#include <cl_http/ssl_http_session.hpp>\n\nnamespace cl_http\n{\n\nssl_http_session::ssl_http_session(\n  boost::asio::any_io_executor ioc, boost::asio::ssl::context & ssl_context,\n  const std::function<void(const TResponse &)> response)\n: onResponse{response}, resolver_{ioc}, stream_{ioc, ssl_context}\n{\n}\n\nvoid ssl_http_session::setBody(const std::string & body) { req_.body() = body; }\n\nvoid ssl_http_session::setHeaders(const std::unordered_map<std::string, std::string> & headers)\n{\n  for (const auto & [key, val] : headers)\n  {\n    this->appendToHeader(key, val);\n  }\n}\n\nvoid ssl_http_session::appendToHeader(const std::string & key, const std::string & val)\n{\n  req_.set(key, val);\n}\n\nvoid ssl_http_session::run(\n  const std::string & host, const std::string & target, const boost::beast::http::verb http_method,\n  const int & version)\n{\n  // Set up an HTTP request\n  req_.version(version);\n  req_.method(http_method);\n  req_.target(target);\n  req_.set(boost::beast::http::field::host, host);\n  req_.set(boost::beast::http::field::user_agent, BOOST_BEAST_VERSION_STRING);\n\n  // Set an SNI to deal with CDNs\n  if (!SSL_set_tlsext_host_name(stream_.native_handle(), host.c_str()))\n  {\n    boost::system::error_code ec{\n      static_cast<int>(::ERR_get_error()), boost::asio::error::get_ssl_category()};\n    std::cerr << ec.message() << \"\\n\";\n    return;\n  }\n  // Look up the domain name\n  resolver_.async_resolve(\n    host.c_str(), kPort.c_str(),\n    boost::beast::bind_front_handler(&ssl_http_session::on_resolve, shared_from_this()));\n}\n\nvoid ssl_http_session::on_resolve(\n  boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type results)\n{\n  if (ec) return fail(ec, \"resolve\");\n\n  // Set a timeout on the operation\n  boost::beast::get_lowest_layer(stream_).expires_after(std::chrono::seconds(1));\n\n  // Make the connection on the IP address we get from a lookup\n  boost::beast::get_lowest_layer(stream_).async_connect(\n    results, boost::beast::bind_front_handler(&ssl_http_session::on_connect, shared_from_this()));\n}\n\nvoid ssl_http_session::fail(boost::beast::error_code ec, char const * what)\n{\n  std::cout << \"Failure!...\" << std::endl;\n  std::cerr << what << \": \" << ec.message() << \"\\n\";\n  res_.result(boost::beast::http::status::bad_request);\n  res_.reason() = ec.message();\n  onResponse(res_);\n}\n\nvoid ssl_http_session::on_connect(\n  boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type::endpoint_type)\n{\n  if (ec) return fail(ec, \"connect\");\n\n  // Set a timeout on the operation\n  boost::beast::get_lowest_layer(stream_).expires_after(std::chrono::seconds(1));\n\n  // Send the HTTP request to the remote host\n  stream_.async_handshake(\n    boost::asio::ssl::stream_base::client,\n    boost::beast::bind_front_handler(&ssl_http_session::on_handshake, shared_from_this()));\n}\n\nvoid ssl_http_session::on_handshake(boost::beast::error_code ec)\n{\n  if (ec) return fail(ec, \"handshake\");\n\n  // Set a timeout on the operation\n  boost::beast::get_lowest_layer(stream_).expires_after(std::chrono::seconds(1));\n\n  // Send the HTTP request to the remote host\n  boost::beast::http::async_write(\n    stream_, req_,\n    boost::beast::bind_front_handler(&ssl_http_session::on_write, shared_from_this()));\n}\n\nvoid ssl_http_session::on_write(boost::beast::error_code ec, std::size_t bytes_transferred)\n{\n  boost::ignore_unused(bytes_transferred);\n\n  if (ec) return fail(ec, \"write\");\n\n  // Receive the HTTP response\n  boost::beast::http::async_read(\n    stream_, buffer_, res_,\n    boost::beast::bind_front_handler(&ssl_http_session::on_read, shared_from_this()));\n}\n\nvoid ssl_http_session::on_read(boost::beast::error_code ec, std::size_t bytes_transferred)\n{\n  boost::ignore_unused(bytes_transferred);\n\n  if (ec) return fail(ec, \"read\");\n\n  boost::beast::get_lowest_layer(stream_).expires_after(std::chrono::seconds(1));\n\n  // Gracefully close the socket\n  // stream_.socket().shutdown(boost::asio::ip::tcp::socket::shutdown_both, ec);\n  stream_.async_shutdown(\n    boost::beast::bind_front_handler(&ssl_http_session::on_shutdown, shared_from_this()));\n}\n\nvoid ssl_http_session::on_shutdown(boost::beast::error_code ec)\n{\n  // not_connected happens sometimes so don't bother reporting it.\n  if (ec == boost::asio::error::eof)\n  {\n    // Rationale:\n    // http://stackoverflow.com/questions/25587403/boost-asio-ssl-async-shutdown-always-finishes-with-an-error\n    ec = {};\n  }\n  // if (ec) return fail(ec, \"shutdown\");\n\n  // If we get here then the connection is closed gracefully\n  onResponse(res_);\n}\n}  // namespace cl_http\n"
  },
  {
    "path": "smacc2_client_library/cl_isaac_apriltag/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(cl_isaac_apriltag)\n\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(isaac_ros_apriltag_interfaces REQUIRED)\nfind_package(tf2_ros REQUIRED)\nfind_package(tf2_geometry_msgs REQUIRED)\nfind_package(visualization_msgs REQUIRED)\nfind_package(geometry_msgs REQUIRED)\n\ninclude_directories(include)\n\nament_export_include_directories(include)\nament_export_dependencies(\n  smacc2\n  isaac_ros_apriltag_interfaces\n  tf2_ros\n  tf2_geometry_msgs\n  visualization_msgs\n  geometry_msgs\n)\n\ninstall(DIRECTORY include/ DESTINATION include)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_isaac_apriltag/COLCON_IGNORE",
    "content": "# This package requires isaac_ros_apriltag_interfaces which is part of NVIDIA Isaac ROS.\n# Remove this file when Isaac ROS packages are available in the workspace.\n"
  },
  {
    "path": "smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/cl_isaac_apriltag.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <isaac_ros_apriltag_interfaces/msg/april_tag_detection_array.hpp>\n#include <smacc2/client_core_components/cp_topic_subscriber.hpp>\n#include <smacc2/smacc.hpp>\n#include <smacc2/smacc_client.hpp>\n\n#include <cl_isaac_apriltag/components/cp_apriltag_mission_state.hpp>\n#include <cl_isaac_apriltag/components/cp_apriltag_tracker.hpp>\n\n#include <string>\n\nnamespace cl_isaac_apriltag\n{\n\n// Event: Unvisited AprilTag detected (templated for orthogonal/source)\ntemplate <typename AsyncCB, typename Orthogonal>\nstruct EvUnvisitedAprilTagDetected : sc::event<EvUnvisitedAprilTagDetected<AsyncCB, Orthogonal>>\n{\n};\n\nusing AprilTagDetectionArray = isaac_ros_apriltag_interfaces::msg::AprilTagDetectionArray;\n\n/**\n * @brief Client for Isaac ROS AprilTag detection.\n *\n * This client follows the pure component-based architecture pattern.\n * It acts as an orchestrator that creates and wires components:\n *\n * - CpTopicSubscriber<AprilTagDetectionArray>: Subscribes to /tag_detections\n * - CpAprilTagTracker: Transforms detections to map frame, stores poses\n * - CpAprilTagMissionState: Manages visited/selected tag state\n *\n * Client behaviors should use requiresComponent() to access tracker and\n * mission state, not direct client fields.\n */\nclass ClIsaacApriltag : public smacc2::ISmaccClient\n{\npublic:\n  ClIsaacApriltag(std::string topic_name = \"/tag_detections\", std::string target_frame = \"map\")\n  : topicName_(topic_name), targetFrame_(target_frame)\n  {\n  }\n\n  virtual ~ClIsaacApriltag() {}\n\n  template <typename TOrthogonal, typename TClient>\n  void onComponentInitialization()\n  {\n    // 1. Create core topic subscriber (from smacc2 framework)\n    this->createComponent<\n      smacc2::client_core_components::CpTopicSubscriber<AprilTagDetectionArray>, TOrthogonal,\n      ClIsaacApriltag>(topicName_);\n\n    // 2. Create tracker component (hooks to subscriber via requiresComponent)\n    this->createComponent<CpAprilTagTracker, TOrthogonal, ClIsaacApriltag>(targetFrame_);\n\n    // 3. Create mission state component\n    this->createComponent<CpAprilTagMissionState, TOrthogonal, ClIsaacApriltag>();\n  }\n\nprivate:\n  std::string topicName_;\n  std::string targetFrame_;\n};\n\n}  // namespace cl_isaac_apriltag\n"
  },
  {
    "path": "smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/client_behaviors/cb_detect_apriltag.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_isaac_apriltag/cl_isaac_apriltag.hpp>\n#include <cl_isaac_apriltag/components/cp_apriltag_mission_state.hpp>\n#include <cl_isaac_apriltag/components/cp_apriltag_tracker.hpp>\n#include <smacc2/smacc.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_isaac_apriltag\n{\n\n/**\n * @brief Behavior that detects unvisited AprilTags and posts events.\n *\n * This behavior uses requiresComponent() to access:\n * - CpAprilTagTracker: For detection signals\n * - CpAprilTagMissionState: For visited/selected tag management\n *\n * When an unvisited tag is detected, it selects the tag and posts\n * an EvUnvisitedAprilTagDetected event.\n */\nclass CbDetectAprilTag : public smacc2::SmaccAsyncClientBehavior\n{\nprivate:\n  std::function<void()> postEvAprilTagDetected_;\n\n  // Components accessed via requiresComponent (NOT direct client fields!)\n  CpAprilTagTracker * tracker_ = nullptr;\n  CpAprilTagMissionState * missionState_ = nullptr;\n\npublic:\n  CbDetectAprilTag() {}\n\n  virtual ~CbDetectAprilTag() {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onOrthogonalAllocation()\n  {\n    postEvAprilTagDetected_ = [=]()\n    { this->postEvent<EvUnvisitedAprilTagDetected<TSourceObject, TOrthogonal>>(); };\n  }\n\n  virtual void onEntry() override\n  {\n    // Get components via requiresComponent pattern (NOT direct client access!)\n    this->requiresComponent(tracker_, true);       // HARD requirement\n    this->requiresComponent(missionState_, true);  // HARD requirement\n\n    // Subscribe to tracker's detection signal\n    tracker_->onAprilTagDetected(&CbDetectAprilTag::onAprilTagDetected, this);\n  }\n\n  void onAprilTagDetected(\n    const isaac_ros_apriltag_interfaces::msg::AprilTagDetectionArray::SharedPtr & msg)\n  {\n    for (auto & detection : msg->detections)\n    {\n      std::string apriltag_frame_id = detection.family + \":\" + std::to_string(detection.id);\n\n      // Check mission state via component (NOT direct client fields!)\n      if (!missionState_->isTagVisited(apriltag_frame_id))\n      {\n        RCLCPP_INFO_STREAM(\n          getLogger(), \"[CbDetectAprilTag] new unvisited AprilTag detected: \" << detection.id);\n\n        // Select tag via component method (NOT direct client field assignment!)\n        missionState_->selectTag(apriltag_frame_id);\n        postEvAprilTagDetected_();\n      }\n      else\n      {\n        RCLCPP_INFO_STREAM_THROTTLE(\n          getLogger(), *(getNode()->get_clock()), 2000,\n          \"[CbDetectAprilTag] Skipping AprilTag already detected: \" << apriltag_frame_id);\n      }\n    }\n  }\n};\n\n}  // namespace cl_isaac_apriltag\n"
  },
  {
    "path": "smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/components/cp_april_visualization.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <smacc2/common.hpp>\n#include <smacc2/component.hpp>\n\n#include <rclcpp/rclcpp.hpp>\n\n#include <memory>\n#include <mutex>\n#include <vector>\n\n#include <std_msgs/msg/header.hpp>\n#include <visualization_msgs/msg/marker_array.hpp>\n\n#include <cl_isaac_apriltag/components/cp_apriltag_tracker.hpp>\n\nusing namespace std::chrono_literals;\nusing std::chrono_literals::operator\"\"s;\n\nnamespace cl_isaac_apriltag\n{\n\n/**\n * @brief Component that visualizes AprilTag detections in RViz.\n *\n * This component uses requiresComponent() to access the CpAprilTagTracker\n * and queries detected tags for visualization. It publishes MarkerArray\n * messages showing the aggregated position of recently detected tags.\n */\nclass CpAprilTagVisualization : public smacc2::ISmaccComponent, public smacc2::ISmaccUpdatable\n{\npublic:\n  CpAprilTagVisualization() {}\n\n  virtual ~CpAprilTagVisualization() {}\n\n  void onInitialize() override\n  {\n    // Get tracker component via requiresComponent pattern (NOT owner_ cast!)\n    this->requiresComponent(tracker_);\n\n    markerPublisher_ =\n      getNode()->create_publisher<visualization_msgs::msg::MarkerArray>(\"/markers_2\", 10);\n  }\n\n  std::optional<tf2::Transform> getGlobalApriltagTransform()\n  {\n    std::lock_guard<std::mutex> lock(m_mutex_);\n    return globalApriltagTransform_;\n  }\n\n  void computeAggregatedMarker()\n  {\n    std::stringstream ss;\n\n    ss << \"[CpAprilTagVisualization] computeAggregatedMarker\" << std::endl;\n\n    // Access tracker via requiresComponent (NOT owner_ cast!)\n    ss << \"[CpAprilTagVisualization] getTagsWithinTime\" << std::endl;\n    auto tags = tracker_->getTagsWithinTime(0.5s);\n\n    // Average apriltag position\n    double avgX = 0;\n    double avgY = 0;\n    double avgZ = 0;\n    for (auto & apriltag : tags)\n    {\n      avgX += apriltag.second.pose.position.x;\n      avgY += apriltag.second.pose.position.y;\n      avgZ += apriltag.second.pose.position.z;\n    }\n\n    if (tags.size() == 0)\n    {\n      RCLCPP_INFO_THROTTLE(\n        getLogger(), *(getNode()->get_clock()), 1000,\n        \"[CpAprilTagVisualization] no apriltags detected to visualize\");\n      return;\n    }\n\n    avgX /= tags.size();\n    avgY /= tags.size();\n    avgZ /= tags.size();\n\n    // Subtract some small forward offset from apriltag position for the goal position\n    avgX -= 0.15;\n\n    ss << \"[CpAprilTagVisualization] detected \" << tags.size() << \" tags\" << std::endl;\n    ss << \"[CpAprilTagVisualization] avgX: \" << avgX << \", avgY: \" << avgY << \", avgZ: \" << avgZ\n       << std::endl;\n\n    tf2::Transform apriltagTransform;\n    apriltagTransform.setOrigin(tf2::Vector3(avgX, avgY, 0.0));\n    apriltagTransform.setRotation(tf2::Quaternion(0.0, 0.0, 0.0, 1.0));\n\n    globalApriltagTransform_ = apriltagTransform;\n\n    ss << \"[CpAprilTagVisualization] apriltagTransform: \" << apriltagTransform.getOrigin().x()\n       << \", \" << apriltagTransform.getOrigin().y() << \", \" << apriltagTransform.getOrigin().z();\n    ss << \"[CpAprilTagVisualization] globalApriltagTransform: \"\n       << globalApriltagTransform_->getOrigin().x() << \", \"\n       << globalApriltagTransform_->getOrigin().y() << \", \"\n       << globalApriltagTransform_->getOrigin().z();\n    RCLCPP_INFO_THROTTLE(getLogger(), *(getNode()->get_clock()), 1000, ss.str().c_str());\n  }\n\n  virtual void update() override\n  {\n    if (globalApriltagTransform_)\n    {\n      this->computeAggregatedMarker();\n\n      // Publish visualization markers of the apriltag global estimation\n      visualization_msgs::msg::MarkerArray markerArray;\n\n      visualization_msgs::msg::Marker marker;\n      marker.header.frame_id = \"map\";\n      marker.header.stamp = getNode()->now();\n      marker.ns = \"apriltag\";\n      marker.id = 0;\n      marker.action = visualization_msgs::msg::Marker::ADD;\n\n      // Lifetime of 0.5s\n      marker.lifetime = rclcpp::Duration(0.5s);\n\n      // Type sphere\n      marker.type = visualization_msgs::msg::Marker::SPHERE;\n\n      auto origin = globalApriltagTransform_->getOrigin();\n      marker.pose.position.x = origin.x();\n      marker.pose.position.y = origin.y();\n      marker.pose.position.z = origin.z();\n\n      auto rotation = globalApriltagTransform_->getRotation();\n      marker.pose.orientation.w = rotation.w();\n      marker.pose.orientation.y = rotation.y();\n      marker.pose.orientation.z = rotation.z();\n      marker.pose.orientation.x = rotation.x();\n\n      RCLCPP_INFO_THROTTLE(\n        getLogger(), *(getNode()->get_clock()), 1000,\n        \"[CpAprilTagVisualization] marker position: %f, %f, %f\", origin.x(), origin.y(),\n        origin.z());\n\n      // Red color\n      marker.color.r = 1.0;\n      marker.color.g = 0.0;\n      marker.color.b = 0.0;\n      marker.color.a = 1.0;\n\n      marker.scale.x = 0.1;\n      marker.scale.y = 0.1;\n      marker.scale.z = 0.1;\n\n      markerArray.markers.push_back(marker);\n\n      markerPublisher_->publish(markerArray);\n    }\n  }\n\nprotected:\n  std::mutex m_mutex_;\n\n  // Tracker component (obtained via requiresComponent)\n  CpAprilTagTracker * tracker_ = nullptr;\n\n  rclcpp::Publisher<visualization_msgs::msg::MarkerArray>::SharedPtr markerPublisher_;\n  std::optional<tf2::Transform> globalApriltagTransform_;\n};\n\n}  // namespace cl_isaac_apriltag\n"
  },
  {
    "path": "smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/components/cp_apriltag_mission_state.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <smacc2/component.hpp>\n\n#include <algorithm>\n#include <mutex>\n#include <optional>\n#include <string>\n#include <vector>\n\nnamespace cl_isaac_apriltag\n{\n\n/**\n * @brief Component that manages mission-level AprilTag state.\n *\n * This component tracks which AprilTags have been visited and which tag\n * is currently selected for navigation. It provides thread-safe access\n * to mission state, separating mission logic from detection logic.\n */\nclass CpAprilTagMissionState : public smacc2::ISmaccComponent\n{\npublic:\n  CpAprilTagMissionState() = default;\n\n  virtual ~CpAprilTagMissionState() = default;\n\n  void onInitialize() override { RCLCPP_INFO(getLogger(), \"[CpAprilTagMissionState] Initialized\"); }\n\n  /**\n   * @brief Check if a tag has been visited.\n   * @param tag_frame_id The tag frame ID (e.g., \"36h11:5\")\n   * @return true if the tag has been marked as visited\n   */\n  bool isTagVisited(const std::string & tag_frame_id) const\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    return std::find(visitedWorkingAreas_.begin(), visitedWorkingAreas_.end(), tag_frame_id) !=\n           visitedWorkingAreas_.end();\n  }\n\n  /**\n   * @brief Mark a tag as visited.\n   * @param tag_frame_id The tag frame ID to mark as visited\n   */\n  void markTagVisited(const std::string & tag_frame_id)\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    if (\n      std::find(visitedWorkingAreas_.begin(), visitedWorkingAreas_.end(), tag_frame_id) ==\n      visitedWorkingAreas_.end())\n    {\n      visitedWorkingAreas_.push_back(tag_frame_id);\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[CpAprilTagMissionState] Marked tag as visited: \" << tag_frame_id);\n    }\n  }\n\n  /**\n   * @brief Clear all visited tags.\n   */\n  void clearVisitedTags()\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    visitedWorkingAreas_.clear();\n    RCLCPP_INFO(getLogger(), \"[CpAprilTagMissionState] Cleared all visited tags\");\n  }\n\n  /**\n   * @brief Get a copy of all visited tag IDs.\n   * @return Vector of visited tag frame IDs\n   */\n  std::vector<std::string> getVisitedTags() const\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    return visitedWorkingAreas_;\n  }\n\n  /**\n   * @brief Select a tag for navigation.\n   * @param tag_frame_id The tag frame ID to select\n   */\n  void selectTag(const std::string & tag_frame_id)\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    selectedVisitTagId_ = tag_frame_id;\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[CpAprilTagMissionState] Selected tag for visit: \" << tag_frame_id);\n  }\n\n  /**\n   * @brief Get the currently selected tag.\n   * @return Optional containing the selected tag frame ID, or nullopt if none selected\n   */\n  std::optional<std::string> getSelectedTag() const\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    return selectedVisitTagId_;\n  }\n\n  /**\n   * @brief Clear the currently selected tag.\n   */\n  void clearSelectedTag()\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    selectedVisitTagId_.reset();\n    RCLCPP_INFO(getLogger(), \"[CpAprilTagMissionState] Cleared selected tag\");\n  }\n\nprivate:\n  mutable std::mutex mutex_;\n  std::vector<std::string> visitedWorkingAreas_;\n  std::optional<std::string> selectedVisitTagId_;\n};\n\n}  // namespace cl_isaac_apriltag\n"
  },
  {
    "path": "smacc2_client_library/cl_isaac_apriltag/include/cl_isaac_apriltag/components/cp_apriltag_tracker.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <tf2_ros/buffer.h>\n#include <tf2_ros/transform_listener.h>\n\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include <isaac_ros_apriltag_interfaces/msg/april_tag_detection_array.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n\n#include <smacc2/client_core_components/cp_topic_subscriber.hpp>\n#include <smacc2/component.hpp>\n#include <smacc2/smacc_signal.hpp>\n\n#include <map>\n#include <mutex>\n#include <string>\n\nnamespace cl_isaac_apriltag\n{\n\nusing AprilTagDetectionArray = isaac_ros_apriltag_interfaces::msg::AprilTagDetectionArray;\n\n/**\n * @brief Component that tracks AprilTag detections and transforms them to a target frame.\n *\n * This component uses requiresComponent() to get the CpTopicSubscriber and hooks into\n * its onMessageReceived signal. It handles TF lookups to transform tag detections to\n * the target frame (default: \"map\") and provides time-filtered queries.\n */\nclass CpAprilTagTracker : public smacc2::ISmaccComponent\n{\npublic:\n  CpAprilTagTracker(std::string target_frame = \"map\") : targetFrame_(target_frame) {}\n\n  virtual ~CpAprilTagTracker() {}\n\n  void onInitialize() override\n  {\n    tfBuffer_ = std::make_shared<tf2_ros::Buffer>(this->getNode()->get_clock());\n    tfListener_ = std::make_shared<tf2_ros::TransformListener>(*tfBuffer_);\n  }\n\n  template <typename TOrthogonal, typename TClient>\n  void onComponentInitialization()\n  {\n    // Get the topic subscriber component via requiresComponent pattern\n    this->requiresComponent(topicSubscriber_);\n\n    // Hook into the subscriber's message received signal\n    topicSubscriber_->onMessageReceived(&CpAprilTagTracker::onAprilTagMessage, this);\n  }\n\n  /**\n   * @brief Get tags detected within the specified duration from now.\n   * @param duration Maximum age of detections to include\n   * @return Map of tag frame IDs to their poses in the target frame\n   */\n  std::map<std::string, geometry_msgs::msg::PoseStamped> getTagsWithinTime(\n    rclcpp::Duration duration)\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    std::map<std::string, geometry_msgs::msg::PoseStamped> ret;\n\n    auto now = getNode()->now();\n\n    std::stringstream ss;\n    for (auto & apriltag : detectedAprilTagsMapPose_)\n    {\n      auto tagstamp = rclcpp::Time(apriltag.second.header.stamp);\n      rclcpp::Duration elapsed = now - tagstamp;\n\n      ss << \"[CpAprilTagTracker] AprilTag: \" << apriltag.first << \" Elapsed: \" << elapsed.seconds()\n         << \" Stamp: \" << tagstamp.seconds() << \" now \" << now.seconds() << std::endl;\n      if (elapsed < duration)\n      {\n        ret.insert(apriltag);\n        ss << \"[SELECTED]\" << std::endl;\n      }\n      else\n      {\n        ss << \"[NOT SELECTED]\" << std::endl;\n      }\n      ss << std::endl;\n    }\n\n    RCLCPP_INFO_THROTTLE(getLogger(), *(getNode()->get_clock()), 1000, \"%s\", ss.str().c_str());\n    return ret;\n  }\n\n  /**\n   * @brief Get a specific tag's pose by frame ID.\n   * @param tag_frame_id The tag frame ID (e.g., \"36h11:5\")\n   * @return Optional pose if tag is tracked, nullopt otherwise\n   */\n  std::optional<geometry_msgs::msg::PoseStamped> getTagPose(const std::string & tag_frame_id)\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    auto it = detectedAprilTagsMapPose_.find(tag_frame_id);\n    if (it != detectedAprilTagsMapPose_.end())\n    {\n      return it->second;\n    }\n    return std::nullopt;\n  }\n\n  // Signal emitted when AprilTag detections are processed\n  smacc2::SmaccSignal<void(const AprilTagDetectionArray::SharedPtr &)> onAprilTagDetection_;\n\n  /**\n   * @brief Subscribe to AprilTag detection events.\n   * @param callback Member function to call when detections occur\n   * @param object Object instance for the callback\n   * @return Connection object for managing the subscription\n   */\n  template <typename T>\n  smacc2::SmaccSignalConnection onAprilTagDetected(\n    void (T::*callback)(const AprilTagDetectionArray::SharedPtr &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onAprilTagDetection_, callback, object);\n  }\n\nprivate:\n  // Topic subscriber component (obtained via requiresComponent)\n  smacc2::client_core_components::CpTopicSubscriber<AprilTagDetectionArray> * topicSubscriber_ =\n    nullptr;\n\n  // TF management\n  std::shared_ptr<tf2_ros::Buffer> tfBuffer_;\n  std::shared_ptr<tf2_ros::TransformListener> tfListener_;\n  std::string targetFrame_;\n\n  // Detection storage (thread-safe)\n  std::map<std::string, geometry_msgs::msg::PoseStamped> detectedAprilTagsMapPose_;\n  std::mutex mutex_;\n\n  void onAprilTagMessage(const AprilTagDetectionArray & msg)\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n\n    std::stringstream ss;\n    for (auto & detection : msg.detections)\n    {\n      std::string apriltag_frameid = detection.family + \":\" + std::to_string(detection.id);\n      ss << \"[CpAprilTagTracker] AprilTag detected: \" << apriltag_frameid << std::endl;\n\n      // Get map position using TF lookup\n      geometry_msgs::msg::TransformStamped transformStampedGlobal;\n\n      try\n      {\n        transformStampedGlobal =\n          tfBuffer_->lookupTransform(targetFrame_, apriltag_frameid, msg.header.stamp);\n      }\n      catch (tf2::TransformException & ex)\n      {\n        RCLCPP_WARN_THROTTLE(\n          getLogger(), *(getNode()->get_clock()), 1000,\n          \"[CpAprilTagTracker] TF lookup failed for %s: %s\", apriltag_frameid.c_str(), ex.what());\n        continue;\n      }\n\n      // Transform to pose\n      geometry_msgs::msg::PoseStamped poseStamped;\n      poseStamped.header = transformStampedGlobal.header;\n      poseStamped.pose.position.x = transformStampedGlobal.transform.translation.x;\n      poseStamped.pose.position.y = transformStampedGlobal.transform.translation.y;\n      poseStamped.pose.position.z = transformStampedGlobal.transform.translation.z;\n      poseStamped.pose.orientation = transformStampedGlobal.transform.rotation;\n\n      detectedAprilTagsMapPose_[apriltag_frameid] = poseStamped;\n\n      ss << \"[CpAprilTagTracker] new AprilTag detected: \" << apriltag_frameid << \" at \"\n         << poseStamped.pose.position.x << \", \" << poseStamped.pose.position.y << \", \"\n         << poseStamped.pose.position.z;\n    }\n    RCLCPP_INFO_STREAM_THROTTLE(getLogger(), *(getNode()->get_clock()), 1000, ss.str());\n\n    // Emit signal with SharedPtr for downstream subscribers\n    auto msgPtr = std::make_shared<AprilTagDetectionArray>(msg);\n    onAprilTagDetection_(msgPtr);\n  }\n};\n\n}  // namespace cl_isaac_apriltag\n"
  },
  {
    "path": "smacc2_client_library/cl_isaac_apriltag/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>cl_isaac_apriltag</name>\n  <version>3.0.1</version>\n  <description>SMACC2 client for Isaac ROS AprilTag detection</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n  <depend>isaac_ros_apriltag_interfaces</depend>\n  <depend>tf2_ros</depend>\n  <depend>tf2_geometry_msgs</depend>\n  <depend>visualization_msgs</depend>\n  <depend>geometry_msgs</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_keyboard/CHANGELOG.rst",
    "content": "Changelog for package cl_keyboard\n==================================\n\n.. note::\n   This package was created in September 2025 as a refactored version of keyboard_client.\n   For historical changes prior to 2.3.20, see keyboard_client/CHANGELOG.rst.\n   The keyboard_client package is now deprecated in favor of cl_keyboard.\n\n2.3.20 (2025-11-01)\n-------------------\n* New cl_keyboard client library created as replacement for keyboard_client (`#621 <https://github.com/robosoft-ai/SMACC2/issues/621>`_)\n\n  * Refactored keyboard client to remove cb.cpp file (`#609 <https://github.com/robosoft-ai/SMACC2/issues/609>`_)\n  * Base cp_keyboard implementation (`#605 <https://github.com/robosoft-ai/SMACC2/issues/605>`_)\n  * Final keyboard client refactor changes with formatting (`#599 <https://github.com/robosoft-ai/SMACC2/issues/599>`_)\n\n* Moving reference library from ros_timer_client and keyboard_client to cl_ros2_timer and cl_keyboard (`#645 <https://github.com/robosoft-ai/SMACC2/issues/645>`_)\n* Contributors: Brett Aldrich, Pablo Iñigo Blasco\n"
  },
  {
    "path": "smacc2_client_library/cl_keyboard/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(cl_keyboard)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(std_msgs REQUIRED)\n\ninclude_directories(\n  include\n  ${smacc2_INCLUDE_DIRS}\n  ${std_msgs_INCLUDE_DIRS}\n)\n\nfile(GLOB_RECURSE SRC_FILES src *.cpp)\n#file(GLOB_RECURSE SRC_FILES \"src/*.cpp\" \"src/client_behaviors/*.cpp\")\n\nadd_library(${PROJECT_NAME}\n  ${SRC_FILES}\n)\n\ntarget_link_libraries(${PROJECT_NAME} ${smacc2_LIBRARIES} ${std_msgs_LIBRARIES})\nament_target_dependencies(${PROJECT_NAME} smacc2 std_msgs)\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include)\n\ninstall(TARGETS\n  ${PROJECT_NAME}\n  DESTINATION lib/)\n\ninstall(PROGRAMS\n  servers/keyboard_server_node.py\n  DESTINATION lib/${PROJECT_NAME})\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_keyboard/include/cl_keyboard/cl_keyboard.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_keyboard/components/cp_keyboard_listener_1.hpp>\n\n#include <smacc2/client_core_components/cp_topic_subscriber.hpp>\n\n#include <smacc2/introspection/introspection.hpp>\n#include <smacc2/smacc.hpp>\n\n#include <boost/asio.hpp>\n#include <boost/asio/posix/stream_descriptor.hpp>\n#include <iostream>\n\n#include <std_msgs/msg/u_int16.hpp>\n\nnamespace cl_keyboard\n{\nclass ClKeyboard : public smacc2::ISmaccClient\n{\npublic:\n  ClKeyboard();\n  virtual ~ClKeyboard();\n\n  // Override the base class methods to call our setup\n  template <typename TOrthogonal, typename TClient>\n  void onComponentInitialization()\n\n  // Clients utilize a composition based architecture for their components.\n  // In the function body below we create the components that will be used in this client.\n\n  {\n    // We start by creating a topic subscriber component from SMACC2s client core components.\n    // We use this to gain the topic funcionality interated with SMACC and the ability to post smacc events for transitions.\n    // We are using it to handle the reception of ros topic messages and to notify the other components in the client.\n    this->createComponent<\n      smacc2::client_core_components::CpTopicSubscriber<std_msgs::msg::UInt16>, TOrthogonal,\n      ClKeyboard>(\"/keyboard_unicode\");\n\n    // This keyboard listener component requires CpTopicSubscriber.\n    // It is notified by the CpTopicSubscriber and processes the messages to decide which keyboard event must be posted and then posts it.\n    this->createComponent<cl_keyboard::components::CpKeyboardListener1, TOrthogonal, ClKeyboard>();\n  }\n};\n}  // namespace cl_keyboard\n"
  },
  {
    "path": "smacc2_client_library/cl_keyboard/include/cl_keyboard/client_behaviors/cb_default_keyboard_behavior.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <smacc2/smacc_client_behavior.hpp>\n\n#include <std_msgs/msg/u_int16.hpp>\n\nnamespace cl_keyboard\n{\nclass CbDefaultKeyboardBehavior : public smacc2::SmaccClientBehavior\n{\npublic:\n  components::CpKeyboardListener1 * cpSubscriber1;\n  std::function<void(char)> postEventKeyPress;\n\n  void onEntry()\n  {\n    this->requiresComponent(this->cpSubscriber1);\n    this->cpSubscriber1->OnKeyPress(&CbDefaultKeyboardBehavior::OnKeyPress, this);\n  }\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    postEventKeyPress = [=](char character)\n    {\n      if (character == 'a')\n        postKeyEvent<EvKeyPressA<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'b')\n        postKeyEvent<EvKeyPressB<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'c')\n        postKeyEvent<EvKeyPressC<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'd')\n        postKeyEvent<EvKeyPressD<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'e')\n        postKeyEvent<EvKeyPressE<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'f')\n        postKeyEvent<EvKeyPressF<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'g')\n        postKeyEvent<EvKeyPressG<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'h')\n        postKeyEvent<EvKeyPressH<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'i')\n        postKeyEvent<EvKeyPressI<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'j')\n        postKeyEvent<EvKeyPressJ<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'k')\n        postKeyEvent<EvKeyPressK<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'l')\n        postKeyEvent<EvKeyPressL<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'm')\n        postKeyEvent<EvKeyPressM<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'n')\n        postKeyEvent<EvKeyPressN<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'o')\n        postKeyEvent<EvKeyPressO<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'p')\n        postKeyEvent<EvKeyPressP<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'q')\n        postKeyEvent<EvKeyPressQ<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'r')\n        postKeyEvent<EvKeyPressR<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 's')\n        postKeyEvent<EvKeyPressS<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 't')\n        postKeyEvent<EvKeyPressT<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'u')\n        postKeyEvent<EvKeyPressU<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'v')\n        postKeyEvent<EvKeyPressV<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'w')\n        postKeyEvent<EvKeyPressW<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'x')\n        postKeyEvent<EvKeyPressX<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'y')\n        postKeyEvent<EvKeyPressY<CbDefaultKeyboardBehavior, TOrthogonal>>();\n      else if (character == 'z')\n        postKeyEvent<EvKeyPressZ<CbDefaultKeyboardBehavior, TOrthogonal>>();\n    };\n  }\n\n  void OnKeyPress(char character) { postEventKeyPress(character); }\n\n  template <typename TEv>\n  void postKeyEvent()\n  {\n    RCLCPP_WARN(\n      getLogger(), \"CbDefaultKeyboardBehavior %ld ev: %s\", (long)(void *)this,\n      smacc2::demangleSymbol(typeid(TEv).name()).c_str());\n    auto event = new TEv();\n    this->postEvent(event);\n  }\n};\n}  // namespace cl_keyboard\n"
  },
  {
    "path": "smacc2_client_library/cl_keyboard/include/cl_keyboard/components/cp_keyboard_listener_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/client_core_components/cp_topic_subscriber.hpp>\n#include <smacc2/introspection/introspection.hpp>\n#include <smacc2/smacc.hpp>\n\n#include <boost/asio.hpp>\n#include <boost/asio/posix/stream_descriptor.hpp>\n#include <iostream>\n\n#include <std_msgs/msg/u_int16.hpp>\n\nnamespace cl_keyboard\n{\n//----------------- KEYBOARD EVENT DEFINITIONS ----------------------------------------------\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressA : sc::event<EvKeyPressA<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressB : sc::event<EvKeyPressB<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressC : sc::event<EvKeyPressC<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressD : sc::event<EvKeyPressD<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressE : sc::event<EvKeyPressE<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressF : sc::event<EvKeyPressF<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressG : sc::event<EvKeyPressG<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressH : sc::event<EvKeyPressH<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressI : sc::event<EvKeyPressI<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressJ : sc::event<EvKeyPressJ<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressK : sc::event<EvKeyPressK<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressL : sc::event<EvKeyPressL<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressM : sc::event<EvKeyPressM<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressN : sc::event<EvKeyPressN<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressO : sc::event<EvKeyPressO<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressP : sc::event<EvKeyPressP<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressQ : sc::event<EvKeyPressQ<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressR : sc::event<EvKeyPressR<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressS : sc::event<EvKeyPressS<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressT : sc::event<EvKeyPressT<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressU : sc::event<EvKeyPressU<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressV : sc::event<EvKeyPressV<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressW : sc::event<EvKeyPressW<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressX : sc::event<EvKeyPressX<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressY : sc::event<EvKeyPressY<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvKeyPressZ : sc::event<EvKeyPressZ<TSource, TOrthogonal>>\n{\n};\n\n//------------------  KEYBOARD LISTENER COMPONENT ---------------------------------------------\nnamespace components\n{\nclass CpKeyboardListener1 : public smacc2::ISmaccComponent\n{\npublic:\n  CpKeyboardListener1() {}\n\n  virtual ~CpKeyboardListener1() {}\n\n  // Override the base class methods to call our setup\n  template <typename TOrthogonal, typename TClient>\n  void onComponentInitialization()\n  {\n    RCLCPP_INFO(getLogger(), \"CpKeyboardListener1 initialization\");\n    smacc2::client_core_components::CpTopicSubscriber<std_msgs::msg::UInt16> * subscriber;\n    this->requiresComponent(subscriber);\n\n    subscriber->onMessageReceived(&CpKeyboardListener1::onKeyboardMessage, this);\n\n    postEventKeyPress = [=](auto unicode_keychar)\n    {\n      char character = (char)unicode_keychar.data;\n      RCLCPP_WARN(getLogger(), \"detected keyboard: %c\", character);\n\n      if (character == 'a')\n        this->postKeyEvent<EvKeyPressA<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'b')\n        this->postKeyEvent<EvKeyPressB<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'c')\n        this->postKeyEvent<EvKeyPressC<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'd')\n        this->postKeyEvent<EvKeyPressD<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'e')\n        this->postKeyEvent<EvKeyPressE<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'f')\n        this->postKeyEvent<EvKeyPressF<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'g')\n        this->postKeyEvent<EvKeyPressG<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'h')\n        this->postKeyEvent<EvKeyPressH<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'i')\n        this->postKeyEvent<EvKeyPressI<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'j')\n        this->postKeyEvent<EvKeyPressJ<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'k')\n        this->postKeyEvent<EvKeyPressK<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'l')\n        this->postKeyEvent<EvKeyPressL<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'm')\n        this->postKeyEvent<EvKeyPressM<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'n')\n        this->postKeyEvent<EvKeyPressN<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'o')\n        this->postKeyEvent<EvKeyPressO<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'p')\n        this->postKeyEvent<EvKeyPressP<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'q')\n        this->postKeyEvent<EvKeyPressQ<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'r')\n        this->postKeyEvent<EvKeyPressR<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 's')\n        this->postKeyEvent<EvKeyPressS<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 't')\n        this->postKeyEvent<EvKeyPressT<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'u')\n        this->postKeyEvent<EvKeyPressU<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'v')\n        this->postKeyEvent<EvKeyPressV<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'w')\n        this->postKeyEvent<EvKeyPressW<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'x')\n        this->postKeyEvent<EvKeyPressX<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'y')\n        this->postKeyEvent<EvKeyPressY<CpKeyboardListener1, TOrthogonal>>();\n      else if (character == 'z')\n        this->postKeyEvent<EvKeyPressZ<CpKeyboardListener1, TOrthogonal>>();\n\n      OnKeyPress_(character);\n    };\n  }\n\n  // This signal is created to be used in client behaviors\n  smacc2::SmaccSignal<void(char keypress)> OnKeyPress_;\n\n  // This is the signal subscription method for client behaviors and other components\n  template <typename T>\n  void OnKeyPress(void (T::*callback)(char keypress), T * object)\n  {\n    this->getStateMachine()->createSignalConnection(OnKeyPress_, callback, object);\n  }\n\n  void onKeyboardMessage(const std_msgs::msg::UInt16 & unicode_keychar)\n  {\n    postEventKeyPress(unicode_keychar);\n  }\n\npublic:\n  template <typename TEv>\n  void postKeyEvent()\n  {\n    RCLCPP_WARN(\n      getLogger(), \"CpKeyboardListener1 ev: %s\",\n      smacc2::demangleSymbol(typeid(TEv).name()).c_str());\n    this->postEvent<TEv>();\n  }\n\nprivate:\n  std::function<void(std_msgs::msg::UInt16)> postEventKeyPress;\n};\n}  // namespace components\n}  // namespace cl_keyboard\n"
  },
  {
    "path": "smacc2_client_library/cl_keyboard/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n <name>cl_keyboard</name>\n  <version>3.0.1</version>\n  <description>The cl_keyboard package</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n  <depend>std_msgs</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_keyboard/servers/keyboard_server_node.py",
    "content": "#!/bin/env python3\n\n# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# *****************************************************************************************************************\n# *\n# * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n# *\n# ******************************************************************************************************************/\n\nimport sys\nimport select\nimport termios\nimport tty\n\nimport rclpy\nfrom rclpy.node import Node\n\nfrom std_msgs.msg import UInt16\n\nsettings = termios.tcgetattr(sys.stdin)\n\n\ndef getKey():\n    global settings\n    tty.setraw(sys.stdin.fileno())\n    select.select([sys.stdin], [], [], 0)\n    key = sys.stdin.read(1)\n    termios.tcsetattr(sys.stdin, termios.TCSADRAIN, settings)\n    return key\n\n\nclass KeyboardPublisher(Node):\n    def __init__(self):\n        super().__init__(\"keyboard_node\")\n        self.pub = self.create_publisher(UInt16, \"keyboard_unicode\", 1)\n        timer_period = 0.20  # seconds\n        self.timer = self.create_timer(timer_period, self.timer_update)\n        self.i = 0\n\n    def timer_update(self):\n        try:\n            key = getKey()\n            # rospy.loginfo(type(key))\n            msg = UInt16()\n            msg.data = ord(key)\n\n            self.get_logger().info(f\"key: {msg.data}\")\n            self.pub.publish(msg)\n\n        except Exception as e:\n            print(e)\n\n        finally:\n            termios.tcsetattr(sys.stdin, termios.TCSADRAIN, settings)\n\n\ndef main(args=None):\n    rclpy.init(args=args)\n\n    node = KeyboardPublisher()\n\n    rclpy.spin(node)\n\n    # Destroy the node explicitly\n    # (optional - otherwise it will be done automatically\n    # when the garbage collector destroys the node object)\n    node.destroy_node()\n    rclpy.shutdown()\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "smacc2_client_library/cl_keyboard/src/cl_keyboard/cl_keyboard.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_keyboard/cl_keyboard.hpp>\n\nnamespace cl_keyboard\n{\n// Declare the Client's default constructor.\nClKeyboard::ClKeyboard() {}\n// Declare the Client's default destructor.\nClKeyboard::~ClKeyboard() {}\n}  // namespace cl_keyboard\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/CHANGELOG.rst",
    "content": "Changelog for package lifecyclenode_client\n===========================================\n\nVersion 2.3.16 (2023-07-16)\n----------------------------\n### Added\n- Merged branch 'humble' from https://github.com/robosoft-ai/SMACC2 into humble\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for ros buildfarm issue\n  - Additional details on buildfarm problem\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n- Contributors: brettpac, pabloinigoblasco\n\nVersion 2.3.6 (2023-03-12)\n---------------------------\n### Added\n- Minor updates\n- Contributors: pabloinigoblasco\n\n### Fixed\n- Version issue\n- Contributors: pabloinigoblasco\n\nVersion 2.3.3 (2023-03-02 22:58)\n----------------------------------\n### Changed\n- Updated version to humble\n- Contributors: pabloinigoblasco\n\nVersion 2.3.2 (2023-03-02 22:22)\n----------------------------------\n### Changed\n- Updated version\n- Ported lifecycle from galactic (`#398 <https://github.com/robosoft-ai/SMACC2/issues/398>`_)\n  - Lifecycle ported from galactic\n  - Updated c_cpp_properties.json\n- Contributors: Pablo Iñigo Blasco, pabloinigoblasco\n\nVersion 2.3.1 (2022-11-28)\n---------------------------\n### Added\n- Initial release\n\nVersion 1.22.1 (2022-11-09 20:22)\n----------------------------------\n### Added\n- Placeholder for future changes\n\nVersion 1.22.0 (2022-11-09 19:53)\n----------------------------------\n### Added\n- Placeholder for future changes\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(cl_lifecycle_node)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(rclcpp REQUIRED)\nfind_package(rclcpp_lifecycle REQUIRED)\nfind_package(smacc2 REQUIRED)\n\nset(dependencies\n  rclcpp\n  rclcpp_lifecycle\n  smacc2\n)\n\ninclude_directories(include)\n\nadd_library(${PROJECT_NAME} SHARED\n  src/${PROJECT_NAME}/cl_lifecycle_node.cpp\n  src/${PROJECT_NAME}/components/cp_lifecycle_event_monitor.cpp\n  src/${PROJECT_NAME}/components/cp_lifecycle_state_tracker.cpp\n)\n\nament_target_dependencies(${PROJECT_NAME}\n                          ${dependencies})\n\ntarget_link_libraries(${PROJECT_NAME})\n\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\nament_export_dependencies(${dependencies})\n\ninstall(TARGETS ${PROJECT_NAME}\n  ARCHIVE DESTINATION lib\n  LIBRARY DESTINATION lib\n  RUNTIME DESTINATION bin\n)\n\ninstall(DIRECTORY include/\n  DESTINATION include/\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/cl_lifecycle_node.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_lifecycle_node/components/cp_lifecycle_event_monitor.hpp>\n#include <lifecycle_msgs/msg/transition_event.hpp>\n#include <lifecycle_msgs/srv/change_state.hpp>\n#include <lifecycle_msgs/srv/get_state.hpp>\n#include <smacc2/client_core_components/cp_service_client.hpp>\n#include <smacc2/smacc.hpp>\n#include <smacc2/smacc_client_behavior_base.hpp>\n\nnamespace cl_lifecycle_node\n{\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvLifecycleNodeChangeState\n: sc::event<EvLifecycleNodeChangeState<TSourceObject, TOrthogonal>>\n{\n  uint8_t transition;\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionCreate : public sc::event<EvTransitionCreate<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionConfigure : public sc::event<EvTransitionConfigure<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionCleanup : sc::event<EvTransitionCleanup<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionActivate : sc::event<EvTransitionActivate<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionDeactivate : sc::event<EvTransitionDeactivate<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionUnconfiguredShutdown\n: sc::event<EvTransitionUnconfiguredShutdown<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionInactiveShutdown\n: sc::event<EvTransitionInactiveShutdown<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionActiveShutdown\n: sc::event<EvTransitionActiveShutdown<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionDestroy : sc::event<EvTransitionDestroy<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnConfigureSuccess\n: sc::event<EvTransitionOnConfigureSuccess<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnConfigureFailure\n: sc::event<EvTransitionOnConfigureFailure<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnConfigureError\n: sc::event<EvTransitionOnConfigureError<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnActivateSuccess\n: sc::event<EvTransitionOnActivateSuccess<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnActivateFailure\n: sc::event<EvTransitionOnActivateFailure<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnActivateError\n: sc::event<EvTransitionOnActivateError<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnDeactivateSuccess\n: sc::event<EvTransitionOnDeactivateSuccess<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnDeactivateFailure\n: sc::event<EvTransitionOnDeactivateFailure<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnDeactivateError\n: sc::event<EvTransitionOnDeactivateError<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnCleanupSuccess\n: sc::event<EvTransitionOnCleanupSuccess<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnCleanupFailure\n: sc::event<EvTransitionOnCleanupFailure<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnCleanupError\n: sc::event<EvTransitionOnCleanupError<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnShutdownSuccess\n: sc::event<EvTransitionOnShutdownSuccess<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnShutdownFailure\n: sc::event<EvTransitionOnShutdownFailure<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnShutdownError\n: sc::event<EvTransitionOnShutdownError<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnErrorSuccess\n: sc::event<EvTransitionOnErrorSuccess<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnErrorFailure\n: sc::event<EvTransitionOnErrorFailure<TSourceObject, TOrthogonal>>\n{\n};\n\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnErrorError : sc::event<EvTransitionOnErrorError<TSourceObject, TOrthogonal>>\n{\n};\n\nclass ClLifecycleNode : public smacc2::ISmaccClient\n{\npublic:\n  ClLifecycleNode(std::string nodeName);\n\n  virtual ~ClLifecycleNode();\n\n  void onInitialize() override;\n\n  // @brief execute this method to trigger a transition to some state\n  void changeState(uint8_t state);\n\n  // @brief execute this method to trigger the configure transition\n  void configure();\n\n  // @brief execute this method to trigger the activate transition\n  void activate();\n\n  // @brief execute this method to trigger the deactivate transition\n  void deactivate();\n\n  // @brief execute this method to trigger the cleanup transition\n  void cleanup();\n\n  // @brief execute this method to trigger the shutdown transition\n  void shutdown();\n\n  // @brief execute this method to trigger the destroy transition\n  void destroy();\n\n  /**\n   * @brief Configure component for event posting during orthogonal allocation\n   */\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    // Create and register component with orthogonal\n    if (!eventMonitor_)\n    {\n      eventMonitor_ =\n        this->template createComponent<CpLifecycleEventMonitor, TOrthogonal, ClLifecycleNode>(\n          nodeName_);\n    }\n\n    // Configure component for this orthogonal\n    eventMonitor_->template onStateOrthogonalAllocation<TOrthogonal, ClLifecycleNode>();\n  }\n\nprivate:\n  // Phase 2: Service clients (will be migrated to CpServiceClient components in future enhancement)\n  rclcpp::Client<lifecycle_msgs::srv::GetState>::SharedPtr client_get_state_;\n  rclcpp::Client<lifecycle_msgs::srv::ChangeState>::SharedPtr client_change_state_;\n\n  std::string nodeName_;\n\n  // Phase 3: Event monitor component\n  CpLifecycleEventMonitor * eventMonitor_;\n  const std::string node_get_state_topic = \"/get_state\";\n  const std::string node_change_state_topic = \"/change_state\";\n\n  lifecycle_msgs::msg::TransitionEvent::SharedPtr lastTransitionEvent_;\n};\n\n}  // namespace cl_lifecycle_node\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_activate.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_lifecycle_node/cl_lifecycle_node.hpp>\n#include <cl_lifecycle_node/components/cp_lifecycle_event_monitor.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_lifecycle_node\n{\nclass CbActivate : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbActivate() {}\n  virtual ~CbActivate() {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    this->requiresClient(lifecycleNodeClient_);\n    this->requiresComponent(eventMonitor_);\n\n    eventMonitor_->onTransitionOnActivateSuccess_.connect([this]() { this->postSuccessEvent(); });\n    eventMonitor_->onTransitionOnActivateFailure_.connect([this]() { this->postFailureEvent(); });\n    eventMonitor_->onTransitionOnActivateError_.connect([this]() { this->postFailureEvent(); });\n  }\n\n  virtual void onEntry() override { lifecycleNodeClient_->activate(); }\n\nprivate:\n  ClLifecycleNode * lifecycleNodeClient_;\n  CpLifecycleEventMonitor * eventMonitor_;\n};\n}  // namespace cl_lifecycle_node\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_cleanup.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_lifecycle_node/cl_lifecycle_node.hpp>\n#include <cl_lifecycle_node/components/cp_lifecycle_event_monitor.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_lifecycle_node\n{\nclass CbCleanup : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbCleanup() {}\n  virtual ~CbCleanup() {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    this->requiresClient(this->lifecycleNodeClient_);\n    this->requiresComponent(eventMonitor_);\n\n    eventMonitor_->onTransitionOnCleanupSuccess_.connect([this]() { this->postSuccessEvent(); });\n    eventMonitor_->onTransitionOnCleanupFailure_.connect([this]() { this->postFailureEvent(); });\n    eventMonitor_->onTransitionOnCleanupError_.connect([this]() { this->postFailureEvent(); });\n  }\n\n  virtual void onEntry() override { lifecycleNodeClient_->cleanup(); }\n\nprivate:\n  ClLifecycleNode * lifecycleNodeClient_;\n  CpLifecycleEventMonitor * eventMonitor_;\n};\n}  // namespace cl_lifecycle_node\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_configure.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_lifecycle_node/cl_lifecycle_node.hpp>\n#include <cl_lifecycle_node/components/cp_lifecycle_event_monitor.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_lifecycle_node\n{\nclass CbConfigure : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbConfigure() {}\n  virtual ~CbConfigure() {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    this->requiresClient(lifecycleNodeClient_);\n    this->requiresComponent(eventMonitor_);\n\n    eventMonitor_->onTransitionOnConfigureSuccess_.connect(\n      [this]()\n      {\n        RCLCPP_INFO(getLogger(), \"CbConfigure: onTransitionOnConfigureSuccess_\");\n        this->postSuccessEvent();\n      });\n    eventMonitor_->onTransitionOnConfigureFailure_.connect([this]() { this->postFailureEvent(); });\n    eventMonitor_->onTransitionOnConfigureError_.connect([this]() { this->postFailureEvent(); });\n  }\n\n  virtual void onEntry() override { lifecycleNodeClient_->configure(); }\n\nprivate:\n  ClLifecycleNode * lifecycleNodeClient_;\n  CpLifecycleEventMonitor * eventMonitor_;\n};\n}  // namespace cl_lifecycle_node\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_deactivate.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_lifecycle_node/cl_lifecycle_node.hpp>\n#include <cl_lifecycle_node/components/cp_lifecycle_event_monitor.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_lifecycle_node\n{\nclass CbDeactivate : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbDeactivate() {}\n  virtual ~CbDeactivate() {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    this->requiresClient(this->lifecycleNodeClient_);\n    this->requiresComponent(eventMonitor_);\n\n    eventMonitor_->onTransitionOnDeactivateSuccess_.connect([this]() { this->postSuccessEvent(); });\n    eventMonitor_->onTransitionOnDeactivateFailure_.connect([this]() { this->postFailureEvent(); });\n    eventMonitor_->onTransitionOnDeactivateError_.connect([this]() { this->postFailureEvent(); });\n  }\n\n  virtual void onEntry() override { lifecycleNodeClient_->deactivate(); }\n\nprivate:\n  ClLifecycleNode * lifecycleNodeClient_;\n  CpLifecycleEventMonitor * eventMonitor_;\n};\n}  // namespace cl_lifecycle_node\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_deactivate_on_exit.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_lifecycle_node/cl_lifecycle_node.hpp>\n#include <cl_lifecycle_node/components/cp_lifecycle_event_monitor.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_lifecycle_node\n{\nclass CbDeactivateOnExit : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbDeactivateOnExit() {}\n  virtual ~CbDeactivateOnExit() {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    this->requiresClient(lifecycleNodeClient_);\n    this->requiresComponent(eventMonitor_);\n\n    eventMonitor_->onTransitionOnDeactivateSuccess_.connect([this]() { this->postSuccessEvent(); });\n    eventMonitor_->onTransitionOnDeactivateFailure_.connect([this]() { this->postFailureEvent(); });\n    eventMonitor_->onTransitionOnDeactivateError_.connect([this]() { this->postFailureEvent(); });\n  }\n\n  virtual void onExit() override { lifecycleNodeClient_->deactivate(); }\n\nprivate:\n  ClLifecycleNode * lifecycleNodeClient_;\n  CpLifecycleEventMonitor * eventMonitor_;\n};\n}  // namespace cl_lifecycle_node\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_destroy.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_lifecycle_node/cl_lifecycle_node.hpp>\n#include <cl_lifecycle_node/components/cp_lifecycle_event_monitor.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_lifecycle_node\n{\nclass CbDestroy : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbDestroy() {}\n  virtual ~CbDestroy() {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    this->requiresClient(this->lifecycleNodeClient_);\n    this->requiresComponent(eventMonitor_);\n\n    eventMonitor_->onTransitionOnDestroySuccess_.connect([this]() { this->postSuccessEvent(); });\n    eventMonitor_->onTransitionOnDestroyFailure_.connect([this]() { this->postFailureEvent(); });\n    eventMonitor_->onTransitionOnDestroyError_.connect([this]() { this->postFailureEvent(); });\n  }\n\n  virtual void onEntry() override { lifecycleNodeClient_->destroy(); }\n\nprivate:\n  ClLifecycleNode * lifecycleNodeClient_;\n  CpLifecycleEventMonitor * eventMonitor_;\n};\n}  // namespace cl_lifecycle_node\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors/cb_shutdown.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_lifecycle_node/cl_lifecycle_node.hpp>\n#include <cl_lifecycle_node/components/cp_lifecycle_event_monitor.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_lifecycle_node\n{\nclass CbShutdown : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbShutdown() {}\n  virtual ~CbShutdown() {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    this->requiresClient(this->lifecycleNodeClient_);\n    this->requiresComponent(eventMonitor_);\n\n    eventMonitor_->onTransitionOnShutdownSuccess_.connect([this]() { this->postSuccessEvent(); });\n    eventMonitor_->onTransitionOnShutdownFailure_.connect([this]() { this->postFailureEvent(); });\n    eventMonitor_->onTransitionOnShutdownError_.connect([this]() { this->postFailureEvent(); });\n  }\n\n  virtual void onEntry() override { lifecycleNodeClient_->shutdown(); }\n\nprivate:\n  ClLifecycleNode * lifecycleNodeClient_;\n  CpLifecycleEventMonitor * eventMonitor_;\n};\n}  // namespace cl_lifecycle_node\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/client_behaviors.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n#include <cl_lifecycle_node/client_behaviors/cb_activate.hpp>\n#include <cl_lifecycle_node/client_behaviors/cb_cleanup.hpp>\n#include <cl_lifecycle_node/client_behaviors/cb_configure.hpp>\n#include <cl_lifecycle_node/client_behaviors/cb_deactivate.hpp>\n#include <cl_lifecycle_node/client_behaviors/cb_deactivate_on_exit.hpp>\n#include <cl_lifecycle_node/client_behaviors/cb_shutdown.hpp>\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/components/cp_lifecycle_event_monitor.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/component.hpp>\n#include <smacc2/smacc_signal.hpp>\n\n#include <lifecycle_msgs/msg/transition_event.hpp>\n#include <rclcpp/rclcpp.hpp>\n\n#include <functional>\n#include <mutex>\n#include <optional>\n#include <string>\n\n// Forward declarations\nnamespace cl_lifecycle_node\n{\nclass CpLifecycleEventMonitor;\n\n// Event declarations - component is now the source\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionConfigure;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionActivate;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionDeactivate;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionCleanup;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionUnconfiguredShutdown;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionInactiveShutdown;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionActiveShutdown;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionDestroy;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnConfigureSuccess;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnConfigureFailure;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnConfigureError;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnActivateSuccess;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnActivateFailure;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnActivateError;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnDeactivateSuccess;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnDeactivateFailure;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnDeactivateError;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnCleanupSuccess;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnCleanupFailure;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnCleanupError;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnShutdownSuccess;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnShutdownFailure;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnShutdownError;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnErrorSuccess;\ntemplate <typename TSourceObject, typename TOrthogonal>\nstruct EvTransitionOnErrorFailure;\n}  // namespace cl_lifecycle_node\n\nnamespace cl_lifecycle_node\n{\n/**\n * @brief Component that monitors ROS2 lifecycle node transition events\n *\n * CpLifecycleEventMonitor subscribes to lifecycle transition events and parses\n * them to detect specific transition types. It emits SMACC2 signals for each\n * transition, enabling event-driven responses to lifecycle state changes.\n *\n * This component handles the complex state-pair matching logic required to\n * distinguish between transition starts, successes, failures, and errors.\n */\nclass CpLifecycleEventMonitor : public smacc2::ISmaccComponent\n{\npublic:\n  /**\n   * @brief Constructor with node name\n   * @param nodeName Name of the lifecycle node to monitor\n   */\n  CpLifecycleEventMonitor(std::string nodeName);\n\n  virtual ~CpLifecycleEventMonitor() = default;\n\n  /**\n   * @brief Set the owner client and state machine for this component\n   * @param owner Pointer to the owning client\n   * @param stateMachine Pointer to the state machine\n   */\n  void setOwner(smacc2::ISmaccClient * owner, smacc2::ISmaccStateMachine * stateMachine)\n  {\n    owner_ = owner;\n    stateMachine_ = stateMachine;\n  }\n\n  // SMACC2 Signals for lifecycle transition events\n  // Transition initiation signals\n  smacc2::SmaccSignal<void()> onTransitionCreate_;\n  smacc2::SmaccSignal<void()> onTransitionConfigure_;\n  smacc2::SmaccSignal<void()> onTransitionActivate_;\n  smacc2::SmaccSignal<void()> onTransitionDeactivate_;\n  smacc2::SmaccSignal<void()> onTransitionCleanup_;\n  smacc2::SmaccSignal<void()> onTransitionUnconfiguredShutdown_;\n  smacc2::SmaccSignal<void()> onTransitionInactiveShutdown_;\n  smacc2::SmaccSignal<void()> onTransitionActiveShutdown_;\n  smacc2::SmaccSignal<void()> onTransitionDestroy_;\n\n  // Configure transition result signals\n  smacc2::SmaccSignal<void()> onTransitionOnConfigureSuccess_;\n  smacc2::SmaccSignal<void()> onTransitionOnConfigureFailure_;\n  smacc2::SmaccSignal<void()> onTransitionOnConfigureError_;\n\n  // Activate transition result signals\n  smacc2::SmaccSignal<void()> onTransitionOnActivateSuccess_;\n  smacc2::SmaccSignal<void()> onTransitionOnActivateFailure_;\n  smacc2::SmaccSignal<void()> onTransitionOnActivateError_;\n\n  // Deactivate transition result signals\n  smacc2::SmaccSignal<void()> onTransitionOnDeactivateSuccess_;\n  smacc2::SmaccSignal<void()> onTransitionOnDeactivateFailure_;\n  smacc2::SmaccSignal<void()> onTransitionOnDeactivateError_;\n\n  // Cleanup transition result signals\n  smacc2::SmaccSignal<void()> onTransitionOnCleanupSuccess_;\n  smacc2::SmaccSignal<void()> onTransitionOnCleanupFailure_;\n  smacc2::SmaccSignal<void()> onTransitionOnCleanupError_;\n\n  // Shutdown transition result signals\n  smacc2::SmaccSignal<void()> onTransitionOnShutdownSuccess_;\n  smacc2::SmaccSignal<void()> onTransitionOnShutdownFailure_;\n  smacc2::SmaccSignal<void()> onTransitionOnShutdownError_;\n\n  // Active shutdown specific signals\n  smacc2::SmaccSignal<void()> onTransitionOnActiveShutdownSuccess_;\n  smacc2::SmaccSignal<void()> onTransitionOnActiveShutdownFailure_;\n  smacc2::SmaccSignal<void()> onTransitionOnActiveShutdownError_;\n\n  // Error processing result signals\n  smacc2::SmaccSignal<void()> onTransitionOnErrorSuccess_;\n  smacc2::SmaccSignal<void()> onTransitionOnErrorFailure_;\n  smacc2::SmaccSignal<void()> onTransitionOnErrorError_;\n\n  /**\n   * @brief Get the last received transition event\n   * @return Optional transition event (empty if none received)\n   */\n  std::optional<lifecycle_msgs::msg::TransitionEvent> getLastTransitionEvent() const;\n\n  /**\n   * @brief Component initialization - creates subscription\n   */\n  void onInitialize() override;\n\n  /**\n   * @brief Configure event posting with orthogonal template parameter\n   * This is called from the client's onStateOrthogonalAllocation to set up type-safe event posting\n   */\n  template <typename TOrthogonal, typename TClient>\n  void onStateOrthogonalAllocation()\n  {\n    // Set up event posting lambdas with correct template parameters\n    // Component is the event source (TSourceObject = CpLifecycleEventMonitor)\n\n    postEventConfigure_ = [this]()\n    { this->postEvent<EvTransitionConfigure<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventActivate_ = [this]()\n    { this->postEvent<EvTransitionActivate<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventDeactivate_ = [this]()\n    { this->postEvent<EvTransitionDeactivate<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventCleanup_ = [this]()\n    { this->postEvent<EvTransitionCleanup<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventUnconfiguredShutdown_ = [this]()\n    { this->postEvent<EvTransitionUnconfiguredShutdown<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventInactiveShutdown_ = [this]()\n    { this->postEvent<EvTransitionInactiveShutdown<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventActiveShutdown_ = [this]()\n    { this->postEvent<EvTransitionActiveShutdown<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventDestroy_ = [this]()\n    { this->postEvent<EvTransitionDestroy<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnConfigureSuccess_ = [this]()\n    { this->postEvent<EvTransitionOnConfigureSuccess<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnConfigureFailure_ = [this]()\n    { this->postEvent<EvTransitionOnConfigureFailure<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnConfigureError_ = [this]()\n    { this->postEvent<EvTransitionOnConfigureError<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnActivateSuccess_ = [this]()\n    { this->postEvent<EvTransitionOnActivateSuccess<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnActivateFailure_ = [this]()\n    { this->postEvent<EvTransitionOnActivateFailure<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnActivateError_ = [this]()\n    { this->postEvent<EvTransitionOnActivateError<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnDeactivateSuccess_ = [this]()\n    { this->postEvent<EvTransitionOnDeactivateSuccess<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnDeactivateFailure_ = [this]()\n    { this->postEvent<EvTransitionOnDeactivateFailure<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnDeactivateError_ = [this]()\n    { this->postEvent<EvTransitionOnDeactivateError<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnCleanupSuccess_ = [this]()\n    { this->postEvent<EvTransitionOnCleanupSuccess<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnCleanupFailure_ = [this]()\n    { this->postEvent<EvTransitionOnCleanupFailure<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnCleanupError_ = [this]()\n    { this->postEvent<EvTransitionOnCleanupError<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnShutdownSuccess_ = [this]()\n    { this->postEvent<EvTransitionOnShutdownSuccess<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnShutdownFailure_ = [this]()\n    { this->postEvent<EvTransitionOnShutdownFailure<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnShutdownError_ = [this]()\n    { this->postEvent<EvTransitionOnShutdownError<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnErrorSuccess_ = [this]()\n    { this->postEvent<EvTransitionOnErrorSuccess<CpLifecycleEventMonitor, TOrthogonal>>(); };\n\n    postEventOnErrorFailure_ = [this]()\n    { this->postEvent<EvTransitionOnErrorFailure<CpLifecycleEventMonitor, TOrthogonal>>(); };\n  }\n\nprivate:\n  std::string nodeName_;\n  rclcpp::Subscription<lifecycle_msgs::msg::TransitionEvent>::SharedPtr subscription_;\n  lifecycle_msgs::msg::TransitionEvent::SharedPtr lastTransitionEvent_;\n  mutable std::mutex eventMutex_;\n\n  /**\n   * @brief Callback for transition event subscription\n   * @param msg Transition event message\n   */\n  void onTransitionEvent(const lifecycle_msgs::msg::TransitionEvent::SharedPtr msg);\n\n  // Event posting lambdas - configured via onStateOrthogonalAllocation<TOrthogonal, TClient>()\n  std::function<void()> postEventConfigure_;\n  std::function<void()> postEventActivate_;\n  std::function<void()> postEventDeactivate_;\n  std::function<void()> postEventCleanup_;\n  std::function<void()> postEventUnconfiguredShutdown_;\n  std::function<void()> postEventInactiveShutdown_;\n  std::function<void()> postEventActiveShutdown_;\n  std::function<void()> postEventDestroy_;\n\n  std::function<void()> postEventOnConfigureSuccess_;\n  std::function<void()> postEventOnConfigureFailure_;\n  std::function<void()> postEventOnConfigureError_;\n\n  std::function<void()> postEventOnActivateSuccess_;\n  std::function<void()> postEventOnActivateFailure_;\n  std::function<void()> postEventOnActivateError_;\n\n  std::function<void()> postEventOnDeactivateSuccess_;\n  std::function<void()> postEventOnDeactivateFailure_;\n  std::function<void()> postEventOnDeactivateError_;\n\n  std::function<void()> postEventOnCleanupSuccess_;\n  std::function<void()> postEventOnCleanupFailure_;\n  std::function<void()> postEventOnCleanupError_;\n\n  std::function<void()> postEventOnShutdownSuccess_;\n  std::function<void()> postEventOnShutdownFailure_;\n  std::function<void()> postEventOnShutdownError_;\n\n  std::function<void()> postEventOnErrorSuccess_;\n  std::function<void()> postEventOnErrorFailure_;\n};\n\n}  // namespace cl_lifecycle_node\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/components/cp_lifecycle_state_tracker.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/component.hpp>\n\n#include <lifecycle_msgs/msg/state.hpp>\n\n#include <mutex>\n#include <optional>\n#include <string>\n\nnamespace cl_lifecycle_node\n{\n/**\n * @brief Component that tracks the current lifecycle state\n *\n * CpLifecycleStateTracker maintains knowledge of the current lifecycle node\n * state, providing thread-safe query methods for state information.\n */\nclass CpLifecycleStateTracker : public smacc2::ISmaccComponent\n{\npublic:\n  CpLifecycleStateTracker() = default;\n  virtual ~CpLifecycleStateTracker() = default;\n\n  /**\n   * @brief Update the current state\n   * @param state New lifecycle state\n   */\n  void updateState(const lifecycle_msgs::msg::State & state);\n\n  /**\n   * @brief Get the current lifecycle state\n   * @return Optional state (empty if not yet initialized)\n   */\n  std::optional<lifecycle_msgs::msg::State> getCurrentState() const;\n\n  /**\n   * @brief Get the current state label as string\n   * @return Optional state label (empty if not yet initialized)\n   */\n  std::optional<std::string> getCurrentStateLabel() const;\n\n  /**\n   * @brief Get the current state ID\n   * @return State ID (0 if not yet initialized)\n   */\n  uint8_t getCurrentStateId() const;\n\n  /**\n   * @brief Component initialization\n   */\n  void onInitialize() override;\n\nprivate:\n  std::optional<lifecycle_msgs::msg::State> currentState_;\n  mutable std::mutex stateMutex_;\n};\n\n}  // namespace cl_lifecycle_node\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/include/cl_lifecycle_node/components.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n// Core SMACC2 service client component\n#include <smacc2/client_core_components/cp_service_client.hpp>\n\n// Lifecycle-specific components\n#include <cl_lifecycle_node/components/cp_lifecycle_event_monitor.hpp>\n#include <cl_lifecycle_node/components/cp_lifecycle_state_tracker.hpp>\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>cl_lifecycle_node</name>\n  <version>3.0.1</version>\n  <description>The cl_lifecycle_node package implements SMACC Action Client Plugin for the ROS Navigation State - move_base node.  Developed by Reel Robotics.</description>\n\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n  <depend>rclcpp</depend>\n  <depend>rclcpp_lifecycle</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/src/cl_lifecycle_node/cl_lifecycle_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <cl_lifecycle_node/cl_lifecycle_node.hpp>\n#include <cl_lifecycle_node/components/cp_lifecycle_event_monitor.hpp>\n#include <string>\n\nnamespace cl_lifecycle_node\n{\nClLifecycleNode::ClLifecycleNode(std::string node_name)\n: nodeName_(node_name), eventMonitor_(nullptr)\n{\n}\n\nClLifecycleNode::~ClLifecycleNode() {}\n\nvoid ClLifecycleNode::onInitialize()\n{\n  // Create service clients\n  client_get_state_ = this->getNode()->create_client<lifecycle_msgs::srv::GetState>(\n    this->nodeName_ + node_get_state_topic);\n  client_change_state_ = this->getNode()->create_client<lifecycle_msgs::srv::ChangeState>(\n    this->nodeName_ + node_change_state_topic);\n}\n\nvoid ClLifecycleNode::changeState(uint8_t state)\n{\n  auto request = std::make_shared<lifecycle_msgs::srv::ChangeState::Request>();\n  request->transition.id = state;\n  auto future = client_change_state_->async_send_request(request);\n  future.wait();\n}\n\nvoid ClLifecycleNode::activate()\n{\n  changeState(lifecycle_msgs::msg::Transition::TRANSITION_ACTIVATE);\n}\n\nvoid ClLifecycleNode::deactivate()\n{\n  changeState(lifecycle_msgs::msg::Transition::TRANSITION_DEACTIVATE);\n}\n\nvoid ClLifecycleNode::configure()\n{\n  changeState(lifecycle_msgs::msg::Transition::TRANSITION_CONFIGURE);\n}\n\nvoid ClLifecycleNode::cleanup()\n{\n  changeState(lifecycle_msgs::msg::Transition::TRANSITION_CLEANUP);\n}\n\nvoid ClLifecycleNode::shutdown()\n{\n  changeState(lifecycle_msgs::msg::Transition::TRANSITION_UNCONFIGURED_SHUTDOWN);\n}\n\n}  // namespace cl_lifecycle_node\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/src/cl_lifecycle_node/components/cp_lifecycle_event_monitor.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_lifecycle_node/components/cp_lifecycle_event_monitor.hpp>\n\nnamespace cl_lifecycle_node\n{\nCpLifecycleEventMonitor::CpLifecycleEventMonitor(std::string nodeName) : nodeName_(nodeName) {}\n\nvoid CpLifecycleEventMonitor::onInitialize()\n{\n  // Phase 3: Create subscription to lifecycle transition events\n  const std::string node_transition_event_topic = \"/transition_event\";\n\n  subscription_ = getNode()->create_subscription<lifecycle_msgs::msg::TransitionEvent>(\n    nodeName_ + node_transition_event_topic, 100,\n    std::bind(&CpLifecycleEventMonitor::onTransitionEvent, this, std::placeholders::_1));\n\n  RCLCPP_INFO(\n    getLogger(), \"[CpLifecycleEventMonitor] Subscribed to: %s\",\n    (nodeName_ + node_transition_event_topic).c_str());\n}\n\nstd::optional<lifecycle_msgs::msg::TransitionEvent>\nCpLifecycleEventMonitor::getLastTransitionEvent() const\n{\n  std::lock_guard<std::mutex> lock(eventMutex_);\n  if (lastTransitionEvent_)\n  {\n    return *lastTransitionEvent_;\n  }\n  return std::nullopt;\n}\n\nvoid CpLifecycleEventMonitor::onTransitionEvent(\n  const lifecycle_msgs::msg::TransitionEvent::SharedPtr msg)\n{\n  RCLCPP_INFO(\n    getLogger(), \"[CpLifecycleEventMonitor] Transition event: %d -> %d\", msg->start_state.id,\n    msg->goal_state.id);\n\n  // Store the event\n  {\n    std::lock_guard<std::mutex> lock(eventMutex_);\n    lastTransitionEvent_ = msg;\n  }\n\n  // Phase 3: Full state-pair matching logic (moved from ClLifecycleNode)\n  // Parse transition events and emit corresponding signals\n\n  // TRANSITION_CONFIGURE\n  if (\n    msg->start_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_CONFIGURING)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_CONFIGURE\");\n    onTransitionConfigure_();\n    if (postEventConfigure_) postEventConfigure_();\n  }\n  // TRANSITION_CLEANUP\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_CLEANINGUP)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_CLEANUP\");\n    onTransitionCleanup_();\n    if (postEventCleanup_) postEventCleanup_();\n  }\n  // TRANSITION_ACTIVATE\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_ACTIVATING)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ACTIVATE\");\n    onTransitionActivate_();\n    if (postEventActivate_) postEventActivate_();\n  }\n  // TRANSITION_DEACTIVATE\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_DEACTIVATING)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_DEACTIVATE\");\n    onTransitionDeactivate_();\n    if (postEventDeactivate_) postEventDeactivate_();\n  }\n  // TRANSITION_UNCONFIGURED_SHUTDOWN\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_SHUTTINGDOWN)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_UNCONFIGURED_SHUTDOWN\");\n    onTransitionUnconfiguredShutdown_();\n    if (postEventUnconfiguredShutdown_) postEventUnconfiguredShutdown_();\n  }\n  // TRANSITION_INACTIVE_SHUTDOWN\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_SHUTTINGDOWN)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_INACTIVE_SHUTDOWN\");\n    onTransitionInactiveShutdown_();\n    if (postEventInactiveShutdown_) postEventInactiveShutdown_();\n  }\n  // TRANSITION_ACTIVE_SHUTDOWN\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_SHUTTINGDOWN)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ACTIVE_SHUTDOWN\");\n    onTransitionActiveShutdown_();\n    if (postEventActiveShutdown_) postEventActiveShutdown_();\n  }\n  // TRANSITION_DESTROY\n  else if (msg->start_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_FINALIZED)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_DESTROY\");\n    onTransitionDestroy_();\n    if (postEventDestroy_) postEventDestroy_();\n  }\n  // TRANSITION_ON_CONFIGURE_SUCCESS\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_CONFIGURING &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ON_CONFIGURE_SUCCESS\");\n    onTransitionOnConfigureSuccess_();\n    if (postEventOnConfigureSuccess_) postEventOnConfigureSuccess_();\n  }\n  // TRANSITION_ON_CONFIGURE_FAILURE\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_CONFIGURING &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ON_CONFIGURE_FAILURE\");\n    onTransitionOnConfigureFailure_();\n    if (postEventOnConfigureFailure_) postEventOnConfigureFailure_();\n  }\n  // TRANSITION_ON_CONFIGURE_ERROR\n  if (\n    msg->start_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_CONFIGURING &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_ERRORPROCESSING)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ON_CONFIGURE_ERROR\");\n    onTransitionOnConfigureError_();\n    if (postEventOnConfigureError_) postEventOnConfigureError_();\n  }\n  // TRANSITION_ON_CLEANUP_SUCCESS\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_CLEANINGUP &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ON_CLEANUP_SUCCESS\");\n    onTransitionOnCleanupSuccess_();\n    if (postEventOnCleanupSuccess_) postEventOnCleanupSuccess_();\n  }\n  // TRANSITION_ON_CLEANUP_ERROR\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_CLEANINGUP &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_ERRORPROCESSING)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ON_CLEANUP_ERROR\");\n    onTransitionOnCleanupError_();\n    if (postEventOnCleanupError_) postEventOnCleanupError_();\n  }\n  // TRANSITION_ON_ACTIVATE_SUCCESS\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_ACTIVATING &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ON_ACTIVATE_SUCCESS\");\n    onTransitionOnActivateSuccess_();\n    if (postEventOnActivateSuccess_) postEventOnActivateSuccess_();\n  }\n  // TRANSITION_ON_ACTIVATE_FAILURE\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_ACTIVATING &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ON_ACTIVATE_FAILURE\");\n    onTransitionOnActivateFailure_();\n    if (postEventOnActivateFailure_) postEventOnActivateFailure_();\n  }\n  // TRANSITION_ON_ACTIVATE_ERROR\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_ACTIVATING &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_ERRORPROCESSING)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ON_ACTIVATE_ERROR\");\n    onTransitionOnActivateError_();\n    if (postEventOnActivateError_) postEventOnActivateError_();\n  }\n  // TRANSITION_ON_DEACTIVATE_SUCCESS\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_DEACTIVATING &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ON_DEACTIVATE_SUCCESS\");\n    onTransitionOnDeactivateSuccess_();\n    if (postEventOnDeactivateSuccess_) postEventOnDeactivateSuccess_();\n  }\n  // TRANSITION_ON_DEACTIVATE_ERROR\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_DEACTIVATING &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_ERRORPROCESSING)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ON_DEACTIVATE_ERROR\");\n    onTransitionOnDeactivateError_();\n    if (postEventOnDeactivateError_) postEventOnDeactivateError_();\n  }\n  // TRANSITION_ON_SHUTDOWN_SUCCESS\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_SHUTTINGDOWN &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_FINALIZED)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ON_SHUTDOWN_SUCCESS\");\n    onTransitionOnShutdownSuccess_();\n    if (postEventOnShutdownSuccess_) postEventOnShutdownSuccess_();\n  }\n  // TRANSITION_ON_SHUTDOWN_ERROR\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_SHUTTINGDOWN &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_ERRORPROCESSING)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ON_SHUTDOWN_ERROR\");\n    onTransitionOnShutdownError_();\n    if (postEventOnShutdownError_) postEventOnShutdownError_();\n  }\n  // TRANSITION_ON_ERROR_SUCCESS\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_ERRORPROCESSING &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ON_ERROR_SUCCESS\");\n    onTransitionOnErrorSuccess_();\n    if (postEventOnErrorSuccess_) postEventOnErrorSuccess_();\n  }\n  // TRANSITION_ON_ERROR_FAILURE\n  else if (\n    msg->start_state.id == lifecycle_msgs::msg::State::TRANSITION_STATE_ERRORPROCESSING &&\n    msg->goal_state.id == lifecycle_msgs::msg::State::PRIMARY_STATE_FINALIZED)\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_ON_ERROR_FAILURE\");\n    onTransitionOnErrorFailure_();\n    if (postEventOnErrorFailure_) postEventOnErrorFailure_();\n  }\n  // UNKNOWN TRANSITION\n  else\n  {\n    RCLCPP_INFO(getLogger(), \"TRANSITION_UNKNOWN\");\n  }\n}\n\n}  // namespace cl_lifecycle_node\n"
  },
  {
    "path": "smacc2_client_library/cl_lifecycle_node/src/cl_lifecycle_node/components/cp_lifecycle_state_tracker.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_lifecycle_node/components/cp_lifecycle_state_tracker.hpp>\n\nnamespace cl_lifecycle_node\n{\nvoid CpLifecycleStateTracker::onInitialize()\n{\n  // Initialize with empty state\n  RCLCPP_INFO(getLogger(), \"[CpLifecycleStateTracker] Component initialized\");\n}\n\nvoid CpLifecycleStateTracker::updateState(const lifecycle_msgs::msg::State & state)\n{\n  std::lock_guard<std::mutex> lock(stateMutex_);\n  currentState_ = state;\n  RCLCPP_DEBUG(\n    getLogger(), \"[CpLifecycleStateTracker] State updated to: %s (id: %d)\", state.label.c_str(),\n    state.id);\n}\n\nstd::optional<lifecycle_msgs::msg::State> CpLifecycleStateTracker::getCurrentState() const\n{\n  std::lock_guard<std::mutex> lock(stateMutex_);\n  return currentState_;\n}\n\nstd::optional<std::string> CpLifecycleStateTracker::getCurrentStateLabel() const\n{\n  std::lock_guard<std::mutex> lock(stateMutex_);\n  if (currentState_)\n  {\n    return currentState_->label;\n  }\n  return std::nullopt;\n}\n\nuint8_t CpLifecycleStateTracker::getCurrentStateId() const\n{\n  std::lock_guard<std::mutex> lock(stateMutex_);\n  if (currentState_)\n  {\n    return currentState_->id;\n  }\n  return 0;\n}\n\n}  // namespace cl_lifecycle_node\n"
  },
  {
    "path": "smacc2_client_library/cl_mission_tracker/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(cl_mission_tracker)\n\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\n\ninclude_directories(include)\n\nament_export_include_directories(include)\nament_export_dependencies(smacc2)\n\ninstall(DIRECTORY include/ DESTINATION include)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_mission_tracker/include/cl_mission_tracker/cl_mission_tracker.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <smacc2/smacc.hpp>\n#include <smacc2/smacc_client.hpp>\n\n#include <cl_mission_tracker/components/cp_decision_manager.hpp>\n\nnamespace cl_mission_tracker\n{\n\n// Event: Battery load decision\ntemplate <typename AsyncCB, typename Orthogonal>\nstruct EvBatteryLoad : sc::event<EvBatteryLoad<AsyncCB, Orthogonal>>\n{\n};\n\n// Event: Radial motion decision\ntemplate <typename AsyncCB, typename Orthogonal>\nstruct EvRadialMotion : sc::event<EvRadialMotion<AsyncCB, Orthogonal>>\n{\n};\n\n// Event: S-pattern decision\ntemplate <typename AsyncCB, typename Orthogonal>\nstruct EvSPattern : sc::event<EvSPattern<AsyncCB, Orthogonal>>\n{\n};\n\n// Event: F-pattern decision\ntemplate <typename AsyncCB, typename Orthogonal>\nstruct EvFPattern : sc::event<EvFPattern<AsyncCB, Orthogonal>>\n{\n};\n\n/**\n * @brief Client for mission tracking and decision sequencing.\n *\n * This client follows the pure component-based architecture pattern.\n * It acts as an orchestrator that creates and wires components:\n *\n * - CpDecisionManager: Manages decision counter state\n *\n * Client behaviors should use requiresComponent() to access the\n * decision manager, not direct client fields.\n */\nclass ClMissionTracker : public smacc2::ISmaccClient\n{\npublic:\n  ClMissionTracker() {}\n\n  virtual ~ClMissionTracker() {}\n\n  template <typename TOrthogonal, typename TClient>\n  void onComponentInitialization()\n  {\n    // Create decision manager component\n    this->createComponent<CpDecisionManager, TOrthogonal, ClMissionTracker>();\n  }\n};\n\n}  // namespace cl_mission_tracker\n"
  },
  {
    "path": "smacc2_client_library/cl_mission_tracker/include/cl_mission_tracker/client_behaviors/cb_battery_decission.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_mission_tracker/cl_mission_tracker.hpp>\n#include <cl_mission_tracker/components/cp_decision_manager.hpp>\n#include <smacc2/smacc.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_mission_tracker\n{\n\n/**\n * @brief Behavior that makes mission decisions based on a counter.\n *\n * This behavior uses requiresComponent() to access:\n * - CpDecisionManager: For decision counter state\n *\n * Based on the current decision count, it posts different events\n * to control the mission flow.\n */\nclass CbBatteryDecission : public smacc2::SmaccAsyncClientBehavior\n{\nprivate:\n  // Component accessed via requiresComponent (NOT direct client!)\n  CpDecisionManager * decisionManager_ = nullptr;\n  std::function<void()> postEventFn_;\n\npublic:\n  CbBatteryDecission() {}\n\n  virtual ~CbBatteryDecission() {}\n\n  virtual void onEntry() override { this->postEventFn_(); }\n\n  virtual void onExit() override {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onOrthogonalAllocation()\n  {\n    postEventFn_ = [this]()\n    {\n      // Get component via requiresComponent pattern (NOT requiresClient!)\n      this->requiresComponent(decisionManager_, true);\n\n      // Get current decision and advance counter\n      int decisionCount = decisionManager_->nextDecision();\n\n      switch (decisionCount)\n      {\n        case 0:\n        case 2:\n        case 4:\n          this->postEvent<EvBatteryLoad<TSourceObject, TOrthogonal>>();\n          break;\n        case 1:\n          this->postEvent<EvRadialMotion<TSourceObject, TOrthogonal>>();\n          break;\n        case 3:\n          this->postEvent<EvSPattern<TSourceObject, TOrthogonal>>();\n          break;\n        case 5:\n          this->postEvent<EvFPattern<TSourceObject, TOrthogonal>>();\n          break;\n        default:\n          break;\n      }\n    };\n  }\n};\n\n}  // namespace cl_mission_tracker\n"
  },
  {
    "path": "smacc2_client_library/cl_mission_tracker/include/cl_mission_tracker/components/cp_decision_manager.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <smacc2/component.hpp>\n\n#include <mutex>\n\nnamespace cl_mission_tracker\n{\n\n/**\n * @brief Component that manages mission decision state.\n *\n * This component tracks the decision counter for mission sequencing.\n * It provides thread-safe access to decision state, separating\n * mission logic from the client orchestrator.\n */\nclass CpDecisionManager : public smacc2::ISmaccComponent\n{\npublic:\n  CpDecisionManager() = default;\n\n  virtual ~CpDecisionManager() = default;\n\n  void onInitialize() override { RCLCPP_INFO(getLogger(), \"[CpDecisionManager] Initialized\"); }\n\n  /**\n   * @brief Get the current decision counter value.\n   * @return Current decision count\n   */\n  int getDecisionCounter() const\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    return decisionCounter_;\n  }\n\n  /**\n   * @brief Increment the decision counter and return the previous value.\n   * @return Decision count before incrementing\n   */\n  int nextDecision()\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    int current = decisionCounter_;\n    decisionCounter_++;\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[CpDecisionManager] Decision \" << current << \" -> \" << decisionCounter_);\n    return current;\n  }\n\n  /**\n   * @brief Reset the decision counter to zero.\n   */\n  void resetDecisionCounter()\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    decisionCounter_ = 0;\n    RCLCPP_INFO(getLogger(), \"[CpDecisionManager] Decision counter reset\");\n  }\n\n  /**\n   * @brief Set the decision counter to a specific value.\n   * @param value New counter value\n   */\n  void setDecisionCounter(int value)\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    decisionCounter_ = value;\n    RCLCPP_INFO_STREAM(getLogger(), \"[CpDecisionManager] Decision counter set to \" << value);\n  }\n\nprivate:\n  mutable std::mutex mutex_;\n  int decisionCounter_ = 0;\n};\n\n}  // namespace cl_mission_tracker\n"
  },
  {
    "path": "smacc2_client_library/cl_mission_tracker/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>cl_mission_tracker</name>\n  <version>3.0.1</version>\n  <description>SMACC2 client for mission state and decision tracking</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_modbus_tcp_relay/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(cl_modbus_tcp_relay)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(rclcpp REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(PkgConfig REQUIRED)\n\n# Find libmodbus - prefer system-installed, fallback to workspace source\npkg_check_modules(MODBUS libmodbus)\n\nif(NOT MODBUS_FOUND)\n  # Check if libmodbus source exists in workspace\n  set(LIBMODBUS_WORKSPACE_PATH \"${CMAKE_CURRENT_SOURCE_DIR}/../../../libmodbus/src\")\n  if(EXISTS \"${LIBMODBUS_WORKSPACE_PATH}/modbus.h\")\n    message(STATUS \"Using workspace libmodbus source at: ${LIBMODBUS_WORKSPACE_PATH}\")\n    set(MODBUS_INCLUDE_DIRS ${LIBMODBUS_WORKSPACE_PATH})\n    # Note: When using workspace source, libmodbus must be built separately\n    # For full functionality, install libmodbus-dev: sudo apt install libmodbus-dev\n    set(MODBUS_LIBRARIES \"modbus\")\n    set(MODBUS_FOUND TRUE)\n  else()\n    message(FATAL_ERROR \"libmodbus not found. Install with: sudo apt install libmodbus-dev\")\n  endif()\nendif()\n\nset(dependencies\n  rclcpp\n  smacc2\n)\n\ninclude_directories(\n  include\n  ${MODBUS_INCLUDE_DIRS}\n)\n\nadd_library(${PROJECT_NAME} SHARED\n  src/${PROJECT_NAME}/cl_modbus_tcp_relay.cpp\n  src/${PROJECT_NAME}/components/cp_modbus_connection.cpp\n  src/${PROJECT_NAME}/components/cp_modbus_relay.cpp\n)\n\ntarget_link_libraries(${PROJECT_NAME}\n  ${MODBUS_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}\n  ${dependencies}\n)\n\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\nament_export_dependencies(${dependencies})\n\ninstall(TARGETS ${PROJECT_NAME}\n  ARCHIVE DESTINATION lib\n  LIBRARY DESTINATION lib\n  RUNTIME DESTINATION bin\n)\n\ninstall(DIRECTORY include/\n  DESTINATION include/\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_modbus_tcp_relay/README.md",
    "content": "# cl_modbus_tcp_relay\n\nSMACC2 client library for controlling Modbus TCP relay boards, specifically designed for the Waveshare 8-Channel POE ETH Relay.\n\n## Overview\n\nThis client library provides a SMACC2-compatible interface for controlling relay boards via Modbus TCP protocol. It uses the libmodbus C library for communication and follows SMACC2's pure component-based architecture.\n\n## Target Hardware\n\n- **Device**: Waveshare 8-Channel POE ETH Relay (or compatible)\n- **Protocol**: Modbus TCP\n- **Default IP**: 192.168.1.254\n- **Default Port**: 502\n- **Slave ID**: 0x01\n- **Coil Addresses**: 0x0000-0x0007 (channels 1-8)\n\n## Dependencies\n\n### System Dependencies\n\n```bash\nsudo apt install libmodbus-dev\n```\n\n### ROS2 Dependencies\n\n- smacc2\n\n## Architecture\n\n### Client: ClModbusTcpRelay\n\nPure orchestrator that creates and configures components during initialization. Configuration is loaded from YAML parameters.\n\n### Components\n\n#### CpModbusConnection\n\nManages libmodbus context lifecycle, TCP connection, and heartbeat monitoring.\n\n**Responsibilities:**\n- Create/destroy modbus_t context\n- Manage TCP connection state\n- Periodic heartbeat via ISmaccUpdatable\n- Emit connection state change signals\n- Thread-safe connection access via mutex\n\n**Signals:**\n- `onConnectionLost_` - Emitted when heartbeat fails\n- `onConnectionRestored_` - Emitted when reconnection succeeds\n- `onConnectionError_` - Emitted on connection errors\n\n#### CpModbusRelay\n\nHandles Modbus coil read/write operations for the 8-channel relay.\n\n**Methods:**\n- `writeCoil(int channel, bool state)` - Write single channel (1-8)\n- `writeAllCoils(bool state)` - Write all channels ON or OFF\n- `writeAllCoils(uint8_t mask)` - Write all channels with bitmask\n- `readCoil(int channel)` - Read single channel state\n- `readAllCoils()` - Read all channel states\n\n### Client Behaviors\n\n| Behavior | Description |\n|----------|-------------|\n| `CbRelayOn` | Turn on a specific relay channel (1-8) |\n| `CbRelayOff` | Turn off a specific relay channel (1-8) |\n| `CbAllRelaysOn` | Turn on all 8 relay channels |\n| `CbAllRelaysOff` | Turn off all 8 relay channels |\n| `CbRelayStatus` | Read the status of relay channels |\n\n### Events\n\n```cpp\n// Connection events (source: CpModbusConnection)\nEvConnectionLost<CpModbusConnection, OrRelay>\nEvConnectionRestored<CpModbusConnection, OrRelay>\n\n// Relay operation events (source: CpModbusRelay)\nEvRelayWriteSuccess<CpModbusRelay, OrRelay>\nEvRelayWriteFailure<CpModbusRelay, OrRelay>\n```\n\n## Configuration\n\nConfiguration is loaded from ROS2 parameters (typically via YAML config file):\n\n```yaml\nyour_state_machine:\n  ros__parameters:\n    modbus_relay:\n      ip_address: \"192.168.1.254\"    # Relay board IP address\n      port: 502                       # Modbus TCP port\n      slave_id: 1                     # Modbus slave ID\n      heartbeat_interval_ms: 1000     # Heartbeat check interval\n      connect_on_init: true           # Auto-connect on initialization\n```\n\n### Default Values\n\n| Parameter | Default |\n|-----------|---------|\n| `ip_address` | \"192.168.1.254\" |\n| `port` | 502 |\n| `slave_id` | 1 |\n| `heartbeat_interval_ms` | 1000 |\n| `connect_on_init` | true |\n\n## Usage\n\n### Orthogonal Definition\n\n```cpp\n#include <cl_modbus_tcp_relay/cl_modbus_tcp_relay.hpp>\n\nclass OrRelay : public smacc2::Orthogonal<OrRelay>\n{\npublic:\n  void onInitialize() override\n  {\n    // Configuration loaded from YAML parameters\n    auto relay_client = this->createClient<cl_modbus_tcp_relay::ClModbusTcpRelay>();\n  }\n};\n```\n\n### State Definition\n\n```cpp\n#include <cl_modbus_tcp_relay/client_behaviors/cb_relay_on.hpp>\n#include <cl_modbus_tcp_relay/client_behaviors/cb_relay_off.hpp>\n\nstruct StActivateRelay : smacc2::SmaccState<StActivateRelay, SmExample>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbRelayOn, OrRelay>, StNextState>,\n    Transition<EvCbFailure<CbRelayOn, OrRelay>, StError>,\n    Transition<EvConnectionLost<CpModbusConnection, OrRelay>, StReconnect>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Turn on channel 1\n    configure_orthogonal<OrRelay, cl_modbus_tcp_relay::CbRelayOn>(1);\n  }\n};\n```\n\n### Launch File\n\n```python\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\nfrom ament_index_python.packages import get_package_share_directory\nimport os\n\ndef generate_launch_description():\n    config_file = os.path.join(\n        get_package_share_directory('your_state_machine'),\n        'config',\n        'your_config.yaml'\n    )\n\n    return LaunchDescription([\n        Node(\n            package='your_state_machine',\n            executable='your_state_machine_node',\n            name='your_state_machine',\n            output='screen',\n            parameters=[config_file]\n        )\n    ])\n```\n\n## Manual Testing with mbpoll\n\nFor debugging and manual testing, you can use the `mbpoll` command-line tool:\n\n```bash\n# Install mbpoll\nsudo apt install mbpoll\n\n# Read all 8 coil states\nmbpoll -m tcp -a 1 -t 0 -r 1 -c 8 192.168.1.254\n\n# Write single coil ON (channel 1)\nmbpoll -m tcp -a 1 -t 0 -r 1 192.168.1.254 1\n\n# Write single coil OFF (channel 1)\nmbpoll -m tcp -a 1 -t 0 -r 1 192.168.1.254 0\n\n# Write all coils ON\nmbpoll -m tcp -a 1 -t 0 -r 1 -c 8 192.168.1.254 1 1 1 1 1 1 1 1\n\n# Write all coils OFF\nmbpoll -m tcp -a 1 -t 0 -r 1 -c 8 192.168.1.254 0 0 0 0 0 0 0 0\n```\n\n### mbpoll Options Reference\n\n| Option | Description |\n|--------|-------------|\n| `-m tcp` | Use Modbus TCP protocol |\n| `-a 1` | Slave address (1) |\n| `-t 0` | Data type: coil (0) |\n| `-r 1` | Starting reference (1 = address 0x0000) |\n| `-c 8` | Number of coils to read/write |\n\n## Modbus Protocol Reference\n\n| Operation | Function Code | Address Range |\n|-----------|---------------|---------------|\n| Read Coils | 0x01 | 0x0000-0x0007 |\n| Write Single Coil | 0x05 | 0x0000-0x0007 |\n| Write Multiple Coils | 0x0F | 0x0000 (8 coils) |\n\n### Coil Values\n\n- ON: 0xFF00 (function 0x05) or 1 (function 0x0F)\n- OFF: 0x0000\n\n## Building\n\n```bash\n# From workspace root\ncolcon build --packages-select cl_modbus_tcp_relay\n```\n\n## Test State Machine\n\nSee `sm_modbus_tcp_relay_test_1` for a complete test state machine that exercises all behaviors.\n\n## License\n\nApache-2.0\n"
  },
  {
    "path": "smacc2_client_library/cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/cl_modbus_tcp_relay.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n *   Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_modbus_tcp_relay/components/cp_modbus_connection.hpp>\n#include <cl_modbus_tcp_relay/components/cp_modbus_relay.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_modbus_tcp_relay\n{\n\n// Connection events\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvConnectionLost : sc::event<EvConnectionLost<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvConnectionRestored : sc::event<EvConnectionRestored<TSource, TOrthogonal>>\n{\n};\n\n// Relay operation events\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvRelayWriteSuccess : sc::event<EvRelayWriteSuccess<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvRelayWriteFailure : sc::event<EvRelayWriteFailure<TSource, TOrthogonal>>\n{\n};\n\n/**\n * @brief SMACC2 Client for controlling Modbus TCP relays\n *\n * This client manages connection and control of Modbus TCP relay devices,\n * specifically designed for 8-channel relays like the Waveshare POE ETH Relay.\n *\n * Configuration is loaded from YAML parameters:\n *   modbus_relay.ip_address: IP address of the relay (default: \"192.168.1.254\")\n *   modbus_relay.port: Modbus TCP port (default: 502)\n *   modbus_relay.slave_id: Modbus slave ID (default: 1)\n *   modbus_relay.heartbeat_interval_ms: Heartbeat check interval (default: 1000)\n *   modbus_relay.connect_on_init: Connect automatically on init (default: true)\n */\nclass ClModbusTcpRelay : public smacc2::ISmaccClient\n{\npublic:\n  ClModbusTcpRelay();\n\n  virtual ~ClModbusTcpRelay();\n\n  void onInitialize() override;\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    // Create connection component if not already created\n    if (!connectionComponent_)\n    {\n      connectionComponent_ =\n        this->template createComponent<CpModbusConnection, TOrthogonal, ClModbusTcpRelay>();\n    }\n\n    // Create relay component if not already created\n    if (!relayComponent_)\n    {\n      relayComponent_ =\n        this->template createComponent<CpModbusRelay, TOrthogonal, ClModbusTcpRelay>();\n    }\n\n    // Configure components for this orthogonal\n    connectionComponent_->template onStateOrthogonalAllocation<TOrthogonal, ClModbusTcpRelay>();\n    relayComponent_->template onStateOrthogonalAllocation<TOrthogonal, ClModbusTcpRelay>();\n  }\n\n  // Accessor for connection component\n  CpModbusConnection * getConnectionComponent() { return connectionComponent_; }\n\n  // Accessor for relay component\n  CpModbusRelay * getRelayComponent() { return relayComponent_; }\n\nprivate:\n  CpModbusConnection * connectionComponent_ = nullptr;\n  CpModbusRelay * relayComponent_ = nullptr;\n};\n\n}  // namespace cl_modbus_tcp_relay\n"
  },
  {
    "path": "smacc2_client_library/cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/client_behaviors/cb_all_relays_off.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n *   Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_modbus_tcp_relay/cl_modbus_tcp_relay.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_modbus_tcp_relay\n{\n\n/**\n * @brief Client behavior to turn OFF all relay channels simultaneously\n *\n * Posts EvCbSuccess on successful write, EvCbFailure on error.\n */\nclass CbAllRelaysOff : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbAllRelaysOff() {}\n\n  virtual ~CbAllRelaysOff() {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    this->requiresClient(client_);\n    this->requiresComponent(relayComponent_);\n  }\n\n  virtual void onEntry() override\n  {\n    RCLCPP_INFO(getLogger(), \"[CbAllRelaysOff] Turning OFF all channels\");\n\n    if (!relayComponent_)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CbAllRelaysOff] Relay component not available\");\n      this->postFailureEvent();\n      return;\n    }\n\n    bool success = relayComponent_->writeAllCoils(false);\n\n    if (success)\n    {\n      RCLCPP_INFO(getLogger(), \"[CbAllRelaysOff] All channels turned OFF successfully\");\n      this->postSuccessEvent();\n    }\n    else\n    {\n      RCLCPP_ERROR(getLogger(), \"[CbAllRelaysOff] Failed to turn OFF all channels\");\n      this->postFailureEvent();\n    }\n  }\n\nprivate:\n  ClModbusTcpRelay * client_;\n  CpModbusRelay * relayComponent_;\n};\n\n}  // namespace cl_modbus_tcp_relay\n"
  },
  {
    "path": "smacc2_client_library/cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/client_behaviors/cb_all_relays_on.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n *   Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_modbus_tcp_relay/cl_modbus_tcp_relay.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_modbus_tcp_relay\n{\n\n/**\n * @brief Client behavior to turn ON all relay channels simultaneously\n *\n * Posts EvCbSuccess on successful write, EvCbFailure on error.\n */\nclass CbAllRelaysOn : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbAllRelaysOn() {}\n\n  virtual ~CbAllRelaysOn() {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    this->requiresClient(client_);\n    this->requiresComponent(relayComponent_);\n  }\n\n  virtual void onEntry() override\n  {\n    RCLCPP_INFO(getLogger(), \"[CbAllRelaysOn] Turning ON all channels\");\n\n    if (!relayComponent_)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CbAllRelaysOn] Relay component not available\");\n      this->postFailureEvent();\n      return;\n    }\n\n    bool success = relayComponent_->writeAllCoils(true);\n\n    if (success)\n    {\n      RCLCPP_INFO(getLogger(), \"[CbAllRelaysOn] All channels turned ON successfully\");\n      this->postSuccessEvent();\n    }\n    else\n    {\n      RCLCPP_ERROR(getLogger(), \"[CbAllRelaysOn] Failed to turn ON all channels\");\n      this->postFailureEvent();\n    }\n  }\n\nprivate:\n  ClModbusTcpRelay * client_;\n  CpModbusRelay * relayComponent_;\n};\n\n}  // namespace cl_modbus_tcp_relay\n"
  },
  {
    "path": "smacc2_client_library/cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/client_behaviors/cb_relay_off.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n *   Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_modbus_tcp_relay/cl_modbus_tcp_relay.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_modbus_tcp_relay\n{\n\n/**\n * @brief Client behavior to turn OFF a specific relay channel\n *\n * Posts EvCbSuccess on successful write, EvCbFailure on error.\n */\nclass CbRelayOff : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  /**\n   * @brief Construct behavior to turn off specified channel\n   * @param channel Relay channel number (1-8)\n   */\n  explicit CbRelayOff(int channel) : channel_(channel) {}\n\n  virtual ~CbRelayOff() {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    this->requiresClient(client_);\n    this->requiresComponent(relayComponent_);\n  }\n\n  virtual void onEntry() override\n  {\n    RCLCPP_INFO(getLogger(), \"[CbRelayOff] Turning OFF channel %d\", channel_);\n\n    if (!relayComponent_)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CbRelayOff] Relay component not available\");\n      this->postFailureEvent();\n      return;\n    }\n\n    bool success = relayComponent_->writeCoil(channel_, false);\n\n    if (success)\n    {\n      RCLCPP_INFO(getLogger(), \"[CbRelayOff] Channel %d turned OFF successfully\", channel_);\n      this->postSuccessEvent();\n    }\n    else\n    {\n      RCLCPP_ERROR(getLogger(), \"[CbRelayOff] Failed to turn OFF channel %d\", channel_);\n      this->postFailureEvent();\n    }\n  }\n\nprivate:\n  int channel_;\n  ClModbusTcpRelay * client_;\n  CpModbusRelay * relayComponent_;\n};\n\n}  // namespace cl_modbus_tcp_relay\n"
  },
  {
    "path": "smacc2_client_library/cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/client_behaviors/cb_relay_on.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n *   Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_modbus_tcp_relay/cl_modbus_tcp_relay.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_modbus_tcp_relay\n{\n\n/**\n * @brief Client behavior to turn ON a specific relay channel\n *\n * Posts EvCbSuccess on successful write, EvCbFailure on error.\n */\nclass CbRelayOn : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  /**\n   * @brief Construct behavior to turn on specified channel\n   * @param channel Relay channel number (1-8)\n   */\n  explicit CbRelayOn(int channel) : channel_(channel) {}\n\n  virtual ~CbRelayOn() {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    this->requiresClient(client_);\n    this->requiresComponent(relayComponent_);\n  }\n\n  virtual void onEntry() override\n  {\n    RCLCPP_INFO(getLogger(), \"[CbRelayOn] Turning ON channel %d\", channel_);\n\n    if (!relayComponent_)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CbRelayOn] Relay component not available\");\n      this->postFailureEvent();\n      return;\n    }\n\n    bool success = relayComponent_->writeCoil(channel_, true);\n\n    if (success)\n    {\n      RCLCPP_INFO(getLogger(), \"[CbRelayOn] Channel %d turned ON successfully\", channel_);\n      this->postSuccessEvent();\n    }\n    else\n    {\n      RCLCPP_ERROR(getLogger(), \"[CbRelayOn] Failed to turn ON channel %d\", channel_);\n      this->postFailureEvent();\n    }\n  }\n\nprivate:\n  int channel_;\n  ClModbusTcpRelay * client_;\n  CpModbusRelay * relayComponent_;\n};\n\n}  // namespace cl_modbus_tcp_relay\n"
  },
  {
    "path": "smacc2_client_library/cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/client_behaviors/cb_relay_status.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n *   Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_modbus_tcp_relay/cl_modbus_tcp_relay.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\n#include <optional>\n\nnamespace cl_modbus_tcp_relay\n{\n\n/**\n * @brief Client behavior to read relay channel status\n *\n * Can read single channel or all channels.\n * Posts EvCbSuccess on successful read, EvCbFailure on error.\n */\nclass CbRelayStatus : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  /**\n   * @brief Construct behavior to read all channel statuses\n   */\n  CbRelayStatus() : channel_(std::nullopt) {}\n\n  /**\n   * @brief Construct behavior to read a specific channel status\n   * @param channel Relay channel number (1-8)\n   */\n  explicit CbRelayStatus(int channel) : channel_(channel) {}\n\n  virtual ~CbRelayStatus() {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    this->requiresClient(client_);\n    this->requiresComponent(relayComponent_);\n  }\n\n  virtual void onEntry() override\n  {\n    if (channel_.has_value())\n    {\n      readSingleChannel(channel_.value());\n    }\n    else\n    {\n      readAllChannels();\n    }\n  }\n\n  /**\n   * @brief Get the last read channel states (bitmask)\n   * @return Bitmask of channel states (bit 0 = channel 1, etc.)\n   */\n  uint8_t getChannelStates() const { return channelStates_; }\n\n  /**\n   * @brief Virtual callback for status read completion\n   * Override in derived classes for custom handling\n   * @param channelStates Bitmask of channel states\n   */\n  virtual void onStatusRead(uint8_t channelStates)\n  {\n    RCLCPP_INFO(getLogger(), \"[CbRelayStatus] Status read callback: 0x%02X\", channelStates);\n  }\n\nprivate:\n  std::optional<int> channel_;\n  ClModbusTcpRelay * client_;\n  CpModbusRelay * relayComponent_;\n  uint8_t channelStates_ = 0;\n\n  void readSingleChannel(int channel)\n  {\n    RCLCPP_INFO(getLogger(), \"[CbRelayStatus] Reading channel %d status\", channel);\n\n    if (!relayComponent_)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CbRelayStatus] Relay component not available\");\n      this->postFailureEvent();\n      return;\n    }\n\n    bool state;\n    bool success = relayComponent_->readCoil(channel, state);\n\n    if (success)\n    {\n      channelStates_ = state ? (1 << (channel - 1)) : 0;\n      RCLCPP_INFO(getLogger(), \"[CbRelayStatus] Channel %d is %s\", channel, state ? \"ON\" : \"OFF\");\n      onStatusRead(channelStates_);\n      this->postSuccessEvent();\n    }\n    else\n    {\n      RCLCPP_ERROR(getLogger(), \"[CbRelayStatus] Failed to read channel %d\", channel);\n      this->postFailureEvent();\n    }\n  }\n\n  void readAllChannels()\n  {\n    RCLCPP_INFO(getLogger(), \"[CbRelayStatus] Reading all channel statuses\");\n\n    if (!relayComponent_)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CbRelayStatus] Relay component not available\");\n      this->postFailureEvent();\n      return;\n    }\n\n    bool success = relayComponent_->readAllCoils(channelStates_);\n\n    if (success)\n    {\n      RCLCPP_INFO(getLogger(), \"[CbRelayStatus] All channel statuses: 0x%02X\", channelStates_);\n\n      // Log individual channel states\n      for (int i = 0; i < 8; i++)\n      {\n        bool state = (channelStates_ & (1 << i)) != 0;\n        RCLCPP_INFO(getLogger(), \"[CbRelayStatus]   Channel %d: %s\", i + 1, state ? \"ON\" : \"OFF\");\n      }\n\n      onStatusRead(channelStates_);\n      this->postSuccessEvent();\n    }\n    else\n    {\n      RCLCPP_ERROR(getLogger(), \"[CbRelayStatus] Failed to read channel statuses\");\n      this->postFailureEvent();\n    }\n  }\n};\n\n}  // namespace cl_modbus_tcp_relay\n"
  },
  {
    "path": "smacc2_client_library/cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/components/cp_modbus_connection.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n *   Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <modbus/modbus.h>\n\n#include <functional>\n#include <mutex>\n#include <smacc2/smacc.hpp>\n#include <string>\n\nnamespace cl_modbus_tcp_relay\n{\n\n// Forward declarations for events\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvConnectionLost;\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvConnectionRestored;\n\n/**\n * @brief Component that manages Modbus TCP connection lifecycle and heartbeat monitoring\n *\n * Responsibilities:\n * - Create/destroy modbus_t context\n * - Manage TCP connection state\n * - Periodic heartbeat via ISmaccUpdatable (reads coil status to verify connectivity)\n * - Emit connection state change signals\n * - Thread-safe connection access via mutex\n *\n * Configuration is loaded from YAML parameters:\n *   modbus_relay.ip_address: IP address of the relay (default: \"192.168.1.254\")\n *   modbus_relay.port: Modbus TCP port (default: 502)\n *   modbus_relay.slave_id: Modbus slave ID (default: 1)\n *   modbus_relay.heartbeat_interval_ms: Heartbeat check interval (default: 1000)\n *   modbus_relay.connect_on_init: Connect automatically on init (default: true)\n */\nclass CpModbusConnection : public smacc2::ISmaccComponent, public smacc2::ISmaccUpdatable\n{\npublic:\n  CpModbusConnection();\n  virtual ~CpModbusConnection();\n\n  void onInitialize() override;\n\n  /**\n   * @brief Configure component for event posting during orthogonal allocation\n   */\n  template <typename TOrthogonal, typename TClient>\n  void onStateOrthogonalAllocation()\n  {\n    postConnectionLostEvent_ = [this]()\n    { this->template postEvent<EvConnectionLost<CpModbusConnection, TOrthogonal>>(); };\n\n    postConnectionRestoredEvent_ = [this]()\n    { this->template postEvent<EvConnectionRestored<CpModbusConnection, TOrthogonal>>(); };\n  }\n\n  // Connection management\n  bool connect();\n  void disconnect();\n  bool reconnect();\n  bool isConnected() const;\n\n  // Thread-safe context access\n  modbus_t * getContext();\n  std::mutex & getMutex();\n\n  // Configuration accessors\n  std::string getIpAddress() const { return ip_address_; }\n  int getPort() const { return port_; }\n  int getSlaveId() const { return slave_id_; }\n\n  // Signals for connection state changes\n  smacc2::SmaccSignal<void()> onConnectionLost_;\n  smacc2::SmaccSignal<void()> onConnectionRestored_;\n  smacc2::SmaccSignal<void(const std::string &)> onConnectionError_;\n\n  // Signal connection helpers\n  template <typename T>\n  smacc2::SmaccSignalConnection onConnectionLost(void (T::*callback)(), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onConnectionLost_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onConnectionRestored(void (T::*callback)(), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onConnectionRestored_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onConnectionError(\n    void (T::*callback)(const std::string &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onConnectionError_, callback, object);\n  }\n\nprotected:\n  void update() override;  // Heartbeat check\n\nprivate:\n  // Configuration loaded from YAML in onInitialize()\n  std::string ip_address_;\n  int port_;\n  int slave_id_;\n  int heartbeat_interval_ms_;\n  bool connect_on_init_;\n\n  // Modbus context\n  modbus_t * ctx_;\n  bool connected_;\n  mutable std::mutex mutex_;\n\n  // Event posting functions\n  std::function<void()> postConnectionLostEvent_;\n  std::function<void()> postConnectionRestoredEvent_;\n\n  // Helper for parameter loading\n  template <typename T>\n  void declareAndLoadParam(const std::string & name, T & value, const T & default_val);\n};\n\n}  // namespace cl_modbus_tcp_relay\n"
  },
  {
    "path": "smacc2_client_library/cl_modbus_tcp_relay/include/cl_modbus_tcp_relay/components/cp_modbus_relay.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n *   Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_modbus_tcp_relay/components/cp_modbus_connection.hpp>\n#include <smacc2/smacc.hpp>\n\n#include <cstdint>\n#include <functional>\n\nnamespace cl_modbus_tcp_relay\n{\n\n// Forward declarations for events\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvRelayWriteSuccess;\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvRelayWriteFailure;\n\n/**\n * @brief Component that handles Modbus coil read/write operations for 8-channel relay\n *\n * Responsibilities:\n * - Write single coil (channel on/off)\n * - Write all coils simultaneously\n * - Read single coil status\n * - Read all coil statuses\n * - Emit operation result signals\n *\n * Channel numbering: 1-8 (user-friendly)\n * Coil addresses: 0x0000-0x0007 (0-indexed internally)\n */\nclass CpModbusRelay : public smacc2::ISmaccComponent\n{\npublic:\n  static constexpr int NUM_CHANNELS = 8;\n  static constexpr int COIL_BASE_ADDRESS = 0x0000;\n\n  CpModbusRelay();\n  virtual ~CpModbusRelay();\n\n  void onInitialize() override;\n\n  /**\n   * @brief Configure component for event posting during orthogonal allocation\n   */\n  template <typename TOrthogonal, typename TClient>\n  void onStateOrthogonalAllocation()\n  {\n    postWriteSuccessEvent_ = [this]()\n    { this->template postEvent<EvRelayWriteSuccess<CpModbusRelay, TOrthogonal>>(); };\n\n    postWriteFailureEvent_ = [this]()\n    { this->template postEvent<EvRelayWriteFailure<CpModbusRelay, TOrthogonal>>(); };\n  }\n\n  // Single channel operations (channel 1-8)\n  bool writeCoil(int channel, bool state);\n  bool readCoil(int channel, bool & state);\n\n  // All channels operations\n  bool writeAllCoils(bool state);\n  bool writeAllCoils(uint8_t mask);\n  bool readAllCoils(uint8_t & states);\n\n  // Signals for operation results\n  smacc2::SmaccSignal<void(int channel, bool state)> onWriteSuccess_;\n  smacc2::SmaccSignal<void(int channel, const std::string & error)> onWriteFailure_;\n  smacc2::SmaccSignal<void(uint8_t states)> onReadComplete_;\n\n  // Signal connection helpers\n  template <typename T>\n  smacc2::SmaccSignalConnection onWriteSuccess(void (T::*callback)(int, bool), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onWriteSuccess_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onWriteFailure(\n    void (T::*callback)(int, const std::string &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onWriteFailure_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onReadComplete(void (T::*callback)(uint8_t), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onReadComplete_, callback, object);\n  }\n\nprivate:\n  CpModbusConnection * connectionComponent_;\n\n  std::function<void()> postWriteSuccessEvent_;\n  std::function<void()> postWriteFailureEvent_;\n\n  // Helper to convert channel (1-8) to coil address (0-7)\n  int channelToAddress(int channel) const { return COIL_BASE_ADDRESS + (channel - 1); }\n\n  // Validate channel number\n  bool isValidChannel(int channel) const { return channel >= 1 && channel <= NUM_CHANNELS; }\n};\n\n}  // namespace cl_modbus_tcp_relay\n"
  },
  {
    "path": "smacc2_client_library/cl_modbus_tcp_relay/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>cl_modbus_tcp_relay</name>\n  <version>1.0.0</version>\n  <description>SMACC2 client for Modbus TCP relay control (8-channel Waveshare POE ETH Relay)</description>\n\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <maintainer email=\"brettpac@gmail.com\">Brett Aldrich</maintainer>\n\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n  <buildtool_depend>pkg-config</buildtool_depend>\n\n  <depend>smacc2</depend>\n  <depend>rclcpp</depend>\n\n  <!-- System dependency: sudo apt install libmodbus-dev -->\n  <build_depend>libmodbus-dev</build_depend>\n  <exec_depend>libmodbus5</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_modbus_tcp_relay/src/cl_modbus_tcp_relay/cl_modbus_tcp_relay.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n *   Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_modbus_tcp_relay/cl_modbus_tcp_relay.hpp>\n\nnamespace cl_modbus_tcp_relay\n{\n\nClModbusTcpRelay::ClModbusTcpRelay() {}\n\nClModbusTcpRelay::~ClModbusTcpRelay() {}\n\nvoid ClModbusTcpRelay::onInitialize()\n{\n  // Components will be created here in Phase 2\n  RCLCPP_INFO(getLogger(), \"[ClModbusTcpRelay] Client initialized\");\n}\n\n}  // namespace cl_modbus_tcp_relay\n"
  },
  {
    "path": "smacc2_client_library/cl_modbus_tcp_relay/src/cl_modbus_tcp_relay/components/cp_modbus_connection.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n *   Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_modbus_tcp_relay/components/cp_modbus_connection.hpp>\n\nnamespace cl_modbus_tcp_relay\n{\n\nCpModbusConnection::CpModbusConnection()\n: ISmaccUpdatable(rclcpp::Duration::from_seconds(1.0)),  // Default 1 second update period\n  ip_address_(\"192.168.1.254\"),\n  port_(502),\n  slave_id_(1),\n  heartbeat_interval_ms_(1000),\n  connect_on_init_(true),\n  ctx_(nullptr),\n  connected_(false)\n{\n}\n\nCpModbusConnection::~CpModbusConnection()\n{\n  disconnect();\n  if (ctx_)\n  {\n    modbus_free(ctx_);\n    ctx_ = nullptr;\n  }\n}\n\ntemplate <typename T>\nvoid CpModbusConnection::declareAndLoadParam(\n  const std::string & name, T & value, const T & default_val)\n{\n  auto node = getNode();\n  if (!node->has_parameter(name))\n  {\n    node->declare_parameter(name, default_val);\n  }\n  node->get_parameter(name, value);\n}\n\n// Explicit specialization for string type\ntemplate <>\nvoid CpModbusConnection::declareAndLoadParam<std::string>(\n  const std::string & name, std::string & value, const std::string & default_val)\n{\n  auto node = getNode();\n  if (!node->has_parameter(name))\n  {\n    node->declare_parameter(name, default_val);\n  }\n  node->get_parameter(name, value);\n  RCLCPP_INFO(getLogger(), \"[CpModbusConnection] %s: %s\", name.c_str(), value.c_str());\n}\n\nvoid CpModbusConnection::onInitialize()\n{\n  RCLCPP_INFO(getLogger(), \"[CpModbusConnection] Initializing...\");\n\n  // Load configuration from YAML with defaults\n  declareAndLoadParam(\"modbus_relay.ip_address\", ip_address_, std::string(\"192.168.1.254\"));\n  declareAndLoadParam(\"modbus_relay.port\", port_, 502);\n  declareAndLoadParam(\"modbus_relay.slave_id\", slave_id_, 1);\n  declareAndLoadParam(\"modbus_relay.heartbeat_interval_ms\", heartbeat_interval_ms_, 1000);\n  declareAndLoadParam(\"modbus_relay.connect_on_init\", connect_on_init_, true);\n\n  RCLCPP_INFO(\n    getLogger(),\n    \"[CpModbusConnection] Config: %s:%d (slave=%d, heartbeat=%dms, connect_on_init=%s)\",\n    ip_address_.c_str(), port_, slave_id_, heartbeat_interval_ms_,\n    connect_on_init_ ? \"true\" : \"false\");\n\n  // Set update period for heartbeat\n  this->setUpdatePeriod(rclcpp::Duration::from_seconds(heartbeat_interval_ms_ / 1000.0));\n\n  // Create modbus context\n  ctx_ = modbus_new_tcp(ip_address_.c_str(), port_);\n  if (ctx_)\n  {\n    modbus_set_slave(ctx_, slave_id_);\n    modbus_set_response_timeout(ctx_, 1, 0);  // 1 second timeout\n\n    if (connect_on_init_)\n    {\n      connect();\n    }\n  }\n  else\n  {\n    std::string error_msg = \"Failed to create modbus context\";\n    RCLCPP_ERROR(getLogger(), \"[CpModbusConnection] %s\", error_msg.c_str());\n    onConnectionError_(error_msg);\n  }\n}\n\nbool CpModbusConnection::connect()\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n\n  if (!ctx_)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CpModbusConnection] Cannot connect: context is null\");\n    return false;\n  }\n\n  if (connected_)\n  {\n    RCLCPP_DEBUG(getLogger(), \"[CpModbusConnection] Already connected\");\n    return true;\n  }\n\n  RCLCPP_INFO(\n    getLogger(), \"[CpModbusConnection] Connecting to %s:%d...\", ip_address_.c_str(), port_);\n\n  int rc = modbus_connect(ctx_);\n  if (rc == -1)\n  {\n    std::string error_msg = std::string(\"Connection failed: \") + modbus_strerror(errno);\n    RCLCPP_ERROR(getLogger(), \"[CpModbusConnection] %s\", error_msg.c_str());\n    onConnectionError_(error_msg);\n    return false;\n  }\n\n  connected_ = true;\n  RCLCPP_INFO(getLogger(), \"[CpModbusConnection] Connected successfully\");\n  return true;\n}\n\nvoid CpModbusConnection::disconnect()\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n\n  if (ctx_ && connected_)\n  {\n    modbus_close(ctx_);\n    connected_ = false;\n    RCLCPP_INFO(getLogger(), \"[CpModbusConnection] Disconnected\");\n  }\n}\n\nbool CpModbusConnection::reconnect()\n{\n  RCLCPP_INFO(getLogger(), \"[CpModbusConnection] Reconnecting...\");\n  disconnect();\n  return connect();\n}\n\nbool CpModbusConnection::isConnected() const\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  return connected_;\n}\n\nmodbus_t * CpModbusConnection::getContext() { return ctx_; }\n\nstd::mutex & CpModbusConnection::getMutex() { return mutex_; }\n\nvoid CpModbusConnection::update()\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n\n  if (!ctx_)\n  {\n    return;\n  }\n\n  if (!connected_)\n  {\n    // Try to reconnect if not connected\n    RCLCPP_DEBUG(getLogger(), \"[CpModbusConnection] Not connected, attempting to connect...\");\n    int rc = modbus_connect(ctx_);\n    if (rc == 0)\n    {\n      connected_ = true;\n      RCLCPP_INFO(getLogger(), \"[CpModbusConnection] Connection restored\");\n      onConnectionRestored_();\n      if (postConnectionRestoredEvent_)\n      {\n        postConnectionRestoredEvent_();\n      }\n    }\n    return;\n  }\n\n  // Heartbeat: Try to read a single coil to verify connectivity\n  uint8_t status;\n  int rc = modbus_read_bits(ctx_, 0x0000, 1, &status);\n\n  if (rc == -1)\n  {\n    connected_ = false;\n    std::string error_msg = modbus_strerror(errno);\n    RCLCPP_WARN(getLogger(), \"[CpModbusConnection] Heartbeat failed: %s\", error_msg.c_str());\n    onConnectionLost_();\n    if (postConnectionLostEvent_)\n    {\n      postConnectionLostEvent_();\n    }\n  }\n  else\n  {\n    RCLCPP_DEBUG(getLogger(), \"[CpModbusConnection] Heartbeat OK (coil 0 status: %d)\", status);\n  }\n}\n\n}  // namespace cl_modbus_tcp_relay\n"
  },
  {
    "path": "smacc2_client_library/cl_modbus_tcp_relay/src/cl_modbus_tcp_relay/components/cp_modbus_relay.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n *   Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_modbus_tcp_relay/components/cp_modbus_relay.hpp>\n\nnamespace cl_modbus_tcp_relay\n{\n\nCpModbusRelay::CpModbusRelay() : connectionComponent_(nullptr) {}\n\nCpModbusRelay::~CpModbusRelay() {}\n\nvoid CpModbusRelay::onInitialize()\n{\n  RCLCPP_INFO(getLogger(), \"[CpModbusRelay] Initializing...\");\n\n  // Require the connection component\n  this->requiresComponent(connectionComponent_);\n\n  if (!connectionComponent_)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CpModbusRelay] Failed to get CpModbusConnection component\");\n  }\n  else\n  {\n    RCLCPP_INFO(getLogger(), \"[CpModbusRelay] Initialized with connection component\");\n  }\n}\n\nbool CpModbusRelay::writeCoil(int channel, bool state)\n{\n  if (!isValidChannel(channel))\n  {\n    std::string error = \"Invalid channel: \" + std::to_string(channel) + \" (must be 1-8)\";\n    RCLCPP_ERROR(getLogger(), \"[CpModbusRelay] %s\", error.c_str());\n    onWriteFailure_(channel, error);\n    if (postWriteFailureEvent_) postWriteFailureEvent_();\n    return false;\n  }\n\n  if (!connectionComponent_ || !connectionComponent_->isConnected())\n  {\n    std::string error = \"Not connected to Modbus device\";\n    RCLCPP_ERROR(getLogger(), \"[CpModbusRelay] %s\", error.c_str());\n    onWriteFailure_(channel, error);\n    if (postWriteFailureEvent_) postWriteFailureEvent_();\n    return false;\n  }\n\n  std::lock_guard<std::mutex> lock(connectionComponent_->getMutex());\n  modbus_t * ctx = connectionComponent_->getContext();\n\n  int address = channelToAddress(channel);\n  int value = state ? TRUE : FALSE;\n\n  RCLCPP_INFO(\n    getLogger(), \"[CpModbusRelay] Writing coil %d (channel %d) = %s\", address, channel,\n    state ? \"ON\" : \"OFF\");\n\n  int rc = modbus_write_bit(ctx, address, value);\n\n  if (rc == -1)\n  {\n    std::string error = modbus_strerror(errno);\n    RCLCPP_ERROR(getLogger(), \"[CpModbusRelay] Write failed: %s\", error.c_str());\n    onWriteFailure_(channel, error);\n    if (postWriteFailureEvent_) postWriteFailureEvent_();\n    return false;\n  }\n\n  RCLCPP_INFO(getLogger(), \"[CpModbusRelay] Write successful\");\n  onWriteSuccess_(channel, state);\n  if (postWriteSuccessEvent_) postWriteSuccessEvent_();\n  return true;\n}\n\nbool CpModbusRelay::readCoil(int channel, bool & state)\n{\n  if (!isValidChannel(channel))\n  {\n    RCLCPP_ERROR(getLogger(), \"[CpModbusRelay] Invalid channel: %d (must be 1-8)\", channel);\n    return false;\n  }\n\n  if (!connectionComponent_ || !connectionComponent_->isConnected())\n  {\n    RCLCPP_ERROR(getLogger(), \"[CpModbusRelay] Not connected to Modbus device\");\n    return false;\n  }\n\n  std::lock_guard<std::mutex> lock(connectionComponent_->getMutex());\n  modbus_t * ctx = connectionComponent_->getContext();\n\n  int address = channelToAddress(channel);\n  uint8_t status;\n\n  int rc = modbus_read_bits(ctx, address, 1, &status);\n\n  if (rc == -1)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CpModbusRelay] Read failed: %s\", modbus_strerror(errno));\n    return false;\n  }\n\n  state = (status != 0);\n  RCLCPP_DEBUG(\n    getLogger(), \"[CpModbusRelay] Read coil %d (channel %d) = %s\", address, channel,\n    state ? \"ON\" : \"OFF\");\n  return true;\n}\n\nbool CpModbusRelay::writeAllCoils(bool state)\n{\n  // Create a mask with all bits set or cleared\n  uint8_t mask = state ? 0xFF : 0x00;\n  return writeAllCoils(mask);\n}\n\nbool CpModbusRelay::writeAllCoils(uint8_t mask)\n{\n  if (!connectionComponent_ || !connectionComponent_->isConnected())\n  {\n    std::string error = \"Not connected to Modbus device\";\n    RCLCPP_ERROR(getLogger(), \"[CpModbusRelay] %s\", error.c_str());\n    onWriteFailure_(0, error);\n    if (postWriteFailureEvent_) postWriteFailureEvent_();\n    return false;\n  }\n\n  std::lock_guard<std::mutex> lock(connectionComponent_->getMutex());\n  modbus_t * ctx = connectionComponent_->getContext();\n\n  // Convert bitmask to array of coil states\n  uint8_t coils[NUM_CHANNELS];\n  for (int i = 0; i < NUM_CHANNELS; i++)\n  {\n    coils[i] = (mask & (1 << i)) ? TRUE : FALSE;\n  }\n\n  RCLCPP_INFO(\n    getLogger(), \"[CpModbusRelay] Writing all %d coils with mask 0x%02X\", NUM_CHANNELS, mask);\n\n  int rc = modbus_write_bits(ctx, COIL_BASE_ADDRESS, NUM_CHANNELS, coils);\n\n  if (rc == -1)\n  {\n    std::string error = modbus_strerror(errno);\n    RCLCPP_ERROR(getLogger(), \"[CpModbusRelay] Write all failed: %s\", error.c_str());\n    onWriteFailure_(0, error);\n    if (postWriteFailureEvent_) postWriteFailureEvent_();\n    return false;\n  }\n\n  RCLCPP_INFO(getLogger(), \"[CpModbusRelay] Write all successful\");\n\n  // Emit success for each channel that was turned on\n  for (int i = 0; i < NUM_CHANNELS; i++)\n  {\n    bool state = (mask & (1 << i)) != 0;\n    onWriteSuccess_(i + 1, state);\n  }\n  if (postWriteSuccessEvent_) postWriteSuccessEvent_();\n  return true;\n}\n\nbool CpModbusRelay::readAllCoils(uint8_t & states)\n{\n  if (!connectionComponent_ || !connectionComponent_->isConnected())\n  {\n    RCLCPP_ERROR(getLogger(), \"[CpModbusRelay] Not connected to Modbus device\");\n    return false;\n  }\n\n  std::lock_guard<std::mutex> lock(connectionComponent_->getMutex());\n  modbus_t * ctx = connectionComponent_->getContext();\n\n  uint8_t coils[NUM_CHANNELS];\n\n  int rc = modbus_read_bits(ctx, COIL_BASE_ADDRESS, NUM_CHANNELS, coils);\n\n  if (rc == -1)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CpModbusRelay] Read all failed: %s\", modbus_strerror(errno));\n    return false;\n  }\n\n  // Convert array to bitmask\n  states = 0;\n  for (int i = 0; i < NUM_CHANNELS; i++)\n  {\n    if (coils[i])\n    {\n      states |= (1 << i);\n    }\n  }\n\n  RCLCPP_DEBUG(getLogger(), \"[CpModbusRelay] Read all coils: 0x%02X\", states);\n  onReadComplete_(states);\n  return true;\n}\n\n}  // namespace cl_modbus_tcp_relay\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/CHANGELOG.rst",
    "content": "Changelog for package cl_moveit2z\n==================================\n\n.. note::\n   This package was created in October 2025 as a refactored version of moveit2z_client.\n   For historical changes prior to 2.3.20, see moveit2z_client/CHANGELOG.rst.\n   The moveit2z_client package is now deprecated in favor of cl_moveit2z.\n\n2.3.20 (2025-11-01)\n-------------------\n* New cl_moveit2z client library created (`#638 <https://github.com/robosoft-ai/SMACC2/issues/638>`_)\n\n  * Initial creation with improved architecture\n  * Refactoring of cl_moveit2z to component-based architecture & header-only implementation (`#639 <https://github.com/robosoft-ai/SMACC2/issues/639>`_)\n\n* Contributors: Brett Aldrich, Pablo Iñigo Blasco\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.8)\nproject(cl_moveit2z)\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(ament_index_cpp REQUIRED)\n\nfind_package(smacc2 REQUIRED)\nfind_package(moveit_ros_planning_interface REQUIRED)\nfind_package(tf2 REQUIRED)\nfind_package(tf2_ros REQUIRED)\nfind_package(yaml_cpp_vendor REQUIRED)\n\nset(dependencies\nmoveit_ros_planning_interface\ntf2\ntf2_ros\nsmacc2\ntf2_geometry_msgs\nyaml_cpp_vendor\n)\n\ninclude_directories(include)\n\n## Declare a C++ library (header-only implementations with compilation anchor)\nadd_library(${PROJECT_NAME}\n  src/cl_moveit2z/cl_moveit2z.cpp  # Compilation anchor stub\n)\n\n# All implementations are header-only (inline):\n# src/cl_moveit2z/common.cpp  # PHASE 1: NOW HEADER-ONLY (inline stream operators)\n# src/cl_moveit2z/components/cp_trajectory_history.cpp  # PHASE 2: NOW HEADER-ONLY (inline methods)\n# src/cl_moveit2z/components/cp_grasping_objects.cpp  # PHASE 3: NOW HEADER-ONLY (inline methods)\n\n# ALL CLIENT BEHAVIORS ARE NOW HEADER-ONLY\n# src/cl_moveit2z/client_behaviors/cb_move_end_effector.cpp  # HEADER-ONLY\n# src/cl_moveit2z/client_behaviors/cb_move_known_state.cpp  # HEADER-ONLY\n# src/cl_moveit2z/client_behaviors/cb_move_joints.cpp  # HEADER-ONLY\n# src/cl_moveit2z/client_behaviors/cb_undo_last_trajectory.cpp  # HEADER-ONLY\n# src/cl_moveit2z/client_behaviors/cb_move_end_effector_trajectory.cpp  # HEADER-ONLY\n# src/cl_moveit2z/client_behaviors/cb_end_effector_rotate.cpp  # HEADER-ONLY\n# src/cl_moveit2z/client_behaviors/cb_move_cartesian_relative2.cpp  # HEADER-ONLY\n# src/cl_moveit2z/client_behaviors/cb_circular_pivot_motion.cpp  # HEADER-ONLY\n\ntarget_link_libraries(${PROJECT_NAME} ${YAML_CPP_LIBRARIES})\n\nament_target_dependencies(${PROJECT_NAME}\n  ${dependencies})\n\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\nament_export_dependencies(${dependencies})\n\ninstall(TARGETS ${PROJECT_NAME}\n  ARCHIVE DESTINATION lib\n  LIBRARY DESTINATION lib\n  RUNTIME DESTINATION bin\n)\n\ninstall(DIRECTORY include/\n  DESTINATION include/\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/cl_moveit2z.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n//#include <smacc2/smacc_client.h>\n//#include <smacc2/smacc_signal.h>\n#include <smacc2/smacc.hpp>\n\n#include <moveit/move_group_interface/move_group_interface.hpp>\n#include <moveit/planning_scene_interface/planning_scene_interface.hpp>\n\n#include <geometry_msgs/msg/transform.hpp>\n#include <geometry_msgs/msg/vector3.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n\nnamespace cl_moveit2z\n{\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvMoveGroupMotionExecutionSucceded\n: sc::event<EvMoveGroupMotionExecutionSucceded<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvMoveGroupMotionExecutionFailed\n: sc::event<EvMoveGroupMotionExecutionFailed<TSource, TOrthogonal>>\n{\n};\n\n/*\nmoveit_msgs/MoveItErrorCodes\n----------------------------\nint32 SUCCESS=1\nint32 FAILURE=99999\nint32 PLANNING_FAILED=-1\nint32 INVALID_MOTION_PLAN=-2\nint32 MOTION_PLAN_INVALIDATED_BY_ENVIRONMENT_CHANGE=-3\nint32 CONTROL_FAILED=-4\nint32 UNABLE_TO_AQUIRE_SENSOR_DATA=-5\nint32 TIMED_OUT=-6\nint32 PREEMPTED=-7\nint32 START_STATE_IN_COLLISION=-10\nint32 START_STATE_VIOLATES_PATH_CONSTRAINTS=-11\nint32 GOAL_IN_COLLISION=-12\nint32 GOAL_VIOLATES_PATH_CONSTRAINTS=-13\nint32 GOAL_CONSTRAINTS_VIOLATED=-14\nint32 INVALID_GROUP_NAME=-15\nint32 INVALID_GOAL_CONSTRAINTS=-16\nint32 INVALID_ROBOT_STATE=-17\nint32 INVALID_LINK_NAME=-18\nint32 INVALID_OBJECT_NAME=-19\nint32 FRAME_TRANSFORM_FAILURE=-21\nint32 COLLISION_CHECKING_UNAVAILABLE=-22\nint32 ROBOT_STATE_STALE=-23\nint32 SENSOR_INFO_STALE=-24\nint32 NO_IK_SOLUTION=-31\nint32 val\n*/\n\nclass ClMoveit2z : public smacc2::ISmaccClient\n{\npublic:\n  // this structure contains the default move_group configuration for any arm motion through move_group\n  // the client behavior will override these default values in a copy of this object so that their changes\n  // are not persinstent. In the other hand, if you change this client configuration, the parameters will be persistent.\n  std::shared_ptr<moveit::planning_interface::MoveGroupInterface> moveGroupClientInterface;\n\n  std::shared_ptr<moveit::planning_interface::PlanningSceneInterface> planningSceneInterface;\n\n  ClMoveit2z(std::string groupName);\n\n  ClMoveit2z(const moveit::planning_interface::MoveGroupInterface::Options & options);\n\n  virtual ~ClMoveit2z();\n\n  inline void onInitialize() override\n  {\n    moveGroupClientInterface =\n      std::make_shared<moveit::planning_interface::MoveGroupInterface>(getNode(), options_);\n    planningSceneInterface = std::make_shared<moveit::planning_interface::PlanningSceneInterface>(\n      options_.move_group_namespace);\n  }\n\n  inline void postEventMotionExecutionSucceded()\n  {\n    RCLCPP_INFO(getLogger(), \"[ClMoveit2z] Post Motion Success Event\");\n    postEventMotionExecutionSucceded_();\n  }\n\n  inline void postEventMotionExecutionFailed()\n  {\n    RCLCPP_INFO(getLogger(), \"[ClMoveit2z] Post Motion Failure Event\");\n    postEventMotionExecutionFailed_();\n  }\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    postEventMotionExecutionSucceded_ = [=]()\n    {\n      this->onSucceded_();\n      this->postEvent<EvMoveGroupMotionExecutionSucceded<TSourceObject, TOrthogonal>>();\n    };\n\n    postEventMotionExecutionFailed_ = [=]()\n    {\n      this->onFailed_();\n      this->postEvent<EvMoveGroupMotionExecutionFailed<TSourceObject, TOrthogonal>>();\n    };\n  }\n\n  template <typename TCallback, typename T>\n  smacc2::SmaccSignalConnection onMotionExecutionSuccedded(TCallback callback, T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onSucceded_, callback, object);\n  }\n\n  template <typename TCallback, typename T>\n  smacc2::SmaccSignalConnection onMotionExecutionFailed(TCallback callback, T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onFailed_, callback, object);\n  }\n\n  inline const moveit::planning_interface::MoveGroupInterface::Options & getOptions() const\n  {\n    return options_;\n  }\n\nprivate:\n  std::function<void()> postEventMotionExecutionSucceded_;\n  std::function<void()> postEventMotionExecutionFailed_;\n\n  smacc2::SmaccSignal<void()> onSucceded_;\n  smacc2::SmaccSignal<void()> onFailed_;\n\n  // std::string groupName_;\n  moveit::planning_interface::MoveGroupInterface::Options options_;\n};\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_attach_object.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <cl_moveit2z/cl_moveit2z.hpp>\n#include <cl_moveit2z/components/cp_grasping_objects.hpp>\n#include <moveit_msgs/msg/collision_object.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_moveit2z\n{\n/**\n * @brief Client behavior that attaches a collision object to the robot gripper\n *\n * This behavior attaches a previously created grasping object to the robot's\n * end effector. The object must exist in the CpGraspingComponent's graspingObjects\n * map. Upon successful attachment, the object is added to the planning scene\n * and attached to the gripper using the finger tip links.\n */\nclass CbAttachObject : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  /**\n   * @brief Constructor with object name\n   * @param targetObjectName Name of the object to attach (must exist in CpGraspingComponent)\n   */\n  inline CbAttachObject(std::string targetObjectName) : targetObjectName_(targetObjectName) {}\n\n  /**\n   * @brief Default constructor\n   */\n  inline CbAttachObject() {}\n\n  /**\n   * @brief Called when the behavior is entered\n   *\n   * Retrieves the target object from CpGraspingComponent, adds it to the planning\n   * scene, and attaches it to the gripper. Posts success or failure event based\n   * on whether the object was found.\n   */\n  inline void onEntry() override\n  {\n    cl_moveit2z::ClMoveit2z * moveGroup;\n    this->requiresClient(moveGroup);\n\n    cl_moveit2z::CpGraspingComponent * graspingComponent;\n    this->requiresComponent(graspingComponent);\n\n    moveit_msgs::msg::CollisionObject targetCollisionObject;\n    bool found = graspingComponent->getGraspingObject(targetObjectName_, targetCollisionObject);\n\n    if (found)\n    {\n      RCLCPP_INFO_STREAM(getLogger(), \"[CbAttachObject] Attaching object: \" << targetObjectName_);\n\n      targetCollisionObject.operation = moveit_msgs::msg::CollisionObject::ADD;\n      targetCollisionObject.header.stamp = getNode()->now();\n\n      moveGroup->planningSceneInterface->applyCollisionObject(targetCollisionObject);\n      graspingComponent->currentAttachedObjectName = targetObjectName_;\n\n      moveGroup->moveGroupClientInterface->attachObject(\n        targetObjectName_, graspingComponent->gripperLink_, graspingComponent->fingerTipNames);\n\n      this->postSuccessEvent();\n    }\n    else\n    {\n      RCLCPP_ERROR_STREAM(\n        getLogger(),\n        \"[CbAttachObject] Object not found in grasping component: \" << targetObjectName_);\n      this->postFailureEvent();\n    }\n  }\n\n  /**\n   * @brief Called when the behavior is exited\n   */\n  inline void onExit() override {}\n\n  /// Name of the target object to attach\n  std::string targetObjectName_;\n};\n\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_circular_pivot_motion.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n#pragma once\n\n#include <tf2/transform_datatypes.h>\n#include <tf2_ros/transform_listener.h>\n#include <cl_moveit2z/components/cp_tf_listener.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n#include \"cb_move_end_effector_trajectory.hpp\"\n\nusing namespace std::chrono_literals;\n\nnamespace cl_moveit2z\n{\n// executes a circular trajectory of the tipLink around one axis defined\n// by the z-axis of the plaenePivotPose\nclass CbCircularPivotMotion : public CbMoveEndEffectorTrajectory\n{\npublic:\n  std::optional<double> angularSpeed_rad_s_;\n  std::optional<double> linearSpeed_m_s_;\n\n  // if not specified it would be used the current robot pose\n  std::optional<geometry_msgs::msg::Pose> relativeInitialPose_;\n\n  CbCircularPivotMotion(std::optional<std::string> tipLink = std::nullopt)\n  : CbMoveEndEffectorTrajectory(tipLink)\n  {\n  }\n\n  CbCircularPivotMotion(\n    const geometry_msgs::msg::PoseStamped & planePivotPose, double deltaRadians,\n    std::optional<std::string> tipLink = std::nullopt)\n  : CbMoveEndEffectorTrajectory(tipLink),\n    planePivotPose_(planePivotPose),\n    deltaRadians_(deltaRadians)\n  {\n    if (tipLink_) planePivotPose_.header.frame_id = *tipLink;\n  }\n\n  CbCircularPivotMotion(\n    const geometry_msgs::msg::PoseStamped & planePivotPose,\n    const geometry_msgs::msg::Pose & relativeInitialPose, double deltaRadians,\n    std::optional<std::string> tipLink = std::nullopt)\n  : CbMoveEndEffectorTrajectory(tipLink),\n    relativeInitialPose_(relativeInitialPose),\n    planePivotPose_(planePivotPose),\n    deltaRadians_(deltaRadians)\n  {\n  }\n\n  virtual void generateTrajectory() override\n  {\n    if (!relativeInitialPose_)\n    {\n      this->computeCurrentEndEffectorPoseRelativeToPivot();\n    }\n\n    // project offset into the xy-plane\n    // get the radius\n    double radius = sqrt(\n      relativeInitialPose_->position.z * relativeInitialPose_->position.z +\n      relativeInitialPose_->position.y * relativeInitialPose_->position.y);\n    double initialAngle = atan2(relativeInitialPose_->position.z, relativeInitialPose_->position.y);\n\n    double totallineardist = fabs(radius * deltaRadians_);\n    double totalangulardist = fabs(deltaRadians_);\n\n    // at least 1 sample per centimeter (average)\n    // at least 1 sample per ~1.1 degrees (average)\n\n    const double RADS_PER_SAMPLE = 0.02;\n    const double METERS_PER_SAMPLE = 0.01;\n\n    int totalSamplesCount =\n      std::max(totallineardist / METERS_PER_SAMPLE, totalangulardist / RADS_PER_SAMPLE);\n\n    double linearSecondsPerSample;\n    double angularSecondsPerSamples;\n    double secondsPerSample;\n\n    if (linearSpeed_m_s_)\n    {\n      linearSecondsPerSample = METERS_PER_SAMPLE / (*linearSpeed_m_s_);\n    }\n    else\n    {\n      linearSecondsPerSample = std::numeric_limits<double>::max();\n    }\n\n    if (angularSpeed_rad_s_)\n    {\n      angularSecondsPerSamples = RADS_PER_SAMPLE / (*angularSpeed_rad_s_);\n    }\n    else\n    {\n      angularSecondsPerSamples = std::numeric_limits<double>::max();\n    }\n\n    if (!linearSpeed_m_s_ && !angularSpeed_rad_s_)\n    {\n      secondsPerSample = 0.5;\n    }\n    else\n    {\n      secondsPerSample = std::min(linearSecondsPerSample, angularSecondsPerSamples);\n    }\n\n    double currentAngle = initialAngle;\n\n    double angleStep = deltaRadians_ / (double)totalSamplesCount;\n\n    tf2::Transform tfBasePose;\n    tf2::fromMsg(planePivotPose_.pose, tfBasePose);\n\n    RCLCPP_INFO_STREAM(\n      getLogger(),\n      \"[\" << getName() << \"] generated trajectory, total samples: \" << totalSamplesCount);\n    for (int i = 0; i < totalSamplesCount; i++)\n    {\n      // relativePose i\n      double y = radius * cos(currentAngle);\n      double z = radius * sin(currentAngle);\n\n      geometry_msgs::msg::Pose relativeCurrentPose;\n\n      relativeCurrentPose.position.x = relativeInitialPose_->position.x;\n      relativeCurrentPose.position.y = y;\n      relativeCurrentPose.position.z = z;\n\n      tf2::Quaternion localquat;\n      localquat.setEuler(currentAngle, 0, 0);\n\n      //relativeCurrentPose.orientation = relativeInitialPose_.orientation;\n      //tf2::toMsg(localquat, relativeCurrentPose.orientation);\n      relativeCurrentPose.orientation.w = 1;\n\n      tf2::Transform tfRelativeCurrentPose;\n      tf2::fromMsg(relativeCurrentPose, tfRelativeCurrentPose);\n\n      tf2::Transform tfGlobalPose = tfRelativeCurrentPose * tfBasePose;\n\n      tfGlobalPose.setRotation(tfGlobalPose.getRotation() * localquat);\n\n      geometry_msgs::msg::PoseStamped globalPose;\n      tf2::toMsg(tfGlobalPose, globalPose.pose);\n      globalPose.header.frame_id = planePivotPose_.header.frame_id;\n      globalPose.header.stamp = rclcpp::Time(planePivotPose_.header.stamp) +\n                                rclcpp::Duration::from_seconds(i * secondsPerSample);\n      RCLCPP_INFO_STREAM(\n        getLogger(),\n        \"[\" << getName() << \"]\" << rclcpp::Time(globalPose.header.stamp).nanoseconds());\n\n      this->endEffectorTrajectory_.push_back(globalPose);\n      currentAngle += angleStep;\n    }\n  }\n\n  virtual void createMarkers() override\n  {\n    CbMoveEndEffectorTrajectory::createMarkers();\n\n    tf2::Transform localdirection;\n    localdirection.setIdentity();\n    localdirection.setOrigin(tf2::Vector3(0.12, 0, 0));\n    auto frameid = planePivotPose_.header.frame_id;\n\n    visualization_msgs::msg::Marker marker;\n    marker.header.frame_id = frameid;\n    marker.header.stamp = getNode()->now();\n    marker.ns = \"trajectory\";\n    marker.id = beahiorMarkers_.markers.size();\n    marker.type = visualization_msgs::msg::Marker::ARROW;\n    marker.action = visualization_msgs::msg::Marker::ADD;\n    marker.scale.x = 0.01;\n    marker.scale.y = 0.02;\n    marker.scale.z = 0.02;\n    marker.color.a = 1.0;\n    marker.color.r = 0.0;\n    marker.color.g = 0;\n    marker.color.b = 1.0;\n\n    geometry_msgs::msg::Point start, end;\n    start.x = planePivotPose_.pose.position.x;\n    start.y = planePivotPose_.pose.position.y;\n    start.z = planePivotPose_.pose.position.z;\n\n    tf2::Transform basetransform;\n    tf2::fromMsg(planePivotPose_.pose, basetransform);\n    tf2::Transform endarrow = localdirection * basetransform;\n\n    end.x = endarrow.getOrigin().x();\n    end.y = endarrow.getOrigin().y();\n    end.z = endarrow.getOrigin().z();\n\n    marker.pose.orientation.w = 1;\n    marker.points.push_back(start);\n    marker.points.push_back(end);\n\n    beahiorMarkers_.markers.push_back(marker);\n  }\n\nprotected:\n  // the rotation axis (z-axis) and the center of rotation in the space\n  geometry_msgs::msg::PoseStamped planePivotPose_;\n\n  double deltaRadians_;\n\nprivate:\n  void computeCurrentEndEffectorPoseRelativeToPivot()\n  {\n    // Use CpTfListener component for transform lookups\n    CpTfListener * tfListener = nullptr;\n    this->requiresComponent(tfListener, smacc2::ComponentRequirement::SOFT);  // Optional component\n\n    tf2::Stamped<tf2::Transform> endEffectorInPivotFrame;\n\n    try\n    {\n      if (!tipLink_ || *tipLink_ == \"\")\n      {\n        tipLink_ = this->movegroupClient_->moveGroupClientInterface->getEndEffectorLink();\n      }\n\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << getName() << \"] waiting transform, pivot: '\"\n                         << planePivotPose_.header.frame_id << \"' tipLink: '\" << *tipLink_ << \"'\");\n\n      if (tfListener != nullptr)\n      {\n        // Use component-based TF listener (preferred)\n        auto transformOpt =\n          tfListener->lookupTransform(planePivotPose_.header.frame_id, *tipLink_, rclcpp::Time());\n\n        if (transformOpt)\n        {\n          tf2::fromMsg(transformOpt.value(), endEffectorInPivotFrame);\n        }\n        else\n        {\n          RCLCPP_ERROR_STREAM(\n            getLogger(), \"[\" << getName() << \"] Failed to lookup transform from \" << *tipLink_\n                             << \" to \" << planePivotPose_.header.frame_id);\n          return;\n        }\n      }\n      else\n      {\n        // Fallback to legacy TF2 usage if component not available\n        RCLCPP_WARN_STREAM(\n          getLogger(), \"[\" << getName()\n                           << \"] CpTfListener component not available, using legacy TF2 (consider \"\n                              \"adding CpTfListener component)\");\n        tf2_ros::Buffer tfBuffer(getNode()->get_clock());\n        tf2_ros::TransformListener tfListenerLegacy(tfBuffer);\n\n        tf2::fromMsg(\n          tfBuffer.lookupTransform(\n            planePivotPose_.header.frame_id, *tipLink_, rclcpp::Time(), rclcpp::Duration(10s)),\n          endEffectorInPivotFrame);\n      }\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_ERROR_STREAM(\n        getLogger(),\n        \"[\" << getName()\n            << \"] Exception in computeCurrentEndEffectorPoseRelativeToPivot: \" << e.what());\n      return;\n    }\n\n    // tf2::Transform endEffectorInBaseLinkFrame;\n    // tf2::fromMsg(currentRobotEndEffectorPose.pose, endEffectorInBaseLinkFrame);\n\n    // tf2::Transform endEffectorInPivotFrame = globalBaseLink * endEffectorInBaseLinkFrame; // pose composition\n\n    // now pivot and EndEffector share a common reference frame (let say map)\n    // now get the current pose from the pivot reference frame with inverse composition\n    tf2::Transform pivotTransform;\n    tf2::fromMsg(planePivotPose_.pose, pivotTransform);\n    tf2::Transform invertedNewReferenceFrame = pivotTransform.inverse();\n\n    tf2::Transform currentPoseRelativeToPivot = invertedNewReferenceFrame * endEffectorInPivotFrame;\n\n    geometry_msgs::msg::Pose finalEndEffectorRelativePose;\n    tf2::toMsg(currentPoseRelativeToPivot, finalEndEffectorRelativePose);\n    relativeInitialPose_ = finalEndEffectorRelativePose;\n  }\n};\n\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_detach_object.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <cl_moveit2z/cl_moveit2z.hpp>\n#include <cl_moveit2z/components/cp_grasping_objects.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_moveit2z\n{\n/**\n * @brief Client behavior that detaches the currently attached collision object\n *\n * This behavior detaches whatever object is currently attached to the robot's\n * gripper (tracked in CpGraspingComponent::currentAttachedObjectName) and\n * removes it from the planning scene. Posts success or failure event based\n * on the detach operation result.\n */\nclass CbDetachObject : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  /**\n   * @brief Called when the behavior is entered\n   *\n   * Retrieves the currently attached object name from CpGraspingComponent,\n   * detaches it from the gripper, and removes it from the planning scene.\n   */\n  inline void onEntry() override\n  {\n    cl_moveit2z::CpGraspingComponent * graspingComponent;\n    this->requiresComponent(graspingComponent);\n\n    cl_moveit2z::ClMoveit2z * moveGroupClient;\n    this->requiresClient(moveGroupClient);\n\n    if (graspingComponent->currentAttachedObjectName)\n    {\n      RCLCPP_INFO_STREAM(\n        getLogger(),\n        \"[CbDetachObject] Detaching object: \" << *(graspingComponent->currentAttachedObjectName));\n\n      auto & planningSceneInterface = moveGroupClient->planningSceneInterface;\n      auto res = moveGroupClient->moveGroupClientInterface->detachObject(\n        *(graspingComponent->currentAttachedObjectName));\n\n      planningSceneInterface->removeCollisionObjects(\n        {*(graspingComponent->currentAttachedObjectName)});\n\n      if (res)\n      {\n        RCLCPP_INFO(getLogger(), \"[CbDetachObject] Detach succeeded\");\n        this->postSuccessEvent();\n      }\n      else\n      {\n        RCLCPP_ERROR(getLogger(), \"[CbDetachObject] Detach failed\");\n        this->postFailureEvent();\n      }\n    }\n    else\n    {\n      RCLCPP_ERROR(getLogger(), \"[CbDetachObject] No object currently attached\");\n      this->postFailureEvent();\n    }\n  }\n\n  /**\n   * @brief Called when the behavior is exited\n   */\n  inline void onExit() override {}\n};\n\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_end_effector_rotate.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#include <tf2_ros/buffer.h>\n#include <tf2_ros/transform_listener.h>\n#include <ament_index_cpp/get_package_share_directory.hpp>\n#include <cl_moveit2z/common.hpp>\n#include <cl_moveit2z/components/cp_tf_listener.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n#include \"cb_circular_pivot_motion.hpp\"\n\nusing namespace std::chrono_literals;\n\nnamespace cl_moveit2z\n{\n// spins the end effector joint (or any other arbitrary joint etting the tipLink parameter)\nclass CbEndEffectorRotate : public CbCircularPivotMotion\n{\npublic:\n  CbEndEffectorRotate(double deltaRadians, std::optional<std::string> tipLink = std::nullopt)\n  : CbCircularPivotMotion(tipLink)\n  {\n    deltaRadians_ = deltaRadians;\n  }\n\n  virtual ~CbEndEffectorRotate() {}\n\n  virtual void onEntry() override\n  {\n    // Use CpTfListener component for transform lookups\n    CpTfListener * tfListener = nullptr;\n    this->requiresComponent(tfListener, smacc2::ComponentRequirement::SOFT);  // Optional component\n\n    tf2::Stamped<tf2::Transform> endEffectorInPivotFrame;\n\n    int attempts = 3;\n\n    this->requiresClient(movegroupClient_);\n    if (!tipLink_)\n    {\n      tipLink_ = this->movegroupClient_->moveGroupClientInterface->getEndEffectorLink();\n      RCLCPP_WARN_STREAM(\n        getLogger(),\n        \"[\" << getName() << \"] tip unspecified, using default end effector: \" << *tipLink_);\n    }\n\n    while (attempts > 0)\n    {\n      try\n      {\n        auto pivotFrameName =\n          this->movegroupClient_->moveGroupClientInterface->getEndEffectorLink();\n\n        if (tfListener != nullptr)\n        {\n          // Use component-based TF listener (preferred)\n          auto transformOpt =\n            tfListener->lookupTransform(pivotFrameName, *tipLink_, rclcpp::Time());\n\n          if (transformOpt)\n          {\n            tf2::fromMsg(transformOpt.value(), endEffectorInPivotFrame);\n            tf2::toMsg(endEffectorInPivotFrame, this->planePivotPose_.pose);\n            this->planePivotPose_.header.frame_id = endEffectorInPivotFrame.frame_id_;\n            this->planePivotPose_.header.stamp =\n              rclcpp::Time(endEffectorInPivotFrame.stamp_.time_since_epoch().count());\n            break;\n          }\n          else\n          {\n            RCLCPP_ERROR_STREAM(\n              getLogger(), \"[\" << getName() << \"] Failed to lookup transform from \" << *tipLink_\n                               << \" to \" << pivotFrameName << \". Attempt countdown: \" << attempts);\n            rclcpp::sleep_for(500ms);\n            attempts--;\n          }\n        }\n        else\n        {\n          // Fallback to legacy TF2 usage if component not available\n          RCLCPP_WARN_STREAM(\n            getLogger(),\n            \"[\" << getName()\n                << \"] CpTfListener component not available, using legacy TF2 (consider \"\n                   \"adding CpTfListener component)\");\n          tf2_ros::Buffer tfBuffer(getNode()->get_clock());\n          tf2_ros::TransformListener tfListenerLegacy(tfBuffer);\n\n          tf2::fromMsg(\n            tfBuffer.lookupTransform(\n              pivotFrameName, *tipLink_, rclcpp::Time(), rclcpp::Duration(10s)),\n            endEffectorInPivotFrame);\n\n          tf2::toMsg(endEffectorInPivotFrame, this->planePivotPose_.pose);\n          this->planePivotPose_.header.frame_id = endEffectorInPivotFrame.frame_id_;\n          this->planePivotPose_.header.stamp =\n            rclcpp::Time(endEffectorInPivotFrame.stamp_.time_since_epoch().count());\n          break;\n        }\n      }\n      catch (const std::exception & e)\n      {\n        RCLCPP_ERROR_STREAM(getLogger(), e.what() << \". Attempt countdown: \" << attempts);\n        rclcpp::sleep_for(500ms);\n        attempts--;\n      }\n    }\n\n    RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] pivotPose: \" << planePivotPose_);\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << getName() << \"] calling base CbCircularPivotMotion::onEntry\");\n    CbCircularPivotMotion::onEntry();\n  }\n\n  std::optional<std::string> tipLink;\n};\n\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_move_cartesian_relative2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <tf2/transform_datatypes.h>\n#include <cl_moveit2z/cl_moveit2z.hpp>\n#include <cl_moveit2z/common.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n#include \"cb_move_end_effector_trajectory.hpp\"\n\nusing namespace std::chrono_literals;\n\nnamespace cl_moveit2z\n{\nclass CbMoveCartesianRelative2 : public CbMoveEndEffectorTrajectory\n{\npublic:\n  geometry_msgs::msg::Vector3 offset_;\n\n  std::optional<double> linearSpeed_m_s_;\n\n  CbMoveCartesianRelative2(std::string referenceFrame, std::string tipLink)\n  : CbMoveEndEffectorTrajectory(tipLink)\n  {\n    globalFrame_ = referenceFrame;\n  }\n\n  CbMoveCartesianRelative2(\n    std::string referenceFrame, std::string tipLink, geometry_msgs::msg::Vector3 offset)\n  : CbMoveEndEffectorTrajectory(tipLink)\n  {\n    globalFrame_ = referenceFrame;\n    offset_ = offset;\n  }\n\n  virtual ~CbMoveCartesianRelative2() {}\n\n  void generateTrajectory() override\n  {\n    RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] generating trajectory\");\n    // at least 1 sample per centimeter (average)\n    const double METERS_PER_SAMPLE = 0.001;\n\n    float dist_meters = 0;\n    tf2::Vector3 voffset;\n    tf2::fromMsg(offset_, voffset);\n\n    float totallineardist = voffset.length();\n\n    int totalSamplesCount = totallineardist / METERS_PER_SAMPLE;\n    int steps = totallineardist / METERS_PER_SAMPLE;\n\n    float interpolation_factor_step = 1.0 / totalSamplesCount;\n\n    double secondsPerSample;\n\n    if (!linearSpeed_m_s_)\n    {\n      linearSpeed_m_s_ = 0.1;\n    }\n\n    secondsPerSample = METERS_PER_SAMPLE / (*linearSpeed_m_s_);\n\n    tf2::Stamped<tf2::Transform> currentEndEffectorTransform;\n    RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] getting current end effector pose\");\n    this->getCurrentEndEffectorPose(globalFrame_, currentEndEffectorTransform);\n\n    tf2::Transform finalEndEffectorTransform = currentEndEffectorTransform;\n    finalEndEffectorTransform.setOrigin(finalEndEffectorTransform.getOrigin() + voffset);\n\n    float linc = totallineardist / steps;  // METERS_PER_SAMPLE with sign\n    float interpolation_factor = 0;\n\n    rclcpp::Time startTime = getNode()->now();\n    RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] trajectory steps: \" << steps);\n\n    for (float i = 0; i < steps; i++)\n    {\n      interpolation_factor += interpolation_factor_step;\n      dist_meters += linc;\n\n      tf2::Vector3 vi = currentEndEffectorTransform.getOrigin().lerp(\n        finalEndEffectorTransform.getOrigin(), interpolation_factor);\n\n      tf2::Transform pose;\n      pose.setOrigin(vi);\n      pose.setRotation(currentEndEffectorTransform.getRotation());\n\n      geometry_msgs::msg::PoseStamped pointerPose;\n      tf2::toMsg(pose, pointerPose.pose);\n      pointerPose.header.frame_id = globalFrame_;\n      pointerPose.header.stamp = startTime + rclcpp::Duration::from_seconds(i * secondsPerSample);\n\n      this->endEffectorTrajectory_.push_back(pointerPose);\n    }\n\n    RCLCPP_INFO_STREAM(\n      getLogger(),\n      \"[\" << getName() << \"] Target End efector Pose: \" << this->endEffectorTrajectory_.back());\n  }\n\nprivate:\n  std::string globalFrame_;\n};\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_move_end_effector.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <tf2/impl/utils.h>\n#include <cl_moveit2z/cl_moveit2z.hpp>\n#include <cl_moveit2z/common.hpp>\n#include <cl_moveit2z/components/cp_motion_planner.hpp>\n#include <cl_moveit2z/components/cp_trajectory_executor.hpp>\n#include <future>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace cl_moveit2z\n{\nclass CbMoveEndEffector : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  geometry_msgs::msg::PoseStamped targetPose;\n  std::string tip_link_;\n  std::optional<std::string> group_;\n\n  CbMoveEndEffector() {}\n\n  CbMoveEndEffector(geometry_msgs::msg::PoseStamped target_pose, std::string tip_link = \"\")\n  : targetPose(target_pose)\n  {\n    tip_link_ = tip_link;\n  }\n\n  virtual void onEntry() override\n  {\n    this->requiresClient(movegroupClient_);\n\n    if (this->group_)\n    {\n      RCLCPP_DEBUG(\n        getLogger(), \"[CbMoveEndEfector] new thread started to move absolute end effector\");\n      moveit::planning_interface::MoveGroupInterface move_group(getNode(), *group_);\n      this->moveToAbsolutePose(move_group, targetPose);\n      RCLCPP_DEBUG(\n        getLogger(), \"[CbMoveEndEfector] to move absolute end effector thread destroyed\");\n    }\n    else\n    {\n      RCLCPP_DEBUG(\n        getLogger(), \"[CbMoveEndEfector] new thread started to move absolute end effector\");\n      this->moveToAbsolutePose(*(movegroupClient_->moveGroupClientInterface), targetPose);\n      RCLCPP_DEBUG(\n        getLogger(), \"[CbMoveEndEfector] to move absolute end effector thread destroyed\");\n    }\n  }\n\nprotected:\n  bool moveToAbsolutePose(\n    moveit::planning_interface::MoveGroupInterface & moveGroupInterface,\n    geometry_msgs::msg::PoseStamped & targetObjectPose)\n  {\n    RCLCPP_DEBUG(getLogger(), \"[CbMoveEndEffector] Synchronous sleep of 1 seconds\");\n    rclcpp::sleep_for(500ms);\n\n    // Try to use CpMotionPlanner component (preferred)\n    CpMotionPlanner * motionPlanner = nullptr;\n    this->requiresComponent(\n      motionPlanner, smacc2::ComponentRequirement::SOFT);  // Optional component\n\n    bool success = false;\n    moveit::planning_interface::MoveGroupInterface::Plan computedMotionPlan;\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[CbMoveEndEffector] Target End effector Pose: \" << targetObjectPose);\n\n    if (motionPlanner != nullptr)\n    {\n      // Use component-based motion planner (preferred)\n      RCLCPP_INFO(getLogger(), \"[CbMoveEndEffector] Using CpMotionPlanner component for planning\");\n\n      PlanningOptions options;\n      options.planningTime = 1.0;\n      options.poseReferenceFrame = targetObjectPose.header.frame_id;\n\n      std::optional<std::string> tipLinkOpt;\n      if (!tip_link_.empty())\n      {\n        tipLinkOpt = tip_link_;\n      }\n\n      auto result = motionPlanner->planToPose(targetObjectPose, tipLinkOpt, options);\n\n      success = result.success;\n      if (success)\n      {\n        computedMotionPlan = result.plan;\n        RCLCPP_INFO(getLogger(), \"[CbMoveEndEffector] Planning succeeded (via CpMotionPlanner)\");\n      }\n      else\n      {\n        RCLCPP_WARN(\n          getLogger(), \"[CbMoveEndEffector] Planning failed (via CpMotionPlanner): %s\",\n          result.errorMessage.c_str());\n      }\n    }\n    else\n    {\n      // Fallback to legacy direct API calls\n      RCLCPP_WARN(\n        getLogger(),\n        \"[CbMoveEndEffector] CpMotionPlanner component not available, using legacy planning \"\n        \"(consider adding CpMotionPlanner component)\");\n\n      moveGroupInterface.setPlanningTime(1.0);\n      moveGroupInterface.setPoseTarget(targetObjectPose, tip_link_);\n      moveGroupInterface.setPoseReferenceFrame(targetObjectPose.header.frame_id);\n\n      success =\n        (moveGroupInterface.plan(computedMotionPlan) == moveit::core::MoveItErrorCode::SUCCESS);\n      RCLCPP_INFO(\n        getLogger(), \"[CbMoveEndEffector] Planning %s (legacy mode)\",\n        success ? \"succeeded\" : \"FAILED\");\n    }\n\n    // Execution\n    if (success)\n    {\n      // Try to use CpTrajectoryExecutor component (preferred)\n      CpTrajectoryExecutor * trajectoryExecutor = nullptr;\n      this->requiresComponent(\n        trajectoryExecutor, smacc2::ComponentRequirement::SOFT);  // Optional component\n\n      bool executionSuccess = false;\n\n      if (trajectoryExecutor != nullptr)\n      {\n        // Use component-based trajectory executor (preferred)\n        RCLCPP_INFO(\n          getLogger(), \"[CbMoveEndEffector] Using CpTrajectoryExecutor component for execution\");\n\n        ExecutionOptions execOptions;\n        execOptions.trajectoryName = this->getName();\n\n        auto execResult = trajectoryExecutor->executePlan(computedMotionPlan, execOptions);\n        executionSuccess = execResult.success;\n\n        if (executionSuccess)\n        {\n          RCLCPP_INFO(\n            getLogger(), \"[CbMoveEndEffector] Execution succeeded (via CpTrajectoryExecutor)\");\n        }\n        else\n        {\n          RCLCPP_WARN(\n            getLogger(), \"[CbMoveEndEffector] Execution failed (via CpTrajectoryExecutor): %s\",\n            execResult.errorMessage.c_str());\n        }\n      }\n      else\n      {\n        // Fallback to legacy direct execution\n        RCLCPP_WARN(\n          getLogger(),\n          \"[CbMoveEndEffector] CpTrajectoryExecutor component not available, using legacy \"\n          \"execution \"\n          \"(consider adding CpTrajectoryExecutor component)\");\n\n        auto executionResult = moveGroupInterface.execute(computedMotionPlan);\n        executionSuccess = (executionResult == moveit_msgs::msg::MoveItErrorCodes::SUCCESS);\n\n        RCLCPP_INFO(\n          getLogger(), \"[CbMoveEndEffector] Execution %s (legacy mode)\",\n          executionSuccess ? \"succeeded\" : \"failed\");\n      }\n\n      // Post events\n      if (executionSuccess)\n      {\n        movegroupClient_->postEventMotionExecutionSucceded();\n        this->postSuccessEvent();\n      }\n      else\n      {\n        movegroupClient_->postEventMotionExecutionFailed();\n        this->postFailureEvent();\n      }\n    }\n    else\n    {\n      RCLCPP_INFO(getLogger(), \"[CbMoveEndEffector] planning failed, skipping execution\");\n      movegroupClient_->postEventMotionExecutionFailed();\n      this->postFailureEvent();\n    }\n\n    RCLCPP_DEBUG(getLogger(), \"[CbMoveEndEffector] Synchronous sleep of 1 seconds\");\n    rclcpp::sleep_for(500ms);\n\n    return success;\n  }\n\n  ClMoveit2z * movegroupClient_;\n};\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_move_end_effector_trajectory.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <tf2/transform_datatypes.h>\n#include <tf2_ros/transform_listener.h>\n#include <cl_moveit2z/cl_moveit2z.hpp>\n#include <cl_moveit2z/common.hpp>\n#include <cl_moveit2z/components/cp_joint_space_trajectory_planner.hpp>\n#include <cl_moveit2z/components/cp_tf_listener.hpp>\n#include <cl_moveit2z/components/cp_trajectory_executor.hpp>\n#include <cl_moveit2z/components/cp_trajectory_history.hpp>\n#include <cl_moveit2z/components/cp_trajectory_visualizer.hpp>\n#include <moveit_msgs/srv/get_position_ik.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n#include <visualization_msgs/msg/marker_array.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace cl_moveit2z\n{\ntemplate <typename AsyncCB, typename Orthogonal>\nstruct EvJointDiscontinuity : sc::event<EvJointDiscontinuity<AsyncCB, Orthogonal>>\n{\n  moveit_msgs::msg::RobotTrajectory trajectory;\n};\n\ntemplate <typename AsyncCB, typename Orthogonal>\nstruct EvIncorrectInitialPosition : sc::event<EvIncorrectInitialPosition<AsyncCB, Orthogonal>>\n{\n  moveit_msgs::msg::RobotTrajectory trajectory;\n};\n\nenum class ComputeJointTrajectoryErrorCode\n{\n  SUCCESS,\n  INCORRECT_INITIAL_STATE,\n  JOINT_TRAJECTORY_DISCONTINUITY\n};\n\n// this is a base behavior to define any kind of parameterized family of trajectories or motions\nclass CbMoveEndEffectorTrajectory : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  // std::string tip_link_;\n  std::optional<std::string> group_;\n\n  std::optional<std::string> tipLink_;\n\n  std::optional<bool> allowInitialTrajectoryStateJointDiscontinuity_;\n\n  CbMoveEndEffectorTrajectory(std::optional<std::string> tipLink = std::nullopt) : tipLink_(tipLink)\n  {\n  }\n\n  CbMoveEndEffectorTrajectory(\n    const std::vector<geometry_msgs::msg::PoseStamped> & endEffectorTrajectory,\n    std::optional<std::string> tipLink = std::nullopt)\n  : tipLink_(tipLink), endEffectorTrajectory_(endEffectorTrajectory)\n  {\n  }\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    this->initializeROS();\n\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    postJointDiscontinuityEvent = [this](auto traj)\n    {\n      auto ev = new EvJointDiscontinuity<TSourceObject, TOrthogonal>();\n      ev->trajectory = traj;\n      this->postEvent(ev);\n    };\n\n    postIncorrectInitialStateEvent = [this](auto traj)\n    {\n      auto ev = new EvIncorrectInitialPosition<TSourceObject, TOrthogonal>();\n      ev->trajectory = traj;\n      this->postEvent(ev);\n    };\n\n    postMotionExecutionFailureEvents = [this]\n    {\n      RCLCPP_INFO_STREAM(getLogger(), \"[\" << this->getName() << \"] motion execution failed\");\n      movegroupClient_->postEventMotionExecutionFailed();\n      this->postEvent<EvMoveGroupMotionExecutionFailed<TSourceObject, TOrthogonal>>();\n    };\n  }\n\n  virtual void onEntry() override\n  {\n    this->requiresClient(movegroupClient_);\n\n    // Get optional components for visualization\n    CpTrajectoryVisualizer * trajectoryVisualizer = nullptr;\n    this->requiresComponent(\n      trajectoryVisualizer, smacc2::ComponentRequirement::SOFT);  // Optional component\n\n    RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] Generating end effector trajectory\");\n\n    this->generateTrajectory();\n\n    if (this->endEffectorTrajectory_.size() == 0)\n    {\n      RCLCPP_WARN_STREAM(\n        getLogger(), \"[\" << smacc2::demangleSymbol(typeid(*this).name())\n                         << \"] No points in the trajectory. Skipping behavior.\");\n      return;\n    }\n\n    // Use CpTrajectoryVisualizer if available, otherwise use legacy marker system\n    if (trajectoryVisualizer != nullptr)\n    {\n      RCLCPP_INFO_STREAM(\n        getLogger(),\n        \"[\" << getName() << \"] Setting trajectory visualization using CpTrajectoryVisualizer.\");\n      trajectoryVisualizer->setTrajectory(this->endEffectorTrajectory_, \"trajectory\");\n    }\n    else\n    {\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << getName()\n                         << \"] Creating markers (legacy mode - consider adding \"\n                            \"CpTrajectoryVisualizer component).\");\n      this->createMarkers();\n    }\n\n    moveit_msgs::msg::RobotTrajectory computedTrajectory;\n\n    RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] Computing joint space trajectory.\");\n\n    auto errorcode = computeJointSpaceTrajectory(computedTrajectory);\n\n    bool trajectoryGenerationSuccess = errorcode == ComputeJointTrajectoryErrorCode::SUCCESS;\n\n    CpTrajectoryHistory * trajectoryHistory;\n    this->requiresComponent(trajectoryHistory);\n\n    if (!trajectoryGenerationSuccess)\n    {\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << this->getName() << \"] Incorrect trajectory. Posting failure event.\");\n      if (trajectoryHistory != nullptr)\n      {\n        moveit_msgs::msg::MoveItErrorCodes error;\n        error.val = moveit_msgs::msg::MoveItErrorCodes::NO_IK_SOLUTION;\n        trajectoryHistory->pushTrajectory(this->getName(), computedTrajectory, error);\n      }\n\n      movegroupClient_->postEventMotionExecutionFailed();\n      this->postFailureEvent();\n\n      if (errorcode == ComputeJointTrajectoryErrorCode::JOINT_TRAJECTORY_DISCONTINUITY)\n      {\n        this->postJointDiscontinuityEvent(computedTrajectory);\n      }\n      else if (errorcode == ComputeJointTrajectoryErrorCode::INCORRECT_INITIAL_STATE)\n      {\n        this->postIncorrectInitialStateEvent(computedTrajectory);\n      }\n      return;\n    }\n    else\n    {\n      if (trajectoryHistory != nullptr)\n      {\n        moveit_msgs::msg::MoveItErrorCodes error;\n        error.val = moveit_msgs::msg::MoveItErrorCodes::SUCCESS;\n        trajectoryHistory->pushTrajectory(this->getName(), computedTrajectory, error);\n      }\n\n      this->executeJointSpaceTrajectory(computedTrajectory);\n    }\n\n    // handle finishing events\n  }\n\n  // onExit removed - requiresComponent() during state disposal causes deadlock\n  // Components and markers are automatically cleaned up when state is destroyed\n  // If manual cleanup needed in future, use empty onExit like CbMoveJoints\n  virtual void onExit() override {}\n\nprotected:\n  ComputeJointTrajectoryErrorCode computeJointSpaceTrajectory(\n    moveit_msgs::msg::RobotTrajectory & computedJointTrajectory)\n  {\n    // Try to use CpJointSpaceTrajectoryPlanner component (preferred)\n    CpJointSpaceTrajectoryPlanner * trajectoryPlanner = nullptr;\n    this->requiresComponent(\n      trajectoryPlanner, smacc2::ComponentRequirement::SOFT);  // Optional component\n\n    if (trajectoryPlanner != nullptr)\n    {\n      // Use component-based trajectory planner (preferred)\n      RCLCPP_INFO(\n        getLogger(),\n        \"[CbMoveEndEffectorTrajectory] Using CpJointSpaceTrajectoryPlanner component for IK \"\n        \"trajectory generation\");\n\n      JointTrajectoryOptions options;\n      if (tipLink_ && !tipLink_->empty())\n      {\n        options.tipLink = *tipLink_;\n      }\n      if (allowInitialTrajectoryStateJointDiscontinuity_)\n      {\n        options.allowInitialDiscontinuity = *allowInitialTrajectoryStateJointDiscontinuity_;\n      }\n\n      auto result = trajectoryPlanner->planFromWaypoints(endEffectorTrajectory_, options);\n\n      if (result.success)\n      {\n        computedJointTrajectory = result.trajectory;\n        RCLCPP_INFO(\n          getLogger(),\n          \"[CbMoveEndEffectorTrajectory] IK trajectory generation succeeded (via \"\n          \"CpJointSpaceTrajectoryPlanner)\");\n        return ComputeJointTrajectoryErrorCode::SUCCESS;\n      }\n      else\n      {\n        computedJointTrajectory = result.trajectory;  // Still return partial trajectory\n        RCLCPP_WARN(\n          getLogger(),\n          \"[CbMoveEndEffectorTrajectory] IK trajectory generation failed (via \"\n          \"CpJointSpaceTrajectoryPlanner): %s\",\n          result.errorMessage.c_str());\n\n        // Map error codes\n        switch (result.errorCode)\n        {\n          case JointTrajectoryErrorCode::INCORRECT_INITIAL_STATE:\n            return ComputeJointTrajectoryErrorCode::INCORRECT_INITIAL_STATE;\n          case JointTrajectoryErrorCode::JOINT_TRAJECTORY_DISCONTINUITY:\n            return ComputeJointTrajectoryErrorCode::JOINT_TRAJECTORY_DISCONTINUITY;\n          default:\n            return ComputeJointTrajectoryErrorCode::JOINT_TRAJECTORY_DISCONTINUITY;\n        }\n      }\n    }\n    else\n    {\n      // Fallback to legacy IK trajectory generation\n      RCLCPP_WARN(\n        getLogger(),\n        \"[CbMoveEndEffectorTrajectory] CpJointSpaceTrajectoryPlanner component not available, \"\n        \"using legacy IK trajectory generation (consider adding CpJointSpaceTrajectoryPlanner \"\n        \"component)\");\n\n      // LEGACY IMPLEMENTATION (keep for backward compatibility)\n      RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] getting current state.. waiting\");\n\n      auto currentState = movegroupClient_->moveGroupClientInterface->getCurrentState(100);\n      auto groupname = movegroupClient_->moveGroupClientInterface->getName();\n\n      RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] getting joint names\");\n      auto currentjointnames =\n        currentState->getJointModelGroup(groupname)->getActiveJointModelNames();\n\n      if (!tipLink_ || *tipLink_ == \"\")\n      {\n        tipLink_ = movegroupClient_->moveGroupClientInterface->getEndEffectorLink();\n      }\n\n      std::vector<double> jointPositions;\n      currentState->copyJointGroupPositions(groupname, jointPositions);\n\n      std::vector<std::vector<double>> trajectory;\n      std::vector<rclcpp::Duration> trajectoryTimeStamps;\n\n      trajectory.push_back(jointPositions);\n      trajectoryTimeStamps.push_back(rclcpp::Duration(0s));\n\n      auto & first = endEffectorTrajectory_.front();\n      rclcpp::Time referenceTime(first.header.stamp);\n\n      std::vector<int> discontinuityIndexes;\n\n      int ikAttempts = 4;\n      for (size_t k = 0; k < this->endEffectorTrajectory_.size(); k++)\n      {\n        auto & pose = this->endEffectorTrajectory_[k];\n        auto req = std::make_shared<moveit_msgs::srv::GetPositionIK::Request>();\n\n        req->ik_request.ik_link_name = *tipLink_;\n        req->ik_request.robot_state.joint_state.name = currentjointnames;\n        req->ik_request.robot_state.joint_state.position = jointPositions;\n        req->ik_request.group_name = groupname;\n        req->ik_request.avoid_collisions = true;\n        req->ik_request.pose_stamped = pose;\n\n        RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] IK request: \" << k << \" \" << *req);\n\n        auto resfut = iksrv_->async_send_request(req);\n        auto status = resfut.wait_for(3s);\n\n        if (status == std::future_status::ready)\n        {\n          auto & prevtrajpoint = trajectory.back();\n          auto res = resfut.get();\n\n          std::stringstream ss;\n          for (size_t j = 0; j < res->solution.joint_state.position.size(); j++)\n          {\n            auto & jointname = res->solution.joint_state.name[j];\n            auto it = std::find(currentjointnames.begin(), currentjointnames.end(), jointname);\n            if (it != currentjointnames.end())\n            {\n              int index = std::distance(currentjointnames.begin(), it);\n              jointPositions[index] = res->solution.joint_state.position[j];\n              ss << jointname << \"(\" << index << \"): \" << jointPositions[index] << std::endl;\n            }\n          }\n\n          // Continuity check\n          size_t jointindex = 0;\n          int discontinuityJointIndex = -1;\n          double discontinuityDeltaJointIndex = -1;\n          double deltajoint;\n\n          bool check = k > 0 || !allowInitialTrajectoryStateJointDiscontinuity_ ||\n                       (allowInitialTrajectoryStateJointDiscontinuity_ &&\n                        !(*allowInitialTrajectoryStateJointDiscontinuity_));\n          if (check)\n          {\n            for (jointindex = 0; jointindex < jointPositions.size(); jointindex++)\n            {\n              deltajoint = jointPositions[jointindex] - prevtrajpoint[jointindex];\n              if (fabs(deltajoint) > 0.3)\n              {\n                discontinuityDeltaJointIndex = deltajoint;\n                discontinuityJointIndex = jointindex;\n              }\n            }\n          }\n\n          if (ikAttempts > 0 && discontinuityJointIndex != -1)\n          {\n            k--;\n            ikAttempts--;\n            continue;\n          }\n          else\n          {\n            bool discontinuity = false;\n            if (ikAttempts == 0)\n            {\n              discontinuityIndexes.push_back(k);\n              discontinuity = true;\n            }\n\n            ikAttempts = 4;\n\n            if (discontinuity && discontinuityJointIndex != -1)\n            {\n              std::stringstream ss;\n              ss << \"Traj[\" << k << \"/\" << endEffectorTrajectory_.size() << \"] \"\n                 << currentjointnames[discontinuityJointIndex]\n                 << \" IK discontinuity : \" << discontinuityDeltaJointIndex << std::endl\n                 << \"prev joint value: \" << prevtrajpoint[discontinuityJointIndex] << std::endl\n                 << \"current joint value: \" << jointPositions[discontinuityJointIndex] << std::endl;\n\n              ss << std::endl;\n              for (size_t ji = 0; ji < jointPositions.size(); ji++)\n              {\n                ss << currentjointnames[ji] << \": \" << jointPositions[ji] << std::endl;\n              }\n\n              for (size_t kindex = 0; kindex < trajectory.size(); kindex++)\n              {\n                ss << \"[\" << kindex << \"]: \" << trajectory[kindex][discontinuityJointIndex]\n                   << std::endl;\n              }\n\n              if (k == 0)\n              {\n                ss\n                  << \"This is the first posture of the trajectory. Maybe the robot initial posture \"\n                     \"is \"\n                     \"not coincident to the initial posture of the generated joint trajectory.\"\n                  << std::endl;\n              }\n\n              RCLCPP_ERROR_STREAM(getLogger(), ss.str());\n\n              trajectory.push_back(jointPositions);\n              rclcpp::Duration durationFromStart = rclcpp::Time(pose.header.stamp) - referenceTime;\n              trajectoryTimeStamps.push_back(durationFromStart);\n              continue;\n            }\n            else\n            {\n              trajectory.push_back(jointPositions);\n              rclcpp::Duration durationFromStart = rclcpp::Time(pose.header.stamp) - referenceTime;\n              trajectoryTimeStamps.push_back(durationFromStart);\n\n              RCLCPP_DEBUG_STREAM(getLogger(), \"IK solution: \" << res->solution.joint_state);\n              RCLCPP_DEBUG_STREAM(getLogger(), \"trajpoint: \" << std::endl << ss.str());\n            }\n          }\n        }\n        else\n        {\n          RCLCPP_ERROR_STREAM(getLogger(), \"[\" << getName() << \"] wrong IK call\");\n        }\n      }\n\n      computedJointTrajectory.joint_trajectory.joint_names = currentjointnames;\n      int i = 0;\n      for (auto & p : trajectory)\n      {\n        if (i == 0)  // Skip current state\n        {\n          i++;\n          continue;\n        }\n\n        trajectory_msgs::msg::JointTrajectoryPoint jp;\n        jp.positions = p;\n        jp.time_from_start = trajectoryTimeStamps[i];\n        computedJointTrajectory.joint_trajectory.points.push_back(jp);\n        i++;\n      }\n\n      if (discontinuityIndexes.size())\n      {\n        if (discontinuityIndexes[0] == 0)\n          return ComputeJointTrajectoryErrorCode::INCORRECT_INITIAL_STATE;\n        else\n          return ComputeJointTrajectoryErrorCode::JOINT_TRAJECTORY_DISCONTINUITY;\n      }\n\n      return ComputeJointTrajectoryErrorCode::SUCCESS;\n    }\n  }\n\n  void executeJointSpaceTrajectory(\n    const moveit_msgs::msg::RobotTrajectory & computedJointTrajectory)\n  {\n    RCLCPP_INFO_STREAM(getLogger(), \"[\" << this->getName() << \"] Executing joint trajectory\");\n\n    // Try to use CpTrajectoryExecutor component (preferred)\n    CpTrajectoryExecutor * trajectoryExecutor = nullptr;\n    this->requiresComponent(\n      trajectoryExecutor, smacc2::ComponentRequirement::SOFT);  // Optional component\n\n    bool executionSuccess = false;\n\n    if (trajectoryExecutor != nullptr)\n    {\n      // Use component-based trajectory executor (preferred)\n      RCLCPP_INFO(\n        getLogger(),\n        \"[CbMoveEndEffectorTrajectory] Using CpTrajectoryExecutor component for execution\");\n\n      ExecutionOptions execOptions;\n      execOptions.trajectoryName = this->getName();\n\n      auto execResult = trajectoryExecutor->execute(computedJointTrajectory, execOptions);\n      executionSuccess = execResult.success;\n\n      if (executionSuccess)\n      {\n        RCLCPP_INFO(\n          getLogger(),\n          \"[CbMoveEndEffectorTrajectory] Execution succeeded (via CpTrajectoryExecutor)\");\n      }\n      else\n      {\n        RCLCPP_WARN(\n          getLogger(),\n          \"[CbMoveEndEffectorTrajectory] Execution failed (via CpTrajectoryExecutor): %s\",\n          execResult.errorMessage.c_str());\n      }\n    }\n    else\n    {\n      // Fallback to legacy direct execution\n      RCLCPP_WARN(\n        getLogger(),\n        \"[CbMoveEndEffectorTrajectory] CpTrajectoryExecutor component not available, using legacy \"\n        \"execution (consider adding CpTrajectoryExecutor component)\");\n\n      auto executionResult =\n        this->movegroupClient_->moveGroupClientInterface->execute(computedJointTrajectory);\n      executionSuccess = (executionResult == moveit_msgs::msg::MoveItErrorCodes::SUCCESS);\n\n      RCLCPP_INFO(\n        getLogger(), \"[CbMoveEndEffectorTrajectory] Execution %s (legacy mode)\",\n        executionSuccess ? \"succeeded\" : \"failed\");\n    }\n\n    // Post events\n    if (executionSuccess)\n    {\n      RCLCPP_INFO_STREAM(getLogger(), \"[\" << this->getName() << \"] motion execution succeeded\");\n      movegroupClient_->postEventMotionExecutionSucceded();\n      this->postSuccessEvent();\n    }\n    else\n    {\n      this->postMotionExecutionFailureEvents();\n      this->postFailureEvent();\n    }\n  }\n\n  virtual void generateTrajectory()\n  {\n    // bypass current trajectory, overridden in derived classes\n    // this->endEffectorTrajectory_ = ...\n  }\n\n  virtual void createMarkers()\n  {\n    tf2::Transform localdirection;\n    localdirection.setIdentity();\n    localdirection.setOrigin(tf2::Vector3(0.05, 0, 0));\n    auto frameid = this->endEffectorTrajectory_.front().header.frame_id;\n\n    for (auto & pose : this->endEffectorTrajectory_)\n    {\n      visualization_msgs::msg::Marker marker;\n      marker.header.frame_id = frameid;\n      marker.header.stamp = getNode()->now();\n      marker.ns = \"trajectory\";\n      marker.id = this->beahiorMarkers_.markers.size();\n      marker.type = visualization_msgs::msg::Marker::ARROW;\n      marker.action = visualization_msgs::msg::Marker::ADD;\n      marker.scale.x = 0.005;\n      marker.scale.y = 0.01;\n      marker.scale.z = 0.01;\n      marker.color.a = 0.8;\n      marker.color.r = 1.0;\n      marker.color.g = 0;\n      marker.color.b = 0;\n\n      geometry_msgs::msg::Point start, end;\n      start.x = 0;\n      start.y = 0;\n      start.z = 0;\n\n      tf2::Transform basetransform;\n      tf2::fromMsg(pose.pose, basetransform);\n      // tf2::Transform endarrow = localdirection * basetransform;\n\n      end.x = localdirection.getOrigin().x();\n      end.y = localdirection.getOrigin().y();\n      end.z = localdirection.getOrigin().z();\n\n      marker.pose.position = pose.pose.position;\n      marker.pose.orientation = pose.pose.orientation;\n      marker.points.push_back(start);\n      marker.points.push_back(end);\n\n      beahiorMarkers_.markers.push_back(marker);\n    }\n  }\n\n  std::vector<geometry_msgs::msg::PoseStamped> endEffectorTrajectory_;\n\n  ClMoveit2z * movegroupClient_ = nullptr;\n\n  visualization_msgs::msg::MarkerArray beahiorMarkers_;\n\n  void getCurrentEndEffectorPose(\n    std::string globalFrame, tf2::Stamped<tf2::Transform> & currentEndEffectorTransform)\n  {\n    // Use CpTfListener component for transform lookups\n    CpTfListener * tfListener = nullptr;\n    this->requiresComponent(tfListener, smacc2::ComponentRequirement::SOFT);  // Optional component\n\n    try\n    {\n      if (!tipLink_ || *tipLink_ == \"\")\n      {\n        tipLink_ = this->movegroupClient_->moveGroupClientInterface->getEndEffectorLink();\n      }\n\n      if (tfListener != nullptr)\n      {\n        // Use component-based TF listener (preferred)\n        auto transformOpt = tfListener->lookupTransform(globalFrame, *tipLink_, rclcpp::Time(0));\n        if (transformOpt)\n        {\n          tf2::fromMsg(transformOpt.value(), currentEndEffectorTransform);\n        }\n        else\n        {\n          RCLCPP_ERROR_STREAM(\n            getLogger(), \"[\" << getName() << \"] Failed to lookup transform from \" << *tipLink_\n                             << \" to \" << globalFrame);\n        }\n      }\n      else\n      {\n        // Fallback to legacy TF2 usage if component not available\n        RCLCPP_WARN_STREAM(\n          getLogger(), \"[\" << getName()\n                           << \"] CpTfListener component not available, using legacy TF2 (consider \"\n                              \"adding CpTfListener component)\");\n        tf2_ros::Buffer tfBuffer(getNode()->get_clock());\n        tf2_ros::TransformListener tfListenerLegacy(tfBuffer);\n\n        tf2::fromMsg(\n          tfBuffer.lookupTransform(globalFrame, *tipLink_, rclcpp::Time(0), rclcpp::Duration(10s)),\n          currentEndEffectorTransform);\n      }\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_ERROR_STREAM(\n        getLogger(), \"[\" << getName() << \"] Exception in getCurrentEndEffectorPose: \" << e.what());\n    }\n  }\n\nprivate:\n  void initializeROS()\n  {\n    RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] initializing ros\");\n\n    auto nh = this->getNode();\n\n    // Only create marker publisher for legacy mode (when CpTrajectoryVisualizer is not used)\n    markersPub_ = nh->create_publisher<visualization_msgs::msg::MarkerArray>(\n      \"trajectory_markers\", rclcpp::QoS(1));\n\n    iksrv_ = nh->create_client<moveit_msgs::srv::GetPositionIK>(\"/compute_ik\");\n  }\n\n  rclcpp::Publisher<visualization_msgs::msg::MarkerArray>::SharedPtr markersPub_;\n\n  rclcpp::Client<moveit_msgs::srv::GetPositionIK>::SharedPtr iksrv_;\n\n  std::mutex m_mutex_;\n\n  std::function<void(moveit_msgs::msg::RobotTrajectory &)> postJointDiscontinuityEvent;\n  std::function<void(moveit_msgs::msg::RobotTrajectory &)> postIncorrectInitialStateEvent;\n\n  std::function<void()> postMotionExecutionFailureEvents;\n\n  bool autocleanmarkers = false;\n};\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_move_joints.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <algorithm>\n#include <future>\n#include <map>\n#include <sstream>\n#include <string>\n\n#include <cl_moveit2z/cl_moveit2z.hpp>\n#include <cl_moveit2z/components/cp_motion_planner.hpp>\n#include <cl_moveit2z/components/cp_trajectory_executor.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_moveit2z\n{\nclass CbMoveJoints : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  std::optional<double> scalingFactor_;\n  std::map<std::string, double> jointValueTarget_;\n  std::optional<std::string> group_;\n\n  CbMoveJoints() {}\n\n  CbMoveJoints(const std::map<std::string, double> & jointValueTarget)\n  : jointValueTarget_(jointValueTarget)\n  {\n  }\n\n  virtual void onEntry() override\n  {\n    this->requiresClient(movegroupClient_);\n\n    if (this->group_)\n    {\n      moveit::planning_interface::MoveGroupInterface move_group(\n        getNode(), moveit::planning_interface::MoveGroupInterface::Options(*(this->group_)));\n      this->moveJoints(move_group);\n    }\n    else\n    {\n      this->moveJoints(*movegroupClient_->moveGroupClientInterface);\n    }\n  }\n\n  virtual void onExit() override {}\n\nprotected:\n  static std::string currentJointStatesToString(\n    moveit::planning_interface::MoveGroupInterface & moveGroupInterface,\n    std::map<std::string, double> & targetJoints)\n  {\n    auto state = moveGroupInterface.getCurrentState();\n\n    if (state == nullptr) return std::string();\n\n    auto vnames = state->getVariableNames();\n\n    std::stringstream ss;\n\n    for (auto & tgj : targetJoints)\n    {\n      auto it = std::find(vnames.begin(), vnames.end(), tgj.first);\n      auto index = std::distance(vnames.begin(), it);\n\n      ss << tgj.first << \":\" << state->getVariablePosition(index) << std::endl;\n    }\n\n    return ss.str();\n  }\n\n  void moveJoints(moveit::planning_interface::MoveGroupInterface & moveGroupInterface)\n  {\n    if (jointValueTarget_.size() == 0)\n    {\n      RCLCPP_WARN(getLogger(), \"[CbMoveJoints] No joint value specified. Skipping planning call.\");\n      movegroupClient_->postEventMotionExecutionFailed();\n      this->postFailureEvent();\n      return;\n    }\n\n    // Try to use CpMotionPlanner component (preferred)\n    CpMotionPlanner * motionPlanner = nullptr;\n    this->requiresComponent(\n      motionPlanner, smacc2::ComponentRequirement::SOFT);  // Optional component\n\n    bool success = false;\n    moveit::planning_interface::MoveGroupInterface::Plan computedMotionPlan;\n\n    if (motionPlanner != nullptr)\n    {\n      // Use component-based motion planner (preferred)\n      RCLCPP_INFO(getLogger(), \"[CbMoveJoints] Using CpMotionPlanner component for joint planning\");\n\n      PlanningOptions options;\n      if (scalingFactor_)\n      {\n        options.maxVelocityScaling = *scalingFactor_;\n      }\n\n      auto result = motionPlanner->planToJointTarget(jointValueTarget_, options);\n\n      success = result.success;\n      if (success)\n      {\n        computedMotionPlan = result.plan;\n        RCLCPP_INFO(getLogger(), \"[CbMoveJoints] Planning succeeded (via CpMotionPlanner)\");\n      }\n      else\n      {\n        RCLCPP_WARN(\n          getLogger(), \"[CbMoveJoints] Planning failed (via CpMotionPlanner): %s\",\n          result.errorMessage.c_str());\n      }\n    }\n    else\n    {\n      // Fallback to legacy direct API calls\n      RCLCPP_WARN(\n        getLogger(),\n        \"[CbMoveJoints] CpMotionPlanner component not available, using legacy planning \"\n        \"(consider adding CpMotionPlanner component)\");\n\n      if (scalingFactor_) moveGroupInterface.setMaxVelocityScalingFactor(*scalingFactor_);\n\n      moveGroupInterface.setJointValueTarget(jointValueTarget_);\n\n      auto result = moveGroupInterface.plan(computedMotionPlan);\n\n      success = (result == moveit::core::MoveItErrorCode::SUCCESS);\n\n      RCLCPP_INFO(\n        getLogger(), \"[CbMoveJoints] Planning %s (legacy mode, code: %d)\",\n        success ? \"SUCCESS\" : \"FAILED\", result.val);\n    }\n\n    // Execution\n    if (success)\n    {\n      // Try to use CpTrajectoryExecutor component (preferred)\n      CpTrajectoryExecutor * trajectoryExecutor = nullptr;\n      this->requiresComponent(\n        trajectoryExecutor, smacc2::ComponentRequirement::SOFT);  // Optional component\n\n      bool executionSuccess = false;\n\n      if (trajectoryExecutor != nullptr)\n      {\n        // Use component-based trajectory executor (preferred)\n        RCLCPP_INFO(\n          getLogger(), \"[CbMoveJoints] Using CpTrajectoryExecutor component for execution\");\n\n        ExecutionOptions execOptions;\n        execOptions.trajectoryName = this->getName();\n        if (scalingFactor_)\n        {\n          execOptions.maxVelocityScaling = *scalingFactor_;\n        }\n\n        auto execResult = trajectoryExecutor->executePlan(computedMotionPlan, execOptions);\n        executionSuccess = execResult.success;\n\n        if (executionSuccess)\n        {\n          RCLCPP_INFO(getLogger(), \"[CbMoveJoints] Execution succeeded (via CpTrajectoryExecutor)\");\n        }\n        else\n        {\n          RCLCPP_WARN(\n            getLogger(), \"[CbMoveJoints] Execution failed (via CpTrajectoryExecutor): %s\",\n            execResult.errorMessage.c_str());\n        }\n      }\n      else\n      {\n        // Fallback to legacy direct execution\n        RCLCPP_WARN(\n          getLogger(),\n          \"[CbMoveJoints] CpTrajectoryExecutor component not available, using legacy execution \"\n          \"(consider adding CpTrajectoryExecutor component)\");\n\n        auto executionResult = moveGroupInterface.execute(computedMotionPlan);\n        executionSuccess = (executionResult == moveit_msgs::msg::MoveItErrorCodes::SUCCESS);\n\n        RCLCPP_INFO(\n          getLogger(), \"[CbMoveJoints] Execution %s (legacy mode)\",\n          executionSuccess ? \"succeeded\" : \"failed\");\n      }\n\n      // Post events\n      if (executionSuccess)\n      {\n        RCLCPP_INFO_STREAM(\n          getLogger(),\n          \"[\" << this->getName() << \"] motion execution succeeded. Throwing success event.\");\n        movegroupClient_->postEventMotionExecutionSucceded();\n        this->postSuccessEvent();\n      }\n      else\n      {\n        RCLCPP_WARN_STREAM(\n          getLogger(), \"[\" << this->getName() << \"] motion execution failed. Throwing fail event.\");\n        movegroupClient_->postEventMotionExecutionFailed();\n        this->postFailureEvent();\n      }\n    }\n    else\n    {\n      auto statestr = currentJointStatesToString(moveGroupInterface, jointValueTarget_);\n      RCLCPP_WARN_STREAM(\n        getLogger(), \"[\" << this->getName() << \"] planning failed. Throwing fail event.\"\n                         << std::endl\n                         << statestr);\n      movegroupClient_->postEventMotionExecutionFailed();\n      this->postFailureEvent();\n    }\n  }\n\n  ClMoveit2z * movegroupClient_;\n};\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_move_known_state.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <yaml-cpp/yaml.h>\n#include <ament_index_cpp/get_package_share_directory.hpp>\n#include <filesystem>\n#include <fstream>\n#include <map>\n#include <string>\n#include \"cb_move_joints.hpp\"\n\nnamespace cl_moveit2z\n{\nclass CbMoveKnownState : public CbMoveJoints\n{\npublic:\n  CbMoveKnownState(std::string pkg, std::string config_path) : pkg_(pkg), config_path_(config_path)\n  {\n  }\n\n  virtual ~CbMoveKnownState() {}\n\n  void onEntry() override\n  {\n    jointValueTarget_ = loadJointStatesFromFile(pkg_, config_path_);\n    CbMoveJoints::onEntry();\n  }\n\nprivate:\n#define HAVE_NEW_YAMLCPP\n  std::map<std::string, double> loadJointStatesFromFile(std::string pkg, std::string filepath)\n  {\n    //auto pkgpath = ros::package::getPath(pkg);\n    std::string pkgpath = ament_index_cpp::get_package_share_directory(pkg);\n\n    std::map<std::string, double> jointStates;\n\n    if (pkgpath == \"\")\n    {\n      RCLCPP_ERROR_STREAM(\n        getLogger(), \"[\" << getName() << \"] package not found for the known poses file: \" << pkg\n                         << std::endl\n                         << \" [IGNORING BEHAVIOR]\");\n      return jointStates;\n    }\n\n    filepath = pkgpath + \"/\" + filepath;\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << getName() << \"] Opening file with joint known state: \" << filepath);\n\n    if (std::filesystem::exists(filepath))\n    {\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << getName() << \"] known state file exists: \" << filepath);\n    }\n    else\n    {\n      RCLCPP_ERROR_STREAM(\n        getLogger(), \"[\" << getName() << \"] known state file does not exists: \" << filepath);\n    }\n\n    std::ifstream ifs(filepath.c_str(), std::ifstream::in);\n    if (ifs.good() == false)\n    {\n      RCLCPP_ERROR_STREAM(\n        getLogger(),\n        \"[\" << getName() << \"] Error opening file with joint known states: \" << filepath);\n      throw std::string(\"joint state files not found\");\n    }\n\n    try\n    {\n#ifdef HAVE_NEW_YAMLCPP\n      YAML::Node node = YAML::Load(ifs);\n#else\n      YAML::Parser parser(ifs);\n      parser.GetNextDocument(node);\n#endif\n\n#ifdef HAVE_NEW_YAMLCPP\n      const YAML::Node & wp_node_tmp = node[\"joint_states\"];\n      const YAML::Node * wp_node = wp_node_tmp ? &wp_node_tmp : NULL;\n#else\n      const YAML::Node * wp_node = node.FindValue(\"waypoints\");\n#endif\n\n      if (wp_node != NULL)\n      {\n        try\n        {\n          for (YAML::const_iterator it = wp_node->begin(); it != wp_node->end(); ++it)\n          {\n            std::string key = it->first.as<std::string>();\n            double value = it->second.as<double>();\n            RCLCPP_DEBUG_STREAM(getLogger(), \" joint - \" << key << \": \" << value);\n            jointStates[key] = value;\n          }\n\n          return jointStates;\n        }\n        catch (std::exception & ex)\n        {\n          RCLCPP_ERROR(getLogger(), \"trying to convert to map, failed, errormsg: %s\", ex.what());\n        }\n\n        RCLCPP_INFO_STREAM(getLogger(), \"Parsed \" << jointStates.size() << \" joint entries.\");\n      }\n      else\n      {\n        RCLCPP_WARN_STREAM(getLogger(), \"Couldn't find any jointStates in the provided yaml file.\");\n      }\n    }\n    catch (const YAML::ParserException & ex)\n    {\n      RCLCPP_ERROR_STREAM(\n        getLogger(), \"Error loading the Waypoints YAML file. Incorrect syntax: \" << ex.what());\n    }\n    return jointStates;\n  }\n\n  std::string pkg_;\n  std::string config_path_;\n};\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors/cb_undo_last_trajectory.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <cl_moveit2z/client_behaviors/cb_move_end_effector_trajectory.hpp>\n#include <cl_moveit2z/components/cp_trajectory_history.hpp>\n\nnamespace cl_moveit2z\n{\nclass CbUndoLastTrajectory : public CbMoveEndEffectorTrajectory\n{\npublic:\n  CbUndoLastTrajectory() {}\n\n  CbUndoLastTrajectory(int backIndex) : backIndex_(backIndex) {}\n\n  virtual ~CbUndoLastTrajectory() {}\n\n  virtual void onEntry() override\n  {\n    CpTrajectoryHistory * trajectoryHistory;\n    this->requiresComponent(trajectoryHistory);\n    this->requiresClient(movegroupClient_);\n\n    if (trajectoryHistory->getLastTrajectory(backIndex_, trajectory))\n    {\n      RCLCPP_WARN_STREAM(\n        getLogger(), \"[\" << getName() << \"] reversing last trajectory [\" << backIndex_ << \"]\");\n\n      auto initialTime = trajectory.joint_trajectory.points.back().time_from_start;\n\n      reversed = trajectory;\n\n      std::reverse(\n        reversed.joint_trajectory.points.begin(), reversed.joint_trajectory.points.end());\n\n      for (auto & jp : reversed.joint_trajectory.points)\n      {\n        jp.time_from_start = rclcpp::Duration(initialTime) - rclcpp::Duration(jp.time_from_start);\n      }\n\n      this->executeJointSpaceTrajectory(reversed);\n    }\n    else\n    {\n      RCLCPP_WARN_STREAM(\n        getLogger(), \"[\" << getName() << \"] could not undo last trajectory, trajectory not found.\");\n    }\n  }\n\n  virtual void generateTrajectory() {}\n\nprivate:\n  int backIndex_ = -1;\n\n  moveit_msgs::msg::RobotTrajectory trajectory;\n  moveit_msgs::msg::RobotTrajectory reversed;\n};\n\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/client_behaviors.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n#pragma once\n\n// BASIC MANIPULATION BEHAVIORSz\n#include \"client_behaviors/cb_move_end_effector.hpp\"\n#include \"client_behaviors/cb_move_joints.hpp\"\n#include \"client_behaviors/cb_move_known_state.hpp\"\n\n// ADVANCED MANIPULATION BEHAVIORS\n#include \"client_behaviors/cb_circular_pivot_motion.hpp\"\n#include \"client_behaviors/cb_end_effector_rotate.hpp\"\n#include \"client_behaviors/cb_move_cartesian_relative2.hpp\"\n#include \"client_behaviors/cb_move_end_effector_trajectory.hpp\"\n\n// HISTORY BASED BEHAVIRORS\n#include \"client_behaviors/cb_undo_last_trajectory.hpp\"\n\n// GRASPING BEHAVIORS\n#include \"client_behaviors/cb_attach_object.hpp\"\n#include \"client_behaviors/cb_detach_object.hpp\"\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/common.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <tf2/utils.h>\n#include <geometry_msgs/msg/quaternion.hpp>\n#include <geometry_msgs/msg/quaternion_stamped.hpp>\n#include <moveit_msgs/srv/get_position_ik.hpp>\n\n// All stream operators are now inline for header-only implementation\n// CRITICAL: Order matters! Primitive types first, then compound types that use them\n\n// Primitive geometry types (no dependencies)\ninline std::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Vector3 & msg)\n{\n  return out << \"[ \" << msg.x << \" \" << msg.y << \" \" << msg.z << \"]\";\n}\n\ninline std::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Point & msg)\n{\n  return out << \"[ \" << msg.x << \" \" << msg.y << \" \" << msg.z << \"]\";\n}\n\ninline std::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Quaternion & msg)\n{\n  return out << \" Quaternion[\" << msg.x << \" , \" << msg.y << \" , \" << msg.z << \", w:\" << msg.w;\n}\n\n// Compound types (depend on primitive types above)\ninline std::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Transform & msg)\n{\n  return out << \"Translation[\" << msg.translation << \"], Rotation[\" << msg.rotation << \"]\";\n}\n\ninline std::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Pose & msg)\n{\n  return out << \"Position[\" << msg.position << \"], Orientation[\" << msg.orientation << \"]\";\n}\n\ninline std::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::PoseStamped & msg)\n{\n  return out << \"[serialization geometry_msgs::msg::PoseStamped] frame_id: \" << msg.header.frame_id\n             << \", pose: \" << msg.pose;\n}\n\ninline std::ostream & operator<<(\n  std::ostream & out, const moveit_msgs::srv::GetPositionIK::Request & msg)\n{\n  return out << \"[moveit_msgs::srv::GetPositionIK::Request] position[\"\n             << msg.ik_request.pose_stamped << \"]\";\n}\n\ninline std::ostream & operator<<(std::ostream & out, const sensor_msgs::msg::JointState & /*msg*/)\n{\n  return out << \"[sensor_msgs::msg::JointState]\";\n}\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_grasping_objects.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <map>\n#include <moveit_msgs/msg/collision_object.hpp>\n#include <smacc2/component.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_moveit2z\n{\nclass CpGraspingComponent : public smacc2::ISmaccComponent\n{\nprivate:\n  std::map<std::string, moveit_msgs::msg::CollisionObject> graspingObjects;\n\npublic:\n  std::vector<std::string> fingerTipNames;\n  std::string gripperLink_ = \"gripper_link\";\n\n  std::optional<std::string> currentAttachedObjectName;\n\n  inline bool getGraspingObject(std::string name, moveit_msgs::msg::CollisionObject & object)\n  {\n    if (this->graspingObjects.count(name))\n    {\n      object = this->graspingObjects[name];\n      return true;\n    }\n    else\n    {\n      return false;\n    }\n  }\n\n  inline void createGraspableBox(\n    std::string frameid, float x, float y, float z, float xl, float yl, float zl)\n  {\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << getName() << \"] creating grasping object in planning scene: \" << frameid);\n    moveit_msgs::msg::CollisionObject collision;\n    auto boxname = frameid;\n    ;\n    collision.id = boxname;\n    collision.header.frame_id = frameid;\n\n    collision.primitives.resize(1);\n    collision.primitives[0].type = collision.primitives[0].BOX;\n    collision.primitives[0].dimensions.resize(3);\n\n    collision.primitives[0].dimensions[0] = xl;\n    collision.primitives[0].dimensions[1] = yl;\n    collision.primitives[0].dimensions[2] = zl;\n\n    collision.primitive_poses.resize(1);\n    collision.primitive_poses[0].position.x = x;\n    collision.primitive_poses[0].position.y = y;\n    collision.primitive_poses[0].position.z = z;\n    collision.primitive_poses[0].orientation.w = 1.0;\n\n    graspingObjects[boxname] = collision;\n  }\n};\n\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_joint_space_trajectory_planner.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/component.hpp>\n\n#include <cl_moveit2z/cl_moveit2z.hpp>\n\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include <moveit_msgs/msg/robot_trajectory.hpp>\n#include <moveit_msgs/srv/get_position_ik.hpp>\n\n#include <chrono>\n#include <optional>\n#include <string>\n#include <vector>\n\nusing namespace std::chrono_literals;\n\nnamespace cl_moveit2z\n{\n/**\n * @brief Error codes for joint space trajectory computation\n */\nenum class JointTrajectoryErrorCode\n{\n  SUCCESS,\n  INCORRECT_INITIAL_STATE,\n  JOINT_TRAJECTORY_DISCONTINUITY,\n  IK_SOLUTION_FAILED,\n  EMPTY_WAYPOINT_LIST\n};\n\n/**\n * @brief Configuration options for joint space trajectory planning\n */\nstruct JointTrajectoryOptions\n{\n  std::optional<std::string> tipLink;\n  std::optional<std::string> groupName;\n  bool allowInitialDiscontinuity = false;\n  double maxJointDiscontinuity = 0.3;  // radians (~17 degrees)\n  int ikAttempts = 4;\n  bool avoidCollisions = true;\n  std::chrono::seconds ikTimeout = 3s;\n};\n\n/**\n * @brief Result of a joint space trajectory planning operation\n */\nstruct JointTrajectoryResult\n{\n  bool success;\n  JointTrajectoryErrorCode errorCode;\n  moveit_msgs::msg::RobotTrajectory trajectory;\n  std::string errorMessage;\n  std::vector<int> discontinuityIndexes;\n\n  JointTrajectoryResult()\n  : success(false), errorCode(JointTrajectoryErrorCode::IK_SOLUTION_FAILED), errorMessage(\"\")\n  {\n  }\n};\n\n/**\n * @brief Component for joint space trajectory generation from Cartesian waypoints\n *\n * This component centralizes IK-based trajectory generation:\n * - Computes IK solutions for Cartesian waypoint sequences\n * - Validates trajectory continuity\n * - Detects and reports joint discontinuities\n * - Handles initial state validation\n *\n * Pattern: Trajectory planner with IK service integration\n */\nclass CpJointSpaceTrajectoryPlanner : public smacc2::ISmaccComponent\n{\npublic:\n  CpJointSpaceTrajectoryPlanner() = default;\n  virtual ~CpJointSpaceTrajectoryPlanner() = default;\n\n  /**\n   * @brief Initialize the component and create IK service client\n   */\n  inline void onInitialize() override\n  {\n    this->requiresClient(moveit2zClient_);\n\n    // Create IK service client\n    ikClient_ = getNode()->create_client<moveit_msgs::srv::GetPositionIK>(\"/compute_ik\");\n\n    RCLCPP_INFO(getLogger(), \"[CpJointSpaceTrajectoryPlanner] Component initialized\");\n  }\n\n  /**\n   * @brief Compute joint space trajectory from Cartesian waypoints\n   *\n   * @param waypoints Vector of Cartesian poses to follow\n   * @param options Planning configuration options\n   * @return JointTrajectoryResult with success status and computed trajectory\n   */\n  inline JointTrajectoryResult planFromWaypoints(\n    const std::vector<geometry_msgs::msg::PoseStamped> & waypoints,\n    const JointTrajectoryOptions & options = {})\n  {\n    JointTrajectoryResult result;\n\n    if (waypoints.empty())\n    {\n      result.errorCode = JointTrajectoryErrorCode::EMPTY_WAYPOINT_LIST;\n      result.errorMessage = \"No waypoints provided\";\n      RCLCPP_WARN(getLogger(), \"[CpJointSpaceTrajectoryPlanner] %s\", result.errorMessage.c_str());\n      return result;\n    }\n\n    if (!moveit2zClient_)\n    {\n      result.errorMessage = \"ClMoveit2z client not available\";\n      RCLCPP_ERROR(getLogger(), \"[CpJointSpaceTrajectoryPlanner] %s\", result.errorMessage.c_str());\n      return result;\n    }\n\n    try\n    {\n      auto & moveGroup = moveit2zClient_->moveGroupClientInterface;\n\n      // Get current robot state\n      RCLCPP_INFO(\n        getLogger(),\n        \"[CpJointSpaceTrajectoryPlanner] Getting current state for trajectory planning\");\n      auto currentState = moveGroup->getCurrentState(100);\n      if (!currentState)\n      {\n        result.errorMessage = \"Failed to get current robot state\";\n        RCLCPP_ERROR(\n          getLogger(), \"[CpJointSpaceTrajectoryPlanner] %s\", result.errorMessage.c_str());\n        return result;\n      }\n\n      // Determine group name and tip link\n      std::string groupName = options.groupName.value_or(moveGroup->getName());\n      std::string tipLink = options.tipLink.value_or(moveGroup->getEndEffectorLink());\n\n      RCLCPP_INFO(\n        getLogger(), \"[CpJointSpaceTrajectoryPlanner] Planning for group '%s' with tip link '%s'\",\n        groupName.c_str(), tipLink.c_str());\n\n      // Get joint names\n      auto jointNames = currentState->getJointModelGroup(groupName)->getActiveJointModelNames();\n\n      // Initialize trajectory with current state\n      std::vector<double> jointPositions;\n      currentState->copyJointGroupPositions(groupName, jointPositions);\n\n      std::vector<std::vector<double>> trajectory;\n      std::vector<rclcpp::Duration> trajectoryTimeStamps;\n\n      trajectory.push_back(jointPositions);\n      trajectoryTimeStamps.push_back(rclcpp::Duration(0s));\n\n      // Reference time for trajectory timestamps\n      auto & first = waypoints.front();\n      rclcpp::Time referenceTime(first.header.stamp);\n\n      // Compute IK for each waypoint\n      int ikAttemptsRemaining = options.ikAttempts;\n      for (size_t k = 0; k < waypoints.size(); k++)\n      {\n        auto & pose = waypoints[k];\n\n        // Create IK request\n        auto req = std::make_shared<moveit_msgs::srv::GetPositionIK::Request>();\n        req->ik_request.ik_link_name = tipLink;\n        req->ik_request.robot_state.joint_state.name = jointNames;\n        req->ik_request.robot_state.joint_state.position = jointPositions;\n        req->ik_request.group_name = groupName;\n        req->ik_request.avoid_collisions = options.avoidCollisions;\n        req->ik_request.pose_stamped = pose;\n\n        RCLCPP_DEBUG(\n          getLogger(), \"[CpJointSpaceTrajectoryPlanner] Computing IK for waypoint %lu/%lu\", k + 1,\n          waypoints.size());\n\n        // Call IK service\n        auto resFuture = ikClient_->async_send_request(req);\n        auto status = resFuture.wait_for(options.ikTimeout);\n\n        if (status != std::future_status::ready)\n        {\n          result.errorMessage = \"IK service timeout at waypoint \" + std::to_string(k);\n          RCLCPP_ERROR(\n            getLogger(), \"[CpJointSpaceTrajectoryPlanner] %s\", result.errorMessage.c_str());\n          result.errorCode = JointTrajectoryErrorCode::IK_SOLUTION_FAILED;\n          return result;\n        }\n\n        auto res = resFuture.get();\n        auto & prevTrajPoint = trajectory.back();\n\n        // Extract joint positions from IK solution\n        for (size_t j = 0; j < res->solution.joint_state.position.size(); j++)\n        {\n          auto & jointName = res->solution.joint_state.name[j];\n          auto it = std::find(jointNames.begin(), jointNames.end(), jointName);\n          if (it != jointNames.end())\n          {\n            int index = std::distance(jointNames.begin(), it);\n            jointPositions[index] = res->solution.joint_state.position[j];\n          }\n        }\n\n        // Continuity check\n        bool shouldCheck = k > 0 || !options.allowInitialDiscontinuity;\n        int discontinuityJointIndex = -1;\n        double discontinuityDelta = -1;\n\n        if (shouldCheck)\n        {\n          for (size_t jointIndex = 0; jointIndex < jointPositions.size(); jointIndex++)\n          {\n            double deltaJoint = jointPositions[jointIndex] - prevTrajPoint[jointIndex];\n            if (fabs(deltaJoint) > options.maxJointDiscontinuity)\n            {\n              discontinuityDelta = deltaJoint;\n              discontinuityJointIndex = jointIndex;\n              break;\n            }\n          }\n        }\n\n        // Handle discontinuity\n        if (ikAttemptsRemaining > 0 && discontinuityJointIndex != -1)\n        {\n          // Retry IK\n          k--;\n          ikAttemptsRemaining--;\n          RCLCPP_WARN(\n            getLogger(),\n            \"[CpJointSpaceTrajectoryPlanner] IK discontinuity detected, retrying (%d attempts \"\n            \"remaining)\",\n            ikAttemptsRemaining);\n          continue;\n        }\n        else\n        {\n          // Record discontinuity or accept trajectory point\n          if (ikAttemptsRemaining == 0 && discontinuityJointIndex != -1)\n          {\n            result.discontinuityIndexes.push_back(k);\n\n            RCLCPP_ERROR(\n              getLogger(),\n              \"[CpJointSpaceTrajectoryPlanner] Joint discontinuity at waypoint %lu: joint '%s' \"\n              \"delta=%.3f rad\",\n              k, jointNames[discontinuityJointIndex].c_str(), discontinuityDelta);\n\n            if (k == 0)\n            {\n              RCLCPP_ERROR(\n                getLogger(),\n                \"[CpJointSpaceTrajectoryPlanner] Initial posture discontinuity detected\");\n            }\n          }\n\n          // Reset retry counter\n          ikAttemptsRemaining = options.ikAttempts;\n\n          // Add point to trajectory\n          trajectory.push_back(jointPositions);\n          rclcpp::Duration durationFromStart = rclcpp::Time(pose.header.stamp) - referenceTime;\n          trajectoryTimeStamps.push_back(durationFromStart);\n        }\n      }\n\n      // Build RobotTrajectory message\n      result.trajectory.joint_trajectory.joint_names = jointNames;\n\n      // Skip first point (current state) to avoid discontinuity in some behaviors\n      for (size_t i = 1; i < trajectory.size(); i++)\n      {\n        trajectory_msgs::msg::JointTrajectoryPoint jp;\n        jp.positions = trajectory[i];\n        jp.time_from_start = trajectoryTimeStamps[i];\n        result.trajectory.joint_trajectory.points.push_back(jp);\n      }\n\n      // Determine success\n      if (!result.discontinuityIndexes.empty())\n      {\n        if (result.discontinuityIndexes[0] == 0)\n        {\n          result.errorCode = JointTrajectoryErrorCode::INCORRECT_INITIAL_STATE;\n          result.errorMessage = \"Incorrect initial state\";\n        }\n        else\n        {\n          result.errorCode = JointTrajectoryErrorCode::JOINT_TRAJECTORY_DISCONTINUITY;\n          result.errorMessage = \"Joint trajectory discontinuity detected\";\n        }\n        result.success = false;\n        RCLCPP_WARN(getLogger(), \"[CpJointSpaceTrajectoryPlanner] %s\", result.errorMessage.c_str());\n      }\n      else\n      {\n        result.success = true;\n        result.errorCode = JointTrajectoryErrorCode::SUCCESS;\n        RCLCPP_INFO(\n          getLogger(),\n          \"[CpJointSpaceTrajectoryPlanner] Successfully computed trajectory with %lu points\",\n          result.trajectory.joint_trajectory.points.size());\n      }\n    }\n    catch (const std::exception & e)\n    {\n      result.success = false;\n      result.errorMessage = std::string(\"Exception during trajectory planning: \") + e.what();\n      RCLCPP_ERROR(getLogger(), \"[CpJointSpaceTrajectoryPlanner] %s\", result.errorMessage.c_str());\n    }\n\n    return result;\n  }\n\nprivate:\n  ClMoveit2z * moveit2zClient_ = nullptr;\n  rclcpp::Client<moveit_msgs::srv::GetPositionIK>::SharedPtr ikClient_;\n};\n\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_motion_planner.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/component.hpp>\n\n#include <cl_moveit2z/cl_moveit2z.hpp>\n\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include <moveit/move_group_interface/move_group_interface.hpp>\n#include <moveit_msgs/msg/move_it_error_codes.hpp>\n#include <moveit_msgs/msg/robot_trajectory.hpp>\n\n#include <map>\n#include <optional>\n#include <string>\n\nnamespace cl_moveit2z\n{\n/**\n * @brief Configuration options for motion planning\n */\nstruct PlanningOptions\n{\n  std::optional<double> planningTime;\n  std::optional<double> maxVelocityScaling;\n  std::optional<double> maxAccelerationScaling;\n  std::optional<std::string> planningPipelineId;\n  std::optional<std::string> plannerId;\n  std::optional<std::string> poseReferenceFrame;\n};\n\n/**\n * @brief Result of a planning operation\n */\nstruct PlanningResult\n{\n  bool success;\n  moveit::planning_interface::MoveGroupInterface::Plan plan;\n  moveit::core::MoveItErrorCode errorCode;\n  std::string errorMessage;\n\n  PlanningResult()\n  : success(false), errorCode(moveit::core::MoveItErrorCode::FAILURE), errorMessage(\"\")\n  {\n  }\n};\n\n/**\n * @brief Component for centralized motion planning operations\n *\n * This component wraps all MoveGroupInterface planning operations to provide\n * a consistent interface for planning motions. It supports planning to:\n * - Cartesian poses\n * - Joint configurations\n * - Named targets\n * - Cartesian paths\n *\n * Pattern: API wrapper component with result types\n */\nclass CpMotionPlanner : public smacc2::ISmaccComponent\n{\npublic:\n  CpMotionPlanner() = default;\n  virtual ~CpMotionPlanner() = default;\n\n  /**\n   * @brief Initialize the component and get reference to ClMoveit2z client\n   */\n  inline void onInitialize() override\n  {\n    this->requiresClient(moveit2zClient_);\n    RCLCPP_INFO(getLogger(), \"[CpMotionPlanner] Component initialized\");\n  }\n\n  /**\n   * @brief Plan to a Cartesian pose\n   *\n   * @param target Target pose (position and orientation)\n   * @param tipLink End effector tip link (optional, uses default if not specified)\n   * @param options Planning configuration options\n   * @return PlanningResult with success status and computed plan\n   */\n  inline PlanningResult planToPose(\n    const geometry_msgs::msg::PoseStamped & target,\n    const std::optional<std::string> & tipLink = std::nullopt, const PlanningOptions & options = {})\n  {\n    PlanningResult result;\n\n    if (!moveit2zClient_)\n    {\n      result.errorMessage = \"ClMoveit2z client not available\";\n      RCLCPP_ERROR(getLogger(), \"[CpMotionPlanner] %s\", result.errorMessage.c_str());\n      return result;\n    }\n\n    auto & moveGroup = moveit2zClient_->moveGroupClientInterface;\n\n    try\n    {\n      // Apply planning options\n      applyPlanningOptions(*moveGroup, options);\n\n      // Set pose target\n      if (tipLink && !tipLink->empty())\n      {\n        moveGroup->setPoseTarget(target, *tipLink);\n      }\n      else\n      {\n        moveGroup->setPoseTarget(target);\n      }\n\n      // Set reference frame if specified\n      if (options.poseReferenceFrame)\n      {\n        moveGroup->setPoseReferenceFrame(*options.poseReferenceFrame);\n      }\n      else if (!target.header.frame_id.empty())\n      {\n        moveGroup->setPoseReferenceFrame(target.header.frame_id);\n      }\n\n      RCLCPP_INFO(getLogger(), \"[CpMotionPlanner] Planning to pose...\");\n\n      // Plan\n      result.errorCode = moveGroup->plan(result.plan);\n      result.success = (result.errorCode == moveit::core::MoveItErrorCode::SUCCESS);\n\n      if (result.success)\n      {\n        RCLCPP_INFO(getLogger(), \"[CpMotionPlanner] Planning to pose succeeded\");\n      }\n      else\n      {\n        result.errorMessage =\n          \"Planning to pose failed with error code: \" + std::to_string(result.errorCode.val);\n        RCLCPP_WARN(getLogger(), \"[CpMotionPlanner] %s\", result.errorMessage.c_str());\n      }\n    }\n    catch (const std::exception & e)\n    {\n      result.success = false;\n      result.errorMessage = std::string(\"Exception during planning: \") + e.what();\n      RCLCPP_ERROR(getLogger(), \"[CpMotionPlanner] %s\", result.errorMessage.c_str());\n    }\n\n    return result;\n  }\n\n  /**\n   * @brief Plan to joint values\n   *\n   * @param jointTargets Map of joint names to target values\n   * @param options Planning configuration options\n   * @return PlanningResult with success status and computed plan\n   */\n  inline PlanningResult planToJointTarget(\n    const std::map<std::string, double> & jointTargets, const PlanningOptions & options = {})\n  {\n    PlanningResult result;\n\n    if (!moveit2zClient_)\n    {\n      result.errorMessage = \"ClMoveit2z client not available\";\n      RCLCPP_ERROR(getLogger(), \"[CpMotionPlanner] %s\", result.errorMessage.c_str());\n      return result;\n    }\n\n    if (jointTargets.empty())\n    {\n      result.errorMessage = \"No joint targets specified\";\n      RCLCPP_WARN(getLogger(), \"[CpMotionPlanner] %s\", result.errorMessage.c_str());\n      return result;\n    }\n\n    auto & moveGroup = moveit2zClient_->moveGroupClientInterface;\n\n    try\n    {\n      // Apply planning options\n      applyPlanningOptions(*moveGroup, options);\n\n      // Set joint value targets\n      moveGroup->setJointValueTarget(jointTargets);\n\n      RCLCPP_INFO(\n        getLogger(), \"[CpMotionPlanner] Planning to joint configuration (%lu joints)...\",\n        jointTargets.size());\n\n      // Plan\n      result.errorCode = moveGroup->plan(result.plan);\n      result.success = (result.errorCode == moveit::core::MoveItErrorCode::SUCCESS);\n\n      if (result.success)\n      {\n        RCLCPP_INFO(getLogger(), \"[CpMotionPlanner] Planning to joint configuration succeeded\");\n      }\n      else\n      {\n        result.errorMessage = \"Planning to joint configuration failed with error code: \" +\n                              std::to_string(result.errorCode.val);\n        RCLCPP_WARN(getLogger(), \"[CpMotionPlanner] %s\", result.errorMessage.c_str());\n      }\n    }\n    catch (const std::exception & e)\n    {\n      result.success = false;\n      result.errorMessage = std::string(\"Exception during planning: \") + e.what();\n      RCLCPP_ERROR(getLogger(), \"[CpMotionPlanner] %s\", result.errorMessage.c_str());\n    }\n\n    return result;\n  }\n\n  /**\n   * @brief Plan a Cartesian path\n   *\n   * @param waypoints Vector of waypoint poses\n   * @param maxStep Maximum distance between path points (meters)\n   * @param jumpThreshold Maximum joint jump threshold (0.0 = disabled)\n   * @param avoidCollisions Whether to check for collisions\n   * @return PlanningResult with success status and computed trajectory\n   */\n  inline PlanningResult planCartesianPath(\n    const std::vector<geometry_msgs::msg::Pose> & waypoints, double maxStep = 0.01,\n    double /*jumpThreshold*/ = 0.0, bool avoidCollisions = true)\n  {\n    PlanningResult result;\n\n    if (!moveit2zClient_)\n    {\n      result.errorMessage = \"ClMoveit2z client not available\";\n      RCLCPP_ERROR(getLogger(), \"[CpMotionPlanner] %s\", result.errorMessage.c_str());\n      return result;\n    }\n\n    if (waypoints.empty())\n    {\n      result.errorMessage = \"No waypoints specified\";\n      RCLCPP_WARN(getLogger(), \"[CpMotionPlanner] %s\", result.errorMessage.c_str());\n      return result;\n    }\n\n    auto & moveGroup = moveit2zClient_->moveGroupClientInterface;\n\n    try\n    {\n      RCLCPP_INFO(\n        getLogger(), \"[CpMotionPlanner] Planning Cartesian path with %lu waypoints...\",\n        waypoints.size());\n\n      moveit_msgs::msg::RobotTrajectory trajectory;\n      double fractionAchieved =\n        moveGroup->computeCartesianPath(waypoints, maxStep, trajectory, avoidCollisions);\n\n      result.plan.trajectory = trajectory;\n\n      // Consider successful if we achieved at least 95% of the path\n      result.success = (fractionAchieved >= 0.95);\n\n      if (result.success)\n      {\n        result.errorCode = moveit::core::MoveItErrorCode::SUCCESS;\n        RCLCPP_INFO(\n          getLogger(), \"[CpMotionPlanner] Cartesian path planning succeeded (%.1f%% achieved)\",\n          fractionAchieved * 100.0);\n      }\n      else\n      {\n        result.errorCode = moveit::core::MoveItErrorCode::PLANNING_FAILED;\n        result.errorMessage = \"Cartesian path planning achieved only \" +\n                              std::to_string(fractionAchieved * 100.0) + \"% of the path\";\n        RCLCPP_WARN(getLogger(), \"[CpMotionPlanner] %s\", result.errorMessage.c_str());\n      }\n    }\n    catch (const std::exception & e)\n    {\n      result.success = false;\n      result.errorMessage = std::string(\"Exception during Cartesian path planning: \") + e.what();\n      RCLCPP_ERROR(getLogger(), \"[CpMotionPlanner] %s\", result.errorMessage.c_str());\n    }\n\n    return result;\n  }\n\n  /**\n   * @brief Get current robot state\n   *\n   * @param waitTime Maximum time to wait for state (seconds)\n   * @return Pointer to current robot state, or nullptr if unavailable\n   */\n  inline moveit::core::RobotStatePtr getCurrentState(double waitTime = 1.0)\n  {\n    if (!moveit2zClient_)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CpMotionPlanner] ClMoveit2z client not available\");\n      return nullptr;\n    }\n\n    auto & moveGroup = moveit2zClient_->moveGroupClientInterface;\n\n    try\n    {\n      return moveGroup->getCurrentState(waitTime);\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CpMotionPlanner] Exception getting current state: %s\", e.what());\n      return nullptr;\n    }\n  }\n\nprivate:\n  ClMoveit2z * moveit2zClient_ = nullptr;\n\n  /**\n   * @brief Apply planning options to MoveGroupInterface\n   *\n   * @param moveGroup Reference to MoveGroupInterface\n   * @param options Planning options to apply\n   */\n  inline void applyPlanningOptions(\n    moveit::planning_interface::MoveGroupInterface & moveGroup, const PlanningOptions & options)\n  {\n    if (options.planningTime)\n    {\n      moveGroup.setPlanningTime(*options.planningTime);\n    }\n\n    if (options.maxVelocityScaling)\n    {\n      moveGroup.setMaxVelocityScalingFactor(*options.maxVelocityScaling);\n    }\n\n    if (options.maxAccelerationScaling)\n    {\n      moveGroup.setMaxAccelerationScalingFactor(*options.maxAccelerationScaling);\n    }\n\n    if (options.planningPipelineId)\n    {\n      moveGroup.setPlanningPipelineId(*options.planningPipelineId);\n    }\n\n    if (options.plannerId)\n    {\n      moveGroup.setPlannerId(*options.plannerId);\n    }\n  }\n};\n\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_tf_listener.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/component.hpp>\n\n#include <tf2_ros/buffer.h>\n#include <tf2_ros/transform_listener.h>\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include <geometry_msgs/msg/transform_stamped.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n\n#include <mutex>\n#include <optional>\n\nnamespace cl_moveit2z\n{\n/**\n * @brief Component for shared TF2 transform management across all behaviors\n *\n * This component provides centralized access to TF2 transforms using static\n * resource sharing to avoid creating multiple tf2_ros::Buffer and\n * tf2_ros::TransformListener instances across different behaviors.\n *\n * Pattern: Static resource sharing (similar to nav2z_client's Pose component)\n */\nclass CpTfListener : public smacc2::ISmaccComponent\n{\npublic:\n  CpTfListener() = default;\n  virtual ~CpTfListener() = default;\n\n  /**\n   * @brief Initialize the shared TF2 buffer and listener\n   *\n   * This method initializes the static tf2_ros::Buffer and tf2_ros::TransformListener\n   * on first use. Subsequent component instances will reuse the same resources.\n   */\n  inline void onInitialize() override\n  {\n    std::lock_guard<std::mutex> guard(tfMutex_);\n\n    if (!tfBuffer_)\n    {\n      RCLCPP_INFO(getLogger(), \"[CpTfListener] Initializing shared TF2 buffer and listener\");\n      tfBuffer_ = std::make_shared<tf2_ros::Buffer>(getNode()->get_clock());\n      tfListener_ = std::make_shared<tf2_ros::TransformListener>(*tfBuffer_);\n    }\n    else\n    {\n      RCLCPP_DEBUG(getLogger(), \"[CpTfListener] Reusing existing shared TF2 resources\");\n    }\n  }\n\n  /**\n   * @brief Thread-safe transform lookup\n   *\n   * @param target_frame Target frame for the transform\n   * @param source_frame Source frame for the transform\n   * @param time Time at which to get the transform (default: latest available)\n   * @return std::optional<geometry_msgs::msg::TransformStamped> Transform if available, std::nullopt otherwise\n   */\n  inline std::optional<geometry_msgs::msg::TransformStamped> lookupTransform(\n    const std::string & target_frame, const std::string & source_frame,\n    const rclcpp::Time & time = rclcpp::Time(0))\n  {\n    std::lock_guard<std::mutex> guard(tfMutex_);\n\n    if (!tfBuffer_)\n    {\n      RCLCPP_ERROR(\n        getLogger(), \"[CpTfListener] TF buffer not initialized. Call onInitialize() first.\");\n      return std::nullopt;\n    }\n\n    try\n    {\n      auto transform = tfBuffer_->lookupTransform(target_frame, source_frame, time);\n      return transform;\n    }\n    catch (const tf2::TransformException & ex)\n    {\n      RCLCPP_WARN(\n        getLogger(), \"[CpTfListener] Could not get transform from '%s' to '%s': %s\",\n        source_frame.c_str(), target_frame.c_str(), ex.what());\n      return std::nullopt;\n    }\n  }\n\n  /**\n   * @brief Transform a pose to a different frame\n   *\n   * @param pose Input pose in its original frame\n   * @param target_frame Target frame to transform the pose into\n   * @return std::optional<geometry_msgs::msg::PoseStamped> Transformed pose if successful, std::nullopt otherwise\n   */\n  inline std::optional<geometry_msgs::msg::PoseStamped> transformPose(\n    const geometry_msgs::msg::PoseStamped & pose, const std::string & target_frame)\n  {\n    std::lock_guard<std::mutex> guard(tfMutex_);\n\n    if (!tfBuffer_)\n    {\n      RCLCPP_ERROR(\n        getLogger(), \"[CpTfListener] TF buffer not initialized. Call onInitialize() first.\");\n      return std::nullopt;\n    }\n\n    try\n    {\n      geometry_msgs::msg::PoseStamped transformed_pose;\n      tfBuffer_->transform(pose, transformed_pose, target_frame);\n      return transformed_pose;\n    }\n    catch (const tf2::TransformException & ex)\n    {\n      RCLCPP_WARN(\n        getLogger(), \"[CpTfListener] Could not transform pose to frame '%s': %s\",\n        target_frame.c_str(), ex.what());\n      return std::nullopt;\n    }\n  }\n\n  /**\n   * @brief Check if a transform is available\n   *\n   * @param target_frame Target frame\n   * @param source_frame Source frame\n   * @param time Time to check for (default: latest)\n   * @param timeout How long to wait for the transform\n   * @return bool True if transform is available, false otherwise\n   */\n  inline bool canTransform(\n    const std::string & target_frame, const std::string & source_frame,\n    const rclcpp::Time & time = rclcpp::Time(0),\n    const rclcpp::Duration & timeout = rclcpp::Duration::from_seconds(0.0))\n  {\n    std::lock_guard<std::mutex> guard(tfMutex_);\n\n    if (!tfBuffer_)\n    {\n      RCLCPP_ERROR(\n        getLogger(), \"[CpTfListener] TF buffer not initialized. Call onInitialize() first.\");\n      return false;\n    }\n\n    return tfBuffer_->canTransform(target_frame, source_frame, time, timeout);\n  }\n\n  /**\n   * @brief Get raw access to the TF2 buffer for advanced use cases\n   *\n   * WARNING: Direct buffer access bypasses thread safety. Use with caution.\n   *\n   * @return std::shared_ptr<tf2_ros::Buffer> Shared pointer to the TF2 buffer\n   */\n  inline std::shared_ptr<tf2_ros::Buffer> getBuffer()\n  {\n    std::lock_guard<std::mutex> guard(tfMutex_);\n    return tfBuffer_;\n  }\n\nprivate:\n  // Shared static resources across all CpTfListener instances\n  static std::shared_ptr<tf2_ros::Buffer> tfBuffer_;\n  static std::shared_ptr<tf2_ros::TransformListener> tfListener_;\n  static std::mutex tfMutex_;\n};\n\n// Static member initialization\nstd::shared_ptr<tf2_ros::Buffer> CpTfListener::tfBuffer_ = nullptr;\nstd::shared_ptr<tf2_ros::TransformListener> CpTfListener::tfListener_ = nullptr;\nstd::mutex CpTfListener::tfMutex_;\n\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_trajectory_executor.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/component.hpp>\n\n#include <cl_moveit2z/cl_moveit2z.hpp>\n#include <cl_moveit2z/components/cp_trajectory_history.hpp>\n\n#include <moveit/move_group_interface/move_group_interface.hpp>\n#include <moveit_msgs/msg/move_it_error_codes.hpp>\n#include <moveit_msgs/msg/robot_trajectory.hpp>\n\n#include <chrono>\n#include <optional>\n#include <string>\n\nnamespace cl_moveit2z\n{\n/**\n * @brief Configuration options for trajectory execution\n */\nstruct ExecutionOptions\n{\n  std::optional<double> maxVelocityScaling;\n  std::optional<double> maxAccelerationScaling;\n  bool recordToHistory = true;\n  std::optional<std::string> trajectoryName;\n};\n\n/**\n * @brief Result of a trajectory execution operation\n */\nstruct ExecutionResult\n{\n  bool success;\n  moveit_msgs::msg::MoveItErrorCodes errorCode;\n  std::string errorMessage;\n  std::chrono::duration<double> executionTime;\n\n  ExecutionResult() : success(false), errorCode(), errorMessage(\"\"), executionTime(0.0)\n  {\n    errorCode.val = moveit_msgs::msg::MoveItErrorCodes::FAILURE;\n  }\n};\n\n/**\n * @brief Component for centralized trajectory execution\n *\n * This component provides a unified interface for executing trajectories with:\n * - Automatic recording to CpTrajectoryHistory\n * - Consistent error handling and event posting\n * - Execution options (velocity/acceleration scaling)\n * - Execution time tracking\n *\n * Pattern: Executor with signals (like action clients)\n */\nclass CpTrajectoryExecutor : public smacc2::ISmaccComponent\n{\npublic:\n  CpTrajectoryExecutor() = default;\n  virtual ~CpTrajectoryExecutor() = default;\n\n  /**\n   * @brief Initialize the component and get references to required components/clients\n   */\n  inline void onInitialize() override\n  {\n    this->requiresClient(moveit2zClient_);\n\n    // CpTrajectoryHistory is optional but recommended\n    this->requiresComponent(trajectoryHistory_, smacc2::ComponentRequirement::SOFT);\n\n    if (trajectoryHistory_)\n    {\n      RCLCPP_INFO(\n        getLogger(),\n        \"[CpTrajectoryExecutor] Component initialized with trajectory history recording enabled\");\n    }\n    else\n    {\n      RCLCPP_WARN(\n        getLogger(),\n        \"[CpTrajectoryExecutor] Component initialized without CpTrajectoryHistory \"\n        \"(trajectory history will not be recorded)\");\n    }\n  }\n\n  /**\n   * @brief Execute a trajectory synchronously\n   *\n   * @param trajectory The robot trajectory to execute\n   * @param options Execution configuration options\n   * @return ExecutionResult with success status and error information\n   */\n  inline ExecutionResult execute(\n    const moveit_msgs::msg::RobotTrajectory & trajectory, const ExecutionOptions & options = {})\n  {\n    ExecutionResult result;\n\n    if (!moveit2zClient_)\n    {\n      result.errorMessage = \"ClMoveit2z client not available\";\n      RCLCPP_ERROR(getLogger(), \"[CpTrajectoryExecutor] %s\", result.errorMessage.c_str());\n      return result;\n    }\n\n    auto & moveGroup = moveit2zClient_->moveGroupClientInterface;\n\n    try\n    {\n      // Apply execution options\n      applyExecutionOptions(*moveGroup, options);\n\n      RCLCPP_INFO(\n        getLogger(), \"[CpTrajectoryExecutor] Executing trajectory with %lu points...\",\n        trajectory.joint_trajectory.points.size());\n\n      // Track execution time\n      auto startTime = std::chrono::steady_clock::now();\n\n      // Execute trajectory\n      result.errorCode = moveGroup->execute(trajectory);\n\n      auto endTime = std::chrono::steady_clock::now();\n      result.executionTime = std::chrono::duration<double>(endTime - startTime);\n\n      result.success = (result.errorCode.val == moveit_msgs::msg::MoveItErrorCodes::SUCCESS);\n\n      if (result.success)\n      {\n        RCLCPP_INFO(\n          getLogger(), \"[CpTrajectoryExecutor] Trajectory execution succeeded (%.2f seconds)\",\n          result.executionTime.count());\n      }\n      else\n      {\n        result.errorMessage =\n          \"Trajectory execution failed with error code: \" + std::to_string(result.errorCode.val);\n        RCLCPP_WARN(getLogger(), \"[CpTrajectoryExecutor] %s\", result.errorMessage.c_str());\n      }\n\n      // Record to history if enabled\n      if (options.recordToHistory && trajectoryHistory_)\n      {\n        std::string trajName = options.trajectoryName.value_or(\"unnamed_trajectory\");\n        recordToHistory(trajectory, result.errorCode, trajName);\n      }\n    }\n    catch (const std::exception & e)\n    {\n      result.success = false;\n      result.errorMessage = std::string(\"Exception during trajectory execution: \") + e.what();\n      RCLCPP_ERROR(getLogger(), \"[CpTrajectoryExecutor] %s\", result.errorMessage.c_str());\n    }\n\n    return result;\n  }\n\n  /**\n   * @brief Execute a motion plan synchronously\n   *\n   * Convenience method that accepts a MoveGroupInterface::Plan directly\n   *\n   * @param plan The motion plan containing the trajectory\n   * @param options Execution configuration options\n   * @return ExecutionResult with success status and error information\n   */\n  inline ExecutionResult executePlan(\n    const moveit::planning_interface::MoveGroupInterface::Plan & plan,\n    const ExecutionOptions & options = {})\n  {\n    return execute(plan.trajectory, options);\n  }\n\n  /**\n   * @brief Cancel ongoing execution\n   *\n   * Note: This is a best-effort cancellation and may not immediately stop the robot\n   */\n  inline void cancel()\n  {\n    if (!moveit2zClient_)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CpTrajectoryExecutor] Cannot cancel: client not available\");\n      return;\n    }\n\n    auto & moveGroup = moveit2zClient_->moveGroupClientInterface;\n\n    try\n    {\n      moveGroup->stop();\n      RCLCPP_INFO(getLogger(), \"[CpTrajectoryExecutor] Trajectory execution cancelled\");\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_ERROR(\n        getLogger(), \"[CpTrajectoryExecutor] Exception during cancellation: %s\", e.what());\n    }\n  }\n\n  /**\n   * @brief Get the trajectory history component\n   *\n   * @return Pointer to CpTrajectoryHistory, or nullptr if not available\n   */\n  inline CpTrajectoryHistory * getTrajectoryHistory() { return trajectoryHistory_; }\n\nprivate:\n  ClMoveit2z * moveit2zClient_ = nullptr;\n  CpTrajectoryHistory * trajectoryHistory_ = nullptr;\n\n  /**\n   * @brief Apply execution options to MoveGroupInterface\n   *\n   * @param moveGroup Reference to MoveGroupInterface\n   * @param options Execution options to apply\n   */\n  inline void applyExecutionOptions(\n    moveit::planning_interface::MoveGroupInterface & moveGroup, const ExecutionOptions & options)\n  {\n    if (options.maxVelocityScaling)\n    {\n      moveGroup.setMaxVelocityScalingFactor(*options.maxVelocityScaling);\n    }\n\n    if (options.maxAccelerationScaling)\n    {\n      moveGroup.setMaxAccelerationScalingFactor(*options.maxAccelerationScaling);\n    }\n  }\n\n  /**\n   * @brief Record trajectory to history component\n   *\n   * @param trajectory The executed trajectory\n   * @param errorCode Execution result error code\n   * @param name Name for this trajectory entry\n   */\n  inline void recordToHistory(\n    const moveit_msgs::msg::RobotTrajectory & trajectory,\n    const moveit_msgs::msg::MoveItErrorCodes & errorCode, const std::string & name)\n  {\n    if (!trajectoryHistory_)\n    {\n      return;\n    }\n\n    try\n    {\n      trajectoryHistory_->pushTrajectory(name, trajectory, errorCode);\n      RCLCPP_DEBUG(\n        getLogger(), \"[CpTrajectoryExecutor] Recorded trajectory '%s' to history\", name.c_str());\n    }\n    catch (const std::exception & e)\n    {\n      RCLCPP_WARN(\n        getLogger(), \"[CpTrajectoryExecutor] Failed to record trajectory to history: %s\", e.what());\n    }\n  }\n};\n\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_trajectory_history.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/component.hpp>\n\n#include <moveit_msgs/msg/move_it_error_codes.hpp>\n#include <moveit_msgs/msg/robot_trajectory.hpp>\n\nnamespace cl_moveit2z\n{\nstruct TrajectoryHistoryEntry\n{\n  moveit_msgs::msg::RobotTrajectory trajectory;\n  moveit_msgs::msg::MoveItErrorCodes result;\n  std::string name;\n};\n\nclass CpTrajectoryHistory : public smacc2::ISmaccComponent\n{\npublic:\n  inline bool getLastTrajectory(int backIndex, moveit_msgs::msg::RobotTrajectory & trajectory)\n  {\n    if (trajectoryHistory_.size() == 0)\n    {\n      RCLCPP_WARN_STREAM(\n        getLogger(), \"[\" << getName() << \"] requested index: \" << backIndex\n                         << \", history size: \" << trajectoryHistory_.size());\n      return false;\n    }\n\n    if (backIndex < 0)\n    {\n      backIndex = 0;\n    }\n    else if ((size_t)backIndex >= this->trajectoryHistory_.size())\n    {\n      RCLCPP_WARN_STREAM(\n        getLogger(), \"[\" << getName() << \"] requested index: \" << backIndex\n                         << \", history size: \" << trajectoryHistory_.size());\n      return false;\n    }\n\n    trajectory =\n      this->trajectoryHistory_[this->trajectoryHistory_.size() - 1 - backIndex].trajectory;\n    return true;\n  }\n\n  inline bool getLastTrajectory(moveit_msgs::msg::RobotTrajectory & trajectory)\n  {\n    return getLastTrajectory(-1, trajectory);\n  }\n\n  inline void pushTrajectory(\n    std::string name, const moveit_msgs::msg::RobotTrajectory & trajectory,\n    moveit_msgs::msg::MoveItErrorCodes result)\n  {\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << getName() << \"] adding a new trajectory to the history ( \"\n                       << trajectory.joint_trajectory.points.size() << \" poses)\");\n\n    TrajectoryHistoryEntry entry;\n    this->trajectoryHistory_.push_back(entry);\n\n    auto & last = this->trajectoryHistory_.back();\n    last.trajectory = trajectory;\n    last.result = result;\n    last.name = name;\n  }\n\nprivate:\n  std::vector<TrajectoryHistoryEntry> trajectoryHistory_;\n};\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/include/cl_moveit2z/components/cp_trajectory_visualizer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/component.hpp>\n#include <smacc2/smacc_updatable.hpp>\n\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include <visualization_msgs/msg/marker.hpp>\n#include <visualization_msgs/msg/marker_array.hpp>\n\n#include <mutex>\n#include <string>\n#include <vector>\n\nnamespace cl_moveit2z\n{\n/**\n * @brief Component for visualizing trajectories as RViz markers\n *\n * This component publishes trajectory paths as visualization markers that can be\n * viewed in RViz. It follows the ISmaccUpdatable pattern for periodic publishing.\n *\n * Pattern: Publisher + ISmaccUpdatable (similar to nav2z_client's CpWaypointsVisualizer)\n */\nclass CpTrajectoryVisualizer : public smacc2::ISmaccComponent, public smacc2::ISmaccUpdatable\n{\npublic:\n  /**\n   * @brief Constructor\n   *\n   * @param publishRate Publishing rate (default: 10Hz)\n   */\n  CpTrajectoryVisualizer(double publishRate = 10.0) : enabled_(false), publishRate_(publishRate) {}\n\n  virtual ~CpTrajectoryVisualizer() = default;\n\n  /**\n   * @brief Initialize the marker publisher\n   */\n  inline void onInitialize() override\n  {\n    markersPub_ =\n      getNode()->create_publisher<visualization_msgs::msg::MarkerArray>(\"trajectory_markers\", 1);\n    RCLCPP_INFO(getLogger(), \"[CpTrajectoryVisualizer] Initialized\");\n\n    // Initialize timing for publish rate control\n    lastPublishTime_ = getNode()->now();\n  }\n\n  /**\n   * @brief Periodic update - publishes markers if enabled\n   */\n  inline void update() override\n  {\n    std::lock_guard<std::mutex> guard(markersMutex_);\n\n    if (!enabled_ || !markersReady_)\n    {\n      return;\n    }\n\n    // Rate limiting\n    auto now = getNode()->now();\n    auto elapsed = (now - lastPublishTime_).seconds();\n    if (elapsed < (1.0 / publishRate_))\n    {\n      return;\n    }\n\n    markersPub_->publish(markers_);\n    lastPublishTime_ = now;\n  }\n\n  /**\n   * @brief Set trajectory to visualize\n   *\n   * @param poses Vector of poses defining the trajectory path\n   * @param ns Namespace for the markers (default: \"trajectory\")\n   */\n  inline void setTrajectory(\n    const std::vector<geometry_msgs::msg::PoseStamped> & poses,\n    const std::string & ns = \"trajectory\")\n  {\n    std::lock_guard<std::mutex> guard(markersMutex_);\n\n    RCLCPP_INFO(\n      getLogger(), \"[CpTrajectoryVisualizer] Setting trajectory with %lu poses\", poses.size());\n\n    markers_.markers.clear();\n\n    if (poses.empty())\n    {\n      RCLCPP_WARN(getLogger(), \"[CpTrajectoryVisualizer] Empty trajectory provided\");\n      markersReady_ = false;\n      return;\n    }\n\n    // Create spheres for each pose\n    for (size_t i = 0; i < poses.size(); ++i)\n    {\n      visualization_msgs::msg::Marker marker;\n      marker.header = poses[i].header;\n      marker.ns = ns;\n      marker.id = static_cast<int>(i);\n      marker.type = visualization_msgs::msg::Marker::SPHERE;\n      marker.action = visualization_msgs::msg::Marker::ADD;\n\n      marker.pose = poses[i].pose;\n\n      marker.scale.x = markerScale_;\n      marker.scale.y = markerScale_;\n      marker.scale.z = markerScale_;\n\n      marker.color.r = markerColor_[0];\n      marker.color.g = markerColor_[1];\n      marker.color.b = markerColor_[2];\n      marker.color.a = markerColor_[3];\n\n      markers_.markers.push_back(marker);\n    }\n\n    // Create line strip connecting all poses\n    if (poses.size() > 1)\n    {\n      visualization_msgs::msg::Marker lineMarker;\n      lineMarker.header = poses[0].header;\n      lineMarker.ns = ns + \"_path\";\n      lineMarker.id = static_cast<int>(poses.size());\n      lineMarker.type = visualization_msgs::msg::Marker::LINE_STRIP;\n      lineMarker.action = visualization_msgs::msg::Marker::ADD;\n\n      lineMarker.scale.x = markerScale_ * 0.3;  // Line width\n\n      lineMarker.color.r = markerColor_[0];\n      lineMarker.color.g = markerColor_[1];\n      lineMarker.color.b = markerColor_[2];\n      lineMarker.color.a = markerColor_[3] * 0.7;  // Slightly transparent\n\n      for (const auto & pose : poses)\n      {\n        lineMarker.points.push_back(pose.pose.position);\n      }\n\n      markers_.markers.push_back(lineMarker);\n    }\n\n    markersReady_ = true;\n    enabled_ = true;\n\n    RCLCPP_INFO(\n      getLogger(), \"[CpTrajectoryVisualizer] Created %lu markers\", markers_.markers.size());\n  }\n\n  /**\n   * @brief Clear all markers\n   */\n  inline void clearMarkers()\n  {\n    std::lock_guard<std::mutex> guard(markersMutex_);\n\n    RCLCPP_INFO(getLogger(), \"[CpTrajectoryVisualizer] Clearing markers\");\n\n    // Send delete action for all markers\n    for (auto & marker : markers_.markers)\n    {\n      marker.action = visualization_msgs::msg::Marker::DELETE;\n    }\n\n    if (!markers_.markers.empty())\n    {\n      markersPub_->publish(markers_);\n    }\n\n    markers_.markers.clear();\n    markersReady_ = false;\n    enabled_ = false;\n  }\n\n  /**\n   * @brief Set marker color (RGBA values 0.0-1.0)\n   */\n  inline void setColor(float r, float g, float b, float a = 1.0)\n  {\n    markerColor_[0] = r;\n    markerColor_[1] = g;\n    markerColor_[2] = b;\n    markerColor_[3] = a;\n  }\n\n  /**\n   * @brief Set marker scale (sphere diameter in meters)\n   */\n  inline void setScale(double scale) { markerScale_ = scale; }\n\n  /**\n   * @brief Enable/disable marker publishing\n   */\n  inline void setEnabled(bool enabled)\n  {\n    std::lock_guard<std::mutex> guard(markersMutex_);\n    enabled_ = enabled;\n  }\n\n  /**\n   * @brief Check if visualizer is enabled\n   */\n  inline bool isEnabled() const { return enabled_; }\n\nprivate:\n  rclcpp::Publisher<visualization_msgs::msg::MarkerArray>::SharedPtr markersPub_;\n  visualization_msgs::msg::MarkerArray markers_;\n  std::mutex markersMutex_;\n\n  bool markersReady_ = false;\n  bool enabled_ = false;\n\n  // Marker appearance\n  double markerScale_ = 0.02;                        // 2cm spheres\n  float markerColor_[4] = {0.0f, 1.0f, 0.0f, 0.8f};  // Green, slightly transparent\n\n  // Publishing rate control\n  double publishRate_;\n  rclcpp::Time lastPublishTime_;\n};\n\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>cl_moveit2z</name>\n  <version>3.0.1</version>\n\n  <description>The cl_moveit2z package</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n  <depend>tf2</depend>\n  <depend>tf2_ros</depend>\n  <depend>moveit_ros_planning_interface</depend>\n  <depend>yaml_cpp_vendor</depend>\n  <depend>ament_index_cpp</depend>\n  <depend>yaml-cpp</depend>\n  <depend>tf2_geometry_msgs</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_moveit2z/src/cl_moveit2z/cl_moveit2z.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_moveit2z/cl_moveit2z.hpp>\n\nnamespace cl_moveit2z\n{\n// Declare the Client's constructors.\nClMoveit2z::ClMoveit2z(std::string groupName) : options_(groupName) {}\n\nClMoveit2z::ClMoveit2z(const moveit::planning_interface::MoveGroupInterface::Options & options)\n: options_(options)\n{\n}\n\n// Declare the Client's destructor.\nClMoveit2z::~ClMoveit2z() {}\n\n}  // namespace cl_moveit2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/CHANGELOG.rst",
    "content": "Changelog for package cl_nav2z\n================================\n\n.. note::\n   This package was refactored in September 2025 from nav2z_client.\n   For historical changes prior to 2.3.20, see nav2z_client/CHANGELOG.rst.\n   The nav2z_client package is now deprecated in favor of cl_nav2z.\n\n2.3.20 (2025-11-01)\n-------------------\n* Minor refactoring (`#622 <https://github.com/robosoft-ai/SMACC2/issues/622>`_)\n* Refactor of cl_nav2z to component-based architecture (`#624 <https://github.com/robosoft-ai/SMACC2/issues/624>`_)\n* Refactoring cl_nav2z to remove legacy API support and update all client behaviors (`#625 <https://github.com/robosoft-ai/SMACC2/issues/625>`_)\n* Refactor of cl_nav2z, moved cp_nav2_action_interface.hpp into folder (`#626 <https://github.com/robosoft-ai/SMACC2/issues/626>`_)\n* Progress on requiresComponent (`#628 <https://github.com/robosoft-ai/SMACC2/issues/628>`_)\n* Contributors: Brett Aldrich, Pablo Iñigo Blasco\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(cl_nav2z)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(std_srvs REQUIRED)\nfind_package(std_msgs REQUIRED)\nfind_package(nav2_msgs REQUIRED)\nfind_package(tf2 REQUIRED)\nfind_package(tf2_ros REQUIRED)\nfind_package(angles REQUIRED)\nfind_package(yaml_cpp_vendor REQUIRED)\nfind_package(tf2_geometry_msgs REQUIRED)\nfind_package(pluginlib REQUIRED)\nfind_package(bond REQUIRED)\nfind_package(slam_toolbox REQUIRED)\nfind_package(ament_index_cpp REQUIRED)\nfind_package(rclcpp_action REQUIRED)\nfind_package(nav2_util)\n\n\nset(dependencies\n  smacc2\n  std_srvs\n  std_msgs\n  nav2_msgs\n  tf2\n  tf2_ros\n  angles\n  yaml_cpp_vendor\n  tf2_geometry_msgs\n  bond\n  slam_toolbox\n  ament_index_cpp\n  rclcpp_action\n  nav2_util\n)\n\ninclude_directories(include)\n\nadd_library(${PROJECT_NAME} SHARED\n  src/${PROJECT_NAME}/cl_nav2z.cpp\n  src/${PROJECT_NAME}/common.cpp\n\n  src/${PROJECT_NAME}/client_behaviors/cb_nav2z_client_behavior_base.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_absolute_rotate.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_rotate_look_at.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_navigate_backward.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_navigate_forward.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_abort_navigation.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_navigate_global_position.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_navigate_next_waypoint.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_navigate_next_waypoint_until_reached.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_navigate_named_waypoint.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_rotate.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_undo_path_backwards.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_wait_pose.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_wait_nav2_nodes.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_pause_slam.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_resume_slam.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_wait_transform.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_seek_waypoint.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_spiral_motion.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_track_path_odometry.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_track_path_slam.cpp\n\n  # COMPONENTS\n  src/${PROJECT_NAME}/components/costmap_switch/cp_costmap_switch.cpp\n  #src/${PROJECT_NAME}/components/odom_tracker/cp_odom_tracker_node.cpp\n\n  src/${PROJECT_NAME}/components/odom_tracker/cp_odom_tracker.cpp\n  src/${PROJECT_NAME}/components/planner_switcher/cp_planner_switcher.cpp\n  src/${PROJECT_NAME}/components/goal_checker_switcher/cp_goal_checker_switcher.cpp\n  src/${PROJECT_NAME}/components/pose/cp_pose.cpp\n  src/${PROJECT_NAME}/components/waypoints_navigator/cp_waypoints_event_dispatcher.cpp\n  src/${PROJECT_NAME}/components/waypoints_navigator/cp_waypoints_navigator.cpp\n  src/${PROJECT_NAME}/components/waypoints_navigator/cp_waypoints_visualizer.cpp\n  src/${PROJECT_NAME}/components/amcl/cp_amcl.cpp\n  src/${PROJECT_NAME}/components/slam_toolbox/cp_slam_toolbox.cpp\n\n  src/${PROJECT_NAME}/client_behaviors/cb_active_stop.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_load_waypoints_file.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_navigate_next_waypoint_free.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_position_control_free_space.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_pure_spinning.cpp\n  src/${PROJECT_NAME}/client_behaviors/cb_save_slam_map.cpp\n)\n\nament_target_dependencies(${PROJECT_NAME}\n                          ${dependencies})\n\ntarget_link_libraries(${PROJECT_NAME})\n\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\nament_export_dependencies(${dependencies})\n\ninstall(TARGETS ${PROJECT_NAME}\n  ARCHIVE DESTINATION lib\n  LIBRARY DESTINATION lib\n  RUNTIME DESTINATION bin\n)\n\ninstall(DIRECTORY include/\n  DESTINATION include/\n)\n\ninstall(FILES scripts/lidar_completion.py\n  DESTINATION lib/${PROJECT_NAME}/\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/cl_nav2z.hpp",
    "content": "// Copyright 2024 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_nav2z/components/nav2_action_interface/cp_nav2_action_interface.hpp>\n#include <nav2_msgs/action/navigate_to_pose.hpp>\n#include <smacc2/client_core_components/cp_action_client.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_nav2z\n{\n\n// Pure component-based ClNav2Z - No legacy support\n// Follows cl_keyboard pattern: orchestrator only, behaviors use requiresComponent()\nclass ClNav2Z : public smacc2::ISmaccClient\n{\npublic:\n  // Type aliases required for event system (TSource::WrappedResult in smacc_default_events.hpp)\n  using ActionType = nav2_msgs::action::NavigateToPose;\n  using GoalHandle = rclcpp_action::ClientGoalHandle<ActionType>;\n  using WrappedResult = typename GoalHandle::WrappedResult;\n  using Feedback = typename ActionType::Feedback;\n\n  // Constructor\n  ClNav2Z(std::string actionServerName = \"/navigate_to_pose\") : actionServerName_(actionServerName)\n  {\n  }\n\n  virtual ~ClNav2Z() = default;\n\n  // Component composition during orthogonal initialization\n  template <typename TOrthogonal, typename TClient>\n  void onComponentInitialization()\n  {\n    // Create core action client component\n    this->createComponent<\n      smacc2::client_core_components::CpActionClient<nav2_msgs::action::NavigateToPose>,\n      TOrthogonal, ClNav2Z>(actionServerName_);\n\n    // Create nav2-specific interface component (requires actionClient)\n    this->createComponent<components::CpNav2ActionInterface, TOrthogonal, ClNav2Z>();\n\n    RCLCPP_INFO_STREAM(\n      this->getLogger(), \"[ClNav2Z] Components created for action server: \" << actionServerName_);\n  }\n\nprivate:\n  std::string actionServerName_;\n\n  // ✅ PURE ORCHESTRATOR PATTERN - ALL LEGACY METHODS REMOVED:\n  //\n  // ❌ REMOVED: sendGoal() methods - use CpNav2ActionInterface::sendGoal()\n  // ❌ REMOVED: signal connection proxy methods - use CpNav2ActionInterface::onNavigationSucceeded()\n  // ❌ REMOVED: signal getter methods - signals owned by components\n  // ❌ REMOVED: component accessor methods - use requiresComponent()\n  // ❌ REMOVED: convenience wrapper methods - use component APIs directly\n  // ❌ REMOVED: type aliases - use component types directly\n  //\n  // ✅ NEW BEHAVIOR PATTERN:\n  //   class CbNavigateForward : public CbNav2ZClientBehaviorBase {\n  //     void onEntry() override {\n  //       CpNav2ActionInterface* navInterface;\n  //       this->requiresComponent(navInterface);\n  //       navInterface->onNavigationSucceeded(&CbNavigateForward::onSuccess, this);\n  //       Goal goal = createForwardGoal();\n  //       navInterface->sendGoal(goal);\n  //     }\n  //   };\n  //\n  // ✅ SMACC2 SIGNAL COMPLIANCE: All signal connections use createSignalConnection()\n  // ✅ FRAMEWORK CONSISTENCY: Matches cl_keyboard pure component pattern\n  // ✅ CLEAN SEPARATION: Client orchestrates, components implement, behaviors consume\n};\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_abort_navigation.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <tf2_ros/buffer.h>\n\n#include <cl_nav2z/components/nav2_action_interface/cp_nav2_action_interface.hpp>\n#include \"cb_nav2z_client_behavior_base.hpp\"\n#include \"cb_navigate_global_position.hpp\"\n#include \"tf2_geometry_msgs/tf2_geometry_msgs.hpp\"\n\nnamespace cl_nav2z\n{\nclass CbAbortNavigation : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbAbortNavigation();\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    this->requiresComponent(nav2ActionInterface_, ComponentRequirement::HARD);\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n  }\n\n  void onEntry() override;\n  void onExit() override;\n\nprivate:\n  components::CpNav2ActionInterface * nav2ActionInterface_ = nullptr;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_absolute_rotate.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <tf2_ros/buffer.h>\n\n#include \"cb_nav2z_client_behavior_base.hpp\"\n#include \"tf2_geometry_msgs/tf2_geometry_msgs.hpp\"\n\nnamespace cl_nav2z\n{\nclass CbAbsoluteRotate : public CbNav2ZClientBehaviorBase\n{\npublic:\n  std::shared_ptr<tf2_ros::Buffer> listener;\n\n  float absoluteGoalAngleDegree;\n  std::optional<float> yawGoalTolerance;\n  std::optional<float> maxVelTheta;  // if not defined, default parameter server\n  std::optional<SpinningPlanner> spinningPlanner;\n\n  CbAbsoluteRotate();\n  CbAbsoluteRotate(float absoluteGoalAngleDegree, float yawGoalTolerance = -1);\n\n  void onEntry() override;\n  void onExit() override;\n\nprivate:\n  void updateTemporalBehaviorParameters(bool undo);\n  float oldYawTolerance;\n  float oldMaxVelTheta;\n  float oldMinVelTheta;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_active_stop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <geometry_msgs/msg/twist.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_nav2z\n{\nstruct CbActiveStop : public smacc2::SmaccAsyncClientBehavior\n{\nprivate:\n  rclcpp::Publisher<geometry_msgs::msg::Twist>::SharedPtr cmd_vel_pub_;\n\npublic:\n  CbActiveStop();\n\n  void onEntry() override;\n\n  void onExit() override;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_load_waypoints_file.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator_base.hpp>\n#include <smacc2/smacc_client_behavior.hpp>\n\nnamespace cl_nav2z\n{\nstruct CbLoadWaypointsFile : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbLoadWaypointsFile(std::string filepath);\n\n  CbLoadWaypointsFile(std::string parameter_name, std::string packagenamespace);\n\n  void onEntry() override;\n\n  void onExit() override;\n\n  std::optional<std::string> filepath_;\n\n  std::optional<std::string> parameterName_;\n  std::optional<std::string> packageNamespace_;\n\n  cl_nav2z::CpWaypointNavigatorBase * waypointsNavigator_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_nav2z_client_behavior_base.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <cl_nav2z/components/nav2_action_interface/cp_nav2_action_interface.hpp>\n#include <cl_nav2z/components/planner_switcher/cp_planner_switcher.hpp>\n#include <smacc2/client_core_components/cp_action_client.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace smacc2;\nclass CbNav2ZClientBehaviorBase : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  virtual ~CbNav2ZClientBehaviorBase();\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    // NEW: Pure component-based approach - no client dependencies\n    this->requiresComponent(nav2ActionInterface_, ComponentRequirement::HARD);\n    this->requiresComponent(actionClient_, ComponentRequirement::HARD);\n\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n  }\n\nprotected:\n  // NEW: Component-based API - uses components directly\n  void sendGoal(nav2_msgs::action::NavigateToPose::Goal & goal)\n  {\n    if (nav2ActionInterface_)\n    {\n      nav2ActionInterface_->sendGoal(goal);\n    }\n  }\n\n  void cancelGoal()\n  {\n    if (nav2ActionInterface_)\n    {\n      nav2ActionInterface_->cancelNavigation();\n    }\n  }\n\n  // Component-based signal connections\n  template <typename T>\n  smacc2::SmaccSignalConnection onNavigationSucceeded(\n    void (T::*callback)(const components::CpNav2ActionInterface::WrappedResult &), T * object)\n  {\n    if (nav2ActionInterface_)\n    {\n      return nav2ActionInterface_->onNavigationSucceeded(callback, object);\n    }\n    return smacc2::SmaccSignalConnection();\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onNavigationAborted(\n    void (T::*callback)(const components::CpNav2ActionInterface::WrappedResult &), T * object)\n  {\n    if (nav2ActionInterface_)\n    {\n      return nav2ActionInterface_->onNavigationAborted(callback, object);\n    }\n    return smacc2::SmaccSignalConnection();\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onNavigationCancelled(\n    void (T::*callback)(const components::CpNav2ActionInterface::WrappedResult &), T * object)\n  {\n    if (nav2ActionInterface_)\n    {\n      return nav2ActionInterface_->onNavigationCancelled(callback, object);\n    }\n    return smacc2::SmaccSignalConnection();\n  }\n\n  // NEW: Component references instead of client reference\n  components::CpNav2ActionInterface * nav2ActionInterface_ = nullptr;\n  smacc2::client_core_components::CpActionClient<nav2_msgs::action::NavigateToPose> *\n    actionClient_ = nullptr;\n\n  // Common legacy member for result tracking\n  rclcpp_action::ResultCode navigationResult_;\n\n  // REMOVED: All legacy client-based members\n  // ❌ cl_nav2z::ClNav2Z * nav2zClient_\n  // ❌ cl_nav2z::ClNav2Z::SmaccNavigateResultSignal::SharedPtr navigationCallback_\n  // ❌ rclcpp_action::ResultCode navigationResult_\n  // ❌ goalHandleFuture_\n\n  // Virtual methods for derived classes - now use component types\n  virtual void onNavigationResult(const components::CpNav2ActionInterface::WrappedResult &) {}\n  virtual void onNavigationActionSuccess(const components::CpNav2ActionInterface::WrappedResult &)\n  {\n  }\n  virtual void onNavigationActionAbort(const components::CpNav2ActionInterface::WrappedResult &) {}\n};\n\nenum class SpinningPlanner\n{\n  Default,\n  PureSpinning,\n  Forward\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_backwards.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n\n#include <optional>\n\n#include <cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator.hpp>\n#include \"cb_nav2z_client_behavior_base.hpp\"\n\nnamespace cl_nav2z\n{\n// It sends the mobile base some distance backwards\nclass CbNavigateBackwards : public CbNav2ZClientBehaviorBase\n{\npublic:\n  float backwardDistance;\n\n  // just a stub to show how to use parameterless constructor\n  std::optional<float> backwardSpeed;\n\n  std::optional<std::string> goalChecker_;\n\n  cl_nav2z::odom_tracker::CpOdomTracker * odomTracker_;\n\n  CbNavigateBackwards(float backwardDistanceMeters);\n\n  void onEntry() override;\n\n  void onExit() override;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_forward.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <tf2/utils.h>\n#include <tf2_ros/buffer.h>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include <optional>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n\n#include \"cb_nav2z_client_behavior_base.hpp\"\n\nnamespace cl_nav2z\n{\nstruct CbNavigateForwardOptions\n{\n  // just a stub to show how to use parameterless constructor\n  std::optional<float> forwardSpeed;\n\n  // this may be useful in the case you want to do a straight line with some known direction\n  // and the robot may not have that specific initial orientation at that moment.\n  // If it is not set, the orientation of the straight line is the orientation of the initial (current) state.\n  std::optional<geometry_msgs::msg::Quaternion> forceInitialOrientation;\n\n  // the name of the goal checker selected in the navigation2 stack\n  std::optional<std::string> goalChecker_;\n};\n\n// Performs a relative motion forwards\nclass CbNavigateForward : public CbNav2ZClientBehaviorBase\n{\npublic:\n  CbNavigateForwardOptions options;\n\n  CbNavigateForward();\n\n  CbNavigateForward(float forwardDistance);\n\n  // alternative forward motion using an absolute goal position instead a relative linear distance.\n  // It is specially to retry a previous relative incorrect motions based on distance.\n  // The developer user is in charge of setting a valid goal position that is located forward\n  // from the current position and orientation.\n  CbNavigateForward(geometry_msgs::msg::PoseStamped goalPosition);\n\n  virtual ~CbNavigateForward();\n\n  void onEntry() override;\n\n  void onExit() override;\n\n  void setForwardDistance(float distance_meters);\n\nprotected:\n  // required component\n  odom_tracker::CpOdomTracker * odomTracker_;\n\n  std::optional<geometry_msgs::msg::PoseStamped> goalPose_;\n\n  std::optional<float> forwardDistance_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_global_position.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <geometry_msgs/msg/point.hpp>\n#include <geometry_msgs/msg/pose.hpp>\n#include <nav2_msgs/action/navigate_to_pose.hpp>\n\n#include \"cb_nav2z_client_behavior_base.hpp\"\n\nnamespace cl_nav2z\n{\nstruct CbNavigateGlobalPositionOptions\n{\n  // std::optional<float> yawTolerance;\n  // std::optional<float> yawToleranceX;\n  // std::optional<float> yawToleranceY;\n\n  std::optional<std::string> goalChecker_;\n\n  std::optional<std::string> controllerName_;\n};\n\nclass CbNavigateGlobalPosition : public CbNav2ZClientBehaviorBase\n{\npublic:\n  float goalYaw;\n\n  CbNavigateGlobalPositionOptions options;\n  geometry_msgs::msg::Point goalPosition;\n\n  CbNavigateGlobalPosition();\n\n  CbNavigateGlobalPosition(\n    float x, float y, float yaw /*radians*/,\n    std::optional<CbNavigateGlobalPositionOptions> options = std::nullopt);\n\n  void setGoal(const geometry_msgs::msg::Pose & pose);\n\n  virtual void onEntry() override;\n\n  // This is the substate destructor. This code will be executed when the\n  // workflow exits from this substate (that is according to statechart the moment when this object is destroyed)\n  void onExit() override;\n\n  // auxiliary function that defines the motion that is requested to the navigation2 action server\n  void execute();\n\nprivate:\n  void readStartPoseFromParameterServer(nav2_msgs::action::NavigateToPose::Goal & goal);\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_named_waypoint.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator.hpp>\n#include \"cb_nav2z_client_behavior_base.hpp\"\n#include \"cb_navigate_next_waypoint.hpp\"\n\nnamespace cl_nav2z\n{\nclass CbNavigateNamedWaypoint : public CbNavigateNextWaypoint\n{\npublic:\n  CbNavigateNamedWaypoint(\n    std::string waypointname, std::optional<NavigateNextWaypointOptions> options = std::nullopt);\n\n  virtual ~CbNavigateNamedWaypoint();\n\n  void onEntry() override;\n\n  void onExit() override;\n\n  CpWaypointNavigator * waypointsNavigator_;\n\n  std::string waypointname_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_next_waypoint.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator.hpp>\n\n#include \"cb_nav2z_client_behavior_base.hpp\"\n\nnamespace cl_nav2z\n{\nclass CbNavigateNextWaypoint : public CbNav2ZClientBehaviorBase\n{\npublic:\n  CbNavigateNextWaypoint(std::optional<NavigateNextWaypointOptions> options = std::nullopt);\n\n  virtual ~CbNavigateNextWaypoint();\n\n  void onEntry() override;\n\n  void onExit() override;\n\nprotected:\n  CpWaypointNavigator * waypointsNavigator_;\n\n  NavigateNextWaypointOptions options_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_next_waypoint_free.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n#include <cl_nav2z/client_behaviors/cb_position_control_free_space.hpp>\n#include <cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator_base.hpp>\n\nnamespace cl_nav2z\n{\n\nclass CbNavigateNextWaypointFree : public cl_nav2z::CbPositionControlFreeSpace\n{\npublic:\n  CbNavigateNextWaypointFree();\n\n  virtual ~CbNavigateNextWaypointFree();\n\n  void onEntry() override;\n\n  void onSucessCallback();\n\n  void onExit() override;\n\nprotected:\n  cl_nav2z::CpWaypointNavigatorBase * waypointsNavigator_;\n};\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_navigate_next_waypoint_until_reached.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_nav2z/components/nav2_action_interface/cp_nav2_action_interface.hpp>\n#include \"cb_navigate_next_waypoint.hpp\"\n\nnamespace cl_nav2z\n{\ntemplate <typename AsyncCB, typename Orthogonal>\nstruct EvGoalWaypointReached : sc::event<EvGoalWaypointReached<AsyncCB, Orthogonal>>\n{\n};\n\nclass CbNavigateNextWaypointUntilReached : public CbNavigateNextWaypoint\n{\npublic:\n  CbNavigateNextWaypointUntilReached(\n    std::string goalWaypointName,\n    std::optional<NavigateNextWaypointOptions> options = std::nullopt);\n\n  virtual ~CbNavigateNextWaypointUntilReached();\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    CbNavigateNextWaypoint::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n\n    postEvGoalWaypointReached_ = [this]()\n    { this->postEvent<EvGoalWaypointReached<TSourceObject, TOrthogonal>>(); };\n  }\n\n  void onEntry() override;\n\n  void onExit() override;\n\n  void onNavigationActionSuccess(\n    const components::CpNav2ActionInterface::WrappedResult & r) override\n  {\n    // if (!isOwnActionResponse(r))\n    // {\n    //   RCLCPP_WARN(\n    //     getLogger(), \"[%s] Propagating success event skipped. Action response is not ours.\",\n    //     getName().c_str());\n    //   return;\n    // }\n\n    navigationResult_ = r.code;\n\n    RCLCPP_INFO(\n      getLogger(), \"[%s] Propagating success event from action server\", getName().c_str());\n\n    this->requiresComponent(waypointsNavigator_, ComponentRequirement::HARD);\n\n    auto current_waypoint_name = waypointsNavigator_->getCurrentWaypointName();\n\n    if (current_waypoint_name == this->goalWaypointName_)\n    {\n      RCLCPP_INFO(\n        getLogger(),\n        \"[CbNavigateNextWaypointUntilReached] GoalReached current iteration waypoint i: %ld with \"\n        \"name '%s'\",\n        waypointsNavigator_->getCurrentWaypointIndex(), current_waypoint_name->c_str());\n\n      this->postEvGoalWaypointReached_();\n    }\n    else\n    {\n      RCLCPP_INFO(\n        getLogger(),\n        \"[CbNavigateNextWaypointUntilReached] goal:'%s' current:'%s'. keep navigating.\",\n        goalWaypointName_.c_str(), current_waypoint_name->c_str());\n    }\n\n    this->postSuccessEvent();\n  }\n\nprivate:\n  std::string goalWaypointName_;\n\n  std::function<void()> postEvGoalWaypointReached_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_pause_slam.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_nav2z/components/slam_toolbox/cp_slam_toolbox.hpp>\n#include <slam_toolbox/srv/pause.hpp>\n#include <smacc2/client_behaviors/cb_call_service.hpp>\n\nnamespace cl_nav2z\n{\nclass CbPauseSlam : public smacc2::client_behaviors::CbServiceCall<slam_toolbox::srv::Pause>\n{\npublic:\n  CbPauseSlam(std::string serviceName = \"/slam_toolbox/pause_new_measurements\");\n  void onEntry() override;\n\nprotected:\n  CpSlamToolbox * slam_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_position_control_free_space.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n#include <geometry_msgs/msg/twist.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_nav2z\n{\nstruct CbPositionControlFreeSpace : public smacc2::SmaccAsyncClientBehavior\n{\nprivate:\n  double targetYaw_;\n  bool goalReached_;\n  double k_betta_;\n  double max_angular_yaw_speed_;\n\n  double prev_error_linear_ = 0.0;\n  double prev_error_angular_ = 0.0;\n  double integral_linear_ = 0.0;\n  double integral_angular_ = 0.0;\n\n  // Limit the maximum linear velocity and angular velocity to avoid sudden\n  // movements\n  double max_linear_velocity = 1.0;   // Adjust this value according to your needs\n  double max_angular_velocity = 1.0;  // Adjust this value according to your needs\n\n  rclcpp::Publisher<geometry_msgs::msg::Twist>::SharedPtr cmd_vel_pub_;\n\npublic:\n  double yaw_goal_tolerance_rads_ = 0.1;\n\n  double threshold_distance_ = 3.0;\n\n  geometry_msgs::msg::Pose target_pose_;\n\n  CbPositionControlFreeSpace();\n\n  void updateParameters();\n\n  void onEntry() override;\n\n  void onExit() override;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_pure_spinning.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <geometry_msgs/msg/twist.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_nav2z\n{\nstruct CbPureSpinning : public smacc2::SmaccAsyncClientBehavior\n{\nprivate:\n  double targetYaw__rads;\n  bool goalReached_;\n  double k_betta_;\n  double max_angular_yaw_speed_;\n\n  rclcpp::Publisher<geometry_msgs::msg::Twist>::SharedPtr cmd_vel_pub_;\n\npublic:\n  double yaw_goal_tolerance_rads_;\n\n  CbPureSpinning(double targetYaw_rads, double max_angular_yaw_speed = 0.5);\n  void updateParameters();\n\n  void onEntry() override;\n\n  void onExit() override;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_resume_slam.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <slam_toolbox/srv/pause.hpp>\n#include \"cl_nav2z/components/slam_toolbox/cp_slam_toolbox.hpp\"\n#include \"smacc2/client_behaviors/cb_call_service.hpp\"\n\nnamespace cl_nav2z\n{\nclass CbResumeSlam : public smacc2::client_behaviors::CbServiceCall<slam_toolbox::srv::Pause>\n{\npublic:\n  CbResumeSlam(std::string serviceName = \"/slam_toolbox/pause_new_measurements\");\n  void onEntry() override;\n\nprotected:\n  CpSlamToolbox * slam_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_retry_behavior.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <optional>\n#include \"cb_nav2z_client_behavior_base.hpp\"\n\nnamespace cl_nav2z\n{\nusing odom_tracker::CpOdomTracker;\n\ntemplate <typename TCbRelativeMotion>\nclass CbRetry : public TCbRelativeMotion\n{\npublic:\n  CbRetry() {}\n  void onEntry() override\n  {\n    this->requiresComponent(odomTracker_, ComponentRequirement::HARD);\n\n    auto goal = odomTracker_->getCurrentMotionGoal();\n\n    if (goal)\n    {\n      this->goalPose_ = *goal;\n    }\n\n    TCbRelativeMotion::onEntry();\n  }\n\nprivate:\n  CpOdomTracker * odomTracker_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_rotate.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <tf2_ros/buffer.h>\n\n#include \"cb_nav2z_client_behavior_base.hpp\"\n\nnamespace cl_nav2z\n{\nclass CbRotate : public CbNav2ZClientBehaviorBase\n{\npublic:\n  float rotateDegree;\n\n  std::optional<std::string> goalChecker_;\n\n  std::optional<cl_nav2z::SpinningPlanner> spinningPlanner;\n\n  CbRotate(float rotate_degree);\n\n  CbRotate(float rotate_degree, cl_nav2z::SpinningPlanner spinning_planner);\n\n  void onEntry() override;\n\nprivate:\n  //TODO: replace this with the Pose Component in the same way it is done in the CbAbsoluteRotateBehavior\n  std::shared_ptr<tf2_ros::Buffer> listener;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_rotate_look_at.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <tf2_ros/buffer.h>\n\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include \"cb_absolute_rotate.hpp\"\n#include \"tf2_geometry_msgs/tf2_geometry_msgs.hpp\"\n\nnamespace cl_nav2z\n{\nclass CbRotateLookAt : public CbAbsoluteRotate\n{\npublic:\n  std::shared_ptr<tf2_ros::Buffer> listener;\n\n  std::optional<geometry_msgs::msg::PoseStamped> lookAtPose_;\n\n  CbRotateLookAt();\n  CbRotateLookAt(const geometry_msgs::msg::PoseStamped & lookAtPose);\n\n  void onEntry() override;\n  // void onExit() override;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_save_slam_map.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <memory>\n#include <nav2_msgs/srv/save_map.hpp>\n#include <slam_toolbox/srv/save_map.hpp>\n#include <smacc2/client_behaviors/cb_call_service.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace std::chrono_literals;\ntemplate <typename TService>\nusing CbServiceCall = smacc2::client_behaviors::CbServiceCall<TService>;\n\nstruct CbSaveSlamMap : public CbServiceCall<nav2_msgs::srv::SaveMap>\n{\npublic:\n  CbSaveSlamMap();\n  // void onEntry() override {}\n\n  void onExit() override;\n\n  std::shared_ptr<nav2_msgs::srv::SaveMap::Request> getRequest(\n    /*slam_toolbox::srv::SaveMap_Request_<std::allocator<void> >::_name_type saved_map_name*/);\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_seek_waypoint.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator.hpp>\n\n#include \"cb_nav2z_client_behavior_base.hpp\"\n\nnamespace cl_nav2z\n{\nclass CbSeekWaypoint : public smacc2::SmaccClientBehavior\n{\npublic:\n  CbSeekWaypoint(std::string skip_until_name);\n\n  virtual ~CbSeekWaypoint();\n\n  void onEntry() override;\n\n  void onExit() override;\n\n  CpWaypointNavigator * waypointsNavigator_;\n\n  NavigateNextWaypointOptions options_;\n\nprivate:\n  std::optional<int> count_;\n  std::optional<std::string> seekWaypointName_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_spiral_motion.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_nav2z\n{\n\n// client behaviors typically accept parameters to be customized in the state it is being used\n// we follow this pattern, with a basic structure with optional fields, that make thee initialization of the behavior more readable in the\n// state initialization. It also avoid an explosion of constructors for each variation of the parameters.\nstruct CbSpiralMotionOptions\n{\n  std::optional<float> linearVelocity = 0.0f;\n  std::optional<float> maxLinearVelocity = 0.5f;\n  std::optional<float> initialAngularVelocity = 1.5f;\n  std::optional<rclcpp::Duration> spiralMotionDuration = rclcpp::Duration::from_seconds(40);\n  std::optional<float> finalRadius = 20.0f;  //meters\n};\n\n/* a basic client behavior has a simple onEntry and onExit functions. When we enter into a stae we call onEntry.\nThis client behavior is asynchronous so that onEntry returns immediately, it opens a thread to run the behavior*/\nstruct CbSpiralMotion : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  //\n  // constructor, we accept an empty usag of the behavior, but also any other combination of parameters\n  CbSpiralMotion(std::optional<CbSpiralMotionOptions> options = std::nullopt);\n\n  void onEntry() override;\n\n  void onExit() override;\n\nprivate:\n  // this client behavior has its own temporal publisher to control the robot\n  rclcpp::Publisher<geometry_msgs::msg::Twist>::SharedPtr cmdVelPub_;\n\n  // we store the options that customize the behavior\n  CbSpiralMotionOptions options_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_stop_navigation.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <tf2_ros/buffer.h>\n\n#include \"cb_nav2z_client_behavior_base.hpp\"\n#include \"cb_navigate_global_position.hpp\"\n#include \"tf2_geometry_msgs/tf2_geometry_msgs.hpp\"\n\nnamespace cl_nav2z\n{\nclass CbStopNavigation : public CbNavigateGlobalPosition\n{\npublic:\n  CbStopNavigation();\n\n  void onEntry() override;\n  void onExit() override;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_track_path_odometry.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_nav2z\n{\nstruct CbTrackPathOdometry : public smacc2::SmaccAsyncClientBehavior\n{\nprivate:\npublic:\n  CbTrackPathOdometry();\n\n  void onEntry() override;\n\n  void onExit() override;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_track_path_slam.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_nav2z\n{\nstruct CbTrackPathSLAM : public smacc2::SmaccAsyncClientBehavior\n{\nprivate:\npublic:\n  CbTrackPathSLAM();\n\n  void onEntry() override;\n\n  void onExit() override;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_undo_path_backwards.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <tf2_ros/buffer.h>\n\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include \"cb_nav2z_client_behavior_base.hpp\"\n\nnamespace cl_nav2z\n{\nusing ::cl_nav2z::odom_tracker::CpOdomTracker;\n\nstruct CbUndoPathBackwardsOptions\n{\n  // the name of the goal checker selected in the navigation2 stack\n  std::optional<std::string> goalCheckerId_;\n\n  // the name of the goal checker selected in the navigation2 stack\n  std::optional<std::string> undoControllerName_;\n};\n\nclass CbUndoPathBackwards : public CbNav2ZClientBehaviorBase\n{\npublic:\n  CbUndoPathBackwards(std::optional<CbUndoPathBackwardsOptions> options = std::nullopt);\n\n  void onEntry() override;\n\n  void onExit() override;\n\nprivate:\n  std::shared_ptr<tf2_ros::Buffer> listener;\n\n  CpOdomTracker * odomTracker;\n\n  std::optional<CbUndoPathBackwardsOptions> options_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_wait_nav2_nodes.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <tf2_ros/buffer.h>\n\n#include <bond/msg/status.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_nav2z\n{\nenum class Nav2Nodes\n{\n  PlannerServer,\n  ControllerServer,\n  RecoveriesServer,\n  BtNavigator,\n  MapServer,\n  None\n};\n\nstd::string toString(Nav2Nodes value);\n\nNav2Nodes fromString(std::string str);\n\nclass CbWaitNav2Nodes : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbWaitNav2Nodes(\n    std::string topicname,\n    std::vector<Nav2Nodes> waitNodes = {\n      Nav2Nodes::PlannerServer, Nav2Nodes::ControllerServer, Nav2Nodes::BtNavigator});\n\n  CbWaitNav2Nodes(\n    std::vector<Nav2Nodes> waitNodes = {\n      Nav2Nodes::PlannerServer, Nav2Nodes::ControllerServer, Nav2Nodes::BtNavigator});\n\n  void onEntry() override;\n\nprivate:\n  void onMessageReceived(const bond::msg::Status & msg);\n\n  std::string topicname_;\n\n  rclcpp::Subscription<bond::msg::Status>::SharedPtr sub_;\n  std::map<Nav2Nodes, bool> receivedAliveMsg_;\n\n  std::vector<Nav2Nodes> waitNodes_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_wait_pose.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_nav2z\n{\n// waits a robot pose message. Usually used for the startup synchronization.\nenum class WaitPoseStandardReferenceFrame\n{\n  Map,\n  Odometry\n};\n\n// Waits a new pose using the Pose Component\n// the specific pose to wait is configured in that component\nclass CbWaitPose : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  // waits a new pose update of the Pose Component\n  CbWaitPose();\n\n  // waits a new pose update of the Pose Component in some reference frame (if there is no connection it will wait)\n  CbWaitPose(WaitPoseStandardReferenceFrame frame);\n\n  virtual ~CbWaitPose();\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    this->requiresClient(nav2zClient_);\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n  }\n\n  void onEntry() override;\n\nprotected:\n  cl_nav2z::ClNav2Z * nav2zClient_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors/cb_wait_transform.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n\n#include <tf2/transform_datatypes.h>\n#include <tf2/utils.h>\n#include <tf2_ros/buffer.h>\n#include <tf2_ros/transform_listener.h>\n\nnamespace cl_nav2z\n{\nclass CbWaitTransform : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbWaitTransform(std::string targetFrame, std::string referenceFrame, rclcpp::Duration timeout);\n\n  virtual ~CbWaitTransform();\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n  }\n\n  void onEntry() override;\n\nprotected:\n  // shared static listener\n  std::shared_ptr<tf2_ros::Buffer> tfBuffer_;\n  std::shared_ptr<tf2_ros::TransformListener> tfListener_;\n\n  std::string targetFrame_;\n  std::string referenceFrame_;\n  rclcpp::Duration timeout_;\n\n  std::optional<tf2::Stamped<tf2::Transform>> result_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/client_behaviors.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n// rotation behavior\n#include <cl_nav2z/client_behaviors/cb_absolute_rotate.hpp>\n#include <cl_nav2z/client_behaviors/cb_rotate.hpp>\n#include <cl_nav2z/client_behaviors/cb_rotate_look_at.hpp>\n\n#include <cl_nav2z/client_behaviors/cb_navigate_backwards.hpp>\n#include <cl_nav2z/client_behaviors/cb_navigate_forward.hpp>\n#include <cl_nav2z/client_behaviors/cb_navigate_global_position.hpp>\n#include <cl_nav2z/client_behaviors/cb_retry_behavior.hpp>\n#include <cl_nav2z/client_behaviors/cb_undo_path_backwards.hpp>\n\n// nav2 synchronization behaviors\n#include <cl_nav2z/client_behaviors/cb_wait_nav2_nodes.hpp>\n#include <cl_nav2z/client_behaviors/cb_wait_pose.hpp>\n#include <cl_nav2z/client_behaviors/cb_wait_transform.hpp>\n\n// others\n#include <cl_nav2z/client_behaviors/cb_abort_navigation.hpp>\n#include <cl_nav2z/client_behaviors/cb_stop_navigation.hpp>\n\n// waypoints behaviors\n#include <cl_nav2z/client_behaviors/cb_navigate_named_waypoint.hpp>\n#include <cl_nav2z/client_behaviors/cb_navigate_next_waypoint.hpp>\n#include <cl_nav2z/client_behaviors/cb_navigate_next_waypoint_until_reached.hpp>\n#include <cl_nav2z/client_behaviors/cb_seek_waypoint.hpp>\n\n// slam behaviors\n#include <cl_nav2z/client_behaviors/cb_pause_slam.hpp>\n#include <cl_nav2z/client_behaviors/cb_resume_slam.hpp>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/common.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <iostream>\n\n#include <tf2/transform_datatypes.h>\n#include <builtin_interfaces/msg/time.hpp>\n#include <geometry_msgs/msg/point.hpp>\n#include <geometry_msgs/msg/pose.hpp>\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include <geometry_msgs/msg/quaternion.hpp>\n#include <geometry_msgs/msg/quaternion_stamped.hpp>\n#include <nav2_msgs/action/navigate_to_pose.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Quaternion & msg);\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Pose & msg);\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Point & msg);\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::PoseStamped & msg);\nstd::ostream & operator<<(std::ostream & out, const nav2_msgs::action::NavigateToPose::Goal & msg);\nstd::ostream & operator<<(std::ostream & out, const builtin_interfaces::msg::Time & msg);\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/components/amcl/cp_amcl.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <geometry_msgs/msg/pose_with_covariance_stamped.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_nav2z\n{\nclass CpAmcl : public smacc2::ISmaccComponent\n{\npublic:\n  CpAmcl();\n  virtual ~CpAmcl();\n\n  std::string getName() const override;\n\n  void onInitialize() override;\n\n  void setInitialPose(const geometry_msgs::msg::PoseWithCovarianceStamped & initialpose);\n\nprivate:\n  rclcpp::Publisher<geometry_msgs::msg::PoseWithCovarianceStamped>::SharedPtr initalPosePub_;\n};\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/components/costmap_switch/cp_costmap_switch.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <array>\n#include <functional>\n#include <map>\n#include <memory>\n#include <string>\n\n#include <rclcpp/rclcpp.hpp>\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <smacc2/component.hpp>\n\n// #include <dynamic_reconfigure/DoubleParameter.h>\n// #include <dynamic_reconfigure/Reconfigure.h>\n// #include <dynamic_reconfigure/Config.h>\n\nnamespace cl_nav2z\n{\nclass CpCostmapProxy;\n\nclass CpCostmapSwitch : public smacc2::ISmaccComponent\n{\npublic:\n  enum class StandardLayers\n  {\n    GLOBAL_OBSTACLES_LAYER = 0,\n    LOCAL_OBSTACLES_LAYER = 1,\n    GLOBAL_INFLATED_LAYER = 2,\n    LOCAL_INFLATED_LAYER = 3\n  };\n\n  static std::array<std::string, 4> layerNames;\n\n  CpCostmapSwitch();\n\n  void onInitialize() override;\n\n  static std::string getStandardCostmapName(StandardLayers layertype);\n\n  bool exists(std::string layerName);\n\n  void enable(std::string layerName);\n\n  void enable(StandardLayers layerType);\n\n  void disable(std::string layerName);\n\n  void disable(StandardLayers layerType);\n\n  void registerProxyFromDynamicReconfigureServer(\n    std::string costmapName, std::string enablePropertyName = \"enabled\");\n\nprivate:\n  std::map<std::string, std::shared_ptr<CpCostmapProxy>> costmapProxies;\n  cl_nav2z::ClNav2Z * nav2zClient_;\n};\n//-------------------------------------------------------------------------\nclass CpCostmapProxy\n{\npublic:\n  CpCostmapProxy(\n    std::string costmap_name, std::string enablePropertyName, rclcpp::Node::SharedPtr nh);\n\n  void setCostmapEnabled(bool value);\n\nprivate:\n  std::string costmapName_;\n  rclcpp::Node::SharedPtr nh_;\n\n  inline rclcpp::Node::SharedPtr getNode() { return nh_; }\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <string>\n\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/component.hpp>\n#include <std_msgs/msg/string.hpp>\n\nnamespace cl_nav2z\n{\n// this class is used to switch the current goal checker of the remote navigation2 stack controller\nclass CpGoalCheckerSwitcher : public smacc2::ISmaccComponent\n{\npublic:\n  CpGoalCheckerSwitcher(\n    std::string goal_checker_selector_topic = \"goal_checker_selector\",\n    std::string default_goal_checker_name = \"goal_checker\");\n  void onInitialize() override;\n  virtual ~CpGoalCheckerSwitcher();\n  void setDefaultGoalChecker();\n  void setGoalCheckerId(std::string goal_checker_id);\n\nprivate:\n  std::string goal_checker_selector_topic_;\n  std::string default_goal_checker_name_;\n  rclcpp::Publisher<std_msgs::msg::String>::SharedPtr goal_checker_selector_pub_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/components/nav2_action_interface/cp_nav2_action_interface.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include <nav2_msgs/action/navigate_to_pose.hpp>\n#include <smacc2/client_core_components/cp_action_client.hpp>\n#include <smacc2/component.hpp>\n#include <smacc2/smacc_signal.hpp>\n\n#include <functional>\n#include <future>\n\nnamespace cl_nav2z\n{\nnamespace components\n{\nusing namespace smacc2;\n\nclass CpNav2ActionInterface : public smacc2::ISmaccComponent\n{\npublic:\n  // Type aliases for convenience\n  using ActionType = nav2_msgs::action::NavigateToPose;\n  using Goal = ActionType::Goal;\n  using Result = ActionType::Result;\n  using Feedback = ActionType::Feedback;\n  using GoalHandle = rclcpp_action::ClientGoalHandle<ActionType>;\n  using WrappedResult = typename GoalHandle::WrappedResult;\n  using ActionClient = smacc2::client_core_components::CpActionClient<ActionType>;\n\n  // Nav2-specific signals for external subscribers\n  smacc2::SmaccSignal<void(const WrappedResult &)> onNavigationSucceeded_;\n  smacc2::SmaccSignal<void(const WrappedResult &)> onNavigationAborted_;\n  smacc2::SmaccSignal<void(const WrappedResult &)> onNavigationCancelled_;\n  smacc2::SmaccSignal<void(const Feedback &)> onNavigationFeedback_;\n\n  // Nav2-specific event posting functions (set during orthogonal allocation)\n  std::function<void(const WrappedResult &)> postNavigationSuccessEvent;\n  std::function<void(const WrappedResult &)> postNavigationAbortedEvent;\n  std::function<void(const WrappedResult &)> postNavigationCancelledEvent;\n  std::function<void(const Feedback &)> postNavigationFeedbackEvent;\n\n  CpNav2ActionInterface() = default;\n  virtual ~CpNav2ActionInterface() = default;\n\n  // Public API for behaviors and other components\n  std::shared_future<typename GoalHandle::SharedPtr> sendNavigationGoal(\n    const geometry_msgs::msg::PoseStamped & target)\n  {\n    if (!actionClient_)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CpNav2ActionInterface] Action client not available!\");\n      throw std::runtime_error(\"Action client not initialized\");\n    }\n\n    Goal goal;\n    goal.pose = target;\n\n    // Set default behavior_tree if not specified\n    if (goal.behavior_tree.empty())\n    {\n      goal.behavior_tree = \"\";  // Let Nav2 use default behavior tree\n    }\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[CpNav2ActionInterface] Sending navigation goal to: \"\n                     << \"x=\" << target.pose.position.x << \", y=\" << target.pose.position.y\n                     << \", frame=\" << target.header.frame_id);\n\n    return actionClient_->sendGoal(goal);\n  }\n\n  std::shared_future<typename GoalHandle::SharedPtr> sendGoal(Goal & goal)\n  {\n    if (!actionClient_)\n    {\n      RCLCPP_ERROR(getLogger(), \"[CpNav2ActionInterface] Action client not available!\");\n      throw std::runtime_error(\"Action client not initialized\");\n    }\n\n    return actionClient_->sendGoal(goal);\n  }\n\n  bool cancelNavigation()\n  {\n    if (!actionClient_)\n    {\n      RCLCPP_WARN(getLogger(), \"[CpNav2ActionInterface] Action client not available for cancel!\");\n      return false;\n    }\n\n    RCLCPP_INFO(getLogger(), \"[CpNav2ActionInterface] Cancelling navigation goal\");\n    return actionClient_->cancelGoal();\n  }\n\n  bool isNavigationServerReady() const { return actionClient_ && actionClient_->isServerReady(); }\n\n  void waitForNavigationServer()\n  {\n    if (actionClient_)\n    {\n      actionClient_->waitForServer();\n    }\n  }\n\n  // Component lifecycle\n  template <typename TOrthogonal, typename TClient>\n  void onComponentInitialization()\n  {\n    // Set up nav2-specific event posting functions\n    postNavigationSuccessEvent = [this](const WrappedResult & result)\n    {\n      auto * ev = new smacc2::default_events::EvActionSucceeded<TClient, TOrthogonal>();\n      ev->resultMessage = result;\n      this->postEvent(ev);\n    };\n\n    postNavigationAbortedEvent = [this](const WrappedResult & result)\n    {\n      auto * ev = new smacc2::default_events::EvActionAborted<TClient, TOrthogonal>();\n      ev->resultMessage = result;\n      this->postEvent(ev);\n    };\n\n    postNavigationCancelledEvent = [this](const WrappedResult & result)\n    {\n      auto * ev = new smacc2::default_events::EvActionCancelled<TClient, TOrthogonal>();\n      ev->resultMessage = result;\n      this->postEvent(ev);\n    };\n\n    postNavigationFeedbackEvent = [this](const Feedback & feedback)\n    {\n      auto * ev = new smacc2::default_events::EvActionFeedback<Feedback, TOrthogonal>();\n      ev->feedbackMessage = feedback;\n      this->postEvent(ev);\n    };\n\n    RCLCPP_INFO(getLogger(), \"[CpNav2ActionInterface] Component initialized\");\n  }\n\n  void onInitialize() override\n  {\n    RCLCPP_INFO(getLogger(), \"[CpNav2ActionInterface] Component initializing\");\n\n    // Require the underlying action client component\n    this->requiresComponent(actionClient_, ComponentRequirement::HARD);\n\n    // Wire up signal connections from action client to nav2-specific signals\n    if (actionClient_)\n    {\n      // Connect action client signals to our nav2-specific signals and event posting using method pointers\n      // these are the main smacc signals in the action client, our navigation client behavior subscribes to them and reacts accordingly\n      // each derived behavior do something different in reaction to these signals\n      actionClient_->onSucceeded(&CpNav2ActionInterface::onNavigationSuccessCallback, this);\n      actionClient_->onAborted(&CpNav2ActionInterface::onNavigationAbortedCallback, this);\n      actionClient_->onCancelled(&CpNav2ActionInterface::onNavigationCancelledCallback, this);\n      actionClient_->onFeedback(&CpNav2ActionInterface::onNavigationFeedbackCallback, this);\n\n      RCLCPP_INFO(getLogger(), \"[CpNav2ActionInterface] Signal connections established\");\n    }\n    else\n    {\n      RCLCPP_ERROR(\n        getLogger(), \"[CpNav2ActionInterface] Action client not found during initialization!\");\n    }\n  }\n\n  // Access to underlying action client for advanced usage\n  ActionClient * getActionClient() const { return actionClient_; }\n\n  // These methods are used by other client behavior and components that want to react to navigation events.\n  template <typename T>\n  smacc2::SmaccSignalConnection onNavigationSucceeded(\n    void (T::*callback)(const WrappedResult &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(\n      onNavigationSucceeded_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onNavigationAborted(\n    void (T::*callback)(const WrappedResult &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onNavigationAborted_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onNavigationCancelled(\n    void (T::*callback)(const WrappedResult &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(\n      onNavigationCancelled_, callback, object);\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onNavigationFeedback(\n    void (T::*callback)(const Feedback &), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onNavigationFeedback_, callback, object);\n  }\n\nprivate:\n  smacc2::client_core_components::CpActionClient<ActionType> * actionClient_ = nullptr;\n\n  // Event translation callbacks\n  void onNavigationSuccessCallback(const WrappedResult & result)\n  {\n    RCLCPP_INFO(getLogger(), \"[CpNav2ActionInterface] Navigation succeeded\");\n    onNavigationSucceeded_(result);\n    if (postNavigationSuccessEvent)\n    {\n      postNavigationSuccessEvent(result);\n    }\n  }\n\n  void onNavigationAbortedCallback(const WrappedResult & result)\n  {\n    RCLCPP_WARN(getLogger(), \"[CpNav2ActionInterface] Navigation aborted\");\n    onNavigationAborted_(result);\n    if (postNavigationAbortedEvent)\n    {\n      postNavigationAbortedEvent(result);\n    }\n  }\n\n  void onNavigationCancelledCallback(const WrappedResult & result)\n  {\n    RCLCPP_INFO(getLogger(), \"[CpNav2ActionInterface] Navigation cancelled\");\n    onNavigationCancelled_(result);\n    if (postNavigationCancelledEvent)\n    {\n      postNavigationCancelledEvent(result);\n    }\n  }\n\n  void onNavigationFeedbackCallback(const Feedback & feedback)\n  {\n    RCLCPP_DEBUG(getLogger(), \"[CpNav2ActionInterface] Navigation feedback received\");\n    onNavigationFeedback_(feedback);\n    if (postNavigationFeedbackEvent)\n    {\n      postNavigationFeedbackEvent(feedback);\n    }\n  }\n};\n\n}  // namespace components\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <tf2/transform_datatypes.h>\n#include <smacc2/common.hpp>\n#include <smacc2/component.hpp>\n\n#include <rclcpp/rclcpp.hpp>\n\n#include <memory>\n#include <mutex>\n#include <vector>\n\n#include <geometry_msgs/msg/point.hpp>\n#include <geometry_msgs/msg/pose.hpp>\n#include <nav2_msgs/action/navigate_to_pose.hpp>\n#include <nav_msgs/msg/odometry.hpp>\n#include <nav_msgs/msg/path.hpp>\n\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n#include <std_msgs/msg/header.hpp>\n\nnamespace cl_nav2z\n{\nnamespace odom_tracker\n{\nenum class WorkingMode : uint8_t\n{\n  RECORD_PATH = 0,\n  CLEAR_PATH = 1,\n  IDLE = 2\n};\n\nenum class OdomTrackerStrategy\n{\n  ODOMETRY_SUBSCRIBER,\n  POSE_COMPONENT\n};\n\n/// This object tracks and saves the trajectories performed by the vehicle\n/// so that they can be used later to execute operations such as \"undo motions\"\nclass CpOdomTracker : public smacc2::ISmaccComponent\n{\npublic:\n  // by default, the component start in record_path mode and publishing the\n  // current path\n  CpOdomTracker(\n    std::string odomtopicName = \"/odom\", std::string odomFrame = \"odom\",\n    OdomTrackerStrategy strategy = OdomTrackerStrategy::ODOMETRY_SUBSCRIBER);\n\n  // threadsafe\n  /// odom callback: Updates the path - this must be called periodically for each odometry message.\n  // The odom parameters is the main input of this tracker\n  virtual void processNewPose(const geometry_msgs::msg::PoseStamped & odom);\n\n  virtual void odomMessageCallback(const nav_msgs::msg::Odometry::SharedPtr odom);\n\n  virtual void update();\n\n  // ------ CONTROL COMMANDS ---------------------\n  // threadsafe\n  void setWorkingMode(WorkingMode workingMode);\n\n  // threadsafe\n  void setPublishMessages(bool value);\n\n  // threadsafe\n  void pushPath();\n\n  // threadsafe\n  void pushPath(std::string pathname);\n\n  // threadsafe\n  void popPath(int pathCount = 1, bool keepPreviousPath = false);\n\n  // threadsafe\n  void clearPath();\n\n  // threadsafe\n  void setStartPoint(const geometry_msgs::msg::PoseStamped & pose);\n\n  // threadsafe\n  void setStartPoint(const geometry_msgs::msg::Pose & pose);\n\n  // threadsafe - use only for recording mode, it is reset always a new path is pushed, popped or cleared\n  void setCurrentMotionGoal(const geometry_msgs::msg::PoseStamped & pose);\n\n  void setCurrentPathName(const std::string & currentPathName);\n\n  // threadsafe\n  std::optional<geometry_msgs::msg::PoseStamped> getCurrentMotionGoal();\n\n  // threadsafe\n  nav_msgs::msg::Path getPath();\n\n  void logStateString(bool debug = true);\n\n  // parameters update callback\n  void updateParameters();\n\n  inline void setOdomFrame(std::string odomFrame)\n  {\n    odomFrame_ = odomFrame;\n    getNode()->set_parameter(rclcpp::Parameter(\"odom_frame\", odomFrame));\n  }\n\nprotected:\n  void onInitialize() override;\n\n  void updateConfiguration();\n\n  virtual void rtPublishPaths(rclcpp::Time timestamp);\n\n  // this is called when a new odom message is received in record path mode\n  virtual bool updateRecordPath(const geometry_msgs::msg::PoseStamped & odom);\n\n  // this is called when a new odom message is received in clear path mode\n  virtual bool updateClearPath(const geometry_msgs::msg::PoseStamped & odom);\n\n  void updateAggregatedStackPath();\n\n  // -------------- OUTPUTS ---------------------\n  rclcpp::Publisher<nav_msgs::msg::Path>::SharedPtr robotBasePathPub_;\n  rclcpp::Publisher<nav_msgs::msg::Path>::SharedPtr robotBasePathStackedPub_;\n\n  // --------------- INPUTS ------------------------\n  // optional, this class can be used directly calling the odomProcessing method\n  // without any subscriber\n  rclcpp::Subscription<nav_msgs::msg::Odometry>::SharedPtr odomSub_;\n\n  cl_nav2z::CpPose * robotPose_;\n  rclcpp::TimerBase::SharedPtr robotPoseTimer_;\n\n  // -------------- PARAMETERS ----------------------\n  /// How much distance there is between two points of the path\n  double recordPointDistanceThreshold_;\n\n  /// Meters\n  double recordAngularDistanceThreshold_;\n\n  /// rads\n  double clearPointDistanceThreshold_;\n\n  /// rads\n  double clearAngularDistanceThreshold_;\n\n  std::string odomFrame_;\n\n  std::string odomTopicName_;\n\n  // --------------- STATE ---------------\n  // default true\n  bool publishMessages;\n\n  /// Processed path for the mouth of the reel\n  nav_msgs::msg::Path baseTrajectory_;\n\n  WorkingMode workingMode_;\n\n  std::vector<nav_msgs::msg::Path> pathStack_;\n\n  struct PathInfo\n  {\n    std::string name;\n    std::optional<geometry_msgs::msg::PoseStamped> goalPose;\n  };\n\n  std::vector<PathInfo> pathInfos_;\n\n  nav_msgs::msg::Path aggregatedStackPathMsg_;\n\n  OdomTrackerStrategy strategy_;\n\n  std::optional<geometry_msgs::msg::PoseStamped> currentMotionGoal_;\n  std::string currentPathName_;\n\n  rcl_interfaces::msg::SetParametersResult parametersCallback(\n    const std::vector<rclcpp::Parameter> & parameters);\n\n  rclcpp::node_interfaces::OnSetParametersCallbackHandle::SharedPtr param_callback_handle_;\n\n  std::mutex m_mutex_;\n};\n\n/**\n ******************************************************************************************************************\n * p2pDistance()\n ******************************************************************************************************************\n */\ninline double p2pDistance(\n  const geometry_msgs::msg::Point & p1, const geometry_msgs::msg::Point & p2)\n{\n  double dx = (p1.x - p2.x);\n  double dy = (p1.y - p2.y);\n  double dz = (p2.z - p2.z);\n  double dist = sqrt(dx * dx + dy * dy + dz * dz);\n  return dist;\n}\n}  // namespace odom_tracker\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/components/planner_switcher/cp_planner_switcher.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/client_bases/smacc_action_client.hpp>\n#include <smacc2/component.hpp>\n#include <std_msgs/msg/string.hpp>\n\nnamespace cl_nav2z\n{\n// this component is used to switch the current planner and controller interacting\n// with the remote navigation2 stack nodes (bt_navigator, planner_server, controller_server)\nclass CpPlannerSwitcher : public smacc2::ISmaccComponent\n{\npublic:\n  CpPlannerSwitcher();\n\n  void onInitialize() override;\n\n  void setDesiredGlobalPlanner(std::string);\n\n  void setDesiredController(std::string);\n\n  void commitPublish();\n\n  // STANDARD PLANNERS\n\n  void setBackwardPlanner(bool commit = true);\n\n  void setUndoPathBackwardPlanner(bool commit = true);\n\n  void setForwardPlanner(bool commit = true);\n\n  void setPureSpinningPlanner(bool commit = true);\n\n  // sets ROS defaults local and global planners\n  void setDefaultPlanners(bool commit = true);\n\nprivate:\n  std::string desired_planner_;\n\n  std::string desired_controller_;\n\n  bool set_planners_mode_flag_;\n\n  rclcpp::Publisher<std_msgs::msg::String>::SharedPtr planner_selector_pub_;\n\n  rclcpp::Publisher<std_msgs::msg::String>::SharedPtr controller_selector_pub_;\n\n  rclcpp::Publisher<std_msgs::msg::String>::SharedPtr goal_checker_selector_pub_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/components/pose/cp_pose.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *-2020\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <mutex>\n\n#include <geometry_msgs/msg/pose_stamped.h>\n#include <tf2/transform_datatypes.h>\n#include <tf2/utils.h>\n#include <tf2_ros/buffer.h>\n#include <tf2_ros/transform_listener.h>\n#include <geometry_msgs/msg/quaternion_stamped.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n\n#include <smacc2/component.hpp>\n#include <smacc2/smacc_updatable.hpp>\n\nnamespace cl_nav2z\n{\nenum class StandardReferenceFrames\n{\n  Map,\n  Odometry\n};\n\nclass CpPose : public smacc2::ISmaccComponent, public smacc2::ISmaccUpdatable\n{\npublic:\n  CpPose(std::string poseFrameName = \"base_link\", std::string referenceFrame = \"odom\");\n\n  CpPose(StandardReferenceFrames referenceFrame);\n\n  void onInitialize() override;\n\n  void update() override;\n\n  // synchronously waits a transform in the current thread\n  void waitTransformUpdate(rclcpp::Rate r = rclcpp::Rate(20));\n\n  inline geometry_msgs::msg::Pose toPoseMsg()\n  {\n    std::lock_guard<std::mutex> guard(m_mutex_);\n    return this->pose_.pose;\n  }\n\n  inline geometry_msgs::msg::PoseStamped toPoseStampedMsg()\n  {\n    RCLCPP_INFO_STREAM(getLogger(), \"[Pose] ToPoseMsg \");\n    std::lock_guard<std::mutex> guard(m_mutex_);\n    return this->pose_;\n  }\n\n  // get yaw in radians\n  float getYaw();\n\n  float getX();\n  float getY();\n  float getZ();\n\n  inline void setReferenceFrame(std::string referenceFrame) { referenceFrame_ = referenceFrame; }\n\n  inline const std::string & getReferenceFrame() const { return referenceFrame_; }\n\n  inline const std::string & getFrameId() const { return poseFrameName_; }\n\n  bool isInitialized;\n\n  std::optional<rclcpp::Time> frozenReferenceFrameTime;\n  void freezeReferenceFrame()\n  {\n    frozenReferenceFrameTime = getNode()->now() - rclcpp::Duration::from_seconds(1);\n  }\n\n  void unfreezeReferenceFrame() { frozenReferenceFrameTime = std::nullopt; }\n\nprivate:\n  geometry_msgs::msg::PoseStamped pose_;\n\n  static std::shared_ptr<tf2_ros::Buffer> tfBuffer_;\n  static std::shared_ptr<tf2_ros::TransformListener> tfListener_;\n\n  static std::mutex listenerMutex_;\n\n  std::string poseFrameName_;\n  std::string referenceFrame_;\n\n  std::mutex m_mutex_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/components/slam_toolbox/cp_slam_toolbox.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/client_bases/smacc_action_client.hpp>\n#include <smacc2/component.hpp>\n#include <std_msgs/msg/string.hpp>\n\nnamespace cl_nav2z\n{\n// stores the state of the last modification of the slam node\n// (blind - open loop solution because the node does not provide that information)\nclass CpSlamToolbox : public smacc2::ISmaccComponent\n{\npublic:\n  CpSlamToolbox();\n  virtual ~CpSlamToolbox();\n\n  enum class SlamToolboxState\n  {\n    Resumed,\n    Paused\n  };\n\n  inline SlamToolboxState getState() { return state_; }\n\n  void toggleState();\n\nprivate:\n  SlamToolboxState state_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/components/waypoints_navigator/cp_waypoints_event_dispatcher.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_nav2z\n\n/// @cond\n// The purpose of the cond and endcond tags seen above and below in this file are there to prevent doxygen from indexing the 256 events\n// below which makes the documentation produced unuseable.\n\n{\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint0 : sc::event<EvWaypoint0<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint1 : sc::event<EvWaypoint1<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint2 : sc::event<EvWaypoint2<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint3 : sc::event<EvWaypoint3<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint4 : sc::event<EvWaypoint4<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint5 : sc::event<EvWaypoint5<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint6 : sc::event<EvWaypoint6<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint7 : sc::event<EvWaypoint7<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint8 : sc::event<EvWaypoint8<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint9 : sc::event<EvWaypoint9<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint10 : sc::event<EvWaypoint10<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint11 : sc::event<EvWaypoint11<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint12 : sc::event<EvWaypoint12<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint13 : sc::event<EvWaypoint13<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint14 : sc::event<EvWaypoint14<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint15 : sc::event<EvWaypoint15<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint16 : sc::event<EvWaypoint16<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint17 : sc::event<EvWaypoint17<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint18 : sc::event<EvWaypoint18<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint19 : sc::event<EvWaypoint19<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint20 : sc::event<EvWaypoint20<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint21 : sc::event<EvWaypoint21<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint22 : sc::event<EvWaypoint22<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint23 : sc::event<EvWaypoint23<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint24 : sc::event<EvWaypoint24<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint25 : sc::event<EvWaypoint25<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint26 : sc::event<EvWaypoint26<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint27 : sc::event<EvWaypoint27<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint28 : sc::event<EvWaypoint28<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint29 : sc::event<EvWaypoint29<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint30 : sc::event<EvWaypoint30<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint31 : sc::event<EvWaypoint31<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint32 : sc::event<EvWaypoint32<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint33 : sc::event<EvWaypoint33<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint34 : sc::event<EvWaypoint34<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint35 : sc::event<EvWaypoint35<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint36 : sc::event<EvWaypoint36<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint37 : sc::event<EvWaypoint37<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint38 : sc::event<EvWaypoint38<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint39 : sc::event<EvWaypoint39<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint40 : sc::event<EvWaypoint40<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint41 : sc::event<EvWaypoint41<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint42 : sc::event<EvWaypoint42<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint43 : sc::event<EvWaypoint43<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint44 : sc::event<EvWaypoint44<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint45 : sc::event<EvWaypoint45<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint46 : sc::event<EvWaypoint46<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint47 : sc::event<EvWaypoint47<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint48 : sc::event<EvWaypoint48<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint49 : sc::event<EvWaypoint49<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint50 : sc::event<EvWaypoint50<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint51 : sc::event<EvWaypoint51<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint52 : sc::event<EvWaypoint52<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint53 : sc::event<EvWaypoint53<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint54 : sc::event<EvWaypoint54<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint55 : sc::event<EvWaypoint55<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint56 : sc::event<EvWaypoint56<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint57 : sc::event<EvWaypoint57<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint58 : sc::event<EvWaypoint58<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint59 : sc::event<EvWaypoint59<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint60 : sc::event<EvWaypoint60<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint61 : sc::event<EvWaypoint61<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint62 : sc::event<EvWaypoint62<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint63 : sc::event<EvWaypoint63<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint64 : sc::event<EvWaypoint64<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint65 : sc::event<EvWaypoint65<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint66 : sc::event<EvWaypoint66<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint67 : sc::event<EvWaypoint67<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint68 : sc::event<EvWaypoint68<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint69 : sc::event<EvWaypoint69<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint70 : sc::event<EvWaypoint70<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint71 : sc::event<EvWaypoint71<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint72 : sc::event<EvWaypoint72<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint73 : sc::event<EvWaypoint73<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint74 : sc::event<EvWaypoint74<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint75 : sc::event<EvWaypoint75<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint76 : sc::event<EvWaypoint76<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint77 : sc::event<EvWaypoint77<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint78 : sc::event<EvWaypoint78<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint79 : sc::event<EvWaypoint79<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint80 : sc::event<EvWaypoint80<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint81 : sc::event<EvWaypoint81<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint82 : sc::event<EvWaypoint82<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint83 : sc::event<EvWaypoint83<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint84 : sc::event<EvWaypoint84<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint85 : sc::event<EvWaypoint85<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint86 : sc::event<EvWaypoint86<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint87 : sc::event<EvWaypoint87<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint88 : sc::event<EvWaypoint88<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint89 : sc::event<EvWaypoint89<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint90 : sc::event<EvWaypoint90<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint91 : sc::event<EvWaypoint91<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint92 : sc::event<EvWaypoint92<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint93 : sc::event<EvWaypoint93<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint94 : sc::event<EvWaypoint94<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint95 : sc::event<EvWaypoint95<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint96 : sc::event<EvWaypoint96<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint97 : sc::event<EvWaypoint97<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint98 : sc::event<EvWaypoint98<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint99 : sc::event<EvWaypoint99<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint100 : sc::event<EvWaypoint100<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint101 : sc::event<EvWaypoint101<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint102 : sc::event<EvWaypoint102<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint103 : sc::event<EvWaypoint103<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint104 : sc::event<EvWaypoint104<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint105 : sc::event<EvWaypoint105<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint106 : sc::event<EvWaypoint106<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint107 : sc::event<EvWaypoint107<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint108 : sc::event<EvWaypoint108<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint109 : sc::event<EvWaypoint109<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint110 : sc::event<EvWaypoint110<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint111 : sc::event<EvWaypoint111<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint112 : sc::event<EvWaypoint112<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint113 : sc::event<EvWaypoint113<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint114 : sc::event<EvWaypoint114<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint115 : sc::event<EvWaypoint115<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint116 : sc::event<EvWaypoint116<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint117 : sc::event<EvWaypoint117<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint118 : sc::event<EvWaypoint118<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint119 : sc::event<EvWaypoint119<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint120 : sc::event<EvWaypoint120<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint121 : sc::event<EvWaypoint121<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint122 : sc::event<EvWaypoint122<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint123 : sc::event<EvWaypoint123<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint124 : sc::event<EvWaypoint124<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint125 : sc::event<EvWaypoint125<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint126 : sc::event<EvWaypoint126<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint127 : sc::event<EvWaypoint127<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint128 : sc::event<EvWaypoint128<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint129 : sc::event<EvWaypoint129<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint130 : sc::event<EvWaypoint130<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint131 : sc::event<EvWaypoint131<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint132 : sc::event<EvWaypoint132<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint133 : sc::event<EvWaypoint133<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint134 : sc::event<EvWaypoint134<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint135 : sc::event<EvWaypoint135<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint136 : sc::event<EvWaypoint136<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint137 : sc::event<EvWaypoint137<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint138 : sc::event<EvWaypoint138<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint139 : sc::event<EvWaypoint139<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint140 : sc::event<EvWaypoint140<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint141 : sc::event<EvWaypoint141<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint142 : sc::event<EvWaypoint142<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint143 : sc::event<EvWaypoint143<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint144 : sc::event<EvWaypoint144<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint145 : sc::event<EvWaypoint145<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint146 : sc::event<EvWaypoint146<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint147 : sc::event<EvWaypoint147<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint148 : sc::event<EvWaypoint148<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint149 : sc::event<EvWaypoint149<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint150 : sc::event<EvWaypoint150<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint151 : sc::event<EvWaypoint151<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint152 : sc::event<EvWaypoint152<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint153 : sc::event<EvWaypoint153<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint154 : sc::event<EvWaypoint154<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint155 : sc::event<EvWaypoint155<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint156 : sc::event<EvWaypoint156<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint157 : sc::event<EvWaypoint157<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint158 : sc::event<EvWaypoint158<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint159 : sc::event<EvWaypoint159<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint160 : sc::event<EvWaypoint160<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint161 : sc::event<EvWaypoint161<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint162 : sc::event<EvWaypoint162<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint163 : sc::event<EvWaypoint163<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint164 : sc::event<EvWaypoint164<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint165 : sc::event<EvWaypoint165<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint166 : sc::event<EvWaypoint166<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint167 : sc::event<EvWaypoint167<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint168 : sc::event<EvWaypoint168<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint169 : sc::event<EvWaypoint169<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint170 : sc::event<EvWaypoint170<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint171 : sc::event<EvWaypoint171<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint172 : sc::event<EvWaypoint172<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint173 : sc::event<EvWaypoint173<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint174 : sc::event<EvWaypoint174<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint175 : sc::event<EvWaypoint175<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint176 : sc::event<EvWaypoint176<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint177 : sc::event<EvWaypoint177<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint178 : sc::event<EvWaypoint178<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint179 : sc::event<EvWaypoint179<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint180 : sc::event<EvWaypoint180<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint181 : sc::event<EvWaypoint181<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint182 : sc::event<EvWaypoint182<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint183 : sc::event<EvWaypoint183<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint184 : sc::event<EvWaypoint184<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint185 : sc::event<EvWaypoint185<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint186 : sc::event<EvWaypoint186<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint187 : sc::event<EvWaypoint187<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint188 : sc::event<EvWaypoint188<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint189 : sc::event<EvWaypoint189<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint190 : sc::event<EvWaypoint190<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint191 : sc::event<EvWaypoint191<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint192 : sc::event<EvWaypoint192<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint193 : sc::event<EvWaypoint193<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint194 : sc::event<EvWaypoint194<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint195 : sc::event<EvWaypoint195<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint196 : sc::event<EvWaypoint196<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint197 : sc::event<EvWaypoint197<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint198 : sc::event<EvWaypoint198<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint199 : sc::event<EvWaypoint199<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint200 : sc::event<EvWaypoint200<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint201 : sc::event<EvWaypoint201<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint202 : sc::event<EvWaypoint202<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint203 : sc::event<EvWaypoint203<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint204 : sc::event<EvWaypoint204<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint205 : sc::event<EvWaypoint205<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint206 : sc::event<EvWaypoint206<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint207 : sc::event<EvWaypoint207<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint208 : sc::event<EvWaypoint208<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint209 : sc::event<EvWaypoint209<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint210 : sc::event<EvWaypoint210<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint211 : sc::event<EvWaypoint211<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint212 : sc::event<EvWaypoint212<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint213 : sc::event<EvWaypoint213<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint214 : sc::event<EvWaypoint214<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint215 : sc::event<EvWaypoint215<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint216 : sc::event<EvWaypoint216<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint217 : sc::event<EvWaypoint217<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint218 : sc::event<EvWaypoint218<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint219 : sc::event<EvWaypoint219<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint220 : sc::event<EvWaypoint220<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint221 : sc::event<EvWaypoint221<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint222 : sc::event<EvWaypoint222<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint223 : sc::event<EvWaypoint223<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint224 : sc::event<EvWaypoint224<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint225 : sc::event<EvWaypoint225<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint226 : sc::event<EvWaypoint226<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint227 : sc::event<EvWaypoint227<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint228 : sc::event<EvWaypoint228<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint229 : sc::event<EvWaypoint229<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint230 : sc::event<EvWaypoint230<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint231 : sc::event<EvWaypoint231<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint232 : sc::event<EvWaypoint232<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint233 : sc::event<EvWaypoint233<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint234 : sc::event<EvWaypoint234<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint235 : sc::event<EvWaypoint235<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint236 : sc::event<EvWaypoint236<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint237 : sc::event<EvWaypoint237<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint238 : sc::event<EvWaypoint238<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint239 : sc::event<EvWaypoint239<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint240 : sc::event<EvWaypoint240<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint241 : sc::event<EvWaypoint241<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint242 : sc::event<EvWaypoint242<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint243 : sc::event<EvWaypoint243<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint244 : sc::event<EvWaypoint244<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint245 : sc::event<EvWaypoint245<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint246 : sc::event<EvWaypoint246<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint247 : sc::event<EvWaypoint247<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint248 : sc::event<EvWaypoint248<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint249 : sc::event<EvWaypoint249<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint250 : sc::event<EvWaypoint250<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint251 : sc::event<EvWaypoint251<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint252 : sc::event<EvWaypoint252<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint253 : sc::event<EvWaypoint253<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint254 : sc::event<EvWaypoint254<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint255 : sc::event<EvWaypoint255<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvWaypoint256 : sc::event<EvWaypoint256<TSource, TOrthogonal>>\n{\n  int waypointIndex;\n};\n\n// Doxygen endcond tag\n/// @endcond\n\nclass ClNav2Z;\n\n#define WAYPOINTS_EVENTCOUNT 257\n\nclass WaypointEventDispatcher\n{\npublic:\n  ClNav2Z * client_ = nullptr;\n  std::function<void()> postWaypointFn[WAYPOINTS_EVENTCOUNT];\n\n  template <typename TDerived, typename TOrthogonal>\n  void initialize(ClNav2Z * client);\n\n  void postWaypointEvent(int index);\n};\n\ntemplate <typename TEv>\nvoid configurePostEvWaypoint(\n  std::function<void()> * fntarget, WaypointEventDispatcher * thisobj, int index)\n{\n  thisobj->postWaypointFn[index] = [thisobj]() { thisobj->client_->template postEvent<TEv>(); };\n}\n\ntemplate <typename TDerived, typename TOrthogonal>\nvoid WaypointEventDispatcher::initialize(ClNav2Z * client)\n{\n  // Doygen cond tag\n  /// @cond\n  this->client_ = client;\n  configurePostEvWaypoint<EvWaypoint0<TDerived, TOrthogonal>>(postWaypointFn, this, 0);\n  configurePostEvWaypoint<EvWaypoint1<TDerived, TOrthogonal>>(postWaypointFn, this, 1);\n  configurePostEvWaypoint<EvWaypoint2<TDerived, TOrthogonal>>(postWaypointFn, this, 2);\n  configurePostEvWaypoint<EvWaypoint3<TDerived, TOrthogonal>>(postWaypointFn, this, 3);\n  configurePostEvWaypoint<EvWaypoint4<TDerived, TOrthogonal>>(postWaypointFn, this, 4);\n  configurePostEvWaypoint<EvWaypoint5<TDerived, TOrthogonal>>(postWaypointFn, this, 5);\n  configurePostEvWaypoint<EvWaypoint6<TDerived, TOrthogonal>>(postWaypointFn, this, 6);\n  configurePostEvWaypoint<EvWaypoint7<TDerived, TOrthogonal>>(postWaypointFn, this, 7);\n  configurePostEvWaypoint<EvWaypoint8<TDerived, TOrthogonal>>(postWaypointFn, this, 8);\n  configurePostEvWaypoint<EvWaypoint9<TDerived, TOrthogonal>>(postWaypointFn, this, 9);\n  configurePostEvWaypoint<EvWaypoint10<TDerived, TOrthogonal>>(postWaypointFn, this, 10);\n  configurePostEvWaypoint<EvWaypoint11<TDerived, TOrthogonal>>(postWaypointFn, this, 11);\n  configurePostEvWaypoint<EvWaypoint12<TDerived, TOrthogonal>>(postWaypointFn, this, 12);\n  configurePostEvWaypoint<EvWaypoint13<TDerived, TOrthogonal>>(postWaypointFn, this, 13);\n  configurePostEvWaypoint<EvWaypoint14<TDerived, TOrthogonal>>(postWaypointFn, this, 14);\n  configurePostEvWaypoint<EvWaypoint15<TDerived, TOrthogonal>>(postWaypointFn, this, 15);\n  configurePostEvWaypoint<EvWaypoint16<TDerived, TOrthogonal>>(postWaypointFn, this, 16);\n  configurePostEvWaypoint<EvWaypoint17<TDerived, TOrthogonal>>(postWaypointFn, this, 17);\n  configurePostEvWaypoint<EvWaypoint18<TDerived, TOrthogonal>>(postWaypointFn, this, 18);\n  configurePostEvWaypoint<EvWaypoint19<TDerived, TOrthogonal>>(postWaypointFn, this, 19);\n  configurePostEvWaypoint<EvWaypoint20<TDerived, TOrthogonal>>(postWaypointFn, this, 20);\n  configurePostEvWaypoint<EvWaypoint21<TDerived, TOrthogonal>>(postWaypointFn, this, 21);\n  configurePostEvWaypoint<EvWaypoint22<TDerived, TOrthogonal>>(postWaypointFn, this, 22);\n  configurePostEvWaypoint<EvWaypoint23<TDerived, TOrthogonal>>(postWaypointFn, this, 23);\n  configurePostEvWaypoint<EvWaypoint24<TDerived, TOrthogonal>>(postWaypointFn, this, 24);\n  configurePostEvWaypoint<EvWaypoint25<TDerived, TOrthogonal>>(postWaypointFn, this, 25);\n  configurePostEvWaypoint<EvWaypoint26<TDerived, TOrthogonal>>(postWaypointFn, this, 26);\n  configurePostEvWaypoint<EvWaypoint27<TDerived, TOrthogonal>>(postWaypointFn, this, 27);\n  configurePostEvWaypoint<EvWaypoint28<TDerived, TOrthogonal>>(postWaypointFn, this, 28);\n  configurePostEvWaypoint<EvWaypoint29<TDerived, TOrthogonal>>(postWaypointFn, this, 29);\n  configurePostEvWaypoint<EvWaypoint30<TDerived, TOrthogonal>>(postWaypointFn, this, 30);\n  configurePostEvWaypoint<EvWaypoint31<TDerived, TOrthogonal>>(postWaypointFn, this, 31);\n  configurePostEvWaypoint<EvWaypoint32<TDerived, TOrthogonal>>(postWaypointFn, this, 32);\n  configurePostEvWaypoint<EvWaypoint33<TDerived, TOrthogonal>>(postWaypointFn, this, 33);\n  configurePostEvWaypoint<EvWaypoint34<TDerived, TOrthogonal>>(postWaypointFn, this, 34);\n  configurePostEvWaypoint<EvWaypoint35<TDerived, TOrthogonal>>(postWaypointFn, this, 35);\n  configurePostEvWaypoint<EvWaypoint36<TDerived, TOrthogonal>>(postWaypointFn, this, 36);\n  configurePostEvWaypoint<EvWaypoint37<TDerived, TOrthogonal>>(postWaypointFn, this, 37);\n  configurePostEvWaypoint<EvWaypoint38<TDerived, TOrthogonal>>(postWaypointFn, this, 38);\n  configurePostEvWaypoint<EvWaypoint39<TDerived, TOrthogonal>>(postWaypointFn, this, 39);\n  configurePostEvWaypoint<EvWaypoint40<TDerived, TOrthogonal>>(postWaypointFn, this, 40);\n  configurePostEvWaypoint<EvWaypoint41<TDerived, TOrthogonal>>(postWaypointFn, this, 41);\n  configurePostEvWaypoint<EvWaypoint42<TDerived, TOrthogonal>>(postWaypointFn, this, 42);\n  configurePostEvWaypoint<EvWaypoint43<TDerived, TOrthogonal>>(postWaypointFn, this, 43);\n  configurePostEvWaypoint<EvWaypoint44<TDerived, TOrthogonal>>(postWaypointFn, this, 44);\n  configurePostEvWaypoint<EvWaypoint45<TDerived, TOrthogonal>>(postWaypointFn, this, 45);\n  configurePostEvWaypoint<EvWaypoint46<TDerived, TOrthogonal>>(postWaypointFn, this, 46);\n  configurePostEvWaypoint<EvWaypoint47<TDerived, TOrthogonal>>(postWaypointFn, this, 47);\n  configurePostEvWaypoint<EvWaypoint48<TDerived, TOrthogonal>>(postWaypointFn, this, 48);\n  configurePostEvWaypoint<EvWaypoint49<TDerived, TOrthogonal>>(postWaypointFn, this, 49);\n  configurePostEvWaypoint<EvWaypoint50<TDerived, TOrthogonal>>(postWaypointFn, this, 50);\n  configurePostEvWaypoint<EvWaypoint51<TDerived, TOrthogonal>>(postWaypointFn, this, 51);\n  configurePostEvWaypoint<EvWaypoint52<TDerived, TOrthogonal>>(postWaypointFn, this, 52);\n  configurePostEvWaypoint<EvWaypoint53<TDerived, TOrthogonal>>(postWaypointFn, this, 53);\n  configurePostEvWaypoint<EvWaypoint54<TDerived, TOrthogonal>>(postWaypointFn, this, 54);\n  configurePostEvWaypoint<EvWaypoint55<TDerived, TOrthogonal>>(postWaypointFn, this, 55);\n  configurePostEvWaypoint<EvWaypoint56<TDerived, TOrthogonal>>(postWaypointFn, this, 56);\n  configurePostEvWaypoint<EvWaypoint57<TDerived, TOrthogonal>>(postWaypointFn, this, 57);\n  configurePostEvWaypoint<EvWaypoint58<TDerived, TOrthogonal>>(postWaypointFn, this, 58);\n  configurePostEvWaypoint<EvWaypoint59<TDerived, TOrthogonal>>(postWaypointFn, this, 59);\n  configurePostEvWaypoint<EvWaypoint60<TDerived, TOrthogonal>>(postWaypointFn, this, 60);\n  configurePostEvWaypoint<EvWaypoint61<TDerived, TOrthogonal>>(postWaypointFn, this, 61);\n  configurePostEvWaypoint<EvWaypoint62<TDerived, TOrthogonal>>(postWaypointFn, this, 62);\n  configurePostEvWaypoint<EvWaypoint63<TDerived, TOrthogonal>>(postWaypointFn, this, 63);\n  configurePostEvWaypoint<EvWaypoint64<TDerived, TOrthogonal>>(postWaypointFn, this, 64);\n  configurePostEvWaypoint<EvWaypoint65<TDerived, TOrthogonal>>(postWaypointFn, this, 65);\n  configurePostEvWaypoint<EvWaypoint66<TDerived, TOrthogonal>>(postWaypointFn, this, 66);\n  configurePostEvWaypoint<EvWaypoint67<TDerived, TOrthogonal>>(postWaypointFn, this, 67);\n  configurePostEvWaypoint<EvWaypoint68<TDerived, TOrthogonal>>(postWaypointFn, this, 68);\n  configurePostEvWaypoint<EvWaypoint69<TDerived, TOrthogonal>>(postWaypointFn, this, 69);\n  configurePostEvWaypoint<EvWaypoint70<TDerived, TOrthogonal>>(postWaypointFn, this, 70);\n  configurePostEvWaypoint<EvWaypoint71<TDerived, TOrthogonal>>(postWaypointFn, this, 71);\n  configurePostEvWaypoint<EvWaypoint72<TDerived, TOrthogonal>>(postWaypointFn, this, 72);\n  configurePostEvWaypoint<EvWaypoint73<TDerived, TOrthogonal>>(postWaypointFn, this, 73);\n  configurePostEvWaypoint<EvWaypoint74<TDerived, TOrthogonal>>(postWaypointFn, this, 74);\n  configurePostEvWaypoint<EvWaypoint75<TDerived, TOrthogonal>>(postWaypointFn, this, 75);\n  configurePostEvWaypoint<EvWaypoint76<TDerived, TOrthogonal>>(postWaypointFn, this, 76);\n  configurePostEvWaypoint<EvWaypoint77<TDerived, TOrthogonal>>(postWaypointFn, this, 77);\n  configurePostEvWaypoint<EvWaypoint78<TDerived, TOrthogonal>>(postWaypointFn, this, 78);\n  configurePostEvWaypoint<EvWaypoint79<TDerived, TOrthogonal>>(postWaypointFn, this, 79);\n  configurePostEvWaypoint<EvWaypoint80<TDerived, TOrthogonal>>(postWaypointFn, this, 80);\n  configurePostEvWaypoint<EvWaypoint81<TDerived, TOrthogonal>>(postWaypointFn, this, 81);\n  configurePostEvWaypoint<EvWaypoint82<TDerived, TOrthogonal>>(postWaypointFn, this, 82);\n  configurePostEvWaypoint<EvWaypoint83<TDerived, TOrthogonal>>(postWaypointFn, this, 83);\n  configurePostEvWaypoint<EvWaypoint84<TDerived, TOrthogonal>>(postWaypointFn, this, 84);\n  configurePostEvWaypoint<EvWaypoint85<TDerived, TOrthogonal>>(postWaypointFn, this, 85);\n  configurePostEvWaypoint<EvWaypoint86<TDerived, TOrthogonal>>(postWaypointFn, this, 86);\n  configurePostEvWaypoint<EvWaypoint87<TDerived, TOrthogonal>>(postWaypointFn, this, 87);\n  configurePostEvWaypoint<EvWaypoint88<TDerived, TOrthogonal>>(postWaypointFn, this, 88);\n  configurePostEvWaypoint<EvWaypoint89<TDerived, TOrthogonal>>(postWaypointFn, this, 89);\n  configurePostEvWaypoint<EvWaypoint90<TDerived, TOrthogonal>>(postWaypointFn, this, 90);\n  configurePostEvWaypoint<EvWaypoint91<TDerived, TOrthogonal>>(postWaypointFn, this, 91);\n  configurePostEvWaypoint<EvWaypoint92<TDerived, TOrthogonal>>(postWaypointFn, this, 92);\n  configurePostEvWaypoint<EvWaypoint93<TDerived, TOrthogonal>>(postWaypointFn, this, 93);\n  configurePostEvWaypoint<EvWaypoint94<TDerived, TOrthogonal>>(postWaypointFn, this, 94);\n  configurePostEvWaypoint<EvWaypoint95<TDerived, TOrthogonal>>(postWaypointFn, this, 95);\n  configurePostEvWaypoint<EvWaypoint96<TDerived, TOrthogonal>>(postWaypointFn, this, 96);\n  configurePostEvWaypoint<EvWaypoint97<TDerived, TOrthogonal>>(postWaypointFn, this, 97);\n  configurePostEvWaypoint<EvWaypoint98<TDerived, TOrthogonal>>(postWaypointFn, this, 98);\n  configurePostEvWaypoint<EvWaypoint99<TDerived, TOrthogonal>>(postWaypointFn, this, 99);\n  configurePostEvWaypoint<EvWaypoint100<TDerived, TOrthogonal>>(postWaypointFn, this, 100);\n  configurePostEvWaypoint<EvWaypoint101<TDerived, TOrthogonal>>(postWaypointFn, this, 101);\n  configurePostEvWaypoint<EvWaypoint102<TDerived, TOrthogonal>>(postWaypointFn, this, 102);\n  configurePostEvWaypoint<EvWaypoint103<TDerived, TOrthogonal>>(postWaypointFn, this, 103);\n  configurePostEvWaypoint<EvWaypoint104<TDerived, TOrthogonal>>(postWaypointFn, this, 104);\n  configurePostEvWaypoint<EvWaypoint105<TDerived, TOrthogonal>>(postWaypointFn, this, 105);\n  configurePostEvWaypoint<EvWaypoint106<TDerived, TOrthogonal>>(postWaypointFn, this, 106);\n  configurePostEvWaypoint<EvWaypoint107<TDerived, TOrthogonal>>(postWaypointFn, this, 107);\n  configurePostEvWaypoint<EvWaypoint108<TDerived, TOrthogonal>>(postWaypointFn, this, 108);\n  configurePostEvWaypoint<EvWaypoint109<TDerived, TOrthogonal>>(postWaypointFn, this, 109);\n  configurePostEvWaypoint<EvWaypoint110<TDerived, TOrthogonal>>(postWaypointFn, this, 110);\n  configurePostEvWaypoint<EvWaypoint111<TDerived, TOrthogonal>>(postWaypointFn, this, 111);\n  configurePostEvWaypoint<EvWaypoint112<TDerived, TOrthogonal>>(postWaypointFn, this, 112);\n  configurePostEvWaypoint<EvWaypoint113<TDerived, TOrthogonal>>(postWaypointFn, this, 113);\n  configurePostEvWaypoint<EvWaypoint114<TDerived, TOrthogonal>>(postWaypointFn, this, 114);\n  configurePostEvWaypoint<EvWaypoint115<TDerived, TOrthogonal>>(postWaypointFn, this, 115);\n  configurePostEvWaypoint<EvWaypoint116<TDerived, TOrthogonal>>(postWaypointFn, this, 116);\n  configurePostEvWaypoint<EvWaypoint117<TDerived, TOrthogonal>>(postWaypointFn, this, 117);\n  configurePostEvWaypoint<EvWaypoint118<TDerived, TOrthogonal>>(postWaypointFn, this, 118);\n  configurePostEvWaypoint<EvWaypoint119<TDerived, TOrthogonal>>(postWaypointFn, this, 119);\n  configurePostEvWaypoint<EvWaypoint120<TDerived, TOrthogonal>>(postWaypointFn, this, 120);\n  configurePostEvWaypoint<EvWaypoint121<TDerived, TOrthogonal>>(postWaypointFn, this, 121);\n  configurePostEvWaypoint<EvWaypoint122<TDerived, TOrthogonal>>(postWaypointFn, this, 122);\n  configurePostEvWaypoint<EvWaypoint123<TDerived, TOrthogonal>>(postWaypointFn, this, 123);\n  configurePostEvWaypoint<EvWaypoint124<TDerived, TOrthogonal>>(postWaypointFn, this, 124);\n  configurePostEvWaypoint<EvWaypoint125<TDerived, TOrthogonal>>(postWaypointFn, this, 125);\n  configurePostEvWaypoint<EvWaypoint126<TDerived, TOrthogonal>>(postWaypointFn, this, 126);\n  configurePostEvWaypoint<EvWaypoint127<TDerived, TOrthogonal>>(postWaypointFn, this, 127);\n  configurePostEvWaypoint<EvWaypoint128<TDerived, TOrthogonal>>(postWaypointFn, this, 128);\n  configurePostEvWaypoint<EvWaypoint129<TDerived, TOrthogonal>>(postWaypointFn, this, 129);\n  configurePostEvWaypoint<EvWaypoint130<TDerived, TOrthogonal>>(postWaypointFn, this, 130);\n  configurePostEvWaypoint<EvWaypoint131<TDerived, TOrthogonal>>(postWaypointFn, this, 131);\n  configurePostEvWaypoint<EvWaypoint132<TDerived, TOrthogonal>>(postWaypointFn, this, 132);\n  configurePostEvWaypoint<EvWaypoint133<TDerived, TOrthogonal>>(postWaypointFn, this, 133);\n  configurePostEvWaypoint<EvWaypoint134<TDerived, TOrthogonal>>(postWaypointFn, this, 134);\n  configurePostEvWaypoint<EvWaypoint135<TDerived, TOrthogonal>>(postWaypointFn, this, 135);\n  configurePostEvWaypoint<EvWaypoint136<TDerived, TOrthogonal>>(postWaypointFn, this, 136);\n  configurePostEvWaypoint<EvWaypoint137<TDerived, TOrthogonal>>(postWaypointFn, this, 137);\n  configurePostEvWaypoint<EvWaypoint138<TDerived, TOrthogonal>>(postWaypointFn, this, 138);\n  configurePostEvWaypoint<EvWaypoint139<TDerived, TOrthogonal>>(postWaypointFn, this, 139);\n  configurePostEvWaypoint<EvWaypoint140<TDerived, TOrthogonal>>(postWaypointFn, this, 140);\n  configurePostEvWaypoint<EvWaypoint141<TDerived, TOrthogonal>>(postWaypointFn, this, 141);\n  configurePostEvWaypoint<EvWaypoint142<TDerived, TOrthogonal>>(postWaypointFn, this, 142);\n  configurePostEvWaypoint<EvWaypoint143<TDerived, TOrthogonal>>(postWaypointFn, this, 143);\n  configurePostEvWaypoint<EvWaypoint144<TDerived, TOrthogonal>>(postWaypointFn, this, 144);\n  configurePostEvWaypoint<EvWaypoint145<TDerived, TOrthogonal>>(postWaypointFn, this, 145);\n  configurePostEvWaypoint<EvWaypoint146<TDerived, TOrthogonal>>(postWaypointFn, this, 146);\n  configurePostEvWaypoint<EvWaypoint147<TDerived, TOrthogonal>>(postWaypointFn, this, 147);\n  configurePostEvWaypoint<EvWaypoint148<TDerived, TOrthogonal>>(postWaypointFn, this, 148);\n  configurePostEvWaypoint<EvWaypoint149<TDerived, TOrthogonal>>(postWaypointFn, this, 149);\n  configurePostEvWaypoint<EvWaypoint150<TDerived, TOrthogonal>>(postWaypointFn, this, 150);\n  configurePostEvWaypoint<EvWaypoint151<TDerived, TOrthogonal>>(postWaypointFn, this, 151);\n  configurePostEvWaypoint<EvWaypoint152<TDerived, TOrthogonal>>(postWaypointFn, this, 152);\n  configurePostEvWaypoint<EvWaypoint153<TDerived, TOrthogonal>>(postWaypointFn, this, 153);\n  configurePostEvWaypoint<EvWaypoint154<TDerived, TOrthogonal>>(postWaypointFn, this, 154);\n  configurePostEvWaypoint<EvWaypoint155<TDerived, TOrthogonal>>(postWaypointFn, this, 155);\n  configurePostEvWaypoint<EvWaypoint156<TDerived, TOrthogonal>>(postWaypointFn, this, 156);\n  configurePostEvWaypoint<EvWaypoint157<TDerived, TOrthogonal>>(postWaypointFn, this, 157);\n  configurePostEvWaypoint<EvWaypoint158<TDerived, TOrthogonal>>(postWaypointFn, this, 158);\n  configurePostEvWaypoint<EvWaypoint159<TDerived, TOrthogonal>>(postWaypointFn, this, 159);\n  configurePostEvWaypoint<EvWaypoint160<TDerived, TOrthogonal>>(postWaypointFn, this, 160);\n  configurePostEvWaypoint<EvWaypoint161<TDerived, TOrthogonal>>(postWaypointFn, this, 161);\n  configurePostEvWaypoint<EvWaypoint162<TDerived, TOrthogonal>>(postWaypointFn, this, 162);\n  configurePostEvWaypoint<EvWaypoint163<TDerived, TOrthogonal>>(postWaypointFn, this, 163);\n  configurePostEvWaypoint<EvWaypoint164<TDerived, TOrthogonal>>(postWaypointFn, this, 164);\n  configurePostEvWaypoint<EvWaypoint165<TDerived, TOrthogonal>>(postWaypointFn, this, 165);\n  configurePostEvWaypoint<EvWaypoint166<TDerived, TOrthogonal>>(postWaypointFn, this, 166);\n  configurePostEvWaypoint<EvWaypoint167<TDerived, TOrthogonal>>(postWaypointFn, this, 167);\n  configurePostEvWaypoint<EvWaypoint168<TDerived, TOrthogonal>>(postWaypointFn, this, 168);\n  configurePostEvWaypoint<EvWaypoint169<TDerived, TOrthogonal>>(postWaypointFn, this, 169);\n  configurePostEvWaypoint<EvWaypoint170<TDerived, TOrthogonal>>(postWaypointFn, this, 170);\n  configurePostEvWaypoint<EvWaypoint171<TDerived, TOrthogonal>>(postWaypointFn, this, 171);\n  configurePostEvWaypoint<EvWaypoint172<TDerived, TOrthogonal>>(postWaypointFn, this, 172);\n  configurePostEvWaypoint<EvWaypoint173<TDerived, TOrthogonal>>(postWaypointFn, this, 173);\n  configurePostEvWaypoint<EvWaypoint174<TDerived, TOrthogonal>>(postWaypointFn, this, 174);\n  configurePostEvWaypoint<EvWaypoint175<TDerived, TOrthogonal>>(postWaypointFn, this, 175);\n  configurePostEvWaypoint<EvWaypoint176<TDerived, TOrthogonal>>(postWaypointFn, this, 176);\n  configurePostEvWaypoint<EvWaypoint177<TDerived, TOrthogonal>>(postWaypointFn, this, 177);\n  configurePostEvWaypoint<EvWaypoint178<TDerived, TOrthogonal>>(postWaypointFn, this, 178);\n  configurePostEvWaypoint<EvWaypoint179<TDerived, TOrthogonal>>(postWaypointFn, this, 179);\n  configurePostEvWaypoint<EvWaypoint180<TDerived, TOrthogonal>>(postWaypointFn, this, 180);\n  configurePostEvWaypoint<EvWaypoint181<TDerived, TOrthogonal>>(postWaypointFn, this, 181);\n  configurePostEvWaypoint<EvWaypoint182<TDerived, TOrthogonal>>(postWaypointFn, this, 182);\n  configurePostEvWaypoint<EvWaypoint183<TDerived, TOrthogonal>>(postWaypointFn, this, 183);\n  configurePostEvWaypoint<EvWaypoint184<TDerived, TOrthogonal>>(postWaypointFn, this, 184);\n  configurePostEvWaypoint<EvWaypoint185<TDerived, TOrthogonal>>(postWaypointFn, this, 185);\n  configurePostEvWaypoint<EvWaypoint186<TDerived, TOrthogonal>>(postWaypointFn, this, 186);\n  configurePostEvWaypoint<EvWaypoint187<TDerived, TOrthogonal>>(postWaypointFn, this, 187);\n  configurePostEvWaypoint<EvWaypoint188<TDerived, TOrthogonal>>(postWaypointFn, this, 188);\n  configurePostEvWaypoint<EvWaypoint189<TDerived, TOrthogonal>>(postWaypointFn, this, 189);\n  configurePostEvWaypoint<EvWaypoint190<TDerived, TOrthogonal>>(postWaypointFn, this, 190);\n  configurePostEvWaypoint<EvWaypoint191<TDerived, TOrthogonal>>(postWaypointFn, this, 191);\n  configurePostEvWaypoint<EvWaypoint192<TDerived, TOrthogonal>>(postWaypointFn, this, 192);\n  configurePostEvWaypoint<EvWaypoint193<TDerived, TOrthogonal>>(postWaypointFn, this, 193);\n  configurePostEvWaypoint<EvWaypoint194<TDerived, TOrthogonal>>(postWaypointFn, this, 194);\n  configurePostEvWaypoint<EvWaypoint195<TDerived, TOrthogonal>>(postWaypointFn, this, 195);\n  configurePostEvWaypoint<EvWaypoint196<TDerived, TOrthogonal>>(postWaypointFn, this, 196);\n  configurePostEvWaypoint<EvWaypoint197<TDerived, TOrthogonal>>(postWaypointFn, this, 197);\n  configurePostEvWaypoint<EvWaypoint198<TDerived, TOrthogonal>>(postWaypointFn, this, 198);\n  configurePostEvWaypoint<EvWaypoint199<TDerived, TOrthogonal>>(postWaypointFn, this, 199);\n  configurePostEvWaypoint<EvWaypoint200<TDerived, TOrthogonal>>(postWaypointFn, this, 200);\n  configurePostEvWaypoint<EvWaypoint201<TDerived, TOrthogonal>>(postWaypointFn, this, 201);\n  configurePostEvWaypoint<EvWaypoint202<TDerived, TOrthogonal>>(postWaypointFn, this, 202);\n  configurePostEvWaypoint<EvWaypoint203<TDerived, TOrthogonal>>(postWaypointFn, this, 203);\n  configurePostEvWaypoint<EvWaypoint204<TDerived, TOrthogonal>>(postWaypointFn, this, 204);\n  configurePostEvWaypoint<EvWaypoint205<TDerived, TOrthogonal>>(postWaypointFn, this, 205);\n  configurePostEvWaypoint<EvWaypoint206<TDerived, TOrthogonal>>(postWaypointFn, this, 206);\n  configurePostEvWaypoint<EvWaypoint207<TDerived, TOrthogonal>>(postWaypointFn, this, 207);\n  configurePostEvWaypoint<EvWaypoint208<TDerived, TOrthogonal>>(postWaypointFn, this, 208);\n  configurePostEvWaypoint<EvWaypoint209<TDerived, TOrthogonal>>(postWaypointFn, this, 209);\n  configurePostEvWaypoint<EvWaypoint210<TDerived, TOrthogonal>>(postWaypointFn, this, 210);\n  configurePostEvWaypoint<EvWaypoint211<TDerived, TOrthogonal>>(postWaypointFn, this, 211);\n  configurePostEvWaypoint<EvWaypoint212<TDerived, TOrthogonal>>(postWaypointFn, this, 212);\n  configurePostEvWaypoint<EvWaypoint213<TDerived, TOrthogonal>>(postWaypointFn, this, 213);\n  configurePostEvWaypoint<EvWaypoint214<TDerived, TOrthogonal>>(postWaypointFn, this, 214);\n  configurePostEvWaypoint<EvWaypoint215<TDerived, TOrthogonal>>(postWaypointFn, this, 215);\n  configurePostEvWaypoint<EvWaypoint216<TDerived, TOrthogonal>>(postWaypointFn, this, 216);\n  configurePostEvWaypoint<EvWaypoint217<TDerived, TOrthogonal>>(postWaypointFn, this, 217);\n  configurePostEvWaypoint<EvWaypoint218<TDerived, TOrthogonal>>(postWaypointFn, this, 218);\n  configurePostEvWaypoint<EvWaypoint219<TDerived, TOrthogonal>>(postWaypointFn, this, 219);\n  configurePostEvWaypoint<EvWaypoint220<TDerived, TOrthogonal>>(postWaypointFn, this, 220);\n  configurePostEvWaypoint<EvWaypoint221<TDerived, TOrthogonal>>(postWaypointFn, this, 221);\n  configurePostEvWaypoint<EvWaypoint222<TDerived, TOrthogonal>>(postWaypointFn, this, 222);\n  configurePostEvWaypoint<EvWaypoint223<TDerived, TOrthogonal>>(postWaypointFn, this, 223);\n  configurePostEvWaypoint<EvWaypoint224<TDerived, TOrthogonal>>(postWaypointFn, this, 224);\n  configurePostEvWaypoint<EvWaypoint225<TDerived, TOrthogonal>>(postWaypointFn, this, 225);\n  configurePostEvWaypoint<EvWaypoint226<TDerived, TOrthogonal>>(postWaypointFn, this, 226);\n  configurePostEvWaypoint<EvWaypoint227<TDerived, TOrthogonal>>(postWaypointFn, this, 227);\n  configurePostEvWaypoint<EvWaypoint228<TDerived, TOrthogonal>>(postWaypointFn, this, 228);\n  configurePostEvWaypoint<EvWaypoint229<TDerived, TOrthogonal>>(postWaypointFn, this, 229);\n  configurePostEvWaypoint<EvWaypoint230<TDerived, TOrthogonal>>(postWaypointFn, this, 230);\n  configurePostEvWaypoint<EvWaypoint231<TDerived, TOrthogonal>>(postWaypointFn, this, 231);\n  configurePostEvWaypoint<EvWaypoint232<TDerived, TOrthogonal>>(postWaypointFn, this, 232);\n  configurePostEvWaypoint<EvWaypoint233<TDerived, TOrthogonal>>(postWaypointFn, this, 233);\n  configurePostEvWaypoint<EvWaypoint234<TDerived, TOrthogonal>>(postWaypointFn, this, 234);\n  configurePostEvWaypoint<EvWaypoint235<TDerived, TOrthogonal>>(postWaypointFn, this, 235);\n  configurePostEvWaypoint<EvWaypoint236<TDerived, TOrthogonal>>(postWaypointFn, this, 236);\n  configurePostEvWaypoint<EvWaypoint237<TDerived, TOrthogonal>>(postWaypointFn, this, 237);\n  configurePostEvWaypoint<EvWaypoint238<TDerived, TOrthogonal>>(postWaypointFn, this, 238);\n  configurePostEvWaypoint<EvWaypoint239<TDerived, TOrthogonal>>(postWaypointFn, this, 239);\n  configurePostEvWaypoint<EvWaypoint240<TDerived, TOrthogonal>>(postWaypointFn, this, 240);\n  configurePostEvWaypoint<EvWaypoint241<TDerived, TOrthogonal>>(postWaypointFn, this, 241);\n  configurePostEvWaypoint<EvWaypoint242<TDerived, TOrthogonal>>(postWaypointFn, this, 242);\n  configurePostEvWaypoint<EvWaypoint243<TDerived, TOrthogonal>>(postWaypointFn, this, 243);\n  configurePostEvWaypoint<EvWaypoint244<TDerived, TOrthogonal>>(postWaypointFn, this, 244);\n  configurePostEvWaypoint<EvWaypoint245<TDerived, TOrthogonal>>(postWaypointFn, this, 245);\n  configurePostEvWaypoint<EvWaypoint246<TDerived, TOrthogonal>>(postWaypointFn, this, 246);\n  configurePostEvWaypoint<EvWaypoint247<TDerived, TOrthogonal>>(postWaypointFn, this, 247);\n  configurePostEvWaypoint<EvWaypoint248<TDerived, TOrthogonal>>(postWaypointFn, this, 248);\n  configurePostEvWaypoint<EvWaypoint249<TDerived, TOrthogonal>>(postWaypointFn, this, 249);\n  configurePostEvWaypoint<EvWaypoint250<TDerived, TOrthogonal>>(postWaypointFn, this, 250);\n  configurePostEvWaypoint<EvWaypoint251<TDerived, TOrthogonal>>(postWaypointFn, this, 251);\n  configurePostEvWaypoint<EvWaypoint252<TDerived, TOrthogonal>>(postWaypointFn, this, 252);\n  configurePostEvWaypoint<EvWaypoint253<TDerived, TOrthogonal>>(postWaypointFn, this, 253);\n  configurePostEvWaypoint<EvWaypoint254<TDerived, TOrthogonal>>(postWaypointFn, this, 254);\n  configurePostEvWaypoint<EvWaypoint255<TDerived, TOrthogonal>>(postWaypointFn, this, 255);\n  configurePostEvWaypoint<EvWaypoint256<TDerived, TOrthogonal>>(postWaypointFn, this, 256);\n  // Doxygen endcond tag\n  /// @endcond\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <cl_nav2z/components/nav2_action_interface/cp_nav2_action_interface.hpp>\n#include <cl_nav2z/components/waypoints_navigator/cp_waypoints_event_dispatcher.hpp>\n#include <smacc2/smacc.hpp>\n\n#include <cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator_base.hpp>\n#include <geometry_msgs/msg/pose.hpp>\n\nnamespace cl_nav2z\n{\nclass ClNav2Z;\nusing namespace smacc2;\n\nstruct EvWaypointFinal : sc::event<EvWaypointFinal>\n{\n};\n\nstruct NavigateNextWaypointOptions\n{\n  std::optional<std::string> controllerName_;\n  std::optional<std::string> goalCheckerName_;\n};\n\n// This component contains a list of waypoints. These waypoints can\n// be iterated in the different states using CbNextWaiPoint\n// waypoint index is only incremented if the current waypoint is successfully reached\nclass CpWaypointNavigator : public CpWaypointNavigatorBase\n{\npublic:\n  ClNav2Z * client_;\n  components::CpNav2ActionInterface * nav2ActionInterface_ = nullptr;\n\n  CpWaypointNavigator();\n\n  void onInitialize() override;\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    client_ = dynamic_cast<ClNav2Z *>(owner_);\n    waypointsEventDispatcher.initialize<TSourceObject, TOrthogonal>(client_);\n    this->requiresComponent(nav2ActionInterface_, ComponentRequirement::HARD);\n  }\n\n  std::optional<std::shared_future<\n    std::shared_ptr<rclcpp_action::ClientGoalHandle<nav2_msgs::action::NavigateToPose> > > >\n  sendNextGoal(std::optional<NavigateNextWaypointOptions> options = std::nullopt);\n\n  void stopWaitingResult();\n\n  smacc2::SmaccSignal<void()> onNavigationRequestSucceded;\n  smacc2::SmaccSignal<void()> onNavigationRequestAborted;\n  smacc2::SmaccSignal<void()> onNavigationRequestCancelled;\n\nprivate:\n  void onNavigationResult(const components::CpNav2ActionInterface::WrappedResult & r);\n\n  void onGoalReached(const components::CpNav2ActionInterface::WrappedResult & res);\n  void onGoalCancelled(const components::CpNav2ActionInterface::WrappedResult & /*res*/);\n  void onGoalAborted(const components::CpNav2ActionInterface::WrappedResult & /*res*/);\n\n  smacc2::SmaccSignalConnection succeddedNav2ZClientConnection_;\n  smacc2::SmaccSignalConnection abortedNav2ZClientConnection_;\n  smacc2::SmaccSignalConnection cancelledNav2ZClientConnection_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator_base.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <cl_nav2z/components/waypoints_navigator/cp_waypoints_event_dispatcher.hpp>\n#include <smacc2/smacc.hpp>\n\n#include <geometry_msgs/msg/pose.hpp>\n\nnamespace cl_nav2z\n{\nstruct Pose2D\n{\n  Pose2D(double x, double y, double yaw)\n  {\n    this->x_ = x;\n    this->y_ = y;\n    this->yaw_ = yaw;\n  }\n\n  double x_;\n  double y_;\n  double yaw_;\n};\n\n// This component contains a list of waypoints. These waypoints can\n// be iterated in the different states using CbNextWaiPoint\n// waypoint index is only incremented if the current waypoint is successfully reached\nclass CpWaypointNavigatorBase : public smacc2::ISmaccComponent\n{\npublic:\n  WaypointEventDispatcher waypointsEventDispatcher;\n\n  CpWaypointNavigatorBase();\n\n  virtual ~CpWaypointNavigatorBase();\n\n  void onInitialize() override;\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    ClNav2Z * client = dynamic_cast<ClNav2Z *>(owner_);\n    waypointsEventDispatcher.initialize<TSourceObject, TOrthogonal>(client);\n  }\n\n  void loadWayPointsFromFile(std::string filepath);\n\n  void loadWayPointsFromFile2(std::string filepath);\n\n  void setWaypoints(const std::vector<geometry_msgs::msg::Pose> & waypoints);\n\n  void setWaypoints(const std::vector<Pose2D> & waypoints);\n\n  const std::vector<geometry_msgs::msg::Pose> & getWaypoints() const;\n  const std::vector<std::string> & getWaypointNames() const;\n  std::optional<geometry_msgs::msg::Pose> getNamedPose(std::string name) const;\n  geometry_msgs::msg::Pose getPose(int index) const;\n  geometry_msgs::msg::Pose getCurrentPose() const;\n\n  long getCurrentWaypointIndex() const;\n  std::optional<std::string> getCurrentWaypointName() const;\n\n  long currentWaypoint_;\n\n  void rewind(int count);\n\n  void forward(int count);\n  void seekName(std::string name);\n\n  void loadWaypointsFromYamlParameter(\n    std::string parameter_name, std::string yaml_file_package_name);\n\n  void notifyGoalReached();\n\nprotected:\n  void insertWaypoint(int index, geometry_msgs::msg::Pose & newpose);\n\n  void removeWaypoint(int index);\n\n  std::vector<geometry_msgs::msg::Pose> waypoints_;\n\n  std::vector<std::string> waypointsNames_;\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/include/cl_nav2z/components/waypoints_navigator/cp_waypoints_visualizer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator.hpp>\n\n#include <smacc2/smacc.hpp>\n\n#include <geometry_msgs/msg/pose.hpp>\n#include <visualization_msgs/msg/marker_array.hpp>\n\nnamespace cl_nav2z\n{\nclass ClNav2Z;\n\nclass CpWaypointsVisualizer : public smacc2::ISmaccComponent, public smacc2::ISmaccUpdatable\n{\npublic:\n  cl_nav2z::CpWaypointNavigator * waypointsNavigator_;\n\n  CpWaypointsVisualizer(rclcpp::Duration duration);\n\n  void onInitialize() override;\n\nprotected:\n  virtual void update() override;\n\nprivate:\n  std::mutex m_mutex_;\n\n  rclcpp::Publisher<visualization_msgs::msg::MarkerArray>::SharedPtr markersPub_;\n  visualization_msgs::msg::MarkerArray markers_;\n  visualization_msgs::msg::MarkerArray markerLabels_;\n\n  void createMarker(const geometry_msgs::msg::Pose & waypoint, visualization_msgs::msg::Marker & m);\n  void createMarkerLabel(\n    const geometry_msgs::msg::Pose & waypoint, std::string label,\n    visualization_msgs::msg::Marker & m);\n};\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>cl_nav2z</name>\n  <version>3.0.1</version>\n  <description>The cl_nav2z package</description>\n\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n  <depend>slam_toolbox</depend>\n\n  <depend>angles</depend>\n  <depend>yaml_cpp_vendor</depend>\n  <depend>nav2_msgs</depend>\n  <depend>pluginlib</depend>\n  <depend>rclcpp_action</depend>\n  \n  <depend>nav2_util</depend>\n  <depend>nav2_core</depend>\n  <depend>nav2_costmap_2d</depend>\n  <depend>nav_2d_utils</depend>\n\n  <depend>std_msgs</depend>\n  <depend>std_srvs</depend>\n  <depend>tf2_ros</depend>\n  <depend>tf2_geometry_msgs</depend>\n  <depend>bond</depend>\n\n  <depend>ament_index_cpp</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/scripts/lidar_completion.py",
    "content": "# Copyright 2024 RobosoftAI Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n#!/usr/bin/env python3\nimport rclpy\nfrom rclpy.node import Node\nfrom sensor_msgs.msg import LaserScan\nfrom rclpy.qos import QoSProfile, ReliabilityPolicy, HistoryPolicy\nimport logging\nimport copy\n\n\nclass LidarProcessor(Node):\n    def __init__(self):\n        super().__init__(\"lidar_processor\")\n\n        qos_prof_1 = QoSProfile(\n            reliability=ReliabilityPolicy.BEST_EFFORT, history=HistoryPolicy.KEEP_LAST, depth=10\n        )\n\n        self.subscription = self.create_subscription(\n            LaserScan, \"/scan_input\", self.lidar_callback, qos_profile=qos_prof_1\n        )\n\n        qos_prof_2 = QoSProfile(\n            reliability=ReliabilityPolicy.RELIABLE, history=HistoryPolicy.KEEP_LAST, depth=10\n        )\n\n        self.msg_buffer = []\n        self.publisher = self.create_publisher(LaserScan, \"/scan_output\", qos_profile=qos_prof_2)\n\n        self.logger = self.get_logger()\n        self.logger.set_level(logging.INFO)\n\n    def lidar_callback(self, msg):\n        # self.logger.info(\"Received message\")\n        self.msg_buffer.append(msg)\n        if len(self.msg_buffer) > 5:\n            # self.logger.info(\"Merging messages\")\n            merged_msg = self.merge_lidar_msgs()\n            # self.msg_buffer.pop(0)\n            self.msg_buffer = []\n            self.publisher.publish(merged_msg)\n\n    def merge_lidar_msgs(self):\n        merged_ranges = [0.0] * len(self.msg_buffer[0].ranges) * len(self.msg_buffer)\n        # cont_inf = 0\n        cont_tot = 0\n        for i in range(len(self.msg_buffer)):\n            for j in range(len(self.msg_buffer[i].ranges)):\n                # if self.msg_buffer[i].ranges[j] != float(\"inf\"):\n                merged_ranges[cont_tot] = self.msg_buffer[i].ranges[j]\n                cont_tot += 1\n                # else:\n                #    cont_inf += 1\n\n        # self.logger.info(f\"Number of infinite values from total: {cont_inf}/{cont_tot}\")\n\n        merged_msg = LaserScan()\n        # merged_msg = copy.deepcopy(self.msg_buffer[-1])\n        merged_msg.header = self.msg_buffer[-1].header\n\n        merged_msg.time_increment = self.msg_buffer[0].time_increment\n\n        merged_msg.angle_increment = self.msg_buffer[0].angle_increment\n        merged_msg.angle_min = self.msg_buffer[0].angle_min\n        merged_msg.angle_max = (\n            self.msg_buffer[0].angle_min + (len(merged_ranges) - 1) * merged_msg.angle_increment\n        )\n\n        # print(f\"first angle_min: {self.msg_buffer[0].angle_min}\")\n        # print(f\"angle_min: {merged_msg.angle_min}\")\n        # print(f\"angle_max: {merged_msg.angle_max}\")\n\n        # merged_msg.angle_min = self.msg_buffer[0].angle_min - self.msg_buffer[0].angle_increment*len(self.msg_buffer)\n        # merged_msg.angle_max = merged_msg.angle_min + (len(merged_ranges)-1)*merged_msg.angle_increment\n\n        merged_msg.range_min = min(msg.range_min for msg in self.msg_buffer)\n        merged_msg.range_max = max(msg.range_max for msg in self.msg_buffer)\n        merged_msg.ranges = merged_ranges\n\n        return merged_msg\n\n\ndef main(args=None):\n    rclpy.init(args=args)\n    lidar_processor = LidarProcessor()\n    rclpy.spin(lidar_processor)\n    lidar_processor.destroy_node()\n    rclpy.shutdown()\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/cl_nav2z.cpp",
    "content": "// Copyright 2024 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <pluginlib/class_list_macros.hpp>\n\nnamespace cl_nav2z\n{\n\n// No implementation needed for the refactored client - all functionality\n// is provided through components and the header-only interface\n\n}  // namespace cl_nav2z\n\n// Export the ClNav2Z class as type smacc2::ISmaccClient as an implementation of the ISmaccClient interface.\nPLUGINLIB_EXPORT_CLASS(cl_nav2z::ClNav2Z, smacc2::ISmaccClient)\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_abort_navigation.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <cl_nav2z/client_behaviors/cb_abort_navigation.hpp>\n#include <cl_nav2z/common.hpp>\n#include <cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.hpp>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n\n#include <rclcpp/parameter_client.hpp>\n\nnamespace cl_nav2z\n{\nCbAbortNavigation::CbAbortNavigation() {}\n\nvoid CbAbortNavigation::onEntry()\n{\n  // this->sendGoal(goal);\n\n  this->nav2ActionInterface_->cancelNavigation();\n  this->postSuccessEvent();\n}\n\nvoid CbAbortNavigation::onExit() {}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_absolute_rotate.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <cl_nav2z/client_behaviors/cb_absolute_rotate.hpp>\n#include <cl_nav2z/common.hpp>\n#include <cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.hpp>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n\n#include <rclcpp/parameter_client.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace smacc2;\n\nCbAbsoluteRotate::CbAbsoluteRotate() {}\nCbAbsoluteRotate::CbAbsoluteRotate(float absoluteGoalAngleDegree, float yaw_goal_tolerance)\n{\n  this->absoluteGoalAngleDegree = absoluteGoalAngleDegree;\n\n  if (yaw_goal_tolerance >= 0)\n  {\n    this->yawGoalTolerance = yaw_goal_tolerance;\n  }\n}\n\nvoid CbAbsoluteRotate::onEntry()\n{\n  listener = std::make_shared<tf2_ros::Buffer>(getNode()->get_clock());\n  double goal_angle = this->absoluteGoalAngleDegree;\n\n  RCLCPP_INFO_STREAM(getLogger(), \"[CbAbsoluteRotate] Absolute yaw Angle:\" << goal_angle);\n\n  CpPlannerSwitcher * plannerSwitcher;\n  this->requiresComponent(plannerSwitcher, ComponentRequirement::SOFT);\n\n  if (spinningPlanner && *spinningPlanner == SpinningPlanner::PureSpinning)\n  {\n    plannerSwitcher->setPureSpinningPlanner();\n  }\n  else\n  {\n    plannerSwitcher->setDefaultPlanners();\n  }\n\n  updateTemporalBehaviorParameters(false);\n\n  cl_nav2z::CpPose * p;\n  this->requiresComponent(p, ComponentRequirement::HARD);\n\n  auto referenceFrame = p->getReferenceFrame();\n  auto currentPoseMsg = p->toPoseMsg();\n\n  nav2_msgs::action::NavigateToPose::Goal goal;\n  goal.pose.header.frame_id = referenceFrame;\n  //goal.pose.header.stamp = getNode()->now();\n\n  auto targetAngle = goal_angle * M_PI / 180.0;\n  goal.pose.pose.position = currentPoseMsg.position;\n  tf2::Quaternion q;\n  q.setRPY(0, 0, targetAngle);\n  goal.pose.pose.orientation = tf2::toMsg(q);\n\n  cl_nav2z::odom_tracker::CpOdomTracker * odomTracker_;\n  this->requiresComponent(odomTracker_, ComponentRequirement::SOFT);\n\n  if (odomTracker_ != nullptr)\n  {\n    auto pathname = this->getCurrentState()->getName() + \" - \" + getName();\n    odomTracker_->pushPath(pathname);\n    odomTracker_->setStartPoint(p->toPoseStampedMsg());\n    odomTracker_->setCurrentMotionGoal(goal.pose);\n    odomTracker_->setWorkingMode(odom_tracker::WorkingMode::RECORD_PATH);\n  }\n\n  CpGoalCheckerSwitcher * goalCheckerSwitcher;\n  this->requiresComponent(goalCheckerSwitcher, ComponentRequirement::HARD);\n\n  goalCheckerSwitcher->setGoalCheckerId(\"absolute_rotate_goal_checker\");\n\n  RCLCPP_INFO_STREAM(\n    getLogger(),\n    \"[\" << getName() << \"] current pose yaw: \" << tf2::getYaw(currentPoseMsg.orientation));\n  RCLCPP_INFO_STREAM(\n    getLogger(),\n    \"[\" << getName() << \"] goal pose yaw: \" << tf2::getYaw(goal.pose.pose.orientation));\n  this->sendGoal(goal);\n}\n\nvoid CbAbsoluteRotate::updateTemporalBehaviorParameters(bool undo)\n{\n  auto log = this->getLogger();\n\n  std::string nodename = \"/controller_server\";\n\n  auto parameters_client =\n    std::make_shared<rclcpp::AsyncParametersClient>(this->getNode(), nodename);\n\n  RCLCPP_INFO_STREAM(\n    log, \"[\" << getName() << \"] using a parameter client to update some controller parameters: \"\n             << nodename << \". Waiting service.\");\n  parameters_client->wait_for_service();\n\n  RCLCPP_INFO_STREAM(log, \"[\" << getName() << \"] Service found: \" << nodename << \".\");\n\n  std::string localPlannerName;\n  std::vector<rclcpp::Parameter> parameters;\n\n  // dynamic_reconfigure::DoubleParameter yaw_goal_tolerance;\n  rclcpp::Parameter yaw_goal_tolerance(\"goal_checker.yaw_goal_tolerance\");\n\n  rclcpp::Parameter max_vel_theta, min_vel_theta;\n\n  bool isRosBasePlanner = !spinningPlanner || *spinningPlanner == SpinningPlanner::Default;\n  bool isPureSpinningPlanner = spinningPlanner && *spinningPlanner == SpinningPlanner::PureSpinning;\n\n  // SELECTING CONTROLLER AND PARAMETERS NAME\n  if (isPureSpinningPlanner)\n  {\n    localPlannerName = \"PureSpinningLocalPlanner\";\n    max_vel_theta = rclcpp::Parameter(localPlannerName + \".max_angular_z_speed\");\n    min_vel_theta = rclcpp::Parameter(localPlannerName + \".min_vel_theta\");\n  }\n  else if (isRosBasePlanner)\n  {\n    localPlannerName = \"FollowPath\";\n    max_vel_theta = rclcpp::Parameter(localPlannerName + \".max_vel_theta\");\n    min_vel_theta = rclcpp::Parameter(localPlannerName + \".min_vel_theta\");\n  }\n\n  if (!undo)\n  {\n    if (yawGoalTolerance)\n    {\n      // save old yaw tolerance\n      auto fut = parameters_client->get_parameters(\n        {localPlannerName + \".yaw_goal_tolerance\"},\n        [&](auto futureParameters)\n        {\n          auto params = futureParameters.get();\n          oldYawTolerance = params[0].as_double();\n        });\n\n      // make synchronous\n      fut.get();\n\n      yaw_goal_tolerance = rclcpp::Parameter(\"goal_checker.yaw_goal_tolerance\", *yawGoalTolerance);\n      parameters.push_back(yaw_goal_tolerance);\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << getName()\n                         << \"] updating yaw tolerance local planner to: \" << *yawGoalTolerance\n                         << \", from previous value: \" << this->oldYawTolerance);\n    }\n\n    if (maxVelTheta)\n    {\n      if (isRosBasePlanner)\n      {\n        // nh.getParam(nodename + \"/\"  + localPlannerName+\"/min_vel_theta\", oldMinVelTheta);\n        // getCurrentState()->getParam(nodename + \"/\" + localPlannerName + \"/max_vel_theta\", oldMaxVelTheta);\n\n        // save old yaw tolerance\n        auto fut = parameters_client->get_parameters(\n          {localPlannerName + \".max_vel_theta\"},\n          [&](auto futureParameters)\n          {\n            auto params = futureParameters.get();\n            oldMaxVelTheta = params[0].as_double();\n          });\n\n        // make synchronous\n        fut.get();\n      }\n\n      max_vel_theta = rclcpp::Parameter(localPlannerName + \".max_vel_theta\", *maxVelTheta);\n      min_vel_theta = rclcpp::Parameter(localPlannerName + \".min_vel_theta\", -*maxVelTheta);\n      parameters.push_back(max_vel_theta);\n      parameters.push_back(min_vel_theta);\n\n      RCLCPP_INFO_STREAM(\n        log, \"[\" << getName() << \"] updating max vel theta local planner to: \" << *maxVelTheta\n                 << \", from previous value: \" << this->oldMaxVelTheta);\n      RCLCPP_INFO_STREAM(\n        log, \"[\" << getName() << \"] updating min vel theta local planner to: \" << -*maxVelTheta\n                 << \", from previous value: \" << this->oldMinVelTheta);\n    }\n  }\n  else\n  {\n    if (yawGoalTolerance)\n    {\n      yaw_goal_tolerance = rclcpp::Parameter(\"goal_checker.yaw_goal_tolerance\", oldYawTolerance);\n      RCLCPP_INFO_STREAM(\n        log, \"[\" << getName() << \"] restoring yaw tolerance local planner from: \"\n                 << *yawGoalTolerance << \" , to previous value: \" << this->oldYawTolerance);\n    }\n\n    if (maxVelTheta)\n    {\n      if (isRosBasePlanner)\n      {\n        max_vel_theta = rclcpp::Parameter(localPlannerName + \".max_vel_theta\", oldMaxVelTheta);\n        min_vel_theta = rclcpp::Parameter(localPlannerName + \".max_vel_theta\", oldMinVelTheta);\n      }\n\n      parameters.push_back(max_vel_theta);\n      parameters.push_back(min_vel_theta);\n      RCLCPP_INFO_STREAM(\n        log, \"[\" << getName() << \"] restoring max vel theta local planner from: \" << *maxVelTheta\n                 << \", to previous value: \" << this->oldMaxVelTheta);\n      RCLCPP_INFO_STREAM(\n        log, \"[\" << getName() << \"] restoring min vel theta local planner from: \" << -(*maxVelTheta)\n                 << \", to previous value: \" << this->oldMinVelTheta);\n    }\n  }\n\n  if (parameters.size())\n  {\n    std::stringstream ss;\n    ss << \"Executing asynchronous request. Parameters to update: \" << std::endl;\n    for (auto & p : parameters)\n    {\n      ss << p.get_name() << \" - \" << p.value_to_string() << std::endl;\n    }\n\n    RCLCPP_INFO_STREAM(getLogger(), \"[CbAbsoluteRotate] \" << ss.str());\n\n    auto futureResults = parameters_client->set_parameters(parameters);\n\n    int i = 0;\n    for (auto & res : futureResults.get())\n    {\n      RCLCPP_INFO_STREAM(\n        getLogger(), \"[\" << getName() << \"] parameter result: \" << parameters[i].get_name() << \"=\"\n                         << parameters[i].as_string() << \". Result: \" << res.successful);\n      i++;\n    }\n\n    RCLCPP_INFO_STREAM(log, \"[\" << getName() << \"] parameters updated\");\n  }\n  else\n  {\n    RCLCPP_INFO_STREAM(log, \"[\" << getName() << \"] skipping parameters update\");\n  }\n}\n\nvoid CbAbsoluteRotate::onExit()\n{\n  if (spinningPlanner && *spinningPlanner == SpinningPlanner::PureSpinning)\n  {\n  }\n  else\n  {\n  }\n\n  this->updateTemporalBehaviorParameters(true);\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_active_stop.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <angles/angles.h>\n#include <geometry_msgs/msg/twist.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\n#include <cl_nav2z/client_behaviors/cb_active_stop.hpp>\n\nnamespace cl_nav2z\n{\nCbActiveStop::CbActiveStop() {}\n\nvoid CbActiveStop::onEntry()\n{\n  auto nh = this->getNode();\n  cmd_vel_pub_ = nh->create_publisher<geometry_msgs::msg::Twist>(\"/cmd_vel\", rclcpp::QoS(1));\n\n  rclcpp::Rate loop_rate(5);\n  geometry_msgs::msg::Twist cmd_vel_msg;\n  while (!this->isShutdownRequested())\n  {\n    cmd_vel_msg.linear.x = 0;\n    cmd_vel_msg.angular.z = 0;\n\n    cmd_vel_pub_->publish(cmd_vel_msg);\n    loop_rate.sleep();\n  }\n  RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] Finished behavior execution\");\n\n  this->postSuccessEvent();\n}\n\nvoid CbActiveStop::onExit() {}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_load_waypoints_file.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/client_behaviors/cb_load_waypoints_file.hpp>\n#include <cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator_base.hpp>\n#include <smacc2/smacc_client_behavior.hpp>\n\nnamespace cl_nav2z\n{\n\nusing namespace smacc2;\nCbLoadWaypointsFile::CbLoadWaypointsFile(std::string filepath) : filepath_(filepath) {}\n\nCbLoadWaypointsFile::CbLoadWaypointsFile(std::string parameter_name, std::string packagenamespace)\n: parameterName_(parameter_name), packageNamespace_(packagenamespace)\n{\n}\n\nvoid CbLoadWaypointsFile::onEntry()\n{\n  requiresComponent(\n    waypointsNavigator_, ComponentRequirement::HARD);  // this is a component from the\n                                                       // nav2z_client library\n\n  if (filepath_)\n  {\n    this->waypointsNavigator_->loadWayPointsFromFile(filepath_.value());\n  }\n  else\n  {\n    RCLCPP_INFO(getLogger(), \"Loading waypoints from parameter %s\", parameterName_.value().c_str());\n    this->waypointsNavigator_->loadWaypointsFromYamlParameter(\n      parameterName_.value(), packageNamespace_.value());\n  }\n\n  // change this to skip some points of the yaml file, default = 0\n  waypointsNavigator_->currentWaypoint_ = 0;\n  this->postSuccessEvent();\n}\n\nvoid CbLoadWaypointsFile::onExit() {}\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_nav2z_client_behavior_base.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <cl_nav2z/client_behaviors/cb_nav2z_client_behavior_base.hpp>\n#include <cl_nav2z/common.hpp>\n\nnamespace cl_nav2z\n{\nCbNav2ZClientBehaviorBase::~CbNav2ZClientBehaviorBase() {}\n\n// REMOVED: All legacy implementation - behaviors now use component APIs directly\n// The base class provides component access but no complex logic\n// Individual behaviors should use:\n//   nav2ActionInterface_->sendGoal(goal)\n//   nav2ActionInterface_->onNavigationSucceeded(&Behavior::onSuccess, this)\n//   etc.\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_navigate_backward.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <tf2/utils.h>\n#include <cl_nav2z/client_behaviors/cb_navigate_backwards.hpp>\n#include <cl_nav2z/common.hpp>\n#include <cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.hpp>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n#include <geometry_msgs/msg/quaternion_stamped.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace ::cl_nav2z::odom_tracker;\nusing namespace smacc2;\n\nCbNavigateBackwards::CbNavigateBackwards(float backwardDistance)\n{\n  if (backwardDistance < 0)\n  {\n    RCLCPP_ERROR(getLogger(), \"[CbNavigateBackwards] distance must be greater or equal than 0\");\n    this->backwardDistance = 0;\n  }\n  this->backwardDistance = backwardDistance;\n}\n\nvoid CbNavigateBackwards::onEntry()\n{\n  // straight motion distance\n  double dist = backwardDistance;\n\n  RCLCPP_INFO_STREAM(\n    getLogger(), \"[CbNavigateBackwards] Straight backwards motion distance: \" << dist);\n\n  cl_nav2z::CpPose * p;\n  this->requiresComponent(p, ComponentRequirement::HARD);\n\n  auto referenceFrame = p->getReferenceFrame();\n  auto currentPoseMsg = p->toPoseMsg();\n  tf2::Transform currentPose;\n  tf2::fromMsg(currentPoseMsg, currentPose);\n\n  tf2::Transform backwardDeltaTransform;\n  backwardDeltaTransform.setIdentity();\n  backwardDeltaTransform.setOrigin(tf2::Vector3(-dist, 0, 0));\n\n  tf2::Transform targetPose = currentPose * backwardDeltaTransform;\n\n  nav2_msgs::action::NavigateToPose::Goal goal;\n  goal.pose.header.frame_id = referenceFrame;\n  //goal.pose.header.stamp = getNode()->now();\n  tf2::toMsg(targetPose, goal.pose.pose);\n  RCLCPP_INFO_STREAM(getLogger(), \"[CbNavigateBackwards] TARGET POSE BACKWARDS: \" << goal.pose);\n\n  geometry_msgs::msg::PoseStamped currentStampedPoseMsg;\n  currentStampedPoseMsg.header.frame_id = referenceFrame;\n  currentStampedPoseMsg.header.stamp = getNode()->now();\n  tf2::toMsg(currentPose, currentStampedPoseMsg.pose);\n\n  CpOdomTracker * odomTracker_;\n  requiresComponent(odomTracker_, ComponentRequirement::SOFT);\n\n  if (odomTracker_ != nullptr)\n  {\n    this->odomTracker_->clearPath();\n    this->odomTracker_->setStartPoint(currentStampedPoseMsg);\n    this->odomTracker_->setWorkingMode(WorkingMode::RECORD_PATH);\n  }\n\n  CpPlannerSwitcher * plannerSwitcher;\n  requiresComponent(plannerSwitcher, ComponentRequirement::HARD);\n  plannerSwitcher->setBackwardPlanner();\n\n  CpGoalCheckerSwitcher * goalCheckerSwitcher;\n  requiresComponent(goalCheckerSwitcher, ComponentRequirement::HARD);\n  goalCheckerSwitcher->setGoalCheckerId(\"backward_goal_checker\");\n\n  this->sendGoal(goal);\n}\n\nvoid CbNavigateBackwards::onExit()\n{\n  if (odomTracker_)\n  {\n    this->odomTracker_->setWorkingMode(WorkingMode::IDLE);\n  }\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_navigate_forward.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/common.hpp>\n\n#include <cl_nav2z/client_behaviors/cb_navigate_forward.hpp>\n#include <cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.hpp>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n\nnamespace cl_nav2z\n{\nusing ::cl_nav2z::odom_tracker::CpOdomTracker;\nusing ::cl_nav2z::odom_tracker::WorkingMode;\n\nusing ::cl_nav2z::CpPose;\nusing namespace smacc2;\n\nCbNavigateForward::CbNavigateForward(float distance_meters) : forwardDistance_(distance_meters) {}\nCbNavigateForward::CbNavigateForward() {}\n\nCbNavigateForward::CbNavigateForward(geometry_msgs::msg::PoseStamped goal) : goalPose_(goal) {}\n\nCbNavigateForward::~CbNavigateForward() {}\n\nvoid CbNavigateForward::setForwardDistance(float distance_meters)\n{\n  if (distance_meters < 0)\n  {\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << getName() << \"] negative forward distance: \" << distance_meters\n                       << \". Resetting to 0.\");\n    distance_meters = 0;\n  }\n  forwardDistance_ = distance_meters;\n\n  RCLCPP_INFO_STREAM(\n    getLogger(), \"[\" << getName() << \"] setting fw motion distance: \" << *forwardDistance_);\n}\n\nvoid CbNavigateForward::onEntry()\n{\n  if (forwardDistance_)\n  {\n    setForwardDistance(*forwardDistance_);\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << getName() << \"] Straight motion distance: \" << *forwardDistance_);\n  }\n\n  // get current pose\n  CpPose * p;\n  this->requiresComponent(p, ComponentRequirement::HARD);\n\n  auto referenceFrame = p->getReferenceFrame();\n  auto currentPoseMsg = p->toPoseMsg();\n\n  RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"]\" << \"current pose: \" << currentPoseMsg);\n\n  // force global orientation if it is requested\n  if (options.forceInitialOrientation)\n  {\n    currentPoseMsg.orientation = *(options.forceInitialOrientation);\n    RCLCPP_WARN_STREAM(\n      getLogger(), \"[\" << getName() << \"]\" << \"Forcing initial straight motion orientation: \"\n                       << currentPoseMsg.orientation);\n  }\n\n  tf2::Transform currentPose;\n  tf2::fromMsg(currentPoseMsg, currentPose);\n\n  tf2::Transform targetPose;\n  if (goalPose_)\n  {\n    tf2::fromMsg(goalPose_->pose, targetPose);\n  }\n  else if (forwardDistance_)\n  {\n    // compute forward goal pose\n    tf2::Transform forwardDeltaTransform;\n    forwardDeltaTransform.setIdentity();\n    forwardDeltaTransform.setOrigin(tf2::Vector3(*forwardDistance_, 0, 0));\n\n    targetPose = currentPose * forwardDeltaTransform;\n  }\n  else\n  {\n    RCLCPP_WARN_STREAM(\n      getLogger(),\n      \"[\" << getName() << \"]\"\n          << \"No goal Pose or Distance is specified. Aborting. No action request is sent.\"\n          << currentPoseMsg.orientation);\n\n    return;\n  }\n\n  // action goal\n  nav2_msgs::action::NavigateToPose::Goal goal;\n  goal.pose.header.frame_id = referenceFrame;\n  //goal.pose.header.stamp = getNode()->now();\n  tf2::toMsg(targetPose, goal.pose.pose);\n  RCLCPP_INFO_STREAM(\n    getLogger(), \"[\" << getName() << \"]\" << \" TARGET POSE FORWARD: \" << goal.pose.pose);\n\n  // current pose\n  geometry_msgs::msg::PoseStamped currentStampedPoseMsg;\n  currentStampedPoseMsg.header.frame_id = referenceFrame;\n  currentStampedPoseMsg.header.stamp =\n    getNode()->now();  // probably it is better avoid setting that goal timestamp\n\n  tf2::toMsg(currentPose, currentStampedPoseMsg.pose);\n\n  requiresComponent(odomTracker_, ComponentRequirement::SOFT);\n\n  if (odomTracker_ != nullptr)\n  {\n    auto pathname = this->getCurrentState()->getName() + \" - \" + getName();\n    odomTracker_->pushPath(pathname);\n    odomTracker_->setStartPoint(currentStampedPoseMsg);\n    odomTracker_->setCurrentMotionGoal(goal.pose);\n    odomTracker_->setWorkingMode(WorkingMode::RECORD_PATH);\n  }\n\n  CpPlannerSwitcher * plannerSwitcher;\n  this->requiresComponent(plannerSwitcher, ComponentRequirement::HARD);\n  plannerSwitcher->setForwardPlanner();\n\n  CpGoalCheckerSwitcher * goalCheckerSwitcher;\n  this->requiresComponent(goalCheckerSwitcher, ComponentRequirement::HARD);\n  goalCheckerSwitcher->setGoalCheckerId(\"forward_goal_checker\");\n\n  this->sendGoal(goal);\n}\n\nvoid CbNavigateForward::onExit()\n{\n  if (odomTracker_)\n  {\n    this->odomTracker_->setWorkingMode(WorkingMode::IDLE);\n  }\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_navigate_global_position.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <cl_nav2z/common.hpp>\n\n#include <cl_nav2z/client_behaviors/cb_navigate_global_position.hpp>\n#include <cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.hpp>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <cl_nav2z/components/planner_switcher/cp_planner_switcher.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace ::cl_nav2z::odom_tracker;\nusing namespace smacc2;\n\nCbNavigateGlobalPosition::CbNavigateGlobalPosition() {}\n\nCbNavigateGlobalPosition::CbNavigateGlobalPosition(\n  float x, float y, float yaw, std::optional<CbNavigateGlobalPositionOptions> options)\n{\n  auto p = geometry_msgs::msg::Point();\n  p.x = x;\n  p.y = y;\n  goalPosition = p;\n  goalYaw = yaw;\n\n  if (options) this->options = *options;\n}\n\nvoid CbNavigateGlobalPosition::setGoal(const geometry_msgs::msg::Pose & pose)\n{\n  goalPosition = pose.position;\n  goalYaw = tf2::getYaw(pose.orientation);\n}\n\nvoid CbNavigateGlobalPosition::onEntry()\n{\n  RCLCPP_INFO(getLogger(), \"Entering Navigate Global position\");\n  RCLCPP_INFO(getLogger(), \"Component requirements completed\");\n\n  cl_nav2z::CpPose * cpPose;\n  this->requiresComponent(cpPose, ComponentRequirement::HARD);\n  auto pose = cpPose->toPoseMsg();\n\n  CpOdomTracker * odomTracker;\n  this->requiresComponent(odomTracker, ComponentRequirement::HARD);\n\n  CpPlannerSwitcher * plannerSwitcher;\n  this->requiresComponent(plannerSwitcher, ComponentRequirement::HARD);\n\n  plannerSwitcher->setDefaultPlanners(false);\n\n  if (options.controllerName_)\n  {\n    plannerSwitcher->setDesiredController(*(options.controllerName_));\n  }\n\n  plannerSwitcher->commitPublish();\n\n  CpGoalCheckerSwitcher * goalCheckerSwitcher;\n  this->requiresComponent(goalCheckerSwitcher, ComponentRequirement::HARD);\n  goalCheckerSwitcher->setGoalCheckerId(\"goal_checker\");\n\n  auto pathname = this->getCurrentState()->getName() + \" - \" + getName();\n  odomTracker->pushPath(pathname);\n  odomTracker->setStartPoint(pose);\n  odomTracker->setWorkingMode(WorkingMode::RECORD_PATH);\n\n  execute();\n}\n\n// auxiliary function that defines the motion that is requested to the nav2 action server\nvoid CbNavigateGlobalPosition::execute()\n{\n  cl_nav2z::CpPose * p;\n  this->requiresComponent(p, ComponentRequirement::HARD);\n\n  auto referenceFrame = p->getReferenceFrame();\n  // auto currentPoseMsg = p->toPoseMsg();\n\n  RCLCPP_INFO(getLogger(), \"Sending Goal to MoveBase\");\n  nav2_msgs::action::NavigateToPose::Goal goal;\n  goal.pose.header.frame_id = referenceFrame;\n  //goal.pose.header.stamp = getNode()->now();\n\n  goal.pose.pose.position = goalPosition;\n  tf2::Quaternion q;\n  q.setRPY(0, 0, goalYaw);\n  goal.pose.pose.orientation = tf2::toMsg(q);\n\n  this->sendGoal(goal);\n}\n\n// This is the substate destructor. This code will be executed when the\n// workflow exits from this substate (that is according to statechart the moment when this object is destroyed)\nvoid CbNavigateGlobalPosition::onExit()\n{\n  RCLCPP_INFO(getLogger(), \"Exiting move goal Action Client\");\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_navigate_named_waypoint.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/client_behaviors/cb_navigate_named_waypoint.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace smacc2;\n\nCbNavigateNamedWaypoint::CbNavigateNamedWaypoint(\n  std::string waypointname, std::optional<NavigateNextWaypointOptions> options)\n: CbNavigateNextWaypoint(options)\n{\n  waypointname_ = waypointname;\n}\n\nCbNavigateNamedWaypoint::~CbNavigateNamedWaypoint() {}\n\nvoid CbNavigateNamedWaypoint::onEntry()\n{\n  // waypointsNavigator_ = this->getComponent<CpWaypointNavigator>();\n  // waypointsNavigator_->sendNextGoal(options_);\n\n  // auto waypointname = waypointsNavigator_->getCurrentWaypointName();\n\n  // if(waypointname)\n  // {\n  // RCLCPP_INFO(\n  //   getLogger(), \"[CbNavigateNamedWaypoint] current iteration waypoints i: %ld with name '%s'\",\n  //   waypointsNavigator_->getCurrentWaypointIndex(), waypointname->c_str());  }\n  // else\n  // {\n  // RCLCPP_INFO(\n  //   getLogger(), \"[CbNavigateNamedWaypoint] current iteration waypoints i: %ld\",\n  //   waypointsNavigator_->getCurrentWaypointIndex());  }\n\n  CpWaypointNavigator * waypointsNavigator_;\n  this->requiresComponent(waypointsNavigator_, ComponentRequirement::HARD);\n\n  waypointsNavigator_->seekName(waypointname_);\n  CbNavigateNextWaypoint::onEntry();\n}\n\nvoid CbNavigateNamedWaypoint::onExit() { CbNavigateNextWaypoint::onExit(); }\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_navigate_next_waypoint.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/client_behaviors/cb_navigate_next_waypoint.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace smacc2;\n\nCbNavigateNextWaypoint::CbNavigateNextWaypoint(std::optional<NavigateNextWaypointOptions> options)\n{\n  if (options) options_ = *options;\n}\n\nCbNavigateNextWaypoint::~CbNavigateNextWaypoint() {}\n\nvoid CbNavigateNextWaypoint::onEntry()\n{\n  this->requiresComponent(waypointsNavigator_, ComponentRequirement::HARD);\n\n  auto goalHandle = waypointsNavigator_->sendNextGoal(options_);\n\n  auto waypointname = waypointsNavigator_->getCurrentWaypointName();\n\n  if (waypointname)\n  {\n    RCLCPP_INFO(\n      getLogger(), \"[CbNavigateNextWaypoint] current iteration waypoints i: %ld with name '%s'\",\n      waypointsNavigator_->getCurrentWaypointIndex(), waypointname->c_str());\n  }\n  else\n  {\n    RCLCPP_INFO(\n      getLogger(), \"[CbNavigateNextWaypoint] current iteration waypoints i: %ld\",\n      waypointsNavigator_->getCurrentWaypointIndex());\n  }\n}\n\nvoid CbNavigateNextWaypoint::onExit() { waypointsNavigator_->stopWaitingResult(); }\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_navigate_next_waypoint_free.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <cl_nav2z/client_behaviors/cb_navigate_next_waypoint_free.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace smacc2;\n\nCbNavigateNextWaypointFree::CbNavigateNextWaypointFree() {}\n\nCbNavigateNextWaypointFree::~CbNavigateNextWaypointFree() {}\n\nvoid CbNavigateNextWaypointFree::onEntry()\n{\n  requiresComponent(this->waypointsNavigator_, ComponentRequirement::HARD);\n  this->target_pose_ = this->waypointsNavigator_->getCurrentPose();\n\n  this->onSuccess(&CbNavigateNextWaypointFree::CbNavigateNextWaypointFree::onSucessCallback, this);\n  RCLCPP_INFO_STREAM(\n    getLogger(), \"[CbNavigateNextWaypoint] initial load file target pose: x: \"\n                   << this->target_pose_.position.x << \", y: \" << this->target_pose_.position.y);\n  CbPositionControlFreeSpace::onEntry();\n}\n\nvoid CbNavigateNextWaypointFree::onSucessCallback()\n{\n  RCLCPP_INFO_STREAM(getLogger(), \"[CbNavigateNextWaypoint] Success on planning to next waypoint\");\n  this->waypointsNavigator_->notifyGoalReached();\n  this->waypointsNavigator_->forward(1);\n  RCLCPP_INFO_STREAM(\n    getLogger(), \"[CbNavigateNextWaypoint] next position index: \"\n                   << this->waypointsNavigator_->getCurrentWaypointIndex() << \"/\"\n                   << this->waypointsNavigator_->getWaypoints().size());\n}\n\nvoid CbNavigateNextWaypointFree::onExit() {}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_navigate_next_waypoint_until_reached.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/client_behaviors/cb_navigate_next_waypoint_until_reached.hpp>\n\nnamespace cl_nav2z\n{\nCbNavigateNextWaypointUntilReached::CbNavigateNextWaypointUntilReached(\n  std::string goalWaypointName, std::optional<NavigateNextWaypointOptions> options)\n: CbNavigateNextWaypoint(options), goalWaypointName_(goalWaypointName)\n{\n}\n\nCbNavigateNextWaypointUntilReached::~CbNavigateNextWaypointUntilReached() {}\n\nvoid CbNavigateNextWaypointUntilReached::onEntry() { CbNavigateNextWaypoint::onEntry(); }\n\nvoid CbNavigateNextWaypointUntilReached::onExit() { CbNavigateNextWaypoint::onExit(); }\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_pause_slam.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <cl_nav2z/client_behaviors/cb_pause_slam.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace smacc2;\n\nCbPauseSlam::CbPauseSlam(std::string serviceName)\n: smacc2::client_behaviors::CbServiceCall<slam_toolbox::srv::Pause>(serviceName.c_str())\n{\n}\n\nvoid CbPauseSlam::onEntry()\n{\n  this->requiresComponent(this->slam_, ComponentRequirement::HARD);\n\n  auto currentState = slam_->getState();\n\n  if (currentState == CpSlamToolbox::SlamToolboxState::Resumed)\n  {\n    RCLCPP_INFO(\n      getLogger(), \"[CbPauseSlam] calling pause service to toggle from resumed to paused\");\n    this->request_ = std::make_shared<slam_toolbox::srv::Pause::Request>();\n    CbServiceCall<slam_toolbox::srv::Pause>::onEntry();\n    this->slam_->toggleState();\n  }\n  else\n  {\n    this->request_ = nullptr;\n    RCLCPP_INFO(\n      getLogger(), \"[CbPauseSlam] calling skipped. The current slam state is already paused.\");\n  }\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_position_control_free_space.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <angles/angles.h>\n#include <geometry_msgs/msg/twist.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\n#include <cl_nav2z/client_behaviors/cb_position_control_free_space.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace smacc2;\nCbPositionControlFreeSpace::CbPositionControlFreeSpace()\n: targetYaw_(0), k_betta_(1.0), max_angular_yaw_speed_(1.0)\n{\n}\n\nvoid CbPositionControlFreeSpace::updateParameters() {}\n\nvoid CbPositionControlFreeSpace::onEntry()\n{\n  auto nh = this->getNode();\n  cmd_vel_pub_ = nh->create_publisher<geometry_msgs::msg::Twist>(\"/cmd_vel\", rclcpp::QoS(1));\n\n  cl_nav2z::CpPose * pose;\n\n  this->requiresComponent(pose, ComponentRequirement::HARD);\n\n  geometry_msgs::msg::Twist cmd_vel;\n  goalReached_ = false;\n\n  geometry_msgs::msg::Pose currentPose = pose->toPoseMsg();\n\n  rclcpp::Rate loop_rate(10);\n\n  // PID controller gains (proportional, integral, and derivative)\n  double kp_linear = 0.5;\n  double ki_linear = 0.0;\n  double kd_linear = 0.1;\n\n  double kp_angular = 0.5;\n  double ki_angular = 0.0;\n  double kd_angular = 0.1;\n\n  while (rclcpp::ok() && !goalReached_)\n  {\n    RCLCPP_INFO_STREAM_THROTTLE(\n      getLogger(), *getNode()->get_clock(), 200,\n      \"CbPositionControlFreeSpace, current pose: \" << currentPose.position.x << \", \"\n                                                   << currentPose.position.y << \", \"\n                                                   << tf2::getYaw(currentPose.orientation));\n\n    RCLCPP_INFO_STREAM_THROTTLE(\n      getLogger(), *getNode()->get_clock(), 200,\n      \"CbPositionControlFreeSpace, target pose: \" << target_pose_.position.x << \", \"\n                                                  << target_pose_.position.y << \", \"\n                                                  << tf2::getYaw(target_pose_.orientation));\n\n    tf2::Quaternion q;\n    currentPose = pose->toPoseMsg();\n\n    // Here we implement the control logic to calculate the velocity command\n    // based on the received position of the vehicle and the target pose.\n\n    // Calculate the errors in x and y\n    double error_x = target_pose_.position.x - currentPose.position.x;\n    double error_y = target_pose_.position.y - currentPose.position.y;\n\n    // Calculate the distance to the target pose\n    double distance_to_target = std::sqrt(error_x * error_x + error_y * error_y);\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << getName() << \"] distance to target: \" << distance_to_target\n                       << \" ( th: \" << threshold_distance_ << \")\");\n\n    // Check if the robot has reached the target pose\n    if (distance_to_target < threshold_distance_)\n    {\n      RCLCPP_INFO(getLogger(), \"Goal reached!\");\n      // Stop the robot by setting the velocity commands to zero\n      geometry_msgs::msg::Twist cmd_vel_msg;\n      cmd_vel_msg.linear.x = 0.0;\n      cmd_vel_msg.angular.z = 0.0;\n      cmd_vel_pub_->publish(cmd_vel_msg);\n      break;\n    }\n    else\n    {\n      // Calculate the desired orientation angle\n      double desired_yaw = std::atan2(error_y, error_x);\n\n      // Calculate the difference between the desired orientation and the\n      // current orientation\n      double yaw_error = desired_yaw - (tf2::getYaw(currentPose.orientation) + M_PI);\n\n      // Ensure the yaw error is within the range [-pi, pi]\n      while (yaw_error > M_PI) yaw_error -= 2 * M_PI;\n      while (yaw_error < -M_PI) yaw_error += 2 * M_PI;\n\n      // Calculate the control signals (velocity commands) using PID controllers\n      double cmd_linear_x = kp_linear * distance_to_target + ki_linear * integral_linear_ +\n                            kd_linear * (distance_to_target - prev_error_linear_);\n      double cmd_angular_z = kp_angular * yaw_error + ki_angular * integral_angular_ +\n                             kd_angular * (yaw_error - prev_error_angular_);\n\n      if (cmd_linear_x > max_linear_velocity)\n        cmd_linear_x = max_linear_velocity;\n      else if (cmd_linear_x < -max_linear_velocity)\n        cmd_linear_x = -max_linear_velocity;\n\n      if (cmd_angular_z > max_angular_velocity)\n        cmd_angular_z = max_angular_velocity;\n      else if (cmd_angular_z < -max_angular_velocity)\n        cmd_angular_z = -max_angular_velocity;\n\n      // Construct and publish the velocity command message\n      geometry_msgs::msg::Twist cmd_vel_msg;\n\n      cmd_vel_msg.linear.x = cmd_linear_x;\n      cmd_vel_msg.angular.z = cmd_angular_z;\n\n      cmd_vel_pub_->publish(cmd_vel_msg);\n\n      // Update errors and integrals for the next control cycle\n      prev_error_linear_ = distance_to_target;\n      prev_error_angular_ = yaw_error;\n      integral_linear_ += distance_to_target;\n      integral_angular_ += yaw_error;\n\n      // tf2::fromMsg(currentPose.orientation, q);\n      // auto currentYaw = tf2::getYaw(currentPose.orientation);\n      // auto deltaAngle = angles::shortest_angular_distance(prevyaw,\n      // currentYaw); countAngle += deltaAngle;\n\n      // prevyaw = currentYaw;\n      // double angular_error = targetYaw_ - countAngle;\n\n      // auto omega = angular_error * k_betta_;\n      // cmd_vel.linear.x = 0;\n      // cmd_vel.linear.y = 0;\n      // cmd_vel.linear.z = 0;\n      // cmd_vel.angular.z =\n      //   std::min(std::max(omega, -fabs(max_angular_yaw_speed_)),\n      //   fabs(max_angular_yaw_speed_));\n\n      // RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] delta angle: \"\n      // << deltaAngle); RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"]\n      // cummulated angle: \" << countAngle); RCLCPP_INFO_STREAM(getLogger(), \"[\"\n      // << getName() << \"] k_betta_: \" << k_betta_);\n\n      // RCLCPP_INFO_STREAM(\n      //   getLogger(), \"[\" << getName() << \"] angular error: \" << angular_error\n      //   << \"(\"\n      //                    << yaw_goal_tolerance_rads_ << \")\");\n      // RCLCPP_INFO_STREAM(\n      //   getLogger(), \"[\" << getName() << \"] command angular speed: \" <<\n      //   cmd_vel.angular.z);\n\n      // if (fabs(angular_error) < yaw_goal_tolerance_rads_)\n      // {\n      //   RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] GOAL REACHED.\n      //   Sending stop command.\"); goalReached_ = true; cmd_vel.linear.x = 0;\n      //   cmd_vel.angular.z = 0;\n      //   break;\n      // }\n\n      // this->cmd_vel_pub_->publish(cmd_vel);\n\n      loop_rate.sleep();\n    }\n  }\n\n  RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] Finished behavior execution\");\n\n  this->postSuccessEvent();\n}\n\nvoid CbPositionControlFreeSpace::onExit() {}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_pure_spinning.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <angles/angles.h>\n#include <cl_nav2z/client_behaviors/cb_pure_spinning.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n#include <geometry_msgs/msg/twist.hpp>\n#include <sensor_msgs/msg/laser_scan.hpp>\nnamespace cl_nav2z\n{\nusing namespace smacc2;\nCbPureSpinning::CbPureSpinning(double targetYaw_rads, double max_angular_yaw_speed)\n: targetYaw__rads(targetYaw_rads),\n  k_betta_(1.0),\n  max_angular_yaw_speed_(max_angular_yaw_speed),\n  yaw_goal_tolerance_rads_(0.1)\n{\n}\n\nvoid CbPureSpinning::updateParameters() {}\n\nvoid CbPureSpinning::onEntry()\n{\n  auto nh = this->getNode();\n  cmd_vel_pub_ = nh->create_publisher<geometry_msgs::msg::Twist>(\"/cmd_vel\", rclcpp::QoS(1));\n\n  cl_nav2z::CpPose * pose;\n  this->requiresComponent(pose, ComponentRequirement::HARD);\n\n  geometry_msgs::msg::Twist cmd_vel;\n  goalReached_ = false;\n\n  geometry_msgs::msg::Pose currentPose = pose->toPoseMsg();\n\n  rclcpp::Rate loop_rate(10);\n  double countAngle = 0;\n  auto prevyaw = tf2::getYaw(currentPose.orientation);\n  while (rclcpp::ok() && !goalReached_)\n  {\n    tf2::Quaternion q;\n    currentPose = pose->toPoseMsg();\n    tf2::fromMsg(currentPose.orientation, q);\n    auto currentYaw = tf2::getYaw(currentPose.orientation);\n    auto deltaAngle = angles::shortest_angular_distance(prevyaw, currentYaw);\n    countAngle += deltaAngle;\n\n    prevyaw = currentYaw;\n    double angular_error = targetYaw__rads - countAngle;\n\n    auto omega = angular_error * k_betta_;\n    cmd_vel.linear.x = 0;\n    cmd_vel.linear.y = 0;\n    cmd_vel.linear.z = 0;\n    cmd_vel.angular.z =\n      std::min(std::max(omega, -fabs(max_angular_yaw_speed_)), fabs(max_angular_yaw_speed_));\n\n    RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] delta angle: \" << deltaAngle);\n    RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] cummulated angle: \" << countAngle);\n    RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] k_betta_: \" << k_betta_);\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << getName() << \"] angular error: \" << angular_error << \"(\"\n                       << yaw_goal_tolerance_rads_ << \")\");\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << getName() << \"] command angular speed: \" << cmd_vel.angular.z);\n\n    if (fabs(angular_error) < yaw_goal_tolerance_rads_)\n    {\n      RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] GOAL REACHED. Sending stop command.\");\n      goalReached_ = true;\n      cmd_vel.linear.x = 0;\n      cmd_vel.angular.z = 0;\n      break;\n    }\n\n    this->cmd_vel_pub_->publish(cmd_vel);\n\n    loop_rate.sleep();\n  }\n\n  this->postSuccessEvent();\n}\n\nvoid CbPureSpinning::onExit() {}\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_resume_slam.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <cl_nav2z/client_behaviors/cb_resume_slam.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace smacc2;\nCbResumeSlam::CbResumeSlam(std::string serviceName)\n: smacc2::client_behaviors::CbServiceCall<slam_toolbox::srv::Pause>(serviceName.c_str())\n{\n}\n\nvoid CbResumeSlam::onEntry()\n{\n  this->requiresComponent(this->slam_, ComponentRequirement::HARD);\n\n  auto currentState = slam_->getState();\n\n  if (currentState == CpSlamToolbox::SlamToolboxState::Paused)\n  {\n    RCLCPP_INFO(\n      getLogger(), \"[CbResumeSlam] calling pause service to toggle from paused to resumed\");\n    this->request_ = std::make_shared<slam_toolbox::srv::Pause::Request>();\n    smacc2::client_behaviors::CbServiceCall<slam_toolbox::srv::Pause>::onEntry();\n    this->slam_->toggleState();\n  }\n  else\n  {\n    this->request_ = nullptr;\n    RCLCPP_INFO(\n      getLogger(), \"[CbResumeSlam] calling skipped. The current slam state is already resumed.\");\n  }\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_rotate.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <geometry_msgs/msg/quaternion_stamped.hpp>\n\n#include <cl_nav2z/client_behaviors/cb_rotate.hpp>\n#include <cl_nav2z/common.hpp>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace smacc2;\n\nCbRotate::CbRotate(float rotate_degree) : rotateDegree(rotate_degree) {}\n\nCbRotate::CbRotate(float rotate_degree, SpinningPlanner spinning_planner)\n: rotateDegree(rotate_degree), spinningPlanner(spinning_planner)\n{\n}\n\nvoid CbRotate::onEntry()\n{\n  double angle_increment_degree = rotateDegree;\n\n  CpPlannerSwitcher * plannerSwitcher;\n  this->requiresComponent(plannerSwitcher, ComponentRequirement::HARD);\n\n  if (spinningPlanner && *spinningPlanner == SpinningPlanner::PureSpinning)\n  {\n    plannerSwitcher->setPureSpinningPlanner();\n  }\n  else\n  {\n    plannerSwitcher->setDefaultPlanners();\n  }\n\n  CpPose * p;\n  this->requiresComponent(p, ComponentRequirement::HARD);\n\n  auto referenceFrame = p->getReferenceFrame();\n  auto currentPoseMsg = p->toPoseMsg();\n\n  tf2::Transform currentPose;\n  tf2::fromMsg(currentPoseMsg, currentPose);\n\n  odom_tracker::CpOdomTracker * odomTracker;\n  this->requiresComponent(odomTracker, ComponentRequirement::SOFT);\n\n  nav2_msgs::action::NavigateToPose::Goal goal;\n  goal.pose.header.frame_id = referenceFrame;\n  //goal.pose.header.stamp = getNode()->now();\n\n  auto currentAngle = tf2::getYaw(currentPoseMsg.orientation);\n  auto targetAngle = currentAngle + angle_increment_degree * M_PI / 180.0;\n  goal.pose.pose.position = currentPoseMsg.position;\n  tf2::Quaternion q;\n  q.setRPY(0, 0, targetAngle);\n  goal.pose.pose.orientation = tf2::toMsg(q);\n\n  geometry_msgs::msg::PoseStamped stampedCurrentPoseMsg;\n  stampedCurrentPoseMsg.header.frame_id = referenceFrame;\n  stampedCurrentPoseMsg.header.stamp = getNode()->now();\n  stampedCurrentPoseMsg.pose = currentPoseMsg;\n\n  auto pathname = this->getCurrentState()->getName() + \" - \" + getName();\n  odomTracker->pushPath(pathname);\n\n  odomTracker->setStartPoint(stampedCurrentPoseMsg);\n  odomTracker->setWorkingMode(odom_tracker::WorkingMode::RECORD_PATH);\n\n  RCLCPP_INFO_STREAM(getLogger(), \"current pose: \" << currentPoseMsg);\n  RCLCPP_INFO_STREAM(getLogger(), \"goal pose: \" << goal.pose.pose);\n  this->sendGoal(goal);\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_rotate_look_at.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <cl_nav2z/client_behaviors/cb_rotate_look_at.hpp>\n#include <cl_nav2z/common.hpp>\n#include <cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.hpp>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n\n#include <rclcpp/parameter_client.hpp>\n\nnamespace cl_nav2z\n{\nCbRotateLookAt::CbRotateLookAt() {}\n\nCbRotateLookAt::CbRotateLookAt(const geometry_msgs::msg::PoseStamped & lookAtPose)\n: lookAtPose_(lookAtPose)\n{\n}\n\nvoid CbRotateLookAt::onEntry()\n{\n  cl_nav2z::CpPose * pose;\n  this->requiresComponent(pose, ComponentRequirement::HARD);\n\n  pose->waitTransformUpdate(rclcpp::Rate(20));\n  auto position = pose->toPoseMsg().position;\n\n  if (lookAtPose_)\n  {\n    auto targetPosition = lookAtPose_->pose.position;\n    double yaw_degrees =\n      atan2(targetPosition.y - position.y, targetPosition.x - position.x) * 180.0 / M_PI;\n    this->absoluteGoalAngleDegree = yaw_degrees;\n  }\n\n  CbAbsoluteRotate::onEntry();\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_save_slam_map.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <angles/angles.h>\n#include <chrono>\n#include <cl_nav2z/client_behaviors/cb_save_slam_map.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n#include <geometry_msgs/msg/twist.hpp>\n#include <memory>\n#include <nav2_msgs/srv/save_map.hpp>\n#include <slam_toolbox/srv/save_map.hpp>\n#include <smacc2/client_behaviors/cb_call_service.hpp>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n#include <std_msgs/msg/string.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace std::chrono_literals;\n\nCbSaveSlamMap::CbSaveSlamMap() : CbServiceCall(\"/map_saver/save_map\", getRequest())\n{\n  // : CbServiceCall(\"/slam_toolbox/save_map\",\n  //                   getRequest()) {\n\n  // map_name.data = \"saved_map\";\n  // auto request = getRequest(map_name);\n  // RCLCPP_INFO_STREAM(getLogger(), \"Save Slam Map builded\");\n}\n\n// void onEntry() override {}\n\nvoid CbSaveSlamMap::onExit() {}\n\nstd::shared_ptr<nav2_msgs::srv::SaveMap::Request> CbSaveSlamMap::getRequest(\n  /*slam_toolbox::srv::SaveMap_Request_<std::allocator<void> >::_name_type saved_map_name*/)\n{\n  nav2_msgs::srv::SaveMap_Request map_save;\n  std_msgs::msg::String map_name;\n\n  // // map_name.data = \"saved_map\";\n  // map_save.map_topic = \"map\";\n  // map_save.map_url = \"${workspacesFolder}/maps/saved_map\";\n  // map_save.image_format = \"png\";\n  // map_save.occupied_thresh = 0.65;\n  // map_save.free_thresh = 0.25;\n  // map_save.map_mode = \"trinary\";\n\n  // // auto request = std::make_shared<slam_toolbox::srv::SaveMap::Request>();\n  // // // request->name = saved_map_name;\n  // // request->name = map_name;\n  // // return request;\n  // auto request = std::make_shared<nav2_msgs::srv::SaveMap::Request>(map_save);\n\n  auto request = std::make_shared<nav2_msgs::srv::SaveMap::Request>();\n  request->map_topic = \"map\";\n  request->map_url = \"/tmp/saved_map\";\n  request->image_format = \"png\";\n  request->occupied_thresh = 0.65;\n  request->free_thresh = 0.25;\n  request->map_mode = \"trinary\";\n\n  return request;\n}\n}  // namespace cl_nav2z\n\n// slam_toolbox::srv::SaveMap_Request_<std::allocator<void> >::_name_type\n\n// std_msgs::msg::String_<std::allocator<void> >\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_seek_waypoint.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/client_behaviors/cb_seek_waypoint.hpp>\n\nnamespace cl_nav2z\n{\nCbSeekWaypoint::CbSeekWaypoint(std::string seekWaypointName)\n: count_(std::nullopt), seekWaypointName_(seekWaypointName)\n{\n}\n\nCbSeekWaypoint::~CbSeekWaypoint() {}\n\nvoid CbSeekWaypoint::onEntry()\n{\n  this->requiresComponent(waypointsNavigator_, ComponentRequirement::HARD);\n\n  if (count_)\n  {\n    waypointsNavigator_->forward(*count_);\n    count_ = std::nullopt;\n  }\n  else if (seekWaypointName_)\n  {\n    waypointsNavigator_->seekName(*seekWaypointName_);\n    seekWaypointName_ = std::nullopt;\n  }\n}\n\nvoid CbSeekWaypoint::onExit() {}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_spiral_motion.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <angles/angles.h>\n#include <cl_nav2z/client_behaviors/cb_spiral_motion.hpp>\n#include <geometry_msgs/msg/twist.hpp>\n#include <optional>\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n\nnamespace cl_nav2z\n{\n\nCbSpiralMotion::CbSpiralMotion(std::optional<CbSpiralMotionOptions> options)\n{\n  if (options)\n  {\n    options_ = *options;\n  }\n  else\n  {\n    // we use default options\n    options_ = CbSpiralMotionOptions();\n  }\n}\n\nvoid CbSpiralMotion::onEntry()\n{\n  /*\n struct CbSpiralMotionOptions\n{\n  std::optional<float> linearVelocity = 0.0f;\n  std::optional<float> maxLinearVelocity = 1.0f;\n  std::optional<float> initialAngularVelocity = 1.0f;\n  std::optional<rclcpp::Duration> spiralMotionDuration = rclcpp::Duration::from_seconds(120);\n  std::optional <float> finalRadius=10.0f;//meters\n};\n   */\n\n  auto linearVelocity = *(options_.linearVelocity);\n  auto maxLinearVelocity = *(options_.maxLinearVelocity);\n  auto initialAngularVelocity = *(options_.initialAngularVelocity);\n  auto spiralMotionDuration = *(options_.spiralMotionDuration);\n  auto finalRadius = *(options_.finalRadius);\n\n  float rate = 20.0f;\n  rclcpp::Rate r(rate);\n  cmdVelPub_ = getNode()->create_publisher<geometry_msgs::msg::Twist>(\"/cmd_vel\", rclcpp::QoS(1));\n\n  rclcpp::Duration linearRamp = rclcpp::Duration::from_seconds(spiralMotionDuration.seconds());\n  float linearAceleration = (maxLinearVelocity - linearVelocity) / linearRamp.seconds();\n  float dt = 1.0f / rate;\n\n  // we know final radious and the constant linear velocity\n  float finalAngularVelocity = maxLinearVelocity / finalRadius;\n\n  float angularAcceleration =\n    (initialAngularVelocity - finalAngularVelocity) / spiralMotionDuration.seconds();\n\n  geometry_msgs::msg::Twist cmd_vel;\n\n  cmd_vel.linear.x = linearVelocity;\n  cmd_vel.angular.z = initialAngularVelocity;\n  auto start_time = getNode()->now();\n\n  RCLCPP_INFO_STREAM(\n    getLogger(), \"[CbSpiralMotion]: initialAngularVelocity: \"\n                   << initialAngularVelocity << \", finalAngularVelocity: \" << finalAngularVelocity\n                   << \", angularAcceleration: \" << angularAcceleration);\n  RCLCPP_INFO_STREAM(\n    getLogger(), \"[CbSpiralMotion]: linearAceleration: \"\n                   << linearAceleration << \", maxLinearVelocity: \" << maxLinearVelocity);\n\n  bool end_condition = false;\n\n  while (!end_condition)\n  {\n    auto current_time = getNode()->now() - start_time;\n\n    cmd_vel.linear.x += linearAceleration * dt;\n    if (cmd_vel.linear.x > maxLinearVelocity)\n    {\n      cmd_vel.linear.x = maxLinearVelocity;\n    }\n\n    // cmd_vel.angular.z -= signVal * angularAcceleration * dt;\n\n    float ellapsedTimeFactor = current_time.seconds() / spiralMotionDuration.seconds();\n    cmd_vel.angular.z = initialAngularVelocity * (1.0f - ellapsedTimeFactor) +\n                        finalAngularVelocity * ellapsedTimeFactor;\n\n    RCLCPP_INFO(\n      getLogger(), \"[CbSpiralMotion] cmd_vel.linear.x = %f, cmd_vel.angular.z = %f\",\n      cmd_vel.linear.x, cmd_vel.angular.z);\n\n    cmdVelPub_->publish(cmd_vel);\n    r.sleep();\n\n    auto now = getNode()->now();\n\n    rclcpp::Duration ellapsed = now - start_time;\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[CbSpiralMotion] ellapsed time: \" << ellapsed.seconds() << \", total duration: \"\n                                                      << spiralMotionDuration.seconds());\n    if (ellapsed > spiralMotionDuration)\n    {\n      RCLCPP_INFO_STREAM(getLogger(), \"[CbSpiralMotion] spiralMotionDuration reached\");\n      end_condition = true;\n    }\n  }\n\n  // asynchronous client behaviors usually post a success event when they are done\n  // that is used in states to transition to the next state\n  this->postSuccessEvent();\n}\n\nvoid CbSpiralMotion::onExit() {}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_stop_navigation.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <cl_nav2z/client_behaviors/cb_abort_navigation.hpp>\n#include <cl_nav2z/common.hpp>\n#include <cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.hpp>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n\n#include <rclcpp/parameter_client.hpp>\n\nnamespace cl_nav2z\n{\nCbStopNavigation::CbStopNavigation() {}\n\nvoid CbStopNavigation::onEntry()\n{\n  // this->sendGoal(goal);\n\n  // this->cancelGoal();\n\n  cl_nav2z::CpPose * poseComponent;\n  this->requiresComponent(poseComponent, ComponentRequirement::HARD);\n\n  this->setGoal(poseComponent->toPoseMsg());\n\n  CbNavigateGlobalPosition::onEntry();\n\n  // this->sendGoal(goal);\n}\n\nvoid CbStopNavigation::onExit() {}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_track_path_odometry.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/client_behaviors/cb_track_path_odometry.hpp>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace smacc2;\nCbTrackPathOdometry::CbTrackPathOdometry() {}\n\nvoid CbTrackPathOdometry::onEntry()\n{\n  RCLCPP_INFO(this->getLogger(), \"Pose tracker freeze reference frame\");\n  cl_nav2z::CpPose * poseComponent;\n  requiresComponent(poseComponent, ComponentRequirement::HARD);\n  poseComponent->freezeReferenceFrame();\n\n  // poseComponent->setReferenceFrame(\"odom\");\n\n  RCLCPP_INFO(this->getLogger(), \"Odom tracker clear path\");\n  cl_nav2z::odom_tracker::CpOdomTracker * odomTracker;\n  this->requiresComponent(odomTracker, ComponentRequirement::HARD);\n  // odomTracker->setOdomFrame(\"odom\");\n\n  odomTracker->clearPath();\n}\n\nvoid CbTrackPathOdometry::onExit() {}\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_track_path_slam.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/client_behaviors/cb_track_path_slam.hpp>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace smacc2;\nCbTrackPathSLAM::CbTrackPathSLAM() {}\n\nvoid CbTrackPathSLAM::onEntry()\n{\n  RCLCPP_INFO(this->getLogger(), \"Pose tracker freeze reference frame\");\n  cl_nav2z::CpPose * poseComponent;\n  requiresComponent(poseComponent, ComponentRequirement::HARD);\n  poseComponent->unfreezeReferenceFrame();\n  // poseComponent->setReferenceFrame(\"odom\");\n\n  RCLCPP_INFO(this->getLogger(), \"Odom tracker clear path\");\n  cl_nav2z::odom_tracker::CpOdomTracker * odomTracker;\n  this->requiresComponent(odomTracker, ComponentRequirement::HARD);\n  // odomTracker->setOdomFrame(\"odom\");\n\n  odomTracker->clearPath();\n}\n\nvoid CbTrackPathSLAM::onExit() {}\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_undo_path_backwards.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/client_behaviors/cb_undo_path_backwards.hpp>\n#include <cl_nav2z/common.hpp>\n#include <cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.hpp>\n#include <cl_nav2z/components/planner_switcher/cp_planner_switcher.hpp>\n\nnamespace cl_nav2z\n{\nusing ::cl_nav2z::odom_tracker::CpOdomTracker;\nusing ::cl_nav2z::odom_tracker::WorkingMode;\n\nusing namespace std::chrono_literals;\nusing namespace smacc2;\n\nCbUndoPathBackwards::CbUndoPathBackwards(std::optional<CbUndoPathBackwardsOptions> options)\n{\n  options_ = options;\n}\n\nvoid CbUndoPathBackwards::onEntry()\n{\n  listener = std::make_shared<tf2_ros::Buffer>(this->getNode()->get_clock());\n  requiresComponent(odomTracker, ComponentRequirement::HARD);\n\n  odomTracker->logStateString(false);\n\n  CpPlannerSwitcher * plannerSwitcher;\n  requiresComponent(plannerSwitcher, ComponentRequirement::HARD);\n\n  nav_msgs::msg::Path forwardpath = odomTracker->getPath();\n  // RCLCPP_INFO_STREAM(getLogger(),\"[UndoPathBackward] Current path backwards: \" << forwardpath);\n\n  odomTracker->setWorkingMode(WorkingMode::CLEAR_PATH);\n\n  nav2_msgs::action::NavigateToPose::Goal goal;\n\n  CpGoalCheckerSwitcher * goalCheckerSwitcher;\n  requiresComponent(goalCheckerSwitcher, ComponentRequirement::HARD);\n\n  // this line is used to flush/reset backward planner in the case it were already there\n  // plannerSwitcher->setDefaultPlanners();\n  if (forwardpath.poses.size() > 0)\n  {\n    goal.pose = forwardpath.poses.front();\n    //goal.pose.header.stamp = getNode()->now();\n    goal.pose.header.stamp = rclcpp::Time(0);\n\n    if (options_ && options_->undoControllerName_)\n    {\n      plannerSwitcher->setUndoPathBackwardPlanner(false);\n      RCLCPP_INFO_STREAM(\n        getLogger(),\n        \"[\" << getName() << \"] Undoing path with controller: \" << *options_->undoControllerName_);\n      plannerSwitcher->setDesiredController(*options_->undoControllerName_);\n      plannerSwitcher->commitPublish();\n    }\n    else\n    {\n      plannerSwitcher->setUndoPathBackwardPlanner();\n    }\n\n    // WARNING: There might be some race condition with the remote undo global planner/controller were the global path was not\n    // received yet, thee goal switcher\n    // TODO: waiting notification from global planner that it is loaded\n\n    RCLCPP_ERROR_STREAM(\n      getLogger(), \"[\" << getName()\n                       << \"] Waiting for 5 seconds to get planer/controller and wait goal checker \"\n                          \"ready\");\n\n    // rclcpp::sleep_for(5s);\n    RCLCPP_ERROR_STREAM(getLogger(), \"[\" << getName() << \"] activating undo navigation planner\");\n\n    if (options_ && options_->goalCheckerId_)\n    {\n      goalCheckerSwitcher->setGoalCheckerId(*options_->goalCheckerId_);\n    }\n    else\n    {\n      goalCheckerSwitcher->setGoalCheckerId(\"undo_path_backwards_goal_checker\");\n    }\n\n    this->sendGoal(goal);\n  }\n}\n\nvoid CbUndoPathBackwards::onExit()\n{\n  RCLCPP_INFO_STREAM(getLogger(), \"[\" << getName() << \"] Exiting: undo navigation \");\n\n  if (this->navigationResult_ == rclcpp_action::ResultCode::SUCCEEDED)\n  {\n    RCLCPP_INFO_STREAM(\n      getLogger(), getName() << \" - [CbUndoPathBackwards] Exiting: undo navigation successful, \"\n                                \"popping odom tracker path\");\n\n    requiresComponent(odomTracker, ComponentRequirement::HARD);\n    odomTracker->popPath();\n\n    odomTracker->logStateString(false);\n  }\n  else\n  {\n    RCLCPP_INFO_STREAM(\n      getLogger(), getName() << \" - [CbUndoPathBackwards] Exiting: undo navigation abort, avoiding \"\n                                \"popping current path\");\n\n    requiresComponent(odomTracker, ComponentRequirement::HARD);\n    odomTracker->logStateString(false);\n    // navigation interrupted or aborted. The path may be not totally undone.\n    // We keep the odom tracker in its current state, probably in the middle of the undoing process.\n    // Could you try to repeat the behavior?\n  }\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_wait_nav2_nodes.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/client_behaviors/cb_wait_nav2_nodes.hpp>\n#include <cl_nav2z/common.hpp>\n\nnamespace cl_nav2z\n{\nCbWaitNav2Nodes::CbWaitNav2Nodes(std::vector<Nav2Nodes> waitNodes)\n: CbWaitNav2Nodes(\"/bond\", waitNodes)\n{\n}\n\nCbWaitNav2Nodes::CbWaitNav2Nodes(std::string topic, std::vector<Nav2Nodes> waitNodes)\n: topicname_(topic), waitNodes_(waitNodes)\n{\n}\n\nvoid CbWaitNav2Nodes::onMessageReceived(const bond::msg::Status & msg)\n{\n  auto value = fromString(msg.id);\n  bool updated = false;\n  // RCLCPP_INFO(getLogger(), \"[CbWaitNav2Nodes] received '%s'\", msg.id.c_str());\n\n  if (receivedAliveMsg_.count(value) && !receivedAliveMsg_[value])\n  {\n    RCLCPP_INFO(getLogger(), \"[CbWaitNav2Nodes] '%s' alive received\", msg.id.c_str());\n    receivedAliveMsg_[value] = true;\n    updated = true;\n  }\n\n  if (updated)\n  {\n    bool success = true;\n    std::stringstream ss;\n    for (auto & pair : receivedAliveMsg_)\n    {\n      if (!pair.second)\n      {\n        success = false;\n      }\n      ss << \"- \" << toString(pair.first) << \": \" << (pair.second ? \"ALIVE\" : \"WAITING\")\n         << std::endl;\n    }\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[CbWaitNav2Nodes] waiting nodes status:\" << std::endl\n                                                             << ss.str().c_str());\n\n    if (success)\n    {\n      RCLCPP_INFO(getLogger(), \"[CbWaitNav2Nodes] success event\");\n      this->postSuccessEvent();\n      sub_ = nullptr;\n    }\n    else\n    {\n      RCLCPP_INFO(getLogger(), \"[CbWaitNav2Nodes] still missing nodes\");\n    }\n  }\n}\n\nvoid CbWaitNav2Nodes::onEntry()\n{\n  std::stringstream ss;\n  for (auto v : waitNodes_)\n  {\n    receivedAliveMsg_[v] = false;\n    ss << \"[CbWaitNav2Nodes] - \" << toString(v) << \": waiting\" << std::endl;\n  }\n  RCLCPP_INFO(getLogger(), ss.str().c_str());\n\n  //rclcpp::SensorDataQoS qos;\n  rclcpp::SubscriptionOptions sub_option;\n\n  sub_ = getNode()->create_subscription<bond::msg::Status>(\n    topicname_, 20, std::bind(&CbWaitNav2Nodes::onMessageReceived, this, std::placeholders::_1),\n    sub_option);\n}\n\nstd::string toString(Nav2Nodes value)\n{\n  switch (value)\n  {\n    case Nav2Nodes::PlannerServer:\n      return \"planner_server\";\n    case Nav2Nodes::ControllerServer:\n      return \"controller_server\";\n    case Nav2Nodes::RecoveriesServer:\n      return \"behavior_server\";\n    case Nav2Nodes::BtNavigator:\n      return \"bt_navigator\";\n    case Nav2Nodes::MapServer:\n      return \"map_server\";\n    default:\n      return \"\";\n  }\n}\n\nNav2Nodes fromString(std::string id)\n{\n  if (id == \"planner_server\")\n    return Nav2Nodes::PlannerServer;\n  else if (id == \"controller_server\")\n    return Nav2Nodes::ControllerServer;\n  else if (id == \"behavior_server\")\n    return Nav2Nodes::RecoveriesServer;\n  else if (id == \"bt_navigator\")\n    return Nav2Nodes::BtNavigator;\n  else if (id == \"map_server\")\n    return Nav2Nodes::MapServer;\n  else\n    return Nav2Nodes::None;\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_wait_pose.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/client_behaviors/cb_wait_pose.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n\n#include <cl_nav2z/common.hpp>\n#include <rclcpp/parameter_client.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace smacc2;\n\nCbWaitPose::CbWaitPose() {}\n\nCbWaitPose::~CbWaitPose() {}\n\nvoid CbWaitPose::onEntry()\n{\n  cl_nav2z::CpPose * pose = nullptr;\n  this->requiresComponent(pose, ComponentRequirement::SOFT);\n  try\n  {\n    pose->waitTransformUpdate(rclcpp::Rate(20));\n    auto posemsg = pose->toPoseMsg();\n    RCLCPP_INFO_STREAM(getLogger(), \"[CbWaitPose] pose arrived: \" << std::endl << posemsg);\n  }\n  catch (std::exception & ex)\n  {\n    RCLCPP_INFO(getLogger(), \"[CbWaitPose] error getting the robot pose\");\n    this->postFailureEvent();\n    return;\n  }\n\n  RCLCPP_INFO(getLogger(), \"[CbWaitPose] pose received\");\n  this->postSuccessEvent();\n}\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/client_behaviors/cb_wait_transform.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <cl_nav2z/client_behaviors/cb_wait_transform.hpp>\n\nnamespace cl_nav2z\n{\nCbWaitTransform::CbWaitTransform(\n  std::string targetFrame, std::string referenceFrame, rclcpp::Duration timeout)\n: targetFrame_(targetFrame), referenceFrame_(referenceFrame), timeout_(timeout)\n{\n}\n\nCbWaitTransform::~CbWaitTransform() {}\n\nvoid CbWaitTransform::onEntry()\n{\n  RCLCPP_INFO(\n    getLogger(), \"[CbWaitTransform] ref %s -> target %s\", referenceFrame_.c_str(),\n    targetFrame_.c_str());\n\n  tfBuffer_ = std::make_shared<tf2_ros::Buffer>(getNode()->get_clock());\n  tfListener_ = std::make_shared<tf2_ros::TransformListener>(*tfBuffer_);\n\n  tf2::Stamped<tf2::Transform> transform;\n  try\n  {\n    auto transformstamped =\n      tfBuffer_->lookupTransform(targetFrame_, referenceFrame_, getNode()->now(), timeout_);\n    tf2::fromMsg(transformstamped, transform);\n\n    result_ = transform;\n\n    RCLCPP_INFO(\n      getLogger(), \"[CbWaitTransform] Success wait transform ref %s -> target %s\",\n      referenceFrame_.c_str(), targetFrame_.c_str());\n    this->postSuccessEvent();\n  }\n  catch (tf2::TransformException & ex)\n  {\n    RCLCPP_ERROR_STREAM(\n      getLogger(), \"[CbWaitTransform] Failure waiting transform ( ref \"\n                     << targetFrame_ << \"/ target \" << referenceFrame_ << \" - \" << ex.what());\n    this->postFailureEvent();\n  }\n}\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/common.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/common.hpp>\n\n#include <tf2/utils.h>\n#include <rclcpp/rclcpp.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Quaternion & msg)\n{\n  out << \" Orientation [\" << msg.x << \" , \" << msg.y << \" , \" << msg.z << \", \" << msg.w\n      << \"] , yaw: \" << tf2::getYaw(msg);\n  return out;\n}\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Point & msg)\n{\n  out << \"[\" << msg.x << \" , \" << msg.y << \" , \" << msg.z << \"]\";\n  return out;\n}\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Pose & msg)\n{\n  out << \" p \" << msg.position;\n  out << \" q [\" << msg.orientation.x << \" , \" << msg.orientation.y << \" , \" << msg.orientation.z\n      << \", \" << msg.orientation.w << \"]\";\n  return out;\n}\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::PoseStamped & msg)\n{\n  out << msg.pose;\n  return out;\n}\n\nstd::ostream & operator<<(std::ostream & out, const nav2_msgs::action::NavigateToPose::Goal & msg)\n{\n  out << msg.pose;\n  return out;\n}\n\nstd::ostream & operator<<(std::ostream & out, const builtin_interfaces::msg::Time & msg)\n{\n  out << \"seconds: \" << rclcpp::Time(msg).seconds();\n  return out;\n}\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/components/amcl/cp_amcl.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <cl_nav2z/components/amcl/cp_amcl.hpp>\n\n#include <string>\n\nnamespace cl_nav2z\n{\nCpAmcl::CpAmcl() {}\n\nCpAmcl::~CpAmcl() {}\n\nstd::string CpAmcl::getName() const { return \"AMCL\"; }\n\nvoid CpAmcl::onInitialize()\n{\n  initalPosePub_ = getNode()->create_publisher<geometry_msgs::msg::PoseWithCovarianceStamped>(\n    \"initialpose\", rclcpp::QoS(10));\n}\n\nvoid CpAmcl::setInitialPose(const geometry_msgs::msg::PoseWithCovarianceStamped & initialpose)\n{\n  initalPosePub_->publish(initialpose);\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/components/costmap_switch/cp_costmap_switch.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_nav2z/components/costmap_switch/cp_costmap_switch.hpp>\n\nnamespace cl_nav2z\n{\nstd::array<std::string, 4> CpCostmapSwitch::layerNames = {\n  \"global_costmap/obstacles_layer\",\n  \"local_costmap/obstacles_layer\"\n  \"global_costmap/inflater_layer\",\n  \"local_costmap/inflater_layer\"};\n\nvoid CpCostmapSwitch::registerProxyFromDynamicReconfigureServer(\n  std::string costmapName, std::string enablePropertyName)\n{\n  RCLCPP_INFO(getLogger(), \"[CpCostmapSwitch] registering costmap type: %s\", costmapName.c_str());\n  auto proxy = std::make_shared<CpCostmapProxy>(\n    this->nav2zClient_->getName() + \"/\" + costmapName, enablePropertyName, getNode());\n  costmapProxies[costmapName] = proxy;\n}\n\nCpCostmapSwitch::CpCostmapSwitch() {}\n\nvoid CpCostmapSwitch::onInitialize()\n{\n  this->nav2zClient_ = dynamic_cast<cl_nav2z::ClNav2Z *>(owner_);\n\n  if (this->nav2zClient_ == nullptr)\n  {\n    RCLCPP_ERROR(getLogger(), \"the owner of the CpCostmapSwitch must be a ClNav2Z\");\n  }\n\n  registerProxyFromDynamicReconfigureServer(\n    getStandardCostmapName(StandardLayers::GLOBAL_OBSTACLES_LAYER));\n  registerProxyFromDynamicReconfigureServer(\n    getStandardCostmapName(StandardLayers::LOCAL_OBSTACLES_LAYER));\n  registerProxyFromDynamicReconfigureServer(\n    getStandardCostmapName(StandardLayers::GLOBAL_INFLATED_LAYER));\n  registerProxyFromDynamicReconfigureServer(\n    getStandardCostmapName(StandardLayers::LOCAL_INFLATED_LAYER));\n}\n\nstd::string CpCostmapSwitch::getStandardCostmapName(StandardLayers layertype)\n{\n  return CpCostmapSwitch::layerNames[(int)layertype];\n}\n\nbool CpCostmapSwitch::exists(std::string layerName)\n{\n  if (!this->costmapProxies.count(layerName))\n  {\n    return false;\n  }\n\n  return true;\n}\n\nvoid CpCostmapSwitch::enable(std::string layerName)\n{\n  RCLCPP_INFO(getLogger(), \"[CpCostmapSwitch] enabling %s\", layerName.c_str());\n\n  if (!exists(layerName))\n  {\n    RCLCPP_ERROR(getLogger(), \"[CpCostmapSwitch] costmap %s does not exist\", layerName.c_str());\n    return;\n  }\n  else\n  {\n    RCLCPP_INFO(\n      getLogger(), \"[CpCostmapSwitch] costmap %s found. Calling dynamic reconfigure server.\",\n      layerName.c_str());\n    costmapProxies[layerName]->setCostmapEnabled(true);\n  }\n}\n\nvoid CpCostmapSwitch::enable(StandardLayers layerType)\n{\n  this->enable(getStandardCostmapName(layerType));\n}\n\nvoid CpCostmapSwitch::disable(std::string layerName)\n{\n  RCLCPP_INFO(getLogger(), \"[CpCostmapSwitch] disabling %s\", layerName.c_str());\n\n  if (!exists(layerName))\n  {\n    RCLCPP_ERROR(getLogger(), \"[CpCostmapSwitch] costmap %s does not exist\", layerName.c_str());\n    return;\n  }\n  else\n  {\n    RCLCPP_INFO(\n      getLogger(), \"[CpCostmapSwitch] costmap %s found. Calling dynamic reconfigure server.\",\n      layerName.c_str());\n    costmapProxies[layerName]->setCostmapEnabled(false);\n  }\n}\n\nvoid CpCostmapSwitch::disable(StandardLayers layerType)\n{\n  this->disable(getStandardCostmapName(layerType));\n}\n\n//-------------------------------------------------------------------------\n\nCpCostmapProxy::CpCostmapProxy(\n  std::string /*costmap_name*/, std::string /*enablePropertyName*/, rclcpp::Node::SharedPtr nh)\n: nh_(nh)\n{\n  // this->costmapName_ = costmap_name + \"/set_parameters\";\n  // dynamic_reconfigure::BoolParameter enableField;\n  // enableField.name = \"enabled\";\n  // enableField.value = true;\n\n  // enableReq.bools.push_back(enableField);\n\n  // enableField.value = false;\n  // disableReq.bools.push_back(enableField);\n  RCLCPP_ERROR(nh->get_logger(), \"costmap switch not implemented %s\", costmapName_.c_str());\n}\n\nvoid CpCostmapProxy::setCostmapEnabled(bool /*value*/)\n{\n  // dynamic_reconfigure::ReconfigureRequest srv_req;\n  // dynamic_reconfigure::ReconfigureResponse srv_resp;\n\n  // if (value)\n  //     srv_req.config = enableReq;\n  // else\n  //     srv_req.config = disableReq;\n\n  // if (ros::service::exists(costmapName_, true))\n  // {\n  //     RCLCPP_INFO(getLogger(),\"sending dynamic reconfigure request: %s\", costmapName_.c_str());\n  //     ros::service::call(costmapName_, srv_req, srv_resp);\n  // }\n  // else\n  // {\n  //     RCLCPP_WARN(getLogger(),\"could not call dynamic reconfigure server. It does not exist: %s\", costmapName_.c_str());\n  // }\n\n  RCLCPP_ERROR(nh_->get_logger(), \"costmap switch not implemented %s\", costmapName_.c_str());\n}\n\n// void CpCostmapProxy::dynreconfCallback(const dynamic_reconfigure::Config::ConstPtr &configuration_update)\n// {\n//     // auto gp = std::find_if(configuration_update->strs.begin(), configuration_update->strs.begin(),\n//     //                        [&](const dynamic_reconfigure::StrParameter &p) { return p.name == \"base_global_planner\" && p.value == desired_global_planner_; });\n// }\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.hpp>\n\nnamespace cl_nav2z\n{\nCpGoalCheckerSwitcher::CpGoalCheckerSwitcher(\n  std::string goal_checker_selector_topic, std::string default_goal_checker_name)\n: goal_checker_selector_topic_(goal_checker_selector_topic),\n  default_goal_checker_name_(default_goal_checker_name)\n{\n}\n\nCpGoalCheckerSwitcher::~CpGoalCheckerSwitcher() {}\n\nvoid CpGoalCheckerSwitcher::onInitialize()\n{\n  rclcpp::QoS qos(rclcpp::KeepLast(1));\n  qos.transient_local().reliable();\n\n  this->goal_checker_selector_pub_ =\n    getNode()->create_publisher<std_msgs::msg::String>(goal_checker_selector_topic_, qos);\n}\n\nvoid CpGoalCheckerSwitcher::setDefaultGoalChecker()\n{\n  setGoalCheckerId(default_goal_checker_name_);  // default id in navigation2 stack\n}\n\nvoid CpGoalCheckerSwitcher::setGoalCheckerId(std::string goalcheckerid)\n{\n  RCLCPP_INFO_STREAM(\n    getLogger(), \"[CpGoalCheckerSwitcher] Setting goal checker: \" << goalcheckerid);\n\n  // controller_server_node_->wait_for_service();\n  // std::vector<rclcpp::Parameter> params{ rclcpp::Parameter(\"current_goal_checker\", goalcheckerid) };\n  // auto futureResults = controller_server_node_->set_parameters(params);\n\n  std_msgs::msg::String msg;\n  msg.data = goalcheckerid;\n  this->goal_checker_selector_pub_->publish(msg);\n\n  // int i = 0;\n  // for (auto& res : futureResults.get())\n  // {\n  //   RCLCPP_INFO_STREAM(getLogger(), \"[CpGoalCheckerSwitcher] parameter result: \"\n  //                                                   << params[i].get_name() << \"=\" << params[i].as_string()\n  //                                                   << \". Result: \" << res.successful);\n  //   i++;\n\n  //   if (!res.successful)\n  //     RCLCPP_ERROR_STREAM(this->getLogger(), \"[CpGoalCheckerSwitcher] goal checker could not properly\n  //     switch \"\n  //                                                        \"the goal checker of the controller_server\");\n  // }\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/components/odom_tracker/cp_odom_tracker.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <cl_nav2z/common.hpp>\n\n#include <angles/angles.h>\n#include <tf2/utils.h>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <smacc2/component.hpp>\n#include <smacc2/impl/smacc_component_impl.hpp>\n\n#include <boost/range/adaptor/reversed.hpp>\n\nnamespace cl_nav2z\n{\nnamespace odom_tracker\n{\nusing namespace smacc2;\n\nCpOdomTracker::CpOdomTracker(\n  std::string odomTopicName, std::string odomFrame, OdomTrackerStrategy strategy)\n: strategy_(strategy)\n{\n  workingMode_ = WorkingMode::RECORD_PATH;\n  publishMessages = true;\n  odomFrame_ = odomFrame;\n  odomTopicName_ = odomTopicName;\n}\n\ntemplate <typename T>\nvoid parameterDeclareAndtryGetOrSet(\n  rclcpp::Node::SharedPtr & node, std::string param_name, T & value)\n{\n  if (!node->get_parameter(param_name, value))\n  {\n    RCLCPP_INFO_STREAM(\n      node->get_logger(), \"[CpOdomTracker] autoset \" << param_name << \": \" << value);\n    node->declare_parameter(param_name, value);\n  }\n  else\n  {\n    RCLCPP_INFO_STREAM(node->get_logger(), \"[CpOdomTracker] \" << param_name << \": \" << value);\n  }\n}\n\nvoid CpOdomTracker::onInitialize()\n{\n  // default values\n  recordPointDistanceThreshold_ = 0.005;  // 5 mm\n  recordAngularDistanceThreshold_ = 0.1;  // radians\n  clearPointDistanceThreshold_ = 0.05;    // 5 cm\n  clearAngularDistanceThreshold_ = 0.1;   // radi\n\n  auto nh = getNode();\n  RCLCPP_WARN(getLogger(), \"[CpOdomTracker] Initializing Odometry Tracker\");\n\n  parameterDeclareAndtryGetOrSet(nh, \"odom_frame\", this->odomFrame_);\n  parameterDeclareAndtryGetOrSet(\n    nh, \"record_point_distance_threshold\", recordPointDistanceThreshold_);\n  parameterDeclareAndtryGetOrSet(\n    nh, \"record_angular_distance_threshold\", recordAngularDistanceThreshold_);\n  parameterDeclareAndtryGetOrSet(\n    nh, \"clear_point_distance_threshold\", clearPointDistanceThreshold_);\n  parameterDeclareAndtryGetOrSet(\n    nh, \"clear_angular_distance_threshold\", clearAngularDistanceThreshold_);\n\n  param_callback_handle_ = getNode()->add_on_set_parameters_callback(\n    std::bind(&CpOdomTracker::parametersCallback, this, std::placeholders::_1));\n\n  robotBasePathPub_ =\n    nh->create_publisher<nav_msgs::msg::Path>(\"odom_tracker_path\", rclcpp::QoS(1));\n\n  robotBasePathStackedPub_ =\n    nh->create_publisher<nav_msgs::msg::Path>(\"odom_tracker_stacked_path\", rclcpp::QoS(1));\n\n  if (this->strategy_ == OdomTrackerStrategy::ODOMETRY_SUBSCRIBER)\n  {\n    RCLCPP_INFO_STREAM(\n      nh->get_logger(), \"[CpOdomTracker] subscribing to odom topic: \" << odomTopicName_);\n\n    rclcpp::SensorDataQoS qos;\n    odomSub_ = nh->create_subscription<nav_msgs::msg::Odometry>(\n      odomTopicName_, qos,\n      std::bind(&CpOdomTracker::odomMessageCallback, this, std::placeholders::_1));\n  }\n  else if (this->strategy_ == OdomTrackerStrategy::POSE_COMPONENT)\n  {\n    this->requiresComponent(robotPose_, ComponentRequirement::HARD);\n    robotPoseTimer_ = nh->create_wall_timer(\n      std::chrono::milliseconds(100), std::bind(&CpOdomTracker::update, this));\n  }\n  else\n  {\n    RCLCPP_ERROR_STREAM(\n      nh->get_logger(), \"[CpOdomTracker] unknown strategy: \" << (int)this->strategy_);\n  }\n}\n\n/**\n ******************************************************************************************************************\n * parametersCallback()\n ******************************************************************************************************************\n */\nrcl_interfaces::msg::SetParametersResult CpOdomTracker::parametersCallback(\n  const std::vector<rclcpp::Parameter> & parameters)\n{\n  std::lock_guard<std::mutex> lock(m_mutex_);\n  RCLCPP_INFO(getLogger(), \"odom_tracker m_mutex acquire\");\n\n  for (const auto & param : parameters)\n  {\n    if (param.get_name() == \"record_point_distance_threshold\")\n    {\n      recordPointDistanceThreshold_ = param.as_double();\n    }\n    else if (param.get_name() == \"record_angular_distance_threshold\")\n    {\n      recordAngularDistanceThreshold_ = param.as_double();\n    }\n    else if (param.get_name() == \"clear_point_distance_threshold\")\n    {\n      clearPointDistanceThreshold_ = param.as_double();\n    }\n    else if (param.get_name() == \"clear_angular_distance_threshold\")\n    {\n      clearAngularDistanceThreshold_ = param.as_double();\n    }\n    else if (param.get_name() == \"odom_frame\")\n    {\n      odomFrame_ = param.as_string();\n    }\n  }\n\n  rcl_interfaces::msg::SetParametersResult result;\n  result.successful = true;\n  result.reason = \"success\";\n  return result;\n}\n\n/**\n ******************************************************************************************************************\n * setWorkingMode()\n ******************************************************************************************************************\n */\nvoid CpOdomTracker::setWorkingMode(WorkingMode workingMode)\n{\n  std::lock_guard<std::mutex> lock(m_mutex_);\n\n  switch (workingMode)\n  {\n    case WorkingMode::RECORD_PATH:\n      RCLCPP_INFO_STREAM(\n        getLogger(),\n        \"[CpOdomTracker] setting working mode to RECORD - record_point_distance_threshold: \"\n          << recordPointDistanceThreshold_\n          << \", record_angular_distance_threshold: \" << recordAngularDistanceThreshold_);\n      break;\n    case WorkingMode::CLEAR_PATH:\n      RCLCPP_INFO_STREAM(\n        getLogger(),\n        \"[CpOdomTracker] setting working mode to CLEAR - clear_point_distance_threshold: \"\n          << clearPointDistanceThreshold_\n          << \", clear_angular_distance_threshold: \" << clearAngularDistanceThreshold_);\n      break;\n    case WorkingMode::IDLE:\n      RCLCPP_INFO_STREAM(getLogger(), \"[CpOdomTracker] setting working mode to IDLE\");\n      break;\n    default:\n\n      RCLCPP_INFO_STREAM(getLogger(), \"[CpOdomTracker] setting working mode to <UNKNOWN>\");\n  }\n\n  if (this->odomSub_ != nullptr && this->odomSub_->get_publisher_count() == 0)\n  {\n    RCLCPP_ERROR_STREAM(\n      getLogger(),\n      \"[CpOdomTracker] Odom tracker cannot record the path because there is no publisher to the \"\n      \"odometry topic\");\n  }\n\n  workingMode_ = workingMode;\n  // RCLCPP_INFO(getLogger(),\"odom_tracker m_mutex release\");\n}\n\n/**\n ******************************************************************************************************************\n * setPublishMessages()\n ******************************************************************************************************************\n */\nvoid CpOdomTracker::setPublishMessages(bool value)\n{\n  // RCLCPP_INFO(getLogger(),\"odom_tracker m_mutex acquire\");\n  std::lock_guard<std::mutex> lock(m_mutex_);\n  publishMessages = value;\n  // RCLCPP_INFO(getLogger(),\"odom_tracker m_mutex release\");\n  this->updateAggregatedStackPath();\n}\n\nvoid CpOdomTracker::pushPath() { this->pushPath(std::string()); }\n\nvoid CpOdomTracker::pushPath(std::string pathname)\n{\n  RCLCPP_INFO(getLogger(), \"odom_tracker m_mutex acquire, to push path\");\n  std::lock_guard<std::mutex> lock(m_mutex_);\n\n  this->logStateString(false);\n  if (this->odomSub_ != nullptr && this->odomSub_->get_publisher_count() == 0)\n  {\n    RCLCPP_ERROR_STREAM(\n      getLogger(),\n      \"[CpOdomTracker] Odom tracker cannot record the path because there is no publisher to the \"\n      \"odometry topic\");\n  }\n\n  pathInfos_.push_back({currentPathName_, this->currentMotionGoal_});\n  pathStack_.push_back(baseTrajectory_);\n\n  geometry_msgs::msg::PoseStamped goalPose;\n  if (this->currentMotionGoal_) goalPose = *this->currentMotionGoal_;\n\n  RCLCPP_INFO_STREAM(\n    getLogger(), \"[CpOdomTracker] currentPathName: \" << pathname\n                                                     << \"  size: \" << baseTrajectory_.poses.size()\n                                                     << \"  current motion goal: \" << goalPose);\n\n  currentPathName_ = pathname;\n\n  // clean the current trajectory to start a new one\n  baseTrajectory_.poses.clear();\n\n  this->logStateString(false);\n  this->updateAggregatedStackPath();\n\n  this->currentMotionGoal_.reset();\n}\n\nvoid CpOdomTracker::popPath(int popCount, bool keepPreviousPath)\n{\n  RCLCPP_INFO(getLogger(), \"odom_tracker m_mutex acquire to pop path\");\n  std::lock_guard<std::mutex> lock(m_mutex_);\n\n  RCLCPP_INFO(getLogger(), \"POP PATH ENTRY\");\n  this->logStateString();\n\n  if (this->odomSub_ != nullptr && this->odomSub_->get_publisher_count() == 0)\n  {\n    RCLCPP_ERROR_STREAM(\n      getLogger(),\n      \"[CpOdomTracker] Odom tracker cannot record the path because there is no publisher to the \"\n      \"odometry topic\");\n  }\n\n  if (!keepPreviousPath)\n  {\n    baseTrajectory_.poses.clear();\n  }\n\n  while (popCount > 0 && !pathStack_.empty())\n  {\n    auto & stackedPath = pathStack_.back().poses;\n    auto & stackedPathInfo = pathInfos_.back();\n\n    baseTrajectory_.poses.insert(\n      baseTrajectory_.poses.begin(), stackedPath.begin(), stackedPath.end());\n    this->currentMotionGoal_ = stackedPathInfo.goalPose;\n    pathStack_.pop_back();\n    pathInfos_.pop_back();\n    popCount--;\n\n    RCLCPP_INFO(getLogger(), \"POP PATH Iteration \");\n    this->logStateString();\n  }\n\n  RCLCPP_INFO(getLogger(), \"POP PATH EXITING\");\n  this->logStateString();\n  RCLCPP_INFO(getLogger(), \"odom_tracker m_mutex release\");\n  this->updateAggregatedStackPath();\n\n  this->currentMotionGoal_.reset();\n}\n\nvoid CpOdomTracker::logStateString(bool debug)\n{\n  std::stringstream ss;\n  ss << \"--- odom tracker state ---\" << std::endl;\n  ss\n    << \" - path stack -\" << currentPathName_ << \" -  size:\"\n    << pathStack_.size()\n    //<< \" goal: \" << (getCurrentMotionGoal()? getCurrentMotionGoal()->pose: geometry_msgs::msg::Pose())\n    << std::endl;\n  ss << \" - [STACK-HEAD active path size: \" << baseTrajectory_.poses.size() << \"]\" << std::endl;\n  int i = 0;\n  for (auto & p : pathStack_ | boost::adaptors::reversed)\n  {\n    auto & pathinfo = pathInfos_[pathInfos_.size() - i - 1];\n    std::string goalstr = \"[]\";\n    if (pathinfo.goalPose)\n    {\n      std::stringstream ss;\n      ss << *(pathinfo.goalPose);\n      goalstr = ss.str();\n    }\n\n    ss << \" - p \" << i << \"[\" << p.header.stamp << \"], size: \" << p.poses.size() << \" - \"\n       << pathinfo.name << \" - goal: \" << goalstr << std::endl;\n    i++;\n  }\n  ss << \"---\";\n\n  if (this->odomSub_ != nullptr && this->odomSub_->get_publisher_count() == 0)\n  {\n    ss << std::endl\n       << \"[CpOdomTracker] Odom tracker cannot record the path because there is no publisher to \"\n          \"the odometry topic\"\n       << std::endl;\n  }\n\n  if (debug)\n    RCLCPP_DEBUG(getLogger(), ss.str().c_str());\n  else\n    RCLCPP_INFO(getLogger(), ss.str().c_str());\n}\n\nvoid CpOdomTracker::clearPath()\n{\n  RCLCPP_INFO(getLogger(), \"odom_tracker m_mutex acquire to clear path\");\n  std::lock_guard<std::mutex> lock(m_mutex_);\n  baseTrajectory_.poses.clear();\n\n  rtPublishPaths(getNode()->now());\n  this->logStateString();\n  this->updateAggregatedStackPath();\n\n  this->currentMotionGoal_.reset();\n}\n\nvoid CpOdomTracker::setCurrentPathName(const std::string & currentPathName)\n{\n  RCLCPP_INFO_STREAM(getLogger(), \"[CpOdomTracker] set current path name: \" << currentPathName);\n  currentPathName_ = currentPathName;\n}\n\nvoid CpOdomTracker::setStartPoint(const geometry_msgs::msg::PoseStamped & pose)\n{\n  std::lock_guard<std::mutex> lock(m_mutex_);\n  RCLCPP_INFO_STREAM(getLogger(), \"[CpOdomTracker] set current path starting point: \" << pose);\n  if (baseTrajectory_.poses.size() > 0)\n  {\n    baseTrajectory_.poses[0] = pose;\n  }\n  else\n  {\n    baseTrajectory_.poses.push_back(pose);\n  }\n  this->updateAggregatedStackPath();\n}\n\nvoid CpOdomTracker::setStartPoint(const geometry_msgs::msg::Pose & pose)\n{\n  std::lock_guard<std::mutex> lock(m_mutex_);\n  RCLCPP_INFO_STREAM(getLogger(), \"[CpOdomTracker] set current path starting point: \" << pose);\n  geometry_msgs::msg::PoseStamped posestamped;\n  posestamped.header.frame_id = this->odomFrame_;\n  posestamped.header.stamp = getNode()->now();\n  posestamped.pose = pose;\n\n  if (baseTrajectory_.poses.size() > 0)\n  {\n    baseTrajectory_.poses[0] = posestamped;\n  }\n  else\n  {\n    baseTrajectory_.poses.push_back(posestamped);\n  }\n  this->updateAggregatedStackPath();\n}\n\nvoid CpOdomTracker::setCurrentMotionGoal(const geometry_msgs::msg::PoseStamped & pose)\n{\n  std::lock_guard<std::mutex> lock(m_mutex_);\n  this->currentMotionGoal_ = pose;\n}\n\nstd::optional<geometry_msgs::msg::PoseStamped> CpOdomTracker::getCurrentMotionGoal()\n{\n  std::lock_guard<std::mutex> lock(m_mutex_);\n  return this->currentMotionGoal_;\n}\n\nnav_msgs::msg::Path CpOdomTracker::getPath()\n{\n  std::lock_guard<std::mutex> lock(m_mutex_);\n  return this->baseTrajectory_;\n}\n\n/**\n ******************************************************************************************************************\n * rtPublishPaths()\n ******************************************************************************************************************\n */\nvoid CpOdomTracker::rtPublishPaths(rclcpp::Time timestamp)\n{\n  baseTrajectory_.header.stamp = timestamp;\n  robotBasePathPub_->publish(baseTrajectory_);\n\n  aggregatedStackPathMsg_.header.stamp = timestamp;\n  robotBasePathStackedPub_->publish(aggregatedStackPathMsg_);\n}\n\nvoid CpOdomTracker::updateAggregatedStackPath()\n{\n  aggregatedStackPathMsg_.poses.clear();\n  for (auto & p : pathStack_)\n  {\n    aggregatedStackPathMsg_.poses.insert(\n      aggregatedStackPathMsg_.poses.end(), p.poses.begin(), p.poses.end());\n  }\n\n  aggregatedStackPathMsg_.header.frame_id = this->odomFrame_;\n}\n\n/**\n ******************************************************************************************************************\n * updateBackward()\n ******************************************************************************************************************\n */\nbool CpOdomTracker::updateClearPath(const geometry_msgs::msg::PoseStamped & base_pose)\n{\n  // we initially accept any message if the queue is empty\n  /// Track robot base pose\n  baseTrajectory_.header = base_pose.header;\n\n  bool acceptBackward = false;\n  bool clearingError = false;\n  bool finished = false;\n\n  while (!finished)\n  {\n    if (\n      baseTrajectory_.poses.size() <=\n      1)  // we at least keep always the first point of the forward path when clearing\n          // (this is important for backwards planner replanning and not losing the\n          // last goal)\n    {\n      acceptBackward = false;\n      finished = true;\n    }\n    else\n    {\n      auto & carrotPose = baseTrajectory_.poses.back().pose;\n      auto & carrotPoint = carrotPose.position;\n\n      double carrotAngle = tf2::getYaw(carrotPose.orientation);\n\n      auto & currePose = base_pose.pose;\n      auto & currePoint = currePose.position;\n      double currentAngle = tf2::getYaw(currePose.orientation);\n\n      double lastpointdist = p2pDistance(carrotPoint, currePoint);\n      double goalAngleOffset = fabs(angles::shortest_angular_distance(carrotAngle, currentAngle));\n\n      acceptBackward = !baseTrajectory_.poses.empty() &&\n                       lastpointdist < clearPointDistanceThreshold_ &&\n                       goalAngleOffset < clearAngularDistanceThreshold_;\n\n      clearingError = lastpointdist > 2 * clearPointDistanceThreshold_;\n      RCLCPP_DEBUG_STREAM(\n        getLogger(), \"[CpOdomTracker] clearing (accepted: \" << acceptBackward\n                                                            << \") linerr: \" << lastpointdist\n                                                            << \", anglerr: \" << goalAngleOffset);\n    }\n\n    // RCLCPP_INFO(getLogger(),\"Backwards, last distance: %lf < %lf accept: %d\", dist,\n    // minPointDistanceBackwardThresh_, acceptBackward);\n    if (\n      acceptBackward &&\n      baseTrajectory_.poses.size() > 1) /* we always leave at least one item, specially interesting\n                                                                                   for the backward local planner reach\n                                                               the backwards goal with enough precision*/\n    {\n      baseTrajectory_.poses.pop_back();\n    }\n    else if (clearingError)\n    {\n      finished = true;\n      RCLCPP_WARN(getLogger(), \"[CpOdomTracker] Incorrect odom clearing motion.\");\n    }\n    else\n    {\n      finished = true;\n      /// Not removing point because it is enough far from the last cord point\n    }\n  }\n\n  return acceptBackward;\n}\n\n/**\n ******************************************************************************************************************\n * updateRecordPath()\n ******************************************************************************************************************\n */\nbool CpOdomTracker::updateRecordPath(const geometry_msgs::msg::PoseStamped & base_pose)\n{\n  /// Track robot base pose\n  baseTrajectory_.header = base_pose.header;\n\n  bool enqueueOdomMessage = false;\n\n  double dist = -1;\n  if (baseTrajectory_.poses.empty())\n  {\n    enqueueOdomMessage = true;\n  }\n  else\n  {\n    const auto & prevPose = baseTrajectory_.poses.back().pose;\n    const geometry_msgs::msg::Point & prevPoint = prevPose.position;\n    double prevAngle = tf2::getYaw(prevPose.orientation);\n\n    const geometry_msgs::msg::Point & currePoint = base_pose.pose.position;\n    double currentAngle = tf2::getYaw(base_pose.pose.orientation);\n\n    dist = p2pDistance(prevPoint, currePoint);\n    double goalAngleOffset = fabs(angles::shortest_angular_distance(prevAngle, currentAngle));\n\n    // RCLCPP_WARN(getLogger(),\"dist %lf vs min %lf\", dist, recordPointDistanceThreshold_);\n\n    RCLCPP_WARN_THROTTLE(getLogger(), *getNode()->get_clock(), 2000, \"odom received\");\n\n    if (dist > recordPointDistanceThreshold_ || goalAngleOffset > recordAngularDistanceThreshold_)\n    {\n      enqueueOdomMessage = true;\n    }\n    else\n    {\n      // RCLCPP_WARN(getLogger(),\"skip odom, dist: %lf\", dist);\n      enqueueOdomMessage = false;\n    }\n  }\n\n  if (enqueueOdomMessage)\n  {\n    RCLCPP_WARN_THROTTLE(\n      getLogger(), *getNode()->get_clock(), 2000, \"enqueue odom tracker pose. dist %lf vs min %lf\",\n      dist, recordPointDistanceThreshold_);\n    baseTrajectory_.poses.push_back(base_pose);\n  }\n\n  return enqueueOdomMessage;\n}\n\n/**\n ******************************************************************************************************************\n * reconfigCB()\n ******************************************************************************************************************\n */\nvoid CpOdomTracker::updateConfiguration()\n{\n  return;\n\n  if (!getNode()->get_parameter(\"odom_frame\", this->odomFrame_))\n  {\n  }\n\n  if (!getNode()->get_parameter(\"record_point_distance_threshold\", recordPointDistanceThreshold_))\n  {\n  }\n\n  if (!getNode()->get_parameter(\n        \"record_angular_distance_threshold\", recordAngularDistanceThreshold_))\n  {\n  }\n\n  if (!getNode()->get_parameter(\"clear_point_distance_threshold\", clearPointDistanceThreshold_))\n  {\n  }\n\n  if (!getNode()->get_parameter(\"clear_angular_distance_threshold\", clearAngularDistanceThreshold_))\n  {\n  }\n}\n\n/**\n ******************************************************************************************************************\n * update()\n ******************************************************************************************************************\n */\nvoid CpOdomTracker::update()\n{\n  RCLCPP_INFO(getLogger(), \"odom_tracker update\");\n  auto pose = robotPose_->toPoseStampedMsg();\n  RCLCPP_INFO(getLogger(), \"odom tracker updatd pose, frame: %s\", pose.header.frame_id.c_str());\n  processNewPose(pose);\n  RCLCPP_INFO(getLogger(), \"odom_tracker update end\");\n}\n\n/**\n ******************************************************************************************************************\n * odomMessageCallback()\n ******************************************************************************************************************\n */\nvoid CpOdomTracker::odomMessageCallback(const nav_msgs::msg::Odometry::SharedPtr odom)\n{\n  geometry_msgs::msg::PoseStamped base_pose;\n  base_pose.pose = odom->pose.pose;\n  base_pose.header = odom->header;\n\n  processNewPose(base_pose);\n}\n\n/**\n ******************************************************************************************************************\n * processNewPose()\n ******************************************************************************************************************\n */\nvoid CpOdomTracker::processNewPose(const geometry_msgs::msg::PoseStamped & odom)\n{\n  RCLCPP_INFO_THROTTLE(\n    getLogger(), *getNode()->get_clock(), 5000,\n    \"[odom_tracker] processing odom msg update heartbeat\");\n  std::lock_guard<std::mutex> lock(m_mutex_);\n\n  updateConfiguration();\n\n  if (workingMode_ == WorkingMode::RECORD_PATH)\n  {\n    updateRecordPath(odom);\n  }\n  else if (workingMode_ == WorkingMode::CLEAR_PATH)\n  {\n    updateClearPath(odom);\n  }\n\n  // RCLCPP_WARN(getLogger(),\"odomTracker odometry callback\");\n  if (publishMessages)\n  {\n    rtPublishPaths(odom.header.stamp);\n  }\n\n  // RCLCPP_INFO(getLogger(),\"odom_tracker m_mutex release\");\n}\n}  // namespace odom_tracker\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/components/odom_tracker/cp_odom_tracker_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n//#include <actionlib/server/simple_action_server.h>\n#include <odom_tracker/CpOdomTrackerAction.h>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <memory>\n\ntypedef actionlib::SimpleActionServer<odom_tracker::CpOdomTrackerAction> Server;\n\nusing namespace odom_tracker;\nusing namespace cl_nav2z::odom_tracker;\n\nclass CpOdomTrackerActionServer\n{\npublic:\n  std::shared_ptr<Server> as_;\n  CpOdomTracker odomTracker;\n\n  CpOdomTrackerActionServer() : odomTracker(\"move_base\") {}\n\n  /**\n******************************************************************************************************************\n* execute()\n******************************************************************************************************************\n*/\n  void execute(\n    const CpOdomTrackerGoalConstPtr & goal)  // Note: \"Action\" is not appended to DoDishes here\n  {\n    try\n    {\n      switch (goal->command)\n      {\n        case CpOdomTrackerGoal::RECORD_PATH:\n          odomTracker.setWorkingMode(WorkingMode::RECORD_PATH);\n          break;\n\n        case CpOdomTrackerGoal::CLEAR_PATH:\n          odomTracker.setWorkingMode(WorkingMode::CLEAR_PATH);\n          break;\n\n        case CpOdomTrackerGoal::IDLE:\n          odomTracker.setWorkingMode(WorkingMode::IDLE);\n          break;\n\n        case CpOdomTrackerGoal::START_BROADCAST_PATH:\n          odomTracker.setPublishMessages(true);\n          break;\n\n        case CpOdomTrackerGoal::STOP_BROADCAST_PATH:\n          odomTracker.setPublishMessages(false);\n          break;\n\n        case CpOdomTrackerGoal::PUSH_PATH:\n          odomTracker.pushPath();\n          break;\n\n        case CpOdomTrackerGoal::POP_PATH:\n          odomTracker.popPath();\n          break;\n\n        default:\n\n          RCLCPP_ERROR(\n            getLogger(), \"Odom Tracker Node - Action Server execute error: incorrect command - %d\",\n            goal->command);\n          as_->setAborted();\n      }\n\n      // never reach succeeded because were are interested in keeping the feedback alive\n      as_->setSucceeded();\n    }\n    catch (std::exception & ex)\n    {\n      RCLCPP_ERROR(getLogger(), \"Odom Tracker Node - Action Server execute error: %s\", ex.what());\n      as_->setAborted();\n    }\n  }\n\n  /**\n******************************************************************************************************************\n* run()\n******************************************************************************************************************\n*/\n  void run()\n  {\n    rclcpp::Node::SharedPtr n;\n    RCLCPP_INFO(getLogger(), \"Creating odom tracker action server\");\n\n    as_ = std::make_shared<Server>(\n      n, \"odom_tracker\",\n      std::bind(&CpOdomTrackerActionServer::execute, this, std::placeholders::_1), false);\n    RCLCPP_INFO(getLogger(), \"Starting CpOdomTracker Action Server\");\n\n    as_->start();\n\n    ros::spin();\n  }\n};\n\nint main(int argc, char ** argv)\n{\n  ros::init(argc, argv, \"odom_tracker_node\");\n  CpOdomTrackerActionServer as;\n\n  as.run();\n}\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/components/planner_switcher/cp_planner_switcher.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <cl_nav2z/components/planner_switcher/cp_planner_switcher.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace std::chrono_literals;\n\nCpPlannerSwitcher::CpPlannerSwitcher() {}\n\nvoid CpPlannerSwitcher::onInitialize()\n{\n  rclcpp::QoS qos(rclcpp::KeepLast(1));\n  qos.transient_local().reliable();\n\n  this->planner_selector_pub_ =\n    getNode()->create_publisher<std_msgs::msg::String>(\"planner_selector\", qos);\n  this->controller_selector_pub_ =\n    getNode()->create_publisher<std_msgs::msg::String>(\"controller_selector\", qos);\n}\n\nvoid CpPlannerSwitcher::setDesiredGlobalPlanner(std::string plannerName)\n{\n  desired_planner_ = plannerName;\n}\n\nvoid CpPlannerSwitcher::setDesiredController(std::string controllerName)\n{\n  desired_controller_ = controllerName;\n}\n\nvoid CpPlannerSwitcher::setUndoPathBackwardPlanner(bool commit)\n{\n  RCLCPP_INFO(getLogger(), \"[CpPlannerSwitcher] Planner Switcher: Trying to set BackwardPlanner\");\n\n  desired_planner_ = \"UndoPathGlobalPlanner\";\n  desired_controller_ = \"BackwardLocalPlanner\";\n\n  if (commit) commitPublish();\n}\n\nvoid CpPlannerSwitcher::setBackwardPlanner(bool commit)\n{\n  RCLCPP_INFO(getLogger(), \"[CpPlannerSwitcher] Planner Switcher: Trying to set BackwardPlanner\");\n\n  desired_planner_ = \"BackwardGlobalPlanner\";\n  desired_controller_ = \"BackwardLocalPlanner\";\n\n  if (commit) commitPublish();\n}\n\nvoid CpPlannerSwitcher::setForwardPlanner(bool commit)\n{\n  RCLCPP_INFO(getLogger(), \"[CpPlannerSwitcher] Planner Switcher: Trying to set ForwardPlanner\");\n\n  desired_planner_ = \"ForwardGlobalPlanner\";\n  desired_controller_ = \"ForwardLocalPlanner\";\n\n  if (commit) commitPublish();\n}\n\nvoid CpPlannerSwitcher::setPureSpinningPlanner(bool commit)\n{\n  RCLCPP_INFO(\n    getLogger(), \"[CpPlannerSwitcher] Planner Switcher: Trying to set PureSpinningPlanner\");\n\n  desired_planner_ = \"ForwardGlobalPlanner\";\n  desired_controller_ = \"PureSpinningLocalPlanner\";\n\n  if (commit) commitPublish();\n}\n\nvoid CpPlannerSwitcher::setDefaultPlanners(bool commit)\n{\n  desired_planner_ = \"GridBased\";\n  desired_controller_ = \"FollowPath\";\n\n  if (commit) commitPublish();\n}\n\nvoid CpPlannerSwitcher::commitPublish()\n{\n  std_msgs::msg::String planner_msg;\n  planner_msg.data = desired_planner_;\n  this->planner_selector_pub_->publish(planner_msg);\n\n  std_msgs::msg::String controller_msg;\n  controller_msg.data = desired_controller_;\n  this->controller_selector_pub_->publish(controller_msg);\n}\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/components/pose/cp_pose.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n\n#include <memory>\n#include <string>\n\nnamespace cl_nav2z\n{\nusing namespace std::chrono_literals;\n\n// static\nstd::shared_ptr<tf2_ros::TransformListener> CpPose::tfListener_;\nstd::shared_ptr<tf2_ros::Buffer> CpPose::tfBuffer_;\nstd::mutex CpPose::listenerMutex_;\n\nCpPose::CpPose(std::string targetFrame, std::string referenceFrame)\n: isInitialized(false), poseFrameName_(targetFrame), referenceFrame_(referenceFrame)\n\n{\n  this->pose_.header.frame_id = referenceFrame_;\n}\n\nstd::string referenceFrameToString(StandardReferenceFrames referenceFrame)\n{\n  switch (referenceFrame)\n  {\n    case StandardReferenceFrames::Map:\n      return \"map\";\n    case StandardReferenceFrames::Odometry:\n      return \"odom\";\n    default:\n      return \"odom\";\n  }\n}\n\nCpPose::CpPose(StandardReferenceFrames referenceFrame)\n: CpPose(\"base_link\", referenceFrameToString(referenceFrame))\n{\n}\n\nvoid CpPose::onInitialize()\n{\n  RCLCPP_INFO(\n    getLogger(), \"[Pose] Creating Pose tracker component to track %s in the reference frame %s\",\n    poseFrameName_.c_str(), referenceFrame_.c_str());\n\n  {\n    // singleton\n    std::lock_guard<std::mutex> guard(listenerMutex_);\n    if (tfListener_ == nullptr)\n    {\n      tfBuffer_ = std::make_shared<tf2_ros::Buffer>(getNode()->get_clock());\n      tfListener_ = std::make_shared<tf2_ros::TransformListener>(*tfBuffer_);\n    }\n  }\n}\n\nvoid CpPose::waitTransformUpdate(rclcpp::Rate r)\n{\n  bool found = false;\n  RCLCPP_INFO(getLogger(), \"[Pose Component] waitTransformUpdate\");\n  while (rclcpp::ok() && !found)\n  {\n    tf2::Stamped<tf2::Transform> transform;\n    try\n    {\n      {\n        RCLCPP_INFO_THROTTLE(\n          getLogger(), *(getNode()->get_clock()), 1000,\n          \"[Pose Component] waiting transform %s -> %s\", referenceFrame_.c_str(),\n          poseFrameName_.c_str());\n        std::lock_guard<std::mutex> lock(listenerMutex_);\n        auto transformstamped =\n          tfBuffer_->lookupTransform(referenceFrame_, poseFrameName_, getNode()->now());\n        tf2::fromMsg(transformstamped, transform);\n      }\n\n      {\n        std::lock_guard<std::mutex> guard(m_mutex_);\n        tf2::toMsg(transform, this->pose_.pose);\n        this->pose_.header.stamp = tf2_ros::toRclcpp(transform.stamp_);\n        this->pose_.header.frame_id = referenceFrame_;\n        found = true;\n        this->isInitialized = true;\n      }\n    }\n    catch (tf2::TransformException & ex)\n    {\n      RCLCPP_ERROR_STREAM_THROTTLE(\n        getLogger(), *(getNode()->get_clock()), 1000,\n        \"[Component pose] (\" << poseFrameName_ << \"/[\" << referenceFrame_\n                             << \"] ) is failing on pose update : \" << ex.what());\n    }\n\n    r.sleep();\n  }\n  RCLCPP_INFO(getLogger(), \"[Pose Component] waitTransformUpdate -> pose found!\");\n}\n\nfloat CpPose::getYaw() { return tf2::getYaw(pose_.pose.orientation); }\n\nfloat CpPose::getX() { return pose_.pose.position.x; }\nfloat CpPose::getY() { return pose_.pose.position.y; }\nfloat CpPose::getZ() { return pose_.pose.position.z; }\n\nvoid CpPose::update()\n{\n  tf2::Stamped<tf2::Transform> transform;\n  try\n  {\n    if (!frozenReferenceFrameTime)\n    {\n      std::lock_guard<std::mutex> lock(listenerMutex_);\n      RCLCPP_INFO(\n        getLogger(), \"[pose] looking up transform: %s -> %s\", referenceFrame_.c_str(),\n        poseFrameName_.c_str());\n      auto transformstamped =\n        tfBuffer_->lookupTransform(referenceFrame_, poseFrameName_, rclcpp::Time(0));\n      tf2::fromMsg(transformstamped, transform);\n      RCLCPP_INFO(getLogger(), \"[pose] transform found\");\n    }\n    else\n    {\n      RCLCPP_INFO(\n        getLogger(), \"[pose] looking up transform: %s -> %s\", referenceFrame_.c_str(),\n        poseFrameName_.c_str());\n      auto transformstamped = tfBuffer_->lookupTransform(\n        referenceFrame_, *frozenReferenceFrameTime, poseFrameName_, rclcpp::Time(0),\n        referenceFrame_, 1s);\n      tf2::fromMsg(transformstamped, transform);\n      RCLCPP_INFO(getLogger(), \"[pose] transform found\");\n    }\n\n    {\n      std::lock_guard<std::mutex> guard(m_mutex_);\n      tf2::toMsg(transform, this->pose_.pose);\n      this->pose_.header.stamp = tf2_ros::toRclcpp(transform.stamp_);\n      this->pose_.header.frame_id = referenceFrame_;\n      this->isInitialized = true;\n    }\n  }\n  catch (tf2::TransformException & ex)\n  {\n    // RCLCPP_DEBUG(getLogger(), \"[pose] EXCEPTION\");\n    RCLCPP_ERROR_STREAM_THROTTLE(\n      getLogger(), *(getNode()->get_clock()), 1000,\n      \"[Component pose] (\" << poseFrameName_ << \"/[\" << referenceFrame_\n                           << \"] ) is failing on pose update : \" << ex.what());\n  }\n}\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/components/slam_toolbox/cp_slam_toolbox.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/components/slam_toolbox/cp_slam_toolbox.hpp>\n\nnamespace cl_nav2z\n{\nCpSlamToolbox::CpSlamToolbox() : state_(SlamToolboxState::Resumed) {}\nCpSlamToolbox::~CpSlamToolbox() {}\n\nvoid CpSlamToolbox::toggleState()\n{\n  if (state_ == SlamToolboxState::Paused)\n  {\n    state_ = SlamToolboxState::Resumed;\n  }\n  else\n  {\n    state_ = SlamToolboxState::Paused;\n  }\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/components/waypoints_navigator/cp_waypoints_event_dispatcher.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/components/waypoints_navigator/cp_waypoints_event_dispatcher.hpp>\n\nnamespace cl_nav2z\n{\n/*************  ✨ Windsurf Command ⭐  *************/\n/*******  5d3b0141-8883-4631-855d-f494f3e6b9c8  *******/\nvoid WaypointEventDispatcher::postWaypointEvent(int index)\n{\n  auto & fn = postWaypointFn[index % WAYPOINTS_EVENTCOUNT];\n  if (fn != nullptr) fn();\n}\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <tf2/transform_datatypes.h>\n#include <yaml-cpp/yaml.h>\n\n#include <ament_index_cpp/get_package_share_directory.hpp>\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <cl_nav2z/common.hpp>\n#include <cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.hpp>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <cl_nav2z/components/planner_switcher/cp_planner_switcher.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n#include <cl_nav2z/components/waypoints_navigator/cp_waypoints_navigator.hpp>\n#include <fstream>\n#include <rclcpp/rclcpp.hpp>\n\nnamespace cl_nav2z\n{\nusing namespace std::chrono_literals;\nusing namespace smacc2;\n\nCpWaypointNavigatorBase::CpWaypointNavigatorBase() : currentWaypoint_(0), waypoints_(0) {}\n\nCpWaypointNavigatorBase::~CpWaypointNavigatorBase() {}\n\nCpWaypointNavigator::CpWaypointNavigator() {}\n\nvoid CpWaypointNavigatorBase::onInitialize() {}\n\nvoid CpWaypointNavigator::onInitialize()\n{\n  this->requiresComponent(nav2ActionInterface_, ComponentRequirement::HARD);\n}\n\nvoid CpWaypointNavigator::onGoalCancelled(\n  const components::CpNav2ActionInterface::WrappedResult & /*res*/)\n{\n  stopWaitingResult();\n\n  this->onNavigationRequestCancelled();\n}\n\nvoid CpWaypointNavigator::onGoalAborted(\n  const components::CpNav2ActionInterface::WrappedResult & /*res*/)\n{\n  stopWaitingResult();\n\n  this->onNavigationRequestAborted();\n}\n\nvoid CpWaypointNavigator::onGoalReached(\n  const components::CpNav2ActionInterface::WrappedResult & /*res*/)\n{\n  waypointsEventDispatcher.postWaypointEvent(currentWaypoint_);\n  currentWaypoint_++;\n  RCLCPP_WARN(\n    getLogger(), \"[CpWaypointNavigator] Goal result received, incrementing waypoint index: %ld\",\n    currentWaypoint_);\n  stopWaitingResult();\n\n  this->notifyGoalReached();\n\n  onNavigationRequestSucceded();\n}\n\nvoid CpWaypointNavigatorBase::rewind(int /*count*/)\n{\n  currentWaypoint_--;\n  if (currentWaypoint_ < 0) currentWaypoint_ = 0;\n}\n\nvoid CpWaypointNavigatorBase::forward(int /*count*/)\n{\n  currentWaypoint_++;\n  if (currentWaypoint_ >= (long)waypoints_.size() - 1)\n    currentWaypoint_ = (long)waypoints_.size() - 1;\n}\n\nvoid CpWaypointNavigatorBase::seekName(std::string name)\n{\n  bool found = false;\n\n  auto previousWaypoint = currentWaypoint_;\n\n  while (!found && currentWaypoint_ < (long)waypoints_.size())\n  {\n    auto & nextName = waypointsNames_[currentWaypoint_];\n    RCLCPP_INFO(\n      getLogger(), \"[CpWaypointNavigator] seeking ,%ld/%ld candidate waypoint: %s\",\n      currentWaypoint_, waypoints_.size(), nextName.c_str());\n    if (name == nextName)\n    {\n      found = true;\n      RCLCPP_INFO(\n        getLogger(), \"[CpWaypointNavigator] found target waypoint: %s == %s-> found\",\n        nextName.c_str(), name.c_str());\n    }\n    else\n    {\n      RCLCPP_INFO(\n        getLogger(), \"[CpWaypointNavigator] current waypoint: %s != %s -> forward\",\n        nextName.c_str(), name.c_str());\n      currentWaypoint_++;\n    }\n  }\n\n  if (found)\n  {\n    if (currentWaypoint_ >= (long)waypoints_.size() - 1)\n      currentWaypoint_ = (long)waypoints_.size() - 1;\n  }\n  else  // search backwards\n  {\n    currentWaypoint_ = previousWaypoint;\n    while (!found && currentWaypoint_ > 0)\n    {\n      auto & nextName = waypointsNames_[currentWaypoint_];\n      RCLCPP_INFO(\n        getLogger(), \"[CpWaypointNavigator] seeking , candidate waypoint: %s\", nextName.c_str());\n      if (name == nextName)\n      {\n        found = true;\n        RCLCPP_INFO(\n          getLogger(), \"[CpWaypointNavigator] found target waypoint: %s == %s-> found\",\n          nextName.c_str(), name.c_str());\n      }\n      else\n      {\n        RCLCPP_INFO(\n          getLogger(), \"[CpWaypointNavigator] current waypoint: %s != %s -> rewind\",\n          nextName.c_str(), name.c_str());\n        currentWaypoint_--;\n      }\n    }\n  }\n\n  RCLCPP_INFO(\n    getLogger(), \"[CpWaypointNavigator] seekName( %s), previous index: %ld, after index: %ld\",\n    name.c_str(), previousWaypoint, currentWaypoint_);\n}\n\nvoid CpWaypointNavigatorBase::loadWaypointsFromYamlParameter(\n  std::string parameter_name, std::string yaml_file_package_name)\n{\n  // if it is the first time and the waypoints navigator is not configured\n  std::string planfilepath;\n  planfilepath = getNode()->declare_parameter(parameter_name, planfilepath);\n  RCLCPP_INFO(getLogger(), \"waypoints plan parameter: %s\", planfilepath.c_str());\n  if (getNode()->get_parameter(parameter_name, planfilepath))\n  {\n    std::string package_share_directory =\n      ament_index_cpp::get_package_share_directory(yaml_file_package_name);\n\n    RCLCPP_INFO(getLogger(), \"file macro path: %s\", planfilepath.c_str());\n\n    boost::replace_all(planfilepath, \"$(pkg_share)\", package_share_directory);\n\n    RCLCPP_INFO(getLogger(), \"package share path: %s\", package_share_directory.c_str());\n    RCLCPP_INFO(getLogger(), \"waypoints plan file: %s\", planfilepath.c_str());\n\n    this->loadWayPointsFromFile(planfilepath);\n    RCLCPP_INFO(getLogger(), \"waypoints plan: %s\", planfilepath.c_str());\n  }\n  else\n  {\n    RCLCPP_ERROR(getLogger(), \"waypoints plan file not found: NONE\");\n  }\n}\n\nvoid CpWaypointNavigator::stopWaitingResult()\n{\n  if (succeddedNav2ZClientConnection_.connected())\n  {\n    this->succeddedNav2ZClientConnection_.disconnect();\n    this->cancelledNav2ZClientConnection_.disconnect();\n    this->abortedNav2ZClientConnection_.disconnect();\n  }\n}\n\nstd::optional<std::shared_future<\n  std::shared_ptr<rclcpp_action::ClientGoalHandle<nav2_msgs::action::NavigateToPose>>>>\nCpWaypointNavigator::sendNextGoal(std::optional<NavigateNextWaypointOptions> options)\n{\n  if (currentWaypoint_ >= 0 && currentWaypoint_ < (int)waypoints_.size())\n  {\n    auto & next = waypoints_[currentWaypoint_];\n\n    std::string nextName;\n    if ((long)waypointsNames_.size() > currentWaypoint_)\n    {\n      nextName = waypointsNames_[currentWaypoint_];\n      RCLCPP_INFO(\n        getLogger(), \"[CpWaypointNavigator] sending goal, waypoint: %s\", nextName.c_str());\n    }\n    else\n    {\n      RCLCPP_INFO(\n        getLogger(), \"[CpWaypointNavigator] sending goal, waypoint: %ld\", currentWaypoint_);\n    }\n\n    nav2_msgs::action::NavigateToPose::Goal goal;\n    CpPose * p;\n    this->requiresComponent(p, ComponentRequirement::HARD);\n    auto pose = p->toPoseMsg();\n\n    // configuring goal\n    goal.pose.header.frame_id = p->getReferenceFrame();\n    //goal.pose.header.stamp = getNode()->now();\n    goal.pose.pose = next;\n\n    cl_nav2z::CpPlannerSwitcher * plannerSwitcher;\n    this->requiresComponent(plannerSwitcher, ComponentRequirement::HARD);\n\n    plannerSwitcher->setDefaultPlanners(false);\n    if (options && options->controllerName_)\n    {\n      RCLCPP_WARN(\n        getLogger(), \"[WaypointsNavigator] override controller: %s\",\n        options->controllerName_->c_str());\n\n      plannerSwitcher->setDesiredController(*options->controllerName_);\n    }\n    else\n    {\n      RCLCPP_WARN(getLogger(), \"[WaypointsNavigator] Configuring default planners\");\n    }\n\n    cl_nav2z::CpGoalCheckerSwitcher * goalCheckerSwitcher;\n    // this->requiresComponent(goalCheckerSwitcher, ComponentRequirement::HARD);\n    this->requiresComponent(goalCheckerSwitcher, ComponentRequirement::SOFT);\n\n    if (options && options->goalCheckerName_)\n    {\n      RCLCPP_WARN(\n        getLogger(), \"[WaypointsNavigator] override goal checker: %s\",\n        options->goalCheckerName_->c_str());\n\n      goalCheckerSwitcher->setGoalCheckerId(*options->goalCheckerName_);\n    }\n    else\n    {\n      RCLCPP_WARN(getLogger(), \"[WaypointsNavigator] Configuring default goal checker\");\n      goalCheckerSwitcher->setGoalCheckerId(\"goal_checker\");\n    }\n\n    plannerSwitcher->commitPublish();\n\n    // publish stuff\n    // rclcpp::sleep_for(5s);\n\n    RCLCPP_INFO(getLogger(), \"[WaypointsNavigator] Getting odom tracker\");\n\n    cl_nav2z::odom_tracker::CpOdomTracker * odomTracker;\n    requiresComponent(odomTracker, ComponentRequirement::SOFT);\n\n    if (odomTracker != nullptr)\n    {\n      RCLCPP_INFO(getLogger(), \"[WaypointsNavigator] Storing path in odom tracker\");\n\n      auto pathname = this->owner_->getStateMachine()->getCurrentState()->getName() + \" - \" +\n                      getName() + \" - \" + nextName;\n      odomTracker->pushPath(pathname);\n      odomTracker->setStartPoint(pose);\n      odomTracker->setWorkingMode(cl_nav2z::odom_tracker::WorkingMode::RECORD_PATH);\n    }\n\n    // SEND GOAL\n    // if (!succeddedNav2ZClientConnection_.connected())\n    // {\n    //   this->succeddedNav2ZClientConnection_ =\n    //     client_->onSucceeded(&WaypointNavigator::onGoalReached, this);\n    //   this->cancelledNav2ZClientConnection_ =\n    //     client_->onAborted(&WaypointNavigator::onGoalCancelled, this);\n    //   this->abortedNav2ZClientConnection_ =\n    //     client_->onCancelled(&WaypointNavigator::onGoalAborted, this);\n    // }\n\n    // Set up navigation result handling\n    if (!succeddedNav2ZClientConnection_.connected())\n    {\n      succeddedNav2ZClientConnection_ =\n        nav2ActionInterface_->onNavigationSucceeded(&CpWaypointNavigator::onGoalReached, this);\n      abortedNav2ZClientConnection_ =\n        nav2ActionInterface_->onNavigationAborted(&CpWaypointNavigator::onGoalAborted, this);\n      cancelledNav2ZClientConnection_ =\n        nav2ActionInterface_->onNavigationCancelled(&CpWaypointNavigator::onGoalCancelled, this);\n    }\n\n    return nav2ActionInterface_->sendGoal(goal);\n  }\n  else\n  {\n    RCLCPP_WARN(\n      getLogger(),\n      \"[CpWaypointsNavigator] All waypoints were consumed. There is no more waypoints available.\");\n  }\n\n  return std::nullopt;\n}\n\nvoid CpWaypointNavigatorBase::notifyGoalReached()\n{\n  // when it is the last waypoint post an finalization EOF event\n  if (currentWaypoint_ == (long)waypoints_.size() - 1)\n  {\n    RCLCPP_WARN(getLogger(), \"[CpWaypointNavigator] Last waypoint reached, posting EOF event. \");\n    this->postEvent<EvWaypointFinal>();\n  }\n}\n\nvoid CpWaypointNavigator::onNavigationResult(\n  const components::CpNav2ActionInterface::WrappedResult & r)\n{\n  if (r.code == rclcpp_action::ResultCode::SUCCEEDED)\n  {\n    this->onGoalReached(r);\n  }\n  else if (r.code == rclcpp_action::ResultCode::ABORTED)\n  {\n    this->onGoalAborted(r);\n  }\n  else if (r.code == rclcpp_action::ResultCode::CANCELED)\n  {\n    this->onGoalCancelled(r);\n  }\n  else\n  {\n    this->onGoalAborted(r);\n  }\n}\n\nvoid CpWaypointNavigatorBase::insertWaypoint(int index, geometry_msgs::msg::Pose & newpose)\n{\n  if (index >= 0 && index <= (int)waypoints_.size())\n  {\n    waypoints_.insert(waypoints_.begin(), index, newpose);\n  }\n}\n\nvoid CpWaypointNavigatorBase::setWaypoints(const std::vector<geometry_msgs::msg::Pose> & waypoints)\n{\n  this->waypoints_ = waypoints;\n}\n\nvoid CpWaypointNavigatorBase::setWaypoints(const std::vector<Pose2D> & waypoints)\n{\n  waypoints_.clear();\n  waypointsNames_.clear();\n  int i = 0;\n  for (auto & p : waypoints)\n  {\n    geometry_msgs::msg::Pose pose;\n    pose.position.x = p.x_;\n    pose.position.y = p.y_;\n    pose.position.z = 0.0;\n    tf2::Quaternion q;\n    q.setRPY(0, 0, p.yaw_);\n    pose.orientation = tf2::toMsg(q);\n\n    waypoints_.push_back(pose);\n    waypointsNames_.push_back(std::to_string(i++));\n  }\n}\n\nvoid CpWaypointNavigatorBase::removeWaypoint(int index)\n{\n  if (index >= 0 && index < (int)waypoints_.size())\n  {\n    waypoints_.erase(waypoints_.begin() + index);\n  }\n}\n\nconst std::vector<geometry_msgs::msg::Pose> & CpWaypointNavigatorBase::getWaypoints() const\n{\n  return waypoints_;\n}\n\ngeometry_msgs::msg::Pose CpWaypointNavigatorBase::getPose(int index) const\n{\n  if (index >= 0 && index < (int)waypoints_.size())\n  {\n    return waypoints_[index];\n  }\n  else\n  {\n    throw std::out_of_range(\"Waypoint index out of range\");\n  }\n}\ngeometry_msgs::msg::Pose CpWaypointNavigatorBase::getCurrentPose() const\n{\n  if (currentWaypoint_ >= 0 && currentWaypoint_ < (int)waypoints_.size())\n  {\n    return waypoints_[currentWaypoint_];\n  }\n  else\n  {\n    throw std::out_of_range(\"Waypoint index out of range\");\n  }\n}\n\nstd::optional<geometry_msgs::msg::Pose> CpWaypointNavigatorBase::getNamedPose(\n  std::string name) const\n{\n  if (this->waypointsNames_.size() > 0)\n  {\n    for (int i = 0; i < (int)this->waypointsNames_.size(); i++)\n    {\n      if (this->waypointsNames_[i] == name)\n      {\n        return this->waypoints_[i];\n      }\n    }\n  }\n\n  return std::nullopt;\n}\n\nconst std::vector<std::string> & CpWaypointNavigatorBase::getWaypointNames() const\n{\n  return waypointsNames_;\n}\n\nstd::optional<std::string> CpWaypointNavigatorBase::getCurrentWaypointName() const\n{\n  if (currentWaypoint_ >= 0 && currentWaypoint_ < (int)waypointsNames_.size())\n  {\n    return waypointsNames_[currentWaypoint_];\n  }\n  return std::nullopt;\n}\n\nlong CpWaypointNavigatorBase::getCurrentWaypointIndex() const { return currentWaypoint_; }\n\n#define HAVE_NEW_YAMLCPP\nvoid CpWaypointNavigatorBase::loadWayPointsFromFile(std::string filepath)\n{\n  RCLCPP_INFO_STREAM(getLogger(), \"[CpWaypointNavigatorBase] Loading file:\" << filepath);\n  this->waypoints_.clear();\n  std::ifstream ifs(filepath.c_str(), std::ifstream::in);\n  if (ifs.good() == false)\n  {\n    throw std::string(\"Waypoints file not found\");\n  }\n\n  try\n  {\n#ifdef HAVE_NEW_YAMLCPP\n    YAML::Node node = YAML::Load(ifs);\n#else\n    YAML::Parser parser(ifs);\n    parser.GetNextDocument(node);\n#endif\n\n#ifdef HAVE_NEW_YAMLCPP\n    const YAML::Node & wp_node_tmp = node[\"waypoints\"];\n    const YAML::Node * wp_node = wp_node_tmp ? &wp_node_tmp : NULL;\n#else\n    const YAML::Node * wp_node = node.FindValue(\"waypoints\");\n#endif\n\n    if (wp_node != NULL)\n    {\n      for (std::size_t i = 0; i < wp_node->size(); ++i)\n      {\n        // Parse waypoint entries on YAML\n        geometry_msgs::msg::Pose wp;\n\n        try\n        {\n          // (*wp_node)[i][\"name\"] >> wp.name;\n          // (*wp_node)[i][\"frame_id\"] >> wp.header.frame_id;\n\n          auto wpnodei = (*wp_node)[i];\n          wp.position.x = wpnodei[\"position\"][\"x\"].as<double>();\n          wp.position.y = wpnodei[\"position\"][\"y\"].as<double>();\n          wp.position.z = wpnodei[\"position\"][\"z\"].as<double>();\n          wp.orientation.x = wpnodei[\"orientation\"][\"x\"].as<double>();\n          wp.orientation.y = wpnodei[\"orientation\"][\"y\"].as<double>();\n          wp.orientation.z = wpnodei[\"orientation\"][\"z\"].as<double>();\n          wp.orientation.w = wpnodei[\"orientation\"][\"w\"].as<double>();\n\n          if (wpnodei[\"name\"].IsDefined())\n          {\n            this->waypointsNames_.push_back(wpnodei[\"name\"].as<std::string>());\n          }\n\n          this->waypoints_.push_back(wp);\n        }\n        catch (...)\n        {\n          RCLCPP_ERROR(getLogger(), \"parsing waypoint file, syntax error in point %ld\", i);\n        }\n      }\n      RCLCPP_INFO_STREAM(getLogger(), \"Parsed \" << this->waypoints_.size() << \" waypoints.\");\n    }\n    else\n    {\n      RCLCPP_WARN_STREAM(getLogger(), \"Couldn't find any waypoints in the provided yaml file.\");\n    }\n  }\n  catch (const YAML::ParserException & ex)\n  {\n    RCLCPP_ERROR_STREAM(\n      getLogger(), \"Error loading the Waypoints YAML file. Incorrect syntax: \" << ex.what());\n  }\n}\n\nvoid CpWaypointNavigatorBase::loadWayPointsFromFile2(std::string filepath)\n{\n  RCLCPP_INFO_STREAM(getLogger(), \"[CpWaypointNavigator] Loading file:\" << filepath);\n  this->waypoints_.clear();\n  std::ifstream ifs(filepath.c_str(), std::ifstream::in);\n  if (ifs.good() == false)\n  {\n    throw std::string(\"Waypoints file not found\");\n  }\n\n  try\n  {\n#ifdef HAVE_NEW_YAMLCPP\n    YAML::Node node = YAML::Load(ifs);\n#else\n    YAML::Parser parser(ifs);\n    parser.GetNextDocument(node);\n#endif\n\n#ifdef HAVE_NEW_YAMLCPP\n    const YAML::Node & wp_node_tmp = node[\"waypoints\"];\n    const YAML::Node * wp_node = wp_node_tmp ? &wp_node_tmp : NULL;\n#else\n    const YAML::Node * wp_node = node.FindValue(\"waypoints\");\n#endif\n\n    if (wp_node != NULL)\n    {\n      for (std::size_t i = 0; i < wp_node->size(); ++i)\n      {\n        // Parse waypoint entries on YAML\n        geometry_msgs::msg::Pose wp;\n\n        try\n        {\n          // (*wp_node)[i][\"name\"] >> wp.name;\n          // (*wp_node)[i][\"frame_id\"] >> wp.header.frame_id;\n          wp.position.x = (*wp_node)[i][\"x\"].as<double>();\n          wp.position.y = (*wp_node)[i][\"y\"].as<double>();\n          auto name = (*wp_node)[i][\"name\"].as<std::string>();\n\n          this->waypoints_.push_back(wp);\n          this->waypointsNames_.push_back(name);\n        }\n        catch (...)\n        {\n          RCLCPP_ERROR(getLogger(), \"parsing waypoint file, syntax error in point %ld\", i);\n        }\n      }\n      RCLCPP_INFO_STREAM(getLogger(), \"Parsed \" << this->waypoints_.size() << \" waypoints.\");\n    }\n    else\n    {\n      RCLCPP_WARN_STREAM(getLogger(), \"Couldn't find any waypoints in the provided yaml file.\");\n    }\n  }\n  catch (const YAML::ParserException & ex)\n  {\n    RCLCPP_ERROR_STREAM(\n      getLogger(), \"Error loading the Waypoints YAML file. Incorrect syntax: \" << ex.what());\n  }\n}\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/cl_nav2z/src/cl_nav2z/components/waypoints_navigator/cp_waypoints_visualizer.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <cl_nav2z/components/waypoints_navigator/cp_waypoints_visualizer.hpp>\n\nnamespace cl_nav2z\n{\nconst std::string frameid = \"map\";\n\nCpWaypointsVisualizer::CpWaypointsVisualizer(rclcpp::Duration duration) : ISmaccUpdatable(duration)\n{\n}\n\nvoid CpWaypointsVisualizer::onInitialize()\n{\n  markersPub_ = getNode()->create_publisher<visualization_msgs::msg::MarkerArray>(\n    \"cp_waypoints_visualizer/visualization_markers\", rclcpp::QoS(rclcpp::KeepLast(1)));\n\n  this->requiresComponent(waypointsNavigator_, ComponentRequirement::HARD);\n  auto & waypoints = waypointsNavigator_->getWaypoints();\n  auto & waypointsNames = waypointsNavigator_->getWaypointNames();\n\n  int i = 0;\n  for (auto & waypoint : waypoints)\n  {\n    std::string name;\n    if ((long)waypointsNames.size() > i)\n    {\n      name = waypointsNames[i];\n    }\n    else\n    {\n      name = \"waypoint_\" + std::to_string(i);\n    }\n\n    visualization_msgs::msg::Marker marker;\n    createMarker(waypoint, marker);\n    markers_.markers.push_back(marker);\n\n    visualization_msgs::msg::Marker markerlabel;\n    createMarkerLabel(waypoint, name, markerlabel);\n    markerLabels_.markers.push_back(markerlabel);\n\n    i++;\n  }\n}\n\nvoid CpWaypointsVisualizer::createMarkerLabel(\n  const geometry_msgs::msg::Pose & waypoint, std::string label,\n  visualization_msgs::msg::Marker & marker)\n{\n  marker.header.frame_id = frameid;\n  marker.header.stamp = getNode()->now();\n  marker.ns = \"waypoints_labels\";\n\n  marker.id = markers_.markers.size();\n  marker.type = visualization_msgs::msg::Marker::TEXT_VIEW_FACING;\n  marker.action = visualization_msgs::msg::Marker::ADD;\n  marker.scale.x = 0.3;\n  marker.scale.y = 0.3;\n  marker.scale.z = 0.3;\n  marker.text = label;\n\n  marker.color.a = 1.0;\n  marker.pose = waypoint;\n  marker.pose.position.z += 0.3;\n}\n\nvoid CpWaypointsVisualizer::createMarker(\n  const geometry_msgs::msg::Pose & waypoint, visualization_msgs::msg::Marker & marker)\n{\n  marker.header.frame_id = frameid;\n  marker.header.stamp = getNode()->now();\n  marker.ns = \"waypoints\";\n\n  marker.id = markers_.markers.size();\n  marker.type = visualization_msgs::msg::Marker::SPHERE;\n  marker.action = visualization_msgs::msg::Marker::ADD;\n  marker.scale.x = 0.1;\n  marker.scale.y = 0.1;\n  marker.scale.z = 0.1;\n\n  marker.color.a = 1.0;\n  marker.pose = waypoint;\n}\n\nvoid CpWaypointsVisualizer::update()\n{\n  std::lock_guard<std::mutex> guard(m_mutex_);\n\n  auto index = waypointsNavigator_->getCurrentWaypointIndex();\n\n  int i = 0;\n\n  for (auto & marker : markers_.markers)\n  {\n    marker.header.stamp = getNode()->now();\n\n    if (i >= index)\n    {\n      marker.color.r = 1.0;\n      marker.color.g = 0;\n      marker.color.b = 0;\n    }\n    else\n    {\n      marker.color.r = 0.0;\n      marker.color.g = 1.0;\n      marker.color.b = 0;\n    }\n    i++;\n  }\n\n  i = 0;\n  for (auto & marker : markerLabels_.markers)\n  {\n    marker.header.stamp = getNode()->now();\n\n    if (i >= index)\n    {\n      marker.color.r = 1.0;\n      marker.color.g = 0;\n      marker.color.b = 0;\n    }\n    else\n    {\n      marker.color.r = 0.0;\n      marker.color.g = 1.0;\n      marker.color.b = 0;\n    }\n    i++;\n  }\n\n  //markers_.header.stamp = getNode()->now();\n  markersPub_->publish(markers_);\n  markersPub_->publish(markerLabels_);\n}\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/backward_global_planner/CHANGELOG.rst",
    "content": "Changelog for package backward_global_planner\n=============================================\n\nVersion 2.3.16 (2023-07-16)\n----------------------------\n### Added\n- Merged branch 'humble' from https://github.com/robosoft-ai/SMACC2 into humble\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for ros buildfarm issue\n  - Further details on the buildfarm problem\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n- Contributors: brettpac, pabloinigoblasco\n\nVersion 2.3.6 (2023-03-12)\n--------------------------\nNo changes listed.\n\nVersion 1.22.1 (2022-11-09)\n---------------------------\n### Added\n- Pre-release\n- Contributors: pabloinigoblasco\n\n### Changed\n- Improved navigation client behaviors and husky barrel demo (#311)\n  - Enhanced navigation client behaviors and husky barrel demo\n  - Numerous enhancements in action client and cb sequence for husky barrel search\n  - Enhanced navigation behaviors for husky barrel search demo\n  - Functionality improvements in navigation and warehouse 3\n  - Format enhancements in navigation and warehouse 3 for husky\n- Reverted \"Ignore packages which should not be released.\"\n  - Reverted commit dec14a936a877b2ef722a6a32f1bf3df09312542.\n- Contributors: Denis Štogl, Pablo Iñigo Blasco\n\n0.3.0 (2022-04-04)\n------------------\n\n### Added\n- Improvements in navigation client behaviors and husky barrel demo (#311)\n  - Many enhancements in action client and cb sequence for husky barrel search\n  - Enhanced navigation behaviors on husky barrel search demo\n  - Functionality improvements in navigation and warehouse 3\n  - Format enhancements in warehouse 3 and husky\n\n### Changed\n- Revert \"Ignore packages which should not be released.\"\n- Updated mentions of SMACC/ROS to SMACC2/ROS2\n- Renamed folders, deleted tracing.md, edited README.md\n- Added smacc2_performance_tools\n- Performance tests improvements\n- Renaming of event generator library\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69)\n- Corrected all linters and formatters\n\n### Fixed\n- Do not execute clang-format on smacc2_sm_reference_library package\n- Correct trailing spaces\n\n### Removed\n- Ignored packages which should not be released\n\n### Miscellaneous\n- Various minor formatting and cleanup tasks\n\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\nCo-authored-by: Denis Štogl <denis@stogl.de>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n\n```rst\nSection_3\n=========\n\nAdded\n-----\n\n- New client behavior for nav2: Now waits for nav2 nodes to subscribe to the /bond topic and ensures they are alive. Optional node selection available.\n- Progress in AWS navigation demo.\n- New feature: cb_wait_topic_message, an asynchronous client behavior that waits for a topic message and optionally verifies its contents for success.\n- Merge and progress.\n- New client behavior for nav2: Waits for nav2 nodes to subscribe to the /bond topic and ensures they are alive. Optional node selection available.\n- Navigation parameters fixes on sm_dance_bot.\n- New feature: cb_pause_slam client behavior.\n- Rename doxygen deployment workflow.\n- sm_dance_bot visualizing turtlebot3.\n- Feature: dance bot launch gz lidar choice.\n- Feature: sm dance bot lite gazebo fixes.\n- Feature: sm dance bot strikes back gazebo fixes.\n- AWS demo.\n- Got sm_multi_stage_1 working (barely).\n- Brettpac branch.\n- Remove neo_simulation2 package.\n- More sm_multi_stage_1.\n- Diverse improvements in navigation and performance.\n\nChanged\n-------\n\n- Minor formatting improvements.\n\nFixed\n-----\n\n- Remove some compile warnings.\n\nRemoved\n-------\n\n- Removed neo_simulation2 package.\n```\n\nSection 4\n=========\n\nAdded\n-----\n\n- Additional linting and formatting.\n- Feature to toggle slam and smacc deep history (#122).\n- Progress in navigation, slam toggle client behaviors, and slam_toolbox components. Also introduced smacc2::deep_history syntax.\n- Introducing slam pausing/resuming functionality in testing sm_dance_bot.\n- More fixes in sm_dance_bot (#125).\n- First working version of sm template and template generator (#127).\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140).\n- Added remaining SVGs to READMEs (#145).\n- Rolling Docker environment to be executed from any environment (#154).\n- Added SM Atomic SM generator (#143).\n- Moved reference library SMs to smacc2_performance_tools (#166).\n- Added QOS durability to SmaccPublisherClient (#163).\n- Feature to test moveit behaviors (#167).\n- Progress on aws navigation and some other refactorings on navigation clients and behaviors.\n- More on aws demo.\n- Waypoint inputs (#178).\n- Redoing sm_dance_bot_warehouse_3 waypoints.\n\nChanged\n-------\n\n- Move method after the method it calls to prevent recursion (#126).\n- Fixed launch command in README.md for sm_dance_bot_strikes_back and removed some comments.\n- Fixed CI: format fix python version (#148).\n- Removed node creation and created only a logger (#149).\n- Renamed sm_advanced_recovery_1 (#171).\n- Reworked sm_multi_stage_1 with multistage modes, sequences, steps, and finishing touches (#172).\n- Updated package list (#142).\n- Removed parameters smacc (#147).\n- Added .reps dependencies and fixed some build errors.\n- Updated readme (#164).\n\nFixed\n-----\n\n- Minor format issues (#134).\n- Minor tweaks (#130).\n- Minor changes (#175).\n- Minor format (#124).\n- Minor navigation improvements (#141).\n- Fixed compiling issues.\n- Fixed broken master build.\n- Fixed pipeline error.\n\nRemoved\n-------\n\n- Removed merge markers from a python file (#119).\n- Removed test from main moveit cmake.\n- Removed sm_dance_bot_msgs.\n- Removed some comments in the past.\n\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Denis Štogl <denis@stogl.de>\n\n```rst\nSection 5\n=========\n\nAdded\n-----\n- Added Feature/wharehouse2 dec 14 (#185) with warehouse2 changes and minor updates.\n- Added Feature/sm warehouse 2 13 dec 2 (#186) with format changes, headless improvements, and default values.\n- Added Feature/cb pure spinning (#188) with format changes, headless improvements, and default values.\n- Added Feature/cb pure spinning (#189) with format changes, headless improvements, and default values.\n- Added Feature/planner changes 16 12 (#191) with minor changes, fixes, and replanning.\n- Added Feature/replanning 16 dec (#193) with minor changes and replanning.\n- Added several fixes (#194) and minor changes (#195).\n- Added Feature/undo motion 20 12 (#196) with minor changes, undo motion improvements, and warehouse2 navigation tuning.\n- Added Feature/undo motion 20 12 (#198) with minor changes, undo motion improvements, and warehouse2 navigation tuning.\n- Added Feature/sync 21 12 (#199) with minor changes, replanning, and format fixes.\n- Added Feature/warehouse2 22 12 (#200) with minor changes, replanning, and format fixes.\n- Added Feature/warehouse2 23 12 (#201) with minor changes, replanning, tuning, and fixes.\n- Added Feature/minor tune (#203) with tuning, fixes, and minor adjustments.\n- Added fixing warehouse 3 problems and core improvements (#204) to remove deadlocks and improve continuous integration.\n- Added Foxy backport (#206) with formatting fixes, trailing spaces correction, and various updates.\n\nChanged\n-------\n- Changed ros2 launch sm_three_some sm_three_some to ros2 launch sm_three_some sm_three_some.launch.\n\nAdded\n-----\n- Added instructions to ensure the necessary package is installed before running commands.\n\nChanged\n-------\n- Changed wording from \"smacc application\" to \"SMACC2 library\" for clarity.\n\nFixed\n-----\n- Fixed bug in smacc2 component.\n- Fixed formatting and linting issues.\n\nRemoved\n-------\n- Removed manual installation of ros-rolling-ros2trace, now automated in setupTracing.sh.\n\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nAuthor: Pablo Iñigo Blasco (pabloinigoblasco)\n```\n\n```rst\nSection_6\n=========\n\nAdded\n-----\n- Performance tests improvements.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n- Optimized dependencies in move_base_z_planners_common.\n- Renamed event generator library.\n- Added galactic CI setup and renamed rolling files. (#58)\n- Fixed source CI and corrected README overview. (#62)\n- Updated c_cpp_properties.json.\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic and waiting for them to be alive. Optionally select the nodes to wait.\n- Corrected all linters and formatters.\n- Navigation parameters fixes on sm_dance_bot.\n\nChanged\n-------\n- Updated smacc2_rta command across readmes.\n- Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Updated README.md with launch command.\n- Progress in aws navigation demo.\n\nFixed\n-----\n- Corrected trailing spaces.\n- Attempted pre-commit fixes.\n- Fixed pre-commit.\n- Fixed pre-commit.\n- Fixed pre-commit.\n\nRemoved\n-------\n- Removed redundant formatting entries.\n\nAuthors\n-------\n- Pablo Iñigo Blasco\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n```\n\n```rst\nSection_7\n=========\n\nAdded\n-----\n- New feature: `cb_wait_topic_message`: asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for `nav2`: waits for `nav2` nodes subscribing to the `/bond` topic and ensures they are alive. Optional selection of nodes to wait for.\n- `sm_dance_bot_lite` gazebo visualization.\n- `sm_dance_bot_strikes_back` gazebo fixes.\n- `sm_multi_stage_1` doubling.\n- `smacc2::deep_history` syntax for `slam_toolbox` components.\n\nChanged\n-------\n- Progress in AWS navigation demo.\n- Formatting improvements.\n- Navigation parameters fixes on `sm_dance_bot`.\n- Minor format adjustments.\n- `sm_multi_stage_1` improvements.\n- Polishing `sm_dance_bot` and `s-pattern`.\n\nFixed\n-----\n- Remove some compile warnings.\n- Remove `neo_simulation2` package.\n- Correct formatting issues.\n- Adjust build packages for source CI.\n- Move method after the method it calls to prevent recursion.\n\nRemoved\n-------\n- `neo_simulation2` package.\n\nCollaborators\n-------------\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- pabloinigoblasco <pablo@ibrobotics.com>\n```\n\nSection 8\n==========\n\nAdded\n-----\n- Feature/sm dance bot refine (#131)\n  - Refinement in sm_dance_bot functionality.\n- Feature/sm dance bot refine 2 (#132)\n  - Further refinement in sm_dance_bot.\n- Waypoints navigator bug (#133)\n  - Tuning to mitigate overshot issues.\n- Progress in the sm_dance_bot tests (#135)\n  - Progress made in markers cleanup.\n- sm_dance_bot_lite (#136)\n  - Lightweight version of sm_dance_bot.\n- Add SM core test (#138)\n  - Addition of SM core test.\n- Feature/nav2z renaming (#144)\n  - Renaming navigation 2 stack, added SVGs to READMEs.\n- Update package list. (#142)\n  - Package list update.\n- Add SM Atomic SM generator. (#143)\n  - Addition of SM Atomic SM generator.\n- Rolling Docker environment to be executed from any environment (#154)\n  - Docker environment now executable from any environment.\n- Add QOS durability to SmaccPublisherClient (#163)\n  - QOS durability feature added to SmaccPublisherClient.\n- Feature/migration moveit client (#151)\n  - Migration to smacc2, dependency updates, linting fixes.\n- Feature/aws navigation sm dance bot (#174)\n  - Progress on AWS navigation, refactorings on navigation clients and behaviors.\n- Waypoint Inputs (#178)\n  - Addition of waypoint inputs.\n- Feature/planner changes 16 12 (#191)\n  - Minor changes and fixes in planner functionality.\n- Feature/replanning 16 dec (#193)\n  - Replanning for all examples.\n\nChanged\n-------\n- Minor navigation improvements (#141)\n  - Minor improvements in navigation.\n- Using local action msgs (#139)\n  - Transition to using local action messages.\n- Resolved compile warnings (#137)\n  - Compilation warnings resolved.\n- Fix CI: format fix python version (#148)\n  - CI fix for Python version.\n- Noticed launch command was incorrect in README.md\n  - Corrected launch command in README.md.\n- Initial state machine transition timestamp (#165)\n  - Timestamp added to initial state machine transition.\n- Moved reference library SMs to smacc2_performance_tools (#166)\n  - Reference library SMs moved to smacc2_performance_tools.\n- Finetuning waypoints (#187)\n  - Fine-tuning of waypoints.\n\nFixed\n-----\n- Warehouse2 progress (#179)\n  - Progress in Warehouse2 functionality.\n- SrConditional fixes and formatting (#168)\n  - Fixes and formatting in SrConditional.\n- Several fixes (#194)\n  - Various fixes applied.\n\nRemoved\n-------\n- Removing parameters smacc (#147)\n  - Parameters related to smacc removed.\n- Removing node creation and create only a logger. (#149)\n  - Node creation removed, only logger created.\n- Removing test from main moveit cmake\n  - Test removed from main moveit cmake.\n- Removing parameters smacc\n  - Parameters related to smacc removed.\n- Removing sm_dance_bot_msgs\n  - Removed sm_dance_bot_msgs.\n- Removing sm_dance_bot_msgs\n  - Removed sm_dance_bot_msgs.\n- Removing parameters smacc\n  - Parameters related to smacc removed.\n- Removing parameters smacc\n  - Parameters related to smacc removed.\n- Removing parameters smacc\n  - Parameters related to smacc removed.\n- Removing parameters smacc\n  - Parameters related to smacc removed.\n- Removing parameters smacc\n  - Parameters related to smacc removed.\n- Removing parameters smacc\n  - Parameters related to smacc removed.\n- Removing parameters smacc\n  - Parameters related to smacc removed.\n- Removing parameters smacc\n  - Parameters related to smacc removed.\n- Removing parameters smacc\n  - Parameters related to smacc removed.\n- Removing parameters smacc\n  - Parameters related to smacc removed.\n- Removing parameters smacc\n  - Parameters related to smacc removed.\n- Removing parameters smacc\n  - Parameters related to smacc removed.\n\n```rst\nSection_9\n=========\n\nVersion 20.12\n-------------\n\nAdded:\n- Feature/undo motion 20 12 (#196)\n- Improving undo motion navigation warehouse2\n- Tuning warehouse3 (#197)\n\nChanged:\n- Minor changes\n- Replanning for all examples\n\nVersion 21.12\n-------------\n\nAdded:\n- Feature/sync 21 12 (#199)\n\nChanged:\n- Minor changes\n- Replanning for all examples\n- Format issues\n\nVersion 22.12\n-------------\n\nAdded:\n- Feature/warehouse2 22 12 (#200)\n\nChanged:\n- Minor changes\n- Replanning for all examples\n- Format issues\n- Finishing warehouse2\n\nVersion 23.12\n-------------\n\nAdded:\n- Feature/warehouse2 23 12 (#201)\n\nChanged:\n- Minor changes\n- Replanning for all examples\n- Tuning and fixes (#202)\n\nAdded:\n- Feature/minor tune (#203)\n\nChanged:\n- Tuning and fixes\n- Minor tune\n- Fixing warehouse 3 problems, and other core improvements (#204)\n- Added missing file from warehouse2 (#205)\n- Merging code from backport foxy and updates about autoware (#208)\n\nRemoved:\n- Weird moveit not downloaded repo\n\nCo-authored-by: Denis Štogl <denis@stogl.de>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Declan Dury <44791484+DecDury@users.noreply.github.com>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: reelrbtx <brett2@reelrobotics.com>\nCo-authored-by: brettpac <brett@robosoft.ai>\nCo-authored-by: David Revay <MrBlenny@users.noreply.github.com>\n\nVersion 0.1.0\n-------------\n\nAdded:\n- First ensure you have the necessary package installed.\n- Rename header files and correct format.\n- Add workflow for checking doc build.\n- Update doxygen-check-build.yml\n- Create doxygen-deploy.yml\n- Use manual deployment for now.\n- Create workflow for testing prerelease builds\n- Use docs/ as source folder for documentation\n- Use docs/ as output directory.\n- Rename to smacc2 and smacc2_msgs\n- Correct GitHub branch reference.\n- Update name of package and package.xml to pass liter.\n- Execute on master update\n- Reset all versions to 0.0.0\n- Ignore all packages except smacc2 and smacc2_msgs\n- Update changelogs\n\nChanged:\n- Ros2 launch sm_three_some sm_three_some to ros2 launch sm_three_some sm_three_some.launch\n- Correct codespell\n- Correct python linters warnings\n- Add galactic CI build because Navigation2 is broken in rolling\n- Add partial changes for ament_cpplint\n- Add tf2_ros as dependency to find include\n- Disable ament_cpplint\n- Disable some packages and update workflows\n- Bump ccache version\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences\n- Disable cpplint and cppcheck linters\n- Correct formatters\n- Branching example\n- Disable disabled packages\n- Update ci-build-source.yml\n- Change extension of imports\n- Enable cppcheck\n- Correct formatting of python file\n- Included necessary package and edited Threesome launch\n- Enable build of missing rolling repositories\n- Enable Navigation2 for semi-binary build\n- Remove galactic builds from master and keep only rolling. Remove submodules and use .repos file\n- Updated mentions of SMACC/ROS to SMACC2/ROS2\n- Some progress on navigation rolling\n- Added smacc2_performance_tools\n- Performance tests improvements\n- More on performance and other issues\n- Sm_respira_1 format cleanup\n- Sm_respira_1 format cleanup pre-commit\n- Sm_respira_test_2\n\nRemoved:\n- Trailing spaces\n- Manual installation of ros-rolling-ros2trace (now automated in setupTracing.sh)\n- Tracing directory\n- Moved tracing.md to tracing directory\n- Added setupTracing.sh (installs necessary packages and configures tracing group)\n- Created alternative ManualTracing\n- Added new sm markdowns\n- Added a Dockerfile for Rolling and Galactic\n- Updated tracing/ManualTracing.md\n- Changed wording \"smacc application\" to \"SMACC2 library\"\n- Reactivating smacc2 nav clients for rolling via submodules\n- Renamed tracing events after\n- Bug in smacc2 component\n- Reverted markdowns to HTML\n- Added README tutorial for Dockerfile\n- Additional cleanup\n- Edited tracing.md to reflect new tracing event names\n\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n```\n*pabloinigoblasco*\n\n```rst\nSection_10\n==========\n\nAdded\n-----\n- Added galactic CI setup and renamed rolling files. (#58)\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic and waiting for them to be alive. You can optionally select the nodes to wait for.\n\nChanged\n-------\n- Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69)\n- Updated doxygen links (#70)\n- Updated README.md launch command.\n- Corrected all linters and formatters.\n\nFixed\n----\n- Fixed source CI and corrected README overview. (#62)\n- Fixed trailing spaces.\n- Fixed pre-commit issues.\n\nRemoved\n-------\n- Removed execution of clang-format on smacc2_sm_reference_library package.\n\nOther\n-----\n- Updated smacc2_rta command across readmes.\n- Renamed event generator library.\n- Cleaned up sm_atomic_24hr.\n- Optimized dependencies in move_base_z_planners_common.\n- Minor formatting improvements.\n- Progressed in aws navigation demo.\n- Fixed navigation parameters on sm_dance_bot.\n- Several core improvements during navigation testing.\n- More on navigation.\n- Several rounds of work on sm_advanced_recovery_1.\n- More readme updates.\n- Created new state machine from sm_respira_1.\n- Base for the sm_aws_aarehouse navigation.\n- Progressed in aws navigation.\n- Formatting improvements.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n-\n\n```rst\nSection_11\n==========\n\nAdded\n-----\n\n- New feature, cb_wait_topic_message: asynchronous client behavior that waits for a topic message and optionally checks its contents for success\n- New client behavior for nav2: wait for nav2 nodes subscribing to the /bond topic and wait for them to be alive, with optional node selection\n- Base for the sm_aws_warehouse navigation\n- New client behavior, cb_pause_slam\n- Sm_dance_bot_lite gazebo fixes\n- Sm_dance_bot_strikes_back gazebo fixes\n- Aws demo progress\n- Slam toggle client behaviors and slam_toolbox components\n- Smacc2::deep_history syntax\n- Dance bot s-pattern refinement\n- First working version of sm template and template generator\n\nChanged\n-------\n\n- Navigation parameters fixes on sm_dance_bot\n- Minor format improvements\n- Format fixes for gazebo to show the robot and lidar\n- Minor tweaks\n\nFixed\n-----\n\n- Remove some compile warnings\n- Remove neo_simulation2 package\n- Correct formatting\n- Enable source build on PR for testing\n- Adjust build packages of source CI\n- Remove merge markers from a python file\n- Move method after the method it calls to prevent recursion\n- Fix typo \"Finnaly\" to \"Finally\"\n- Build fix\n- Waypoints navigator bug\n\nRemoved\n-------\n\n- Remove neo_simulation2 package\n\nCollaborators\n-------------\n\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: pabloinigoblasco <pablo@ibrobotics.com>\n```\n\n```rst\nSection_12\n==========\n\nAdded\n-----\n- Progress in the sm_dance_bot tests (#135)\n- Added SM core test (#138)\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Added SM Atomic SM generator (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Added QOS durability to SmaccPublisherClient (#163)\n- Added dependencies for husky simulation in AWS navigation (#174)\n- Added Waypoint Inputs (#178)\n- Added more Waypoints to sm_dance_bot_warehouse_3 (#184)\n- Finetuned waypoints (#187)\n- Added pure spinning behavior missing files (#189)\n- Added replanning for all examples (#193)\n- Improved undo motion navigation in warehouse2 (#196)\n\nChanged\n-------\n- Minor tuning to mitigate overshot issue cases\n- Some progress on markers cleanup\n- Minor format issues (#134)\n- Minor navigation improvements (#141)\n- Using local action messages\n- Feature/nav2z renaming (#144)\n- Resolved compile warnings (#137)\n- Updated package list (#142)\n- Removed parameters smacc (#147)\n- Moved reference library SMs to smacc2_performance_tools (#166)\n- Pre-commit cleanup\n- Fixed launch command for sm_dance_bot_strikes_back in README.md\n- Updated readme (#164)\n- Updated format\n- Fixed CI: format fix python version (#148)\n- Removed node creation and created only a logger (#149)\n- Fixed compiling issues\n- Fixed broken master build\n- Fixed pipeline error\n- Fixed formatting\n- Fixed some linting warnings\n- Fixed some errors introduced on formatting\n- Fixed some build errors\n- Fixed some formatting and templating on SrConditional\n- Moved trigger logic into headers\n\nFixed\n-----\n- Noticed launch command was incorrect in README.md\n\nRemoved\n-------\n- Removed sm_dance_bot_msgs\n- Removed test from main moveit cmake\n- Removed test from main moveit cmake\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n- Removed some comments in the past\n-\n\nSection_13\n==========\n\nAdded\n-----\n- Feature/sync 21 12 (#199): Sync feature added.\n- Feature/warehouse2 22 12 (#200): Warehouse2 feature added.\n- Feature/warehouse2 23 12 (#201): Warehouse2 feature finished.\n- Feature/minor tune (#203): Minor tuning and fixes added.\n- Fixing warehouse 3 problems, and other core improvements (#204): Warehouse 3 issues fixed, core improvements made.\n- Added missing file from warehouse2 (#205): Missing file added.\n- Add mergify rules file: Mergify rules file added.\n- Add Autoware Auto Msgs into not-released dependencies (#220): Autoware Auto Msgs added to dependencies.\n- Fix rolling builds (#222): Rolling builds fixed.\n- Add galactic CI build because Navigation2 is broken in rolling: Galactic CI build added due to Navigation2 issues.\n- Add partial changes for ament_cpplint: Partial changes for ament_cpplint added.\n- Add tf2_ros as dependency to find include: tf2_ros dependency added.\n- Disable ament_cpplint: ament_cpplint disabled.\n- Disable some packages and update workflows: Some packages disabled, workflows updated.\n- Bump ccache version: ccache version bumped.\n- Ignore further packages: Further packages ignored.\n- Satisfy ament_lint_cmake: ament_lint_cmake satisfied.\n- Add missing licences: Missing licenses added.\n- Disable cpplint and cppcheck linters: cpplint and cppcheck linters disabled.\n- Correct formatters: Formatters corrected.\n- Enable cppcheck: cppcheck enabled.\n- Correct formatting of python file: Python file formatting corrected.\n- Included necessary package and edited Threesome launch: Necessary package included, Threesome launch edited.\n- Add workflow for checking doc build: Workflow added for checking documentation build.\n- Create doxygen-deploy.yml: doxygen-deploy.yml created.\n- Create workflow for testing prerelease builds: Workflow created for testing prerelease builds.\n- Rename to smacc2 and smacc2_msgs: Renamed to smacc2 and smacc2_msgs.\n- Update name of package and package.xml to pass liter: Package name and package.xml updated.\n- Update changelogs: Changelogs updated.\n- Revert \"Ignore all packages except smacc2 and smacc2_msgs\": Reverted commit.\n- Update description table: Description table updated.\n- Update table: Table updated.\n- Dockerfile w/ ROS distro as argument: Dockerfile with ROS distro as argument added.\n- Opened new folder for additional tracing contents: New folder for tracing contents opened.\n- Delete tracing directory: Tracing directory deleted.\n- Moved tracing.md to tracing directory: tracing.md moved to tracing directory.\n- added setupTracing.sh: setupTracing.sh added.\n- Removed manual installation of ros-rolling-ros2trace: Manual installation of ros-rolling-ros2trace removed.\n- Created alternative ManualTracing: Alternative ManualTracing created.\n- added new sm markdowns: New sm markdowns added.\n- added a dockerfile for Rolling and Galactic: Dockerfile for Rolling and Galactic added.\n- Update smacc2_ci/docker/ros_rollingAndGalactic_ubuntu_20.04/buildGalactic.sh: buildGalactic.sh updated.\n- Update tracing/ManualTracing.md: ManualTracing.md updated.\n- changed wording \"smacc application\" to \"SMACC2 library\": Wording changed from \"smacc application\" to \"SMACC2 library\".\n- Update smacc_sm_reference_library/sm_atomic/README.md: README.md updated.\n\nChanged\n-------\n- ros2 launch sm_three_some sm_three_some: Changed launch command.\n- First ensure you have the necessary package installed: Instructions added for package installation.\n- Rename header files and correct format: Header files renamed and format corrected.\n\nFixed\n-----\n- Remove example things from Foxy CI setup (#214): Removed example things from Foxy CI setup.\n- Fix trailing spaces: Trailing spaces fixed.\n- Correct codespell: Codespell corrected.\n- Correct python linters warnings: Python linters warnings corrected.\n- Fix minor broken build: Minor broken build fixed.\n- Fixing docker for foxy and galactic: Docker issues fixed for foxy and galactic.\n- removing warnings (#213): Warnings removed.\n\nRemoved\n-------\n- some reordering fixes: Reordering fixes removed.\n- branching example: Branching example removed.\n- Disable disabled packages: Disabled packages disabled.\n- Update ci-build-source.yml: ci-build-source.yml updated.\n- Change extension: Extension changed.\n- Change extension of imports: Extension of imports changed.\n- Execute on master update: Execution on master update removed.\n- Reset all versions to 0.0.0: Versions reset to 0.0.0.\n- Ignore all packages except smacc2 and smacc2_msgs: Ignored all packages except smacc2 and smacc2_msgs.\n\nSection_14\n-----------\n\nAdded\n-----\n- Added README tutorial for Dockerfile.\n- Added smacc2_performance_tools.\n\nChanged\n-------\n- Reverted markdowns to html.\n- Edited tracing.md to reflect new tracing event names.\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed folders, deleted tracing.md, and edited README.md.\n- Renamed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Updated doxygen links.\n- Updated c_cpp_properties.json.\n- Renamed event generator library.\n- Optimized dependencies in move_base_z_planners_common.\n- Updated smacc2_rta command across readmes.\n- Corrected trailing spaces.\n- Updated README.md launch command.\n- Corrected all linters and formatters.\n\nFixed\n----\n- Fixed source CI and corrected README overview (#62).\n- Fixed pre-commit issues.\n- Fixed Pre-Commit issues.\n- Attempted pre-commit fixes.\n\nRemoved\n-------\n- Removed galactic builds from master and kept only rolling.\n- Removed submodules and used .repos file.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n\nOther\n-----\n- Enabled build of missing rolling repositories.\n- Enabled Navigation2 for semi-binary build.\n- Some progress on navigation rolling.\n- More changes on performance tests.\n- Minor formatting improvements.\n- Minor improvements during navigation testing.\n- Several core improvements during navigation testing.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress\n\n```rst\nSection_15\n==========\n\nAdded\n-----\n- New feature: `cb_wait_topic_message`: asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for `nav2`: `add` behavior waits for nav2 nodes subscribing to the `/bond` topic and ensures they are alive. Optional node selection available.\n- Base for the `sm_aws_warehouse` navigation.\n- `cb_pause_slam` client behavior.\n- `sm_dance_bot_lite` visualization for TurtleBot3.\n- `sm_multi_stage_1` doubling.\n- `sm_dance_bot_strikes_back` gazebo fixes.\n- AWS demo improvements.\n- `sm_multi_stage_1` enhancements.\n- Diverse improvements in navigation and performance.\n- Progress in navigation, `slam_toggle` client behaviors, and `slam_toolbox` components. Introducing `smacc2::deep_history` syntax.\n- Introducing `slam` pausing/resuming functionality in `sm_dance_bot`.\n- More changes in `sm_dance_bot`.\n\nChanged\n-------\n- Navigation parameters fixes on `sm_dance_bot`.\n- Minor formatting improvements.\n- Format fixes for gazebo to show the robot and lidar.\n\nFixed\n----\n- Removed some compile warnings.\n- Removed `neo_simulation2` package.\n- Corrected formatting.\n- Enabled source build on PR for testing.\n- Adjusted build packages of source CI.\n- Removed merge markers from a Python file.\n\nRemoved\n-------\n- Removed `neo_simulation2` package.\n\nContributors\n------------\n- Co-authored by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored by: pabloinigoblasco <pablo@ibrobotics.com>\n```\n\n```rst\nSection_16\n==========\n\nAdded\n-----\n- First working version of sm template and template generator. (#127)\n- Add SM core test (#138)\n- Add SM Atomic SM generator. (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Add QOS durability to SmaccPublisherClient (#163)\n- Waypoint Inputs (#178)\n- finetuning waypoints (#187)\n\nChanged\n-------\n- Move method after the method it calls to prevent recursion (#126)\n- Rename \"Finnaly\" to \"Finally\"\n- Update package list. (#142)\n- Update readme (#164)\n- Moved reference library SMs to smacc2_performance_tools (#166)\n- Move trigger logic into headers on SrConditional\n\nFixed\n-----\n- Fix CI: format fix python version (#148)\n- Fix compiling issues\n- Fix broken master build\n- Fix formatting on warehouse2 (#177)\n\nRemoved\n-------\n- Remove node creation and create only a logger. (#149)\n- Remove parameters smacc (#147)\n- Remove test from main moveit cmake\n- Remove sm_dance_bot_msgs\n- Remove parameters smacc\n\nOther\n-----\n- Minor tweaks (#130)\n- Minor navigation improvements (#141)\n- Minor format issues (#134)\n- Minor configuration\n- Minor changes (#175)\n- Minor format (#180)\n- Minor changes and headless on Feature/sm warehouse 2 13 dec 2 (#186)\n- Format Feature/cb pure spinning (#188)\n\nCollaborators\n-------------\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: DecDury <declandury@gmail.com>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n```\n\n```rst\nSection_17\n==========\n\nAdded\n-----\n- Feature/cb pure spinning (#189): Implemented pure spinning behavior with missing files.\n- Feature/planner changes 16 12 (#191): Introduced planner changes.\n- Feature/replanning 16 dec (#193): Added replanning for all examples and fixed several issues.\n- Feature/undo motion 20 12 (#196): Improved undo motion navigation in warehouse2.\n- Feature/sync 21 12 (#199): Fixed format issues.\n- Feature/warehouse2 22 12 (#200): Resolved format issues and completed warehouse2.\n- Feature/warehouse2 23 12 (#201): Tuned and fixed issues.\n- Feature/minor tune (#203): Tuned and fixed warehouse 3 problems, improving core functionality.\n- Feature/retry behavior warehouse 1 (#226): Backported changes to foxy with minor formatting fixes.\n\nChanged\n-------\n- Fix code generators (#221): Resolved build issues and updated SM template.\n- Foxy backport (#206): Fixed formatting, trailing spaces, codespell, and linter warnings. Added galactic CI build.\n- Update SM template and make example code clearly visible.\n- Update template to resolve the global data correctly.\n- Update sm_name.hpp.\n\nRemoved\n-------\n- Removed use of node in the sm performance template.\n- Disabled ament_cpplint, cpplint, cppcheck linters, and some packages.\n- Ignored further packages and disabled disabled packages.\n- Disable ament_lint_cmake.\n- Removed manual installation of ros-rolling-ros2trace, now automated in setupTracing.sh.\n\nFixed\n-----\n- Fixed docker files for foxy and galactic.\n- Fixed broken build, linking errors in foxy, and some reordering issues.\n- Fixed docker for different revisions, warnings removal, and navigation testing.\n- Fixed warehouse 3 problems, deadlocks, and continuous integration issues.\n- Fixed formatting of python files and corrected codespell.\n- Fixed formatters and corrected python linters warnings.\n- Fixed extension of imports and corrected formatting.\n- Fixed branching example and updated ci-build-source.yml.\n\nCo-authored-by\n--------------\n- Denis Štogl <denis@stogl.de>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Declan Dury <44791484+DecDury@users.noreply.github.com>\n- DecDury <declandury@gmail.com>\n- reelrbtx <brett2@reelrobotics.com>\n- brettpac <brett@robosoft.ai>\n- David Revay <MrBlenny@users.noreply.github.com>\n- pabloinigoblasco <pabloinigoblasco@ibrobotics.com>\n```\n\n```rst\nSection_18\n==========\n\nAdded\n-----\n\n- Created alternative ManualTracing.\n- Added new sm markdowns.\n- Added a dockerfile for Rolling and Galactic.\n- Added README tutorial for Dockerfile.\n- Added smacc2_performance_tools.\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success.\n- Added new client behavior add for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive. You optionally can select the nodes to wait.\n\nChanged\n-------\n\n- Changed wording \"smacc application\" to \"SMACC2 library\".\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed tracing events after.\n- Renamed folders, deleted tracing.md, edited README.md.\n- Renamed event generator library.\n- Optimized dependencies in move_base_z_planners_common.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n- Corrected trailing spaces.\n- Cleaned up sm_atomic_24hr.\n- Reformatted sm_reference_library.\n- Minor formatting improvements.\n- Corrected all linters and formatters.\n\nFixed\n-----\n\n- Bug in smacc2 component.\n- Reverted markdowns to html.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n- Fixed source CI and corrected README overview.\n- Attempted precommit fixes.\n\nRemoved\n-------\n\n- Removed galactic builds from master and kept only rolling. Removed submodules and used .repos file.\n\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\nCo-authored-by: Denis Štogl <denis@stogl.de>\n```\n\n```rst\nSection_19\n==========\n\nAdded\n-----\n- New feature: `cb_wait_topic_message`: asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for `nav2`: wait for `nav2` nodes subscribing to the `/bond` topic and wait for them to be alive. Optionally select the nodes to wait.\n\nChanged\n-------\n- Minor format improvements.\n- Progress in AWS navigation demo.\n- Navigation parameters fixes on `sm_dance_bot`.\n- `cb_pause_slam` client behavior added.\n- `sm_dance_bot_lite` visualizing TurtleBot3.\n- Cleaning and lidar show/hide option.\n- Gazebo fixes to show the robot and lidar.\n- `sm_multi_stage_1` doubling.\n- Gazebo fixes for `sm_dance_bot_strikes_back`.\n- Got `sm_multi_stage_1` working (barely).\n- Gaining traction with `sm_multi_stage_1`.\n\nFixed\n----\n- Remove some compile warnings.\n- Correct formatting.\n- Enable source build on PR for testing.\n- Adjust build packages of source CI.\n\nRemoved\n-------\n- Removed `neo_simulation2` package.\n\nOther\n-----\n- Merge and progress.\n- Precommit cleanup run.\n- Updates `yaml`.\n- Several core improvements during navigation testing.\n- Keep hammering on multiple stages.\n```\n\nSection_20\n==========\n\nAdded\n-----\n\n- Diverse improvements in navigation and performance (#116)\n- Additional linting and formatting\n- Progress in navigation, slam toggle client behaviors, and slam_toolbox components\n- Introducing slam pausing/resuming functionality in testing sm_dance_bot\n- First working version of sm template and template generator (#127)\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs\n- Rolling Docker environment to be executed from any environment (#154)\n- Initial migration to smacc2 in moveit client\n- Added QOS durability to SmaccPublisherClient\n- Moved reference library SMs to smacc2_performance_tools\n- Added reliability qos config to SmaccPublisherClient\n- Progress on aws navigation and some other refactorings on navigation clients and behaviors\n- More on aws demo\n- Waypoint Inputs (#178)\n\nChanged\n-------\n\n- Move method after the method it calls to prevent recursion (#126)\n- Noticed typo \"Finnaly\" corrected to \"Finally\"\n- Resolved compile warnings (#137)\n- Fixed launch command in README.md for sm_dance_bot_strikes_back\n- Fix CI: format fix python version (#148)\n- Removed node creation and create only a logger (#149)\n- Minor navigation improvements (#141)\n- Using local action messages instead of sm_dance_bot_msgs\n- Navigation 2 stack renaming\n- Update package list (#142)\n- Removing parameters smacc\n- Noticed launch command was incorrect in README.md\n- Update readme (#164)\n- Moved reference library SMs to smacc2_performance_tools\n- Pre-commit cleanup\n- Fixing broken master build\n- Progress on moveit migration testing\n- Minor configuration changes\n- Fixing pipeline error\n- Fixing compiling issues\n- Format (#180)\n\nFixed\n-----\n\n- Minor format issues (#134)\n- Minor tweaks (#130)\n- Minor format in feature/more_sm_dance_bot_fixes\n- Minor format in feature/dance bot s pattern\n- Minor in feature/sm dance bot refine\n- Minor in feature/sm dance bot refine 2\n- Build fix\n- Minor in sm_dance_bot_lite\n- Minor in sm_pubsub_1\n- Minor in sm_pubsub_1 part 2\n- Minor in sm_advanced_recovery_1 renaming\n- Minor in sm_multi_stage_1 reworking\n- Minor changes (#175)\n\nRemoved\n-------\n\n- Remove merge markers from a python file (#119)\n- Removing sm_dance_bot_msgs\n- Removing test from main moveit cmake\n- Removing parameters smacc\n- Removing parameters smacc\n- Workflows update\n- Workflow\n- Repos dependency\n- Adding dependency to ur5 client\n- Docker refactoring\n- Removing test from main moveit cmake\n- Minor dockerfile test workaround\n- Improving dockerfile for building local tests\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing parameters smacc\n- Removing\n\n```rst\nSection_21\n==========\n\nAdded\n-----\n\n- **Feature/sm warehouse 2 13 dec 2 (#182)**\n  - Implemented warehouse 2 features on December 13th.\n  - Added default values.\n  - Co-authored by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>.\n\n- **Feature/Brettpac branch (#184)**\n  - Introduced Brett's branch with improvements.\n  - Co-authored by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>.\n\n- **Feature/finetuning waypoints (#187)**\n  - Refined waypoints for better navigation.\n  - Co-authored by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>.\n\n- **Feature/cb pure spinning (#188)**\n  - Added pure spinning behavior enhancements.\n\n- **Feature/planner changes 16 12 (#191)**\n  - Implemented minor planner adjustments.\n\n- **Feature/replanning 16 dec (#193)**\n  - Enhanced replanning functionality for all examples.\n\n- **Feature/undo motion 20 12 (#196)**\n  - Improved undo motion navigation for warehouse 2.\n\n- **Feature/sync 21 12 (#199)**\n  - Addressed format issues for better synchronization.\n\n- **Feature/warehouse2 22 12 (#200)**\n  - Resolved format issues and finalized warehouse 2.\n\n- **Feature/warehouse2 23 12 (#201)**\n  - Tuned and fixed warehouse 2 components.\n\n- **Feature/minor tune (#203)**\n  - Fine-tuned minor aspects for better performance.\n\n- **Feature/fixing warehouse 3 problems (#204)**\n  - Resolved issues in warehouse 3 to enhance core functionality.\n  - Co-authored by multiple contributors.\n\n- **Feature/barrel demo**\n  - Introduced barrel demo features.\n\n- **Feature/progress in barrel husky**\n  - Made progress in husky demo development.\n\n- **Feature/progress in husky demo**\n  - Continued improvements in husky demo navigation.\n\n- **Feature/improvements warehouse3 (#228)**\n  - Implemented enhancements for warehouse 3.\n  - Backported to foxy for compatibility.\n\n- **Feature/Foxy backport (#206)**\n  - Backported changes to Foxy release.\n  - Addressed formatting issues and trailing spaces.\n  - Corrected codespell and Python linters warnings.\n  - Added Galactic CI build due to Navigation2 issues.\n  - Made necessary adjustments for CI workflows.\n  - Updated dependencies and licenses.\n\nChanged\n-------\n\n- **Feature/undo motion 20 12 (#198)**\n  - Improved undo motion navigation for warehouse 2.\n  - Tuned undo behavior and fixed errors.\n\n- **Feature/warehouse2 23 12 (#201)**\n  - Tuned and fixed warehouse 2 components.\n\n- **Feature/minor tune (#203)**\n  - Fine-tuned minor aspects for better performance.\n\nRemoved\n-------\n\n- **Feature/undo motion 20 12 (#196)**\n  - Removed duplicate entry.\n\n- **Feature/sync 21 12 (#199)**\n  - Removed duplicate entry.\n\n- **Feature/warehouse2 22 12 (#200)**\n  - Removed duplicate entry.\n\n- **Feature/cb pure spinning (#189)**\n  - Removed duplicate entry.\n\n- **Feature/sm warehouse 2 13 dec 2 (#186)**\n  - Removed duplicate entry.\n\n- **Feature/sm warehouse 2 13 dec 2 (#185)**\n  - Removed duplicate entry.\n\n- **Feature/sm warehouse 2 13 dec 2 (#182)**\n  - Removed duplicate entry.\n\n- **Feature/wharehouse2 dec 14 (#185)**\n  - Removed duplicate entry.\n\nFixed\n-----\n\n- **Feature/undo motion 20 12 (#196)**\n  - Fixed undo motion navigation issues.\n\n- **Feature/warehouse2 23 12 (#201)**\n  - Fixed tuning and other minor issues.\n\n- **Feature/minor tune (#203)**\n  - Fixed minor tune adjustments.\n\n- **Feature/Foxy backport (#206)**\n  - Fixed broken source build.\n  - Corrected formatting and minor issues.\n\n- **Feature/improvements warehouse3 (#228)**\n  - Fixed minor format and linking errors for Foxy.\n\n- **Feature/fixing warehouse 3 problems (#204)**\n  - Fixed warehouse 3 problems and core improvements.\n  - Addressed deadlocks and CI integration issues.\n\nRemoved\n-------\n\n- **Feature/undo motion 20 12 (#196)**\n  - Removed duplicate entry.\n\n- **Feature/sync 21 12 (#199)**\n  - Removed duplicate entry.\n\n- **Feature/warehouse2 22 12 (#200)**\n  - Removed duplicate entry.\n\n- **Feature/cb pure spinning (#189)**\n  - Removed duplicate entry.\n\n- **Feature/sm warehouse 2 13 dec 2 (#186)**\n  - Removed duplicate entry.\n\n- **Feature/sm warehouse 2 13 dec 2 (#185)**\n  - Removed duplicate entry.\n\n- **Feature/sm warehouse 2 13 dec 2 (#182)**\n  - Removed duplicate entry.\n\n- **Feature/wharehouse2 dec 14 (#185)**\n  - Removed duplicate entry.\n```\n\nSection_22\n==========\n\nAdded\n-----\n- Renamed header files and corrected format.\n- Added workflow for checking doc build.\n- Updated doxygen-check-build.yml.\n- Created doxygen-deploy.yml.\n- Created workflow for testing prerelease builds.\n- Created setupTracing.sh to install necessary packages and configure tracing group.\n- Created alternative ManualTracing.\n- Added new sm markdowns.\n- Added a dockerfile for Rolling and Galactic.\n- Added smacc2_performance_tools.\n- Performance tests improvements.\n- Optimized dependencies in move_base_z_planners_common.\n- Renamed event generator library.\n- Added galactic CI setup and renamed rolling files (#58).\n- Fixed source CI and corrected README overview (#62).\n- Updated c_cpp_properties.json.\n- Updated launch command to `ros2 launch sm_respira_1 sm_respira_1.launch` (#69).\n- Updated doxygen links (#70).\n- More Readme Updates (#72).\n- More Readme (#74).\n- Created new sm from sm_respira_1 (#76).\n- Feature/core and navigation fixes (#78).\n- Feature/aws demo progress (#80).\n- More on navigation.\n- Sm_advanced_recovery_1 reworked (#83).\n- More sm_advanced_recovery_1 work (#85).\n- Sm_atomic_performance_test_c_1 (#88).\n- Sm_multi_stage_1 (#90).\n- Wait topic message client behavior (#81).\n\nChanged\n-------\n- Renamed to smacc2 and smacc2_msgs.\n- Updated name of package and package.xml to pass liter.\n- Changed wording \"smacc application\" to \"SMACC2 library\".\n- Reactivated smacc2 nav clients for rolling via submodules.\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Minor formatting changes.\n\nFixed\n-----\n- Bug in smacc2 component.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n- Corrected trailing spaces.\n- Fixed pre-commit issues.\n- Fixed several core improvements during navigation testing.\n\nRemoved\n-------\n- Ignored all packages except smacc2 and smacc2_msgs.\n- Removed manual installation of ros-rolling-ros2trace (now automated in setupTracing.sh).\n- Removed galactic builds from master and kept only rolling.\n- Removed submodules and use .repos file.\n\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n\n```rst\nSection_23\n==========\n\nAdded\n-----\n- New feature: `cb_wait_topic_message`: asynchronous client behavior that waits for a topic message and optionally checks its contents for success\n- New client behavior for nav2: `wait nav2 nodes subscribing to the /bond topic and waiting they are alive`, with optional node selection\n- New client behavior: `cb pause slam` for pausing SLAM operations\n- New client behavior: `sm_dance_bot_lite` for lite dance bot operations\n- New client behavior: `sm_dance_bot visualizing turtlebot3` for visualizing Turtlebot3 in dance bot operations\n- New client behavior: `sm_multi_stage_1 doubling` for multi-stage operations\n\nChanged\n-------\n- Minor format improvements\n- Navigation parameters fixes on `sm_dance_bot`\n- Gazebo fixes to show the robot and the lidar\n- Cleaning and lidar show/hide option for dance bot operations\n- Updates in YAML files\n- Hotfix for minor issues\n\nFixed\n----\n- Corrected all linters and formatters\n- Removed some compile warnings\n\nRemoved\n-------\n- None\n\nCommits\n-------\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n\nContributors\n------------\n- Brett <brett@robosoft.ai>\n- Denis Štogl <destogl@users.noreply.github.com>\n```\n\n*pabloinigoblasco*\n\nSection_24\n===========\n\nAdded\n-----\n- Added AWS demo (#108).\n- Added Brettpac branch (#110).\n- Added a3 (#113).\n- Added diverse improvements navigation and performance (#116).\n- Added Feature/diverse improvements navigation performance (#117).\n- Added Feature/slam toggle and smacc deep history (#122).\n- Added Feature/dance bot s pattern (#128).\n- Added Feature/dance bot s pattern (#129).\n- Added Feature/sm dance bot refine (#131).\n- Added Feature/sm dance bot refine 2 (#132).\n- Added waypoints navigator bug (#133).\n- Added Resolve compile warnings (#137).\n- Added Add SM core test (#138).\n- Added minor navigation improvements (#141).\n- Added Feature/nav2z renaming (#144).\n- Added Update package list (#142).\n- Added Add SM Atomic SM generator (#143).\n- Added Rolling Docker environment to be executed from any environment (#154).\n- Added slight waypoint 4 and iterations changes so robot can complete course (#155).\n- Added Feature/migration moveit client (#151).\n- Added initial state machine transition timestamp (#165).\n- Added Feature/testing moveit behaviors (#167).\n\nChanged\n-------\n- Changed progress in navigation, slam toggle client behaviors and slam_toolbox components. Also smacc2::deep_history syntax (#122).\n- Changed progress in the sm_dance_bot tests (#135).\n- Changed progress on moveit migration testing (#151).\n- Changed moved reference library SMs to smacc2_performance_tools (#166).\n- Changed feat: add qos durability to SmaccPublisherClient (#163).\n\nFixed\n-----\n- Fixed gazebo fixes to show the robot and the lidar.\n- Fixed format issues.\n- Fixed minor format issues (#134).\n- Fixed minor tuning to mitigate overshot issue cases.\n- Fixed some more linting warnings.\n- Fixed launch command for sm_dance_bot_strikes_back and removed some comments in README.md.\n- Fixed CI: format fix python version (#148).\n- Fixed missing dependency.\n- Fixed compiling issues.\n\nRemoved\n-------\n- Removed neo_simulation2 package (#112).\n- Removed node creation and create only a logger (#149).\n- Removed parameters smacc (#147).\n- Removed test from main moveit cmake.\n- Removed sm_dance_bot_msgs.\n- Removed merge markers from a python file (#119).\n\nCollaborators\n-------------\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai> (multiple entries).\n- Co-authored-by: pabloinigoblasco <pablo@ibrobotics.com>.\n- Co-authored-by: DecDury <declandury@gmail.com>.\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>.\n\n```rst\nSection_25\n==========\n\nAdded\n-----\n\n- Added sm_pubsub_1 part 2 (#170)\n- Added sm_advanced_recovery_1 renaming (#171)\n- Added sm_multi_stage_1 reworking (#172)\n- Added Feature/aws navigation sm dance bot (#174)\n- Added minor changes (#175)\n- Added warehouse2 (#177)\n- Added Waypoint Inputs (#178)\n- Added wharehouse2 progress (#179)\n- Added format (#180)\n- Added sm_dance_bot_warehouse_3 (#181)\n- Added Feature/sm warehouse 2 13 dec 2 (#182)\n- Added finetuning waypoints (#187)\n- Added Feature/cb pure spinning (#188)\n- Added pure spinning behavior missing files\n- Added minor changes (#190)\n- Added Feature/planner changes 16 12 (#191)\n- Added Feature/replanning 16 dec (#193)\n- Added several fixes (#194)\n- Added Feature/undo motion 20 12 (#196)\n- Added tuning warehouse3 (#197)\n- Added Feature/sync 21 12 (#199)\n- Added Feature/warehouse2 22 12 (#200)\n- Added Feature/warehouse2 23 12 (#201)\n- Added Feature/minor tune (#203)\n- Added fixing warehouse 3 problems, and other core improvements (#204)\n- Added added missing file from warehouse2 (#205)\n- Added missing sm\n- Added updating subscriber publisher components\n- Added progress in autoware machine\n- Added refining cp subscriber cp publisher\n- Added improvements in smacc core adding more components mostly developed for autoware demo\n- Added autoware demo\n- Added foxy ci\n- Added fix\n- Added some reordering fixes\n- Added docker files for different revisions, warnings removal and more testing on navigation\n- Added fixing docker for foxy and galactic\n- Added docker build files for all versions\n- Added barrel demo\n- Added barrel search build fix and warehouse3\n- Added fixing startup problems in warehouse 3\n- Added fixing format and minor\n- Added progress in barrel husky\n- Added barrel demo\n- Added progress\n- Added fixing broken build\n- Added more merge\n- Added docker improvements\n- Added master rolling to galactic backport\n- Added fixing build\n- Added testing dance bot demos\n- Added updating galactic repos\n- Added runtime dependency\n- Added restoring ur dependency\n\nChanged\n-------\n\n- Changed multistage modes\n- Changed sm_multi_stage sequences\n- Changed sm_multi_state_1 steps\n- Changed sm_multi_stage_1 sequence d\n- Changed sm_multi_stage_1 c sequence\n- Changed mode_5_sequence_b\n- Changed mode_4_sequence_b\n- Changed sm_multi_stage_1 most\n- Changed finishing touches 1\n- Changed readme\n- Changed progress on aws navigation and some other refactorings on navigation clients and behaviors\n- Changed more on aws demo\n- Changed fixing broken build\n- Changed headless and other fixes\n- Changed default values\n- Changed minor tune\n- Changed improving undo motion navigation warehouse2\n- Changed tuning and fixes\n\nRemoved\n-------\n\n- Removed weird moveit not downloaded repo\n- Removed minor broken build\n- Removed minor linking errors foxy\n```\n\nSection_26\n===========\n\nVersion 1.2.0 (2023-01-15)\n---------------------------\n\n### Added\n- New feature for enhanced user authentication.\n- Support for custom themes in the UI.\n\n### Changed\n- Improved performance in data processing algorithms.\n- Updated third-party libraries to latest versions.\n\n### Fixed\n- Resolved issue causing crashes on certain devices.\n- Fixed incorrect display of timestamps in logs.\n\n### Removed\n- Deprecated legacy API endpoints.\n\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Declan Dury <44791484+DecDury@users.noreply.github.com>\nCo-authored-by: David Revay <MrBlenny@users.noreply.github.com>\nCo-authored-by: pabloinigoblasco <pabloinigoblasco@ibrobotics.com>\n* Contributors: Denis Štogl, Pablo Iñigo Blasco\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/backward_global_planner/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(backward_global_planner)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\n\nfind_package(nav2_core)\nfind_package(nav_msgs)\nfind_package(nav2_costmap_2d)\nfind_package(geometry_msgs)\nfind_package(tf2)\nfind_package(pluginlib)\nfind_package(forward_global_planner)\nfind_package(angles)\nfind_package(nav_2d_utils)\n\nset(dependencies\n  nav2_core\n  nav_msgs\n  nav2_costmap_2d\n  geometry_msgs\n  visualization_msgs\n  tf2\n  pluginlib\n  forward_global_planner\n  angles\n  nav_2d_utils\n)\n\ninclude_directories(include)\n\nadd_library(${PROJECT_NAME} SHARED\n  src/${PROJECT_NAME}/backward_global_planner.cpp\n)\n\ntarget_compile_definitions(${PROJECT_NAME} PUBLIC \"PLUGINLIB__DISABLE_BOOST_FUNCTIONS\")\npluginlib_export_plugin_description_file(nav2_core bgp_plugin.xml)\n\nament_target_dependencies(${PROJECT_NAME}\n  ${dependencies})\n\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\nament_export_dependencies(${dependencies})\n\ninstall(TARGETS ${PROJECT_NAME}\n  ARCHIVE DESTINATION lib\n  LIBRARY DESTINATION lib\n  RUNTIME DESTINATION bin\n)\n\ninstall(DIRECTORY include/\n  DESTINATION include/\n)\n\ninstall(FILES\n  bgp_plugin.xml\n  DESTINATION share\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/backward_global_planner/bgp_plugin.xml",
    "content": "<library path=\"backward_global_planner\">\n  <class name=\"backward_global_planner::BackwardGlobalPlanner\" type=\"cl_nav2z::backward_global_planner::BackwardGlobalPlanner\" base_class_type=\"nav2_core::GlobalPlanner\">\n    <description>\n    </description>\n  </class>\n</library>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/backward_global_planner/include/backward_global_planner/backward_global_planner.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <functional>\n\n#include <nav2_core/global_planner.hpp>\n#include <nav_msgs/msg/path.hpp>\n#include <rclcpp/rclcpp.hpp>\n#include <visualization_msgs/msg/marker_array.hpp>\n\nnamespace cl_nav2z\n{\nnamespace backward_global_planner\n{\nclass BackwardGlobalPlanner : public nav2_core::GlobalPlanner\n{\npublic:\n  BackwardGlobalPlanner();\n\n  /**\n   * @brief Virtual destructor\n   */\n  virtual ~BackwardGlobalPlanner();\n\n  /**\n   * @param  parent pointer to user's node\n   * @param  name The name of this planner\n   * @param  tf A pointer to a TF buffer\n   * @param  costmap_ros A pointer to the costmap\n   */\n  virtual void configure(\n    const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name,\n    std::shared_ptr<tf2_ros::Buffer> tf,\n    std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros);\n\n  /**\n   * @brief Method to cleanup resources used on shutdown.\n   */\n  virtual void cleanup();\n\n  /**\n   * @brief Method to active planner and any threads involved in execution.\n   */\n  virtual void activate();\n\n  /**\n   * @brief Method to deactivate planner and any threads involved in execution.\n   */\n  virtual void deactivate();\n\n  /**\n   * @brief Method create the plan from a starting and ending goal.\n   * @param start The starting pose of the robot\n   * @param goal  The goal pose of the robot\n   * @param cancel_checker Function to check if planning should be cancelled\n   * @return      The sequence of poses to get from start to goal, if any\n   */\n  virtual nav_msgs::msg::Path createPlan(\n    const geometry_msgs::msg::PoseStamped & start, const geometry_msgs::msg::PoseStamped & goal,\n    std::function<bool()> cancel_checker) override;\n\nprivate:\n  // rclcpp::Node::SharedPtr nh_;\n  rclcpp_lifecycle::LifecycleNode::SharedPtr nh_;\n\n  std::shared_ptr<rclcpp_lifecycle::LifecyclePublisher<nav_msgs::msg::Path>> planPub_;\n\n  std::shared_ptr<rclcpp_lifecycle::LifecyclePublisher<visualization_msgs::msg::MarkerArray>>\n    markersPub_;\n\n  std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros_;\n\n  void onForwardTrailMsg(const nav_msgs::msg::Path::ConstSharedPtr & trailMessage);\n\n  void publishGoalMarker(const geometry_msgs::msg::Pose & pose, double r, double g, double b);\n  void cleanMarkers();\n\n  double skip_straight_motion_distance_;  //meters\n\n  double puresSpinningRadStep_;  // rads\n\n  std::string name_;\n\n  std::shared_ptr<tf2_ros::Buffer> tf_;\n\n  double transform_tolerance_;\n\n  void createDefaultBackwardPath(\n    const geometry_msgs::msg::PoseStamped & start, const geometry_msgs::msg::PoseStamped & goal,\n    std::vector<geometry_msgs::msg::PoseStamped> & plan);\n};\n}  // namespace backward_global_planner\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/backward_global_planner/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>backward_global_planner</name>\n  <version>2.3.19</version>\n  <description>The backward_global_planner package.</description>\n\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <author email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</author>\n\n  <license>BSDv3</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>angles</depend>\n  <depend>geometry_msgs</depend>\n  <depend>nav2_core</depend>\n  <depend>nav_msgs</depend>\n  <depend>tf2</depend>\n  <depend>nav2_costmap_2d</depend>\n  <depend>forward_global_planner</depend>\n  <depend>visualization_msgs</depend>\n  <depend>nav_2d_utils</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/backward_global_planner/src/backward_global_planner/backward_global_planner.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <backward_global_planner/backward_global_planner.hpp>\n#include <nav2z_planners_common/common.hpp>\n\n#include <angles/angles.h>\n#include <tf2/transform_datatypes.h>\n#include <nav2z_planners_common/nav2z_client_tools.hpp>\n#include <nav_msgs/msg/path.hpp>\n#include <visualization_msgs/msg/marker_array.hpp>\n\n#include <tf2/utils.h>\n#include <boost/assign.hpp>\n#include <boost/range/adaptor/reversed.hpp>\n#include <boost/range/algorithm/copy.hpp>\n#include <fstream>\n#include <nav_2d_utils/tf_help.hpp>\n#include <pluginlib/class_list_macros.hpp>\n#include <streambuf>\n\nusing namespace std::chrono_literals;\nnamespace cl_nav2z\n{\nnamespace backward_global_planner\n{\n/**\n******************************************************************************************************************\n* Constructor()\n******************************************************************************************************************\n*/\nBackwardGlobalPlanner::BackwardGlobalPlanner()\n{\n  skip_straight_motion_distance_ = 0.2;\n  puresSpinningRadStep_ = 1000;  // rads\n}\n\nBackwardGlobalPlanner::~BackwardGlobalPlanner() {}\n\n/**\n******************************************************************************************************************\n* initialize()\n******************************************************************************************************************\n*/\nvoid BackwardGlobalPlanner::configure(\n  const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name,\n  std::shared_ptr<tf2_ros::Buffer> tf, std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros)\n{\n  this->nh_ = parent.lock();\n  name_ = name;\n  tf_ = tf;\n  transform_tolerance_ = 0.1;\n\n  // RCLCPP_INFO_NAMED(nh_->get_logger(), \"Backwards\", \"BackwardGlobalPlanner initialize\");\n  costmap_ros_ = costmap_ros;\n  // RCLCPP_WARN_NAMED(nh_->get_logger(), \"Backwards\", \"initializating global planner, costmap address: %ld\",\n  // (long)costmap_ros);\n\n  planPub_ = nh_->create_publisher<nav_msgs::msg::Path>(\"backward_planner/global_plan\", 1);\n  markersPub_ =\n    nh_->create_publisher<visualization_msgs::msg::MarkerArray>(\"backward_planner/markers\", 1);\n\n  declareOrSet(nh_, name_ + \".transform_tolerance\", transform_tolerance_);\n}\n\n/**\n******************************************************************************************************************\n* cleanup()\n******************************************************************************************************************\n*/\nvoid BackwardGlobalPlanner::cleanup() { this->cleanMarkers(); }\n\n/**\n******************************************************************************************************************\n* activate()\n******************************************************************************************************************\n*/\nvoid BackwardGlobalPlanner::activate()\n{\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[BackwardGlobalPlanner] activating planner\");\n  planPub_->on_activate();\n  markersPub_->on_activate();\n}\n\n/**\n******************************************************************************************************************\n* deactivate()\n******************************************************************************************************************\n*/\nvoid BackwardGlobalPlanner::deactivate()\n{\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[BackwardGlobalPlanner] deactivating planner\");\n\n  // clear\n  nav_msgs::msg::Path planMsg;\n  planMsg.header.stamp = nh_->now();\n  planPub_->publish(planMsg);\n\n  planPub_->on_deactivate();\n  this->cleanMarkers();\n  markersPub_->on_deactivate();\n}\n\n/**\n******************************************************************************************************************\n* publishGoalMarker()\n******************************************************************************************************************\n*/\nvoid BackwardGlobalPlanner::publishGoalMarker(\n  const geometry_msgs::msg::Pose & pose, double r, double g, double b)\n{\n  double phi = tf2::getYaw(pose.orientation);\n  visualization_msgs::msg::Marker marker;\n  marker.header.frame_id = this->costmap_ros_->getGlobalFrameID();\n  marker.header.stamp = nh_->now();\n  marker.ns = \"my_namespace2\";\n  marker.id = 0;\n  marker.type = visualization_msgs::msg::Marker::ARROW;\n  marker.action = visualization_msgs::msg::Marker::ADD;\n  marker.lifetime = rclcpp::Duration(0s);\n  marker.scale.x = 0.1;\n  marker.scale.y = 0.3;\n  marker.scale.z = 0.1;\n  marker.color.a = 1.0;\n  marker.color.r = r;\n  marker.color.g = g;\n  marker.color.b = b;\n\n  geometry_msgs::msg::Point start, end;\n  start.x = pose.position.x;\n  start.y = pose.position.y;\n\n  end.x = pose.position.x + 0.5 * cos(phi);\n  end.y = pose.position.y + 0.5 * sin(phi);\n\n  marker.points.push_back(start);\n  marker.points.push_back(end);\n\n  visualization_msgs::msg::MarkerArray ma;\n  ma.markers.push_back(marker);\n\n  markersPub_->publish(ma);\n}\n\nvoid BackwardGlobalPlanner::cleanMarkers()\n{\n  visualization_msgs::msg::Marker marker;\n  marker.header.frame_id = this->costmap_ros_->getGlobalFrameID();\n  marker.header.stamp = nh_->now();\n  marker.ns = \"my_namespace2\";\n  marker.id = 0;\n  marker.action = visualization_msgs::msg::Marker::DELETEALL;\n\n  visualization_msgs::msg::MarkerArray ma;\n  ma.markers.push_back(marker);\n\n  markersPub_->publish(ma);\n}\n\n/**\n******************************************************************************************************************\n* defaultBackwardPath()\n******************************************************************************************************************\n*/\nvoid BackwardGlobalPlanner::createDefaultBackwardPath(\n  const geometry_msgs::msg::PoseStamped & start, const geometry_msgs::msg::PoseStamped & goal,\n  std::vector<geometry_msgs::msg::PoseStamped> & plan)\n{\n  auto q = start.pose.orientation;\n\n  geometry_msgs::msg::PoseStamped pose;\n  pose = start;\n\n  double dx = start.pose.position.x - goal.pose.position.x;\n  double dy = start.pose.position.y - goal.pose.position.y;\n\n  double length = sqrt(dx * dx + dy * dy);\n\n  geometry_msgs::msg::PoseStamped prevState;\n  if (length > skip_straight_motion_distance_)\n  {\n    // skip initial pure spinning and initial straight motion\n    RCLCPP_INFO(\n      nh_->get_logger(), \"1 - heading to goal position pure spinning radstep: %lf\",\n      puresSpinningRadStep_);\n    double heading_direction = atan2(dy, dx);\n    double startyaw = tf2::getYaw(q);\n    double offset = angles::shortest_angular_distance(startyaw, heading_direction);\n    heading_direction = startyaw + offset;\n\n    prevState =\n      cl_nav2z::makePureSpinningSubPlan(start, heading_direction, plan, puresSpinningRadStep_);\n    RCLCPP_INFO(nh_->get_logger(), \"2 - going forward keep orientation pure straight\");\n\n    prevState = cl_nav2z::makePureStraightSubPlan(prevState, goal.pose.position, length, plan);\n  }\n  else\n  {\n    prevState = start;\n  }\n\n  RCLCPP_WARN_STREAM(\n    nh_->get_logger(), \"[BackwardGlobalPlanner] backward global plan size:  \" << plan.size());\n}\n\n/**\n******************************************************************************************************************\n* makePlan()\n******************************************************************************************************************\n*/\nnav_msgs::msg::Path BackwardGlobalPlanner::createPlan(\n  const geometry_msgs::msg::PoseStamped & start, const geometry_msgs::msg::PoseStamped & goal,\n  std::function<bool()> /*cancel_checker*/)\n{\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[BackwardGlobalPlanner] goal frame id: \"\n                         << goal.header.frame_id << \" pose: \" << goal.pose.position);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[BackwardGlobalPlanner] goal pose frame id: \" << goal.header.frame_id);\n\n  rclcpp::Duration ttol = rclcpp::Duration::from_seconds(transform_tolerance_);\n  //---------------------------------------------------------------------\n  geometry_msgs::msg::PoseStamped transformedStart;\n  nav_2d_utils::transformPose(tf_, costmap_ros_->getGlobalFrameID(), start, transformedStart, ttol);\n  transformedStart.header.frame_id = costmap_ros_->getGlobalFrameID();\n  //---------------------------------------------------------------------\n  geometry_msgs::msg::PoseStamped transformedGoal;\n  nav_2d_utils::transformPose(tf_, costmap_ros_->getGlobalFrameID(), goal, transformedGoal, ttol);\n  transformedGoal.header.frame_id = costmap_ros_->getGlobalFrameID();\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[BackwardGlobalPlanner] creating default backward global plan\");\n  //---------------------------------------------------------------------\n  std::vector<geometry_msgs::msg::PoseStamped> plan;\n  this->createDefaultBackwardPath(transformedStart, transformedGoal, plan);\n\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[BackwardGlobalPlanner] publishing markers\");\n  publishGoalMarker(transformedGoal.pose, 1.0, 0, 1.0);\n\n  nav_msgs::msg::Path planMsg;\n  planMsg.poses = plan;\n  planMsg.header.stamp = this->nh_->now();\n  planMsg.header.frame_id = this->costmap_ros_->getGlobalFrameID();\n\n  //---------------------------------------------------------------------\n  // check plan rejection if obstacle is found\n  bool acceptedGlobalPlan = true;\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[BackwardGlobalPlanner] checking backwards trajectory on costmap\");\n  auto costmap2d = this->costmap_ros_->getCostmap();\n  for (auto & p : plan)\n  {\n    unsigned int mx, my;\n    costmap2d->worldToMap(p.pose.position.x, p.pose.position.y, mx, my);\n    auto cost = costmap2d->getCost(mx, my);\n\n    // static const unsigned char NO_INFORMATION = 255;\n    // static const unsigned char LETHAL_OBSTACLE = 254;\n    // static const unsigned char INSCRIBED_INFLATED_OBSTACLE = 253;\n    // static const unsigned char FREE_SPACE = 0;\n    if (cost >= nav2_costmap_2d::INSCRIBED_INFLATED_OBSTACLE)\n    {\n      RCLCPP_WARN_STREAM(\n        nh_->get_logger(),\n        \"[BackwardGlobalPlanner] backwards plan is rejected because interscts the obstacle \"\n        \"inscribed inflated obstacle\"\n          << \" at: \" << p.pose.position.x << \" \" << p.pose.position.y);\n\n      break;\n    }\n  }\n\n  if (!acceptedGlobalPlan)\n  {\n    RCLCPP_WARN_STREAM(\n      nh_->get_logger(),\n      \"[BackwardGlobalPlanner] backward plan request is not accepted, returning \"\n      \"empty path\");\n    planMsg.poses.clear();\n  }\n\n  RCLCPP_WARN_STREAM(\n    nh_->get_logger(), \"[BackwardGlobalPlanner] backward global plan publishing path. poses count: \"\n                         << planMsg.poses.size());\n  planPub_->publish(planMsg);\n\n  return planMsg;\n}\n\n}  // namespace backward_global_planner\n}  // namespace cl_nav2z\n\n// register this planner as a BaseGlobalPlanner plugin\nPLUGINLIB_EXPORT_CLASS(\n  cl_nav2z::backward_global_planner::BackwardGlobalPlanner, nav2_core::GlobalPlanner)\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/backward_local_planner/CHANGELOG.rst",
    "content": "# Changelog for package backward_local_planner\n\n## Version 2.3.16 (2023-07-16)\n- Merged branch 'humble' from [robosoft-ai/SMACC2](https://github.com/robosoft-ai/SMACC2) into humble\n- Brettpac branch:\n  - Attempted to fix weird issue with ros buildfarm\n  - More work on buildfarm issue\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n- Contributors: brettpac, pabloinigoblasco\n\n## Version 2.3.6 (2023-03-12)\n\n## Version 1.22.1 (2022-11-09)\n- Pre-release\n- Contributors: pabloinigoblasco\n\n## Version 0.3.0 (2022-04-04)\n\n## Version 0.0.0 (2022-11-09)\n- Humble check and progress in migration to humble\n- Reverted \"Ignore packages which should not be released.\"\n- Updated mentions of SMACC/ROS to SMACC2/ROS2\n- Performance tests improvements\n- Format cleanup in various packages\n- Optimized dependencies in move_base_z_planners_common\n- Renamed event generator library\n- Added new features and improvements for AWS navigation demo\n- Added new client behavior for waiting topic messages\n- Corrected linters and formatters\n- Co-authored by various contributors including brettpac and Denis Štogl\n\n```rst\nSection_2\n=========\n\nAdded\n-----\n\n- New feature: `cb_wait_topic_message`: asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for Nav2: `cb_wait_nav2_nodes`: waits for Nav2 nodes subscribing to the `/bond` topic and ensures they are alive.\n\nChanged\n-------\n\n- Improved core functionality during navigation testing.\n- Formatting enhancements throughout the codebase.\n- Progress made in AWS navigation demo.\n- Navigation parameters fixes on `sm_dance_bot`.\n- `cb_pause_slam` client behavior added.\n- `sm_dance_bot_lite` now visualizes TurtleBot3.\n- `sm_multi_stage_1` functionality enhanced.\n\nFixed\n-----\n\n- Removed some compile warnings.\n- Fixed formatting issues.\n- Gazebo fixes for various components.\n- `neo_simulation2` package removed.\n\nRemoved\n-------\n\n- `neo_simulation2` package removed.\n\nOther\n-----\n\n- Various minor updates and fixes.\n- Precommit cleanup run.\n- Workflow updates.\n- Collaborator contributions from Ubuntu 20-04-02-amd64 <brett@robosoft.ai>.\n```\n\nSection_3\n=========\n\nVersion 0.1.0 (2022-01-01)\n--------------------------\n\n### Added\n- Diverse improvements in navigation and performance (#116)\n- Additional linting and formatting\n- Feature to toggle slam and deep history in smacc (#122)\n- First working version of sm template and template generator (#127)\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Added SM Atomic SM generator (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Added QOS durability to SmaccPublisherClient (#163)\n- Initial state machine transition timestamp (#165)\n- Moved reference library SMs to smacc2_performance_tools\n- Feature to test moveit behaviors (#167)\n- Progress on AWS navigation and some other refactorings on navigation clients and behaviors\n- Waypoint Inputs (#178)\n\n### Changed\n- Move method after the method it calls to prevent recursion (#126)\n- Resolved compile warnings (#137)\n- Minor navigation improvements (#141)\n- Using local action messages\n- Renamed navigation 2 stack\n- Removed node creation and create only a logger (#149)\n- Minor changes in warehouse2 (#177)\n\n### Fixed\n- Minor format issues (#134)\n- Fixed launch command for sm_dance_bot_strikes_back in README.md\n- Fixed CI format for python version (#148)\n- Fixed broken master build\n- Fixed pipeline error\n\n### Removed\n- Removed merge markers from a python file (#119)\n- Removed parameters smacc\n- Removed test from main moveit cmake\n- Removed sm_dance_bot_msgs\n- Removed some comments in the past from README.md\n\nVersion 0.2.0 (2022-02-01)\n--------------------------\n\n### Added\n- Progress in navigation, slam toggle client behaviors, and slam_toolbox components (#122)\n- Introduced slam pausing/resuming functionality in sm_dance_bot\n- More refinement in sm_dance_bot\n- More progress on markers cleanup\n- Added remaining SVGs to READMEs\n- Added dependency to ur5 client\n- Added .reps dependencies and fixed some build errors\n- Added reliability qos config\n\n### Changed\n- Slight waypoint 4 and iterations changes so the robot can complete the course (#155)\n- Progressing in the moveit migration testing\n- Updated format\n- Updated readme\n\n### Fixed\n- Minor tuning to mitigate overshot issue cases\n- Fixed compiling issues\n\n### Removed\n- Removed some comments in the past from README.md\n\nVersion 0.3.0 (2022-03-01)\n--------------------------\n\n### Added\n- Progress on moveit\n- More testing on moveit behaviors\n- Progress on sm_pubsub_1\n- Progress on sm_pubsub_1 part 2\n- Progress on sm_advanced_recovery_1 renaming\n- Progress on sm_multi_stage_1 reworking\n- Progress on sm_multi_stage_1 most\n- Progress on sm_multi_stage_1 finishing touches 1\n- Progress on aws navigation and some other refactorings on navigation clients and behaviors\n- More on aws demo\n- Progress on warehouse2\n- Progress on sm_dance_bot_warehouse_3\n\n### Changed\n- Initial migration to smacc2\n- Fixed some errors introduced on formatting\n- Fixed some more linting warnings\n- Fixed compiling issues\n- Updated dependencies for husky in rolling and galactic\n\n### Removed\n- Removed test from main moveit cmake\n\n### Authors\n- Pablo Iñigo Blasco\n- DecDury <declandury@gmail.com>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Denis Štogl <denis@stogl.de>\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n\n```rst\nSection_4\n=========\n\nAdded\n-----\n- Feature/sm warehouse 2 13 dec 2 (#182)\n  - Implemented new warehouse feature.\n- Feature/wharehouse2 dec 14 (#185)\n  - Added enhancements to warehouse functionality.\n- Feature/cb pure spinning (#188)\n  - Introduced pure spinning behavior.\n- Feature/planner changes 16 12 (#191)\n  - Implemented planner changes.\n- Feature/replanning 16 dec (#193)\n  - Added replanning functionality.\n- Feature/undo motion 20 12 (#196)\n  - Improved undo motion navigation.\n- Feature/sync 21 12 (#199)\n  - Addressed synchronization issues.\n- Feature/warehouse2 22 12 (#200)\n  - Completed warehouse2 development.\n- Feature/warehouse2 23 12 (#201)\n  - Tuned and fixed warehouse2.\n- Feature/minor tune (#203)\n  - Made minor adjustments.\n- Fix trailing spaces, codespell, linters warnings (#206)\n  - Resolved various code issues.\n- Update changelogs\n  - Updated changelogs to reflect changes.\n\nChanged\n-------\n- Updated description table.\n- Updated table format.\n- Renamed header files and corrected format.\n- Changed extension of imports.\n- Renamed to smacc2 and smacc2_msgs.\n- Updated GitHub branch reference.\n- Updated package name and package.xml.\n- Reset all versions to 0.0.0.\n- Reverted \"Ignore all packages except smacc2 and smacc2_msgs\".\n- Reverted markdowns to html format.\n- Enabled build of missing rolling repositories.\n\nRemoved\n-------\n- Deleted tracing directory.\n- Removed manual installation of ros-rolling-ros2trace.\n\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nAuthor: Pablo Iñigo Blasco (pabloinigoblasco)\n```\n\nSection 5\n----------\n\nAdded\n-----\n- Enable Navigation2 for semi-binary build.\n- Added smacc2_performance_tools.\n- Added galactic CI setup and renamed rolling files. (#58)\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success.\n- Added new client behavior add for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive. You optionally can select the nodes to wait.\n\nChanged\n-------\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed folders, deleted tracing.md, edited README.md.\n- Updated smacc2_rta command across readmes.\n- Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Updated doxygen links.\n- Updated README.md launch command.\n\nFixed\n----\n- Correct trailing spaces.\n- Optimized dependencies in move_base_z_planners_common.\n- Corrected README overview. (#62).\n- Fixed source CI.\n- Corrected all linters and formatters.\n\nRemoved\n-------\n- Do not execute clang-format on smacc2_sm_reference_library package.\n\nOther\n-----\n- Some progress on navigation rolling.\n- Performance tests improvements.\n- More changes on performance tests.\n- Minor formatting.\n- Progress in aws navigation.\n- Several core improvements during navigation testing.\n- Formatting improvements.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progressing in aws navigation.\n- Attempting precommit fixes.\n- Fixing precommit.\n- Minor format.\n\nCollaborators\n-------------\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>.\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>.\n- Co-authored-by: Denis Štogl <denis@stogl.de>.\n\n```rst\nSection_6\n=========\n\nAdded\n-----\n\n- New client behavior `cb_wait_topic_message` added for nav2. It allows waiting for nav2 nodes subscribing to the `/bond` topic and ensures they are alive. Nodes to wait can be optionally selected.\n- New feature `cb_pause_slam` added for pausing SLAM functionality.\n- New feature `sm_dance_bot_lite` introduced for visualizing TurtleBot3 in Gazebo.\n- New feature `sm_multi_stage_1` doubling functionality added.\n- New feature `sm_dance_bot_strikes_back` gazebo fixes implemented.\n\nChanged\n-------\n\n- Progress made in AWS navigation demo.\n- Navigation parameters fixed for `sm_dance_bot`.\n- Formatting improvements across various features.\n- Gazebo fixes implemented to show the robot and lidar in different features.\n\nFixed\n-----\n\n- Compile warnings removed.\n- Recursion issue fixed by moving a method after the one it calls.\n\nRemoved\n-------\n\n- `neo_simulation2` package removed.\n\nOther\n-----\n\n- Various core improvements made during navigation testing.\n- `smacc2::deep_history` syntax introduced for `slam_toolbox` components.\n- Additional linting and formatting applied.\n- Merge markers removed from a Python file.\n\nContributors\n------------\n\n- Pablo Iñigo Blasco <pablo@ibrobotics.com>\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\nSection_7\n==========\n\nAdded\n-----\n- First working version of sm template and template generator. (#127)\n- minor tweaks (#130)\n- Resolve compile warnings (#137)\n- Add SM core test (#138)\n- minor navigation improvements (#141)\n- using local action messages (#139)\n- added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- added remaining SVGs to READMEs (#145)\n- Update package list. (#142)\n- Add SM Atomic SM generator. (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/aws navigation sm dance bot (#174)\n- Waypoint Inputs (#178)\n- warehouse2 (#177)\n- finetuning waypoints (#187)\n- Feature/cb pure spinning (#188)\n\nChanged\n-------\n- polishing sm_dance_bot and s-pattern\n- noticed typo \"Finnaly\" corrected to \"Finally\"\n- more refinement in sm_dance_bot\n- minor format issues (#134)\n- minor format issues (#180)\n- fixing some errors introduced on formatting\n- fixing some more linting warnings\n- updating format\n- fixing compiling issues\n- update readme (#164)\n- initial state machine transition timestamp (#165)\n- moved reference library SMs to smacc2_performance_tools (#166)\n- progress on moveit\n- fixing pipeline error\n- fixing broken master build\n- husky launch file in sm_dance_bot\n- Update dependencies for husky in rolling and galactic\n- more on aws demo\n- warehouse2 progress (#179)\n- SrConditional fixes and formatting (#168)\n\nFixed\n-----\n- build fix\n- waypoints navigator bug (#133)\n- fixing broken build\n\nRemoved\n-------\n- removing sm_dance_bot_msgs\n- removing parameters smacc\n- removing test from main moveit cmake\n- removing node creation and create only a logger\n\nCo-authored-by\n--------------\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- DecDury <declandury@gmail.com>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Denis Štogl <denis@stogl.de>\n\n```rst\nSection 8\n=========\n\nAdded\n-----\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Feature/undo motion 20 12 (#196)\n- Feature/undo motion 20 12 (#198)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- Feature/warehouse2 23 12 (#201)\n- Feature/minor tune (#203)\n- Merging code from backport foxy and updates about autoware (#208)\n- Foxy backport (#206)\n- Add galactic CI build because Navigation2 is broken in rolling\n- Add partial changes for ament_cpplint\n- Add tf2_ros as dependency to find include\n- Create workflow for testing prerelease builds\n- Use docs/ as source folder for documentation\n- Use docs/ as output directory\n- Rename to smacc2 and smacc2_msgs\n- Execute on master update\n- Reset all versions to 0.0.0\n- Update changelogs\n- Revert \"Ignore all packages except smacc2 and smacc2_msgs\"\n- Update description table\n- Update table\n- Copy initial docs\n- Dockerfile w/ ROS distro as argument\n- Opened new folder for additional tracing contents\n- Moved tracing.md to tracing directory\n- Added setupTracing.sh\n- Removed manual installation of ros-rolling-ros2trace\n- Created alternative ManualTracing\n- Added a dockerfile for Rolling and Galactic\n- Update smacc2_ci/docker/ros_rollingAndGalactic_ubuntu_20.04/buildGalactic.sh\n- Update tracing/ManualTracing.md\n- Update smacc_sm_reference_library/sm_atomic/README.md\n\nChanged\n-------\n- First ensure you have the necessary package installed\n- Rename header files and correct format\n- Change extension of imports\n- Correct GitHub branch reference\n- Update name of package and package.xml to pass liter\n- Correct wording \"smacc application\" to \"SMACC2 library\"\n\nFixed\n-----\n- Several fixes (#194)\n- Tuning warehouse3 (#197)\n- Fix trailing spaces\n- Correct codespell\n- Correct python linters warnings\n- Disable ament_cpplint\n- Disable some packages and update workflows\n- Bump ccache version\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences\n- Disable cpplint and cppcheck linters\n- Correct formatters\n- Enable cppcheck\n- Correct formatting of python file\n- Reactivating smacc2 nav clients for rolling via submodules\n- Enable build of missing rolling repositories\n- Enable Navigation2 for semi-binary build\n\nRemoved\n-------\n- Delete tracing directory\n- Reverted markdowns to html\n- Additional cleanup\n- Cleanup\n- Edited tracing.md to reflect new tracing event names\n\nCo-authored-by\n--------------\n- Denis Štogl <denis@stogl.de>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Declan Dury <44791484+DecDury@users.noreply.github.com>\n- DecDury <declandury@gmail.com>\n- reelrbtx <brett2@reelrobotics.com>\n- brettpac <brett@robosoft.ai>\n- David Revay <MrBlenny@users.noreply.github.com>\n\npabloinigoblasco\n```\n\n```rst\nSection_9\n=========\n\nAdded\n-----\n- Added `smacc2_performance_tools`.\n- Added `galactic CI setup` and renamed rolling files. (#58)\n- Added new feature, `cb_wait_topic_message`: asynchronous client behavior that waits a topic message and optionally checks its contents for success.\n- Added new client behavior for nav2, `wait nav2 nodes`, subscribing to the `/bond` topic and waiting for them to be alive. You can optionally select the nodes to wait.\n\nChanged\n-------\n- Updated mentions of `SMACC/ROS` to `SMACC2/ROS2`.\n- Renamed folders, deleted `tracing.md`, and edited `README.md`.\n- Updated `smacc2_rta` command across readmes.\n- Changed launch command to `ros2 launch sm_respira_1 sm_respira_1.launch` (#69).\n- Corrected trailing spaces.\n- Optimized dependencies in `move_base_z_planners_common`.\n- Renamed event generator library.\n- Updated `c_cpp_properties.json`.\n- Updated `README.md` launch command.\n\nFixed\n-----\n- Do not execute `clang-format` on `smacc2_sm_reference_library` package.\n- Fixed source CI and corrected `README` overview. (#62).\n- Corrected all linters and formatters.\n\nRemoved\n-------\n- Removed galactic builds from master and kept only rolling.\n- Removed submodules and use `.repos` file.\n\nOther\n-----\n- Some progress on `navigation rolling`.\n- More changes on performance tests.\n- Noticed a note that was not removed.\n- Minor formatting improvements.\n- Several core improvements during navigation testing.\n- Progress in `aws navigation demo`.\n- Progress in `aws navigation`.\n- Progressing in `aws navigation`.\n- Base for the `sm_aws_aarehouse navigation`.\n- More on performance and other issues.\n- More on navigation.\n- More `Readme` updates.\n- More `Readme`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n- More on `navigation`.\n\nContributors\n------------\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n```\n\n```rst\nSection_10\n==========\n\nAdded\n-----\n- New client behavior `cb_wait_topic_message` added for nav2. It allows waiting for nav2 nodes subscribing to the `/bond` topic and ensures they are alive. Nodes to wait for can be optionally selected.\n- New feature `cb_pause_slam` added for pausing SLAM functionality.\n- New feature `sm_dance_bot_lite` added for visualizing Turtlebot3 in Gazebo.\n- New feature `sm_multi_stage_1` added for multi-stage functionality.\n\nChanged\n-------\n- Progress made in AWS navigation demo.\n- Navigation parameters fixed for `sm_dance_bot`.\n- Formatting improvements made.\n- Gazebo fixes implemented to show the robot and lidar.\n\nFixed\n-----\n- Compile warnings removed.\n- Recursion issue fixed by moving a method after the one it calls.\n\nRemoved\n-------\n- `neo_simulation2` package removed.\n\nOther\n-----\n- Various core improvements made during navigation testing.\n- Precommit cleanup run performed.\n- Source build enabled on PR for testing.\n- Adjustments made to build packages of source CI.\n- Additional linting and formatting applied.\n- Merge markers removed from a Python file.\n- `smacc2::deep_history` syntax introduced for deep history functionality.\n- Testing progress made for `sm_dance_bot` with slam pausing/resuming functionality.\n- `sm_dance_bot` changes and fixes implemented.\n- `sm_dance_bot_s_pattern` feature added.\n```\n\nSection 11\n===========\n\nAdded\n-----\n\n- First working version of sm template and template generator. (#127)\n- Minor tweaks (#130)\n- Resolve compile warnings (#137)\n- Add SM core test (#138)\n- Minor navigation improvements (#141)\n- Using local action messages (#139)\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Update package list. (#142)\n- Add SM Atomic SM generator. (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/aws navigation sm dance bot (#174)\n- Waypoint Inputs (#178)\n- Warehouse2 (#177)\n- Finetuning waypoints (#187)\n- Feature/cb pure spinning (#188)\n- Feature/cb pure spinning (#189)\n\nChanged\n-------\n\n- Polishing sm_dance_bot and s-pattern\n- Noticed typo \"Finnaly\" corrected to \"Finally\"\n- More changes in sm_dance_bot\n- More refinement in sm_dance_bot\n- Minor format issues (#134)\n- Minor tuning to mitigate overshot issue cases\n- Progress in the sm_dance_bot tests (#135)\n- Minor configuration\n- Fixing some errors introduced on formatting\n- Fixing some more linting warnings\n- Progress on move_it PR\n- Improving Dockerfile for building local tests\n- Fixing compiling issues\n- Moved reference library SMs to smacc2_performance_tools (#166)\n- Pre-commit cleanup\n- Finishing touches 1\n- Readme updates\n- More readme updates\n- Fix: Add a missing colon\n- Refactor: Remove line\n- Feat: Add reliability QoS config\n\nFixed\n-----\n\n- Waypoints navigator bug (#133)\n- Fix CI: Format fix python version (#148)\n- Remove node creation and create only a logger. (#149)\n- Fixing pipeline error\n- Fixing broken master build\n\nRemoved\n-------\n\n- Removing sm_dance_bot_msgs\n- Removing parameters smacc\n- Removing test from main moveit CMake\n- Removing parameters smacc\n- Removing test from main moveit CMake\n- Removing some comments in the past\n- Removing some comments in the past\n\nCollaborators\n-------------\n\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: DecDury <declandury@gmail.com>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n\n```rst\nSection_12\n==========\n\nAdded\n-----\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Feature/undo motion 20 12 (#196)\n- Feature/undo motion 20 12 (#198)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- Feature/warehouse2 23 12 (#201)\n- Feature/minor tune (#203)\n- Fix rolling builds (#222)\n- Add Autoware Auto Msgs into not-released dependencies. (#220)\n- Add mergify rules file.\n- Try fixing CI for rolling. (#209)\n- Remove example things from Foxy CI setup. (#214)\n- Foxy backport (#206)\n- Fix trailing spaces.\n- Correct codespell.\n- Correct python linters warnings.\n- Add galactic CI build because Navigation2 is broken in rolling.\n- Add partial changes for ament_cpplint.\n- Add tf2_ros as dependency to find include.\n- Disable ament_cpplint.\n- Disable some packages and update workflows.\n- Bump ccache version.\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences.\n- Disable cpplint and cppcheck linters.\n- Correct formatters.\n- Enable cppcheck\n- Correct formatting of python file.\n- Include necessary package and edit Threesome launch\n- Rename header files and correct format.\n- Add workflow for checking doc build.\n- Update doxygen-check-build.yml\n- Create doxygen-deploy.yml\n- Create workflow for testing prerelease builds\n- Rename to smacc2 and smacc2_msgs\n- Correct GitHub branch reference.\n- Update name of package and package.xml to pass liter.\n- Execute on master update\n- Reset all versions to 0.0.0\n- Update changelogs\n- Revert \"Ignore all packages except smacc2 and smacc2_msgs\"\n- Update description table.\n- Update table\n- Copy initial docs\n- Dockerfile w/ ROS distro as argument\n- Open new folder for additional tracing contents\n- Delete tracing directory\n- Move tracing.md to tracing directory\n- Add setupTracing.sh\n- Remove manual installation of ros-rolling-ros2trace\n- Create alternative ManualTracing\n- Add new sm markdowns\n- Add a dockerfile for Rolling and Galactic\n\nChanged\n-------\n- Several fixes (#194)\n- Tuning warehouse3 (#197)\n- Fixing warehouse 3 problems, and other core improvements (#204)\n- Minor broken build\n- Some reordering fixes\n- Format issues\n- Finishing warehouse2\n- Minor formatting fixes\n\nFixed\n-----\n- Headless and other fixes\n- Default values\n- Pure spinning behavior missing files\n- Updating subscriber publisher components\n- Progress in autoware machine\n- Refining cp subscriber cp publisher\n- Improvements in smacc core adding more components mostly developed for autoware demo\n- Autoware demo\n- Fix minor linking errors foxy\n\nRemoved\n-------\n- Merge\n- Minor\n- More fixes\n- Missing\n- Missing sm\n- Foxy ci\n- Fix\n- Minor broken build\n\nCo-authored-by\n--------------\n- Denis Štogl <denis@stogl.de>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Declan Dury <44791484+DecDury@users.noreply.github.com>\n- DecDury <declandury@gmail.com>\n- reelrbtx <brett2@reelrobotics.com>\n- brettpac <brett@robosoft.ai>\n- David Revay <MrBlenny@users.noreply.github.com>\n- pabloinigoblasco <pabloinigoblasco@ibrobotics.com>\n```\n\n```rst\nSection_13\n==========\n\nAdded\n-----\n- Reactivated smacc2 nav clients for rolling via submodules.\n- Added README tutorial for Dockerfile.\n- Added smacc2_performance_tools.\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success.\n- Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive. You optionally can select the nodes to wait.\n\nChanged\n-------\n- Changed wording \"smacc application\" to \"SMACC2 library\".\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed tracing events.\n- Renamed folders.\n- Renamed event generator library.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n- Updated smacc2_rta command across readmes.\n- Optimized dependencies in move_base_z_planners_common.\n- Corrected trailing spaces.\n- Cleaned up sm_atomic_24hr.\n- Reformatted sm_reference_library.\n- Minor formatting improvements.\n\nFixed\n-----\n- Fixed bug in smacc2 component.\n- Fixed source CI and corrected README overview.\n- Fixed formatting in sm_advanced_recovery_1.\n- Corrected all linters and formatters.\n\nRemoved\n-------\n- Removed galactic builds from master and kept only rolling. Removed submodules and used .repos file.\n\nOther\n-----\n- Enabled build of missing rolling repositories.\n- Enabled Navigation2 for semi-binary build.\n- Made some progress on navigation rolling.\n- Made progress in aws navigation demo.\n- Made several core improvements during navigation testing.\n- Made more changes on performance tests.\n- Made more sm_atomic_24hr cleanup.\n- Made more sm_advanced_recovery_1 work.\n- Made more sm_multi_stage_1 changes.\n- Made more progress in aws navigation.\n- Made more progress in aws navigation demo.\n- Attempted precommit fixes.\n- Corrected formatting.\n- Added galactic CI setup and renamed rolling files.\n- Updated doxygen links.\n- Updated c_cpp_properties.json.\n- Updated README.md.\n- Updated smacc2_ci/docker/ros_rollingAndGalactic_ubuntu_20.04/buildGalactic.sh.\n- Updated tracing/ManualTracing.md.\n- Updated smacc_sm_reference_library/sm_atomic/README.md.\n- Reverted markdowns to html.\n- Edited tracing.md to reflect new tracing event names.\n- Edited README.md.\n- Edited sm_atomic_performance_trace_1.\n- Edited sm_atomic_performance_test_a_2.\n- Edited sm_atomic_performance_test_c_1.\n- Edited sm_respira_1 format cleanup.\n- Edited sm_respira_test_2.\n- Edited sm_respira_1 format cleanup pre-commit.\n- Edited sm_atomic_24hr.\n- Edited sm_atomic_performance_test_a_1.\n- Edited sm_atomic_performance_test_a_2.\n- Edited sm_multi_stage_1.\n- Edited sm_advanced_recovery_1.\n- Edited sm_advanced_recovery_1 reworked.\n- Edited sm_advanced_recovery_1 round 4.\n- Edited sm_atomic_performance_test_c_1.\n- Edited sm_atomic_performance_test_a_2.\n- Edited sm_multi_stage_1.\n- Edited sm_atomic_performance_test_a_1.\n- Edited sm_atomic_performance_test_a_2.\n- Edited sm_atomic_performance_test_c_1.\n- Edited sm_multi_stage_1.\n- Edited sm_aws_aarehouse navigation.\n- Edited sm_advanced_recovery_1.\n- Edited sm_advanced_recovery_1 reworked.\n- Edited sm_advanced_recovery_1 round 4.\n- Edited sm_atomic_performance_test_a_2.\n- Edited sm_atomic_performance_test_a_1.\n- Edited sm_atomic_performance_test_c_1.\n- Edited sm_multi_stage_1.\n- Edited wait topic message client behavior.\n- Edited wait nav2 nodes client behavior.\n```\n\n```rst\nSection_14\n==========\n\nAdded\n-----\n- New feature: `cb_wait_topic_message`: Asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for `nav2`: Waits for nav2 nodes subscribing to the `/bond` topic and ensures they are alive. Optional selection of nodes to wait for.\n- Base for the `sm_aws_warehouse` navigation.\n- `cb_pause_slam` client behavior.\n- `sm_dance_bot_lite` feature.\n- Visualizing `turtlebot3` in `sm_dance_bot`.\n- `dance_bot` launch `gz` lidar choice feature.\n- `sm_dance_bot_strikes_back` gazebo fixes.\n- AWS demo improvements.\n- `sm_multi_stage_1` doubling feature.\n- `sm_multi_stage_1` improvements.\n- `neo_simulation2` package removal.\n- Source build enabled on PR for testing.\n- Build packages adjustment for source CI.\n- Diverse improvements in navigation and performance.\n\nChanged\n-------\n- Minor formatting improvements.\n- Navigation parameters fixes on `sm_dance_bot`.\n- Format fixes for gazebo to show the robot and the lidar.\n\nFixed\n----\n- Removed some compile warnings.\n\nRemoved\n-------\n- Removed `neo_simulation2` package.\n\nContributors\n------------\n- Co-authored by Ubuntu 20-04-02-amd64 <brett@robosoft.ai>.\n```\n\n# Section 15\n\n## Added\n\n- Feature/diverse improvements in navigation performance (#117)\n- Feature/slam toggle and smacc deep history (#122): Progress in navigation, slam toggle client behaviors, and slam_toolbox components. Introducing smacc2::deep_history syntax. Testing sm_dance_bot with slam pausing/resuming functionality.\n- First working version of sm template and template generator (#127)\n- Added SM Atomic SM generator (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Added QOS durability to SmaccPublisherClient (#163)\n- Feature/aws navigation sm dance bot (#174): Progress on aws navigation, refactorings on navigation clients and behaviors.\n\n## Changed\n\n- Move method after the method it calls to prevent recursion (#126)\n- Moved reference library SMs to smacc2_performance_tools (#166)\n- Renamed sm_advanced_recovery_1 (#171)\n- Reworked sm_multi_stage_1 (#172): Multistage modes, sequences, steps, and finishing touches.\n\n## Fixed\n\n- Minor tuning to mitigate overshot issue cases in waypoints navigator (#133)\n- Fix CI: format fix python version (#148)\n- Update package list (#142)\n- Removed node creation and create only a logger (#149)\n- Fixed compiling issues in docker environment (#164)\n- Fixed broken master build in testing moveit behaviors (#167)\n- Fixed broken build in aws navigation progress (#174)\n\n## Removed\n\n- Removed merge markers from a python file (#119)\n- Removed parameters smacc (#147)\n- Removed sm_dance_bot_msgs (#144)\n\n## Authors\n\n- Co-authored-by: pabloinigoblasco <pablo@ibrobotics.com>\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: DecDury <declandury@gmail.com>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n\n```rst\nSection_16\n==========\n\nAdded\n-----\n- Brettpac branch (#184)\n- Redoing sm_dance_bot_warehouse_3 waypoints\n- More Waypoints\n- SrConditional fixes and formatting (#168)\n- Feature/wharehouse2 dec 14 (#185)\n- Feature/sm warehouse 2 13 dec 2 (#186)\n- Finetuning waypoints (#187)\n- Feature/cb pure spinning (#188, #189)\n- Pure spinning behavior missing files\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Several fixes (#194)\n- Minor changes (#195)\n- Feature/undo motion 20 12 (#196, #198)\n- Improving undo motion navigation warehouse2\n- Tuning warehouse3 (#197)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- Finishing warehouse2\n- Feature/warehouse2 23 12 (#201)\n- Tuning and fixes (#202)\n- Feature/minor tune (#203)\n- Fixing warehouse 3 problems, and other core improvements (#204)\n- Added missing file from warehouse2 (#205)\n- Docker build files for all versions (#225)\n- Feature/retry behavior warehouse 1 (#226)\n- Foxy backport (#206)\n- Fix code generators (#221)\n- Fix other build issues\n- Update SM template and make example code clearly visible\n- Remove use of node in the sm performance template\n- Updated templated to use Blackboard storage\n- Update template to resolve the global data correctly\n- Update sm_name.hpp\n- Fix trailing spaces\n- Correct codespell\n- Correct python linters warnings\n- Add galactic CI build because Navigation2 is broken in rolling\n- Add partial changes for ament_cpplint\n- Add tf2_ros as dependency to find include\n- Disable ament_cpplint\n- Disable some packages and update workflows\n- Bump ccache version\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences\n- Disable cpplint and cppcheck linters\n- Correct formatters\n- Branching example\n- Disable disabled packages\n- Update ci-build-source.yml\n- Change extension of imports\n- Enable cppcheck\n- Correct formatting of python file\n- Included necessary package and edited Threesome launch\n- Rename header files and correct format\n- Add workflow for checking doc build\n- Update doxygen-check-build.yml\n- Create doxygen-deploy.yml\n- Use manual deployment for now\n- Create workflow for testing prerelease builds\n- Use docs/ as source folder for documentation\n- Use docs/ as output directory\n- Rename to smacc2 and smacc2_msgs\n- Correct GitHub branch reference\n- Update name of package and package.xml to pass liter\n- Execute on master update\n- Reset all versions to 0.0.0\n- Ignore all packages except smacc2 and smacc2_msgs\n- Update changelogs\n- 0.1.0\n\nChanged\n-------\n- ros2 launch sm_three_some sm_three_some to ros2 launch sm_three_some sm_three_some.launch\n\nRemoved\n-------\n- First ensure you have the necessary package installed\n- ```\n  sudo apt-get install ros-rolling-ros2trace\n  ```\n``` \n\n*pabloinigoblasco*\n\n```rst\nSection_17\n==========\n\nAdded\n-----\n- Added setupTracing.sh script to install necessary packages and configure tracing group.\n- Added README tutorial for Dockerfile.\n- Added new feature: cb_wait_topic_message, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- Added sm_multi_stage_1 package.\n\nChanged\n-------\n- Changed wording from \"smacc application\" to \"SMACC2 library\".\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed event generator library.\n- Optimized dependencies in move_base_z_planners_common.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n\nFixed\n-----\n- Fixed bug in smacc2 component.\n- Fixed source CI and corrected README overview.\n- Fixed trailing spaces.\n- Fixed formatting in various packages.\n- Fixed pre-commit issues in multiple packages.\n\nRemoved\n-------\n- Removed manual installation of ros-rolling-ros2trace, now automated in setupTracing.sh.\n- Removed galactic builds, keeping only rolling. Removed submodules and use .repos file.\n\nOther\n-----\n- Reverted markdowns to HTML format.\n- Reactivated smacc2 nav clients for rolling via submodules.\n- Cleaned up tracing.md to reflect new tracing event names.\n- Enabled build of missing rolling repositories.\n- Enabled Navigation2 for semi-binary build.\n- Made progress on navigation rolling.\n- Various performance tests improvements.\n- Continued work on AWS navigation demo.\n- More changes and improvements in navigation testing.\n- Attempted pre-commit fixes in multiple packages.\n```\n\n*pabloinigoblasco*\n\n```rst\nSection_18\n==========\n\nAdded\n-----\n- Introduce new feature `cb_wait_topic_message`: asynchronous client behavior that waits for a topic message and optionally verifies its contents for success.\n- Implement new client behavior for nav2, `add`, to wait for nav2 nodes subscribing to the `/bond` topic and ensure they are alive. Optionally select nodes to wait for.\n- Add base for the `sm_aws_aarehouse` navigation.\n- Introduce `cb_pause_slam` client behavior.\n\nChanged\n-------\n- Correct all linters and formatters.\n- Minor formatting improvements.\n- Navigation parameters fixes on `sm_dance_bot`.\n- Minor hotfix.\n- Cleaning and lidar show/hide option for `sm_dance_bot` visualizing `turtlebot3`.\n- Gazebo fixes to show the robot and the lidar.\n- Format fixes for `sm_multi_stage_1` and `sm_dance_bot_strikes_back`.\n\nFixed\n----\n- Remove some compile warnings.\n\nRemoved\n-------\n- Eliminate redundant entries.\n\nCollaborators\n-------------\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n\nCommits\n-------\n- Feature/aws demo progress (#92)\n- Feature/sm dance bot fixes (#93)\n- Feature/sm aws warehouse (#94)\n- Feature/sm dance bot fixes (#95)\n- Remove some compile warnings. (#96)\n- Feature/cb pause slam (#98)\n- sm_dance_bot_lite (#99)\n- Rename doxygen deployment workflow (#100)\n- sm_dance_bot visualizing turtlebot3 (#101)\n- Feature/dance bot launch gz lidar choice (#102)\n- Feature/sm dance bot lite gazebo fixes (#104)\n- sm_multi_stage_1 doubling (#103)\n- Feature/sm dance bot strikes back gazebo fixes (#105)\n- precommit cleanup run (#106)\n- aws demo (#108)\n- Brettpac branch (#110)\n- Brettpac branch (#111)\n```\n\nSection_19\n===========\n\nAdded\n-----\n\n- Added multistage modes to sm_multi_stage_1.\n- Added sequences to sm_multi_stage_1.\n- Added steps to sm_multi_stage_1.\n- Added finishing touches to sm_multi_stage_1.\n- Added AWS navigation to sm_dance_bot.\n\nChanged\n-------\n\n- Reworked sm_multi_stage_1 with new sequences and steps.\n\nFixed\n-----\n\n- Fixed waypoint 4 and iterations for robot course completion.\n- Fixed CI format for Python version.\n\nRemoved\n-------\n\n- Removed neo_simulation2 package.\n- Removed node creation in favor of logger.\n- Removed parameters from smacc.\n- Removed test from main MoveIt CMake.\n\nOther\n-----\n\n- Co-authored with Ubuntu 20-04-02-amd64 <brett@robosoft.ai>, DecDury <declandury@gmail.com>, Denis Štogl <destogl@users.noreply.github.com>, and pabloinigoblasco <pablo@ibrobotics.com>.\n- Various minor improvements and fixes throughout.\n\n```rst\nSection_20\n==========\n\nAdded\n-----\n\n- Update dependencies for husky in rolling and galactic.\n- Progress on aws navigation and refactorings on navigation clients and behaviors.\n- More on aws demo.\n- Warehouse2 progress.\n- Waypoint Inputs.\n- Warehouse2 progress.\n- Format.\n- Sm_dance_bot_warehouse_3.\n- Feature/sm warehouse 2 13 dec 2.\n- More changes and headless.\n- Merge.\n- Headless and other fixes.\n- Default values.\n- Brettpac branch.\n- Redoing sm_dance_bot_warehouse_3 waypoints.\n- More Waypoints.\n- SrConditional fixes and formatting.\n- Move trigger logic into headers.\n- Lint.\n- Feature/wharehouse2 dec 14.\n- Feature/sm warehouse 2 13 dec 2.\n- Finetuning waypoints.\n- Feature/cb pure spinning.\n- Pure spinning behavior missing files.\n- Feature/planner changes 16 12.\n- Feature/replanning 16 dec.\n- Replanning for all examples.\n- Several fixes.\n- Feature/undo motion 20 12.\n- Improving undo motion navigation warehouse2.\n- Tuning warehouse3.\n- Feature/sync 21 12.\n- Format issues.\n- Feature/warehouse2 22 12.\n- Finishing warehouse2.\n- Feature/warehouse2 23 12.\n- Tuning and fixes.\n- Feature/minor tune.\n- Fixing warehouse 3 problems and other core improvements.\n- Added missing file from warehouse2.\n- Updating subscriber publisher components.\n- Progress in autoware machine.\n- Refining cp subscriber cp publisher.\n- Improvements in smacc core adding more components.\n- Autoware demo.\n- Fixing docker for foxy and galactic.\n- Update file for fake hardware simulation and add file for gazebo simulation.\n- Retry behavior warehouse 1.\n- Multiple controllable leds plugin.\n- Progress in husky demo.\n- Add ignition file and update repos files.\n- Improving navigation behaviors.\n- Add galactic CI build because Navigation2 is broken in rolling.\n- Add partial changes for ament_cpplint.\n- Add tf2_ros as dependency to find include.\n\nChanged\n-------\n\n- Fix formatting.\n- Minor changes.\n- Format.\n- Minor tune.\n- Minor format.\n- Minor linking errors foxy.\n- Fix trailing spaces.\n- Correct codespell.\n- Correct python linters warnings.\n- Only rolling version should be pre-released on master.\n- Correct Focal-Rolling builds by fixing the version of rosdep yaml.\n\nFixed\n-----\n\n- Fixing broken build.\n- Fix broken source build.\n- Fixing format and minor.\n- Fixing startup problems in warehouse 3.\n\nRemoved\n-------\n\n- Weird moveit not downloaded repo.\n- Missing sm.\n- Missing.\n- Foxy CI.\n- Minor broken build.\n- Some reordering fixes.\n- Docker files for different revisions, warnings removal and more testing on navigation.\n- Missing file.\n- Other minor changes.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor.\n- Minor\n\n```rst\nSection_21\n==========\n\nAdded\n-----\n- First ensure you have the necessary package installed:\n  ```\n  sudo apt-get install ros-rolling-ros2trace\n  ```\n- Add workflow for checking doc build.\n- Create doxygen-deploy.yml.\n- Create workflow for testing prerelease builds.\n- Use docs/ as source folder and output directory for documentation.\n- Added setupTracing.sh:\n  Installs necessary packages and configures tracing group.\n- Created alternative ManualTracing.\n- Added new sm markdowns.\n- Added a dockerfile for Rolling and Galactic.\n\nChanged\n-------\n- Rename header files and correct format.\n- Change extension of imports.\n- Correct GitHub branch reference.\n- Update name of package and package.xml to pass liter.\n- Update description table.\n- Update table.\n- Update smacc2_rta command across readmes.\n- Clean up of sm_atomic_24hr.\n- Optimized deps in move_base_z_planners_common.\n- Renaming of event generator library.\n- Minor formatting.\n- Fix source CI and correct README overview.\n- Update c_cpp_properties.json.\n- Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n- Update doxygen links.\n- More Readme Updates.\n- More Readme.\n- Feature/core and navigation fixes.\n- Feature/aws demo progress.\n- More on navigation.\n- sm_advanced_recovery_1 reworked.\n- Trying to fix Pre-Commit.\n- More sm_advanced_recovery_1 work.\n- sm_advanced_recovery_1 round 4.\n- Brettpac branch.\n- sm_atomic_performance_test_a_2.\n- sm_atomic_performance_test_a_1.\n- sm_atomic_performance_test_c_1.\n\nFixed\n-----\n- Correct formatters.\n- Correct formatting of python file.\n- Correct trailing spaces.\n- Bug in smacc2 component.\n\nRemoved\n-------\n- Disable ament_cpplint.\n- Disable some packages and update workflows.\n- Disable cpplint and cppcheck linters.\n- Disable disabled packages.\n- Disable further packages.\n- Ignore all packages except smacc2 and smacc2_msgs.\n- Remove galactic builds from master and keep only rolling. Remove submodules and use .repos file.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n\nAuthors\n-------\n- Pablo Iñigo Blasco\n- Denis Štogl <destogl@users.noreply.github.com>\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\n```rst\nSection_22\n==========\n\nAdded\n-----\n- New feature: cb_wait_topic_message, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for nav2: wait for nav2 nodes subscribing to the /bond topic and waiting for them to be alive, with optional node selection.\n- New client behavior: cb_pause_slam for pausing SLAM functionality.\n- New feature: sm_dance_bot_lite.\n\nChanged\n-------\n- Updated launch command.\n- Corrected all linters and formatters.\n- Navigation parameters fixes on sm_dance_bot.\n- Minor format improvements.\n- Merge and progress in AWS navigation demo.\n- Fix format in various places.\n- Minor hotfix.\n- Visualizing TurtleBot3 in sm_dance_bot.\n\nFixed\n-----\n- Fixed compile warnings.\n\nRemoved\n-------\n- Removed some compile warnings.\n\nContributors\n------------\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n```\n\n*pabloinigoblasco*\n\nSection_23\n==========\n\nAdded\n-----\n- Added `sm_dance_bot` feature to visualize `turtlebot3`.\n- Added option to show/hide cleaning and lidar.\n- Added `gazebo` fixes for `sm_dance_bot_lite` (#104).\n- Added `gazebo` fixes to display the robot and lidar.\n- Added `sm_multi_stage_1` doubling (#103).\n- Added `aws demo` feature (#108).\n- Added `Brettpac branch` (#110).\n- Added `5th stage` to `sm_multi_stage_1`.\n- Added `a3` feature (#113).\n- Added `diverse improvements` for navigation and performance (#116).\n- Added `slam toggle` and `smacc deep history` feature (#122).\n- Added `dance bot s pattern` feature (#128).\n- Added `waypoints navigator` bug fix (#133).\n- Added `SM core test` (#138).\n- Added `minor navigation improvements` (#141).\n- Added `rolling Docker environment` for execution in any environment (#154).\n- Added `migration moveit client` feature (#151).\n\nChanged\n-------\n- Changed launch command in `README.md` for `sm_dance_bot_strikes_back`.\n- Changed format for CI in `Fix CI` (#148).\n\nFixed\n-----\n- Fixed recursion issue by moving method after the one it calls (#126).\n- Fixed overshot issue cases in `waypoints navigator`.\n- Fixed format issues in `minor format issues` (#134).\n- Fixed compile warnings in `Resolve compile warnings` (#137).\n- Fixed node creation to only create a logger in `Remove node creation` (#149).\n\nRemoved\n-------\n- Removed `neo_simulation2` package (#112).\n- Removed `sm_dance_bot_msgs` package.\n- Removed parameters in `smacc` (#147).\n- Removed test from main moveit cmake.\n- Removed some comments in `README.md`.\n\nAuthors\n-------\n- Pablo Iñigo Blasco (pabloinigoblasco)\n- Brett <brett@robosoft.ai>\n- DecDury <declandury@gmail.com>\n- Denis Štogl <destogl@users.noreply.github.com>\n\nSection_24\n===========\n\nAdded\n-----\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/testing moveit behaviors (#167)\n- Feature/aws navigation sm dance bot (#174)\n- Feature/sm warehouse 2 13 dec 2 (#182)\n- Feature/cb pure spinning (#188)\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Feature/undo motion 20 12 (#196)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- Feature/warehouse2 23 12 (#201)\n- Feature/minor tune (#203)\n\nChanged\n-------\n- Moved reference library SMs to smacc2_performance_tools (#166)\n- Added reliability qos config\n- Finishing touches 1\n- Redoing sm_dance_bot_warehouse_3 waypoints\n- Improving undo motion navigation warehouse2\n- Tuning warehouse3\n- Fixing warehouse 3 problems, and other core improvements to remove dead lock, also making continuous integration green\n\nFixed\n-----\n- Add a missing colon\n- Fixing pipeline error\n- Fixing broken master build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n\n``Section_25``\n\nAdded:\n- Docker improvements.\n- Runtime dependency.\n- Restored UR dependency.\n\nChanged:\n- Updated Galactic repositories.\n\nFixed:\n- Fixed build.\n\nRemoved:\n- None.\n\nOther Changes:\n- Merged additional changes.\n- Master branch now rolling to Galactic backport.\n- Tested Dance Bot demos.\n\nContributors: Denis Štogl, Pablo Iñigo Blasco, pabloinigoblasco.\n\nCo-authored-by: reelrbtx <brett2@reelrobotics.com>\nCo-authored-by: brettpac <brett@robosoft.ai>\nCo-authored-by: David Revay <MrBlenny@users.noreply.github.com>\nCo-authored-by: pabloinigoblasco <pabloinigoblasco@ibrobotics.com>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: Denis Štogl <denis@stogl.de>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Declan Dury <44791484+DecDury@users.noreply.github.com>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/backward_local_planner/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(backward_local_planner)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\n\nfind_package(nav2_core)\nfind_package(nav_msgs)\nfind_package(nav2_costmap_2d)\nfind_package(geometry_msgs)\nfind_package(tf2)\nfind_package(nav2z_planners_common)\nfind_package(pluginlib)\nfind_package(nav_2d_utils)\n\nset(dependencies\n  nav2_core\n  nav_msgs\n  nav2_costmap_2d\n  geometry_msgs\n  visualization_msgs\n  tf2\n  nav2z_planners_common\n  pluginlib\n  nav_2d_utils\n)\n\ninclude_directories(include)\n\nadd_library(${PROJECT_NAME} SHARED\n  src/${PROJECT_NAME}/backward_local_planner.cpp\n)\n\ntarget_compile_definitions(${PROJECT_NAME} PUBLIC \"PLUGINLIB__DISABLE_BOOST_FUNCTIONS\")\npluginlib_export_plugin_description_file(nav2_core blp_plugin.xml)\n\nament_target_dependencies(${PROJECT_NAME}\n  ${dependencies})\n\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\nament_export_dependencies(${dependencies})\n\n\ninstall(TARGETS ${PROJECT_NAME}\n  ARCHIVE DESTINATION lib\n  LIBRARY DESTINATION lib\n  RUNTIME DESTINATION bin\n)\n\ninstall(DIRECTORY include/\n  DESTINATION include/\n)\n\ninstall(FILES\n  blp_plugin.xml\n  DESTINATION share\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/backward_local_planner/blp_plugin.xml",
    "content": "<library path=\"backward_local_planner\">\n  <class name=\"backward_local_planner::BackwardLocalPlanner\" type=\"cl_nav2z::backward_local_planner::BackwardLocalPlanner\" base_class_type=\"nav2_core::Controller\">\n    <description>\n    </description>\n  </class>\n</library>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/backward_local_planner/include/backward_local_planner/backward_local_planner.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n//#include <dynamic_reconfigure/server.h>\n//#include <backward_local_planner/BackwardLocalPlannerConfig.h>\n#include <tf2/transform_datatypes.h>\n#include <tf2_ros/buffer.h>\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include <nav2_core/controller.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n#include <visualization_msgs/msg/marker_array.hpp>\n\n#include <tf2/utils.h>\n#include <eigen3/Eigen/Eigen>\n\ntypedef double meter;\ntypedef double rad;\n\nnamespace cl_nav2z\n{\nnamespace backward_local_planner\n{\nclass BackwardLocalPlanner : public nav2_core::Controller\n{\npublic:\n  BackwardLocalPlanner();\n\n  virtual ~BackwardLocalPlanner();\n\n  void configure(\n    const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name,\n    const std::shared_ptr<tf2_ros::Buffer> tf,\n    const std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros) override;\n\n  void activate() override;\n\n  void deactivate() override;\n\n  void cleanup() override;\n\n  /**\n   * @brief nav2_core setPlan - Sets the global plan\n   * @param path The global plan\n   */\n  void setPlan(const nav_msgs::msg::Path & path) override;\n\n  /**\n   * @brief nav2_core computeVelocityCommands - calculates the best command given the current pose and velocity\n   *\n   * It is presumed that the global plan is already set.\n   *\n   * This is mostly a wrapper for the protected computeVelocityCommands\n   * function which has additional debugging info.\n   *\n   * @param pose Current robot pose\n   * @param velocity Current robot velocity\n   * @return The best command for the robot to drive\n   */\n  virtual geometry_msgs::msg::TwistStamped computeVelocityCommands(\n    const geometry_msgs::msg::PoseStamped & pose, const geometry_msgs::msg::Twist & velocity,\n    nav2_core::GoalChecker * goal_checker) override;\n\n  /*deprecated in navigation2*/\n  bool isGoalReached();\n\n  virtual void setSpeedLimit(const double & speed_limit, const bool & percentage) override;\n\nprivate:\n  void updateParameters();\n\n  // returns true if found\n  bool findInitialCarrotGoal(geometry_msgs::msg::PoseStamped & pose);\n\n  // returns true for a pure spining motion request\n  bool updateCarrotGoal(const geometry_msgs::msg::PoseStamped & pose);\n\n  bool resamplePrecisePlan();\n\n  void straightBackwardsAndPureSpinCmd(\n    const geometry_msgs::msg::PoseStamped & pose, double & vetta, double & gamma,\n    double alpha_error, double betta_error, double rho_error);\n\n  void clearMarkers();\n  void publishGoalMarker(double x, double y, double phi);\n\n  void computeCurrentEuclideanAndAngularErrorsToCarrotGoal(\n    const geometry_msgs::msg::PoseStamped & pose, double & dist, double & angular_error);\n\n  bool checkGoalReached(\n    const geometry_msgs::msg::PoseStamped & pose, double vetta, double gamma, double alpha_error,\n    geometry_msgs::msg::Twist & cmd_vel);\n\n  bool checkCurrentPoseInGoalRange(\n    const geometry_msgs::msg::PoseStamped & tfpose, const geometry_msgs::msg::Twist & currentTwist,\n    double angle_error, bool & linearGoalReached, nav2_core::GoalChecker * goalChecker);\n\n  bool resetDivergenceDetection();\n\n  bool divergenceDetectionUpdate(const geometry_msgs::msg::PoseStamped & pose);\n\n  bool checkCarrotHalfPlainConstraint(const geometry_msgs::msg::PoseStamped & pose);\n\n  // void reconfigCB(::backward_local_planner::BackwardLocalPlannerConfig &config, uint32_t level);\n  // dynamic_reconfigure::Server<::backward_local_planner::BackwardLocalPlannerConfig> paramServer_;\n  // dynamic_reconfigure::Server<::backward_local_planner::BackwardLocalPlannerConfig>::CallbackType f;\n\n  rclcpp_lifecycle::LifecycleNode::SharedPtr nh_;\n  std::string name_;\n\n  std::vector<geometry_msgs::msg::PoseStamped> backwardsPlanPath_;\n  std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmapRos_;\n  std::shared_ptr<tf2_ros::Buffer> tf_;\n\n  std::shared_ptr<rclcpp_lifecycle::LifecyclePublisher<visualization_msgs::msg::MarkerArray>>\n    goalMarkerPublisher_;\n  std::shared_ptr<rclcpp_lifecycle::LifecyclePublisher<nav_msgs::msg::Path>> planPub_;\n\n  // --- control parameters ---\n  double k_rho_;\n  double k_alpha_;\n  double k_betta_;\n  double pure_spinning_allowed_betta_error_;\n  double linear_mode_rho_error_threshold_;\n\n  const double alpha_offset_ = M_PI;\n  const double betta_offset_ = 0;\n\n  double max_linear_x_speed_;   // meters/sec\n  double max_angular_z_speed_;  // rads/sec\n\n  double yaw_goal_tolerance_;  // radians\n  double xy_goal_tolerance_;   // meters\n\n  meter carrot_distance_;\n  rad carrot_angular_distance_;\n  meter divergenceDetectionLastCarrotLinearDistance_;\n\n  double transform_tolerance_;\n\n  rclcpp::Duration waitingTimeout_;\n  rclcpp::Time waitingStamp_;\n\n  // --- controller state ---\n  bool goalReached_;\n  bool initialPureSpinningStage_;\n  bool straightBackwardsAndPureSpinningMode_ = false;\n  bool enable_obstacle_checking_ = true;\n  bool inGoalPureSpinningState_ = false;\n  bool waiting_;\n\n  // references the current point inside the backwardsPlanPath were the robot is located\n  int currentCarrotPoseIndex_;\n\n  void generateTrajectory(\n    const Eigen::Vector3f & pos, const Eigen::Vector3f & vel, float maxdist, float maxangle,\n    float maxtime, float dt, std::vector<Eigen::Vector3f> & outtraj);\n\n  Eigen::Vector3f computeNewPositions(\n    const Eigen::Vector3f & pos, const Eigen::Vector3f & vel, double dt);\n};\n}  // namespace backward_local_planner\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/backward_local_planner/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>backward_local_planner</name>\n  <version>2.3.19</version>\n  <description>The backward_local_planner package.</description>\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <author email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</author>\n\n   <license>BSDv3</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>nav2_costmap_2d</depend>\n  <depend>geometry_msgs</depend>\n  <depend>nav2z_planners_common</depend>\n  <depend>nav2_core</depend>\n  <depend>nav_msgs</depend>\n  <depend>nav_2d_utils</depend>\n  <depend>std_msgs</depend>\n  <depend>tf2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/backward_local_planner/src/backward_local_planner/backward_local_planner.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <angles/angles.h>\n#include <backward_local_planner/backward_local_planner.hpp>\n#include <nav2z_planners_common/common.hpp>\n\n#include <boost/intrusive_ptr.hpp>\n#include <chrono>\n#include <nav_2d_utils/tf_help.hpp>\n#include <pluginlib/class_list_macros.hpp>\n#include <visualization_msgs/msg/marker_array.hpp>\n\n// register this planner as a BaseLocalPlanner plugin\nPLUGINLIB_EXPORT_CLASS(\n  cl_nav2z::backward_local_planner::BackwardLocalPlanner, nav2_core::Controller)\n\nusing namespace std::literals::chrono_literals;\n\nnamespace cl_nav2z\n{\nnamespace backward_local_planner\n{\n/**\n ******************************************************************************************************************\n * BackwardLocalPlanner()\n ******************************************************************************************************************\n */\nBackwardLocalPlanner::BackwardLocalPlanner() : waitingTimeout_(0s) {}\n\n/**\n ******************************************************************************************************************\n * ~BackwardLocalPlanner()\n ******************************************************************************************************************\n */\nBackwardLocalPlanner::~BackwardLocalPlanner() {}\n\nvoid BackwardLocalPlanner::activate()\n{\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"activating controller BackwardLocalPlanner\");\n  updateParameters();\n\n  goalMarkerPublisher_->on_activate();\n  planPub_->on_activate();\n  backwardsPlanPath_.clear();\n}\n\nvoid BackwardLocalPlanner::deactivate()\n{\n  this->clearMarkers();\n  RCLCPP_WARN_STREAM(nh_->get_logger(), \"[BackwardLocalPlanner] deactivated\");\n  planPub_->on_deactivate();\n  goalMarkerPublisher_->on_deactivate();\n}\n\nvoid BackwardLocalPlanner::cleanup()\n{\n  this->clearMarkers();\n  RCLCPP_WARN_STREAM(nh_->get_logger(), \"[BackwardLocalPlanner] cleanup\");\n  this->backwardsPlanPath_.clear();\n  this->currentCarrotPoseIndex_ = 0;\n}\n\n/**\n ******************************************************************************************************************\n * BackwardLocalPlanner::configure()\n ******************************************************************************************************************\n */\n\ntemplate <typename T>\nvoid tryGetOrSet(rclcpp_lifecycle::LifecycleNode::SharedPtr & node, std::string param, T & value)\n{\n  if (!node->get_parameter(param, value))\n  {\n    node->set_parameter(rclcpp::Parameter(param, value));\n  }\n}\n\nvoid BackwardLocalPlanner::configure(\n  const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name,\n  const std::shared_ptr<tf2_ros::Buffer> tf,\n  const std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros)\n{\n  this->costmapRos_ = costmap_ros;\n  // rclcpp::Node::SharedPtr nh(\"~/BackwardLocalPlanner\");\n  this->nh_ = parent.lock();\n  this->name_ = name;\n  this->tf_ = tf;\n\n  k_rho_ = -1.0;\n  k_alpha_ = 0.5;\n  k_betta_ = -1.0;  // set to zero means that orientation is not important\n  carrot_angular_distance_ = 0.4;\n  linear_mode_rho_error_threshold_ = 0.02;\n  straightBackwardsAndPureSpinningMode_ = true;\n  max_linear_x_speed_ = 1.0;\n  max_angular_z_speed_ = 2.0;\n  yaw_goal_tolerance_ = -1;\n  xy_goal_tolerance_ = -1;\n  waitingTimeout_ = rclcpp::Duration(10s);\n\n  this->currentCarrotPoseIndex_ = 0;\n\n  declareOrSet(\n    nh_, name_ + \".pure_spinning_straight_line_mode\", straightBackwardsAndPureSpinningMode_);\n\n  declareOrSet(nh_, name_ + \".k_rho\", k_rho_);\n  declareOrSet(nh_, name_ + \".k_alpha\", k_alpha_);\n  declareOrSet(nh_, name_ + \".k_betta\", k_betta_);\n  declareOrSet(nh_, name_ + \".linear_mode_rho_error_threshold\", linear_mode_rho_error_threshold_);\n\n  declareOrSet(nh_, name_ + \".carrot_distance\", carrot_distance_);\n  declareOrSet(nh_, name_ + \".carrot_angular_distance\", carrot_angular_distance_);\n  declareOrSet(nh_, name_ + \".enable_obstacle_checking\", enable_obstacle_checking_);\n\n  declareOrSet(nh_, name_ + \".max_linear_x_speed\", max_linear_x_speed_);\n  declareOrSet(nh_, name_ + \".max_angular_z_speed\", max_angular_z_speed_);\n\n  // we have to do this, for example for the case we are refining the final orientation.\n  // check at some point if the carrot is reached in \"goal linear distance\", then we go into\n  // some automatic pure-spinning mode where we only update the orientation\n  // This means that if we reach the carrot with precision we go into pure spinning mode but we cannot\n  // leave that point (maybe this could be improved)\n\n  if (yaw_goal_tolerance_ != -1 && carrot_angular_distance_ < yaw_goal_tolerance_)\n  {\n    RCLCPP_WARN_STREAM(\n      nh_->get_logger(), \"[BackwardLocalPlanner] carrot_angular_distance (\"\n                           << carrot_angular_distance_\n                           << \") cannot be lower than yaw_goal_tolerance (\" << yaw_goal_tolerance_\n                           << \") setting carrot_angular_distance = \" << yaw_goal_tolerance_);\n    carrot_angular_distance_ = yaw_goal_tolerance_;\n  }\n\n  if (xy_goal_tolerance_ != -1 && carrot_distance_ < xy_goal_tolerance_)\n  {\n    RCLCPP_WARN_STREAM(\n      nh_->get_logger(), \"[BackwardLocalPlanner] carrot_linear_distance (\"\n                           << carrot_distance_ << \") cannot be lower than xy_goal_tolerance_ (\"\n                           << yaw_goal_tolerance_\n                           << \") setting carrot_angular_distance = \" << xy_goal_tolerance_);\n    carrot_distance_ = xy_goal_tolerance_;\n  }\n\n  goalMarkerPublisher_ = nh_->create_publisher<visualization_msgs::msg::MarkerArray>(\n    \"backward_local_planner/goal_marker\", rclcpp::QoS(1));\n\n  planPub_ =\n    nh_->create_publisher<nav_msgs::msg::Path>(\"backward_local_planner/path\", rclcpp::QoS(1));\n}\n\nvoid BackwardLocalPlanner::updateParameters()\n{\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"--- parameters ---\");\n  tryGetOrSet(nh_, name_ + \".k_rho\", k_rho_);\n  RCLCPP_INFO_STREAM(nh_->get_logger(), name_ + \".k_rho:\" << k_rho_);\n  tryGetOrSet(nh_, name_ + \".k_alpha\", k_alpha_);\n  RCLCPP_INFO_STREAM(nh_->get_logger(), name_ + \".k_alpha:\" << k_alpha_);\n  tryGetOrSet(nh_, name_ + \".k_betta\", k_betta_);\n  RCLCPP_INFO_STREAM(nh_->get_logger(), name_ + \".k_betta:\" << k_betta_);\n\n  tryGetOrSet(nh_, name_ + \".enable_obstacle_checking\", enable_obstacle_checking_);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), name_ + \".enable_obstacle_checking: \" << enable_obstacle_checking_);\n\n  tryGetOrSet(nh_, name_ + \".carrot_distance\", carrot_distance_);\n  RCLCPP_INFO_STREAM(nh_->get_logger(), name_ + \".carrot_distance:\" << carrot_distance_);\n  tryGetOrSet(nh_, name_ + \".carrot_angular_distance\", carrot_angular_distance_);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), name_ + \".carrot_angular_distance: \" << carrot_angular_distance_);\n\n  tryGetOrSet(\n    nh_, name_ + \".pure_spinning_straight_line_mode\", straightBackwardsAndPureSpinningMode_);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(),\n    name_ + \".pure_spinning_straight_line_mode: \" << straightBackwardsAndPureSpinningMode_);\n\n  tryGetOrSet(nh_, name_ + \".linear_mode_rho_error_threshold\", linear_mode_rho_error_threshold_);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(),\n    name_ + \".linear_mode_rho_error_threshold: \" << linear_mode_rho_error_threshold_);\n  tryGetOrSet(nh_, name_ + \".max_linear_x_speed\", max_linear_x_speed_);\n  RCLCPP_INFO_STREAM(nh_->get_logger(), name_ + \".max_linear_x_speed: \" << max_linear_x_speed_);\n  tryGetOrSet(nh_, name_ + \".max_angular_z_speed\", max_angular_z_speed_);\n  RCLCPP_INFO_STREAM(nh_->get_logger(), name_ + \".max_angular_z_speed: \" << max_angular_z_speed_);\n\n  if (yaw_goal_tolerance_ != -1 && carrot_angular_distance_ < yaw_goal_tolerance_)\n  {\n    RCLCPP_WARN_STREAM(\n      nh_->get_logger(), \"[BackwardLocalPlanner] carrot_angular_distance (\"\n                           << carrot_angular_distance_\n                           << \") cannot be lower than yaw_goal_tolerance (\" << yaw_goal_tolerance_\n                           << \") setting carrot_angular_distance = \" << yaw_goal_tolerance_);\n    carrot_angular_distance_ = yaw_goal_tolerance_;\n    nh_->set_parameter(\n      rclcpp::Parameter(name_ + \".carrot_angular_distance\", carrot_angular_distance_));\n  }\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), name_ + \".carrot_angular_distance: \" << carrot_angular_distance_);\n\n  if (xy_goal_tolerance_ != -1 && carrot_distance_ < xy_goal_tolerance_)\n  {\n    RCLCPP_WARN_STREAM(\n      nh_->get_logger(), \"[BackwardLocalPlanner] carrot_linear_distance (\"\n                           << carrot_distance_ << \") cannot be lower than xy_goal_tolerance_ (\"\n                           << yaw_goal_tolerance_\n                           << \") setting carrot_angular_distance = \" << xy_goal_tolerance_);\n    carrot_distance_ = xy_goal_tolerance_;\n    nh_->set_parameter(rclcpp::Parameter(name_ + \".carrot_distance\", carrot_distance_));\n  }\n  RCLCPP_INFO_STREAM(nh_->get_logger(), name_ + \".carrot_distance:\" << carrot_distance_);\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"--- end params ---\");\n}\n\nvoid BackwardLocalPlanner::setSpeedLimit(\n  const double & /*speed_limit*/, const bool & /*percentage*/)\n{\n  RCLCPP_WARN_STREAM(\n    nh_->get_logger(),\n    \"BackwardLocalPlanner::setSpeedLimit invoked. Ignored, funcionality not \"\n    \"implemented.\");\n}\n/**\n ******************************************************************************************************************\n * auxiliary functions\n ******************************************************************************************************************\n */\nvoid BackwardLocalPlanner::computeCurrentEuclideanAndAngularErrorsToCarrotGoal(\n  const geometry_msgs::msg::PoseStamped & tfpose, double & dist, double & angular_error)\n{\n  double angle = tf2::getYaw(tfpose.pose.orientation);\n  auto & carrot_pose = backwardsPlanPath_[currentCarrotPoseIndex_];\n  const geometry_msgs::msg::Point & carrot_point = carrot_pose.pose.position;\n\n  tf2::Quaternion carrot_orientation;\n  tf2::convert(carrot_pose.pose.orientation, carrot_orientation);\n  geometry_msgs::msg::Pose currentPoseDebugMsg = tfpose.pose;\n\n  // take error from the current position to the path point\n  double dx = carrot_point.x - tfpose.pose.position.x;\n  double dy = carrot_point.y - tfpose.pose.position.y;\n\n  dist = sqrt(dx * dx + dy * dy);\n\n  double pangle = tf2::getYaw(carrot_orientation);\n  angular_error = fabs(angles::shortest_angular_distance(pangle, angle));\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[BackwardLocalPlanner] Compute carrot errors from current pose. (linear \"\n                         << dist << \")(angular \" << angular_error << \")\" << std::endl\n                         << \"Current carrot pose: \" << std::endl\n                         << carrot_pose << std::endl\n                         << \"Current actual pose:\" << std::endl\n                         << currentPoseDebugMsg);\n}\n\n/**\n ******************************************************************************************************************\n * updateCarrotGoal()\n ******************************************************************************************************************\n */\nbool BackwardLocalPlanner::updateCarrotGoal(const geometry_msgs::msg::PoseStamped & tfpose)\n{\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[BackwardsLocalPlanner] --- Carrot update ---\");\n  double disterr = 0, angleerr = 0;\n  // iterate the point from the current position and backward until reaching a new goal point in the path\n  // this algorithm among other advantages has that skip the looping with an eager global planner\n  // that recalls the same plan (the already performed part of the plan in the current pose is skipped)\n  while (currentCarrotPoseIndex_ < (long)backwardsPlanPath_.size() - 1)\n  {\n    computeCurrentEuclideanAndAngularErrorsToCarrotGoal(tfpose, disterr, angleerr);\n\n    RCLCPP_INFO_STREAM(\n      nh_->get_logger(), \"[BackwardsLocalPlanner] update carrot goal: Current index: \"\n                           << currentCarrotPoseIndex_ << \"/\" << backwardsPlanPath_.size());\n    RCLCPP_INFO(\n      nh_->get_logger(),\n      \"[BackwardsLocalPlanner] update carrot goal: linear error %lf, angular error: %lf\", disterr,\n      angleerr);\n\n    // target pose found, goal carrot tries to escape!\n    if (disterr < carrot_distance_ && angleerr < carrot_angular_distance_)\n    {\n      currentCarrotPoseIndex_++;\n      resetDivergenceDetection();\n      RCLCPP_INFO_STREAM(\n        nh_->get_logger(), \"[BackwardsLocalPlanner] move carrot fw \"\n                             << currentCarrotPoseIndex_ << \"/\" << backwardsPlanPath_.size());\n    }\n    else\n    {\n      // carrot already escaped\n      break;\n    }\n  }\n  // RCLCPP_INFO(nh_->get_logger(),\"[BackwardsLocalPlanner] computing angular error\");\n  if (\n    currentCarrotPoseIndex_ >= (long)backwardsPlanPath_.size() - 1 && backwardsPlanPath_.size() > 0)\n  {\n    currentCarrotPoseIndex_ = backwardsPlanPath_.size() - 1;\n    // reupdated errors\n    computeCurrentEuclideanAndAngularErrorsToCarrotGoal(tfpose, disterr, angleerr);\n  }\n\n  RCLCPP_INFO(\n    nh_->get_logger(), \"[BackwardsLocalPlanner] Current index carrot goal: %d\",\n    currentCarrotPoseIndex_);\n  RCLCPP_INFO(\n    nh_->get_logger(),\n    \"[BackwardsLocalPlanner] Update carrot goal: linear error  %lf (xytol: %lf), angular error: \"\n    \"%lf\",\n    disterr, xy_goal_tolerance_, angleerr);\n\n  bool carrotInGoalLinearRange = disterr < xy_goal_tolerance_;\n  RCLCPP_INFO(\n    nh_->get_logger(), \"[BackwardsLocalPlanner] carrot in goal radius: %d\",\n    carrotInGoalLinearRange);\n\n  RCLCPP_INFO(nh_->get_logger(), \"[BackwardsLocalPlanner] ---End carrot update---\");\n\n  return carrotInGoalLinearRange;\n}\n\nbool BackwardLocalPlanner::resetDivergenceDetection()\n{\n  // this function should be called always the carrot is updated\n  divergenceDetectionLastCarrotLinearDistance_ = std::numeric_limits<double>::max();\n  return true;\n}\n\nbool BackwardLocalPlanner::divergenceDetectionUpdate(const geometry_msgs::msg::PoseStamped & tfpose)\n{\n  double disterr = 0, angleerr = 0;\n  computeCurrentEuclideanAndAngularErrorsToCarrotGoal(tfpose, disterr, angleerr);\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[BackwardLocalPlanner] Divergence check. carrot goal distance. was: \"\n                         << divergenceDetectionLastCarrotLinearDistance_\n                         << \", now it is: \" << disterr);\n  if (disterr > divergenceDetectionLastCarrotLinearDistance_)\n  {\n    // candidate of divergence, we do not throw the divergence alarm yet\n    // but we neither update the distance since it is worse than the one\n    // we had previously with the same carrot.\n    const double MARGIN_FACTOR = 1.2;\n    if (disterr > MARGIN_FACTOR * divergenceDetectionLastCarrotLinearDistance_)\n    {\n      RCLCPP_ERROR_STREAM(\n        nh_->get_logger(),\n        \"[BackwardLocalPlanner] Divergence detected. The same carrot goal distance was previously: \"\n          << divergenceDetectionLastCarrotLinearDistance_ << \"but now it is: \" << disterr);\n      return true;\n    }\n    else\n    {\n      // divergence candidate\n      return false;\n    }\n  }\n  else\n  {\n    // update:\n    divergenceDetectionLastCarrotLinearDistance_ = disterr;\n    return false;\n  }\n}\n\nbool BackwardLocalPlanner::checkCarrotHalfPlainConstraint(\n  const geometry_msgs::msg::PoseStamped & tfpose)\n{\n  // this function is specially useful when we want to reach the goal with a lot\n  // of precision. We may pass the goal and then the controller enters in some\n  // unstable state. With this, we are able to detect when stop moving.\n\n  // only apply if the carrot is in goal position and also if we are not in a pure spinning behavior v!=0\n\n  auto & carrot_pose = backwardsPlanPath_[currentCarrotPoseIndex_];\n  const geometry_msgs::msg::Point & carrot_point = carrot_pose.pose.position;\n  double yaw = tf2::getYaw(carrot_pose.pose.orientation);\n\n  // direction vector\n  double vx = cos(yaw);\n  double vy = sin(yaw);\n\n  // line implicit equation\n  // ax + by + c = 0\n  double c = -vx * carrot_point.x - vy * carrot_point.y;\n  const double C_OFFSET_METERS = 0.05;  // 5 cm\n  double check = vx * tfpose.pose.position.x + vy * tfpose.pose.position.y + c + C_OFFSET_METERS;\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(),\n    \"[BackwardLocalPlanner] half plane constraint:\" << vx << \"*\" << carrot_point.x << \" + \" << vy\n                                                    << \"*\" << carrot_point.y << \" + \" << c);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[BackwardLocalPlanner] constraint evaluation: \"\n                         << vx << \"*\" << tfpose.pose.position.x << \" + \" << vy << \"*\"\n                         << tfpose.pose.position.y << \" + \" << c << \" = \" << check);\n\n  return check < 0;\n}\n\nbool BackwardLocalPlanner::checkCurrentPoseInGoalRange(\n  const geometry_msgs::msg::PoseStamped & tfpose,\n  const geometry_msgs::msg::Twist & /*currentTwist*/, double angle_error, bool & linearGoalReached,\n  nav2_core::GoalChecker * /*goal_checker*/)\n{\n  auto & finalgoal = backwardsPlanPath_.back();\n  double gdx = finalgoal.pose.position.x - tfpose.pose.position.x;\n  double gdy = finalgoal.pose.position.y - tfpose.pose.position.y;\n  double goaldist = sqrt(gdx * gdx + gdy * gdy);\n\n  auto abs_angle_error = fabs(angle_error);\n  // final_alpha_error =\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[BackwardLocalPlanner] goal check. linear dist: \"\n                         << goaldist << \"(\" << this->xy_goal_tolerance_ << \")\" << \", angular dist: \"\n                         << abs_angle_error << \"(\" << this->yaw_goal_tolerance_ << \")\");\n\n  linearGoalReached = goaldist < this->xy_goal_tolerance_;\n\n  return linearGoalReached && abs_angle_error < this->yaw_goal_tolerance_;\n  // return goal_checker->isGoalReached(tfpose.pose, finalgoal.pose, currentTwist);\n}\n\n/**\n ******************************************************************************************************************\n * pureSpinningCmd()\n ******************************************************************************************************************\n */\nvoid BackwardLocalPlanner::straightBackwardsAndPureSpinCmd(\n  const geometry_msgs::msg::PoseStamped & /*tfpose*/, double & vetta, double & gamma,\n  double alpha_error, double betta_error, double rho_error)\n{\n  if (rho_error > linear_mode_rho_error_threshold_)  // works in straight motion mode\n  {\n    vetta = k_rho_ * rho_error;\n    gamma = k_alpha_ * alpha_error;\n  }\n  else if (fabs(betta_error) >= this->yaw_goal_tolerance_)  // works in pure spinning mode\n  {\n    vetta = 0;  // disable linear\n    gamma = k_betta_ * betta_error;\n  }\n}\n\n/**\n ******************************************************************************************************************\n * computeVelocityCommands()\n ******************************************************************************************************************\n */\ngeometry_msgs::msg::TwistStamped BackwardLocalPlanner::computeVelocityCommands(\n  const geometry_msgs::msg::PoseStamped & pose, const geometry_msgs::msg::Twist & velocity,\n  nav2_core::GoalChecker * goal_checker)\n{\n  RCLCPP_INFO(\n    nh_->get_logger(),\n    \"[BackwardLocalPlanner] ------------------- LOCAL PLANNER LOOP -----------------\");\n  this->updateParameters();\n\n  // consistency check\n  if (this->backwardsPlanPath_.size() > 0)\n  {\n    RCLCPP_INFO_STREAM(\n      nh_->get_logger(), \"[BackwardLocalPlanner] Current pose frame id: \"\n                           << backwardsPlanPath_.front().header.frame_id\n                           << \", path pose frame id: \" << pose.header.frame_id);\n\n    if (backwardsPlanPath_.front().header.frame_id != pose.header.frame_id)\n    {\n      RCLCPP_ERROR_STREAM(nh_->get_logger(), \"[BackwardLocalPlanner] Inconsistent frames\");\n    }\n  }\n\n  // xy_goal_tolerance and yaw_goal_tolerance are just used for logging proposes and clamping the carrot\n  // goal distance (parameter safety)\n  if (xy_goal_tolerance_ == -1 || yaw_goal_tolerance_ == -1)\n  {\n    geometry_msgs::msg::Pose posetol;\n    geometry_msgs::msg::Twist twistol;\n    if (goal_checker->getTolerances(posetol, twistol))\n    {\n      xy_goal_tolerance_ = posetol.position.x;\n      yaw_goal_tolerance_ = tf2::getYaw(posetol.orientation);\n      //xy_goal_tolerance_ = posetol.position.x * 0.35;  // WORKAROUND ISSUE GOAL CHECKER NAV_CONTROLLER DIFF\n      //yaw_goal_tolerance_ = tf2::getYaw(posetol.orientation) * 0.35;\n      RCLCPP_INFO_STREAM(\n        nh_->get_logger(), \"[BackwardLocalPlanner] xy_goal_tolerance_: \"\n                             << xy_goal_tolerance_\n                             << \", yaw_goal_tolerance_: \" << yaw_goal_tolerance_);\n    }\n    else\n    {\n      RCLCPP_INFO_STREAM(\n        nh_->get_logger(), \"[BackwardLocalPlanner] could not get tolerances from goal checker\");\n    }\n  }\n\n  RCLCPP_INFO(\n    nh_->get_logger(),\n    \"[BackwardLocalPlanner] ------------------- LOCAL PLANNER LOOP -----------------\");\n\n  geometry_msgs::msg::TwistStamped cmd_vel;\n  RCLCPP_INFO(nh_->get_logger(), \"[BackwardLocalPlanner] LOCAL PLANNER LOOP\");\n  geometry_msgs::msg::PoseStamped paux;\n  geometry_msgs::msg::PoseStamped tfpose;\n\n  if (!costmapRos_->getRobotPose(tfpose))\n  {\n    RCLCPP_ERROR(\n      nh_->get_logger(),\n      \"[BackwardLocalPlanner] missing robot pose, canceling compute Velocity Command\");\n  }  // it is not working in the pure spinning reel example, maybe the hyperplane check is enough\n  bool divergenceDetected = false;\n\n  bool emergency_stop = false;\n  if (divergenceDetected)\n  {\n    RCLCPP_ERROR(\n      nh_->get_logger(), \"[BackwardLocalPlanner] Divergence detected. Sending emergency stop.\");\n    emergency_stop = true;\n  }\n\n  bool carrotInLinearGoalRange = updateCarrotGoal(tfpose);\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[BackwardLocalPlanner] carrot goal created\");\n\n  if (emergency_stop)\n  {\n    cmd_vel.twist.linear.x = 0;\n    cmd_vel.twist.angular.z = 0;\n    RCLCPP_INFO_STREAM(\n      nh_->get_logger(), \"[BackwardLocalPlanner] emergency stop, exit compute commands\");\n    // return false;\n    return cmd_vel;\n  }\n\n  // ------ Evaluate the current context ----\n  double rho_error, betta_error, alpha_error;\n\n  // getting carrot goal information\n  tf2::Quaternion q;\n  tf2::convert(tfpose.pose.orientation, q);\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[BackwardLocalPlanner] carrot goal: \" << currentCarrotPoseIndex_ << \"/\"\n                                                              << backwardsPlanPath_.size());\n  const geometry_msgs::msg::PoseStamped & carrotgoalpose =\n    backwardsPlanPath_[currentCarrotPoseIndex_];\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[BackwardLocalPlanner] carrot goal pose current index: \"\n                         << currentCarrotPoseIndex_ << \"/\" << backwardsPlanPath_.size() << \": \"\n                         << carrotgoalpose);\n  const geometry_msgs::msg::Point & carrotGoalPosition = carrotgoalpose.pose.position;\n\n  tf2::Quaternion goalQ;\n  tf2::fromMsg(carrotgoalpose.pose.orientation, goalQ);\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[BackwardLocalPlanner] -- Control Policy --\");\n  // goal orientation (global frame)\n  double betta = tf2::getYaw(goalQ);\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[BackwardLocalPlanner] goal orientation: \" << betta);\n  betta = betta + betta_offset_;\n\n  double dx = carrotGoalPosition.x - tfpose.pose.position.x;\n  double dy = carrotGoalPosition.y - tfpose.pose.position.y;\n\n  // distance error to the targetpoint\n  rho_error = sqrt(dx * dx + dy * dy);\n\n  // heading to goal angle\n  double theta = tf2::getYaw(q);\n  double alpha = atan2(dy, dx);\n  alpha = alpha + alpha_offset_;\n\n  alpha_error = angles::shortest_angular_distance(alpha, theta);\n  betta_error = angles::shortest_angular_distance(betta, theta);\n  //------------- END CONTEXT EVAL ----------\n\n  bool linearGoalReached;\n  bool currentPoseInGoal =\n    checkCurrentPoseInGoalRange(tfpose, velocity, betta_error, linearGoalReached, goal_checker);\n\n  // Make sure the robot is very close to the goal and it is really in the the last goal point.\n  bool carrotInFinalGoalIndex = currentCarrotPoseIndex_ == (int)backwardsPlanPath_.size() - 1;\n\n  // checking if we are really in the end goal pose\n  if (currentPoseInGoal && carrotInFinalGoalIndex)\n  {\n    goalReached_ = true;\n    // backwardsPlanPath_.clear();\n    RCLCPP_INFO_STREAM(\n      nh_->get_logger(),\n      \"[BackwardLocalPlanner] GOAL REACHED. Send stop command and skipping trajectory collision: \"\n        << cmd_vel.twist);\n    cmd_vel.twist.linear.x = 0;\n    cmd_vel.twist.angular.z = 0;\n    return cmd_vel;\n  }\n  else if (\n    carrotInLinearGoalRange &&\n    linearGoalReached)  // checking if we are in the end goal point but with incorrect\n                        // orientation\n  {\n    // this means that we are not in the final angular distance, and we may even not be in the last carrot index\n    // (several intermediate angular poses until the last goal pose)\n    inGoalPureSpinningState_ = true;\n  }\n\n  // --------------------\n  double vetta, gamma;\n  if (straightBackwardsAndPureSpinningMode_)\n  {\n    // decorated control rule for this mode\n    this->straightBackwardsAndPureSpinCmd(\n      tfpose, vetta, gamma, alpha_error, betta_error, rho_error);\n  }\n  else  // default free navigation backward motion mode\n  {\n    // regular control rule\n    vetta = k_rho_ * rho_error;\n    gamma = k_alpha_ * alpha_error + k_betta_ * betta_error;\n\n    // Even if we are in free navigation, we can enter in the pure spinning state.\n    // then, the linear motion is deactivated.\n    if (inGoalPureSpinningState_)\n    {\n      RCLCPP_INFO(\n        nh_->get_logger(),\n        \"[BackwardLocalPlanner] we entered in a pure spinning state even in not pure-spining \"\n        \"configuration, \"\n        \"carrotDistanceGoalReached: %d\",\n        carrotInLinearGoalRange);\n      gamma = k_betta_ * betta_error;\n      vetta = 0;\n    }\n\n    // classical control to reach a goal backwards\n  }\n\n  // Apply command and Clamp to limits\n  cmd_vel.twist.linear.x = vetta;\n  cmd_vel.twist.angular.z = gamma;\n\n  if (cmd_vel.twist.linear.x > max_linear_x_speed_)\n  {\n    cmd_vel.twist.linear.x = max_linear_x_speed_;\n  }\n  else if (cmd_vel.twist.linear.x < -max_linear_x_speed_)\n  {\n    cmd_vel.twist.linear.x = -max_linear_x_speed_;\n  }\n\n  if (cmd_vel.twist.angular.z > max_angular_z_speed_)\n  {\n    cmd_vel.twist.angular.z = max_angular_z_speed_;\n  }\n  else if (cmd_vel.twist.angular.z < -max_angular_z_speed_)\n  {\n    cmd_vel.twist.angular.z = -max_angular_z_speed_;\n  }\n\n  publishGoalMarker(carrotGoalPosition.x, carrotGoalPosition.y, betta);\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[BackwardLocalPlanner] local planner,\"\n                         << std::endl\n                         << \" current pose in goal: \" << currentPoseInGoal << std::endl\n                         << \" carrot in final goal index: \" << carrotInFinalGoalIndex << std::endl\n                         << \" carrot in linear goal range: \" << carrotInLinearGoalRange << std::endl\n                         << \" straightAnPureSpiningMode: \" << straightBackwardsAndPureSpinningMode_\n                         << std::endl\n                         << \" inGoalPureSpinningState: \" << inGoalPureSpinningState_ << std::endl\n                         << \" theta: \" << theta << std::endl\n                         << \" betta: \" << theta << std::endl\n                         << \" err_x: \" << dx << std::endl\n                         << \" err_y:\" << dy << std::endl\n                         << \" rho_error:\" << rho_error << std::endl\n                         << \" alpha_error:\" << alpha_error << std::endl\n                         << \" betta_error:\" << betta_error << std::endl\n                         << \" vetta:\" << vetta << std::endl\n                         << \" gamma:\" << gamma << std::endl\n                         << \" cmd_vel.lin.x:\" << cmd_vel.twist.linear.x << std::endl\n                         << \" cmd_vel.ang.z:\" << cmd_vel.twist.angular.z);\n\n  if (inGoalPureSpinningState_)\n  {\n    bool carrotHalfPlaneConstraintFailure = checkCarrotHalfPlainConstraint(tfpose);\n\n    if (carrotHalfPlaneConstraintFailure)\n    {\n      RCLCPP_ERROR(\n        nh_->get_logger(),\n        \"[BackwardLocalPlanner] CarrotHalfPlaneConstraintFailure detected. Sending \"\n        \"emergency stop and success to the planner.\");\n      cmd_vel.twist.linear.x = 0;\n    }\n  }\n\n  // ---------------------- TRAJECTORY PREDICTION AND COLLISION AVOIDANCE ---------------------\n  // cmd_vel.twist.linear.x=0;\n  // cmd_vel.twist.angular.z = 0;\n\n  geometry_msgs::msg::PoseStamped global_pose;\n  costmapRos_->getRobotPose(global_pose);\n\n  auto * costmap2d = costmapRos_->getCostmap();\n  auto yaw = tf2::getYaw(global_pose.pose.orientation);\n\n  auto & pos = global_pose.pose.position;\n\n  Eigen::Vector3f currentpose(pos.x, pos.y, yaw);\n  Eigen::Vector3f currentvel(\n    cmd_vel.twist.linear.x, cmd_vel.twist.linear.y, cmd_vel.twist.angular.z);\n  std::vector<Eigen::Vector3f> trajectory;\n  this->generateTrajectory(\n    currentpose, currentvel, 0.8 /*meters*/, M_PI / 8 /*rads*/, 3.0 /*seconds*/, 0.05 /*seconds*/,\n    trajectory);\n\n  // check plan rejection\n  bool acceptedLocalTrajectoryFreeOfObstacles = true;\n\n  unsigned int mx, my;\n\n  if (this->enable_obstacle_checking_)\n  {\n    if (backwardsPlanPath_.size() > 0)\n    {\n      auto & finalgoalpose = backwardsPlanPath_.back();\n\n      int i = 0;\n      // RCLCPP_INFO_STREAM(nh_->get_logger(), \"lplanner goal: \" << finalgoalpose.pose.position);\n      geometry_msgs::msg::Twist mockzerospeed;\n\n      for (auto & p : trajectory)\n      {\n        /*geometry_msgs::msg::Pose pg;\n        pg.position.x = p[0];\n        pg.position.y = p[1];\n        tf2::Quaternion q;\n        q.setRPY(0, 0, p[2]);\n        pg.orientation = tf2::toMsg(q);\n\n        // WARNING I CAN'T USE isGoalReached because I can change the state of a stateful goal checker\n        if (goal_checker->isGoalReached(pg, finalgoalpose.pose, mockzerospeed))*/\n\n        float dx = p[0] - finalgoalpose.pose.position.x;\n        float dy = p[1] - finalgoalpose.pose.position.y;\n\n        float dst = sqrt(dx * dx + dy * dy);\n        if (dst < xy_goal_tolerance_)\n        {\n          RCLCPP_INFO(\n            nh_->get_logger(),\n            \"[BackwardLocalPlanner] trajectory simulation for collision checking: goal \"\n            \"reached with no collision\");\n          break;\n        }\n\n        costmap2d->worldToMap(p[0], p[1], mx, my);\n        //         unsigned int cost = costmap2d->getCost(mx, my);\n\n        // RCLCPP_INFO(nh_->get_logger(),\"[BackwardLocalPlanner] checking cost pt %d [%lf, %lf] cell[%d,%d] = %d\", i,\n        // p[0], p[1], mx, my, cost); RCLCPP_INFO_STREAM(nh_->get_logger(), \"[BackwardLocalPlanner] cost: \" << cost);\n\n        // static const unsigned char NO_INFORMATION = 255;\n        // static const unsigned char LETHAL_OBSTACLE = 254;\n        // static const unsigned char INSCRIBED_INFLATED_OBSTACLE = 253;\n        // static const unsigned char FREE_SPACE = 0;\n\n        if (costmap2d->getCost(mx, my) >= nav2_costmap_2d::INSCRIBED_INFLATED_OBSTACLE)\n        {\n          acceptedLocalTrajectoryFreeOfObstacles = false;\n          RCLCPP_WARN_STREAM(\n            nh_->get_logger(),\n            \"[BackwardLocalPlanner] ABORTED LOCAL PLAN BECAUSE OBSTACLE DETEDTED at point \"\n              << i << \"/\" << trajectory.size() << std::endl\n              << p[0] << \", \" << p[1]);\n          break;\n        }\n        i++;\n      }\n    }\n    else\n    {\n      RCLCPP_WARN(\n        nh_->get_logger(), \"[BackwardLocalPlanner] Abort local - Backwards global plan size: %ld\",\n        backwardsPlanPath_.size());\n      cmd_vel.twist.angular.z = 0;\n      cmd_vel.twist.linear.x = 0;\n      // return false;\n    }\n  }\n\n  if (acceptedLocalTrajectoryFreeOfObstacles)\n  {\n    waiting_ = false;\n    RCLCPP_INFO(\n      nh_->get_logger(),\n      \"[BackwardLocalPlanner] accepted local trajectory free of obstacle. Local planner \"\n      \"continues.\");\n    return cmd_vel;\n    // return true;\n  }\n  else  // that is not appceted because existence of obstacles\n  {\n    // emergency stop for collision: waiting a while before sending error\n    cmd_vel.twist.linear.x = 0;\n    cmd_vel.twist.angular.z = 0;\n\n    if (waiting_ == false)\n    {\n      waiting_ = true;\n      waitingStamp_ = nh_->now();\n      RCLCPP_WARN(\n        nh_->get_logger(), \"[BackwardLocalPlanner][Not accepted local plan] starting countdown\");\n    }\n    else\n    {\n      auto waitingduration = nh_->now() - waitingStamp_;\n\n      if (waitingduration > this->waitingTimeout_)\n      {\n        RCLCPP_WARN(\n          nh_->get_logger(), \"[BackwardLocalPlanner][Abort local] timeout! duration %lf/%f\",\n          waitingduration.seconds(), waitingTimeout_.seconds());\n        // return false;\n        cmd_vel.twist.linear.x = 0;\n        cmd_vel.twist.angular.z = 0;\n        return cmd_vel;\n      }\n    }\n\n    return cmd_vel;\n  }\n}\n\n/**\n ******************************************************************************************************************\n * isGoalReached()\n ******************************************************************************************************************\n */\nbool BackwardLocalPlanner::isGoalReached()\n{\n  RCLCPP_INFO(nh_->get_logger(), \"[BackwardLocalPlanner] isGoalReached call\");\n  return goalReached_;\n}\n\nbool BackwardLocalPlanner::findInitialCarrotGoal(geometry_msgs::msg::PoseStamped & tfpose)\n{\n  double lineardisterr, angleerr;\n  bool inCarrotRange = false;\n\n  // initial state check\n  computeCurrentEuclideanAndAngularErrorsToCarrotGoal(tfpose, lineardisterr, angleerr);\n\n  // double minpointdist = std::numeric_limits<double>::max();\n\n  // lets set the carrot-goal in the correct place with this loop\n  while (currentCarrotPoseIndex_ < (int)backwardsPlanPath_.size() && !inCarrotRange)\n  {\n    computeCurrentEuclideanAndAngularErrorsToCarrotGoal(tfpose, lineardisterr, angleerr);\n\n    RCLCPP_INFO(\n      nh_->get_logger(),\n      \"[BackwardLocalPlanner] Finding initial carrot goal i=%d - error to carrot, linear = %lf \"\n      \"(%lf), \"\n      \"angular : %lf (%lf)\",\n      currentCarrotPoseIndex_, lineardisterr, carrot_distance_, angleerr, carrot_angular_distance_);\n\n    // current path point is inside the carrot distance range, goal carrot tries to escape!\n    if (lineardisterr < carrot_distance_ && angleerr < carrot_angular_distance_)\n    {\n      RCLCPP_INFO(\n        nh_->get_logger(),\n        \"[BackwardLocalPlanner] Finding initial carrot goal i=%d - in carrot Range\",\n        currentCarrotPoseIndex_);\n      inCarrotRange = true;\n      // we are inside the goal range\n    }\n    else if (\n      inCarrotRange && (lineardisterr > carrot_distance_ || angleerr > carrot_angular_distance_))\n    {\n      // we were inside the carrot range but not anymore, now we are just leaving. we want to continue forward\n      // (currentCarrotPoseIndex_++) unless we go out of the carrot range\n\n      // but we rollback last index increment (to go back inside the carrot goal scope) and start motion with that\n      // carrot goal we found\n      currentCarrotPoseIndex_--;\n      break;\n    }\n    else\n    {\n      RCLCPP_INFO(\n        nh_->get_logger(),\n        \"[BackwardLocalPlanner] Finding initial carrot goal i=%d - carrot out of range, searching \"\n        \"coincidence...\",\n        currentCarrotPoseIndex_);\n    }\n\n    currentCarrotPoseIndex_++;\n    RCLCPP_INFO_STREAM(\n      nh_->get_logger(), \"[BackwardLocalPlanner] setPlan: fw\" << currentCarrotPoseIndex_);\n  }\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[BackwardLocalPlanner] setPlan: (found first carrot:\"\n                         << inCarrotRange << \") initial carrot point index: \"\n                         << currentCarrotPoseIndex_ << \"/\" << backwardsPlanPath_.size());\n\n  return inCarrotRange;\n}\n\nbool BackwardLocalPlanner::resamplePrecisePlan()\n{\n  // this algorithm is really important to have a precise carrot (linear or angular)\n  // and not being considered as a divergence from the path\n\n  RCLCPP_INFO(nh_->get_logger(), \"[BackwardLocalPlanner] resample precise\");\n  if (backwardsPlanPath_.size() <= 1)\n  {\n    RCLCPP_INFO_STREAM(\n      nh_->get_logger(),\n      \"[BackwardLocalPlanner] resample precise skipping, size: \" << backwardsPlanPath_.size());\n    return false;\n  }\n\n  int counter = 0;\n  double maxallowedAngularError = 0.45 * this->carrot_angular_distance_;  // nyquist\n  double maxallowedLinearError = 0.45 * this->carrot_distance_;           // nyquist\n\n  for (int i = 0; i < (int)backwardsPlanPath_.size() - 1; i++)\n  {\n    RCLCPP_INFO_STREAM(nh_->get_logger(), \"[BackwardLocalPlanner] resample precise, check: \" << i);\n    auto & currpose = backwardsPlanPath_[i];\n    auto & nextpose = backwardsPlanPath_[i + 1];\n\n    tf2::Quaternion qCurrent, qNext;\n    tf2::convert(currpose.pose.orientation, qCurrent);\n    tf2::convert(nextpose.pose.orientation, qNext);\n\n    double dx = nextpose.pose.position.x - currpose.pose.position.x;\n    double dy = nextpose.pose.position.y - currpose.pose.position.y;\n    double dist = sqrt(dx * dx + dy * dy);\n\n    bool resample = false;\n    if (dist > maxallowedLinearError)\n    {\n      RCLCPP_INFO_STREAM(\n        nh_->get_logger(), \"[BackwardLocalPlanner] resampling point, linear distance:\"\n                             << dist << \"(\" << maxallowedLinearError << \")\" << i);\n      resample = true;\n    }\n    else\n    {\n      double currentAngle = tf2::getYaw(qCurrent);\n      double nextAngle = tf2::getYaw(qNext);\n\n      double angularError = fabs(angles::shortest_angular_distance(currentAngle, nextAngle));\n      if (angularError > maxallowedAngularError)\n      {\n        resample = true;\n        RCLCPP_INFO_STREAM(\n          nh_->get_logger(), \"[BackwardLocalPlanner] resampling point, angular distance:\"\n                               << angularError << \"(\" << maxallowedAngularError << \")\" << i);\n      }\n    }\n\n    if (resample)\n    {\n      geometry_msgs::msg::PoseStamped pintermediate;\n      auto duration = rclcpp::Time(nextpose.header.stamp) - rclcpp::Time(currpose.header.stamp);\n\n      pintermediate.header.frame_id = currpose.header.frame_id;\n      pintermediate.header.stamp = rclcpp::Time(currpose.header.stamp) + duration * 0.5;\n\n      pintermediate.pose.position.x = 0.5 * (currpose.pose.position.x + nextpose.pose.position.x);\n      pintermediate.pose.position.y = 0.5 * (currpose.pose.position.y + nextpose.pose.position.y);\n      pintermediate.pose.position.z = 0.5 * (currpose.pose.position.z + nextpose.pose.position.z);\n      tf2::Quaternion intermediateQuat = tf2::slerp(qCurrent, qNext, 0.5);\n      pintermediate.pose.orientation = tf2::toMsg(intermediateQuat);\n\n      this->backwardsPlanPath_.insert(this->backwardsPlanPath_.begin() + i + 1, pintermediate);\n\n      // retry this point\n      i--;\n      counter++;\n    }\n  }\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[BackwardLocalPlanner] End resampling. resampled:\" << counter\n                                                                           << \" new inserted poses \"\n                                                                              \"during precise \"\n                                                                              \"resmapling.\");\n  return true;\n}\n\n/**\n ******************************************************************************************************************\n * setPlan()\n ******************************************************************************************************************\n */\nvoid BackwardLocalPlanner::setPlan(const nav_msgs::msg::Path & path)\n{\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(),\n    \"[BackwardLocalPlanner] setPlan: new global plan received ( \" << path.poses.size() << \")\");\n\n  //------------- TRANSFORM TO LOCAL FRAME PATH ---------------------------\n  nav_msgs::msg::Path transformedPlan;\n  rclcpp::Duration ttol = rclcpp::Duration::from_seconds(transform_tolerance_);\n  // transform global plan to the navigation reference frame\n  for (auto & p : path.poses)\n  {\n    geometry_msgs::msg::PoseStamped transformedPose;\n    nav_2d_utils::transformPose(tf_, costmapRos_->getGlobalFrameID(), p, transformedPose, ttol);\n    transformedPose.header.frame_id = costmapRos_->getGlobalFrameID();\n    transformedPlan.poses.push_back(transformedPose);\n  }\n\n  backwardsPlanPath_ = transformedPlan.poses;\n\n  // --------- resampling path feature -----------\n  geometry_msgs::msg::PoseStamped tfpose;\n  if (!costmapRos_->getRobotPose(tfpose))\n  {\n    RCLCPP_ERROR(nh_->get_logger(), \"Failure getting pose from Backward local planner\");\n    return;\n  }\n\n  geometry_msgs::msg::PoseStamped posestamped = tfpose;\n  backwardsPlanPath_.insert(backwardsPlanPath_.begin(), posestamped);\n  this->resamplePrecisePlan();\n\n  nav_msgs::msg::Path planMsg;\n  planMsg.poses = backwardsPlanPath_;\n  planMsg.header.frame_id = costmapRos_->getGlobalFrameID();\n  planMsg.header.stamp = nh_->now();\n  planPub_->publish(planMsg);\n\n  // ------ reset controller state ----------------------\n  goalReached_ = false;\n  inGoalPureSpinningState_ = false;\n  currentCarrotPoseIndex_ = 0;\n  this->resetDivergenceDetection();\n\n  if (path.poses.size() == 0)\n  {\n    RCLCPP_INFO_STREAM(nh_->get_logger(), \"[BackwardLocalPlanner] received plan without any pose\");\n    // return true;\n    return;\n  }\n\n  // -------- initialize carrot ----------------\n  bool foundInitialCarrotGoal = this->findInitialCarrotGoal(tfpose);\n  if (!foundInitialCarrotGoal)\n  {\n    RCLCPP_ERROR(\n      nh_->get_logger(),\n      \"[BackwardLocalPlanner] new plan rejected. The initial point in the global path is \"\n      \"too much far away from the current state (according to carrot_distance \"\n      \"parameter)\");\n    // return false; // in this case, the new plan broke the current execution\n    return;\n  }\n  else\n  {\n    this->divergenceDetectionUpdate(tfpose);\n    // SANDARD AND PREFERRED CASE ON NEW PLAN\n    // return true;\n    return;\n  }\n}\n\nvoid BackwardLocalPlanner::generateTrajectory(\n  const Eigen::Vector3f & pos, const Eigen::Vector3f & vel, float maxdist, float maxanglediff,\n  float maxtime, float dt, std::vector<Eigen::Vector3f> & outtraj)\n{\n  // simulate the trajectory and check for collisions, updating costs along the way\n  bool end = false;\n  float time = 0;\n  Eigen::Vector3f currentpos = pos;\n  int i = 0;\n  while (!end)\n  {\n    // add the point to the trajectory so we can draw it later if we want\n    // traj.addPoint(pos[0], pos[1], pos[2]);\n\n    // if (continued_acceleration_) {\n    //   //calculate velocities\n    //   loop_vel = computeNewVelocities(sample_target_vel, loop_vel, limits_->getAccLimits(), dt);\n    //   //RCLCPP_WARN_NAMED(nh_->get_logger(), \"Generator\", \"Flag: %d, Loop_Vel %f, %f, %f\", continued_acceleration_,\n    //   loop_vel[0], loop_vel[1], loop_vel[2]);\n    // }\n\n    auto loop_vel = vel;\n    // update the position of the robot using the velocities passed in\n    auto newpos = computeNewPositions(currentpos, loop_vel, dt);\n\n    auto dx = newpos[0] - currentpos[0];\n    auto dy = newpos[1] - currentpos[1];\n    float dist, angledist;\n\n    // RCLCPP_INFO(nh_->get_logger(), \"traj point %d\", i);\n    dist = sqrt(dx * dx + dy * dy);\n    if (dist > maxdist)\n    {\n      end = true;\n      // RCLCPP_INFO(nh_->get_logger(), \"dist break: %f\", dist);\n    }\n    else\n    {\n      // ouble from, double to\n      angledist = angles::shortest_angular_distance(currentpos[2], newpos[2]);\n      if (angledist > maxanglediff)\n      {\n        end = true;\n        // RCLCPP_INFO(nh_->get_logger(), \"angle dist break: %f\", angledist);\n      }\n      else\n      {\n        outtraj.push_back(newpos);\n\n        time += dt;\n        if (time > maxtime)\n        {\n          end = true;\n          // RCLCPP_INFO(nh_->get_logger(), \"time break: %f\", time);\n        }\n\n        // RCLCPP_INFO(nh_->get_logger(), \"dist: %f, angledist: %f, time: %f\", dist, angledist, time);\n      }\n    }\n\n    currentpos = newpos;\n    i++;\n  }  // end for simulation steps\n}\n\nEigen::Vector3f BackwardLocalPlanner::computeNewPositions(\n  const Eigen::Vector3f & pos, const Eigen::Vector3f & vel, double dt)\n{\n  Eigen::Vector3f new_pos = Eigen::Vector3f::Zero();\n  new_pos[0] = pos[0] + (vel[0] * cos(pos[2]) + vel[1] * cos(M_PI_2 + pos[2])) * dt;\n  new_pos[1] = pos[1] + (vel[0] * sin(pos[2]) + vel[1] * sin(M_PI_2 + pos[2])) * dt;\n  new_pos[2] = pos[2] + vel[2] * dt;\n  return new_pos;\n}\n\nvoid BackwardLocalPlanner::clearMarkers()\n{\n  visualization_msgs::msg::Marker marker;\n  marker.header.frame_id = this->costmapRos_->getGlobalFrameID();\n  marker.header.stamp = nh_->now();\n\n  marker.ns = \"my_namespace2\";\n  marker.id = 0;\n  marker.type = visualization_msgs::msg::Marker::ARROW;\n  marker.action = visualization_msgs::msg::Marker::DELETEALL;\n\n  visualization_msgs::msg::MarkerArray ma;\n  ma.markers.push_back(marker);\n\n  goalMarkerPublisher_->publish(ma);\n}\n\n/**\n ******************************************************************************************************************\n * publishGoalMarker()\n ******************************************************************************************************************\n */\nvoid BackwardLocalPlanner::publishGoalMarker(double x, double y, double phi)\n{\n  visualization_msgs::msg::Marker marker;\n  marker.header.frame_id = this->costmapRos_->getGlobalFrameID();\n  marker.header.stamp = nh_->now();\n\n  marker.ns = \"my_namespace2\";\n  marker.id = 0;\n  marker.type = visualization_msgs::msg::Marker::ARROW;\n  marker.action = visualization_msgs::msg::Marker::ADD;\n  marker.lifetime = rclcpp::Duration(1.0s);\n\n  marker.pose.orientation.w = 1;\n\n  marker.scale.x = 0.05;\n  marker.scale.y = 0.15;\n  marker.scale.z = 0.05;\n  marker.color.a = 1.0;\n\n  // red marker\n  marker.color.r = 1;\n  marker.color.g = 0;\n  marker.color.b = 0;\n\n  geometry_msgs::msg::Point start, end;\n  start.x = x;\n  start.y = y;\n\n  end.x = x + 0.5 * cos(phi);\n  end.y = y + 0.5 * sin(phi);\n\n  marker.points.push_back(start);\n  marker.points.push_back(end);\n\n  visualization_msgs::msg::MarkerArray ma;\n  ma.markers.push_back(marker);\n\n  goalMarkerPublisher_->publish(ma);\n}\n}  // namespace backward_local_planner\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/forward_global_planner/CHANGELOG.rst",
    "content": "Changelog for package forward_global_planner\n===============================================\n\nVersion 2.3.16 (2023-07-16)\n---------------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2` into humble.\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for a weird issue with ros buildfarm.\n  - Further work on the buildfarm issue.\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n- Contributors: brettpac, pabloinigoblasco\n\nVersion 2.3.6 (2023-03-12)\n--------------------------\n### No changes listed.\n\nVersion 1.22.1 (2022-11-09)\n---------------------------\n### Added\n- Pre-release.\n- Contributors: pabloinigoblasco\n\n### No changes listed.\n\nVersion 0.3.0 (2022-04-04)\n--------------------------\n### No changes listed.\n\nVersion 0.0.0 (2022-11-09)\n---------------------------\n### Added\n- Publisher.\n- Reverted \"Ignore packages which should not be released.\"\n- Ignored packages that should not be released.\n- Feature/master rolling to galactic backport (#236)\n  - Updated mentions of SMACC/ROS to SMACC2/ROS2.\n  - Progress on navigation rolling.\n  - Renamed folders, deleted tracing.md, edited README.md.\n  - Added smacc2_performance_tools.\n  - Performance tests improvements.\n  - Format cleanup for sm_respira_1.\n  - More format cleanup for sm_respira_1 pre-commit.\n  - Added sm_respira_test_2.\n  - More changes on performance tests.\n  - Do not execute clang-format on smacc2_sm_reference_library package.\n  - Reformatted sm_reference_library.\n  - Corrected trailing spaces.\n  - Added sm_atomic_24hr.\n  - Added sm_atomic_performance_trace_1.\n  - Updated smacc2_rta command across readmes.\n  - Cleaned up sm_atomic_24hr.\n  - More cleanup for sm_atomic_24hr.\n  - Optimized dependencies in move_base_z_planners_common.\n  - Renamed event generator library.\n  - Minor formatting.\n  - Added galactic CI setup and renamed rolling files (#58).\n  - Fixed source CI and corrected README overview (#62).\n  - Updated c_cpp_properties.json.\n  - Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n  - Updated doxygen links (#70).\n  - More Readme Updates (#72).\n  - More Readme (#74).\n  - Created new sm from sm_respira_1 (#76).\n  - Feature/core and navigation fixes (#78).\n  - Base for the sm_aws_aarehouse navigation.\n  - Progress in aws navigation.\n  - Several core improvements during navigation testing.\n  - Formatting improvements.\n  - Progress in aws navigation demo.\n  - Feature/aws demo progress (#80).\n  - More on navigation.\n  - Reworked sm_advanced_recovery_1 (#83).\n  - More work on sm_advanced_recovery_1 (#84).\n  - More sm_advanced_recovery_1 work (#85).\n  - Round 4 of sm_advanced_recovery_1 (#86).\n  - Brettpac branch (#87).\n  - Added sm_atomic_performance_test_a_2.\n  - Added sm_atomic_performance_test_a_1.\n  - Added sm_atomic_performance_test_c_1 (#88).\n  - Modified sm_atomic_performance_test_a_2 (#89).\n  - Added sm_multi_stage_1.\n  - More sm_multi_stage_1 (#91).\n  - Updated README.md.\n  - Added new feature, cb_wait_topic_message: asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n  - Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic and waiting for them to be alive. You can optionally select the nodes to wait.\n  - Corrected all linters and formatters.\n  - Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>, Denis Štogl <denis@stogl.de>, Denis Štogl <destogl@users.noreply.github.com>.\n- Contributors: Denis Štogl, pabloinigoblasco\n\n```rst\nSection_2\n=========\n\nAdded\n-----\n\n- New feature: `cb_wait_topic_message`: asynchronous client behavior that waits for a topic message and optionally checks its contents for success\n- New client behavior for `nav2`: waits for `nav2` nodes subscribing to the `/bond` topic and ensures they are alive; optional node selection\n- Base for the `sm_aws_warehouse` navigation\n- `cb_pause_slam` client behavior\n- `sm_dance_bot_lite` visualizing `turtlebot3`\n- `sm_multi_stage_1` doubling\n- `sm_dance_bot_strikes_back` gazebo fixes\n- AWS demo\n- `neo_simulation2` package removal\n- Source build enabled on PR for testing\n- Adjusted build packages for source CI\n\nChanged\n-------\n\n- Navigation parameters fixes on `sm_dance_bot`\n\nFixed\n-----\n\n- Minor format fixes\n- Compile warnings removed\n- Format fixes for gazebo to show the robot and lidar\n\nRemoved\n-------\n\n- `neo_simulation2` package\n\nContributors\n------------\n\n- Pablo Iñigo Blasco\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\nSection_3\n=========\n\nAdded\n-----\n\n- Diverse improvements in navigation and performance (#116)\n- Additional linting and formatting\n- Progress in navigation, slam toggle client behaviors, and slam_toolbox components\n- Introducing slam pausing/resuming functionality in sm_dance_bot\n- First working version of sm template and template generator (#127)\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Rolling Docker environment to be executed from any environment (#154)\n- Added SM Atomic SM generator (#143)\n- Initial migration to smacc2 in moveit client (#151)\n- Added QOS durability to SmaccPublisherClient (#163)\n- Added reliability qos config to SmaccPublisherClient\n- Moved reference library SMs to smacc2_performance_tools (#166)\n- Added waypoint inputs (#178)\n\nChanged\n-------\n\n- Move method after the method it calls to prevent recursion (#126)\n- Fixed launch command in README.md for sm_dance_bot_strikes_back\n- Updated package list (#142)\n- Removed parameters smacc (#147)\n- Updated format in README\n- Updated format in move_it PR\n- Improved Dockerfile for building local tests\n- Added .reps dependencies and fixed build errors\n- Updated readme (#164)\n- Added missing colon in reliability qos config\n\nFixed\n-----\n\n- Minor tuning to mitigate overshot issue cases in waypoints navigator (#133)\n- Fixed CI: format fix python version (#148)\n- Fixed compiling issues\n\nRemoved\n-------\n\n- Removed merge markers from a python file (#119)\n- Removed test from main moveit cmake\n\nCollaborators\n-------------\n\n- Co-authored-by: pabloinigoblasco <pablo@ibrobotics.com>\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: DecDury <declandury@gmail.com>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n\n```rst\nSection_4\n=========\n\nAdded\n-----\n\n- Feature/sm warehouse 2 13 dec 2 (#182)\n  - Implemented warehouse feature with new changes and headless mode.\n  - Default values set.\n  - Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n\n- Feature/Brettpac branch (#184)\n  - Improved waypoints for sm_dance_bot_warehouse_3.\n  - Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n\n- Feature/wharehouse2 dec 14 (#185)\n  - Further enhancements to warehouse2 feature.\n\n- Feature/cb pure spinning (#188, #189)\n  - Implemented pure spinning behavior with various fixes.\n\n- Feature/planner changes 16 12 (#191)\n  - Updated planner with minor changes and fixes.\n\n- Feature/replanning 16 dec (#193)\n  - Improved replanning for all examples with several fixes.\n\n- Feature/undo motion 20 12 (#196, #198)\n  - Enhanced undo motion navigation for warehouse2.\n  - Tuned warehouse3.\n\n- Feature/sync 21 12 (#199)\n  - Addressed format issues during sync.\n\n- Feature/warehouse2 22 12 (#200)\n  - Fixed format issues and finalized warehouse2.\n\n- Feature/warehouse2 23 12 (#201)\n  - Tuned and fixed warehouse2.\n\n- Feature/minor tune (#203)\n  - Tuned and fixed minor issues.\n\n- Feature/undo motion 20 12 (#198)\n  - Tuned undo motion and fixed errors.\n\n- Feature/sync 21 12 (#199)\n  - Addressed format issues during sync.\n\n- Feature/warehouse2 22 12 (#200)\n  - Fixed format issues and finalized warehouse2.\n\n- Feature/warehouse2 23 12 (#201)\n  - Tuned and fixed warehouse2.\n\n- Feature/minor tune (#203)\n  - Tuned and fixed minor issues.\n\nChanged\n-------\n\n- Fixed trailing spaces, codespell, and python linters warnings.\n- Added galactic CI build due to Navigation2 issues in rolling.\n- Updated workflows and dependencies.\n- Bumped ccache version.\n- Ensured ament_lint_cmake satisfaction.\n- Added missing licenses.\n- Enabled cppcheck and corrected formatters.\n- Updated ci-build-source.yml and extension imports.\n- Updated python file formatting.\n- Renamed header files and corrected formats.\n- Updated doxygen-check-build.yml and created doxygen-deploy.yml.\n- Created workflow for testing prerelease builds.\n- Renamed to smacc2 and smacc2_msgs.\n- Updated GitHub branch references and package names.\n- Reset all versions to 0.0.0.\n- Ignored packages except smacc2 and smacc2_msgs.\n- Updated changelogs.\n\nRemoved\n-------\n\n- Manual installation of ros-rolling-ros2trace.\n  - Now automated in setupTracing.sh.\n\nFixed\n-----\n\n- Fixed bug in smacc2 component.\n- Reactivated smacc2 nav clients for rolling.\n- Fixed missing rolling repositories build.\n- Enabled Navigation2 for semi-binary build.\n\nContributors\n------------\n\n- Denis Štogl <destogl@users.noreply.github.com>\n```\n\n*pabloinigoblasco*\n\n```rst\nSection_5\n=========\n\nAdded\n-----\n- Added smacc2_performance_tools.\n- Added galactic CI setup and renamed rolling files. (#58)\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success.\n- Added new client behavior add for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive. You optionally can select the nodes to wait.\n\nChanged\n-------\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed folders, deleted tracing.md, and edited README.md.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Updated doxygen links (#70).\n- Updated c_cpp_properties.json.\n- Updated smacc2_rta command across readmes.\n- Corrected trailing spaces.\n- Optimized dependencies in move_base_z_planners_common.\n- Renamed event generator library.\n- Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Updated README.md with launch command.\n\nFixed\n-----\n- Fixed source CI and corrected README overview. (#62).\n- Corrected all linters and formatters.\n\nRemoved\n-------\n- Removed galactic builds from master and kept only rolling.\n- Removed submodules and used .repos file.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n\nOther\n-----\n- Some progress on navigation rolling.\n- More changes on performance tests.\n- Minor formatting improvements.\n- Several core improvements during navigation testing.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress\n\n```rst\nSection 6\n=========\n\nAdded\n-----\n\n- New client behavior `cb_wait_topic_message` for nav2: Asynchronous behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for nav2: Waits for nav2 nodes to subscribe to the `/bond` topic and ensures they are alive. Optional selection of nodes to wait for.\n- Base for the `sm_aws_warehouse` navigation.\n- `cb_pause_slam` client behavior.\n- `sm_dance_bot_lite` visualizing TurtleBot3.\n- `sm_multi_stage_1` doubling.\n- Gazebo fixes for `sm_dance_bot_strikes_back`.\n\nChanged\n-------\n\n- Progress in AWS navigation demo.\n- Navigation parameters fixes on `sm_dance_bot`.\n- Minor format improvements.\n- Several core improvements during navigation testing.\n- Cleaning and lidar show/hide option in `sm_dance_bot`.\n- Format fixes for Gazebo to show the robot and lidar.\n- Progress in navigation, slam toggle client behaviors, and `slam_toolbox` components.\n- Introducing slam pausing/resuming functionality in `sm_dance_bot`.\n\nFixed\n-----\n\n- Remove some compile warnings.\n- Correct formatting in removing `neo_simulation2` package.\n- Adjust build packages of source CI.\n- Move method after the method it calls to prevent recursion.\n\nRemoved\n-------\n\n- Remove `neo_simulation2` package.\n\nContributors\n------------\n\n- Pablo Iñigo Blasco\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\n```rst\nSection_7\n=========\n\nAdded\n-----\n\n- First working version of sm template and template generator. (#127)\n- Feature/dance bot s pattern (#129)\n- Feature/sm dance bot refine (#131)\n- Feature/sm dance bot refine 2 (#132)\n- Feature/nav2z renaming (#144)\n- Added SM Atomic SM generator. (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Add SM core test (#138)\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/testing moveit behaviors (#167)\n- Feature/aws navigation sm dance bot (#174)\n- Feature/sm warehouse 2 13 dec 2 (#182)\n- Feature/wharehouse2 dec 14 (#185)\n- Feature/cb pure spinning (#188)\n- Feature/cb pure spinning (#189)\n\nChanged\n-------\n\n- Minor tweaks (#130)\n- Minor navigation improvements (#141)\n- Using local action msgs (#139)\n- Update package list. (#142)\n- Update readme (#164)\n- Finetuning waypoints (#187)\n\nFixed\n-----\n\n- Noticed typo \"Finnaly\" corrected to \"Finally\"\n- Build fix\n- Waypoints navigator bug (#133)\n- Minor format issues (#134)\n- Fix CI: format fix python version (#148)\n- Remove node creation and create only a logger. (#149)\n- Resolve compile warnings (#137)\n- Fixing some errors introduced on formatting\n- Fixing some more linting warnings\n- Fixing compiling issues\n- Fixing broken master build\n\nRemoved\n-------\n\n- Removing sm_dance_bot_msgs\n- Removing parameters smacc\n- Removing test from main moveit cmake\n\nOther\n-----\n\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai> in various commits\n- Co-authored-by: DecDury <declandury@gmail.com>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n```\n\n```rst\nSection 8\n=========\n\nAdded\n-----\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Feature/undo motion 20 12 (#196)\n- Feature/undo motion 20 12 (#198)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- Feature/warehouse2 23 12 (#201)\n- Feature/minor tune (#203)\n- Merging code from backport foxy and updates about autoware (#208)\n- Foxy backport (#206)\n- Add galactic CI build because Navigation2 is broken in rolling\n- Add partial changes for ament_cpplint\n- Add tf2_ros as dependency to find include\n- Create workflow for testing prerelease builds\n- Use docs/ as source folder for documentation\n- Use docs/ as output directory\n- Rename to smacc2 and smacc2_msgs\n- Update name of package and package.xml to pass liter\n- Reset all versions to 0.0.0\n- Update changelogs\n- Revert \"Ignore all packages except smacc2 and smacc2_msgs\"\n- Update description table\n- Update table\n- Copy initial docs\n- Dockerfile w/ ROS distro as argument\n- Opened new folder for additional tracing contents\n- Moved tracing.md to tracing directory\n- Added setupTracing.sh\n- Removed manual installation of ros-rolling-ros2trace\n- Created alternative ManualTracing\n- Added a dockerfile for Rolling and Galactic\n- Update smacc2_ci/docker/ros_rollingAndGalactic_ubuntu_20.04/buildGalactic.sh\n- Update tracing/ManualTracing.md\n- Changed wording \"smacc application\" to \"SMACC2 library\"\n- Update smacc_sm_reference_library/sm_atomic/README.md\n\nChanged\n-------\n- Rename header files and correct format\n- Update doxygen-check-build.yml\n- Create doxygen-deploy.yml\n- Use manual deployment for now\n- Correct GitHub branch reference\n- Execute on master update\n- Enable cppcheck\n- Correct formatting of python file\n- Included necessary package and edited Threesome launch\n- Enable build of missing rolling repositories\n- Enable Navigation2 for semi-binary build\n\nFixed\n-----\n- Several fixes (#194)\n- Tuning warehouse3 (#197)\n- Tuning and fixes (#202)\n- Fix trailing spaces\n- Correct codespell\n- Correct python linters warnings\n- Disable ament_cpplint\n- Disable some packages and update workflows\n- Bump ccache version\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences\n- Disable cpplint and cppcheck linters\n- Correct formatters\n- Disable disabled packages\n- Change extension of imports\n- Update ci-build-source.yml\n- Change extension\n- Fix minor broken build\n- Fixing warehouse 3 problems, and other core improvements to remove dead lock, also making continuous integration green\n- Weird moveit not downloaded repo\n- Added missing file from warehouse2\n- Update sm_three_some to sm_three_some.launch\n- Update tracing event names\n- Reactivating smacc2 nav clients for rolling via submodules\n- Bug in smacc2 component\n- Reverted markdowns to html\n- Additional cleanup\n- Cleanup\n- Edited tracing.md to reflect new tracing event names\n\nRemoved\n-------\n- Merge\n- Headless and other fixes\n- Default values\n- Minor\n- Pure spinning behavior missing files\n- More fixes\n- Replanning for all our examples\n- Minor tune\n- Undo tuning and errors\n- Format\n- Minor linking errors foxy\n- Missing\n- Missing sm\n- Updating subscriber publisher components\n- Progress in autowarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrre machine\n- Refining cp subscriber cp publisher\n- Update cb_navigate_global_position.hpp\n- Improvements in smacc core adding more components mostly developed for autoware demo\n- Autoware demo\n- Foxy ci\n- Fix\n- Branching example\n- Ignore all packages except smacc2 and smacc2_msgs\n- Revert \"Ignore all packages except smacc2 and smacc2_msgs\"\n```\n\n*pabloinigoblasco*\n\n## Section_9\n\n### Added\n- Added `smacc2_performance_tools` for performance monitoring.\n- Added new feature `cb_wait_topic_message` for asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- Added new client behavior for `nav2`, `wait nav2 nodes`, subscribing to the `/bond` topic and waiting for them to be alive. Optional selection of nodes to wait for.\n\n### Changed\n- Updated mentions of `SMACC/ROS` to `SMACC2/ROS2`.\n- Renamed folders, deleted `tracing.md`, and edited `README.md`.\n- Renamed `sm_reference_library` to `event generator library`.\n- Renamed launch command to `ros2 launch sm_respira_1 sm_respira_1.launch`.\n\n### Fixed\n- Corrected trailing spaces in various files.\n- Fixed source CI setup and corrected README overview.\n- Corrected all linters and formatters.\n\n### Removed\n- Removed galactic builds from master and kept only rolling builds.\n- Removed submodules and used `.repos` file for dependencies.\n- Removed execution of `clang-format` on `smacc2_sm_reference_library` package.\n\n### Miscellaneous\n- Several core improvements during navigation testing.\n- Progress in AWS navigation demo.\n- Minor formatting and cleanup across multiple files.\n- Noted removal of a note that was not needed.\n\n### Contributors\n- Co-authored by Ubuntu 20-04-02-amd64 <brett@robosoft.ai>.\n- Co-authored by Denis Štogl <destogl@users.noreply.github.com> and <denis@stogl.de>.\n\n```rst\nSection_10\n==========\n\nAdded\n-----\n- New client behavior for nav2: waits for nav2 nodes to subscribe to the /bond topic and confirms they are alive. Optional node selection available.\n- New feature: cb_wait_topic_message, an asynchronous client behavior that waits for a topic message and optionally verifies its contents for success.\n\nChanged\n-------\n- Progress in AWS navigation demo.\n- Navigation parameters fixes on sm_dance_bot.\n\nFixed\n----\n- Removed some compile warnings.\n- Minor hotfixes.\n- Format fixes.\n\nRemoved\n-------\n- Removed neo_simulation2 package.\n\nOther\n-----\n- Several core improvements during navigation testing.\n- Formatting and minor improvements.\n- Merge and progress in development.\n- Precommit cleanup run.\n\nCollaborators\n-------------\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: pabloinigoblasco <pablo@ibrobotics.com>\n```\n\n# Section 11\n\n## Added\n- First working version of sm template and template generator. (#127)\n- Minor tweaks (#130)\n- Added SM Atomic SM generator. (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Update package list. (#142)\n- Add SM core test (#138)\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/aws navigation sm dance bot (#174)\n- Waypoint Inputs (#178)\n\n## Changed\n- Renamed Feature/dance bot s pattern to Feature/sm dance bot refine (#131)\n- Renamed Feature/sm dance bot refine 2 to Feature/sm dance bot refine (#132)\n- Renamed Feature/sm dance bot strikes back refactoring to Feature/sm dance bot strikes back refactoring (#152)\n- Renamed Feature/migration moveit client to Feature/migration moveit client (#151)\n- Renamed Feature/testing moveit behaviors to Feature/testing moveit behaviors (#167)\n- Renamed Feature/nav2z renaming to Feature/nav2z renaming (#144)\n- Renamed Feature/wharehouse2 dec 14 to Feature/wharehouse2 dec 14 (#185)\n- Renamed Feature/sm warehouse 2 13 dec 2 to Feature/sm warehouse 2 13 dec 2 (#186)\n- Renamed Feature/cb pure spinning to Feature/cb pure spinning (#188)\n\n## Fixed\n- Fixed launch command for sm_dance_bot_strikes_back and removed some comments in README.md (#148)\n- Fix CI: format fix python version (#148)\n- Fixed compiling issues (#164)\n- Fixed broken master build (#167)\n- Fixed pipeline error (#167)\n- Fixed formatting in husky launch file in sm_dance_bot (#174)\n- Fixed broken build in aws navigation (#174)\n- Fixed some formatting and templating on SrConditional (#168)\n\n## Removed\n- Removed node creation and create only a logger (#149)\n- Removed parameters smacc (#147)\n- Removed sm_dance_bot_msgs (#144)\n\n## Authors\n- Pablo Iñigo Blasco\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: DecDury <declandury@gmail.com>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n\n```rst\nSection 12\n==========\n\nAdded\n-----\n- Add mergify rules file.\n- Try fixing CI for rolling. (#209)\n- Merging to get backport working.\n- Add Autoware Auto Msgs into not-released dependencies. (#220)\n- Add galactic CI build because Navigation2 is broken in rolling.\n- Add partial changes for ament_cpplint.\n- Add tf2_ros as dependency to find include.\n- Disable ament_cpplint.\n- Disable some packages and update workflows.\n- Bump ccache version.\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences.\n- Disable cpplint and cppcheck linters.\n- Correct formatters.\n- Update ci-build-source.yml\n- Change extension\n- Change extension of imports.\n- Enable cppcheck\n- Correct formatting of python file.\n- Include necessary package and edit Threesome launch.\n\nChanged\n-------\n- ros2 launch sm_three_some sm_three_some to ros2 launch sm_three_some sm_three_some.launch.\n\nFixed\n-----\n- Fix trailing spaces.\n- Correct codespell.\n- Correct python linters warnings.\n- Fix rolling builds (#222)\n- Fixing docker for foxy and galactic.\n- Removing warnings (#213).\n\nRemoved\n-------\n- Remove example things from Foxy CI setup. (#214).\n\nCo-authored-by: Denis Štogl <denis@stogl.de>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Declan Dury <44791484+DecDury@users.noreply.github.com>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: reelrbtx <brett2@reelrobotics.com>\nCo-authored-by: brettpac <brett@robosoft.ai>\nCo-authored-by: David Revay <MrBlenny@users.noreply.github.com>\nCo-authored-by: pabloinigoblasco <pabloinigoblasco@ibrobotics.com>\n```\n\n```rst\nSection_13\n==========\n\nAdded\n-----\n- Reactivated smacc2 nav clients for rolling via submodules.\n- Added README tutorial for Dockerfile.\n- Added smacc2_performance_tools.\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success.\n- Added new client behavior add for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive. You optionally can select the nodes to wait.\n\nChanged\n-------\n- Changed wording \"smacc application\" to \"SMACC2 library\".\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed tracing events.\n- Renamed folders.\n- Renamed event generator library.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n- Cleaned up sm_atomic_24hr.\n- Optimized dependencies in move_base_z_planners_common.\n- Minor formatting improvements.\n- Corrected trailing spaces.\n- Updated smacc2_rta command across readmes.\n- Corrected all linters and formatters.\n\nFixed\n----\n- Bug in smacc2 component.\n\nRemoved\n-------\n- Removed galactic builds from master and kept only rolling. Removed submodules and used .repos file.\n\nOther\n-----\n- Some progress on navigation rolling.\n- More changes on performance tests.\n- Several core improvements during navigation testing.\n- Progress in aws navigation demo.\n- More on performance and other issues.\n- Format improvements.\n- Attempting pre-commit fixes.\n- Fixing precommit.\n``` \n\n*pabloinigoblasco*\n\n```rst\nSection_14\n==========\n\nAdded\n-----\n- Introducing new feature, cb_wait_topic_message: an asynchronous client behavior that waits for a topic message and optionally verifies its contents for success.\n- Added new client behavior for nav2, allowing waiting for nav2 nodes subscribing to the /bond topic and ensuring they are alive. Node selection is optional.\n- Progress made in AWS navigation demo.\n\nChanged\n-------\n- Minor formatting improvements.\n\nFixed\n-----\n- Navigation parameters fixes on sm_dance_bot.\n- Removed some compile warnings.\n\nRemoved\n-------\n- Removed neo_simulation2 package.\n\nOther\n-----\n- Several core improvements during navigation testing.\n- Merge and progress.\n- Precommit cleanup run.\n- Updates yaml.\n- Corrected formatting.\n- Enabled source build on PR for testing.\n- Adjusted build packages of source CI.\n- Various fixes and improvements on sm_dance_bot visualizing turtlebot3.\n- Gazebo fixes to show the robot and lidar.\n- Gazebo fixes for sm_dance_bot_strikes_back.\n- Progress on sm_multi_stage_1.\n- Diverse improvements in navigation and performance.\n- Ongoing work on sm_multi_stage_1 with multiple stages.\n``` \n\n*pabloinigoblasco*\n\n## Section_15\n\n### Added\n- Feature/diverse improvements in navigation performance (#117)\n- Feature/slam toggle and smacc deep history (#122)\n- Feature/dance bot s pattern (#128)\n- First working version of sm template and template generator (#127)\n- Added SM Atomic SM generator (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Feature/migration moveit client (#151)\n- Added QOS durability to SmaccPublisherClient (#163)\n- Feature/testing moveit behaviors (#167)\n- Feature/aws navigation sm dance bot (#174)\n- Waypoint Inputs (#178)\n\n### Changed\n- Move method after the method it calls to prevent recursion (#126)\n- Moved reference library SMs to smacc2_performance_tools (#166)\n- Added durability to SmaccPublisherClient\n- Reworked sm_multi_stage_1 with multistage modes and sequences\n\n### Fixed\n- Minor tuning to mitigate overshot issue cases in waypoints navigator (#133)\n- Fixed launch command in README.md for sm_dance_bot_strikes_back (#148)\n- Fix CI: format fix python version (#148)\n- Fixed compiling issues in docker environment\n- Fixed broken master build during moveit testing (#167)\n- Fixed formatting in husky launch file in sm_dance_bot (#174)\n- Fixed broken build in aws navigation demo (#174)\n\n### Removed\n- Removed merge markers from a python file (#119)\n- Removed parameters smacc (#147)\n- Removed node creation and created only a logger (#149)\n- Removed test from main moveit cmake\n- Removed sm_dance_bot_msgs\n- Removed some comments in the past from README.md\n\n### Miscellaneous\n- Noticed typo corrected to \"Finally\"\n- Updated package list (#142)\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Precommit cleanup\n- Workflows update\n- Pending references\n- Repos dependency\n- Added dependency to ur5 client\n- Docker refactoring\n- Update readme (#164)\n- More readme updates\n- Warehouse2 progress (#179)\n- Format (#180)\n- Sm_dance_bot_warehouse_3 (#181)\n- Default values\n\nCo-authored-by: pabloinigoblasco <pablo@ibrobotics.com>\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Denis Štogl <denis@stogl.de>\n\n```rst\nSection_16\n==========\n\nAdded\n-----\n- Brettpac branch (#184)\n- Redoing sm_dance_bot_warehouse_3 waypoints\n- More Waypoints\n- Feature/wharehouse2 dec 14 (#185)\n- warehouse2\n- Feature/sm warehouse 2 13 dec 2 (#186)\n- format\n- more changes and headless\n- merge\n- headless and other fixes\n- default values\n- finetuning waypoints (#187)\n- Feature/cb pure spinning (#188)\n- pure spinning behavior missing files\n- minor changes (#190)\n- Feature/planner changes 16 12 (#191)\n- minor changes\n- more fixes\n- Feature/replanning 16 dec (#193)\n- minor changes\n- replanning for all our examples\n- several fixes (#194)\n- minor changes (#195)\n- Feature/undo motion 20 12 (#196)\n- minor changes\n- improving undo motion navigation warehouse2\n- tuning warehouse3 (#197)\n- Feature/undo motion 20 12 (#198)\n- minor changes\n- improving undo motion navigation warehouse2\n- undo tuning and errors\n- Feature/sync 21 12 (#199)\n- format issues\n- Feature/warehouse2 22 12 (#200)\n- format issues\n- finishing warehouse2\n- Feature/warehouse2 23 12 (#201)\n- tuning and fixes (#202)\n- Feature/minor tune (#203)\n- tuning and fixes\n- minor tune\n- fixing warehouse 3 problems, and other core improvements (#204)\n- fixing warehouse 3 problems, and other core improvements to remove dead lock, also making continuous integration green\n- added missing file from warehouse2 (#205)\n- docker build files for all versions\n- dockerfiles (#225)\n- Feature/retry behavior warehouse 1 (#226)\n- backport to foxy\n- Foxy backport (#206)\n- minor formatting fixes\n- Fix trailing spaces\n- Correct codespell\n- Correct python linters warnings\n- Add galactic CI build because Navigation2 is broken in rolling\n- Add partial changes for ament_cpplint\n- Add tf2_ros as dependency to find include\n- Disable ament_cpplint\n- Disable some packages and update workflows\n- Bump ccache version\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences\n- Disable cpplint and cppcheck linters\n- Correct formatters\n- branching example\n- Disable disabled packages\n- Update ci-build-source.yml\n- Change extension\n- Change extension of imports\n- Enable cppcheck\n- Correct formatting of python file\n- Included necessary package and edited Threesome launch\n- ros2 launch sm_three_some sm_three_some\n- to\n- ros2 launch sm_three_some sm_three_some.launch\n- First ensure you have the necessary package installed\n- Rename header files and correct format\n- Add workflow for checking doc build\n- Update doxygen-check-build.yml\n- Create doxygen-deploy.yml\n- Use manual deployment for now\n- Create workflow for testing prerelease builds\n- Use docs/ as source folder for documentation\n- Use docs/ as output directory\n- Rename to smacc2 and smacc2_msgs\n- Correct GitHub branch reference\n- Update name of package and package.xml to pass liter\n- Execute on master update\n- Reset all versions to 0.0.0\n- Ignore all packages except smacc2 and smacc2_msgs\n- Update changelogs\n- 0.1.0\n\nChanged\n-------\n- Update SM template and make example code clearly visible\n- Remove use of node in the sm performance template\n- Updated templated to use Blackboard storage\n- Update template to resolve the global data correctly\n- Update sm_name.hpp\n```\n\n```rst\nSection_17\n==========\n\nAdded\n-----\n- Added setupTracing.sh script to install necessary packages and configure tracing group.\n- Added README tutorial for Dockerfile.\n- Added smacc2_performance_tools.\n- Added new feature: cb_wait_topic_message, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- Added galactic CI setup and renamed rolling files. (#58)\n- Added source CI fix and corrected README overview. (#62)\n- Added new sm from sm_respira_1 (#76)\n- Added base for the sm_aws_aarehouse navigation.\n- Added sm_multi_stage_1.\n- Added sm_atomic_performance_test_c_1 (#88).\n- Added sm_atomic_performance_test_a_1 and sm_atomic_performance_test_a_2.\n- Added sm_atomic_performance_test_a_2 modification (#89).\n- Added sm_atomic_performance_test_a_2 and sm_atomic_performance_test_a_1.\n- Added sm_atomic_performance_test_c_1 (#88).\n- Added sm_advanced_recovery_1 reworked (#83), (#84), (#85), (#86).\n- Added sm_advanced_recovery_1 round 4 (#86).\n- Added sm_atomic_performance_trace_1.\n- Added sm_atomic_24hr.\n- Added sm_respira_test_2.\n- Added sm_respira_1 format cleanup and pre-commit.\n- Added sm_reference_library reformatting.\n- Added Dockerfile with ROS distro as argument.\n- Added alternative ManualTracing.\n- Added sm markdowns.\n- Added new smacc2 and smacc2_msgs packages.\n- Added tracing event renaming.\n- Added Navigation2 for semi-binary build.\n- Added build of missing rolling repositories.\n- Added reactivation of smacc2 nav clients for rolling via submodules.\n- Added optimization of dependencies in move_base_z_planners_common.\n- Added renaming of event generator library.\n- Added more performance tests improvements.\n- Added more changes on performance tests.\n- Added more on performance and other issues.\n- Added more on navigation.\n- Added more on navigation demo progress.\n- Added more on navigation testing.\n- Added more on navigation formatting improvements.\n- Added more on navigation format improvements.\n- Added more on navigation progress.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format improvements.\n- Added more on navigation demo format\n\n```rst\nSection_18\n==========\n\nAdded\n-----\n- New feature: `cb_wait_topic_message`, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for `nav2`: `add` behavior waits for nav2 nodes subscribing to the `/bond` topic and ensures they are alive. Optional node selection available.\n- Base for the `sm_aws_aarehouse` navigation.\n- Progress in AWS navigation demo.\n- New client behavior: `cb_pause_slam`.\n- `sm_dance_bot_lite` visualization for TurtleBot3.\n- Lidar show/hide option for `sm_dance_bot`.\n- Gazebo fixes to show the robot and lidar.\n- Doubling in `sm_multi_stage_1`.\n- Gazebo fixes for `sm_dance_bot_strikes_back`.\n\nChanged\n-------\n- Corrected all linters and formatters.\n- Navigation parameters fixes on `sm_dance_bot`.\n- Minor formatting improvements.\n- Merge and progress in development.\n- Hotfixes and minor improvements.\n\nFixed\n----\n- Removed some compile warnings.\n\nRemoved\n-------\n- Redundant formatting improvements.\n\nContributors\n------------\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\n## Section_19\n\n### Added\n- Added multistage modes to `sm_multi_stage_1`.\n- Added sequences to `sm_multi_stage_1`.\n- Added steps to `sm_multi_stage_1`.\n- Added sequence d to `sm_multi_stage_1`.\n- Added sequence c to `sm_multi_stage_1`.\n- Added mode_5_sequence_b.\n- Added mode_4_sequence_b.\n- Added finishing touches 1 to `sm_multi_stage_1`.\n- Added AWS navigation to `sm_dance_bot`.\n\n### Changed\n- Reworked `sm_multi_stage_1` with improvements in multistage modes, sequences, and steps.\n\n### Fixed\n- Fixed a recursion issue by moving a method after the method it calls.\n- Fixed minor format issues.\n- Fixed compile warnings.\n- Fixed CI format for Python version.\n- Fixed launch command in README.md for `sm_dance_bot_strikes_back`.\n- Fixed some linting warnings.\n- Fixed compiling issues.\n\n### Removed\n- Removed `neo_simulation2` package.\n- Removed `sm_dance_bot_msgs`.\n- Removed parameters from `smacc`.\n\n### Miscellaneous\n- Enabled source build on PR for testing.\n- Adjusted build packages of source CI.\n- Added SM core test.\n- Added QOS durability to `SmaccPublisherClient`.\n- Updated package list.\n- Added SVGs to READMEs of atomic, dance_bot, and others.\n- Added remaining SVGs to READMEs.\n- Updated README.\n- Moved reference library SMs to `smacc2_performance_tools`.\n- Refactored Docker environment for execution from any environment.\n- Added SM Atomic SM generator.\n- Added dependencies for husky simulation.\n- Progressed in navigation, slam toggle client behaviors, and slam_toolbox components.\n- Progressed in testing `sm_dance_bot` with slam pausing/resuming functionality.\n- Progressed in moveit migration testing.\n- Progressed in moveit testing behaviors.\n- Progressed in `sm_dance_bot_lite`.\n- Progressed in `sm_pubsub_1`.\n- Progressed in `sm_advanced_recovery_1` renaming.\n- Progressed in `sm_multi_stage_1` reworking with sequences and modes.\n- Progressed in `sm_multi_stage_1` with sequence d, sequence c, and finishing touches.\n- Progressed in `sm_dance_bot` with s-pattern and refinements.\n- Progressed in `sm_dance_bot_strikes_back` refactoring.\n- Progressed in `sm_dance_bot` with refinements and improvements.\n- Progressed in waypoint 4 and iterations changes for robot course completion.\n- Progressed in navigation improvements.\n- Progressed in moveit migration with fixes and dependencies.\n- Progressed in pipeline error fixing.\n- Progressed in broken master build fixing.\n- Progressed in sm_pubsub_1 part 2.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence d and sequence c.\n- Progressed in `sm_multi_stage_1` with most finishing touches.\n- Progressed in `sm_multi_stage_1` with mode_5_sequence_b and mode_4_sequence_b.\n- Progressed in `sm_multi_stage_1` with sequences and steps.\n- Progressed in `sm_multi_stage_1` with multistage modes and sequences.\n- Progressed in `sm_multi_stage_1` with sequence\n\nSection_20\n==========\n\nAdded\n-----\n- Update dependencies for husky in rolling and galactic.\n- Progress on aws navigation and refactorings on navigation clients and behaviors.\n- More on aws demo.\n- Warehouse2 progress.\n- Waypoint Inputs.\n- Wharehouse2 progress.\n- Format.\n- Sm_dance_bot_warehouse_3.\n- Feature/sm warehouse 2 13 dec 2.\n- Finetuning waypoints.\n- Feature/cb pure spinning.\n- Feature/planner changes 16 12.\n- Feature/replanning 16 dec.\n- Feature/undo motion 20 12.\n- Tuning warehouse3.\n- Feature/sync 21 12.\n- Feature/warehouse2 22 12.\n- Feature/warehouse2 23 12.\n- Feature/minor tune.\n- Fixing warehouse 3 problems and other core improvements.\n- Added missing file from warehouse2.\n- Updating subscriber publisher components.\n- Progress in autoware machine.\n- Refining cp subscriber cp publisher.\n- Improvements in smacc core adding more components.\n- Autoware demo.\n- Docker files for different revisions, warnings removal, and more testing on navigation.\n- Update file for fake hardware simulation and add file for gazebo simulation.\n- Retry behavior warehouse 1.\n- Multiple controllable leds plugin.\n- Progress in husky demo.\n- Add ignition file and update repos files.\n- Improving navigation behaviors.\n- Add galactic CI build because Navigation2 is broken in rolling.\n- Add partial changes for ament_cpplint.\n- Add tf2_ros as dependency to find include.\n\nChanged\n-------\n- Fix formatting.\n- Minor changes.\n- Merge changes.\n- Headless and other fixes.\n- Default values.\n- Several fixes.\n- Format issues.\n- Tuning and fixes.\n- Minor tune.\n- Correct Focal-Rolling builds by fixing the version of rosdep yaml.\n- Making models local.\n- Red picuup.\n- Foxy backport.\n- Fix trailing spaces.\n- Correct codespell.\n- Correct python linters warnings.\n\nFixed\n-----\n- Fixing broken build.\n- Fixing broken source build.\n\nRemoved\n-------\n- Only rolling version should be pre-released on on master.\n\nCo-Authored-By\n--------------\n- Denis Štogl <denis@stogl.de>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Declan Dury <44791484+DecDury@users.noreply.github.com>\n- DecDury <declandury@gmail.com>\n- reelrbtx <brett2@reelrobotics.com>\n- brettpac <brett@robosoft.ai>\n- David Revay <MrBlenny@users.noreply.github.com>\n- pabloinigoblasco <pabloinigoblasco@ibrobotics.com>\n\n```rst\nSection_21\n==========\n\nAdded:\n- First ensure you have the necessary package installed:\n  ```\n  sudo apt-get install ros-rolling-ros2trace\n  ```\n- Add workflow for checking doc build.\n- Create doxygen-deploy.yml.\n- Create workflow for testing prerelease builds.\n- Rename to smacc2 and smacc2_msgs.\n- Added setupTracing.sh:\n  Installs necessary packages and configures tracing group.\n- Created alternative ManualTracing.\n- Added new sm markdowns.\n- Added a dockerfile for Rolling and Galactic.\n- Update smacc2_ci/docker/ros_rollingAndGalactic_ubuntu_20.04/buildGalactic.sh.\n- Update tracing/ManualTracing.md.\n- Changed wording \"smacc application\" to \"SMACC2 library\".\n- Update smacc_sm_reference_library/sm_atomic/README.md: edit from html to markdown syntax.\n- Enable build of missing rolling repositories.\n- Enable Navigation2 for semi-binary build.\n- Remove galactic builds from master and keep only rolling. Remove submodules and use .repos file.\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Some progress on navigation rolling.\n- Added smacc2_performance_tools.\n- Performance tests improvements.\n- More on performance and other issues.\n- Sm_respira_1 format cleanup.\n- Sm_respira_test_2.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n- Sm_reference_library reformatting.\n- Correct trailing spaces.\n- Sm_atomic_24hr.\n- Sm_atomic_performance_trace_1.\n- Clean up of sm_atomic_24hr.\n- Optimized deps in move_base_z_planners_common.\n- Renaming of event generator library.\n- Add galactic CI setup and rename rolling files (#58).\n- Fix source CI and correct README overview (#62).\n- Update c_cpp_properties.json.\n- Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Update doxygen links (#70).\n- More Readme Updates (#72).\n- More Readme (#74).\n- Created new sm from sm_respira_1 (#76).\n- Feature/core and navigation fixes (#78).\n- Base for the sm_aws_aarehouse navigation.\n- Progressing in AWS navigation.\n- Several core improvements during navigation testing.\n- Formatting improvements.\n- Progress in AWS navigation demo.\n- More on navigation.\n- Sm_advanced_recovery_1 reworked (#83).\n- Fix pre-commit.\n- Trying to fix Pre-Commit.\n- More sm_advanced_recovery_1 (#84).\n- More sm_advanced_recovery_1 work (#85).\n- Sm_advanced_recovery_1 round 4 (#86).\n- Brettpac branch (#87).\n- Sm_atomic_performance_test_a_2.\n- Sm_atomic_performance_test_a_1.\n- Sm_atomic_performance_test_c_1 (#88).\n\nChanged:\n- Ros2 launch sm_three_some sm_three_some to ros2 launch sm_three_some sm_three_some.launch.\n- Change extension of imports.\n- Correct formatting of python file.\n- Update name of package and package.xml to pass liter.\n- Execute on master update.\n- Reset all versions to 0.0.0.\n- Update changelogs.\n- Update description table.\n- Update table.\n- Copy initial docs.\n- Dockerfile w/ ROS distro as argument: use this command \"sudo docker build --build-arg ROS2_DISTRO=(desiredRosTag) (directoryHoldingDockerfile)/\".\n- Opened new folder for additional tracing contents.\n- Delete tracing directory.\n- Moved tracing.md to tracing directory.\n- Removed manual installation of ros-rolling-ros2trace: this is now automated in setupTracing.sh, location of sh file assumed if user follows README.md under \"Getting started\".\n- Changed wording \"smacc application\" to \"SMACC2 library\".\n- Update smacc2_sm_reference_library/sm_atomic/README.md: edit from html to markdown syntax.\n- Reactivating smacc2 nav clients for rolling via submodules.\n- Renamed tracing events after.\n- Bug in smacc2 component.\n- Reverted markdowns to html.\n- Added README tutorial for Dockerfile.\n- Additional cleanup.\n- Cleanup.\n- Edited tracing.md to reflect new tracing event names.\n- Minor formatting.\n- More on performance tests.\n- Update smacc2_rta command across readmes.\n- Clean up of sm_atomic_24hr.\n- More sm_atomic_24hr cleanup.\n- Minor formatting.\n- More on navigation.\n- Format improvements.\n- Format improvements.\n- More on navigation.\n- Fix pre-commit.\n- More sm_advanced_recovery_1.\n- More sm_advanced_recovery_1 work.\n- Sm_advanced_recovery_1 round 4.\n- Base for the sm_aws_aarehouse navigation.\n- Progressing in AWS navigation.\n- Several core improvements during navigation testing.\n- Formatting improvements.\n- Progress in AWS navigation demo.\n- Format improvements.\n- Format improvements.\n- More on navigation.\n- Sm_atomic_performance_test_c_1.\n\nRemoved:\n- Disable ament_cpplint.\n- Disable some packages and update workflows.\n- Disable cpplint and cppcheck linters.\n- Disable disabled packages.\n- Ignore further packages.\n- Satisfy ament_lint_cmake.\n- Add missing licences.\n- Correct formatters.\n- Branching example.\n- Update ci-build-source.yml.\n- Change extension.\n- Enable cppcheck.\n- Correct formatting of python file.\n- Included necessary package and edited Threesome launch.\n- Use manual deployment for now.\n- Create workflow for testing prerelease builds.\n- Use docs/ as source folder for documentation.\n- Use docs/ as output directory.\n- Update name of package and package.xml to pass liter.\n- Execute on master update.\n- Reset all versions to 0.0.0.\n- Ignore all packages except smacc2 and smacc2_msgs.\n- Update changelogs.\n- Revert \"Ignore all packages except smacc2 and smacc2_msgs\".\n```\n\n\n*pabloinigoblasco*\n\n```rst\nSection_22\n==========\n\nAdded\n-----\n\n- New feature: cb_wait_topic_message, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for nav2: wait for nav2 nodes to subscribe to the /bond topic and wait for them to be alive, with optional node selection.\n- New client behavior: cb pause slam for pausing SLAM operations.\n- New feature: sm_dance_bot visualizing turtlebot3.\n- New feature: dance bot launch gz lidar choice.\n\nChanged\n-------\n\n- Updated launch command.\n- Corrected all linters and formatters.\n\nFixed\n-----\n\n- Fixed precommit issues.\n- Fixed navigation parameters on sm_dance_bot.\n- Removed some compile warnings.\n\nAuthors\n-------\n\n- Pablo Iñigo Blasco\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n```\n\nSection_23\n==========\n\nAdded\n-----\n- Added visualization for turtlebot3 in sm_dance_bot.\n- Added lidar show/hide option for cleaning.\n- Added gazebo fixes for sm_dance_bot_lite (#104).\n- Added gazebo fixes to display the robot and lidar.\n- Added gazebo fixes for sm_dance_bot_strikes_back.\n- Added AWS demo (#108).\n- Added progress in sm_multi_stage_1 (#114).\n- Added diverse improvements in navigation and performance (#116).\n- Added slam toggle client behaviors and smacc2::deep_history syntax in Feature/slam toggle and smacc deep history (#122).\n- Added progress in testing sm_dance_bot with slam pausing/resuming functionality.\n- Added more changes in sm_dance_bot in Feature/dance bot s pattern (#128).\n- Added first working version of sm template and template generator (#127).\n- Added SM core test (#138).\n- Added minor navigation improvements (#141).\n- Added local action msgs usage.\n- Added navigation 2 stack renaming in Feature/nav2z renaming (#144).\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140).\n- Added remaining SVGs to READMEs (#145).\n- Added rolling Docker environment to be executed from any environment (#154).\n- Added slight changes to waypoint 4 and iterations for robot course completion (#155).\n- Added initial migration to smacc2 in Feature/migration moveit client (#151).\n\nChanged\n-------\n- Improved formatting in cleaning files.\n- Enhanced formatting in gazebo fixes.\n- Refined sm_dance_bot and s-pattern in Feature/dance bot s pattern (#129).\n- Refactored sm_dance_bot strikes back (#152).\n- Updated format in move_it PR.\n- Improved Dockerfile for building local tests.\n\nFixed\n-----\n- Fixed format issues.\n- Fixed source build on PR for testing.\n- Fixed build packages of source CI.\n- Fixed compiling issues.\n- Fixed CI format for python version (#148).\n- Fixed launch command in README.md for sm_dance_bot_strikes_back.\n- Fixed errors introduced on formatting in migration to smacc2.\n- Fixed linting warnings.\n- Mitigated overshot issue cases in waypoints navigator.\n- Removed neo_simulation2 package.\n- Removed merge markers from a python file (#119).\n- Removed parameters in smacc (#147).\n- Removed node creation and created only a logger (#149).\n- Removed test from main moveit cmake.\n- Removed sm_dance_bot_msgs.\n- Removed parameters in smacc.\n- Removed some comments in README.md for sm_dance_bot_strikes_back.\n- Removed test from main moveit cmake.\n\nRemoved\n-------\n- Removed neo_simulation2 package.\n\nAuthors\n-------\n- Pablo Iñigo Blasco (pabloinigoblasco)\n- Brett <brett@robosoft.ai>\n- DecDury <declandury@gmail.com>\n- Denis Štogl <destogl@users.noreply.github.com>\n\nSection_24\n==========\n\nAdded\n-----\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/testing moveit behaviors (#167)\n- Feature/aws navigation sm dance bot (#174)\n- Waypoint Inputs (#178)\n- Feature/sm warehouse 2 13 dec 2 (#182)\n- Feature/wharehouse2 dec 14 (#185)\n- Feature/cb pure spinning (#188)\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Feature/undo motion 20 12 (#196)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- Feature/warehouse2 23 12 (#201)\n- Feature/minor tune (#203)\n\nChanged\n-------\n- Moved reference library SMs to smacc2_performance_tools (#166)\n- Added reliability qos config\n- Repo dependency\n- Husky launch file in sm_dance_bot\n- Update dependencies for husky in rolling and galactic\n- Finetuning waypoints (#187)\n- Tuning warehouse3 (#197)\n- Tuning and fixes (#202)\n- Minor tune\n- Improving undo motion navigation warehouse2\n- Fixing warehouse 3 problems, and other core improvements to remove dead lock, also making continuous integration green\n\nFixed\n-----\n- Add a missing colon\n- Fixing pipeline error\n- Fixing broken master build\n- Fixing broken build\n- Several fixes (#194)\n- Format issues\n- Minor format\n- Fixing startup problems in warehouse 3\n\nRemoved\n-------\n- Pre-commit cleanup\n- Remove line\n- Minor configuration\n\nCo-authored-by\n--------------\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Denis Štogl <denis@stogl.de>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Declan Dury <44791484+DecDury@users.noreply.github.com>\n- DecDury <declandury@gmail.com>\n- reelrbtx <brett2@reelrobotics.com>\n- brettpac <brett@robosoft.ai>\n- David Revay <MrBlenny@users.noreply.github.com>\n\npabloinigoblasco\n\n```rst\nSection_25\n==========\n\nAdded\n-----\n- Docker improvements.\n- Runtime dependency.\n- Restoring UR dependency.\n- Testing dance bot demos.\n- Updating Galactic repositories.\n\nChanged\n-------\n- Master rolling to Galactic backport.\n\nFixed\n-----\n- Fixing build.\n\nContributors\n------------\n- Denis Štogl\n- Pablo Iñigo Blasco\n- pabloinigoblasco\n\nCo-authored-by\n--------------\n- reelrbtx <brett2@reelrobotics.com>\n- brettpac <brett@robosoft.ai>\n- David Revay <MrBlenny@users.noreply.github.com>\n- pabloinigoblasco <pabloinigoblasco@ibrobotics.com>\n- DecDury <declandury@gmail.com>\n- Denis Štogl <denis@stogl.de>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Declan Dury <44791484+DecDury@users.noreply.github.com>\n```\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/forward_global_planner/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(forward_global_planner)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\n\nfind_package(nav2_core)\nfind_package(nav_msgs)\nfind_package(nav2_costmap_2d)\nfind_package(geometry_msgs)\nfind_package(tf2)\nfind_package(nav2z_planners_common)\nfind_package(pluginlib)\nfind_package(nav_2d_utils)\n\nset(dependencies\n  nav2_core\n  nav_msgs\n  nav2_costmap_2d\n  geometry_msgs\n  tf2\n  nav2z_planners_common\n  pluginlib\n  nav_2d_utils\n)\n\ninclude_directories(include)\n\nadd_library(${PROJECT_NAME} SHARED\n  src/${PROJECT_NAME}/forward_global_planner.cpp)\n\n# prevent pluginlib from using boost\ntarget_compile_definitions(${PROJECT_NAME} PUBLIC \"PLUGINLIB__DISABLE_BOOST_FUNCTIONS\")\npluginlib_export_plugin_description_file(nav2_core fgp_plugin.xml)\n\nament_target_dependencies(${PROJECT_NAME}\n  ${dependencies})\n\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\nament_export_dependencies(${dependencies})\n\ninstall(TARGETS ${PROJECT_NAME}\n  ARCHIVE DESTINATION lib\n  LIBRARY DESTINATION lib\n  RUNTIME DESTINATION bin\n)\n\ninstall(DIRECTORY include/\n  DESTINATION include/\n)\n\ninstall(FILES\n  fgp_plugin.xml\n  DESTINATION share\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/forward_global_planner/fgp_plugin.xml",
    "content": "<library path=\"forward_global_planner\">\n  <class name=\"forward_global_planner::ForwardGlobalPlanner\" type=\"cl_nav2z::forward_global_planner::ForwardGlobalPlanner\" base_class_type=\"nav2_core::GlobalPlanner\">\n    <description>\n    </description>\n  </class>\n</library>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/forward_global_planner/include/forward_global_planner/forward_global_planner.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <functional>\n#include <memory>\n#include <string>\n\n#include <nav2_core/global_planner.hpp>\n#include <nav_msgs/msg/path.hpp>\n#include <rclcpp/rclcpp.hpp>\n\nnamespace cl_nav2z\n{\nnamespace forward_global_planner\n{\nclass ForwardGlobalPlanner : public nav2_core::GlobalPlanner\n{\npublic:\n  using Ptr = std::shared_ptr<ForwardGlobalPlanner>;\n\n  ForwardGlobalPlanner();\n\n  /**\n   * @brief Virtual destructor\n   */\n  virtual ~ForwardGlobalPlanner();\n\n  /**\n   * @param  parent pointer to user's node\n   * @param  name The name of this planner\n   * @param  tf A pointer to a TF buffer\n   * @param  costmap_ros A pointer to the costmap\n   */\n  void configure(\n    const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name,\n    const std::shared_ptr<tf2_ros::Buffer> tf,\n    const std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros) override;\n\n  /**\n   * @brief Method to cleanup resources used on shutdown.\n   */\n  virtual void cleanup();\n\n  /**\n   * @brief Method to active planner and any threads involved in execution.\n   */\n  virtual void activate();\n\n  /**\n   * @brief Method to deactivate planner and any threads involved in execution.\n   */\n  virtual void deactivate();\n\n  /**\n   * @brief Method create the plan from a starting and ending goal.\n   * @param start The starting pose of the robot\n   * @param goal  The goal pose of the robot\n   * @param cancel_checker Function to check if planning should be cancelled\n   * @return      The sequence of poses to get from start to goal, if any\n   */\n  virtual nav_msgs::msg::Path createPlan(\n    const geometry_msgs::msg::PoseStamped & start, const geometry_msgs::msg::PoseStamped & goal,\n    std::function<bool()> cancel_checker) override;\n\nprivate:\n  // rclcpp::Node::SharedPtr nh_;\n  rclcpp_lifecycle::LifecycleNode::SharedPtr nh_;\n\n  std::shared_ptr<rclcpp_lifecycle::LifecyclePublisher<nav_msgs::msg::Path>> planPub_;\n\n  /// stored but almost not used\n  std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros_;\n\n  double skip_straight_motion_distance_;  // meters\n\n  double puresSpinningRadStep_;  // rads\n\n  std::string name_;\n\n  double transform_tolerance_;\n\n  std::shared_ptr<tf2_ros::Buffer> tf_;\n};\n}  // namespace forward_global_planner\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/forward_global_planner/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>forward_global_planner</name>\n  <version>2.3.19</version>\n  <description>The forward_global_planner package.</description>\n\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <author email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</author>\n\n  <license>BSDv3</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>geometry_msgs</depend>\n  <depend>nav2z_planners_common</depend>\n  <depend>nav_2d_utils</depend>\n  <depend>nav_msgs</depend>\n  <depend>nav2_core</depend>\n  <depend>nav2_costmap_2d</depend>\n  <build_depend>pluginlib</build_depend>\n  <depend>tf2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/forward_global_planner/src/forward_global_planner/forward_global_planner.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <forward_global_planner/forward_global_planner.hpp>\n#include <nav2z_planners_common/common.hpp>\n#include <nav2z_planners_common/nav2z_client_tools.hpp>\n\n#include <angles/angles.h>\n#include <tf2/transform_datatypes.h>\n// #include <tf2/utils.h>\n\n#include <boost/assign.hpp>\n#include <boost/range/adaptor/reversed.hpp>\n#include <boost/range/algorithm/copy.hpp>\n#include <fstream>\n#include <nav_2d_utils/tf_help.hpp>\n#include <nav_msgs/msg/path.hpp>\n#include <pluginlib/class_list_macros.hpp>\n#include <rclcpp/rclcpp.hpp>\n#include <streambuf>\n\nnamespace cl_nav2z\n{\nnamespace forward_global_planner\n{\nForwardGlobalPlanner::ForwardGlobalPlanner()\n//   : nh_(\"~/ForwardGlobalPlanner\")\n{\n  skip_straight_motion_distance_ = 0.2;  // meters\n  puresSpinningRadStep_ = 1000;          // rads\n}\n\nForwardGlobalPlanner::~ForwardGlobalPlanner() {}\n\nvoid ForwardGlobalPlanner::configure(\n  const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name,\n  const std::shared_ptr<tf2_ros::Buffer> tf,\n  const std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros)\n{\n  nh_ = parent.lock();\n  tf_ = tf;\n  name_ = name;\n  costmap_ros_ = costmap_ros;\n\n  RCLCPP_INFO(nh_->get_logger(), \"[Forward Global Planner] initializing\");\n  planPub_ = nh_->create_publisher<nav_msgs::msg::Path>(\"global_plan\", rclcpp::QoS(1));\n  skip_straight_motion_distance_ = 0.2;  // meters\n  puresSpinningRadStep_ = 1000;          // rads\n  transform_tolerance_ = 0.1;\n}\n\nvoid ForwardGlobalPlanner::cleanup() {}\n\nvoid ForwardGlobalPlanner::activate() { planPub_->on_activate(); }\n\nvoid ForwardGlobalPlanner::deactivate()\n{\n  nav_msgs::msg::Path planMsg;\n  planPub_->publish(planMsg);\n  planPub_->on_deactivate();\n}\n\nnav_msgs::msg::Path ForwardGlobalPlanner::createPlan(\n  const geometry_msgs::msg::PoseStamped & start, const geometry_msgs::msg::PoseStamped & goal,\n  std::function<bool()> /*cancel_checker*/)\n{\n  RCLCPP_INFO(nh_->get_logger(), \"[Forward Global Planner] planning\");\n\n  rclcpp::Duration ttol = rclcpp::Duration::from_seconds(transform_tolerance_);\n\n  RCLCPP_INFO(nh_->get_logger(), \"[Forward Global Planner] getting start and goal poses\");\n  //---------------------------------------------------------------------\n  geometry_msgs::msg::PoseStamped transformedStart;\n  nav_2d_utils::transformPose(tf_, costmap_ros_->getGlobalFrameID(), start, transformedStart, ttol);\n  transformedStart.header.frame_id = costmap_ros_->getGlobalFrameID();\n  //---------------------------------------------------------------------\n  geometry_msgs::msg::PoseStamped transformedGoal;\n  nav_2d_utils::transformPose(tf_, costmap_ros_->getGlobalFrameID(), goal, transformedGoal, ttol);\n  transformedGoal.header.frame_id = costmap_ros_->getGlobalFrameID();\n  //---------------------------------------------------------------------\n\n  RCLCPP_INFO(nh_->get_logger(), \"[Forward Global Planner] creating plan vector\");\n  nav_msgs::msg::Path planMsg;\n  std::vector<geometry_msgs::msg::PoseStamped> plan;\n\n  // three stages: 1 - heading to goal position, 2 - going forward keep orientation, 3 - heading to goal orientation\n\n  // 1 - heading to goal position\n  // orientation direction\n\n  double dx = transformedGoal.pose.position.x - transformedStart.pose.position.x;\n  double dy = transformedGoal.pose.position.y - transformedStart.pose.position.y;\n\n  double length = sqrt(dx * dx + dy * dy);\n\n  geometry_msgs::msg::PoseStamped prevState;\n  if (length > skip_straight_motion_distance_)\n  {\n    // skip initial pure spinning and initial straight motion\n    RCLCPP_INFO(nh_->get_logger(), \"1 - heading to goal position pure spinning\");\n    double heading_direction = atan2(dy, dx);\n    prevState = cl_nav2z::makePureSpinningSubPlan(\n      transformedStart, heading_direction, plan, puresSpinningRadStep_);\n\n    // RCLCPP_INFO(nh_->get_logger(), \"2 - going forward keep orientation pure straight\");\n    prevState =\n      cl_nav2z::makePureStraightSubPlan(prevState, transformedGoal.pose.position, length, plan);\n  }\n  else\n  {\n    prevState = transformedStart;\n  }\n\n  RCLCPP_INFO(nh_->get_logger(), \"3 - heading to goal orientation\");\n  double goalOrientation = angles::normalize_angle(tf2::getYaw(transformedGoal.pose.orientation));\n  cl_nav2z::makePureSpinningSubPlan(prevState, goalOrientation, plan, puresSpinningRadStep_);\n  planMsg.poses = plan;\n  planMsg.header.stamp = this->nh_->now();\n  planMsg.header.frame_id = this->costmap_ros_->getGlobalFrameID();\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[Forward Global Planner] generated plan size: \" << plan.size());\n\n  // check plan rejection\n  bool acceptedGlobalPlan = true;\n\n  RCLCPP_INFO(\n    nh_->get_logger(), \"[Forward Global Planner] checking obstacles in the generated plan\");\n  nav2_costmap_2d::Costmap2D * costmap2d = this->costmap_ros_->getCostmap();\n  for (auto & p : plan)\n  {\n    unsigned int mx, my;\n    costmap2d->worldToMap(p.pose.position.x, p.pose.position.y, mx, my);\n    auto cost = costmap2d->getCost(mx, my);\n\n    // static const unsigned char NO_INFORMATION = 255;\n    // static const unsigned char LETHAL_OBSTACLE = 254;\n    // static const unsigned char INSCRIBED_INFLATED_OBSTACLE = 253;\n    // static const unsigned char FREE_SPACE = 0;\n\n    if (cost >= nav2_costmap_2d::INSCRIBED_INFLATED_OBSTACLE)\n    {\n      RCLCPP_INFO_STREAM(\n        nh_->get_logger(), \"[Forward Global Planner] pose \" << p.pose.position.x << \", \"\n                                                            << p.pose.position.y\n                                                            << \" rejected, cost: \" << cost);\n      acceptedGlobalPlan = false;\n      break;\n    }\n  }\n\n  if (acceptedGlobalPlan)\n  {\n    RCLCPP_INFO_STREAM(\n      nh_->get_logger(), \"[Forward Global Planner] accepted plan: \" << plan.size());\n    planPub_->publish(planMsg);\n    return planMsg;\n  }\n  else\n  {\n    RCLCPP_INFO(nh_->get_logger(), \"[Forward Global Planner] plan rejected\");\n    planMsg.poses.clear();\n    planPub_->publish(planMsg);\n    return planMsg;\n  }\n}\n\n}  // namespace forward_global_planner\n}  // namespace cl_nav2z\n\n// register this planner as a BaseGlobalPlanner plugin\nPLUGINLIB_EXPORT_CLASS(\n  cl_nav2z::forward_global_planner::ForwardGlobalPlanner, nav2_core::GlobalPlanner)\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/forward_local_planner/CHANGELOG.rst",
    "content": "Changelog for package forward_local_planner\n==============================================\n\nVersion 2.3.16 (2023-07-16)\n---------------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2` repository.\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for a weird issue with ros buildfarm.\n\n### Contributors\n- brettpac\n- pabloinigoblasco\n\nVersion 2.3.6 (2023-03-12)\n--------------------------\nNo changes.\n\nVersion 1.22.1 (2022-11-09)\n---------------------------\n### Added\n- Pre-release.\n\n### Contributors\n- pabloinigoblasco\n\nVersion 0.3.0 (2022-04-04)\n--------------------------\nNo changes.\n\nVersion 0.0.0 (2022-11-09)\n---------------------------\n### Added\n- Publisher progress in migration to humble.\n- Reverted \"Ignore packages which should not be released.\"\n- Feature/master rolling to galactic backport (#236)\n  - Updated mentions of SMACC/ROS to SMACC2/ROS2.\n  - Progress on navigation rolling.\n  - Renamed folders, deleted tracing.md, edited README.md.\n  - Added smacc2_performance_tools.\n  - Performance tests improvements.\n  - Format cleanup for sm_respira_1.\n  - Optimized dependencies in move_base_z_planners_common.\n  - Renamed event generator library.\n  - Added galactic CI setup and renamed rolling files.\n  - Fixed source CI and corrected README overview.\n  - Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n  - Added new feature, cb_wait_topic_message.\n  - Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic.\n  - Corrected all linters and formatters.\n\n### Contributors\n- Denis Štogl\n- pabloinigoblasco\n- Ubuntu 20-04-02-amd64\n\n### Co-Authored\n- brettpac\n- Denis Štogl\n\n```rst\nSection_2\n=========\n\nAdded\n-----\n\n- New feature: `cb_wait_topic_message`: asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for nav2: `add` for waiting nav2 nodes subscribing to the `/bond` topic and ensuring they are alive. Nodes to wait can be optionally selected.\n- New client behavior: `cb_pause_slam` for pausing SLAM.\n- New client behavior: `sm_dance_bot_lite` for visualizing TurtleBot3.\n- New client behavior: `sm_multi_stage_1` doubling.\n- New client behavior: `sm_dance_bot_strikes_back` gazebo fixes.\n\nChanged\n-------\n\n- Improved core functionality during navigation testing.\n- Formatting enhancements.\n- Progress in AWS navigation demo.\n- Navigation parameters fixes on `sm_dance_bot`.\n- Gazebo fixes to show the robot and lidar.\n- Minor hotfixes.\n\nFixed\n-----\n\n- Removed some compile warnings.\n- Removed `neo_simulation2` package.\n- Corrected formatting.\n- Enabled source build on PR for testing.\n- Adjusted build packages of source CI.\n\nRemoved\n-------\n\n- Removed `neo_simulation2` package.\n\nContributors\n------------\n\n- Pablo Iñigo Blasco\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\nSection_3\n=========\n\nVersion 0.1.0 (2022-01-01)\n--------------------------\n\n### Added\n- Diverse improvements in navigation and performance (#116)\n- Feature: diverse improvements in navigation performance (#117)\n- Additional linting and formatting\n- Added slam toggle and smacc deep history feature (#122)\n- Progress in navigation, slam toggle client behaviors, and slam_toolbox components\n- Introducing slam pausing/resuming functionality in testing sm_dance_bot\n- More fixes for sm_dance_bot (#125)\n- Added dance bot s pattern feature (#128)\n- First working version of sm template and template generator (#127)\n- Added SM Atomic SM generator (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Added QOS durability to SmaccPublisherClient (#163)\n- Added reliability qos config to SmaccPublisherClient\n- Added durability qos to SmaccPublisherClient\n- Added warehouse2 (#177)\n- Added waypoint inputs (#178)\n\n### Changed\n- Move method after the method it calls to prevent recursion (#126)\n- Renamed sm_advanced_recovery_1 (#171)\n- Reworked sm_multi_stage_1 (#172)\n- Renamed sm_multi_stage_1\n- Reworked multistage modes, sequences, steps, and finishing touches\n\n### Fixed\n- Minor format issues (#134)\n- Fixed launch command in README.md for sm_dance_bot_strikes_back\n- Fixed CI format for Python version (#148)\n\n### Removed\n- Removed merge markers from a Python file (#119)\n- Removed node creation and created only a logger (#149)\n- Removed parameters smacc (#147)\n- Removed test from main moveit CMake\n\n### Authors\n- Pablo Iñigo Blasco\n- Brett (brett@robosoft.ai)\n- DecDury (declandury@gmail.com)\n- Denis Štogl (denis@stogl.de, destogl@users.noreply.github.com)\n\n```rst\nSection_4\n=========\n\nAdded\n-----\n- Feature/sm warehouse 2 13 dec 2 (#182)\n  - Implemented new warehouse feature.\n- Feature/wharehouse2 dec 14 (#185)\n  - Added improvements to warehouse functionality.\n- Feature/cb pure spinning (#188)\n  - Introduced pure spinning behavior.\n- Feature/replanning 16 dec (#193)\n  - Enhanced replanning capabilities.\n- Feature/undo motion 20 12 (#196, #198)\n  - Improved undo motion navigation in warehouse2.\n- Feature/sync 21 12 (#199)\n  - Addressed synchronization issues.\n- Feature/warehouse2 22 12 (#200)\n  - Resolved warehouse2 format issues.\n- Feature/warehouse2 23 12 (#201)\n  - Tuned and fixed warehouse2.\n- Feature/minor tune (#203)\n  - Made minor adjustments for optimization.\n- Fix trailing spaces, codespell, python linters warnings (#206)\n  - Corrected various code issues and added Galactic CI build.\n\nChanged\n-------\n- Updated sm_three_some launch command.\n- Renamed header files and corrected formatting.\n- Updated doxygen-check-build.yml and doxygen-deploy.yml workflows.\n- Renamed to smacc2 and smacc2_msgs.\n- Updated GitHub branch reference.\n- Reset all versions to 0.0.0.\n- Updated description table.\n- Updated table.\n- Updated changelogs.\n\nRemoved\n-------\n- Manual installation of ros-rolling-ros2trace.\n  - Now automated in setupTracing.sh script.\n\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nAuthor: Pablo Iñigo Blasco (pabloinigoblasco)\n```\n\n```rst\nSection_5\n=========\n\nAdded\n-----\n- Enable Navigation2 for semi-binary build.\n- Added smacc2_performance_tools.\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success.\n- Added new client behavior add for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive. You optionally can select the nodes to wait.\n\nChanged\n-------\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed folders, deleted tracing.md, and edited README.md.\n- Optimized dependencies in move_base_z_planners_common.\n- Renamed event generator library.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n- Corrected trailing spaces.\n- Cleaned up sm_reference_library.\n- Updated smacc2_rta command across readmes.\n- Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n- Corrected all linters and formatters.\n\nFixed\n-----\n- Do not execute clang-format on smacc2_sm_reference_library package.\n- Fixed source CI and corrected README overview.\n- Fixed pre-commit issues.\n\nRemoved\n-------\n- Removed galactic builds from master and kept only rolling.\n- Removed submodules and used .repos file.\n\nOther\n-----\n- Some progress on navigation rolling.\n- Performance tests improvements.\n- More on performance and other issues.\n- Several core improvements during navigation testing.\n- Progress in AWS navigation demo.\n- Progressing in AWS navigation.\n- Minor formatting improvements.\n- More changes on performance tests.\n- More on navigation.\n- Noticed a note that was not removed.\n``` \n\n*pabloinigoblasco*\n\n```rst\nSection_6\n=========\n\nAdded\n-----\n\n- New client behavior `cb_wait_topic_message` added for nav2. It allows waiting for nav2 nodes to subscribe to the `/bond` topic and ensuring they are alive. Nodes to wait for can be optionally selected.\n- New feature `cb_pause_slam` added.\n- New feature `sm_dance_bot_lite` added.\n- New feature `sm_dance_bot_strikes_back` added.\n- New feature `sm_multi_stage_1` added.\n- New feature `sm_multi_stage_1` doubling added.\n- AWS demo feature added.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation.\n- Progress in navigation testing.\n- Progress in `sm_aws_warehouse` navigation.\n- Progress in `sm_dance_bot` fixes.\n- Progress in `sm_dance_bot` visualizing TurtleBot3.\n- Progress in `sm_dance_bot` launch Gazebo lidar choice.\n- Progress in `sm_multi_stage_1` working.\n- Progress in diverse improvements in navigation and performance.\n- Progress in slam toggle client behaviors and `slam_toolbox` components.\n- Progress in testing `sm_dance_bot` introducing slam pausing/resuming functionality.\n- Progress in `sm_dance_bot` S pattern.\n\nChanged\n-------\n\n- Minor format changes.\n- Navigation parameters fixes on `sm_dance_bot`.\n- Remove some compile warnings.\n- Remove `neo_simulation2` package.\n- Correct formatting.\n- Enable source build on PR for testing.\n- Adjust build packages of source CI.\n- Additional linting and formatting.\n- Remove merge markers from a Python file.\n- Move method after the method it calls to prevent recursion.\n\nFixed\n-----\n\n- Format fixes.\n- Gazebo fixes to show the robot and the lidar.\n- Fix format.\n\nRemoved\n-------\n\n- Removed `neo_simulation2` package.\n\nCollaborators\n-------------\n\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: pabloinigoblasco <pablo@ibrobotics.com>\n```\n\n```rst\nSection_7\n=========\n\nAdded\n-----\n\n- First working version of sm template and template generator. (#127)\n- Feature/dance bot s pattern (#129)\n- Feature/sm dance bot refine (#131)\n- Feature/sm dance bot refine 2 (#132)\n- Feature/nav2z renaming (#144)\n- Added SM Atomic SM generator. (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Feature/sm dance bot strikes back refactoring (#152)\n- Feature/migration moveit client (#151)\n- Add SM core test (#138)\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/testing moveit behaviors (#167)\n- Feature/aws navigation sm dance bot (#174)\n- Feature/wharehouse2 dec 14 (#185)\n- Feature/cb pure spinning (#188)\n- Feature/cb pure spinning (#189)\n\nChanged\n-------\n\n- Minor tweaks (#130)\n- Minor navigation improvements (#141)\n- Minor format issues (#134)\n- Fix CI: format fix python version (#148)\n- Update package list. (#142)\n- Update readme (#164)\n- Add dependencies for husky in rolling and galactic.\n- Finetuning waypoints (#187)\n\nFixed\n-----\n\n- Waypoints navigator bug (#133)\n- Resolve compile warnings (#137)\n- Remove node creation and create only a logger. (#149)\n- Fixing some errors introduced on formatting\n- Fixing some more linting warnings\n- Fixing compiling issues\n- Fixing broken master build\n- SrConditional fixes and formatting (#168)\n\nRemoved\n-------\n\n- Removing sm_dance_bot_msgs\n- Removing parameters smacc\n- Removing test from main moveit cmake\n- Removing parameters smacc\n- Removing references to sm_dance_bot_msgs\n- Removing test from main moveit cmake\n\nOther\n-----\n\n- Noticed typo \"Finnaly\" corrected to \"Finally\"\n- Noticed launch command was incorrect in README.md, fixed launch command for sm_dance_bot_strikes_back and removed some comments\n- Noticed some minor tuning to mitigate overshot issue cases\n- Noticed some progress in the sm_dance_bot tests\n- Noticed some progress on markers cleanup\n- Noticed some progress on moveit migration testing\n- Noticed some progress on moveit\n- Noticed some more readme updates\n- Noticed some progress on aws navigation and some other refactorings on navigation clients and behaviors\n- Noticed some warehouse2 progress\n- Noticed some more waypoints added\n- Noticed some slight waypoint 4 and iterations changes so robot can complete course\n- Noticed some progress on move_it PR\n- Noticed some minor dockerfile test workaround\n- Noticed some improving dockerfile for building local tests\n- Noticed some repos dependency added\n- Noticed some dependency to ur5 client added\n- Noticed some docker refactoring\n- Noticed some progress on moveit\n- Noticed some more testing on moveit behaviors\n- Noticed some minor configuration\n- Noticed some fixing pipeline error\n- Noticed some warehouse2\n- Noticed some warehouse2 progress\n- Noticed some format\n- Noticed some more changes and headless\n- Noticed some merge\n- Noticed some headless and other fixes\n- Noticed some default values\n- Noticed some more waypoints finetuning\n- Noticed some more changes and headless\n- Noticed some default values\n- Noticed some minor changes\n- Noticed some format\n- Noticed some more changes and headless\n- Noticed some merge\n- Noticed some headless and other fixes\n- Noticed some default values\n- Noticed some minor changes\n```\n\n```rst\nSection 8\n=========\n\nAdded\n-----\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Feature/undo motion 20 12 (#196)\n- Feature/undo motion 20 12 (#198)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- Feature/warehouse2 23 12 (#201)\n- Feature/minor tune (#203)\n- Merging code from backport foxy and updates about autoware (#208)\n- Foxy backport (#206)\n- Add galactic CI build because Navigation2 is broken in rolling\n- Add partial changes for ament_cpplint\n- Add tf2_ros as dependency to find include\n- Create workflow for testing prerelease builds\n- Use docs/ as source folder for documentation\n- Use docs/ as output directory\n- Rename to smacc2 and smacc2_msgs\n- Execute on master update\n- Reset all versions to 0.0.0\n- Update changelogs\n- Revert \"Ignore all packages except smacc2 and smacc2_msgs\"\n- Update description table\n- Update table\n- Copy initial docs\n- Dockerfile w/ ROS distro as argument\n- Opened new folder for additional tracing contents\n- Moved tracing.md to tracing directory\n- Added setupTracing.sh\n- Removed manual installation of ros-rolling-ros2trace\n- Created alternative ManualTracing\n- Added a dockerfile for Rolling and Galactic\n- Update smacc2_ci/docker/ros_rollingAndGalactic_ubuntu_20.04/buildGalactic.sh\n- Update tracing/ManualTracing.md\n- Update smacc_sm_reference_library/sm_atomic/README.md\n\nChanged\n-------\n- Rename header files and correct format\n- Change extension of imports\n- Correct wording from \"smacc application\" to \"SMACC2 library\"\n\nFixed\n-----\n- Several fixes (#194)\n- Tuning warehouse3 (#197)\n- Tuning and fixes (#202)\n- Fixing warehouse 3 problems, and other core improvements (#204)\n- Enable build of missing rolling repositories\n- Enable Navigation2 for semi-binary build\n\nRemoved\n-------\n- Merge\n- Headless and other fixes\n- Default values\n- Pure spinning behavior missing files\n- More fixes\n- Replanning for all our examples\n- Several fixes\n- Improving undo motion navigation warehouse2\n- Undo tuning and errors\n- Format issues\n- Finishing warehouse2\n- Tuning and fixes\n- Fix trailing spaces\n- Correct codespell\n- Correct python linters warnings\n- Disable ament_cpplint\n- Disable some packages and update workflows\n- Bump ccache version\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences\n- Disable cpplint and cppcheck linters\n- Correct formatters\n- Disable disabled packages\n- Change extension\n- Enable cppcheck\n- Correct formatting of python file\n- Included necessary package and edited Threesome launch\n- Update ci-build-source.yml\n- Update doxygen-check-build.yml\n- Create doxygen-deploy.yml\n- Use manual deployment for now\n- Ignore all packages except smacc2 and smacc2_msgs\n- Reverted markdowns to html\n- Added README tutorial for Dockerfile\n- Additional cleanup\n- Cleanup\n``` \n\n*pabloinigoblasco*\n\n```rst\nSection_9\n=========\n\nAdded\n-----\n- Added smacc2_performance_tools.\n- Added galactic CI setup and renamed rolling files. (#58)\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success.\n- Added new client behavior add for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive. You optionally can select the nodes to wait.\n\nChanged\n-------\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed folders, deleted tracing.md, edited README.md.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Updated smacc2_rta command across readmes.\n- Corrected trailing spaces.\n- Optimized dependencies in move_base_z_planners_common.\n- Renamed event generator library.\n- Updated c_cpp_properties.json.\n- Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Updated doxygen links.\n- Updated README.md with launch command.\n\nFixed\n-----\n- Fixed source CI and corrected README overview. (#62).\n- Fixed all linters and formatters.\n\nRemoved\n-------\n- Removed galactic builds from master and kept only rolling.\n- Removed submodules and used .repos file.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n\nOther\n-----\n- Some progress on navigation rolling.\n- More changes on performance tests.\n- Minor formatting.\n- Noticed a note that was not removed.\n- Several core improvements during navigation testing.\n- Progress in AWS navigation demo.\n- Progressing in AWS navigation.\n- More on navigation.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n\n```rst\nSection_10\n==========\n\nAdded\n-----\n- New client behavior `cb_wait_topic_message`: asynchronous behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for nav2: waits for nav2 nodes to subscribe to the /bond topic and confirms they are active. Optional node selection available.\n- Base for the `sm_aws_warehouse` navigation.\n- `cb_pause_slam` client behavior.\n- `sm_dance_bot_lite` visualizing TurtleBot3.\n- Gazebo fixes to show the robot and lidar.\n- Progress in AWS navigation demo.\n- Progress in navigation, slam toggle client behaviors, and `slam_toolbox` components.\n- Introducing `smacc2::deep_history` syntax.\n- Slam pausing/resuming functionality for `sm_dance_bot`.\n- More fixes and improvements in `sm_dance_bot`.\n\nChanged\n-------\n- Minor formatting improvements.\n- Navigation parameters fixes on `sm_dance_bot`.\n- Remove some compile warnings.\n- Correct formatting for `neo_simulation2` package removal.\n- Adjust build packages of source CI.\n- Move method after the method it calls to prevent recursion.\n\nFixed\n----\n- Merge and progress.\n- Minor hotfix.\n- Precommit cleanup run.\n\nRemoved\n-------\n- Removed `neo_simulation2` package.\n\nContributors\n------------\n- Pablo Iñigo Blasco <pablo@ibrobotics.com>\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\n```rst\nSection_11\n==========\n\nAdded\n-----\n- First working version of sm template and template generator. (#127)\n- Feature/dance bot s pattern (#129)\n- Feature/sm dance bot refine (#131)\n- Feature/sm dance bot refine 2 (#132)\n- Feature/nav2z renaming (#144)\n- Added SM Atomic SM generator. (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Add SM core test (#138)\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/testing moveit behaviors (#167)\n- Feature/aws navigation sm dance bot (#174)\n- Feature/wharehouse2 dec 14 (#185)\n- Feature/cb pure spinning (#188)\n- Feature/cb pure spinning (#189)\n\nChanged\n-------\n- Minor tweaks (#130)\n- Minor navigation improvements (#141)\n- Using local action msgs (#139)\n- Removing sm_dance_bot_msgs\n- Update package list. (#142)\n- Fix CI: format fix python version (#148)\n- Remove node creation and create only a logger. (#149)\n- Moved reference library SMs to smacc2_performance_tools (#166)\n- Finetuning waypoints (#187)\n\nFixed\n-----\n- Waypoints navigator bug (#133)\n- Resolve compile warnings (#137)\n- Fixing some errors introduced on formatting\n- Fixing some more linting warnings\n- Fixing compiling issues\n- Fixing broken master build\n- SrConditional fixes and formatting (#168)\n\nRemoved\n-------\n- Removing parameters smacc\n- Removing test from main moveit cmake\n\nOther\n-----\n- Polishing sm_dance_bot and s-pattern\n- Noticed typo \"Finnaly\" corrected to \"Finally\"\n- Minor format issues (#134)\n- Minor tuning to mitigate overshot issue cases\n- Some more progress on markers cleanup\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Precommit cleanup\n- Pending references\n- Docker refactoring\n- Repos dependency\n- Progress on move_it PR\n- Progress on moveit migration testing\n- Progress on aws navigation and some other refactorings on navigation clients and behaviors\n- More on aws demo\n- Warehouse2 progress (#179)\n- Format (#180)\n- Format\n- More changes and headless\n- Merge\n- Headless and other fixes\n- Default values\n- Brettpac branch (#184)\n- Redoing sm_dance_bot_warehouse_3 waypoints\n- More waypoints\n- Finishing touches 1\n- Readme updates\n- More readme updates\n- Update readme (#164)\n- Initial state machine transition timestamp (#165)\n- Multistage modes\n- Sm_multi_stage sequences\n- Sm_multi_state_1 steps\n- Sm_multi_stage_1 sequence d\n- Sm_multi_stage_1 c sequence\n- Mode_5_sequence_b\n- Mode_4_sequence_b\n- Sm_multi_stage_1 most\n- Warehouse2\n- Waypoint Inputs (#178)\n```\n\n*pabloinigoblasco*\n\n```rst\nSection_12\n==========\n\nAdded\n-----\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Feature/undo motion 20 12 (#196)\n- Feature/undo motion 20 12 (#198)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- Feature/warehouse2 23 12 (#201)\n- Feature/minor tune (#203)\n- Fix rolling builds (#222)\n- Add Autoware Auto Msgs into not-released dependencies. (#220)\n- Add mergify rules file.\n- Try fixing CI for rolling. (#209)\n- Remove example things from Foxy CI setup. (#214)\n- Foxy backport (#206)\n- Add galactic CI build because Navigation2 is broken in rolling.\n- Add partial changes for ament_cpplint.\n- Add tf2_ros as dependency to find include.\n- Disable ament_cpplint.\n- Disable some packages and update workflows.\n- Bump ccache version.\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences.\n- Disable cpplint and cppcheck linters.\n- Correct formatters.\n- Enable cppcheck\n- Included necessary package and edited Threesome launch\n- Add workflow for checking doc build.\n- Create doxygen-deploy.yml\n- Create workflow for testing prerelease builds\n- Rename to smacc2 and smacc2_msgs\n- Update name of package and package.xml to pass liter.\n- Update changelogs\n- Revert \"Ignore all packages except smacc2 and smacc2_msgs\"\n- Update description table.\n- Update table\n- Copy initial docs\n- Dockerfile w/ ROS distro as argument\n- Opened new folder for additional tracing contents\n- Delete tracing directory\n- Moved tracing.md to tracing directory\n- added setupTracing.sh\n- Removed manual installation of ros-rolling-ros2trace\n- Created alternative ManualTracing\n- added new sm markdowns\n- added a dockerfile for Rolling and Galactic\n\nChanged\n-------\n- some reordering fixes\n- fixing warehouse 3 problems, and other core improvements to remove dead lock, also making continuous integration green\n- updating subscriber publisher components\n- progress in autowarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrre machine\n- refining cp subscriber cp publisher\n- improvements in smacc core adding more components mostly developed for autoware demo\n- autoware demo\n- branching example\n- ros2 launch sm_three_some sm_three_some to ros2 launch sm_three_some sm_three_some.launch\n- Rename header files and correct format.\n- Update doxygen-check-build.yml\n- Use manual deployment for now.\n- Use docs/ as source folder for documentation\n- Use docs/ as output directory.\n- Correct GitHub branch reference.\n- Execute on master update\n- Reset all versions to 0.0.0\n- Update ci-build-source.yml\n- Change extension\n- Change extension of imports.\n\nFixed\n-----\n- minor broken build\n- fixing docker for foxy and galactic\n- removing warnings (#213)\n- fixing warehouse 3 problems, and other core improvements to remove dead lock, also making continuous integration green\n- weird moveit not downloaded repo\n- added missing file from warehouse2 (#205)\n- Fix trailing spaces.\n- Correct codespell.\n- Correct python linters warnings.\n\nRemoved\n-------\n- missing\n- missing sm\n- backport to foxy\n- minor format\n- minor linking errors foxy\n\nCo-authored-by: Denis Štogl <denis@stogl.de>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Declan Dury <44791484+DecDury@users.noreply.github.com>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: reelrbtx <brett2@reelrobotics.com>\nCo-authored-by: brettpac <brett@robosoft.ai>\nCo-authored-by: David Revay <MrBlenny@users.noreply.github.com>\nCo-authored-by: pabloinigoblasco <pabloinigoblasco@ibrobotics.com>\n\n```\n\n```rst\nSection_13\n==========\n\nAdded\n-----\n\n- Enable build of missing rolling repositories.\n- Enable Navigation2 for semi-binary build.\n- Added README tutorial for Dockerfile.\n- Added smacc2_performance_tools.\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success.\n- Adding new client behavior add for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive. You optionally can select the nodes to wait.\n\nChanged\n-------\n\n- Changed wording \"smacc application\" to \"SMACC2 library\".\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed tracing events.\n- Renamed folders.\n- Renamed event generator library.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n- Updated smacc2_rta command across readmes.\n\nFixed\n-----\n\n- Bug in smacc2 component.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n- Correct trailing spaces.\n- Optimized dependencies in move_base_z_planners_common.\n- Correct all linters and formatters.\n\nRemoved\n-------\n\n- Removed galactic builds from master and kept only rolling. Removed submodules and use .repos file.\n- Deleted tracing.md.\n\nOther\n-----\n\n- Reactivated smacc2 nav clients for rolling via submodules.\n- Reverted markdowns to html.\n- Edited tracing.md to reflect new tracing event names.\n- Edited README.md.\n- Minor formatting improvements.\n- Several core improvements during navigation testing.\n- More changes on performance tests.\n- More on performance and other issues.\n- Progress in aws navigation demo.\n- More on navigation.\n- Some progress on navigation rolling.\n- Formatting improvements.\n- Cleanup.\n- Additional cleanup.\n- Format cleanup.\n- Format cleanup pre-commit.\n- Reworked sm_advanced_recovery_1.\n- Fix pre-commit.\n- Trying to fix Pre-Commit.\n- More sm_advanced_recovery_1 work.\n- More on sm_advanced_recovery_1.\n- More sm_multi_stage_1.\n- Fixing precommit.\n- More sm_multi_stage_1.\n- More on sm_atomic_performance_test_a_2.\n- Modifying sm_atomic_performance_test_a_2.\n- More sm_atomic_performance_test_c_1.\n- More sm_atomic_performance_test_a_1.\n- More sm_atomic_performance_test_a_2.\n- More sm_atomic_24hr cleanup.\n- Clean up of sm_atomic_24hr.\n- More Readme Updates.\n- More Readme.\n- Created new sm from sm_respira_1.\n- Feature/core and navigation fixes.\n- Feature/aws demo progress.\n- Feature/wait nav2 nodes client behavior.\n- Brettpac branch.\n\nCommits\n-------\n\n- Update smacc2_ci/docker/ros_rollingAndGalactic_ubuntu_20.04/buildGalactic.sh (Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>).\n- Update tracing/ManualTracing.md (Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>).\n- Update smacc_sm_reference_library/sm_atomic/README.md (Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>).\n- Update c_cpp_properties.json.\n- Update README.md.\n- Update doxygen links (Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>).\n```\n*pabloinigoblasco*\n\n```rst\nSection_14\n==========\n\nAdded\n-----\n- Introducing new feature `cb_wait_topic_message`: asynchronous client behavior that waits for a topic message and optionally verifies its contents for success.\n- New client behavior `add` for nav2: waits for nav2 nodes subscribing to the `/bond` topic and ensures they are alive. Optional selection of nodes to wait for.\n- Progress in AWS navigation demo.\n\nChanged\n-------\n- Minor formatting improvements.\n\nFixed\n-----\n- Navigation parameters fixes on `sm_dance_bot`.\n- Removed some compile warnings.\n\nRemoved\n-------\n- Removed `neo_simulation2` package.\n\nOther\n-----\n- Base for the `sm_aws_warehouse` navigation.\n- Several core improvements during navigation testing.\n- Progress in AWS navigation demo.\n- Merge and progress.\n- `cb_pause_slam` client behavior.\n- `sm_dance_bot_lite`.\n- Updates yaml.\n- `sm_dance_bot` visualizing `turtlebot3`.\n- Cleaning and lidar show/hide option.\n- Cleaning files and fixing formatting.\n- More fixes.\n- Gazebo fixes to show the robot and the lidar.\n- Gazebo fixes for `sm_dance_bot_strikes_back`.\n- Precommit cleanup run.\n- AWS demo.\n- Got `sm_multi_stage_1` working (barely).\n- Brettpac branch.\n- Gaining traction with `sm_multi_stage_1`.\n- More progress on `sm_multi_stage_1`.\n- Keep hammering.\n- Two stages.\n- 3 part.\n- 4th stage.\n- 5th stage.\n- Diverse improvements in navigation and performance.\n``` \n\n*pabloinigoblasco*\n\n# Changelog\n\n## [Unreleased]\n\n### Added\n- Added SM Atomic SM generator. (#143)\n- Added QOS durability to SmaccPublisherClient (#163)\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Added dependencies for husky simulation in AWS navigation (#174)\n- Added dependencies for husky in rolling and galactic in AWS navigation (#174)\n\n### Changed\n- Moved reference library SMs to smacc2_performance_tools (#166)\n- Renamed sm_advanced_recovery_1 (#171)\n- Reworked sm_multi_stage_1 (#172)\n- Renamed sm_multi_stage_1 (#172)\n- Renamed sm_multi_stage_1 sequence d (#172)\n- Renamed sm_multi_stage_1 c sequence (#172)\n- Renamed mode_5_sequence_b (#172)\n- Renamed mode_4_sequence_b (#172)\n- Updated navigation 2 stack renaming (#144)\n- Updated package list (#142)\n- Updated readme (#164)\n- Updated readme (#164)\n- Updated readme (#164)\n- Updated dependencies for husky in rolling and galactic in AWS navigation (#174)\n\n### Fixed\n- Fixed launch command in README.md for sm_dance_bot_strikes_back (#147)\n- Fixed CI: format fix python version (#148)\n- Fixed compiling issues (#154)\n- Fixed broken master build in testing moveit behaviors (#167)\n- Fixed pipeline error in testing moveit behaviors (#167)\n- Fixed broken build in AWS navigation (#174)\n\n### Removed\n- Removed merge markers from a python file (#119)\n- Removed parameters smacc (#147)\n- Removed node creation and create only a logger (#149)\n- Removed sm_dance_bot_msgs in nav2z renaming (#144)\n- Removed test from main moveit cmake in migration moveit client (#151)\n\n## [1.0.0] - 2022-01-01\n\n### Added\n- First working version of sm template and template generator. (#127)\n- Added SM core test (#138)\n- Added SM Atomic SM generator. (#143)\n\n### Changed\n- Progress in navigation, slam toggle client behaviors, and slam_toolbox components in slam toggle and smacc deep history (#122)\n- Progress in testing sm_dance_bot introducing slam pausing/resuming functionality in slam toggle and smacc deep history (#122)\n- Progress in the sm_dance_bot tests (#135)\n- Progress on moveit migration testing in migration moveit client (#151)\n\n### Fixed\n- Minor tuning to mitigate overshot issue cases in waypoints navigator bug (#133)\n- Minor format issues (#134)\n- Minor navigation improvements (#141)\n- Fixing some errors introduced on formatting in migration moveit client (#151)\n- Fixing some more linting warnings in migration moveit client (#151)\n- Fixing compiling issues in migration moveit client (#151)\n\n### Removed\n- Pending references in nav2z renaming (#144)\n\n## [0.1.0] - 2021-12-01\n\n### Added\n- More changes in sm_dance_bot (#125)\n- More changes in sm_dance_bot (#128)\n- More changes in sm_dance_bot (#129)\n- More changes in sm_dance_bot (#131)\n- More changes in sm_dance_bot (#132)\n- More changes in sm_dance_bot (#136)\n- More testing on moveit behaviors (#167)\n- More testing on moveit behaviors (#167)\n- More testing on moveit behaviors (#167)\n- More testing on moveit behaviors (#167)\n- More testing on moveit behaviors (#167)\n- More testing on moveit behaviors (#167)\n\n### Changed\n- Move method after the method it calls to prevent recursion in (#126)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#128)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in dance bot s pattern (#129)\n- Polishing sm_dance_bot and s-pattern in\n\n```rst\nSection_16\n==========\n\nAdded\n-----\n- Brettpac branch (#184)\n- Redoing sm_dance_bot_warehouse_3 waypoints\n- More Waypoints\n- Feature/wharehouse2 dec 14 (#185)\n- warehouse2\n- Feature/sm warehouse 2 13 dec 2 (#186)\n- format\n- more changes and headless\n- merge\n- headless and other fixes\n- default values\n- finetuning waypoints (#187)\n- Feature/cb pure spinning (#188)\n- pure spinning behavior missing files\n- minor changes (#190)\n- Feature/planner changes 16 12 (#191)\n- minor changes\n- more fixes\n- Feature/replanning 16 dec (#193)\n- minor changes\n- replanning for all our examples\n- several fixes (#194)\n- minor changes (#195)\n- Feature/undo motion 20 12 (#196)\n- minor changes\n- replanning for all our examples\n- improving undo motion navigation warehouse2\n- tuning warehouse3 (#197)\n- Feature/undo motion 20 12 (#198)\n- minor changes\n- replanning for all our examples\n- improving undo motion navigation warehouse2\n- undo tuning and errors\n- Feature/sync 21 12 (#199)\n- minor changes\n- replanning for all our examples\n- format issues\n- Feature/warehouse2 22 12 (#200)\n- minor changes\n- replanning for all our examples\n- format issues\n- finishing warehouse2\n- Feature/warehouse2 23 12 (#201)\n- minor changes\n- replanning for all our examples\n- tuning and fixes (#202)\n- Feature/minor tune (#203)\n- tuning and fixes\n- minor tune\n- fixing warehouse 3 problems, and other core improvements (#204)\n- fixing warehouse 3 problems, and other core improvements to remove dead lock, also making continuous integration green\n- added missing file from warehouse2 (#205)\n- backport to foxy\n- minor format\n- minor linking errors foxy\n- docker build files for all versions\n- dockerfiles (#225)\n- Feature/retry behavior warehouse 1 (#226)\n- minor changes\n- replanning for all our examples\n- backport to foxy\n- minor format\n- minor linking errors foxy\n\nChanged\n-------\n- Fix code generators (#221)\n- Fix other build issues.\n- Update SM template and make example code clearly visible.\n- Remove use of node in the sm performance template.\n- Updated templated to use Blackboard storage.\n- Update template to resolve the global data correctly.\n- Update sm_name.hpp\n- Foxy backport (#206)\n- minor formatting fixes\n- Fix trailing spaces.\n- Correct codespell.\n- Correct python linters warnings.\n- Add galactic CI build because Navigation2 is broken in rolling.\n- Add partial changes for ament_cpplint.\n- Add tf2_ros as dependency to find include.\n- Disable ament_cpplint.\n- Disable some packages and update workflows.\n- Bump ccache version.\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences.\n- Disable cpplint and cppcheck linters.\n- Correct formatters.\n- branching example\n- Disable disabled packages\n- Update ci-build-source.yml\n- Change extension\n- Change extension of imports.\n- Enable cppcheck\n- Correct formatting of python file.\n- Included necessary package and edited Threesome launch\n- ros2 launch sm_three_some sm_three_some\n- to\n- ros2 launch sm_three_some sm_three_some.launch\n- Rename header files and correct format.\n- Add workflow for checking doc build.\n- Update doxygen-check-build.yml\n- Create doxygen-deploy.yml\n- Use manual deployment for now.\n- Create workflow for testing prerelease builds\n- Use docs/ as source folder for documentation\n- Use docs/ as output directory.\n- Rename to smacc2 and smacc2_msgs\n- Correct GitHub branch reference.\n- Update name of package and package.xml to pass liter.\n- Execute on master update\n- Reset all versions to 0.0.0\n- Ignore all packages except smacc2 and smacc2_msgs\n- Update changelogs\n- 0.1.0\n\nFixed\n-----\n- SrConditional fixes and formatting (#168)\n- fix: some formatting and templating on SrConditional\n- fix: move trigger logic into headers\n- fix: lint\n- fixing docker for foxy and galactic\n\nRemoved\n-------\n- progress in autowarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrre machine\n- refining cp subscriber cp publisher\n- improvements in smacc core adding more components mostly developed for autoware demo\n- autoware demo\n- missing\n- foxy ci\n- fix\n- minor broken build\n- some reordering fixes\n- minor\n- docker files for different revisions, warnings removval and more testing on navigation\n```\n\n*pabloinigoblasco*\n\n```rst\nSection_17\n==========\n\nAdded\n-----\n\n- Added setupTracing.sh script for installing necessary packages and configuring tracing group.\n- Added alternative ManualTracing method.\n- Added new SM markdowns.\n- Added Dockerfile for Rolling and Galactic.\n- Added galactic CI setup and renamed rolling files. (#58)\n- Added source CI and corrected README overview. (#62)\n- Added doxygen links update (#70)\n- Added more Readme Updates (#72)\n- Added more Readme (#74)\n- Added new SM from sm_respira_1 (#76)\n- Added base for the sm_aws_aarehouse navigation.\n- Added feature/core and navigation fixes (#78).\n- Added feature/aws demo progress (#80).\n- Added feature/wait nav2 nodes client behavior (#82).\n- Added new feature cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents for success.\n\nChanged\n-------\n\n- Updated description table.\n- Updated table.\n- Changed wording \"smacc application\" to \"SMACC2 library\".\n- Updated smacc2_rta command across readmes.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Updated README.md.\n- Renamed event generator library.\n- Optimized dependencies in move_base_z_planners_common.\n- Renamed folders, deleted tracing.md, and edited README.md.\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Reactivated smacc2 nav clients for rolling via submodules.\n- Reverted markdowns to HTML.\n- Edited tracing.md to reflect new tracing event names.\n- Enabled build of missing rolling repositories.\n- Enabled Navigation2 for semi-binary build.\n- Removed galactic builds from master and kept only rolling. Removed submodules and used .repos file.\n- Reformatted sm_reference_library.\n- Corrected trailing spaces.\n- Minor formatting improvements.\n\nFixed\n-----\n\n- Fixed bug in smacc2 component.\n- Fixed issue with sm_atomic_24hr.\n- Fixed pre-commit issues.\n- Fixed formatting in sm_advanced_recovery_1.\n- Fixed issue with sm_atomic_performance_test_a_2.\n- Fixed issue with sm_atomic_performance_test_c_1.\n- Fixed issue with sm_multi_stage_1.\n- Fixed behavior of wait topic message client.\n\nRemoved\n-------\n\n- Removed manual installation of ros-rolling-ros2trace (now automated in setupTracing.sh).\n- Deleted tracing directory.\n- Removed tracing events after renaming.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n- Removed unnecessary cleanup entries.\n\nCollaborators\n-------------\n\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\nSection_18\n-----------\n\nAdded\n-----\n- New feature: `cb_wait_topic_message`, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for `nav2`: `add`, waits for `nav2` nodes subscribing to the `/bond` topic and ensures they are alive. Optional node selection available.\n- Base for the `sm_aws_warehouse` navigation.\n- Progress in AWS navigation demo.\n- New client behavior: `cb_pause_slam`.\n- `sm_dance_bot_lite` visualization for TurtleBot3.\n- Lidar show/hide option for `sm_dance_bot`.\n- Gazebo fixes to show the robot and lidar for various dance bot versions.\n- `sm_multi_stage_1` doubling.\n- `sm_multi_stage_1` working (barely).\n- `sm_multi_stage_1` progress in `Brettpac` branch.\n\nChanged\n-------\n- Corrected all linters and formatters.\n- Minor formatting improvements.\n- Navigation parameters fixes on `sm_dance_bot`.\n\nFixed\n----\n- Removed some compile warnings.\n\nRemoved\n-------\n- Redundant formatting entries.\n\nCo-authored-by: Denis Štogl <denis@stogl.de>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n\n## Section_19\n\n### Added\n- Added multistage modes to `sm_multi_stage_1`.\n- Added sequences and steps to `sm_multi_stage_1`.\n- Added sequences `mode_5_sequence_b` and `mode_4_sequence_b` to `sm_multi_stage_1`.\n- Added finishing touches and updated README to `sm_multi_stage_1`.\n- Added dependencies for husky simulation in `sm_dance_bot`.\n\n### Changed\n- Reworked `sm_multi_stage_1` to include multistage modes, sequences, and steps.\n- Renamed `sm_advanced_recovery_1`.\n- Moved reference library SMs to `smacc2_performance_tools`.\n- Added QOS durability to `SmaccPublisherClient`.\n\n### Fixed\n- Fixed formatting in `neo_simulation2` package removal.\n- Corrected source build packages for testing.\n- Adjusted build packages in source CI.\n- Fixed recursion possibility by moving method after the one it calls.\n- Fixed launch command in `README.md` for `sm_dance_bot_strikes_back`.\n- Fixed CI format for Python version.\n- Removed node creation and created only a logger.\n- Fixed compiling issues in Docker environment.\n\n### Removed\n- Removed `neo_simulation2` package.\n- Removed `sm_dance_bot_msgs` and parameters in `smacc`.\n- Removed test from main MoveIt CMake.\n\n### Miscellaneous\n- Co-authored with Ubuntu 20-04-02-amd64 <brett@robosoft.ai>, DecDury <declandury@gmail.com>, Denis Štogl <destogl@users.noreply.github.com>, and pabloinigoblasco <pablo@ibrobotics.com>.\n- Added SVGs to READMEs of atomic, dance_bot, and others.\n- Updated package list.\n- Updated README files.\n- Added remaining SVGs to READMEs.\n- Precommit cleanup.\n- Added SM Atomic SM generator.\n- Progressed in MoveIt migration testing.\n- Updated format and dependencies for MoveIt migration.\n- Improved Dockerfile for building local tests.\n- Added .reps dependencies and fixed build errors.\n- Updated README files.\n- Added reliability QOS config.\n- Progressed in testing MoveIt behaviors.\n- Fixed pipeline and master build errors.\n\n```rst\nSection_20\n==========\n\nAdded\n-----\n\n- Update dependencies for husky in rolling and galactic.\n- Progress on aws navigation and some other refactorings on navigation clients and behaviors.\n- More on aws demo.\n- Warehouse2 progress.\n- Waypoint Inputs.\n- Wharehouse2 progress.\n- Sm_dance_bot_warehouse_3.\n- Feature/sm warehouse 2 13 dec 2.\n- Finetuning waypoints.\n- Feature/cb pure spinning.\n- Pure spinning behavior missing files.\n- Feature/planner changes 16 12.\n- Feature/replanning 16 dec.\n- Replanning for all our examples.\n- Several fixes.\n- Improving undo motion navigation warehouse2.\n- Undo tuning and errors.\n- Format issues.\n- Finishing warehouse2.\n- Tuning and fixes.\n- Fixing warehouse 3 problems, and other core improvements to remove dead lock, also making continuous integration green.\n- Added missing file from warehouse2.\n- Updating subscriber publisher components.\n- Progress in autoware machine.\n- Refining cp subscriber cp publisher.\n- Improvements in smacc core adding more components mostly developed for autoware demo.\n- Autoware demo.\n- Docker files for different revisions, warnings removal and more testing on navigation.\n- Fixing docker for foxy and galactic.\n- Update file for fake hardware simulation and add file for gazebo simulation.\n- Retry behavior warehouse 1.\n- Multiple controllable leds plugin.\n- Progress in husky demo.\n- Add ignition file and update repos files.\n- Improving navigation behaviors.\n- Add galactic CI build because Navigation2 is broken in rolling.\n- Add partial changes for ament_cpplint.\n- Add tf2_ros as dependency to find include.\n\nChanged\n-------\n\n- Default values.\n\nFixed\n-----\n\n- Fix formatting.\n- Fixing broken build.\n- Fix: some formatting and templating on SrConditional.\n- Fix: move trigger logic into headers.\n- Fix: lint.\n- Fixing format and minor.\n- Fix broken source build.\n- Fix trailing spaces.\n- Correct codespell.\n- Correct python linters warnings.\n- Correct Focal-Rolling builds by fixing the version of rosdep yaml.\n\nRemoved\n-------\n\n- Only rolling version should be pre-released on on master.\n\nCo-Authored-By\n--------------\n\n- Denis Štogl <denis@stogl.de>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Declan Dury <44791484+DecDury@users.noreply.github.com>\n- DecDury <declandury@gmail.com>\n- Reelrbtx <brett2@reelrobotics.com>\n- Brettpac <brett@robosoft.ai>\n- David Revay <MrBlenny@users.noreply.github.com>\n- Pablo Iñigo Blasco <pabloinigoblasco@ibrobotics.com>\n```\n\n```rst\nSection_21\n==========\n\nAdded\n-----\n- First ensure you have the necessary package installed:\n  ```\n  sudo apt-get install ros-rolling-ros2trace\n  ```\n- Add workflow for checking doc build.\n- Create doxygen-deploy.yml.\n- Create workflow for testing prerelease builds.\n- Use docs/ as source folder and output directory.\n- Added setupTracing.sh:\n  Installs necessary packages and configures tracing group.\n- Created alternative ManualTracing.\n- Added new sm markdowns.\n- Added a dockerfile for Rolling and Galactic.\n- Added README tutorial for Dockerfile.\n- Enable build of missing rolling repositories.\n- Enable Navigation2 for semi-binary build.\n- Added smacc2_performance_tools.\n- Performance tests improvements.\n- More on performance and other issues.\n- Added sm_atomic_performance_trace_1.\n- Optimized deps in move_base_z_planners_common.\n- Renaming of event generator library.\n- Add galactic CI setup and rename rolling files (#58).\n- Fix source CI and correct README overview (#62).\n- Update c_cpp_properties.json.\n- More Readme Updates (#72).\n- More Readme (#74).\n- Created new sm from sm_respira_1 (#76).\n- Feature/core and navigation fixes (#78).\n- Feature/aws demo progress (#80).\n- More on navigation.\n- More sm_advanced_recovery_1 work (#85).\n- sm_atomic_performance_test_c_1 (#88).\n\nChanged\n-------\n- ros2 launch sm_three_some sm_three_some to ros2 launch sm_three_some sm_three_some.launch.\n- Rename header files and correct format.\n- Change extension of imports.\n- Update doxygen-check-build.yml.\n- Use manual deployment for now.\n- Rename to smacc2 and smacc2_msgs.\n- Correct GitHub branch reference.\n- Update name of package and package.xml to pass liter.\n- Execute on master update.\n- Reset all versions to 0.0.0.\n- Update description table.\n- Update table.\n- Update smacc2_rta command across readmes.\n- Clean up of sm_atomic_24hr.\n- Minor formatting.\n- Changed wording \"smacc application\" to \"SMACC2 library\".\n\nFixed\n-----\n- Correct formatters.\n- Correct formatting of python file.\n- Correct trailing spaces.\n- Fixed bug in smacc2 component.\n\nRemoved\n-------\n- Disable ament_cpplint.\n- Disable some packages and update workflows.\n- Disable cpplint and cppcheck linters.\n- Disable disabled packages.\n- Ignore further packages.\n- Disable ament_lint_cmake.\n- Ignore all packages except smacc2 and smacc2_msgs.\n- Remove galactic builds from master and keep only rolling. Remove submodules and use .repos file.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n- Removed manual installation of ros-rolling-ros2trace. This is now automated in setupTracing.sh.\n\nCo-Authored-By\n--------------\n- Denis Štogl <destogl@users.noreply.github.com>.\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>.\n```\n\n```rst\nSection_22\n==========\n\nAdded\n-----\n- Added new feature: cb_wait_topic_message, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- Added new client behavior for nav2: wait nav2 nodes subscribing to the /bond topic and waiting for them to be alive, with optional node selection.\n- Added new client behavior: cb pause slam for pausing SLAM operations.\n- Added new client behavior: cb dance bot lite for lightweight dance bot operations.\n\nChanged\n-------\n- Modified sm_atomic_performance_test_a_2 (#89).\n- Updated launch command.\n- Corrected all linters and formatters.\n- Fixed navigation parameters on sm_dance_bot.\n- Minor formatting improvements.\n- Renamed doxygen deployment workflow (#100).\n- Visualized TurtleBot3 in sm_dance_bot.\n\nRemoved\n-------\n- Removed some compile warnings (#96).\n\nFixed\n----\n- Fixed precommit issues.\n- Fixed formatting.\n- Fixed minor issues in navigation testing.\n\nCollaborators\n-------------\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n```\n\n*pabloinigoblasco*\n\nSection_23\n==========\n\nAdded\n-----\n- Implemented sm_dance_bot visualization for turtlebot3.\n- Added option to show/hide cleaning and lidar.\n- Introduced gazebo fixes for sm_dance_bot to display the robot and lidar.\n- Implemented sm_multi_stage_1 doubling functionality.\n- Added AWS demo feature.\n- Enabled source build on PR for testing purposes.\n- Added diverse improvements for navigation and performance.\n- Progressed in navigation, slam toggle client behaviors, and slam_toolbox components.\n- Introduced smacc2::deep_history syntax.\n- Added slam pausing/resuming functionality for sm_dance_bot.\n- Implemented dance bot s pattern.\n- Added first working version of sm template and template generator.\n- Added SM core test.\n- Added local action msgs usage.\n- Renamed navigation 2 stack.\n- Added SVGs to READMEs of atomic, dance_bot, and others.\n- Rolled Docker environment to be executed from any environment.\n- Refactored sm dance bot strikes back.\n- Made slight changes to waypoint 4 and iterations for robot course completion.\n- Initiated migration to smacc2 for moveit client.\n- Added .reps dependencies and fixed build errors.\n- Updated readme files.\n\nChanged\n-------\n- Improved formatting in various files.\n- Updated launch command in README.md for sm_dance_bot_strikes_back.\n- Refactored Docker environment for building local tests.\n\nFixed\n-----\n- Fixed format issues in CI related to Python version.\n- Removed node creation and created only a logger.\n- Mitigated overshot issue cases in navigation.\n- Resolved compile warnings.\n- Removed parameters from smacc.\n- Fixed linting warnings.\n- Fixed compiling issues.\n\nRemoved\n-------\n- Removed neo_simulation2 package.\n- Removed sm_dance_bot_msgs package.\n\nCollaborators\n-------------\n- Brett <brett@robosoft.ai>\n- DecDury <declandury@gmail.com>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Pablo Iñigo Blasco <pablo@ibrobotics.com>\n\nSection_24\n==========\n\nAdded\n-----\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/testing moveit behaviors (#167)\n- Feature/aws navigation sm dance bot (#174)\n- Waypoint Inputs (#178)\n- Feature/sm warehouse 2 13 dec 2 (#182)\n- Brettpac branch (#184)\n- Feature/wharehouse2 dec 14 (#185)\n- finetuning waypoints (#187)\n- Feature/cb pure spinning (#188)\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Feature/undo motion 20 12 (#196)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#201)\n- Feature/minor tune (#203)\n- Feature/warehouse2 23 12 (#201)\n\nChanged\n-------\n- Moved reference library SMs to smacc2_performance_tools (#166)\n- Added reliability qos config\n- Redoing sm_dance_bot_warehouse_3 waypoints\n- Improving undo motion navigation warehouse2\n- Tuning and fixes (#202)\n- Minor tune\n- Improvements in smacc core adding more components mostly developed for autoware demo\n- Refining cp subscriber cp publisher\n- Several fixes (#194)\n- Improving undo motion navigation warehouse2\n- Tuning warehouse3 (#197)\n- Fixing warehouse 3 problems, and other core improvements to remove dead lock, also making continuous integration green\n- Added missing file from warehouse2 (#205)\n- Updating subscriber publisher components\n- Progress in autoware machine\n- Progress in autoware demo\n- Progress in barrel husky\n- Progress in barrel demo\n- Progress in barrel search build fix and warehouse3\n- Progress in autoware demo\n- Progress on aws navigation and some other refactorings on navigation clients and behaviors\n- More on aws demo\n- More testing on moveit\n- More testing on moveit behaviors\n- More waypoints\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n- More changes and headless\n\nFixed\n-----\n- Add a missing colon\n- Fixing pipeline error\n- Fixing broken master build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken build\n- Fixing broken\n\n```rst\nSection_25\n==========\n\nAdded\n-----\n- Docker improvements.\n- Runtime dependency.\n- Restoring UR dependency.\n\nChanged\n-------\n- Master rolling to Galactic backport.\n- Updating Galactic repositories.\n\nFixed\n-----\n- Fixing build.\n\nOther\n-----\n- More merge.\n- Testing Dance Bot demos.\n\nContributors\n------------\n- Denis Štogl\n- Pablo Iñigo Blasco\n- pabloinigoblasco\n\nCo-authored-by\n--------------\n- reelrbtx <brett2@reelrobotics.com>\n- brettpac <brett@robosoft.ai>\n- David Revay <MrBlenny@users.noreply.github.com>\n- pabloinigoblasco <pabloinigoblasco@ibrobotics.com>\n- DecDury <declandury@gmail.com>\n- Denis Štogl <denis@stogl.de>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Declan Dury <44791484+DecDury@users.noreply.github.com>\n```\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/forward_local_planner/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(forward_local_planner)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(nav2_core)\nfind_package(nav_msgs)\nfind_package(nav2_costmap_2d)\nfind_package(geometry_msgs)\nfind_package(tf2)\nfind_package(nav2z_planners_common)\nfind_package(pluginlib)\nfind_package(nav_2d_utils)\n\nset(dependencies\n  nav2_core\n  nav_msgs\n  nav2_costmap_2d\n  geometry_msgs\n  visualization_msgs\n  tf2\n  nav2z_planners_common\n  pluginlib\n  nav_2d_utils\n)\n\ninclude_directories(include)\n\nadd_library(${PROJECT_NAME} SHARED\n  src/${PROJECT_NAME}/forward_local_planner.cpp\n)\n\ntarget_compile_definitions(${PROJECT_NAME} PUBLIC \"PLUGINLIB__DISABLE_BOOST_FUNCTIONS\")\npluginlib_export_plugin_description_file(nav2_core flp_plugin.xml)\n\nament_target_dependencies(${PROJECT_NAME}\n  ${dependencies})\n\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\nament_export_dependencies(${dependencies})\n\ninstall(TARGETS ${PROJECT_NAME}\n  ARCHIVE DESTINATION lib\n  LIBRARY DESTINATION lib\n  RUNTIME DESTINATION bin\n)\n\ninstall(DIRECTORY include/\n  DESTINATION include/\n)\n\ninstall(FILES\n  flp_plugin.xml\n  DESTINATION share\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/forward_local_planner/flp_plugin.xml",
    "content": "<library path=\"forward_local_planner\">\n  <class name=\"cl_nav2z::forward_local_planner::ForwardLocalPlanner\" type=\"cl_nav2z::forward_local_planner::ForwardLocalPlanner\" base_class_type=\"nav2_core::Controller\">\n    <description>\n    </description>\n  </class>\n</library>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/forward_local_planner/include/forward_local_planner/forward_local_planner.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <eigen3/Eigen/Eigen>\n\n//#include <dynamic_reconfigure/server.h>\n#include <tf2/transform_datatypes.h>\n#include <nav2z_planners_common/common.hpp>\n#include <visualization_msgs/msg/marker_array.hpp>\n\n#include <tf2/utils.h>\n#include <nav2_core/controller.hpp>\n\ntypedef double meter;\ntypedef double rad;\n\nnamespace cl_nav2z\n{\nnamespace forward_local_planner\n{\nclass ForwardLocalPlanner : public nav2_core::Controller\n{\npublic:\n  ForwardLocalPlanner();\n\n  virtual ~ForwardLocalPlanner();\n\n  void configure(\n    const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name,\n    const std::shared_ptr<tf2_ros::Buffer> tf,\n    const std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros) override;\n\n  void activate() override;\n  void deactivate() override;\n  void cleanup() override;\n\n  /**\n   * @brief nav2_core setPlan - Sets the global plan\n   * @param path The global plan\n   */\n  void setPlan(const nav_msgs::msg::Path & path) override;\n\n  /**\n   * @brief nav2_core computeVelocityCommands - calculates the best command given the current pose and velocity\n   *\n   * It is presumed that the global plan is already set.\n   *\n   * This is mostly a wrapper for the protected computeVelocityCommands\n   * function which has additional debugging info.\n   *\n   * @param pose Current robot pose\n   * @param velocity Current robot velocity\n   * @return The best command for the robot to drive\n   */\n  virtual geometry_msgs::msg::TwistStamped computeVelocityCommands(\n    const geometry_msgs::msg::PoseStamped & pose, const geometry_msgs::msg::Twist & velocity,\n    nav2_core::GoalChecker * goal_checker) override;\n\n  /*deprecated in navigation2*/\n  bool isGoalReached();\n\n  virtual void setSpeedLimit(const double & speed_limit, const bool & percentage) override;\n\nprivate:\n  void updateParameters();\n  nav2_util::LifecycleNode::SharedPtr nh_;\n\n  void publishGoalMarker(double x, double y, double phi);\n  void cleanMarkers();\n\n  void generateTrajectory(\n    const Eigen::Vector3f & pos, const Eigen::Vector3f & vel, float maxdist, float maxangle,\n    float maxtime, float dt, std::vector<Eigen::Vector3f> & outtraj);\n  Eigen::Vector3f computeNewPositions(\n    const Eigen::Vector3f & pos, const Eigen::Vector3f & vel, double dt);\n\n  std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmapRos_;\n  std::string name_;\n\n  rclcpp_lifecycle::LifecyclePublisher<visualization_msgs::msg::MarkerArray>::SharedPtr\n    goalMarkerPublisher_;\n\n  double k_rho_;\n  double k_alpha_;\n  double k_betta_;\n  bool goalReached_;\n\n  const double alpha_offset_ = 0;\n  const double betta_offset_ = 0;\n\n  meter carrot_distance_;\n  rad carrot_angular_distance_;\n\n  double yaw_goal_tolerance_;  // radians\n  double xy_goal_tolerance_;   // meters\n\n  double max_angular_z_speed_;\n  double max_linear_x_speed_;\n  double transform_tolerance_;\n\n  // references the current point inside the backwardsPlanPath were the robot is located\n  int currentPoseIndex_;\n\n  std::vector<geometry_msgs::msg::PoseStamped> plan_;\n\n  bool waiting_;\n  rclcpp::Duration waitingTimeout_;\n  rclcpp::Time waitingStamp_;\n  std::shared_ptr<tf2_ros::Buffer> tf_;\n};\n}  // namespace forward_local_planner\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/forward_local_planner/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>forward_local_planner</name>\n  <version>2.3.19</version>\n  <description>forward_local_planner package.</description>\n\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <author email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</author>\n\n  <license>BSDv3</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>geometry_msgs</depend>\n  <depend>nav2z_planners_common</depend>\n  <depend>nav_2d_utils</depend>\n  <depend>nav_msgs</depend>\n  <depend>nav2_core</depend>\n  <depend>nav2_costmap_2d</depend>\n  <depend>std_msgs</depend>\n  <depend>tf2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/forward_local_planner/src/forward_local_planner/forward_local_planner.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#include <forward_local_planner/forward_local_planner.hpp>\n\n#include <angles/angles.h>\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include <geometry_msgs/msg/twist.hpp>\n#include <rclcpp/rclcpp.hpp>\n#include <visualization_msgs/msg/marker_array.hpp>\n\n// #include <tf2/utils.h>\n#include <boost/intrusive_ptr.hpp>\n#include <nav_2d_utils/tf_help.hpp>\n#include <pluginlib/class_list_macros.hpp>\n\nusing namespace std::chrono_literals;\nnamespace cl_nav2z\n{\nnamespace forward_local_planner\n{\n/**\n******************************************************************************************************************\n* ForwardLocalPlanner()\n******************************************************************************************************************\n*/\nForwardLocalPlanner::ForwardLocalPlanner() : transform_tolerance_(0.1), waitingTimeout_(2s) {}\n\nForwardLocalPlanner::~ForwardLocalPlanner() {}\n\nvoid ForwardLocalPlanner::activate()\n{\n  RCLCPP_DEBUG_STREAM(nh_->get_logger(), \"activating controller ForwardLocalPlanner\");\n  this->updateParameters();\n  this->goalMarkerPublisher_->on_activate();\n}\n\nvoid ForwardLocalPlanner::deactivate()\n{\n  this->cleanMarkers();\n  this->goalMarkerPublisher_->on_deactivate();\n}\n\nvoid ForwardLocalPlanner::cleanup()\n{\n  this->cleanMarkers();\n  this->plan_.clear();\n  this->currentPoseIndex_ = 0;\n  yaw_goal_tolerance_ = -1;\n  xy_goal_tolerance_ = -1;\n}\n\nvoid ForwardLocalPlanner::configure(\n  const rclcpp_lifecycle::LifecycleNode::WeakPtr & node, std::string name,\n  const std::shared_ptr<tf2_ros::Buffer> tf,\n  const std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros)\n{\n  // nh_ = rclcpp::Node::make_shared(\"~/ForwardLocalPlanner\");\n  nh_ = node.lock();\n  costmapRos_ = costmap_ros;\n  tf_ = tf;\n  name_ = name;\n  k_rho_ = 1.0;\n  k_alpha_ = -0.4;\n  k_betta_ = -1.0;  // set to zero means that orientation is not important\n  // k_betta_ = 1.0;\n  // betta_offset_=0;\n\n  goalReached_ = false;\n  carrot_distance_ = 0.4;\n  yaw_goal_tolerance_ = -1;\n  xy_goal_tolerance_ = -1;\n  max_linear_x_speed_ = 1.0;\n  max_angular_z_speed_ = 2.0;\n\n  // rclcpp::Node::SharedPtr private_nh(\"~\");\n\n  currentPoseIndex_ = 0;\n\n  declareOrSet(nh_, name_ + \".k_rho\", k_rho_);\n  declareOrSet(nh_, name_ + \".k_alpha\", k_alpha_);\n  declareOrSet(nh_, name_ + \".k_betta\", k_betta_);\n  declareOrSet(nh_, name_ + \".carrot_distance\", carrot_distance_);\n  declareOrSet(nh_, name_ + \".yaw_goal_tolerance\", yaw_goal_tolerance_);\n  declareOrSet(nh_, name_ + \".xy_goal_tolerance\", xy_goal_tolerance_);\n  declareOrSet(nh_, name_ + \".max_linear_x_speed\", max_linear_x_speed_);\n  declareOrSet(nh_, name_ + \".max_angular_z_speed\", max_angular_z_speed_);\n  declareOrSet(nh_, name_ + \".transform_tolerance\", transform_tolerance_);\n\n  RCLCPP_DEBUG(\n    nh_->get_logger(),\n    \"[ForwardLocalPlanner] max linear speed: %lf, max angular speed: %lf, k_rho: %lf, \"\n    \"carrot_distance: \"\n    \"%lf, \",\n    max_linear_x_speed_, max_angular_z_speed_, k_rho_, carrot_distance_);\n  goalMarkerPublisher_ = nh_->create_publisher<visualization_msgs::msg::MarkerArray>(\n    \"forward_local_planner/carrot_goal_marker\", rclcpp::QoS(1));\n\n  waiting_ = false;\n  waitingTimeout_ = rclcpp::Duration(10s);\n}\n\nvoid ForwardLocalPlanner::updateParameters()\n{\n  nh_->get_parameter(name_ + \".k_rho\", k_rho_);\n  nh_->get_parameter(name_ + \".k_alpha\", k_alpha_);\n  nh_->get_parameter(name_ + \".k_betta\", k_betta_);\n  nh_->get_parameter(name_ + \".carrot_distance\", carrot_distance_);\n  nh_->get_parameter(name_ + \".yaw_goal_tolerance\", yaw_goal_tolerance_);\n  nh_->get_parameter(name_ + \".xy_goal_tolerance\", xy_goal_tolerance_);\n  nh_->get_parameter(name_ + \".max_linear_x_speed\", max_linear_x_speed_);\n  nh_->get_parameter(name_ + \".max_angular_z_speed\", max_angular_z_speed_);\n  nh_->get_parameter(name_ + \".transform_tolerance\", transform_tolerance_);\n\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[ForwardLocalPlanner.k_rho: \" << k_rho_);\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[ForwardLocalPlanner.k_alpha: \" << k_alpha_);\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[ForwardLocalPlanner.k_betta: \" << k_betta_);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[ForwardLocalPlanner.carrot_distance: \" << carrot_distance_);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[ForwardLocalPlanner.yaw_goal_tolerance:\" << yaw_goal_tolerance_);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[ForwardLocalPlanner.xy_goal_tolerance: \" << xy_goal_tolerance_);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[ForwardLocalPlanner.max_linear_x_speed:\" << max_linear_x_speed_);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[ForwardLocalPlanner.max_angular_z_speed:\" << max_angular_z_speed_);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[ForwardLocalPlanner.transform_tolerance:\" << transform_tolerance_);\n}\n\nvoid ForwardLocalPlanner::generateTrajectory(\n  const Eigen::Vector3f & pos, const Eigen::Vector3f & vel, float maxdist, float maxanglediff,\n  float maxtime, float dt, std::vector<Eigen::Vector3f> & outtraj)\n{\n  // simulate the trajectory and check for collisions, updating costs along the way\n  bool end = false;\n  float time = 0;\n  Eigen::Vector3f currentpos = pos;\n  int i = 0;\n  while (!end)\n  {\n    // add the point to the trajectory so we can draw it later if we want\n    // traj.addPoint(pos[0], pos[1], pos[2]);\n\n    // if (continued_acceleration_) {\n    //   //calculate velocities\n    //   loop_vel = computeNewVelocities(sample_target_vel, loop_vel, limits_->getAccLimits(), dt);\n    //   //RCLCPP_WARN_NAMED(nh_->get_logger(), \"Generator\", \"Flag: %d, Loop_Vel %f, %f, %f\", continued_acceleration_,\n    //   loop_vel[0], loop_vel[1], loop_vel[2]);\n    // }\n\n    auto loop_vel = vel;\n    // update the position of the robot using the velocities passed in\n    auto newpos = computeNewPositions(currentpos, loop_vel, dt);\n\n    auto dx = newpos[0] - currentpos[0];\n    auto dy = newpos[1] - currentpos[1];\n    float dist, angledist;\n\n    // RCLCPP_DEBUG(nh_->get_logger(), \"traj point %d\", i);\n    dist = sqrt(dx * dx + dy * dy);\n    if (dist > maxdist)\n    {\n      end = true;\n      // RCLCPP_DEBUG(nh_->get_logger(), \"dist break: %f\", dist);\n    }\n    else\n    {\n      // ouble from, double to\n      angledist = fabs(angles::shortest_angular_distance(currentpos[2], newpos[2]));\n      if (angledist > maxanglediff)\n      {\n        end = true;\n        // RCLCPP_DEBUG(nh_->get_logger(), \"angle dist break: %f\", angledist);\n      }\n      else\n      {\n        outtraj.push_back(newpos);\n\n        time += dt;\n        if (time > maxtime)\n        {\n          end = true;\n          // RCLCPP_DEBUG(nh_->get_logger(), \"time break: %f\", time);\n        }\n\n        // RCLCPP_DEBUG(nh_->get_logger(), \"dist: %f, angledist: %f, time: %f\", dist, angledist, time);\n      }\n    }\n\n    currentpos = newpos;\n    i++;\n  }  // end for simulation steps\n}\n\nEigen::Vector3f ForwardLocalPlanner::computeNewPositions(\n  const Eigen::Vector3f & pos, const Eigen::Vector3f & vel, double dt)\n{\n  Eigen::Vector3f new_pos = Eigen::Vector3f::Zero();\n  new_pos[0] = pos[0] + (vel[0] * cos(pos[2]) + vel[1] * cos(M_PI_2 + pos[2])) * dt;\n  new_pos[1] = pos[1] + (vel[0] * sin(pos[2]) + vel[1] * sin(M_PI_2 + pos[2])) * dt;\n  new_pos[2] = pos[2] + vel[2] * dt;\n  return new_pos;\n}\n\n/**\n******************************************************************************************************************\n* publishGoalMarker()\n******************************************************************************************************************\n*/\nvoid ForwardLocalPlanner::publishGoalMarker(double x, double y, double phi)\n{\n  visualization_msgs::msg::Marker marker;\n\n  marker.header.frame_id = costmapRos_->getGlobalFrameID();\n  marker.header.stamp = nh_->now();\n  marker.ns = \"my_namespace2\";\n  marker.id = 0;\n  marker.type = visualization_msgs::msg::Marker::ARROW;\n  marker.action = visualization_msgs::msg::Marker::ADD;\n  marker.pose.orientation.w = 1;\n  marker.lifetime = rclcpp::Duration(1.0s);\n\n  marker.scale.x = 0.1;\n  marker.scale.y = 0.3;\n  marker.scale.z = 0.1;\n  marker.color.a = 1.0;\n  marker.color.r = 0;\n  marker.color.g = 0;\n  marker.color.b = 1.0;\n\n  geometry_msgs::msg::Point start, end;\n  start.x = x;\n  start.y = y;\n\n  end.x = x + 0.5 * cos(phi);\n  end.y = y + 0.5 * sin(phi);\n\n  marker.points.push_back(start);\n  marker.points.push_back(end);\n\n  visualization_msgs::msg::MarkerArray ma;\n  ma.markers.push_back(marker);\n\n  goalMarkerPublisher_->publish(ma);\n}\n\nvoid ForwardLocalPlanner::cleanMarkers()\n{\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[ForwardLocalPlanner] cleaning markers.\");\n  visualization_msgs::msg::Marker marker;\n\n  marker.header.frame_id = costmapRos_->getGlobalFrameID();\n  marker.header.stamp = nh_->now();\n  marker.ns = \"my_namespace2\";\n  marker.id = 0;\n  marker.action = visualization_msgs::msg::Marker::DELETEALL;\n\n  visualization_msgs::msg::MarkerArray ma;\n  ma.markers.push_back(marker);\n\n  goalMarkerPublisher_->publish(ma);\n}\n\nvoid clamp(\n  rclcpp::Node::SharedPtr nh_, geometry_msgs::msg::Twist & cmd_vel, double max_linear_x_speed_,\n  double max_angular_z_speed_)\n{\n  if (max_angular_z_speed_ == 0 || max_linear_x_speed_ == 0) return;\n\n  if (cmd_vel.angular.z == 0)\n  {\n    cmd_vel.linear.x = max_linear_x_speed_;\n  }\n  else\n  {\n    double kurvature = cmd_vel.linear.x / cmd_vel.angular.z;\n\n    double linearAuthority = fabs(cmd_vel.linear.x / max_linear_x_speed_);\n    double angularAuthority = fabs(cmd_vel.angular.z / max_angular_z_speed_);\n    if (linearAuthority < angularAuthority)\n    {\n      // lets go to maximum linear speed\n      cmd_vel.linear.x = max_linear_x_speed_;\n      cmd_vel.angular.z = kurvature / max_linear_x_speed_;\n      RCLCPP_WARN_STREAM(\n        nh_->get_logger(), \"k=\" << kurvature << \"lets go to maximum linear capacity: \" << cmd_vel);\n    }\n    else\n    {\n      // lets go with maximum angular speed\n      cmd_vel.angular.x = max_angular_z_speed_;\n      cmd_vel.linear.x = kurvature * max_angular_z_speed_;\n      RCLCPP_WARN_STREAM(nh_->get_logger(), \"lets go to maximum angular capacity: \" << cmd_vel);\n    }\n  }\n}\n\n/**\n******************************************************************************************************************\n* computeVelocityCommands()\n******************************************************************************************************************\n*/\n\ngeometry_msgs::msg::TwistStamped ForwardLocalPlanner::computeVelocityCommands(\n  const geometry_msgs::msg::PoseStamped & currentPose,\n  const geometry_msgs::msg::Twist & /*velocity*/, nav2_core::GoalChecker * goal_checker)\n{\n  this->updateParameters();\n\n  if (this->plan_.size() > 0)\n  {\n    RCLCPP_INFO_STREAM(\n      nh_->get_logger(), \"[ForwardLocalPlanner] Current pose frame id: \"\n                           << plan_.front().header.frame_id\n                           << \", path pose frame id: \" << currentPose.header.frame_id);\n\n    if (plan_.front().header.frame_id != currentPose.header.frame_id)\n    {\n      RCLCPP_ERROR_STREAM(nh_->get_logger(), \"[ForwardLocalPlanner] Inconsistent frames\");\n    }\n  }\n\n  // xy_goal_tolerance and yaw_goal_tolerance are just used for logging proposes and clamping the carrot\n  // goal distance (parameter safety)\n  if (xy_goal_tolerance_ == -1 || yaw_goal_tolerance_ == -1)\n  {\n    geometry_msgs::msg::Pose posetol;\n    geometry_msgs::msg::Twist twistol;\n    if (goal_checker->getTolerances(posetol, twistol))\n    {\n      xy_goal_tolerance_ = posetol.position.x;\n      yaw_goal_tolerance_ = tf2::getYaw(posetol.orientation);\n      //xy_goal_tolerance_ = posetol.position.x * 0.35;  // WORKAROUND DIFFERENCE WITH NAV CONTROLLER GOAL CHECKER\n      //yaw_goal_tolerance_ = tf2::getYaw(posetol.orientation) * 0.35;\n      RCLCPP_INFO_STREAM(\n        nh_->get_logger(), \"[ForwardLocalPlanner] xy_goal_tolerance_: \" << xy_goal_tolerance_\n                                                                        << \", yaw_goal_tolerance_: \"\n                                                                        << yaw_goal_tolerance_);\n    }\n    else\n    {\n      RCLCPP_INFO_STREAM(\n        nh_->get_logger(), \"[ForwardLocalPlanner] could not get tolerances from goal checker\");\n    }\n  }\n\n  geometry_msgs::msg::TwistStamped cmd_vel;\n  goalReached_ = false;\n  RCLCPP_DEBUG(\n    nh_->get_logger(), \"[ForwardLocalPlanner] ----- COMPUTE VELOCITY COMMAND LOCAL PLANNER ---\");\n\n  bool ok = false;\n  while (!ok)\n  {\n    // iterate the point from the current position and ahead until reaching a new goal point in the path\n    while (!ok && currentPoseIndex_ < (int)plan_.size())\n    {\n      auto & pose = plan_[currentPoseIndex_];\n      const geometry_msgs::msg::Point & p = pose.pose.position;\n      tf2::Quaternion q;\n      tf2::fromMsg(pose.pose.orientation, q);\n\n      // take error from the current position to the path point\n      double dx = p.x - currentPose.pose.position.x;\n      double dy = p.y - currentPose.pose.position.y;\n      double dist = sqrt(dx * dx + dy * dy);\n\n      double pangle = tf2::getYaw(q);\n      double angle = tf2::getYaw(currentPose.pose.orientation);\n      double angular_error = angles::shortest_angular_distance(pangle, angle);\n\n      if (dist >= carrot_distance_ || fabs(angular_error) > 0.1)\n      {\n        // the target pose is enough different to be defined as a target\n        ok = true;\n        RCLCPP_DEBUG(\n          nh_->get_logger(),\n          \"current index: %d, carrot goal percentaje: %lf, dist: %lf, maxdist: %lf, angle_error: \"\n          \"%lf\",\n          currentPoseIndex_, 100.0 * currentPoseIndex_ / plan_.size(), dist, carrot_distance_,\n          angular_error);\n      }\n      else\n      {\n        currentPoseIndex_++;\n      }\n    }\n\n    RCLCPP_DEBUG_STREAM(\n      nh_->get_logger(), \"[ForwardLocalPlanner] selected carrot pose index \"\n                           << currentPoseIndex_ << \"/\" << plan_.size());\n\n    if (currentPoseIndex_ >= (int)plan_.size())\n    {\n      // even the latest point is quite similar, then take the last since it is the final goal\n      cmd_vel.twist.linear.x = 0;\n      cmd_vel.twist.angular.z = 0;\n      // RCLCPP_INFO(nh_->get_logger(), \"End Local planner\");\n      ok = true;\n      currentPoseIndex_ = (int)plan_.size() - 1;\n      // return true;\n    }\n  }\n\n  // RCLCPP_INFO(nh_->get_logger(), \"pose control algorithm\");\n\n  const geometry_msgs::msg::PoseStamped & finalgoalpose = plan_.back();\n  const geometry_msgs::msg::PoseStamped & carrot_goalpose = plan_[currentPoseIndex_];\n  const geometry_msgs::msg::Point & goalposition = carrot_goalpose.pose.position;\n\n  tf2::Quaternion carrotGoalQ;\n  tf2::fromMsg(carrot_goalpose.pose.orientation, carrotGoalQ);\n  // RCLCPP_INFO_STREAM(nh_->get_logger(), \"Plan goal quaternion at \"<< carrot_goalpose.pose.orientation);\n\n  // goal orientation (global frame)\n  double betta = tf2::getYaw(carrot_goalpose.pose.orientation) + betta_offset_;\n  double dx = goalposition.x - currentPose.pose.position.x;\n  double dy = goalposition.y - currentPose.pose.position.y;\n\n  // distance error to the targetpoint\n  double rho_error = sqrt(dx * dx + dy * dy);\n\n  tf2::Quaternion currentOrientation;\n  tf2::convert(currentPose.pose.orientation, currentOrientation);\n\n  // current angle\n  double theta = tf2::getYaw(currentOrientation);\n  double alpha = atan2(dy, dx);\n  alpha = alpha + alpha_offset_;\n\n  double alpha_error = angles::shortest_angular_distance(alpha, theta);\n  double betta_error = angles::shortest_angular_distance(betta, theta);\n\n  double vetta = 0;  // = k_rho_ * rho_error;\n  double gamma = 0;  //= k_alpha_ * alpha_error + k_betta_ * betta_error;\n\n  if (\n    rho_error >\n    xy_goal_tolerance_)  // reguular control rule, be careful, rho error is with the carrot not with the\n                         // final goal (this is something to improve like the backwards planner)\n  {\n    vetta = k_rho_ * rho_error;\n    gamma = k_alpha_ * alpha_error;\n  }\n  else if (fabs(betta_error) >= yaw_goal_tolerance_)  // pureSpining\n  {\n    vetta = 0;\n    gamma = k_betta_ * betta_error;\n  }\n  else  // goal reached\n  {\n    RCLCPP_DEBUG(nh_->get_logger(), \"GOAL REACHED\");\n    vetta = 0;\n    gamma = 0;\n    goalReached_ = true;\n  }\n\n  // linear speed clamp\n  if (vetta > max_linear_x_speed_)\n  {\n    vetta = max_linear_x_speed_;\n  }\n  else if (vetta < -max_linear_x_speed_)\n  {\n    vetta = -max_linear_x_speed_;\n  }\n\n  // angular speed clamp\n  if (gamma > max_angular_z_speed_)\n  {\n    gamma = max_angular_z_speed_;\n  }\n  else if (gamma < -max_angular_z_speed_)\n  {\n    gamma = -max_angular_z_speed_;\n  }\n\n  cmd_vel.twist.linear.x = vetta;\n  cmd_vel.twist.angular.z = gamma;\n\n  // clamp(cmd_vel, max_linear_x_speed_, max_angular_z_speed_);\n\n  // RCLCPP_INFO_STREAM(nh_->get_logger(), \"Local planner: \"<< cmd_vel);\n\n  publishGoalMarker(goalposition.x, goalposition.y, betta);\n\n  RCLCPP_DEBUG_STREAM(\n    nh_->get_logger(), \"Forward local planner,\"\n                         << std::endl\n                         << \" theta: \" << theta << std::endl\n                         << \" betta: \" << betta << std::endl\n                         << \" err_x: \" << dx << std::endl\n                         << \" err_y:\" << dy << std::endl\n                         << \" rho_error:\" << rho_error << std::endl\n                         << \" alpha_error:\" << alpha_error << std::endl\n                         << \" betta_error:\" << betta_error << std::endl\n                         << \" vetta:\" << vetta << std::endl\n                         << \" gamma:\" << gamma << std::endl\n                         << \" xy_goal_tolerance:\" << xy_goal_tolerance_ << std::endl\n                         << \" yaw_goal_tolerance:\" << yaw_goal_tolerance_ << std::endl);\n\n  // if(cmd_vel.linear.x==0 && cmd_vel.angular.z == 0 )\n  //{\n  //}\n\n  // integrate trajectory and check collision\n\n  assert(currentPose.header.frame_id == \"odom\" || currentPose.header.frame_id == \"map\");\n  auto global_pose = currentPose;\n  //->getRobotPose(global_pose);\n\n  auto * costmap2d = costmapRos_->getCostmap();\n  auto yaw = tf2::getYaw(global_pose.pose.orientation);\n\n  auto & pos = global_pose.pose.position;\n\n  Eigen::Vector3f currentpose(pos.x, pos.y, yaw);\n  Eigen::Vector3f currentvel(\n    cmd_vel.twist.linear.x, cmd_vel.twist.linear.y, cmd_vel.twist.angular.z);\n\n  std::vector<Eigen::Vector3f> trajectory;\n  this->generateTrajectory(\n    currentpose, currentvel, 0.8 /*meters*/, M_PI / 8 /*rads*/, 3.0 /*seconds*/, 0.05 /*seconds*/,\n    trajectory);\n\n  // check plan rejection\n  bool aceptedplan = true;\n\n  unsigned int mx, my;\n\n  int i = 0;\n  // RCLCPP_INFO_STREAM(nh_->get_logger(), \"lplanner goal: \" << finalgoalpose.pose.position);\n  for (auto & p : trajectory)\n  {\n    float dx = p[0] - finalgoalpose.pose.position.x;\n    float dy = p[1] - finalgoalpose.pose.position.y;\n\n    float dst = sqrt(dx * dx + dy * dy);\n    if (dst < xy_goal_tolerance_)\n    {\n      //  RCLCPP_INFO(nh_->get_logger(), \"trajectory checking skipped, goal reached\");\n      break;\n    }\n\n    costmap2d->worldToMap(p[0], p[1], mx, my);\n\n    // RCLCPP_INFO(nh_->get_logger(), \"checking cost pt %d [%lf, %lf] cell[%d,%d] = %d\", i, p[0], p[1], mx, my, cost);\n    // RCLCPP_INFO_STREAM(nh_->get_logger(), \"cost: \" << cost);\n\n    // static const unsigned char NO_INFORMATION = 255;\n    // static const unsigned char LETHAL_OBSTACLE = 254;\n    // static const unsigned char INSCRIBED_INFLATED_OBSTACLE = 253;\n    // static const unsigned char FREE_SPACE = 0;\n\n    if (costmap2d->getCost(mx, my) >= nav2_costmap_2d::INSCRIBED_INFLATED_OBSTACLE)\n    {\n      aceptedplan = false;\n      // RCLCPP_WARN(nh_->get_logger(), \"ABORTED LOCAL PLAN BECAUSE OBSTACLE DETEDTED\");\n      break;\n    }\n    i++;\n  }\n\n  bool success = false;\n  if (aceptedplan)\n  {\n    waiting_ = false;\n    success = true;\n    RCLCPP_DEBUG(nh_->get_logger(), \"simulated trajectory is accepted.\");\n  }\n  else\n  {\n    RCLCPP_DEBUG(nh_->get_logger(), \"simulated trajectory is not accepted. Stop command.\");\n\n    // stop and wait\n    cmd_vel.twist.linear.x = 0;\n    cmd_vel.twist.angular.z = 0;\n\n    if (!waiting_)\n    {\n      RCLCPP_DEBUG(nh_->get_logger(), \"Start waiting obstacle disappear\");\n      waiting_ = true;\n      waitingStamp_ = nh_->now();\n    }\n    else\n    {\n      auto waitingduration = nh_->now() - waitingStamp_;\n      RCLCPP_DEBUG(\n        nh_->get_logger(), \"waiting obstacle disappear, elapsed: %lf seconds\",\n        waitingduration.seconds());\n\n      if (waitingduration > this->waitingTimeout_)\n      {\n        RCLCPP_WARN(\n          nh_->get_logger(), \"TIMEOUT waiting obstacle disappear, elapsed: %lf seconds\",\n          waitingduration.seconds());\n        success = false;\n      }\n    }\n  }\n\n  if (!success)\n  {\n    RCLCPP_DEBUG(\n      nh_->get_logger(),\n      \"[ForwardLocalPlanner] object detected waiting stopped until it disappears.\");\n  }\n\n  cmd_vel.header.stamp = nh_->now();\n  return cmd_vel;\n}\n\nvoid ForwardLocalPlanner::setSpeedLimit(const double & /*speed_limit*/, const bool & /*percentage*/)\n{\n  RCLCPP_WARN_STREAM(\n    nh_->get_logger(),\n    \"ForwardLocalPlanner::setSpeedLimit invoked. Ignored, funcionality not \"\n    \"implemented.\");\n}\n\n/**\n******************************************************************************************************************\n* isGoalReached()\n******************************************************************************************************************\n*/\nbool ForwardLocalPlanner::isGoalReached() { return goalReached_; }\n\n/**\n******************************************************************************************************************\n* setPlan()\n******************************************************************************************************************\n*/\nvoid ForwardLocalPlanner::setPlan(const nav_msgs::msg::Path & plan)\n{\n  nav_msgs::msg::Path transformedPlan;\n\n  rclcpp::Duration ttol = rclcpp::Duration::from_seconds(transform_tolerance_);\n  // transform global plan\n  for (auto & p : plan.poses)\n  {\n    geometry_msgs::msg::PoseStamped transformedPose;\n    nav_2d_utils::transformPose(tf_, costmapRos_->getGlobalFrameID(), p, transformedPose, ttol);\n    transformedPose.header.frame_id = costmapRos_->getGlobalFrameID();\n    transformedPlan.poses.push_back(transformedPose);\n  }\n\n  plan_ = transformedPlan.poses;\n  goalReached_ = false;\n}\n}  // namespace forward_local_planner\n}  // namespace cl_nav2z\nPLUGINLIB_EXPORT_CLASS(cl_nav2z::forward_local_planner::ForwardLocalPlanner, nav2_core::Controller)\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/nav2z_planners_common/CHANGELOG.rst",
    "content": "Changelog for package nav2z_planners_common\n===========================================\n\n2.3.16 (2023-07-16)\n-------------------\n### Added\n- Merged branch 'humble' from robosoft-ai/SMACC2\n- Brettpac branch:\n  - Attempted fix for ros buildfarm issue\n  - Further work on buildfarm issue\n### Contributors\n- brettpac, pabloinigoblasco\n\n2.3.6 (2023-03-12)\n------------------\n\n1.22.1 (2022-11-09)\n-------------------\n### Added\n- Pre-release\n### Contributors\n- pabloinigoblasco\n\n0.3.0 (2022-04-04)\n------------------\n\n0.0.0 (2022-11-09)\n------------------\n### Added\n- Pre-release\n- Migration progress to humble\n- Reverted commit dec14a936a877b2ef722a6a32f1bf3df09312542\n- Ignored packages not to be released\n- Feature/master rolling to galactic backport (#236):\n  - Updated SMACC/ROS mentions to SMACC2/ROS2\n  - Progress on navigation rolling\n  - Renamed folders, deleted tracing.md, edited README.md\n  - Added smacc2_performance_tools\n  - Performance tests improvements\n  - Format cleanup for sm_respira_1\n  - Optimized dependencies in move_base_z_planners_common\n  - Renamed event generator library\n  - Added galactic CI setup and renamed rolling files\n  - Fixed source CI and corrected README overview\n  - Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch\n  - Updated doxygen links\n  - New feature, cb_wait_topic_message: asynchronous client behavior\n### Contributors\n- Denis Štogl, brettpac, pabloinigoblasco\n\nSection_2\n==========\n\nAdded\n-----\n- New feature: `cb_wait_topic_message`: asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- Added new client behavior for `nav2`: wait for `nav2` nodes subscribing to the `/bond` topic and wait for them to be alive. Optionally select the nodes to wait.\n\nChanged\n-------\n- Navigation parameters fixes on `sm_dance_bot`.\n- `cb_pause_slam` client behavior.\n- `sm_dance_bot_lite` visualizing `turtlebot3`.\n- Cleaning and lidar show/hide option.\n- Gazebo fixes to show the robot and the lidar.\n- Gazebo fixes for `sm_dance_bot_strikes_back`.\n- Got `sm_multi_stage_1` working (barely).\n- Brettpac branch: gaining traction with `sm_multi_stage_1`.\n\nFixed\n-----\n- Remove some compile warnings.\n- Minor hotfix.\n- Correct formatting.\n- Enable source build on PR for testing.\n- Adjust build packages of source CI.\n\nRemoved\n-------\n- Removed `neo_simulation2` package.\n\nCollaborators\n-------------\n- Co-authored by Ubuntu 20-04-02-amd64 <brett@robosoft.ai>.\n\nSection_3\n==========\n\nVersion 0.1.0 (2022-01-01)\n---------------------------\n\n### Added\n- Feature/diverse improvements navigation performance (#117)\n- additional linting and formatting\n- Feature/slam toggle and smacc deep history (#122)\n- progress in navigation, slam toggle client behaviors, and slam_toolbox components\n- going forward in testing sm_dance_bot introducing slam pausing/resuming functionality\n- feature/more_sm_dance_bot_fixes\n- more changes in sm_dance_bot (#125)\n- Move method after the method it calls to prevent recursion (#126)\n- Feature/dance bot s pattern (#128)\n- polishing sm_dance_bot and s-pattern\n- First working version of sm template and template generator (#127)\n- minor tweaks (#130)\n- Feature/sm dance bot refine (#131)\n- Feature/sm dance bot refine 2 (#132)\n- build fix\n- waypoints navigator bug (#133)\n- minor tuning to mitigate overshot issue cases\n- progress in the sm_dance_bot tests (#135)\n- some more progress on markers cleanup\n- sm_dance_bot_lite (#136)\n- Resolve compile warnings (#137)\n- Add SM core test (#138)\n- minor navigation improvements (#141)\n- using local action messages\n- Feature/nav2z renaming (#144)\n- navigation 2 stack renaming\n- added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- added remaining SVGs to READMEs (#145)\n- Update package list (#142)\n- Add SM Atomic SM generator (#143)\n- Remove node creation and create only a logger (#149)\n- Rolling Docker environment to be executed from any environment (#154)\n- Feature/sm dance bot strikes back refactoring (#152)\n- slight waypoint 4 and iterations changes so robot can complete the course (#155)\n- Feature/migration moveit client (#151)\n- initial migration to smacc2\n- fixing some errors introduced in formatting\n- missing dependency\n- fixing some more linting warnings\n- removing test from the main moveit cmake\n- test ur5\n- progressing in the moveit migration testing\n- updating format\n- adding .reps dependencies and fixing some build errors\n- repos dependency\n- adding dependency to ur5 client\n- docker refactoring\n- progress on move_it PR\n- minor dockerfile test workaround\n- improving dockerfile for building local tests\n- fixing compiling issues\n- update readme (#164)\n- more readme updates\n\n### Changed\n- Moved reference library SMs to smacc2_performance_tools (#166)\n- Add QOS durability to SmaccPublisherClient (#163)\n\n### Fixed\n- Fix CI: format fix python version (#148)\n\n### Removed\n- removing parameters smacc (#147)\n\nVersion 0.2.0 (2022-02-01)\n---------------------------\n\n### Added\n- initial state machine transition timestamp (#165)\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/testing moveit behaviors (#167)\n- more testing on moveit\n- progress on moveit\n- more testing on moveit behaviors\n- fixing pipeline error\n- fixing broken master build\n- sm_pubsub_1 (#169)\n- sm_pubsub_1 part 2 (#170)\n- sm_advanced_recovery_1 renaming (#171)\n- sm_multi_stage_1 reworking (#172)\n- husky launch file in sm_dance_bot\n- Add dependencies for husky simulation\n- Update dependencies for husky in rolling and galactic\n\n### Changed\n- slight waypoint 4 and iterations changes so robot can complete the course (#155)\n- minor changes (#175)\n\n### Removed\n- warehouse2 (#177)\n- Waypoint Inputs (#178)\n\n```rst\nSection_4\n=========\n\nAdded\n-----\n- Implemented progress in warehouse2 (#179).\n- Added feature for sm_dance_bot_warehouse_3 (#181).\n- Co-authored with Ubuntu 20-04-02-amd64 <brett@robosoft.ai>.\n- Introduced new branch Brettpac (#184).\n- Redesigned waypoints for sm_dance_bot_warehouse_3.\n- Added new spinning behavior for cb pure spinning (#188).\n- Integrated planner changes on 16th December (#191).\n- Implemented undo motion on 20th December (#196).\n- Improved undo motion navigation for warehouse2.\n- Tuned warehouse3 (#197).\n- Added sync feature on 21st December (#199).\n- Completed warehouse2 on 22nd December (#200).\n- Fine-tuned and fixed on 23rd December (#201).\n- Minor tune on 23rd December (#203).\n- Fixed warehouse 3 problems and core improvements (#204).\n- Backported to foxy (#206).\n- Updated CI build for Galactic due to Navigation2 issues in rolling.\n- Added partial changes for ament_cpplint.\n- Added tf2_ros as dependency.\n- Updated workflows and bumped ccache version.\n- Satisfied ament_lint_cmake.\n- Added missing licenses.\n- Enabled cppcheck and corrected formatters.\n- Updated ci-build-source.yml.\n- Changed extension of imports.\n- Corrected formatting of python files.\n- Included necessary package and edited Threesome launch.\n- Renamed header files and corrected format.\n- Added workflow for checking doc build.\n- Updated doxygen-check-build.yml.\n- Created doxygen-deploy.yml.\n- Created workflow for testing prerelease builds.\n- Renamed to smacc2 and smacc2_msgs.\n- Updated GitHub branch reference.\n- Updated package name and package.xml.\n- Reset all versions to 0.0.0.\n- Ignored all packages except smacc2 and smacc2_msgs.\n- Updated changelogs.\n- Reverted commit f603166a4b3ccdfe96c64d9f9fb9d8b49fbf0e61.\n- Updated description table.\n- Updated table.\n- Copied initial docs.\n- Opened new folder for additional tracing contents.\n- Deleted tracing directory.\n- Moved tracing.md to tracing directory.\n- Added setupTracing.sh.\n- Removed manual installation of ros-rolling-ros2trace.\n- Created alternative ManualTracing.\n- Added new sm markdowns.\n- Added a Dockerfile for Rolling and Galactic.\n- Updated buildGalactic.sh.\n- Updated ManualTracing.md.\n- Changed wording from \"smacc application\" to \"SMACC2 library\".\n- Updated smacc_sm_reference_library/sm_atomic/README.md.\n- Reactivated smacc2 nav clients for rolling via submodules.\n- Renamed tracing events.\n- Fixed bug in smacc2 component.\n- Reverted markdowns to html.\n- Added README tutorial for Dockerfile.\n- Additional cleanup.\n```\n\n*pabloinigoblasco*\n\n```rst\nSection_5\n=========\n\nAdded\n-----\n\n- Enable build of missing rolling repositories.\n- Enable Navigation2 for semi-binary build.\n- Added smacc2_performance_tools.\n- Added galactic CI setup and rename rolling files. (#58)\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success.\n- Added new client behavior add for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive. You optionally can select the nodes to wait.\n\nChanged\n-------\n\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed folders, deleted tracing.md, edited README.md.\n- Renamed event generator library.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Updated smacc2_rta command across readmes.\n- Corrected trailing spaces.\n- Optimized dependencies in move_base_z_planners_common.\n- Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Updated doxygen links (#70).\n- Updated c_cpp_properties.json.\n- Updated README.md with launch command.\n\nFixed\n-----\n\n- Do not execute clang-format on smacc2_sm_reference_library package.\n- Fixed source CI and corrected README overview. (#62).\n- Fixed pre-commit issues.\n- Corrected all linters and formatters.\n\nRemoved\n-------\n\n- Removed galactic builds from master and kept only rolling. Removed submodules and use .repos file.\n\nContributors\n------------\n\n- Pablo Iñigo Blasco\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Denis Štogl <denis@stogl.de>\n```\n\n```rst\nSection_6\n=========\n\nAdded\n-----\n\n- New client behavior `cb_wait_topic_message` added for nav2, allowing nodes to subscribe to the `/bond` topic and wait until they are active. Nodes selection is optional.\n- New client behavior for nav2 added, enabling waiting for nodes subscribing to the `/bond` topic to become active. Node selection is possible.\n- New feature `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause_slam` added for pausing SLAM functionality.\n- New client behavior `cb_pause_slam` introduced for pausing SLAM operations.\n- New client behavior `cb_pause\n\nSection_7\n=========\n\nAdded\n-----\n\n- First working version of sm template and template generator. (#127)\n- Feature/dance bot s pattern (#129)\n- Feature/sm dance bot refine (#131)\n- Feature/sm dance bot refine 2 (#132)\n- waypoints navigator bug (#133)\n- sm_dance_bot_lite (#136)\n- Add SM core test (#138)\n- using local action msgs (#139)\n- Feature/nav2z renaming (#144)\n- added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- added remaining SVGs to READMEs (#145)\n- Update package list. (#142)\n- Add SM Atomic SM generator. (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Feature/sm dance bot strikes back refactoring (#152)\n- initial migration to smacc2\n- Feature/testing moveit behaviors (#167)\n- sm_pubsub_1 (#169)\n- sm_pubsub_1 part 2 (#170)\n- sm_advanced_recovery_1 renaming (#171)\n- sm_multi_stage_1 reworking (#172)\n- Feature/aws navigation sm dance bot (#174)\n- warehouse2 (#177)\n- Waypoint Inputs (#178)\n- sm_dance_bot_warehouse_3 (#181)\n- Feature/sm warehouse 2 13 dec 2 (#182)\n- Brettpac branch (#184)\n- Feature/wharehouse2 dec 14 (#185)\n- Feature/cb pure spinning (#188)\n\nChanged\n-------\n\n- Noticed typo \"Finnaly\" corrected to \"Finally\"\n- minor tweaks (#130)\n- minor navigation improvements (#141)\n- Resolve compile warnings (#137)\n- Add QOS durability to SmaccPublisherClient (#163)\n- slight waypoint 4 and iterations changes for course completion (#155)\n- moved reference library SMs to smacc2_performance_tools (#166)\n- finetuning waypoints (#187)\n- fixing some errors introduced on formatting during migration\n- progress on moveit migration testing\n- improving dockerfile for building local tests\n- fixing compiling issues\n- update readme (#164)\n- fixing broken master build\n- fixing pipeline error\n- fixing broken build\n\nFixed\n-----\n\n- Fix CI: format fix python version (#148)\n- Remove node creation and create only a logger. (#149)\n- fixing some more linting warnings\n- fixing some formatting and templating on SrConditional\n- move trigger logic into headers\n- linting fixes\n\nRemoved\n-------\n\n- removing sm_dance_bot_msgs\n- removing parameters smacc\n- removing test from main moveit cmake\n- removing parameters smacc\n- removing some comments from README.md\n\nCollaborators\n-------------\n\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: DecDury <declandury@gmail.com>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n\n```rst\nSection 8\n=========\n\nAdded\n-----\n- Feature/planner changes on 16th December (#191)\n- Feature/replanning on 16th December (#193)\n- Feature/undo motion on 20th December (#196)\n- Feature/undo motion on 20th December (#198)\n- Feature/sync on 21st December (#199)\n- Feature/warehouse2 on 22nd December (#200)\n- Feature/warehouse2 on 23rd December (#201)\n- Feature/minor tune (#203)\n- Merging code from backport foxy and updates about autoware (#208)\n- Foxy backport (#206)\n- Add galactic CI build because Navigation2 is broken in rolling\n- Add partial changes for ament_cpplint\n- Add tf2_ros as dependency to find include\n- Add workflow for checking doc build\n- Create doxygen-deploy.yml\n- Create workflow for testing prerelease builds\n- Dockerfile w/ ROS distro as argument\n- First ensure you have the necessary package installed\n- Include necessary package and edit Threesome launch\n- Open new folder for additional tracing contents\n- Rename to smacc2 and smacc2_msgs\n- Update changelogs\n- Update description table\n- Update table\n\nChanged\n-------\n- Branching example\n- Change extension of imports\n- Change wording \"smacc application\" to \"SMACC2 library\"\n- Reactivate smacc2 nav clients for rolling via submodules\n- Rename tracing events\n- Revert markdowns to HTML\n- Update GitHub branch reference\n- Update name of package and package.xml to pass liter\n- Update ci-build-source.yml\n- Update doxygen-check-build.yml\n- Update smacc_sm_reference_library/sm_atomic/README.md\n- Update tracing/ManualTracing.md\n- Use docs/ as output directory\n- Use docs/ as source folder for documentation\n\nFixed\n-----\n- Fix trailing spaces\n- Fix minor broken build\n- Fixing warehouse 3 problems and other core improvements to remove deadlock, also making continuous integration green\n- Several fixes (#194)\n- Updating subscriber publisher components\n- Weird moveit not downloaded repo\n\nRemoved\n-------\n- Disable ament_cpplint\n- Disable cpplint and cppcheck linters\n- Disable some packages and update workflows\n- Disable disabled packages\n- Ignore further packages\n- Ignore all packages except smacc2 and smacc2_msgs\n- Satisfy ament_lint_cmake\n\nCo-authored-by: Denis Štogl <denis@stogl.de>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Declan Dury <44791484+DecDury@users.noreply.github.com>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: reelrbtx <brett2@reelrobotics.com>\nCo-authored-by: brettpac <brett@robosoft.ai>\nCo-authored-by: David Revay <MrBlenny@users.noreply.github.com>\nAuthor: Pablo Iñigo Blasco (pabloinigoblasco)\n```\n\n```rst\nSection_9\n=========\n\nAdded\n-----\n\n- Added smacc2_performance_tools.\n- Added galactic CI setup and renamed rolling files. (#58)\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents for success.\n- Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic and waiting for them to be alive. Optionally select the nodes to wait.\n\nChanged\n-------\n\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed folders, deleted tracing.md, and edited README.md.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Updated smacc2_rta command across readmes.\n- Renamed event generator library.\n- Optimized dependencies in move_base_z_planners_common.\n- Corrected trailing spaces.\n- Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Updated README.md.\n\nFixed\n-----\n\n- Fixed source CI and corrected README overview. (#62).\n- Fixed trailing spaces.\n- Corrected all linters and formatters.\n\nRemoved\n-------\n\n- Removed galactic builds from master and kept only rolling.\n- Removed submodules and used .repos file.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n\nOther\n-----\n\n- Some progress on navigation rolling.\n- More changes on performance tests.\n- Minor formatting.\n- Progress in aws navigation demo.\n- Several core improvements during navigation testing.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in aws navigation demo.\n- Progress in\n\n```rst\nSection_10\n==========\n\nAdded\n-----\n- New client behavior `cb_wait_topic_message` for asynchronous waiting and optional content check on a topic message.\n- New client behavior for nav2: wait for nav2 nodes to subscribe to the `/bond` topic and confirm they are active, with optional node selection.\n- Base for the `sm_aws_warehouse` navigation.\n- `cb_pause_slam` client behavior.\n- `sm_dance_bot_lite` feature for visualizing TurtleBot3.\n- Gazebo fixes to show the robot and lidar in various dance bot features.\n- Progress in AWS navigation demo.\n- Progress in navigation testing with core improvements.\n- Progress in testing `sm_dance_bot` with navigation parameter fixes.\n- Progress in testing `sm_multi_stage_1`.\n- Progress in testing `sm_dance_bot_strikes_back`.\n- Progress in testing `sm_dance_bot_s_pattern`.\n- Progress in testing `sm_dance_bot` with lidar show/hide option.\n- Progress in testing `sm_dance_bot` with slam pausing/resuming functionality.\n- Progress in testing `smacc2::deep_history` syntax.\n\nChanged\n-------\n- Minor formatting improvements.\n\nFixed\n-----\n- Removed some compile warnings.\n- Removed `neo_simulation2` package.\n- Corrected formatting issues.\n- Adjusted build packages for source CI.\n- Removed merge markers from a Python file.\n- Moved method to prevent recursion in `sm_dance_bot` changes.\n\nRemoved\n-------\n- Removed `neo_simulation2` package.\n\nContributors\n------------\n- Pablo Iñigo Blasco\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\n## Section_11\n\n### Added\n- First working version of sm template and template generator. (#127)\n- Added SM Atomic SM generator. (#143)\n- Added QOS durability to SmaccPublisherClient (#163)\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Rolling Docker environment to be executed from any environment (#154)\n- Husky launch file in sm_dance_bot\n- Waypoint Inputs (#178)\n- More Waypoints\n\n### Changed\n- Renamed reference library SMs to smacc2_performance_tools (#166)\n- Renamed navigation 2 stack to navigation 2\n- Renamed sm_advanced_recovery_1 to sm_advanced_recovery\n- Reworked sm_multi_stage_1 (#172)\n- Refactored aws navigation and navigation clients and behaviors\n- Finetuned waypoints (#187)\n\n### Fixed\n- Fixed launch command for sm_dance_bot_strikes_back in README.md\n- Fixed CI: format fix python version (#148)\n- Fixed compiling issues\n- Fixed broken master build\n- Fixed pipeline error\n\n### Removed\n- Removed sm_dance_bot_msgs\n- Removed parameters smacc\n- Removed node creation and create only a logger\n\n### Miscellaneous\n- Minor tweaks (#130)\n- Minor format issues (#134)\n- Minor navigation improvements (#141)\n- Minor configuration\n- Minor changes (#175)\n- Format (#180)\n- Format\n- Merge\n- Headless and other fixes\n- Default values\n- Finishing touches 1\n- Readme\n- Precommit cleanup\n\n### Contributors\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: DecDury <declandury@gmail.com>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n\n```rst\nSection_12\n==========\n\nAdded\n-----\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Feature/undo motion 20 12 (#196)\n- Feature/undo motion 20 12 (#198)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- Feature/warehouse2 23 12 (#201)\n- Feature/minor tune (#203)\n- Fix rolling builds (#222)\n- Add Autoware Auto Msgs into not-released dependencies. (#220)\n- Add mergify rules file.\n- Try fixing CI for rolling. (#209)\n- Remove example things from Foxy CI setup. (#214)\n- Foxy backport (#206)\n- Fix trailing spaces.\n- Correct codespell.\n- Correct python linters warnings.\n- Add galactic CI build because Navigation2 is broken in rolling.\n- Add partial changes for ament_cpplint.\n- Add tf2_ros as dependency to find include.\n- Disable ament_cpplint.\n- Disable some packages and update workflows.\n- Bump ccache version.\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences.\n- Disable cpplint and cppcheck linters.\n- Correct formatters.\n- branching example\n- Disable disabled packages\n- Update ci-build-source.yml\n- Change extension\n- Change extension of imports.\n- Enable cppcheck\n- Correct formatting of python file.\n- Included necessary package and edited Threesome launch\n- Rename header files and correct format.\n- Add workflow for checking doc build.\n- Update doxygen-check-build.yml\n- Create doxygen-deploy.yml\n- Use manual deployment for now.\n- Create workflow for testing prerelease builds\n- Use docs/ as source folder for documentation\n- Use docs/ as output directory.\n- Rename to smacc2 and smacc2_msgs\n- Correct GitHub branch reference.\n- Update name of package and package.xml to pass liter.\n- Execute on master update\n- Reset all versions to 0.0.0\n- Ignore all packages except smacc2 and smacc2_msgs\n- Update changelogs\n- 0.1.0\n- Revert \"Ignore all packages except smacc2 and smacc2_msgs\"\n- Update description table.\n- Update table\n- Copy initial docs\n- Dockerfile w/ ROS distro as argument\n- Opened new folder for additional tracing contents\n- Delete tracing directory\n- Moved tracing.md to tracing directory\n- added setupTracing.sh\n- Removed manual installation of ros-rolling-ros2trace\n- Created alternative ManualTracing\n- added new sm markdowns\n- added a dockerfile for Rolling and Galactic\n\nChanged\n-------\n- minor changes (#190)\n- several fixes (#194)\n- tuning warehouse3 (#197)\n- tuning and fixes (#202)\n- fixing warehouse 3 problems, and other core improvements (#204)\n- fixing warehouse 3 problems, and other core improvements to remove dead lock, also making continuous integration green\n\nFixed\n-----\n- minor broken build\n- removing warnings (#213)\n- minor linking errors foxy\n- minor format\n- minor linking errors foxy\n\nRemoved\n-------\n- merge\n- headless and other fixes\n- default values\n- minor\n- pure spinning behavior missing files\n- more fixes\n- replanning for all our examples\n- improving undo motion navigation warehouse2\n- undo tuning and errors\n- format\n- minor\n- missing\n- missing sm\n- updating subscriber publisher components\n- progress in autowarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrre machine\n- refining cp subscriber cp publisher\n- improvements in smacc core adding more components mostly developed for autoware demo\n- autoware demo\n- missing\n- foxy ci\n- fix\n``` \n\n*Autoría de Pablo Iñigo Blasco (pabloinigoblasco)*\n\n```rst\nSection_13\n==========\n\nAdded\n-----\n- Reactivated smacc2 nav clients for rolling via submodules.\n- Added README tutorial for Dockerfile.\n- Added smacc2_performance_tools.\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success.\n- Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive. You optionally can select the nodes to wait.\n\nChanged\n-------\n- Changed wording \"smacc application\" to \"SMACC2 library\".\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed tracing events.\n- Renamed folders.\n- Edited tracing.md to reflect new tracing event names.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n- Renamed event generator library.\n\nFixed\n----\n- Bug in smacc2 component.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n- Correct trailing spaces.\n- Optimized dependencies in move_base_z_planners_common.\n- Cleaned up sm_atomic_24hr.\n- Fixed source CI and corrected README overview.\n- Attempted pre-commit fixes.\n- Corrected all linters and formatters.\n\nRemoved\n-------\n- Removed galactic builds from master and kept only rolling. Removed submodules and used .repos file.\n\nOther\n-----\n- Several core improvements during navigation testing.\n- More changes on performance tests.\n- More on performance and other issues.\n- Progress in aws navigation demo.\n- More on navigation.\n- Formatting improvements.\n- Minor formatting.\n- Additional cleanup.\n- Cleanup.\n- Edited tracing.md to reflect new tracing event names.\n- Some progress on navigation rolling.\n- More on navigation.\n- Progress in aws navigation demo.\n- More on navigation.\n- More on navigation.\n- More on navigation.\n\nCommits\n-------\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n```\n\n*pabloinigoblasco*\n\n```rst\nSection_14\n==========\n\nAdded\n-----\n- Introducing new feature: `cb_wait_topic_message`, an asynchronous client behavior that waits for a topic message and optionally verifies its contents for success.\n- Added new client behavior for `nav2`, allowing waiting for nav2 nodes subscribing to the `/bond` topic and ensuring they are alive. Optional selection of nodes to wait for.\n- Progress in AWS navigation demo.\n\nChanged\n-------\n- Minor formatting improvements.\n\nFixed\n-----\n- Navigation parameters fixes on `sm_dance_bot`.\n- Removed some compile warnings.\n\nRemoved\n-------\n- Removed `neo_simulation2` package.\n\nOther\n-----\n- Base for the `sm_aws_warehouse` navigation.\n- Several core improvements during navigation testing.\n- Progress in AWS navigation demo.\n- Merge and progress.\n- `cb_pause_slam` client behavior.\n- `sm_dance_bot_lite`.\n- Updates yaml.\n- `sm_dance_bot` visualizing `turtlebot3`.\n- Cleaning and lidar show/hide option.\n- Cleaning files and fixing formatting.\n- More fixes.\n- Gazebo fixes to show the robot and the lidar.\n- Gazebo fixes for `sm_dance_bot_strikes_back`.\n- Precommit cleanup run.\n- AWS demo.\n- Got `sm_multi_stage_1` working (barely).\n- Brettpac branch.\n- Gaining traction with `sm_multi_stage_1`.\n- More progress.\n- Keep hammering.\n- Two stages.\n- 3 part.\n- 4th stage.\n- 5th stage.\n- A3.\n- MM.\n- Diverse improvements in navigation and performance.\n``` \n\n*pabloinigoblasco*\n\nSection_15\n===========\n\nAdded\n-----\n\n- Feature/diverse improvements navigation performance (#117)\n  - Various enhancements to navigation and performance.\n  - Additional linting and formatting.\n- Feature/slam toggle and smacc deep history (#122)\n  - Progress in navigation, slam toggle client behaviors, and slam_toolbox components.\n  - Introducing smacc2::deep_history syntax.\n  - Testing sm_dance_bot with slam pausing/resuming functionality.\n- Feature/more sm_dance_bot fixes\n- Feature/dance bot s pattern (#128)\n  - Polishing sm_dance_bot and s-pattern.\n  - Typo correction.\n- First working version of sm template and template generator. (#127)\n- Feature/sm dance bot refine (#131)\n- Feature/sm dance bot refine 2 (#132)\n  - More changes in sm_dance_bot.\n  - Build fix.\n- Waypoints navigator bug (#133)\n  - Minor tuning to mitigate overshot issue cases.\n- Progress in the sm_dance_bot tests (#135)\n  - Progress on markers cleanup.\n- Feature/nav2z renaming (#144)\n  - Navigation 2 stack renaming.\n  - Added SVGs to READMEs of atomic, dance_bot, and others (#140).\n  - Added remaining SVGs to READMEs (#145).\n- Update package list. (#142)\n- Feature/sm dance bot strikes back refactoring (#152)\n  - Slight waypoint 4 and iterations changes for course completion.\n- Feature/migration moveit client (#151)\n  - Initial migration to smacc2.\n  - Fixing errors on formatting.\n  - Adding missing dependency.\n  - Progressing in moveit migration testing.\n  - Updating format.\n  - Adding .reps dependencies and fixing build errors.\n  - Adding dependency to ur5 client.\n- Rolling Docker environment to be executed from any environment (#154).\n- Initial state machine transition timestamp (#165).\n- Add QOS durability to SmaccPublisherClient (#163).\n  - Added QOS durability to SmaccPublisherClient.\n  - Fixed missing colon.\n  - Removed line.\n  - Added reliability QOS config.\n- Feature/testing moveit behaviors (#167)\n  - More testing on moveit.\n  - Progress on moveit.\n  - More testing on moveit behaviors.\n- sm_pubsub_1 (#169)\n- sm_pubsub_1 part 2 (#170)\n- sm_advanced_recovery_1 renaming (#171)\n- sm_multi_stage_1 reworking (#172)\n  - Multistage modes and sequences.\n  - Steps and sequences for sm_multi_stage_1.\n  - Finishing touches and readme updates.\n- Feature/aws navigation sm dance bot (#174)\n  - Repository dependency.\n  - Husky launch file in sm_dance_bot.\n  - Added dependencies for husky simulation.\n  - Update dependencies for husky in rolling and galactic.\n  - Progress on aws navigation and refactorings on navigation clients and behaviors.\n- Waypoint Inputs (#178)\n- Warehouse2 (#177)\n- Warehouse2 progress (#179)\n- Sm_dance_bot_warehouse_3 (#181)\n- Feature/sm warehouse 2 13 dec 2 (#182)\n  - More changes and headless.\n  - Merge with default values.\n\nChanged\n-------\n\n- Move method after the method it calls. Otherwise, recursion could happen. (#126)\n- Resolve compile warnings (#137).\n- Minor navigation improvements (#141).\n- Using local action messages (#139).\n- Removing sm_dance_bot_msgs.\n- Removing parameters smacc (#147).\n- Update readme (#164).\n- Fix CI: format fix python version (#148).\n- Add SM Atomic SM generator. (#143).\n- Remove node creation and create only a logger. (#149).\n- Moved reference library SMs to smacc2_performance_tools (#166).\n- Minor changes (#175).\n- Format (#180).\n\nRemoved\n-------\n\n- Remove merge markers from a Python file. (#119).\n- Noticed launch command was incorrect in README.md.\n- Removing test from main moveit CMake.\n- Removing parameters smacc.\n- Workflows update.\n- Workflow.\n- Removing sm_dance_bot_msgs.\n- Pending references.\n- Default values.\n\nCo-Authored-By\n--------------\n\n- pabloinigoblasco <pablo@ibrobotics.com>\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- DecDury <declandury@gmail.com>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Denis Štogl <denis@stogl.de>\n\n```rst\nSection_16\n==========\n\nAdded\n-----\n- Brettpac branch (#184)\n- Redoing sm_dance_bot_warehouse_3 waypoints\n- More Waypoints\n- SrConditional fixes and formatting (#168)\n- Feature/wharehouse2 dec 14 (#185)\n- Feature/sm warehouse 2 13 dec 2 (#186)\n- Finetuning waypoints (#187)\n- Feature/cb pure spinning (#188, #189)\n- Pure spinning behavior missing files\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Several fixes (#194)\n- Minor changes (#195)\n- Feature/undo motion 20 12 (#196, #198)\n- Improving undo motion navigation warehouse2\n- Tuning warehouse3 (#197)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200, #201)\n- Finishing warehouse2\n- Feature/minor tune (#203)\n- Fixing warehouse 3 problems, and other core improvements (#204)\n- Added missing file from warehouse2 (#205)\n- Docker build files for all versions (#225)\n- Feature/retry behavior warehouse 1 (#226)\n- Foxy backport (#206)\n- Fix code generators (#221)\n- Fix other build issues\n- Update SM template and make example code clearly visible\n- Remove use of node in the sm performance template\n- Updated templated to use Blackboard storage\n- Update template to resolve the global data correctly\n- Update sm_name.hpp\n- Fix trailing spaces\n- Correct codespell\n- Correct python linters warnings\n- Add galactic CI build because Navigation2 is broken in rolling\n- Add partial changes for ament_cpplint\n- Add tf2_ros as dependency to find include\n- Disable ament_cpplint\n- Disable some packages and update workflows\n- Bump ccache version\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences\n- Disable cpplint and cppcheck linters\n- Correct formatters\n- Branching example\n- Disable disabled packages\n- Update ci-build-source.yml\n- Change extension of imports\n- Enable cppcheck\n- Correct formatting of python file\n- Included necessary package and edited Threesome launch\n- Rename header files and correct format\n- Add workflow for checking doc build\n- Update doxygen-check-build.yml\n- Create doxygen-deploy.yml\n- Use manual deployment for now\n- Create workflow for testing prerelease builds\n- Use docs/ as source folder for documentation\n- Use docs/ as output directory\n- Rename to smacc2 and smacc2_msgs\n- Correct GitHub branch reference\n- Update name of package and package.xml to pass liter\n- Execute on master update\n- Reset all versions to 0.0.0\n- Ignore all packages except smacc2 and smacc2_msgs\n- Update changelogs\n- 0.1.0\n\nChanged\n-------\n- ros2 launch sm_three_some sm_three_some to ros2 launch sm_three_some sm_three_some.launch\n\nRemoved\n-------\n- First ensure you have the necessary package installed\n  ```\n  sudo apt-get install ros-rolling-ros2trace\n  ```\n  Then run this command\n``` \n\n*pabloinigoblasco*\n```\n\n```rst\nSection_17\n==========\n\nAdded\n-----\n- Added Dockerfile with ROS distro as argument for easier setup.\n- Added setupTracing.sh script for automated installation of necessary packages and configuration of tracing group.\n- Added alternative ManualTracing method.\n- Added new SM markdowns.\n- Added README tutorial for Dockerfile setup.\n- Added smacc2_performance_tools for performance testing improvements.\n- Added new feature cb_wait_topic_message for asynchronous client behavior.\n- Added new feature wait nav2 nodes client behavior.\n\nChanged\n-------\n- Changed wording from \"smacc application\" to \"SMACC2 library\" for clarity.\n- Updated mentions of SMACC/ROS to SMACC2/ROS2 for consistency.\n- Renamed tracing events for better organization.\n- Renamed folders and files for improved structure.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch for accuracy.\n- Updated smacc2_rta command across readmes for consistency.\n- Cleaned up formatting in various files for better readability.\n- Optimized dependencies in move_base_z_planners_common package.\n- Renamed event generator library for better identification.\n- Enabled build of missing rolling repositories and Navigation2 for semi-binary build.\n- Removed galactic builds from master, keeping only rolling, and using .repos file for submodule management.\n\nFixed\n-----\n- Fixed bug in smacc2 component for smoother operation.\n- Fixed source CI setup and corrected README overview for accuracy.\n- Fixed trailing spaces for cleaner code.\n- Fixed formatting issues in sm_reference_library for better presentation.\n- Fixed pre-commit issues in various files for consistency.\n\nRemoved\n-------\n- Removed manual installation of ros-rolling-ros2trace, now automated in setupTracing.sh script.\n- Deleted tracing directory for better organization.\n\nCollaborators\n-------------\n- Denis Štogl <destogl@users.noreply.github.com>\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\n```rst\nSection_18\n==========\n\nAdded\n-----\n- New feature: `cb_wait_topic_message`, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for `nav2`: `add`, waits for nav2 nodes subscribing to the `/bond` topic and ensures they are alive. Optional node selection.\n- Base for the `sm_aws_warehouse` navigation.\n- Progress in AWS navigation demo.\n- New client behavior: `cb_pause_slam`.\n- `sm_dance_bot_lite` visualization for TurtleBot3.\n- Lidar show/hide option for `sm_dance_bot`.\n- Gazebo fixes to show the robot and lidar for various dance bot versions.\n- `sm_multi_stage_1` doubling.\n- AWS demo.\n- `sm_multi_stage_1` working progress.\n- `sm_multi_stage_1` development in Brettpac branch.\n\nChanged\n-------\n- Corrected all linters and formatters.\n- Formatting improvements.\n\nFixed\n----\n- Navigation parameters fixes on `sm_dance_bot`.\n- Removed some compile warnings.\n\nRemoved\n-------\n- Minor format fixes.\n- Merge and progress entries.\n- `doxygen` deployment workflow renamed.\n\nContributors\n------------\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\n*pabloinigoblasco*\n\n# Changelog\n\n## [Unreleased]\n\n### Added\n- Added `sm_multi_stage_1` with multistage modes, sequences, steps, and finishing touches. Co-authored by Ubuntu 20-04-02-amd64 <brett@robosoft.ai>.\n\n### Changed\n- Renamed `sm_advanced_recovery_1`.\n- Reworked `sm_multi_stage_1` for improved functionality.\n\n### Fixed\n- Fixed recursion issue in method calls.\n- Resolved compile warnings.\n- Fixed CI formatting for Python version.\n\n### Removed\n- Removed `neo_simulation2` package.\n- Removed unnecessary node creation in favor of logger.\n- Removed `sm_dance_bot_msgs` and parameters from `smacc`.\n\n## [1.0.0] - 2022-01-01\n\n### Added\n- Initial release with various improvements in navigation and performance.\n- Added `sm_dance_bot` features and refinements.\n- Added `SM Atomic SM generator`.\n- Added QOS durability to `SmaccPublisherClient`.\n- Added AWS navigation for `sm_dance_bot`.\n\n### Changed\n- Migrated `moveit` client to `smacc2`.\n- Updated format and dependencies for `moveit` migration.\n- Moved reference library SMs to `smacc2_performance_tools`.\n\n### Fixed\n- Fixed course completion issues with slight waypoint adjustments.\n- Fixed launch command in `README.md`.\n- Fixed broken master build and pipeline errors.\n\n### Removed\n- Removed test from main `moveit` CMake.\n- Removed unnecessary comments and test from `moveit` migration.\n\n### Contributors\n- Pablo Iñigo Blasco <pablo@ibrobotics.com>\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- DecDury <declandury@gmail.com>\n- Denis Štogl <destogl@users.noreply.github.com>\n\n## [0.1.0] - 2021-12-01\n\n### Added\n- Initial state machine transition timestamp.\n- Added `sm_pubsub_1` and `sm_pubsub_1 part 2`.\n- Added `sm_dance_bot_strikes_back` refactoring.\n- Added `sm_dance_bot_lite`.\n\n### Changed\n- Renamed `sm_multi_stage_1` sequences and modes.\n- Updated navigation 2 stack naming.\n\n### Fixed\n- Fixed overshot issues in `waypoints` navigator.\n- Fixed format issues in various files.\n- Fixed compiling issues in Docker environment.\n\n### Removed\n- Removed unnecessary parameters in `smacc`.\n- Removed `sm_dance_bot_msgs` and unnecessary dependencies.\n\n### Contributors\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n\n[pabloinigoblasco]\n\n```rst\nSection_20\n==========\n\nAdded\n-----\n- Update dependencies for husky in rolling and galactic.\n- Progress on aws navigation and refactorings on navigation clients and behaviors.\n- More on aws demo.\n- Warehouse2 progress.\n- Waypoint Inputs.\n- Warehouse2 progress.\n- Sm_dance_bot_warehouse_3.\n- Feature/sm warehouse 2 13 dec 2.\n- Finetuning waypoints.\n- Feature/cb pure spinning.\n- Pure spinning behavior missing files.\n- Feature/planner changes 16 12.\n- Feature/replanning 16 dec.\n- Replanning for all examples.\n- Several fixes.\n- Feature/undo motion 20 12.\n- Improving undo motion navigation warehouse2.\n- Tuning warehouse3.\n- Tuning and fixes.\n- Fixing warehouse 3 problems and other core improvements.\n- Added missing file from warehouse2.\n- Updating subscriber publisher components.\n- Progress in autoware machine.\n- Refining cp subscriber cp publisher.\n- Improvements in smacc core adding more components.\n- Autoware demo.\n- Docker files for different revisions.\n- Retry behavior warehouse 1.\n- Update file for fake hardware simulation and add file for gazebo simulation.\n- Progress in barrel husky.\n- Only rolling version should be pre-released on master.\n- Barrel search build fix and warehouse3.\n- Fixing startup problems in warehouse 3.\n- Multiple controllable leds plugin.\n- Progress in husky demo.\n- Update file for fake hardware simulation and add file for gazebo simulation.\n- Add ignition file and update repos files.\n- Progressing in husky demo.\n- Improving navigation behaviors.\n- Add galactic CI build because Navigation2 is broken in rolling.\n- Add partial changes for ament_cpplint.\n- Add tf2_ros as dependency to find include.\n\nChanged\n-------\n- Fix formatting.\n- Minor changes.\n- Merge changes.\n- Headless and other fixes.\n- Default values.\n- Format issues.\n- Tuning and fixes.\n- Minor tune.\n- Minor format fix.\n- Other minor changes.\n- Fix broken source build.\n- Correct Focal-Rolling builds by fixing the version of rosdep yaml.\n- Foxy backport.\n- Fix trailing spaces.\n- Correct codespell.\n- Correct python linters warnings.\n\nRemoved\n-------\n- Some reordering fixes.\n- Warnings removal and more testing on navigation.\n- Fixing docker for foxy and galactic.\n- Red picuup.\n\nCo-authored-by: Denis Štogl <denis@stogl.de>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Declan Dury <44791484+DecDury@users.noreply.github.com>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: reelrbtx <brett2@reelrobotics.com>\nCo-authored-by: brettpac <brett@robosoft.ai>\nCo-authored-by: David Revay <MrBlenny@users.noreply.github.com>\nCo-authored-by: pabloinigoblasco <pabloinigoblasco@ibrobotics.com>\n```\n\n```rst\nSection_21\n==========\n\nAdded:\n------\n- First ensure you have the necessary package installed:\n  ```\n  sudo apt-get install ros-rolling-ros2trace\n  ```\n- Add workflow for checking doc build.\n- Create doxygen-deploy.yml.\n- Create workflow for testing prerelease builds.\n- Use docs/ as source folder and output directory.\n- Added setupTracing.sh:\n  Installs necessary packages and configures tracing group.\n- Created alternative ManualTracing.\n- Added new sm markdowns.\n- Added a dockerfile for Rolling and Galactic.\n\nChanged:\n--------\n- Rename header files and correct format.\n- Change extension of imports.\n- Correct GitHub branch reference.\n- Update name of package and package.xml to pass liter.\n- Execute on master update.\n- Update description table.\n- Update table.\n- Copy initial docs.\n- Enable build of missing rolling repositories.\n- Enable Navigation2 for semi-binary build.\n- Remove galactic builds from master and keep only rolling.\n- Update mentions of SMACC/ROS to SMACC2/ROS2.\n- Optimized deps in move_base_z_planners_common.\n- Renaming of event generator library.\n\nFixed:\n------\n- Correct formatting of python file.\n- Correct formatters.\n- Correct trailing spaces.\n\nRemoved:\n--------\n- Disable ament_cpplint.\n- Disable some packages and update workflows.\n- Disable cpplint and cppcheck linters.\n- Disable disabled packages.\n- Disable further packages.\n- Ignore all packages except smacc2 and smacc2_msgs.\n- Ignore further packages.\n- Revert \"Ignore all packages except smacc2 and smacc2_msgs\".\n\nAuthors:\n--------\n- Pablo Iñigo Blasco\n```\n\n```rst\nSection_22\n==========\n\nAdded\n-----\n- New feature: cb_wait_topic_message, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for nav2: wait nav2 nodes subscribing to the /bond topic and waiting for them to be alive, with optional node selection.\n- New feature: cb pause slam client behavior.\n- New feature: sm_dance_bot_lite.\n\nChanged\n-------\n- Updated launch command.\n- Corrected all linters and formatters.\n- Navigation parameters fixes on sm_dance_bot.\n- Minor hotfixes.\n- Progress in aws navigation demo.\n- Merge and progress.\n- Fix formatting.\n- Updates yaml.\n\nFixed\n-----\n- Fixing precommit.\n- Remove some compile warnings.\n\nRemoved\n-------\n- Minor format improvements.\n\nContributors\n------------\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n```\n\n*pabloinigoblasco*\n\nSection_23\n==========\n\nAdded\n-----\n- Added `sm_dance_bot` visualization for `turtlebot3`.\n- Added lidar show/hide option for cleaning.\n- Added formatting improvements.\n\nChanged\n-------\n- Improved `sm_dance_bot` Lite Gazebo functionality (#104).\n- Enhanced Gazebo visualization for the robot and lidar.\n- Doubled functionality for `sm_multi_stage_1` (#103).\n- Improved Gazebo functionality for `sm_dance_bot_strikes_back`.\n- Enhanced AWS demo functionality (#108).\n- Improved functionality for `sm_multi_stage_1` in various stages.\n- Enhanced navigation and performance in diverse areas (#116).\n- Progressed in navigation, slam toggle client behaviors, and slam_toolbox components for `sm_dance_bot`.\n- Improved `sm_dance_bot` S-pattern functionality.\n- Refined `sm_dance_bot` and S-pattern.\n- Resolved compile warnings.\n- Added SM core test.\n- Made minor navigation improvements.\n- Updated package list.\n- Refactored `sm_dance_bot_strikes_back` (#152).\n- Made slight changes to waypoints and iterations for course completion (#155).\n- Migrated MoveIt client to `smacc2`.\n- Updated README files with SVGs.\n- Removed unnecessary parameters from `smacc`.\n- Fixed CI formatting for Python version.\n- Added SM Atomic SM generator.\n- Updated Docker environment for execution in any environment.\n\nFixed\n-----\n- Fixed recursion possibility by moving method calls.\n- Fixed launch command in README.md for `sm_dance_bot_strikes_back`.\n- Fixed CI formatting for Python version.\n\nRemoved\n-------\n- Removed `neo_simulation2` package.\n- Removed unnecessary test from main MoveIt CMake.\n- Removed test from main MoveIt CMake.\n- Removed `sm_dance_bot_msgs` references.\n- Removed parameters from `smacc`.\n\nAuthors\n-------\n- Pablo Iñigo Blasco (pabloinigoblasco)\n- Brett <brett@robosoft.ai>\n- DecDury <declandury@gmail.com>\n- Denis Štogl <destogl@users.noreply.github.com>\n\n```rst\nSection_24\n==========\n\nAdded\n-----\n- Initial state machine transition timestamp (#165)\n- Added QOS durability to SmaccPublisherClient (#163)\n- Feature/testing moveit behaviors (#167)\n- Feature/aws navigation sm dance bot (#174)\n- Added dependencies for husky simulation\n- Added Waypoint Inputs (#178)\n- Added SrConditional fixes and formatting (#168)\n- Feature/wharehouse2 dec 14 (#185)\n- Feature/sm warehouse 2 13 dec 2 (#186)\n- Feature/cb pure spinning (#188)\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Feature/undo motion 20 12 (#196)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- Feature/warehouse2 23 12 (#201)\n- Feature/minor tune (#203)\n- Feature/warehouse2 22 12 (#200)\n- Feature/warehouse2 23 12 (#201)\n\nChanged\n-------\n- Moved reference library SMs to smacc2_performance_tools\n- Added reliability QOS config\n- Progress on moveit\n- More testing on moveit behaviors\n- Reworked sm_multi_stage_1\n- Finishing touches on sm_multi_stage_1\n- Redoing sm_dance_bot_warehouse_3 waypoints\n- Improving undo motion navigation warehouse2\n- Tuning warehouse3\n- Improvements in smacc core\n- Refining cp subscriber cp publisher\n- Progress in autoware machine\n- Finishing warehouse2\n- Tuning and fixes\n- Improvements in barrel husky\n- Progress in barrel demo\n- Reordering fixes\n- Docker build files for all versions\n- Barrel search build fix and warehouse3\n- Fixing startup problems in warehouse 3\n\nFixed\n-----\n- Added a missing colon\n- Fixed pipeline error\n- Fixed broken master build\n- Fixed formatting\n- Fixed broken build\n- Fixed lint\n- Fixed errors in pure spinning behavior\n- Fixed format issues\n- Fixed warehouse 3 problems\n- Fixed dead lock in warehouse 3\n- Fixed missing files in warehouse2\n- Fixed linking errors for foxy\n- Fixed broken build in barrel demo\n- Fixed warnings removal\n- Fixed docker build for foxy and galactic\n\nRemoved\n-------\n- Removed a line\n- Removed weird moveit not downloaded repo\n- Removed warnings\n```\n\n```rst\nSection_25\n==========\n\nAdded\n-----\n- Docker improvements.\n- Runtime dependency.\n- Restoring UR dependency.\n\nChanged\n-------\n- Master rolling to galactic backport.\n- Updating galactic repos.\n\nFixed\n-----\n- Fixing build.\n\nOther\n-----\n- More merge.\n- Testing dance bot demos.\n\nContributors\n------------\n- Denis Štogl\n- Pablo Iñigo Blasco\n- pabloinigoblasco\n\nCo-authored-by\n--------------\n- reelrbtx <brett2@reelrobotics.com>\n- brettpac <brett@robosoft.ai>\n- David Revay <MrBlenny@users.noreply.github.com>\n- pabloinigoblasco <pabloinigoblasco@ibrobotics.com>\n- DecDury <declandury@gmail.com>\n- Denis Štogl <denis@stogl.de>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Declan Dury <44791484+DecDury@users.noreply.github.com>\n```\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/nav2z_planners_common/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(nav2z_planners_common)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\n\nfind_package(angles)\nfind_package(geometry_msgs)\nfind_package(nav_msgs)\nfind_package(rclcpp)\nfind_package(tf2)\nfind_package(tf2_geometry_msgs)\nfind_package(rclcpp_lifecycle)\n\nset(dependencies\n  angles\n  geometry_msgs\n  nav_msgs\n  rclcpp\n  tf2\n  tf2_geometry_msgs\n  rclcpp_lifecycle\n)\n\ninclude_directories(include)\n\nadd_library(${PROJECT_NAME} SHARED\n            src/${PROJECT_NAME}/common.cpp)\n\nament_target_dependencies(${PROJECT_NAME} ${dependencies})\ntarget_include_directories(${PROJECT_NAME} PRIVATE include)\n\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\nament_export_dependencies(${dependencies})\n\ninstall(TARGETS ${PROJECT_NAME}\n  ARCHIVE DESTINATION lib\n  LIBRARY DESTINATION lib\n  RUNTIME DESTINATION bin\n)\n\ninstall(DIRECTORY include/\n  DESTINATION include/\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/nav2z_planners_common/include/nav2z_planners_common/common.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <iostream>\n\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include <geometry_msgs/msg/twist.hpp>\n#include <rclcpp_lifecycle/lifecycle_node.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Twist & msg);\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Pose & msg);\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::PoseStamped & msg);\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Point & msg);\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Quaternion & msg);\n\ntemplate <typename T>\nvoid declareOrSet(rclcpp_lifecycle::LifecycleNode::SharedPtr & node, std::string param, T & value)\n{\n  if (!node->has_parameter(param))\n  {\n    node->declare_parameter(param, value);\n    // node->set_parameter(rclcpp::Parameter(param, value));\n  }\n}\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/nav2z_planners_common/include/nav2z_planners_common/nav2z_client_tools.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <vector>\n\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include <rclcpp/rclcpp.hpp>\n\nnamespace cl_nav2z\n{\ngeometry_msgs::msg::PoseStamped makePureSpinningSubPlan(\n  const geometry_msgs::msg::PoseStamped & start, double dstRads,\n  std::vector<geometry_msgs::msg::PoseStamped> & plan, double radstep = 0.005);\n\ngeometry_msgs::msg::PoseStamped makePureStraightSubPlan(\n  const geometry_msgs::msg::PoseStamped & startOrientedPose, const geometry_msgs::msg::Point & goal,\n  double length, std::vector<geometry_msgs::msg::PoseStamped> & plan);\n\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/nav2z_planners_common/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>nav2z_planners_common</name>\n  <version>2.3.19</version>\n  <description>The nav2z_planners_common package.</description>\n\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <author email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</author>\n\n  <license>BSDv3</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>angles</depend>\n  <depend>geometry_msgs</depend>\n  <depend>nav_msgs</depend>\n  <depend>rclcpp</depend>\n  <depend>tf2</depend>\n  <depend>tf2_geometry_msgs</depend>\n  <depend>rclcpp_lifecycle</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/nav2z_planners_common/src/nav2z_planners_common/common.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n// #include <rclcpp/rclcpp.hpp>\n\n#include <angles/angles.h>\n#include <tf2/transform_datatypes.h>\n#include <geometry_msgs/msg/quaternion.hpp>\n#include <geometry_msgs/msg/quaternion_stamped.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n\n#include <tf2/utils.h>\n#include <nav2z_planners_common/common.hpp>\n#include <nav2z_planners_common/nav2z_client_tools.hpp>\n\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include <geometry_msgs/msg/twist.hpp>\n\nnamespace cl_nav2z\n{\ngeometry_msgs::msg::PoseStamped makePureSpinningSubPlan(\n  const geometry_msgs::msg::PoseStamped & start, double dstRads,\n  std::vector<geometry_msgs::msg::PoseStamped> & plan, double radstep)\n{\n  double startYaw = tf2::getYaw(start.pose.orientation);\n  // RCLCPP_INFO(getLogger(),\"pure spining start yaw: %lf\", startYaw);\n  // RCLCPP_INFO(getLogger(),\"pure spining goal yaw: %lf\", dstRads);\n  // RCLCPP_WARN_STREAM(getLogger(),\"pure spinning start pose: \" << start);\n\n  double goalAngleOffset = angles::shortest_angular_distance(startYaw, dstRads);\n  // RCLCPP_INFO(getLogger(),\"shortest angle: %lf\", goalAngleOffset);\n\n  if (goalAngleOffset >= 0)\n  {\n    // angle positive turn counterclockwise\n    // RCLCPP_INFO(getLogger(),\"pure spining counterclockwise\");\n    for (double dangle = 0; dangle <= goalAngleOffset; dangle += radstep)\n    {\n      geometry_msgs::msg::PoseStamped p = start;\n      double yaw = startYaw + dangle;\n      // RCLCPP_INFO(getLogger(),\"pure spining counterclockwise, current path yaw: %lf, dangle: %lf,\n      // angleoffset %lf, radstep %lf pathsize(%ld)\", yaw, dangle, goalAngleOffset, radstep, plan.size());\n      tf2::Quaternion q;\n      q.setRPY(0, 0, yaw);\n      p.pose.orientation = tf2::toMsg(q);\n      plan.push_back(p);\n    }\n  }\n  else\n  {\n    // angle positive turn clockwise\n    // RCLCPP_INFO(getLogger(),\"pure spining clockwise\");\n    for (double dangle = 0; dangle >= goalAngleOffset; dangle -= radstep)\n    {\n      // RCLCPP_INFO(getLogger(),\"dangle: %lf\", dangle);\n      geometry_msgs::msg::PoseStamped p = start;\n      double yaw = startYaw + dangle;\n      // RCLCPP_INFO(getLogger(),\"pure spining clockwise, yaw: %lf, dangle: %lf, angleoffset %lf radstep\n      // %lf\", yaw, dangle, goalAngleOffset,radstep);\n      tf2::Quaternion q;\n      q.setRPY(0, 0, yaw);\n      p.pose.orientation = tf2::toMsg(q);\n      plan.push_back(p);\n    }\n  }\n\n  // RCLCPP_INFO(getLogger(),\"pure spining end yaw: %lf\", dstRads);\n  geometry_msgs::msg::PoseStamped end = start;\n  tf2::Quaternion q;\n  q.setRPY(0, 0, dstRads);\n  end.pose.orientation = tf2::toMsg(q);\n  plan.push_back(end);\n\n  return end;\n}\n\ngeometry_msgs::msg::PoseStamped makePureStraightSubPlan(\n  const geometry_msgs::msg::PoseStamped & startOrientedPose, const geometry_msgs::msg::Point & goal,\n  double length, std::vector<geometry_msgs::msg::PoseStamped> & plan)\n{\n  double dx = 0.01;  // 1 cm\n  double steps = length / dx;\n  double dt = 1.0 / steps;\n\n  // geometry_msgs::msg::PoseStamped end;\n  // end.pose.orientation = startOrientedPose.pose.orientation;\n  // end.pose.position = goal;\n  plan.push_back(startOrientedPose);\n\n  // RCLCPP_INFO_STREAM(nh_->get_logger(),\"Pure straight, start: \" << startOrientedPose << std::endl << \"end: \" <<\n  // goal);\n  for (double t = 0; t <= 1.0; t += dt)\n  {\n    geometry_msgs::msg::PoseStamped p = startOrientedPose;\n\n    p.pose.position.x = startOrientedPose.pose.position.x * (1 - t) + goal.x * t;\n    p.pose.position.y = startOrientedPose.pose.position.y * (1 - t) + goal.y * t;\n    p.pose.orientation = startOrientedPose.pose.orientation;\n\n    plan.push_back(p);\n  }\n\n  return plan.back();\n}\n\n}  // namespace cl_nav2z\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Twist & msg)\n{\n  out << \"Twist [\" << msg.linear.x << \"m , \" << msg.linear.y << \"m , \" << msg.angular.z << \"rad ]\";\n  return out;\n}\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Pose & msg)\n{\n  out << \"Position [\" << msg.position.x << \"m , \" << msg.position.y << \"m , \" << msg.position.z\n      << \"m ]\";\n  out << \" Orientation [\" << msg.orientation.x << \" , \" << msg.orientation.y << \" , \"\n      << msg.orientation.z << \", \" << msg.orientation.w << \"]\";\n  return out;\n}\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Point & msg)\n{\n  out << \"Position [\" << msg.x << \"m , \" << msg.y << \"m , \" << msg.z << \"m ]\";\n  return out;\n}\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Quaternion & msg)\n{\n  out << \"Quaternion [\" << msg.x << \" , \" << msg.y << \" , \" << msg.z << \", \" << msg.w << \"]\";\n  return out;\n}\n\nstd::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::PoseStamped & msg)\n{\n  out << msg.pose;\n  return out;\n}\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/pure_spinning_local_planner/CHANGELOG.rst",
    "content": "Changelog for package pure_spinning_local_planner\n==================================================\n\n2.3.16 (2023-07-16)\n-------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2 <https://github.com/robosoft-ai/SMACC2>`_\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Fixed weird issue with ros buildfarm\n\n### Contributors\n- brettpac\n- pabloinigoblasco\n\n2.3.6 (2023-03-12)\n------------------\n\n1.22.1 (2022-11-09)\n-------------------\n### Added\n- Pre-release\n\n### Contributors\n- pabloinigoblasco\n\n0.3.0 (2022-04-04)\n------------------\n\n0.0.0 (2022-11-09)\n------------------\n### Added\n- Humble check\n- Progress in migration to humble\n- Reverted commit dec14a936a877b2ef722a6a32f1bf3df09312542\n- Ignored packages which should not be released\n- Feature/master rolling to galactic backport (#236)\n  - Updated mentions of SMACC/ROS to SMACC2/ROS2\n  - Progress on navigation rolling\n  - Renamed folders, deleted tracing.md, edited README.md\n  - Added smacc2_performance_tools\n  - Performance tests improvements\n  - Format cleanup for sm_respira_1\n  - Optimized dependencies in move_base_z_planners_common\n  - Renamed event generator library\n  - Added galactic CI setup and renamed rolling files\n  - Fixed source CI and corrected README overview\n  - Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch\n  - Updated doxygen links\n  - More readme updates\n  - Created new sm from sm_respira_1\n  - Several core improvements during navigation testing\n  - New feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success\n  - Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive\n\n### Contributors\n- Denis Štogl\n- brettpac\n- pabloinigoblasco\n\n### Co-authored-by\n- brettpac\n- Denis Štogl\n\n```rst\nSection_2\n=========\n\nAdded\n-----\n- New feature: `cb_wait_topic_message`: asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for `nav2`: waits for `nav2` nodes to subscribe to the `/bond` topic and ensures they are alive.\n\nChanged\n-------\n- Improved core functionality during navigation testing.\n- Progress in AWS navigation demo.\n- Minor formatting enhancements.\n- Navigation parameters fixes on `sm_dance_bot`.\n- `cb_pause_slam` client behavior added.\n\nFixed\n-----\n- Removed some compile warnings.\n- Fixed format issues.\n- Gazebo fixes for `sm_dance_bot` and `sm_dance_bot_strikes_back`.\n\nRemoved\n-------\n- `neo_simulation2` package removed.\n\nOther\n-----\n- Various improvements and fixes in AWS navigation.\n- `sm_multi_stage_1` enhancements.\n- `sm_dance_bot_lite` and `sm_dance_bot_strikes_back` visualizations.\n- Precommit cleanup and workflow updates.\n- `sm_multi_stage_1` progress and development.\n- `a3` and `mm` updates.\n\nCommits\n-------\n- Feature/sm dance bot fixes (#93)\n- Feature/sm aws warehouse (#94)\n- Feature/cb pause slam (#98)\n- Rename doxygen deployment workflow (#100)\n- Feature/dance bot launch gz lidar choice (#102)\n- Feature/sm dance bot lite gazebo fixes (#104)\n- Feature/sm dance bot strikes back gazebo fixes (#105)\n- aws demo (#108)\n- Brettpac branch (#110)\n- Brettpac branch (#111)\n- Remove neo_simulation2 package. (#112)\n- mm (#115)\n\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\n*pabloinigoblasco*\n\nSection_3\n=========\n\nVersion 0.1.0 (2022-01-01)\n--------------------------\n\nAdded\n-----\n\n- Diverse improvements in navigation and performance (#116)\n- Feature: diverse improvements in navigation performance (#117)\n- Additional linting and formatting\n- Introduced slam toggle and smacc deep history (#122)\n- Progress in navigation, slam toggle client behaviors, and slam_toolbox components\n- Testing progress for sm_dance_bot with slam pausing/resuming functionality\n- More fixes for sm_dance_bot (#125)\n- Added dance bot s pattern feature (#128)\n- Polishing for sm_dance_bot and s-pattern\n- Fixed a typo\n- First working version of sm template and template generator (#127)\n- Minor tweaks (#130)\n- Resolve compile warnings (#137)\n- Added SM core test (#138)\n- Minor navigation improvements (#141)\n- Using local action messages (#139)\n- Removed sm_dance_bot_msgs\n- Pending references\n- Renamed navigation 2 stack\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Updated package list (#142)\n- Removed parameters smacc\n- Updated workflows\n- Fixed launch command in README.md for sm_dance_bot_strikes_back\n- Fixed CI: format fix python version (#148)\n- Added SM Atomic SM generator (#143)\n- Removed node creation and created only a logger (#149)\n- Rolling Docker environment to be executed from any environment (#154)\n- Refactored sm dance bot strikes back (#152)\n- Slight waypoint 4 and iterations changes for robot course completion (#155)\n- Feature: migration moveit client (#151)\n- Initial migration to smacc2\n- Fixed errors in formatting\n- Added missing dependency\n- Fixed linting warnings\n- Progress in moveit migration testing\n- Added .reps dependencies and fixed build errors\n- Added dependency to ur5 client\n- Docker refactoring\n- Progress on move_it PR\n- Improved dockerfile for building local tests\n- Fixed compiling issues\n- Updated readme (#164)\n- Added QOS durability to SmaccPublisherClient (#163)\n- Added reliability qos config\n- Feature: testing moveit behaviors (#167)\n- More testing on moveit behaviors\n- Fixed pipeline error\n- Fixed broken master build\n- Added sm_pubsub_1 (#169)\n- Added sm_pubsub_1 part 2 (#170)\n- Renamed sm_advanced_recovery_1 (#171)\n- Reworked sm_multi_stage_1 (#172)\n- Added multistage modes, sequences, steps, and finishing touches\n- Added feature: aws navigation sm dance bot (#174)\n- Added husky launch file in sm_dance_bot\n- Added dependencies for husky simulation\n- Updated dependencies for husky in rolling and galactic\n- More progress on aws navigation and refactorings on navigation clients and behaviors\n- More on aws demo\n- Fixed broken build\n- Minor changes (#175)\n- Added warehouse2 (#177)\n- Added waypoint inputs (#178)\n- Progress on warehouse2 (#179)\n- Format improvements (#180)\n- Added sm_dance_bot_warehouse_3 (#181)\n\nChanged\n-------\n\n- Moved method after the method it calls to prevent recursion (#126)\n- Moved reference library SMs to smacc2_performance_tools (#166)\n\nRemoved\n-------\n\n- Merge markers from a python file (#119)\n- Removed test from main moveit cmake\n\nFixed\n-----\n\n- Minor format issues (#134)\n- Fixed compiling issues\n- Fixed broken build\n\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\nCo-authored-by: pabloinigoblasco <pablo@ibrobotics.com>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Denis Štogl <denis@stogl.de>\nAuthor: Pablo Iñigo Blasco (pabloinigoblasco)\n\n```rst\nSection_4\n=========\n\nAdded\n-----\n\n- Feature/sm warehouse 2 13 dec 2 (#182)\n  - Added new feature for warehouse 2 on December 13th.\n- Feature/wharehouse2 dec 14 (#185)\n  - Implemented changes for warehouse 2 on December 14th.\n- Feature/cb pure spinning (#188)\n  - Introduced pure spinning behavior enhancements.\n- Feature/replanning 16 dec (#193)\n  - Added replanning functionality on December 16th.\n- Feature/undo motion 20 12 (#196) and Feature/undo motion 20 12 (#198)\n  - Improved undo motion navigation for warehouse 2.\n- Feature/sync 21 12 (#199)\n  - Addressed format issues for synchronization.\n- Feature/warehouse2 22 12 (#200) and Feature/warehouse2 23 12 (#201)\n  - Finalized warehouse 2 improvements.\n- Feature/minor tune (#203)\n  - Tuned and fixed minor issues.\n- Feature/planner changes 16 12 (#191)\n  - Made planner changes on December 16th.\n- Foxy backport (#206)\n  - Backported changes to Foxy version.\n\nChanged\n-------\n\n- Updated formatting and fixed issues in SrConditional (#168).\n- Adjusted trigger logic in SrConditional.\n- Reworked waypoints for sm_dance_bot_warehouse_3.\n- Fine-tuned waypoints for sm_dance_bot_warehouse_3.\n- Improved warehouse 3 navigation and core functionality (#204).\n\nFixed\n-----\n\n- Resolved linting issues.\n- Fixed various bugs and errors.\n- Corrected formatting in multiple files.\n- Addressed missing files and dependencies.\n- Fixed trailing spaces and codespell errors.\n- Solved Python linting warnings.\n- Fixed formatting of Python files.\n- Corrected formatters and linters.\n- Fixed linking errors and licenses.\n- Resolved build issues and updated workflows.\n- Fixed extension and imports in code files.\n- Enabled cppcheck and updated CI workflows.\n- Fixed missing repositories for Rolling.\n- Fixed bugs in smacc2 components.\n\nRemoved\n-------\n\n- Removed manual installation of ros-rolling-ros2trace.\n  - Installation is now automated in setupTracing.sh.\n- Deleted tracing directory and manual tracing instructions.\n- Removed unnecessary packages and disabled linters.\n- Ignored certain packages for linting and checking.\n- Reverted changes in commit f603166a4b3ccdfe96c64d9f9fb9d8b49fbf0e61.\n\nAuthors\n-------\n\n- Pablo Iñigo Blasco\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n```\n\n```rst\nSection_5\n=========\n\nAdded\n-----\n\n- Enable Navigation2 for semi-binary build.\n- Added smacc2_performance_tools.\n\nChanged\n-------\n\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed folders, deleted tracing.md, and edited README.md.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n- Optimized dependencies in move_base_z_planners_common.\n- Renamed event generator library.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Update doxygen links (#70).\n- Update c_cpp_properties.json.\n- Correct all linters and formatters.\n\nFixed\n-----\n\n- Correct trailing spaces.\n\nRemoved\n-------\n\n- Remove galactic builds from master and keep only rolling. Remove submodules and use .repos file.\n\nOther\n-----\n\n- Several core improvements during navigation testing.\n- Progress in AWS navigation demo.\n- New feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents for success.\n- Adding new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic and waiting for them to be alive. You can optionally select the nodes to wait.\n\nCollaborators\n-------------\n\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n```\n\n*pabloinigoblasco*\n\n```rst\nSection_6\n=========\n\nAdded\n-----\n\n- New client behavior `cb_wait_topic_message` for asynchronous waiting of topic messages with optional content check for success.\n- New client behavior for `nav2` to wait for nodes subscribing to the `/bond` topic to become active, with optional node selection.\n- Base for `sm_aws_warehouse` navigation.\n- `cb_pause_slam` client behavior.\n- `sm_dance_bot_lite` feature with gazebo lidar visualization.\n- `sm_multi_stage_1` feature enhancements.\n- `sm_dance_bot_strikes_back` gazebo fixes.\n- AWS demo improvements.\n\nChanged\n-------\n\n- Minor formatting improvements.\n- Navigation parameters fixes on `sm_dance_bot`.\n- Progress in AWS navigation demo.\n- Cleaning and lidar show/hide options for `sm_dance_bot`.\n- Format fixes for gazebo visualization.\n- Progress in navigation, slam toggle client behaviors, and `slam_toolbox` components.\n- Introducing slam pausing/resuming functionality for `sm_dance_bot`.\n\nFixed\n-----\n\n- Removed some compile warnings.\n- Corrected formatting issues.\n- Adjusted build packages for source CI.\n- Removed `neo_simulation2` package.\n- Fixed recursion possibility by moving method calls after the methods they invoke.\n\nRemoved\n-------\n\n- `neo_simulation2` package.\n\nContributors\n------------\n\n- Pablo Iñigo Blasco\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\nSection_7\n=========\n\nAdded\n-----\n\n- Added `Feature/dance bot s pattern (#129)` for sm_dance_bot template.\n- Added `First working version of sm template and template generator. (#127)`.\n- Added `minor tweaks (#130)` to improve functionality.\n- Added `waypoints navigator bug (#133)` for bug fixing.\n- Added `Add SM core test (#138)` for testing purposes.\n- Added `using local action msgs (#139)` for local messaging.\n- Added `Feature/nav2z renaming (#144)` for renaming navigation stack.\n- Added `added SVGs to READMEs of atomic, dance_bot, and others (#140)` for visual enhancements.\n- Added `Update package list. (#142)` for package management.\n- Added `Add SM Atomic SM generator. (#143)` for generating SM Atomic.\n- Added `Rolling Docker environment to be executed from any environment (#154)` for Docker environment flexibility.\n- Added `Add QOS durability to SmaccPublisherClient (#163)` for durability enhancement.\n- Added `Feature/testing moveit behaviors (#167)` for testing moveit behaviors.\n- Added `sm_pubsub_1 (#169)` for pubsub functionality.\n- Added `sm_pubsub_1 part 2 (#170)` for continuation of pubsub functionality.\n- Added `sm_advanced_recovery_1 renaming (#171)` for renaming purposes.\n- Added `sm_multi_stage_1 reworking (#172)` for reworking multi-stage functionality.\n- Added `Feature/aws navigation sm dance bot (#174)` for AWS navigation integration.\n- Added `warehouse2 (#177)` for warehouse functionality.\n- Added `Waypoint Inputs (#178)` for input management.\n- Added `wharehouse2 progress (#179)` for progress tracking.\n- Added `sm_dance_bot_warehouse_3 (#181)` for warehouse management.\n- Added `Feature/sm warehouse 2 13 dec 2 (#182)` for warehouse management.\n- Added `Brettpac branch (#184)` for branch management.\n- Added `SrConditional fixes and formatting (#168)` for conditional fixes.\n- Added `Feature/wharehouse2 dec 14 (#185)` for warehouse management.\n- Added `Feature/cb pure spinning (#188)` for spinning functionality.\n\nChanged\n-------\n\n- Changed `minor navigation improvements (#141)` for improved navigation.\n- Changed `progress on aws navigation and some other refactorings on navigation clients and behaviors` for AWS navigation improvements.\n- Changed `finetuning waypoints (#187)` for improved waypoint management.\n\nFixed\n-----\n\n- Fixed `Fix CI: format fix python version (#148)` for CI fixing.\n- Fixed `Fix formatting.` for formatting issues.\n- Fixed `fixing broken master build` for build fixing.\n- Fixed `fix: some formatting and templating on SrConditional` for SrConditional formatting.\n- Fixed `fix: move trigger logic into headers` for trigger logic fixing.\n- Fixed `fix: lint` for linting issues.\n\nRemoved\n-------\n\n- Removed `removing sm_dance_bot_msgs` for cleanup purposes.\n- Removed `removing parameters smacc` for parameter cleanup.\n- Removed `removing test from main moveit cmake` for test removal.\n- Removed `repos dependency` for dependency removal.\n- Removed `docker refactoring` for Docker refactoring removal.\n\nAuthors\n-------\n\n- Pablo Iñigo Blasco\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- DecDury <declandury@gmail.com>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Denis Štogl <denis@stogl.de>\n\n```rst\nSection 8\n=========\n\nAdded\n-----\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Feature/undo motion 20 12 (#196)\n- Feature/undo motion 20 12 (#198)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- Feature/warehouse2 23 12 (#201)\n- Feature/minor tune (#203)\n- Merging code from backport foxy and updates about autoware (#208)\n- Foxy backport (#206)\n- Add galactic CI build because Navigation2 is broken in rolling\n- Add partial changes for ament_cpplint\n- Add tf2_ros as dependency to find include\n- Create workflow for testing prerelease builds\n- Use manual deployment for now\n- Rename to smacc2 and smacc2_msgs\n- Update name of package and package.xml to pass liter\n- Reset all versions to 0.0.0\n- Update changelogs\n- Revert \"Ignore all packages except smacc2 and smacc2_msgs\"\n- Update description table\n- Update table\n- Copy initial docs\n- Dockerfile w/ ROS distro as argument\n- Opened new folder for additional tracing contents\n- Moved tracing.md to tracing directory\n- Added setupTracing.sh\n- Removed manual installation of ros-rolling-ros2trace\n- Created alternative ManualTracing\n- Added new sm markdowns\n- Added a dockerfile for Rolling and Galactic\n- Enable Navigation2 for semi-binary build\n\nChanged\n-------\n- Renamed header files and corrected format\n- Changed wording \"smacc application\" to \"SMACC2 library\"\n\nFixed\n-----\n- Several fixes (#194)\n- Tuning warehouse3 (#197)\n- Tuning and fixes (#202)\n- Fix trailing spaces\n- Correct codespell\n- Correct python linters warnings\n- Disable ament_cpplint\n- Disable cpplint and cppcheck linters\n- Correct formatters\n- Enable cppcheck\n- Correct formatting of python file\n- Enable build of missing rolling repositories\n- Enable Navigation2 for semi-binary build\n\nRemoved\n-------\n- Minor broken build\n- Disable disabled packages\n- Ignore further packages\n- Ignore all packages except smacc2 and smacc2_msgs\n```\n\n*pabloinigoblasco*\n\n```rst\nSection_9\n=========\n\nAdded\n-----\n\n- Added smacc2_performance_tools.\n- Added galactic CI setup and renamed rolling files. (#58)\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents for success.\n- Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic and waiting for them to be alive. Optionally select the nodes to wait.\n\nChanged\n-------\n\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed folders, deleted tracing.md, and edited README.md.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Updated smacc2_rta command across readmes.\n- Renamed event generator library.\n- Optimized dependencies in move_base_z_planners_common.\n- Corrected trailing spaces.\n- Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Updated README.md.\n\nFixed\n-----\n\n- Fixed source CI and corrected README overview. (#62).\n- Corrected all linters and formatters.\n\nRemoved\n-------\n\n- Removed galactic builds from master and kept only rolling.\n- Removed submodules and used .repos file.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n\nOther\n-----\n\n- Some progress on navigation rolling.\n- More changes on performance tests.\n- Minor formatting improvements.\n- Several core improvements during navigation testing.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation demo.\n\n```rst\nSection_10\n==========\n\nAdded\n-----\n- New client behavior `cb_wait_topic_message` added for nav2. It allows waiting for nodes subscribing to the `/bond` topic to become active, with optional node selection.\n- New feature `cb_pause_slam` added for pausing SLAM functionality.\n\nChanged\n-------\n- Progress made in AWS navigation demo.\n- Navigation parameters fixed for `sm_dance_bot`.\n- Formatting improvements in various areas.\n- Gazebo fixes implemented for visualizing Turtlebot3 and lidar options.\n\nFixed\n-----\n- Compilation warnings removed.\n- Recursion issue fixed by moving a method to prevent potential recursion.\n\nRemoved\n-------\n- `neo_simulation2` package removed.\n\nOther\n-----\n- Various core improvements during navigation testing.\n- Precommit cleanup run performed.\n- Source build enabled on PR for testing.\n- `sm_multi_stage_1` functionality enhanced and tested.\n- `smacc2::deep_history` syntax introduced for deep history tracking.\n- Merge markers removed from a Python file.\n- Additional linting and formatting applied.\n- `sm_dance_bot` functionality expanded with new fixes and patterns.\n- Collaboration with Ubuntu 20-04-02-amd64 (Brett) and pabloinigoblasco.\n```\n\n# Section 11\n\n## Added\n- First working version of sm template and template generator. (#127)\n- Minor tweaks (#130)\n- Feature/sm dance bot refine (#131)\n- Feature/sm dance bot refine 2 (#132)\n- Waypoints navigator bug (#133)\n- Sm_dance_bot_lite (#136)\n- Resolve compile warnings (#137)\n- Add SM core test (#138)\n- Minor navigation improvements (#141)\n- Using local action messages (#139)\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Update package list (#142)\n- Add SM Atomic SM generator (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Initial migration to smacc2 (#151)\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/testing moveit behaviors (#167)\n- Sm_pubsub_1 (#169)\n- Sm_pubsub_1 part 2 (#170)\n- Sm_advanced_recovery_1 renaming (#171)\n- Sm_multi_stage_1 reworking (#172)\n- Feature/aws navigation sm dance bot (#174)\n- Warehouse2 (#177)\n- Waypoint Inputs (#178)\n- Sm_dance_bot_warehouse_3 (#181)\n- Feature/sm warehouse 2 13 dec 2 (#182)\n- Brettpac branch (#184)\n- SrConditional fixes and formatting (#168)\n- Feature/wharehouse2 dec 14 (#185)\n- Feature/cb pure spinning (#188)\n\n## Changed\n- Minor format issues (#134)\n- Update readme (#164)\n- Initial state machine transition timestamp (#165)\n- Moved reference library SMs to smacc2_performance_tools (#166)\n- Finetuning waypoints (#187)\n\n## Fixed\n- Fix CI: format fix python version (#148)\n- Remove node creation and create only a logger (#149)\n- Fixing some errors introduced on formatting in migration to smacc2 (#151)\n- Fixing pipeline error in testing moveit behaviors (#167)\n- Fixing broken master build in testing moveit behaviors (#167)\n\n## Removed\n- Removing sm_dance_bot_msgs (#144)\n- Removing parameters smacc (#147)\n- Removing test from main moveit cmake in migration to smacc2 (#151)\n- Removing some comments in the past in README.md (#154)\n\n## Authors\n- Pablo Iñigo Blasco\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: DecDury <declandury@gmail.com>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n\n```rst\nSection_12\n==========\n\nAdded\n-----\n\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Feature/undo motion 20 12 (#196)\n- Feature/undo motion 20 12 (#198)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- Feature/warehouse2 23 12 (#201)\n- Feature/minor tune (#203)\n- Fix rolling builds (#222)\n- Add Autoware Auto Msgs into not-released dependencies. (#220)\n- Add mergify rules file.\n- Try fixing CI for rolling. (#209)\n- Remove example things from Foxy CI setup. (#214)\n- Add galactic CI build because Navigation2 is broken in rolling.\n- Add partial changes for ament_cpplint.\n- Add tf2_ros as dependency to find include.\n- Disable ament_cpplint.\n- Disable some packages and update workflows.\n- Bump ccache version.\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences.\n- Disable cpplint and cppcheck linters.\n- Correct formatters.\n- Enable cppcheck\n- Included necessary package and edited Threesome launch\n\nChanged\n-------\n\n- Improving undo motion navigation warehouse2\n- Tuning warehouse3 (#197)\n- Tuning and fixes (#202)\n- Fixing warehouse 3 problems, and other core improvements to remove dead lock, also making continuous integration green\n- Updating subscriber publisher components\n- Progress in autowarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrre machine\n- Refining cp subscriber cp publisher\n- Improvements in smacc core adding more components mostly developed for autoware demo\n- Odom tracker improvements\n- Adding forward behavior retry funcionality\n- Docker files for different revisions, warnings removal and more testing on navigation\n- Fixing docker for foxy and galactic\n- Removing warnings (#213)\n- Fix trailing spaces.\n- Correct codespell.\n- Correct python linters warnings.\n- Rename header files and correct format.\n- Add workflow for checking doc build.\n- Update doxygen-check-build.yml\n- Create doxygen-deploy.yml\n- Create workflow for testing prerelease builds\n- Rename to smacc2 and smacc2_msgs\n- Correct GitHub branch reference.\n- Update name of package and package.xml to pass liter.\n- Reset all versions to 0.0.0\n- Update description table.\n- Update table\n- Copy initial docs\n- Opened new folder for additional tracing contents\n- Delete tracing directory\n- Moved tracing.md to tracing directory\n- Added setupTracing.sh\n- Removed manual installation of ros-rolling-ros2trace\n- This is now automated in setupTracing.sh\n- Created alternative ManualTracing\n- Added new sm markdowns\n- Added a dockerfile for Rolling and Galactic\n\nFixed\n-----\n\n- Several fixes (#194)\n- Fix\n- Minor broken build\n- Minor linking errors foxy\n- Minor format\n- Minor linking errors foxy\n- Foxy backport (#206)\n``` \n\n*pabloinigoblasco*\n\n```rst\nSection_13\n==========\n\nAdded\n-----\n- Enable build of missing rolling repositories.\n- Enable Navigation2 for semi-binary build.\n- Added README tutorial for Dockerfile.\n- Added smacc2_performance_tools.\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success.\n- Added new client behavior add for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive. You optionally can select the nodes to wait.\n\nChanged\n-------\n- Changed wording \"smacc application\" to \"SMACC2 library\".\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed tracing events.\n- Renamed folders.\n- Renamed event generator library.\n\nFixed\n----\n- Bug in smacc2 component.\n- Do not execute clang-format on smacc2_sm_reference_library package.\n- Correct trailing spaces.\n- Optimized dependencies in move_base_z_planners_common.\n- Cleaned up sm_atomic_24hr.\n- Reformatted sm_reference_library.\n- Minor formatting improvements.\n- Corrected all linters and formatters.\n\nRemoved\n-------\n- Removed galactic builds from master and kept only rolling. Removed submodules and used .repos file.\n- Deleted tracing.md.\n\nOther\n-----\n- Reactivated smacc2 nav clients for rolling via submodules.\n- Reverted markdowns to html.\n- Edited tracing.md to reflect new tracing event names.\n- Edited README.md.\n- More on performance and other issues.\n- More changes on performance tests.\n- More on navigation.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- More on navigation.\n- Several core improvements during navigation testing.\n- Formatting improvements.\n- Attempting precommit fixes.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n- Progress in aws navigation.\n- Minor progress.\n- Progressing in aws navigation.\n- Minor progress.\n- Progress in aws navigation demo.\n- More on navigation.\n\nCommits\n-------\n- Update smacc2_ci/docker/ros_rollingAndGalactic_ubuntu_20.04/buildGalactic.sh (Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>).\n- Update tracing/ManualTracing.md (Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>).\n- Update smacc_sm_reference_library/sm_atomic/README.md (Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>).\n- Add galactic CI setup and rename rolling files. (#58).\n- Fix source CI and correct README overview. (#62).\n- Update c_cpp_properties.json.\n- Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Update doxygen links (#70) (Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>).\n- More Readme Updates (#72) (Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>).\n- More Readme (#74) (Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>).\n- Created new sm from sm_respira_1 (#76).\n- Feature/core and navigation fixes (#78).\n- Feature/aws demo progress (#80).\n- Wait topic message client behavior (#81).\n- Feature/wait nav2 nodes client behavior (#82).\n- Feature/aws demo progress (#92).\n- Brettpac branch (#87).\n```\n*pabloinigoblasco*\n\n```rst\nSection_14\n==========\n\nAdded\n-----\n- Introducing new feature: `cb_wait_topic_message`, an asynchronous client behavior that waits for a topic message and optionally verifies its contents for success.\n- Added new client behavior for `nav2`, `add` for waiting for nav2 nodes subscribing to the `/bond` topic and ensuring they are alive. Optional selection of nodes to wait for.\n- Progress in AWS navigation demo.\n\nChanged\n-------\n- Minor formatting improvements.\n\nFixed\n-----\n- Navigation parameters fixes on `sm_dance_bot`.\n- Removed some compile warnings.\n\nRemoved\n-------\n- Removed `neo_simulation2` package.\n\nOther\n-----\n- Base for the `sm_aws_warehouse` navigation.\n- Several core improvements during navigation testing.\n- Merge and progress.\n- `cb_pause_slam` client behavior.\n- `sm_dance_bot_lite`.\n- Updates YAML.\n- `sm_dance_bot` visualizing `turtlebot3`.\n- Feature to launch `gz_lidar` choice for `dance_bot`.\n- Cleaning and lidar show/hide option.\n- More fixes.\n- Gazebo fixes to show the robot and the lidar.\n- Gazebo fixes for `sm_dance_bot_strikes_back`.\n- Precommit cleanup run.\n- AWS demo.\n- Got `sm_multi_stage_1` working (barely).\n- Brettpac branch.\n- Gaining traction in `sm_multi_stage_1`.\n- Keep hammering.\n- Two stages.\n- 3 part.\n- 4th stage.\n- 5th stage.\n- A3.\n- MM.\n- Diverse improvements in navigation and performance.\n``` \n\n*pabloinigoblasco*\n\nSection_15\n===========\n\nAdded\n-----\n\n- Feature/diverse improvements in navigation performance (#117)\n- Feature/slam toggle and smacc deep history (#122): Progress in navigation, slam toggle client behaviors, and slam_toolbox components. Introducing smacc2::deep_history syntax and testing sm_dance_bot with slam pausing/resuming functionality.\n- Feature/dance bot s pattern (#128): Polishing sm_dance_bot and s-pattern, fixing a typo.\n- First working version of sm template and template generator (#127).\n- Added SM Atomic SM generator (#143).\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140).\n- Added remaining SVGs to READMEs (#145).\n- Rolling Docker environment to be executed from any environment (#154).\n- Initial state machine transition timestamp (#165).\n- Added QOS durability to SmaccPublisherClient (#163).\n- Feature/migration moveit client (#151): Initial migration to smacc2, fixing formatting errors, adding missing dependencies, and progressing in moveit migration testing.\n- Feature/aws navigation sm dance bot (#174): Progress on aws navigation, husky simulation dependencies, and updates for husky in rolling and galactic environments.\n\nChanged\n-------\n\n- Move method after the method it calls to prevent recursion (#126).\n- Moved reference library SMs to smacc2_performance_tools (#166).\n- Minor navigation improvements (#141).\n- Using local action msgs instead of sm_dance_bot_msgs (#139).\n- Removed node creation and created only a logger (#149).\n- Fix CI: format fix python version (#148).\n- Fixing some errors in moveit behaviors testing, linting warnings, and build errors.\n- Update package list (#142).\n- Removed parameters smacc (#147).\n- Updated READMEs (#164).\n- Added .reps dependencies and fixed build errors in move_it PR.\n- Improved Dockerfile for building local tests.\n- Minor changes in formatting and progress on moveit.\n- Warehouse2 progress (#179).\n- Waypoint Inputs (#178).\n\nFixed\n-----\n\n- Minor tuning to mitigate overshot issue cases in waypoints navigator bug (#133).\n- Fixed launch command in README.md for sm_dance_bot_strikes_back and removed outdated comments.\n- Fixed compiling issues.\n- Fixed broken master build.\n- Fixed pipeline error.\n\nRemoved\n-------\n\n- Removed merge markers from a python file (#119).\n- Removed sm_dance_bot_msgs dependencies.\n- Removed test from main moveit cmake.\n- Removed test from main moveit cmake.\n\nCo-authored-by: pabloinigoblasco <pablo@ibrobotics.com>\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Denis Štogl <denis@stogl.de>\n\n```rst\nSection_16\n==========\n\nAdded\n-----\n- Brettpac branch (#184)\n- Redoing sm_dance_bot_warehouse_3 waypoints\n- More Waypoints\n- SrConditional fixes and formatting (#168)\n- Feature/wharehouse2 dec 14 (#185)\n- Feature/sm warehouse 2 13 dec 2 (#186)\n- finetuning waypoints (#187)\n- Feature/cb pure spinning (#188, #189)\n- pure spinning behavior missing files\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- several fixes (#194)\n- Feature/undo motion 20 12 (#196, #198)\n- tuning warehouse3 (#197)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- finishing warehouse2\n- Feature/warehouse2 23 12 (#201)\n- tuning and fixes (#202)\n- Feature/minor tune (#203)\n- fixing warehouse 3 problems, and other core improvements (#204)\n- added missing file from warehouse2 (#205)\n- docker build files for all versions (#225)\n- Feature/retry behavior warehouse 1 (#226)\n- Foxy backport (#206)\n- Fix code generators (#221)\n- Fix other build issues\n- Update SM template and make example code clearly visible\n- Remove use of node in the sm performance template\n- Updated templated to use Blackboard storage\n- Update template to resolve the global data correctly\n- Update sm_name.hpp\n- Fix trailing spaces\n- Correct codespell\n- Correct python linters warnings\n- Add galactic CI build because Navigation2 is broken in rolling\n- Add partial changes for ament_cpplint\n- Add tf2_ros as dependency to find include\n- Disable ament_cpplint\n- Disable some packages and update workflows\n- Bump ccache version\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences\n- Disable cpplint and cppcheck linters\n- Correct formatters\n- branching example\n- Disable disabled packages\n- Update ci-build-source.yml\n- Change extension of imports\n- Enable cppcheck\n- Correct formatting of python file\n- Included necessary package and edited Threesome launch\n- ros2 launch sm_three_some sm_three_some\n- First ensure you have the necessary package installed\n- Rename header files and correct format\n- Add workflow for checking doc build\n- Update doxygen-check-build.yml\n- Create doxygen-deploy.yml\n- Use manual deployment for now\n- Create workflow for testing prerelease builds\n- Use docs/ as source folder for documentation\n- Use docs/ as output directory\n- Rename to smacc2 and smacc2_msgs\n- Correct GitHub branch reference\n- Update name of package and package.xml to pass liter\n- Execute on master update\n- Reset all versions to 0.0.0\n- Ignore all packages except smacc2 and smacc2_msgs\n- Update changelogs\n- 0.1.0\n\nChanged\n-------\n- ros2 launch sm_three_some sm_three_some to ros2 launch sm_three_some sm_three_some.launch\n```\n\n```rst\nSection_17\n==========\n\nAdded\n-----\n- Added Dockerfile with ROS distro as argument for easy setup.\n- Added setupTracing.sh script for automated installation of necessary packages and configuration of tracing group.\n- Added alternative ManualTracing method.\n- Added new SM markdowns.\n- Added README tutorial for Dockerfile.\n- Added smacc2_performance_tools for performance testing improvements.\n- Added new feature cb_wait_topic_message for asynchronous client behavior.\n\nChanged\n-------\n- Updated wording from \"smacc application\" to \"SMACC2 library\" for clarity.\n- Updated references of SMACC/ROS to SMACC2/ROS2 for consistency.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n- Renamed event generator library for better organization.\n- Optimized dependencies in move_base_z_planners_common.\n- Cleaned up sm_reference_library formatting.\n- Corrected trailing spaces in code.\n- Reformatted sm_atomic_24hr for better readability.\n- Updated smacc2_rta command across READMEs.\n- Renamed folders, deleted tracing.md, and edited README.md for clarity.\n\nFixed\n-----\n- Fixed bug in smacc2 component.\n- Fixed issue with smacc2_sm_reference_library package formatting.\n- Fixed source CI setup and corrected README overview.\n\nRemoved\n-------\n- Removed manual installation of ros-rolling-ros2trace, now automated in setupTracing.sh.\n\nCollaborators\n-------------\n- Co-authored by Denis Štogl <destogl@users.noreply.github.com>.\n- Co-authored by Ubuntu 20-04-02-amd64 <brett@robosoft.ai>.\n```\n\n```rst\nSection_18\n==========\n\nAdded\n-----\n- New feature: `cb_wait_topic_message`: asynchronous client behavior that waits for a topic message and optionally checks its contents for success\n- New client behavior for nav2: `add` behavior waits for nav2 nodes subscribing to the `/bond` topic and ensures they are alive; optional node selection\n- `cb_pause_slam` client behavior\n\nChanged\n-------\n- Corrected all linters and formatters\n- Navigation parameters fixes on `sm_dance_bot`\n- Minor formatting improvements\n- Progress in AWS navigation demo\n- Formatting improvements in AWS navigation demo\n- Gazebo fixes for showing the robot and lidar in `sm_dance_bot` and `sm_dance_bot_strikes_back`\n\nFixed\n----\n- Removed some compile warnings\n\nRemoved\n-------\n- Redundant entries for `cb_wait_topic_message` and client behavior addition for nav2\n\nCollaborators\n-------------\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n\nCommits\n-------\n- Feature/aws demo progress (#92)\n- Feature/sm dance bot fixes (#93)\n- Feature/sm aws warehouse (#94)\n- Feature/sm dance bot fixes (#95)\n- Remove some compile warnings. (#96)\n- Feature/cb pause slam (#98)\n- Rename doxygen deployment workflow (#100)\n- sm_dance_bot visualizing turtlebot3 (#101)\n- Feature/dance bot launch gz lidar choice (#102)\n- Feature/sm dance bot lite gazebo fixes (#104)\n- sm_multi_stage_1 doubling (#103)\n- Feature/sm dance bot strikes back gazebo fixes (#105)\n- Precommit cleanup run (#106)\n- aws demo (#108)\n- Brettpac branch (#110)\n- Brettpac branch (#111)\n```\n\nSection 19\n-----------\n\nAdded\n-----\n\n- Added multistage modes to sm_multi_stage_1 (#172)\n- Added sequences and steps to sm_multi_stage_1 reworking (#172)\n- Added finishing touches and readme to sm_multi_stage_1 reworking (#172)\n- Added AWS navigation to sm_dance_bot (#174)\n- Added dependencies for husky simulation in sm_dance_bot (#174)\n- Added QOS durability to SmaccPublisherClient (#163)\n\nChanged\n-------\n\n- Changed method order to prevent recursion in sm_dance_bot (#125)\n- Changed launch command in README.md for sm_dance_bot_strikes_back (#147)\n- Changed references library SMs to smacc2_performance_tools (#166)\n- Changed node creation to logger in SM Atomic SM generator (#149)\n- Changed format in CI for Python version (#148)\n- Changed Docker environment to be executed from any environment (#154)\n- Changed moveit client to smacc2 (#151)\n\nFixed\n----\n\n- Fixed source build on PR for testing (#113)\n- Fixed formatting in neo_simulation2 package removal (#112)\n- Fixed compile warnings (#137)\n- Fixed minor navigation issues (#141)\n- Fixed launch command in README.md (#147)\n- Fixed CI format for Python version (#148)\n- Fixed missing dependency in moveit migration (#151)\n- Fixed compiling issues in Dockerfile (#164)\n- Fixed broken master build (#167)\n\nRemoved\n-------\n\n- Removed neo_simulation2 package (#112)\n- Removed merge markers from a Python file (#119)\n- Removed parameters in smacc (#147)\n- Removed test from main moveit CMake (#151)\n- Removed test from main moveit CMake (#151)\n- Removed sm_dance_bot_msgs package (#144)\n\nAuthors\n-------\n\n- Pablo Iñigo Blasco\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: pabloinigoblasco <pablo@ibrobotics.com>\n- Co-authored-by: DecDury <declandury@gmail.com>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com)\n\n```rst\nSection_20\n==========\n\nAdded\n-----\n\n- Update dependencies for husky in rolling and galactic.\n- Progress on AWS navigation and refactorings on navigation clients and behaviors.\n- More on AWS demo.\n- Warehouse2 progress.\n- Waypoint Inputs.\n- Warehouse2 progress.\n- Format.\n- Sm_dance_bot_warehouse_3.\n- Feature/sm warehouse 2 13 dec 2.\n- More changes and headless.\n- Merge.\n- Headless and other fixes.\n- Default values.\n- Brettpac branch.\n- Redoing sm_dance_bot_warehouse_3 waypoints.\n- More Waypoints.\n- SrConditional fixes and formatting.\n- Move trigger logic into headers.\n- Lint.\n- Feature/wharehouse2 dec 14.\n- Feature/sm warehouse 2 13 dec 2.\n- More changes and headless.\n- Merge.\n- Headless and other fixes.\n- Default values.\n- Pure spinning behavior missing files.\n- Feature/planner changes 16 12.\n- More fixes.\n- Feature/replanning 16 dec.\n- Replanning for all examples.\n- Several fixes.\n- Improving undo motion navigation warehouse2.\n- Tuning warehouse3.\n- Undo tuning and errors.\n- Feature/sync 21 12.\n- Format issues.\n- Feature/warehouse2 22 12.\n- Finishing warehouse2.\n- Feature/warehouse2 23 12.\n- Tuning and fixes.\n- Feature/minor tune.\n- Fixing warehouse 3 problems and core improvements.\n- Added missing file from warehouse2.\n- Updating subscriber publisher components.\n- Progress in autoware machine.\n- Refining cp subscriber cp publisher.\n- Improvements in smacc core.\n- Autoware demo.\n- Fixing docker for foxy and galactic.\n- Update file for fake hardware simulation and add file for gazebo simulation.\n- Retry behavior warehouse 1.\n- Multiple controllable leds plugin.\n- Progress in husky demo.\n- Add ignition file and update repos files.\n- Improving navigation behaviors.\n- Add galactic CI build because Navigation2 is broken in rolling.\n- Add partial changes for ament_cpplint.\n- Add tf2_ros as dependency to find include.\n\nChanged\n-------\n\n- Fix formatting.\n- Minor changes.\n- Format.\n- Minor tune.\n- Minor format fix.\n- Fix trailing spaces.\n- Correct codespell.\n- Correct python linters warnings.\n\nFixed\n-----\n\n- Fixing broken build.\n- Fixing broken source build.\n- Fix broken source build.\n- Fixing format and minor.\n- Foxy backport.\n- Minor formatting fixes.\n\nRemoved\n-------\n\n- Only rolling version should be pre-released on master.\n```\n\n```rst\nSection_21\n==========\n\nAdded\n-----\n- First ensure you have the necessary package installed:\n  ```\n  sudo apt-get install ros-rolling-ros2trace\n  ```\n- Add workflow for checking doc build.\n- Create doxygen-deploy.yml.\n- Create workflow for testing prerelease builds.\n- Use docs/ as source folder and output directory.\n- Added setupTracing.sh:\n  Installs necessary packages and configures tracing group.\n- Added README tutorial for Dockerfile.\n- Added smacc2_performance_tools.\n- Performance tests improvements.\n- Enable Navigation2 for semi-binary build.\n- Enable build of missing rolling repositories.\n- Enable cppcheck.\n- Enable clang-format.\n- Optimized deps in move_base_z_planners_common.\n- Renaming of event generator library.\n- Add galactic CI setup and rename rolling files.\n- Fix source CI and correct README overview.\n- Update c_cpp_properties.json.\n\nChanged\n-------\n- Rename header files and correct format.\n- Change extension of imports.\n- Update name of package and package.xml to pass liter.\n- Update smacc2_rta command across readmes.\n- Clean up of sm_atomic_24hr.\n- Correct trailing spaces.\n- Update description table.\n- Update table.\n- Update changelogs.\n- Update ci-build-source.yml.\n- Update doxygen-check-build.yml.\n- Update smacc2_ci/docker/ros_rollingAndGalactic_ubuntu_20.04/buildGalactic.sh.\n- Update tracing/ManualTracing.md.\n- Update smacc_sm_reference_library/sm_atomic/README.md.\n- Update sm_three_some to launch sm_three_some.launch.\n- Update smacc2 and smacc2_msgs.\n- Update GitHub branch reference.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links.\n- Update doxygen links\n\n```rst\nSection_22\n==========\n\nAdded\n-----\n- New feature: cb_wait_topic_message, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for nav2: wait nav2 nodes subscribing to the /bond topic and waiting for them to be alive, with optional node selection.\n- New feature: cb pause slam client behavior.\n- New feature: sm_dance_bot_lite.\n\nChanged\n-------\n- Updated launch command.\n- Corrected all linters and formatters.\n- Navigation parameters fixes on sm_dance_bot.\n- Minor hotfixes.\n\nFixed\n----\n- Fixed precommit issues.\n- Removed some compile warnings.\n\nAuthors\n-------\n- Pablo Iñigo Blasco\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n```\n\nSection_23\n==========\n\nAdded\n-----\n- Added `sm_dance_bot` visualizing `turtlebot3`.\n- Added lidar show/hide option for cleaning.\n- Added formatting improvements.\n- Added gazebo fixes for `sm_dance_bot_lite` (#104).\n- Added gazebo fixes to display the robot and lidar.\n- Added `sm_multi_stage_1` doubling (#103).\n- Added gazebo fixes for `sm_dance_bot_strikes_back`.\n- Added AWS demo (#108).\n- Added progress in `sm_multi_stage_1` (#114).\n- Added diverse improvements in navigation and performance (#116).\n- Added `slam_toolbox` components and `smacc2::deep_history` syntax (#122).\n- Added progress in testing `sm_dance_bot` with slam pausing/resuming functionality.\n- Added `dance bot s pattern` feature (#128).\n- Added first working version of `sm template` and template generator (#127).\n- Added `waypoints navigator` bug fix (#133).\n- Added `SM core` test (#138).\n- Added minor navigation improvements (#141).\n- Added `navigation 2` stack renaming.\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140).\n- Added remaining SVGs to READMEs (#145).\n- Added rolling Docker environment to be executed from any environment (#154).\n- Added slight waypoint 4 and iterations changes for robot course completion (#155).\n- Added initial migration to `smacc2` in `moveit` client (#151).\n- Added missing dependencies and fixed linting warnings.\n- Added `repos` dependency and fixed build errors.\n- Added dependency to `ur5` client.\n- Added progress on `move_it` PR.\n- Added improvements in Dockerfile for building local tests.\n- Added updates to README (#164).\n\nChanged\n-------\n- Changed \"Finnaly\" to \"Finally\" for correction.\n\nFixed\n-----\n- Fixed format issues (#134).\n- Fixed compilation warnings (#137).\n- Fixed CI format for Python version (#148).\n- Fixed launch command in README.md for `sm_dance_bot_strikes_back`.\n\nRemoved\n-------\n- Removed `neo_simulation2` package.\n- Removed `sm_dance_bot_msgs` package.\n- Removed parameters in `smacc` package.\n\nCollaborators\n-------------\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>.\n- Co-authored-by: pabloinigoblasco <pablo@ibrobotics.com>.\n- Co-authored-by: DecDury <declandury@gmail.com>.\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>.\n\nAuthor\n------\nPablo Iñigo Blasco (pabloinigoblasco)\n\n```rst\nSection_24\n==========\n\nAdded\n-----\n- Initial state machine transition timestamp (#165)\n- Added QOS durability to SmaccPublisherClient (#163)\n- Added reliability QOS config\n- Added feature for testing moveit behaviors (#167)\n- Added feature for AWS navigation sm dance bot (#174)\n- Added dependencies for husky simulation\n- Added Waypoint Inputs (#178)\n- Added finetuning waypoints (#187)\n- Added pure spinning behavior missing files\n- Added several fixes (#194)\n- Added undo motion navigation warehouse2\n- Added tuning warehouse3 (#197)\n- Added fixing warehouse 3 problems and other core improvements (#204)\n- Added backport to foxy\n- Added missing file from warehouse2 (#205)\n- Added progress in autoware machine\n- Added improvements in smacc core for autoware demo\n- Added docker files for different revisions\n- Added barrel demo\n- Added progress in barrel husky\n\nChanged\n-------\n- Moved reference library SMs to smacc2_performance_tools\n- Pre-commit cleanup\n- Refactored to remove line\n- Minor configuration\n- Refactored SrConditional fixes and formatting (#168)\n- Refactored move trigger logic into headers\n- Refactored lint\n- Refactored default values\n- Refactored formatting\n- Refactored more changes and headless\n- Refactored merge\n- Refactored headless and other fixes\n- Refactored minor changes\n- Refactored replanning for all examples\n- Refactored tuning and fixes\n- Refactored minor tune\n- Refactored fixing warehouse 3 problems and other core improvements to remove dead lock\n- Refactored weird moveit not downloaded repo\n- Refactored fixing docker for foxy and galactic\n- Refactored fixing startup problems in warehouse 3\n- Refactored fixing format\n\nFixed\n-----\n- Fixed missing colon\n- Fixed pipeline error\n- Fixed broken master build\n- Fixed pipeline error\n- Fixed broken build\n- Fixed format issues\n- Fixed minor linking errors for foxy\n- Fixed broken build\n- Fixed some reordering fixes\n- Fixed minor broken build\n- Fixed warnings removal\n- Fixed broken build\n\nRemoved\n-------\n- Removed line\n\nCo-authored-by\n--------------\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Denis Štogl <denis@stogl.de>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Declan Dury <44791484+DecDury@users.noreply.github.com>\n- DecDury <declandury@gmail.com>\n- reelrbtx <brett2@reelrobotics.com>\n- brettpac <brett@robosoft.ai>\n- David Revay <MrBlenny@users.noreply.github.com>\n```\n\n```rst\nSection_25\n==========\n\nAdded\n-----\n- Docker improvements.\n- Runtime dependency.\n- Restoring UR dependency.\n\nChanged\n-------\n- Master rolling to galactic backport.\n- Updating galactic repositories.\n\nFixed\n-----\n- Fixing build.\n\nOther\n-----\n- More merge.\n- Testing dance bot demos.\n\nContributors\n------------\n- Denis Štogl\n- Pablo Iñigo Blasco\n- pabloinigoblasco\n\nCo-authored-by\n--------------\n- reelrbtx <brett2@reelrobotics.com>\n- brettpac <brett@robosoft.ai>\n- David Revay <MrBlenny@users.noreply.github.com>\n- pabloinigoblasco <pabloinigoblasco@ibrobotics.com>\n- DecDury <declandury@gmail.com>\n- Denis Štogl <denis@stogl.de>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Declan Dury <44791484+DecDury@users.noreply.github.com>\n```\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/pure_spinning_local_planner/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(pure_spinning_local_planner)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\n\nfind_package(nav2_core)\nfind_package(nav_msgs)\nfind_package(nav2_costmap_2d)\nfind_package(geometry_msgs)\nfind_package(tf2)\nfind_package(tf2_geometry_msgs)\nfind_package(tf2_ros)\nfind_package(nav2z_planners_common)\nfind_package(pluginlib)\nfind_package(nav_2d_utils)\n\nset(dependencies\n  nav2_core\n  nav_msgs\n  nav2_costmap_2d\n  geometry_msgs\n  tf2\n  nav2z_planners_common\n  pluginlib\n  nav_2d_utils\n)\n\ninclude_directories(include)\n\nadd_library(${PROJECT_NAME} SHARED\n  src/${PROJECT_NAME}/pure_spinning_local_planner.cpp\n)\n\n# prevent pluginlib from using boost\ntarget_compile_definitions(${PROJECT_NAME} PUBLIC \"PLUGINLIB__DISABLE_BOOST_FUNCTIONS\")\npluginlib_export_plugin_description_file(nav2_core pslp_plugin.xml)\nament_target_dependencies(${PROJECT_NAME} ${dependencies})\n\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\nament_export_dependencies(${dependencies})\n\ninstall(TARGETS ${PROJECT_NAME}\n  ARCHIVE DESTINATION lib\n  LIBRARY DESTINATION lib\n  RUNTIME DESTINATION bin\n)\n\ninstall(DIRECTORY include/\n  DESTINATION include/\n)\n\ninstall(FILES\n  pslp_plugin.xml\n  DESTINATION share\n)\n\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/pure_spinning_local_planner/include/pure_spinning_local_planner/pure_spinning_local_planner.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n//#include <dynamic_reconfigure/server.h>\n//#include <pure_spinning_local_planner/PureSpinningLocalPlannerConfig.h>\n#include <tf2/transform_datatypes.h>\n#include <tf2_ros/buffer.h>\n\n#include <Eigen/Eigen>\n#include <geometry_msgs/msg/pose_stamped.hpp>\n#include <geometry_msgs/msg/quaternion.hpp>\n#include <nav2_core/controller.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n#include <visualization_msgs/msg/marker_array.hpp>\n\ntypedef double meter;\ntypedef double rad;\ntypedef double rad_s;\n\nnamespace cl_nav2z\n{\nnamespace pure_spinning_local_planner\n{\nclass PureSpinningLocalPlanner : public nav2_core::Controller\n{\npublic:\n  PureSpinningLocalPlanner();\n\n  virtual ~PureSpinningLocalPlanner();\n\n  void configure(\n    const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name,\n    const std::shared_ptr<tf2_ros::Buffer> tf,\n    const std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros) override;\n\n  void activate() override;\n  void deactivate() override;\n  void cleanup() override;\n\n  /**\n   * @brief nav2_core setPlan - Sets the global plan\n   * @param path The global plan\n   */\n  void setPlan(const nav_msgs::msg::Path & path) override;\n\n  /**\n   * @brief nav2_core computeVelocityCommands - calculates the best command given the current pose and velocity\n   *\n   * It is presumed that the global plan is already set.\n   *\n   * This is mostly a wrapper for the protected computeVelocityCommands\n   * function which has additional debugging info.\n   *\n   * @param pose Current robot pose\n   * @param velocity Current robot velocity\n   * @return The best command for the robot to drive\n   */\n  virtual geometry_msgs::msg::TwistStamped computeVelocityCommands(\n    const geometry_msgs::msg::PoseStamped & pose, const geometry_msgs::msg::Twist & velocity,\n    nav2_core::GoalChecker * goal_checker) override;\n\n  /*deprecated in navigation2*/\n  bool isGoalReached();\n\n  virtual void setSpeedLimit(const double & speed_limit, const bool & percentage) override;\n\nprivate:\n  void updateParameters();\n  nav2_util::LifecycleNode::SharedPtr nh_;\n  std::string name_;\n  void publishGoalMarker(double x, double y, double phi);\n\n  std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmapRos_;\n\n  std::shared_ptr<rclcpp_lifecycle::LifecyclePublisher<visualization_msgs::msg::MarkerArray>>\n    goalMarkerPublisher_;\n\n  std::vector<geometry_msgs::msg::PoseStamped> plan_;\n\n  std::shared_ptr<tf2_ros::Buffer> tf_;\n\n  double k_betta_;\n  bool goalReached_;\n  int currentPoseIndex_;\n  rad yaw_goal_tolerance_;\n  rad intermediate_goal_yaw_tolerance_;\n  rad_s max_angular_z_speed_;\n  double transform_tolerance_;\n  bool use_shortest_angular_distance_;\n};\n}  // namespace pure_spinning_local_planner\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/pure_spinning_local_planner/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>pure_spinning_local_planner</name>\n  <version>2.3.19</version>\n  <description>The pure_spinning_local_planner package</description>\n\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Iñigo Blasco</maintainer>\n\n  <license>Apache-2.0</license>\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <build_depend>pluginlib</build_depend>\n\n  <depend>geometry_msgs</depend>\n  <depend>nav2z_planners_common</depend>\n  <depend>nav_2d_utils</depend>\n  <depend>nav_msgs</depend>\n  <depend>nav2_core</depend>\n  <depend>nav2_costmap_2d</depend>\n  <depend>tf2</depend>\n  <depend>tf2_geometry_msgs</depend>\n  <depend>tf2_ros</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/pure_spinning_local_planner/pslp_plugin.xml",
    "content": "<library path=\"pure_spinning_local_planner\">\n  <class name=\"pure_spinning_local_planner::PureSpinningLocalPlanner\" type=\"cl_nav2z::pure_spinning_local_planner::PureSpinningLocalPlanner\" base_class_type=\"nav2_core::Controller\">\n    <description>\n    </description>\n  </class>\n</library>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/pure_spinning_local_planner/src/pure_spinning_local_planner/pure_spinning_local_planner.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <angles/angles.h>\n#include <nav2z_planners_common/common.hpp>\n#include <pure_spinning_local_planner/pure_spinning_local_planner.hpp>\n\n#include <nav_2d_utils/tf_help.hpp>\n#include <pluginlib/class_list_macros.hpp>\n\nnamespace cl_nav2z\n{\nnamespace pure_spinning_local_planner\n{\ntemplate <typename T>\nvoid tryGetOrSet(rclcpp_lifecycle::LifecycleNode::SharedPtr & node, std::string param, T & value)\n{\n  if (!node->get_parameter(param, value))\n  {\n    node->set_parameter(rclcpp::Parameter(param, value));\n  }\n}\n\nPureSpinningLocalPlanner::PureSpinningLocalPlanner() {}\n\nPureSpinningLocalPlanner::~PureSpinningLocalPlanner() {}\n\nvoid PureSpinningLocalPlanner::activate()\n{\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"activating controller PureSpinningLocalPlanner\");\n  this->updateParameters();\n}\n\nvoid PureSpinningLocalPlanner::deactivate() {}\n\nvoid PureSpinningLocalPlanner::cleanup()\n{\n  this->plan_.clear();\n  this->currentPoseIndex_ = 0;\n  yaw_goal_tolerance_ = -1.0;\n}\n\nvoid PureSpinningLocalPlanner::configure(\n  const rclcpp_lifecycle::LifecycleNode::WeakPtr & node, std::string name,\n  const std::shared_ptr<tf2_ros::Buffer> tf,\n  const std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros)\n{\n  costmapRos_ = costmap_ros;\n  name_ = name;\n  nh_ = node.lock();\n  k_betta_ = 1.0;\n  intermediate_goal_yaw_tolerance_ = 0.12;\n  max_angular_z_speed_ = 1.0;\n  yaw_goal_tolerance_ = -1.0;\n  transform_tolerance_ = 0.1;\n  tf_ = tf;\n\n  declareOrSet(nh_, name_ + \".k_betta\", k_betta_);\n  declareOrSet(nh_, name_ + \".intermediate_goals_yaw_tolerance\", intermediate_goal_yaw_tolerance_);\n  declareOrSet(nh_, name_ + \".max_angular_z_speed\", max_angular_z_speed_);\n  declareOrSet(nh_, name_ + \".transform_tolerance\", transform_tolerance_);\n  declareOrSet(nh_, name_ + \".use_shortest_angular_distance\", use_shortest_angular_distance_);\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[PureSpinningLocalPlanner] pure spinning planner already created\");\n}\n\nvoid PureSpinningLocalPlanner::updateParameters()\n{\n  tryGetOrSet(nh_, name_ + \".k_betta\", k_betta_);\n  tryGetOrSet(nh_, name_ + \".intermediate_goals_yaw_tolerance\", intermediate_goal_yaw_tolerance_);\n  tryGetOrSet(nh_, name_ + \".max_angular_z_speed\", max_angular_z_speed_);\n  tryGetOrSet(nh_, name_ + \".transform_tolerance\", transform_tolerance_);\n  tryGetOrSet(nh_, name_ + \".use_shortest_angular_distance\", use_shortest_angular_distance_);\n}\n\ngeometry_msgs::msg::TwistStamped PureSpinningLocalPlanner::computeVelocityCommands(\n  const geometry_msgs::msg::PoseStamped & pose, const geometry_msgs::msg::Twist & /*velocity*/,\n  nav2_core::GoalChecker * goal_checker)\n{\n  this->updateParameters();\n  if (yaw_goal_tolerance_ == -1)\n  {\n    geometry_msgs::msg::Pose posetol;\n    geometry_msgs::msg::Twist twistol;\n    if (goal_checker->getTolerances(posetol, twistol))\n    {\n      yaw_goal_tolerance_ = tf2::getYaw(posetol.orientation);\n      //yaw_goal_tolerance_ = tf2::getYaw(posetol.orientation) * 0.35; // WORKAROUND GOAL CHECKER DIFFERENCE NAV CONTROLLER\n      RCLCPP_INFO_STREAM(\n        nh_->get_logger(),\n        \"[PureSpinningLocalPlanner] yaw_goal_tolerance_: \" << yaw_goal_tolerance_);\n    }\n    else\n    {\n      RCLCPP_INFO_STREAM(\n        nh_->get_logger(), \"[PureSpinningLocalPlanner] could not get tolerances from goal checker\");\n    }\n  }\n\n  geometry_msgs::msg::TwistStamped cmd_vel;\n\n  goalReached_ = false;\n  // RCLCPP_DEBUG(nh_->get_logger(), \"LOCAL PLANNER LOOP\");\n\n  geometry_msgs::msg::PoseStamped currentPose = pose;\n\n  tf2::Quaternion q;\n  tf2::fromMsg(currentPose.pose.orientation, q);\n  auto currentYaw = tf2::getYaw(currentPose.pose.orientation);\n  double angular_error = 0;\n  double targetYaw;\n\n  do\n  {\n    auto & goal = plan_[currentPoseIndex_];\n    targetYaw = tf2::getYaw(goal.pose.orientation);\n\n    if (use_shortest_angular_distance_)\n      angular_error = angles::shortest_angular_distance(currentYaw, targetYaw);\n    else\n      angular_error = targetYaw - currentYaw;\n\n    // if it is in the following way, sometimes the direction is incorrect\n    //angular_error = targetYaw - currentYaw;\n\n    // all the points must be reached using the control rule, but the last one\n    // have an special condition\n    if ((currentPoseIndex_ < (int)plan_.size() - 1 &&\n         fabs(angular_error) < this->intermediate_goal_yaw_tolerance_))\n    {\n      currentPoseIndex_++;\n    }\n    else\n    {\n      break;\n    }\n  } while (currentPoseIndex_ < (int)plan_.size());\n\n  auto omega = angular_error * k_betta_;\n  cmd_vel.twist.angular.z =\n    std::min(std::max(omega, -fabs(max_angular_z_speed_)), fabs(max_angular_z_speed_));\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(),\n    \"[PureSpinningLocalPlanner] pose index: \" << currentPoseIndex_ << \"/\" << plan_.size());\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[PureSpinningLocalPlanner] k_betta_: \" << k_betta_);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[PureSpinningLocalPlanner] angular error: \" << angular_error << \"(tol \"\n                                                                    << yaw_goal_tolerance_ << \")\");\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(),\n    \"[PureSpinningLocalPlanner] command angular speed: \" << cmd_vel.twist.angular.z);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(),\n    \"[PureSpinningLocalPlanner] completion \" << currentPoseIndex_ << \"/\" << plan_.size());\n\n  if (currentPoseIndex_ >= (int)plan_.size() - 1 && fabs(angular_error) < yaw_goal_tolerance_)\n  {\n    RCLCPP_INFO_STREAM(\n      nh_->get_logger(), \"[PureSpinningLocalPlanner] GOAL REACHED. Sending stop command.\");\n    goalReached_ = true;\n    cmd_vel.twist.linear.x = 0;\n    cmd_vel.twist.angular.z = 0;\n  }\n\n  return cmd_vel;\n}\n\nvoid PureSpinningLocalPlanner::setSpeedLimit(\n  const double & /*speed_limit*/, const bool & /*percentage*/)\n{\n  RCLCPP_WARN_STREAM(\n    nh_->get_logger(),\n    \"PureSpinningLocalPlanner::setSpeedLimit invoked. Ignored, funcionality not \"\n    \"implemented.\");\n}\n\nbool PureSpinningLocalPlanner::isGoalReached() { return goalReached_; }\n\nvoid PureSpinningLocalPlanner::setPlan(const nav_msgs::msg::Path & path)\n{\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"activating controller PureSpinningLocalPlanner\");\n\n  nav_msgs::msg::Path transformedPlan;\n\n  rclcpp::Duration ttol = rclcpp::Duration::from_seconds(transform_tolerance_);\n  // transform global plan\n  for (auto & p : path.poses)\n  {\n    geometry_msgs::msg::PoseStamped transformedPose;\n    nav_2d_utils::transformPose(tf_, costmapRos_->getGlobalFrameID(), p, transformedPose, ttol);\n    transformedPose.header.frame_id = costmapRos_->getGlobalFrameID();\n    transformedPlan.poses.push_back(transformedPose);\n  }\n\n  plan_ = transformedPlan.poses;\n\n  goalReached_ = false;\n  currentPoseIndex_ = 0;\n}\n\nvoid publishGoalMarker(double /*x*/, double /*y*/, double /*phi*/) {}\n}  // namespace pure_spinning_local_planner\n}  // namespace cl_nav2z\n\nPLUGINLIB_EXPORT_CLASS(\n  cl_nav2z::pure_spinning_local_planner::PureSpinningLocalPlanner, nav2_core::Controller)\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/undo_path_global_planner/CHANGELOG.rst",
    "content": "# Changelog for package undo_path_global_planner\n\n## 2.3.16 (2023-07-16)\n- Merged branch 'humble' from https://github.com/robosoft-ai/SMACC2 into humble\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted to fix a weird issue with ros buildfarm\n  - Further work on the buildfarm issue\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n- Contributors: brettpac, pabloinigoblasco\n\n## 2.3.6 (2023-03-12)\n\n## 1.22.1 (2022-11-09)\n- Pre-release\n- Contributors: pabloinigoblasco\n\n## 0.3.0 (2022-04-04)\n\n## 0.0.0 (2022-11-09)\n- Humble check\n- Publisher progress in migration to humble\n- Reverted \"Ignore packages which should not be released.\"\n  - This reverts commit dec14a936a877b2ef722a6a32f1bf3df09312542\n- Ignore packages which should not be released\n- Feature/master rolling to galactic backport (#236)\n  - Updated mentions of SMACC/ROS to SMACC2/ROS2\n  - Progress on navigation rolling\n  - Renamed folders, deleted tracing.md, edited README.md\n  - Added smacc2_performance_tools\n  - Performance tests improvements\n  - More on performance and other issues\n  - Format cleanup for sm_respira_1\n  - Format cleanup pre-commit for sm_respira_1\n  - Added sm_respira_test_2\n  - More changes on performance tests\n  - Do not execute clang-format on smacc2_sm_reference_library package\n  - Reformatting for sm_reference_library\n  - Corrected trailing spaces\n  - Added sm_atomic_24hr\n  - Added sm_atomic_performance_trace_1\n  - Updated smacc2_rta command across readmes\n  - Cleaned up sm_atomic_24hr\n  - More cleanup for sm_atomic_24hr\n  - Optimized dependencies in move_base_z_planners_common\n  - Renamed event generator library\n  - Minor formatting\n  - Added galactic CI setup and renamed rolling files (#58)\n  - Fixed source CI and corrected README overview (#62)\n  - Updated c_cpp_properties.json\n  - Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69)\n  - Updated doxygen links (#70)\n  - More Readme Updates (#72)\n  - More Readme (#74)\n  - Created new sm from sm_respira_1 (#76)\n  - Feature/core and navigation fixes (#78)\n  - Base for the sm_aws_aarehouse navigation\n  - Progressing in aws navigation\n  - Several core improvements during navigation testing\n  - Formatting improvements\n  - Progress in aws navigation demo\n  - Feature/aws demo progress (#80)\n  - More on navigation\n  - Reworked sm_advanced_recovery_1 (#83)\n  - Fix pre-commit for sm_advanced_recovery_1\n  - More work on sm_advanced_recovery_1 (#85)\n  - Round 4 for sm_advanced_recovery_1 (#86)\n  - Brettpac branch (#87)\n  - Added sm_atomic_performance_test_a_2\n  - Added sm_atomic_performance_test_a_1\n  - Added sm_atomic_performance_test_c_1 (#88)\n  - Modified sm_atomic_performance_test_a_2 (#89)\n  - Added sm_multi_stage_1\n  - Fixing precommit for sm_multi_stage_1\n  - More work on sm_multi_stage_1 (#91)\n  - Updated README.md\n  - Wait topic message client behavior (#81)\n  - New feature, cb_wait_topic_message: asynchronous client behavior that waits for a topic message and optionally checks its contents for success\n  - Attempting precommit fixes\n  - Feature/wait nav2 nodes client behavior (#82)\n  - New feature, cb_wait_topic_message: asynchronous client behavior that waits for a topic message and optionally checks its contents for success\n  - Adding new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic and waiting for them to be alive. You can optionally select the nodes to wait\n  - Corrected all linters and formatters\n  - Co-authored-by: Denis Štogl <denis@stogl.de>\n  - Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n  - Feature/aws demo progress (#92)\n  - Base for the sm_aws_aarehouse navigation\n\n```rst\nSection_2\n=========\n\nAdded\n-----\n\n- New feature: `cb_wait_topic_message`: asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for `nav2`: `add` for waiting for `nav2` nodes subscribing to the `/bond` topic and ensuring they are alive. Optional node selection available.\n- `cb_pause_slam` client behavior.\n- `sm_dance_bot_lite` visualizing `turtlebot3`.\n- `sm_multi_stage_1` doubling.\n- `sm_dance_bot_strikes_back` gazebo fixes.\n- AWS demo.\n\nChanged\n-------\n\n- Navigation parameters fixes on `sm_dance_bot`.\n- Minor hotfix.\n- Cleaning and lidar show/hide option for `sm_dance_bot`.\n- Gazebo fixes to show the robot and the lidar.\n- Format fixes.\n\nFixed\n-----\n\n- Remove some compile warnings.\n- Correct formatting for removing `neo_simulation2` package.\n- Enable source build on PR for testing.\n- Adjust build packages of source CI.\n\nRemoved\n-------\n\n- Removed `neo_simulation2` package.\n\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\nSection_3\n==========\n\nVersion 0.1.0 (2022-01-01)\n---------------------------\n\n### Added\n- Feature/diverse improvements navigation performance (#117)\n- Additional linting and formatting\n- Feature/slam toggle and smacc deep history (#122)\n- Progress in navigation, slam toggle client behaviors, and slam_toolbox components\n- Introducing slam pausing/resuming functionality in testing sm_dance_bot\n- Feature/dance bot s pattern (#128)\n- First working version of sm template and template generator (#127)\n- Feature/sm dance bot refine (#131)\n- Feature/sm dance bot refine 2 (#132)\n- Waypoints navigator bug (#133)\n- Minor navigation improvements (#141)\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Update package list (#142)\n- Add SM Atomic SM generator (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Feature/sm dance bot strikes back refactoring (#152)\n- Slight waypoint 4 and iterations changes so the robot can complete the course (#155)\n- Feature/migration moveit client (#151)\n- Initial migration to smacc2\n- Progressing in the moveit migration testing\n- Adding .reps dependencies and fixing build errors\n- Adding dependency to ur5 client\n- Improving dockerfile for building local tests\n- Update readme (#164)\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/testing moveit behaviors (#167)\n- More testing on moveit behaviors\n- Sm_pubsub_1 (#169)\n- Sm_pubsub_1 part 2 (#170)\n- Sm_advanced_recovery_1 renaming (#171)\n- Sm_multi_stage_1 reworking (#172)\n- Feature/aws navigation sm dance bot (#174)\n- Husky launch file in sm_dance_bot\n- Add dependencies for husky simulation\n- Update dependencies for husky in rolling and galactic\n- Waypoint Inputs (#178)\n\n### Changed\n- Move method after the method it calls to prevent recursion (#126)\n- Resolving compile warnings (#137)\n- Removing node creation and creating only a logger (#149)\n- Moved reference library SMs to smacc2_performance_tools (#166)\n\n### Fixed\n- Fix CI: format fix python version (#148)\n\n### Removed\n- Remove merge markers from a python file (#119)\n- Removing sm_dance_bot_msgs\n- Removing parameters smacc\n- Removing test from main moveit cmake\n\n### Miscellaneous\n- Minor format adjustments\n- Noticed typo correction\n- Finnaly > Finally correction\n- Precommit cleanup\n- Pending references cleanup\n- Workflow updates\n- Docker refactoring\n- Repos dependency updates\n- Minor tweaks and improvements\n- Readme updates\n- Warehouse2 (#177)\n- Minor changes (#175)\n\n```rst\nSection_4\n=========\n\nAdded\n-----\n- Implement wharehouse2 progress (#179)\n- Add feature for sm_dance_bot_warehouse_3 (#181)\n- Introduce Feature/sm warehouse 2 13 dec 2 (#182)\n- Include Brettpac branch (#184)\n- Add finetuning waypoints (#187)\n- Implement Feature/cb pure spinning (#188)\n- Introduce Feature/planner changes 16 12 (#191)\n- Add Feature/replanning 16 dec (#193)\n- Include Feature/undo motion 20 12 (#196)\n- Implement Feature/sync 21 12 (#199)\n- Introduce Feature/warehouse2 22 12 (#200)\n- Add Feature/warehouse2 23 12 (#201)\n- Include Feature/minor tune (#203)\n- Implement Feature/warehouse2 23 12 (#201)\n- Add Feature/minor tune (#203)\n- Include fixing warehouse 3 problems and other core improvements (#204)\n- Add Foxy backport (#206)\n- Include various fixes and improvements\n\nChanged\n-------\n- Update ros2 launch sm_three_some to sm_three_some.launch\n- Rename header files and correct format\n- Update doxygen-check-build.yml\n- Create doxygen-deploy.yml\n- Create workflow for testing prerelease builds\n- Update package names and references\n- Reset all versions to 0.0.0\n- Update description table\n- Update table\n- Copy initial docs\n- Update Dockerfile with ROS distro as argument\n- Open new folder for tracing contents\n- Move tracing.md to tracing directory\n- Add setupTracing.sh for automated installation\n- Update wording from \"smacc application\" to \"SMACC2 library\"\n- Edit smacc_sm_reference_library/sm_atomic/README.md\n- Reactivate smacc2 nav clients for rolling via submodules\n- Rename tracing events\n- Fix bug in smacc2 component\n- Revert markdowns to html\n- Add README tutorial for Dockerfile\n- Perform additional cleanup\n\nRemoved\n-------\n- Delete tracing directory\n- Remove manual installation of ros-rolling-ros2trace\n\nAuthors\n-------\n- Pablo Iñigo Blasco\n- Denis Štogl <destogl@users.noreply.github.com>\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\n```rst\nSection 5\n=========\n\nAdded\n-----\n- Added smacc2_performance_tools.\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success.\n- Added new client behavior add for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive. You optionally can select the nodes to wait.\n\nChanged\n-------\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed folders, deleted tracing.md, and edited README.md.\n- Renamed event generator library.\n- Optimized dependencies in move_base_z_planners_common.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n- Updated smacc2_rta command across readmes.\n- Corrected trailing spaces.\n- Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n- Corrected all linters and formatters.\n\nFixed\n-----\n- Fixed source CI and corrected README overview.\n- Fixed build of missing rolling repositories.\n- Fixed navigation2 for semi-binary build.\n- Fixed trailing spaces.\n- Fixed galactic CI setup and renamed rolling files.\n- Fixed formatting in sm_atomic_24hr.\n- Fixed formatting in sm_advanced_recovery_1.\n- Fixed formatting in sm_multi_stage_1.\n- Fixed formatting in cb_wait_topic_message.\n- Fixed pre-commit in sm_advanced_recovery_1.\n- Fixed pre-commit in sm_multi_stage_1.\n- Fixed pre-commit in attempting pre-commit fixes.\n\nRemoved\n-------\n- Removed galactic builds from master and kept only rolling. Removed submodules and used .repos file.\n- Removed execution of clang-format on smacc2_sm_reference_library package.\n\nContributors\n------------\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n```\n\n*pabloinigoblasco*\n\n```rst\nSection_6\n=========\n\nAdded\n-----\n\n- New client behavior `cb_wait_topic_message` added for nav2, allowing nodes to subscribe to the `/bond` topic and wait until they are active. Nodes to wait for can be optionally selected.\n- New client behavior `cb_pause_slam` added.\n- New client behavior `sm_dance_bot_lite` added for visualizing TurtleBot3 in Gazebo.\n- New feature `dance_bot_launch_gz_lidar_choice` added for showing/hiding the lidar in Gazebo.\n- New feature `sm_dance_bot_strikes_back` added for visualizing TurtleBot3 in Gazebo with lidar show/hide option.\n- New feature `sm_multi_stage_1` added.\n- New feature `slam_toggle_and_smacc_deep_history` added for navigation and slam toggle client behaviors, as well as `smacc2::deep_history` syntax.\n\nChanged\n-------\n\n- Navigation parameters fixes on `sm_dance_bot`.\n- Formatting improvements in various areas.\n- Minor hotfixes and format adjustments.\n- Cleanup and format fixes for Gazebo visualization.\n- Adjustments to source build packages for CI testing.\n- Method reordering to prevent recursion in `sm_dance_bot`.\n- Progress in AWS navigation demo.\n- Progress in testing `sm_dance_bot` with slam pausing/resuming functionality.\n- Various core improvements during navigation testing.\n\nFixed\n-----\n\n- Removed some compile warnings.\n- Removed `neo_simulation2` package.\n\nRemoved\n-------\n\n- `neo_simulation2` package.\n\nContributors\n------------\n\n- Pablo Iñigo Blasco\n- Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\nSection_7\n=========\n\nAdded\n-----\n\n- First working version of sm template and template generator. (#127)\n- Feature/dance bot s pattern (#129)\n- Feature/sm dance bot refine (#131)\n- Feature/sm dance bot refine 2 (#132)\n- waypoints navigator bug (#133)\n- sm_dance_bot_lite (#136)\n- Add SM core test (#138)\n- using local action msgs (#139)\n- Feature/nav2z renaming (#144)\n- added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- added remaining SVGs to READMEs (#145)\n- Update package list. (#142)\n- Add SM Atomic SM generator. (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Feature/sm dance bot strikes back refactoring (#152)\n- initial migration to smacc2\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/testing moveit behaviors (#167)\n- sm_pubsub_1 (#169)\n- sm_pubsub_1 part 2 (#170)\n- sm_advanced_recovery_1 renaming (#171)\n- sm_multi_stage_1 reworking (#172)\n- Feature/aws navigation sm dance bot (#174)\n- warehouse2 (#177)\n- Waypoint Inputs (#178)\n- sm_dance_bot_warehouse_3 (#181)\n- Feature/sm warehouse 2 13 dec 2 (#182)\n- Brettpac branch (#184)\n- SrConditional fixes and formatting (#168)\n- Feature/wharehouse2 dec 14 (#185)\n- Feature/cb pure spinning (#188)\n\nChanged\n-------\n\n- Noticed typo \"Finnaly\" corrected to \"Finally\"\n- minor tweaks (#130)\n- minor navigation improvements (#141)\n- Resolve compile warnings (#137)\n- fixing some errors introduced on formatting in migration moveit client (#151)\n- fixing compiling issues in migration moveit client (#151)\n- update readme (#164)\n- moved reference library SMs to smacc2_performance_tools (#166)\n- finetuning waypoints (#187)\n\nFixed\n-----\n\n- Fix CI: format fix python version (#148)\n- Fix launch command in README.md for sm_dance_bot_strikes_back\n- fixing broken master build in testing moveit behaviors (#167)\n- fixing pipeline error in testing moveit behaviors (#167)\n- fixing broken build in aws navigation (#174)\n\nRemoved\n-------\n\n- removing sm_dance_bot_msgs\n- removing parameters smacc\n- removing test from main moveit cmake\n\nCollaborators\n-------------\n\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: DecDury <declandury@gmail.com>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n\n```rst\nSection 8\n=========\n\nAdded\n-----\n- Added Feature/planner changes 16 12 (#191).\n- Added Feature/replanning 16 dec (#193).\n- Added Feature/undo motion 20 12 (#196).\n- Added Feature/undo motion 20 12 (#198).\n- Added Feature/sync 21 12 (#199).\n- Added Feature/warehouse2 22 12 (#200).\n- Added Feature/warehouse2 23 12 (#201).\n- Added Feature/minor tune (#203).\n- Added Merging code from backport foxy and updates about autoware (#208).\n- Added Foxy backport (#206).\n- Added galactic CI build because Navigation2 is broken in rolling.\n- Added partial changes for ament_cpplint.\n- Added tf2_ros as dependency to find include.\n- Added workflow for checking doc build.\n- Added workflow for testing prerelease builds.\n- Added Dockerfile w/ ROS distro as argument.\n- Added setupTracing.sh to install necessary packages and configure tracing group.\n- Added alternative ManualTracing.\n- Added sm markdowns.\n- Added a dockerfile for Rolling and Galactic.\n\nChanged\n-------\n- Changed ros2 launch sm_three_some sm_three_some to ros2 launch sm_three_some sm_three_some.launch.\n- Changed wording \"smacc application\" to \"SMACC2 library\".\n\nFixed\n-----\n- Fixed several fixes (#194).\n- Fixed tuning warehouse3 (#197).\n- Fixed warehouse 3 problems, and other core improvements to remove dead lock, also making continuous integration green (#204).\n- Fixed minor broken build.\n- Fixed trailing spaces.\n- Fixed codespell.\n- Fixed python linters warnings.\n- Fixed formatting of python file.\n- Fixed bug in smacc2 component.\n\nRemoved\n-------\n- Removed manual installation of ros-rolling-ros2trace. This is now automated in setupTracing.sh.\n\nCo-authored-by: Denis Štogl <denis@stogl.de>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Declan Dury <44791484+DecDury@users.noreply.github.com>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: reelrbtx <brett2@reelrobotics.com>\nCo-authored-by: brettpac <brett@robosoft.ai>\nCo-authored-by: David Revay <MrBlenny@users.noreply.github.com>\n```\n\nPor favor, házmelo saber si necesitas más cambios o información.\n\nSection_9\n==========\n\nAdded\n-----\n- Added `smacc2_performance_tools`.\n- Added new feature, `cb_wait_topic_message`: asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- Added new client behavior for Nav2, `wait nav2 nodes`, subscribing to the `/bond` topic and waiting for them to be alive. You can optionally select the nodes to wait.\n\nChanged\n-------\n- Updated mentions of `SMACC/ROS` to `SMACC2/ROS2`.\n- Renamed folders, deleted `tracing.md`, and edited `README.md`.\n- Renamed `sm_respira_1` to `sm_respira_test_2`.\n- Updated launch command to `ros2 launch sm_respira_1 sm_respira_1.launch`.\n- Updated `smacc2_rta` command across readmes.\n- Renamed event generator library.\n- Optimized dependencies in `move_base_z_planners_common`.\n- Corrected trailing spaces.\n- Changed launch command to `ros2 launch sm_respira_1 sm_respira_1.launch`.\n\nFixed\n-----\n- Fixed source CI and corrected README overview.\n- Corrected all linters and formatters.\n\nRemoved\n-------\n- Removed galactic builds from master and kept only rolling.\n- Removed submodules and used `.repos` file.\n- Do not execute `clang-format` on `smacc2_sm_reference_library` package.\n\nMiscellaneous\n-------------\n- Some progress on navigation rolling.\n- Performance tests improvements.\n- More changes on performance tests.\n- Minor formatting improvements.\n- Several core improvements during navigation testing.\n- Progress in AWS navigation demo.\n- Progress in AWS navigation.\n- Progressing in AWS navigation.\n- More on navigation.\n- Format improvements.\n- Attempting pre-commit fixes.\n\nCollaborators\n-------------\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n\n```rst\nSection_10\n==========\n\nAdded\n-----\n\n- New client behavior `cb_wait_topic_message` added for nav2. This behavior waits for nav2 nodes to subscribe to the `/bond` topic and ensures they are alive. Users can optionally select the nodes to wait for.\n- New feature `cb_pause_slam` added for pausing SLAM functionality.\n- New feature `sm_dance_bot_lite` introduced for visualizing TurtleBot3 in Gazebo.\n- New feature `sm_multi_stage_1` with improvements and doubling functionality.\n- New feature `sm_dance_bot_strikes_back` with fixes for Gazebo visualization.\n- New feature `aws_demo` added.\n\nChanged\n-------\n\n- Progress made in AWS navigation demo.\n- Navigation parameters fixed for `sm_dance_bot`.\n- Formatting improvements across various features.\n- Gazebo fixes implemented to show the robot and lidar in different scenarios.\n- Source build enabled on PR for testing purposes.\n- Adjustments made to build packages for source CI.\n- Various improvements made in navigation and performance.\n- Method reordering to prevent recursion in `sm_dance_bot`.\n\nFixed\n-----\n\n- Compilation warnings removed.\n- Merge markers removed from a Python file.\n\nRemoved\n-------\n\n- `neo_simulation2` package removed.\n\nCollaborators\n-------------\n\n- Brett <brett@robosoft.ai>\n- Pablo Iñigo Blasco <pablo@ibrobotics.com>\n```\n\n# Section_11\n\n## Added\n- First working version of sm template and template generator. (#127)\n- Minor tweaks (#130)\n- Feature/dance bot s pattern (#129)\n- Feature/sm dance bot refine (#131)\n- Feature/sm dance bot refine 2 (#132)\n- Waypoints navigator bug (#133)\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Add SM Atomic SM generator. (#143)\n- Add SM core test (#138)\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/migration moveit client (#151)\n- Feature/nav2z renaming (#144)\n- Feature/aws navigation sm dance bot (#174)\n- Feature/cb pure spinning (#188)\n- Feature/wharehouse2 dec 14 (#185)\n\n## Changed\n- Renamed reference library SMs to smacc2_performance_tools (#166)\n- Renamed sm_advanced_recovery_1 (#171)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#172)\n- Reworked sm_multi_stage_1 (#\n\n```rst\nSection_12\n==========\n\nAdded\n-----\n\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Feature/undo motion 20 12 (#196)\n- Feature/undo motion 20 12 (#198)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- Feature/warehouse2 23 12 (#201)\n- Feature/minor tune (#203)\n- Fix rolling builds (#222)\n- Foxy backport (#206)\n- Add mergify rules file.\n- Add Autoware Auto Msgs into not-released dependencies. (#220)\n- Add galactic CI build because Navigation2 is broken in rolling.\n- Add partial changes for ament_cpplint.\n- Add tf2_ros as dependency to find include.\n- Disable ament_cpplint.\n- Disable some packages and update workflows.\n- Bump ccache version.\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licences.\n- Disable cpplint and cppcheck linters.\n- Correct formatters.\n- Enable cppcheck\n- Included necessary package and edited Threesome launch\n- Rename header files and correct format.\n- Add workflow for checking doc build.\n- Update doxygen-check-build.yml\n- Create doxygen-deploy.yml\n- Create workflow for testing prerelease builds\n- Rename to smacc2 and smacc2_msgs\n- Correct GitHub branch reference.\n- Update name of package and package.xml to pass liter.\n- Execute on master update\n- Reset all versions to 0.0.0\n- Update changelogs\n- Revert \"Ignore all packages except smacc2 and smacc2_msgs\"\n- Update description table.\n- Update table\n- Copy initial docs\n- Dockerfile w/ ROS distro as argument\n- Opened new folder for additional tracing contents\n- Delete tracing directory\n- Moved tracing.md to tracing directory\n- added setupTracing.sh\n- Removed manual installation of ros-rolling-ros2trace\n- Created alternative ManualTracing\n- added new sm markdowns\n- added a dockerfile for Rolling and Galactic\n\nChanged\n-------\n\n- some reordering fixes\n- Remove example things from Foxy CI setup. (#214)\n- Fix trailing spaces.\n- Correct codespell.\n- Correct python linters warnings.\n- fixing docker for foxy and galactic\n- removing warnings (#213)\n- branching example\n- Disable disabled packages\n- Update ci-build-source.yml\n- Change extension\n- Change extension of imports.\n- Correct formatting of python file.\n\nFixed\n-----\n\n- minor broken build\n\nRemoved\n-------\n\n- merge\n- headless and other fixes\n- default values\n- minor\n- pure spinning behavior missing files\n- more fixes\n- several fixes (#194)\n- tuning warehouse3 (#197)\n- fixing warehouse 3 problems, and other core improvements (#204)\n- weird moveit not downloaded repo\n- added missing file from warehouse2 (#205)\n- progress in autowarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrre machine\n- refining cp subscriber cp publisher\n- improvements in smacc core adding more components mostly developed for autoware demo\n- autoware demo\n- foxy ci\n- fix\n- minor format\n- minor linking errors foxy\n- minor format\n- minor linking errors foxy\n``` \n\n*pabloinigoblasco*\n\n```rst\nSection_13\n==========\n\nAdded\n-----\n- Reactivated smacc2 nav clients for rolling via submodules.\n- Added README tutorial for Dockerfile.\n- Added smacc2_performance_tools.\n- Added new feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success.\n- Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive. You optionally can select the nodes to wait.\n\nChanged\n-------\n- Changed wording \"smacc application\" to \"SMACC2 library\".\n- Updated mentions of SMACC/ROS to SMACC2/ROS2.\n- Renamed tracing events.\n- Renamed folders.\n- Renamed event generator library.\n- Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n- Updated smacc2_rta command across readmes.\n- Optimized dependencies in move_base_z_planners_common.\n- Corrected trailing spaces.\n- Minor formatting improvements.\n- Cleaned up sm_atomic_24hr.\n- Reformatted sm_reference_library.\n- Updated doxygen links.\n- Updated c_cpp_properties.json.\n\nFixed\n-----\n- Fixed bug in smacc2 component.\n- Fixed source CI and corrected README overview.\n- Fixed pre-commit issues.\n\nRemoved\n-------\n- Removed galactic builds from master and kept only rolling. Removed submodules and used .repos file.\n\nOther\n-----\n- Made progress on navigation rolling.\n- Made progress in aws navigation.\n- Made several core improvements during navigation testing.\n- Made more changes on performance tests.\n- Made more sm_atomic_24hr cleanup.\n- Made more sm_advanced_recovery_1 work.\n- Corrected all linters and formatters.\n\nCollaborators\n-------------\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n```\n\n```rst\nSection_14\n==========\n\nAdded\n-----\n- New feature: `cb_wait_topic_message`, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for `nav2`: `add`, which waits for nav2 nodes subscribing to the `/bond` topic and ensures they are alive. Optional selection of nodes to wait for.\n- Progress in AWS navigation demo.\n\nChanged\n-------\n- Minor formatting improvements.\n\nFixed\n-----\n- Navigation parameters fixes on `sm_dance_bot`.\n- Removed some compile warnings.\n\nRemoved\n-------\n- Removed `neo_simulation2` package.\n\nOther\n-----\n- Base for the `sm_aws_warehouse` navigation.\n- Several core improvements during navigation testing.\n- Progress in AWS navigation demo.\n- Merge and progress.\n- `cb_pause_slam` client behavior.\n- `sm_dance_bot_lite`.\n- Updates `yaml`.\n- `sm_dance_bot` visualizing `turtlebot3`.\n- `dance bot launch gz lidar choice`.\n- `sm_multi_stage_1` doubling.\n- `sm_dance_bot_strikes_back` gazebo fixes.\n- Precommit cleanup run.\n- AWS demo.\n- Got `sm_multi_stage_1` working (barely).\n- `Brettpac` branch.\n- `a3`.\n- `mm`.\n- Diverse improvements in navigation and performance.\n``` \n\n*pabloinigoblasco*\n\nSection_15\n=========\n\nAdded\n-----\n\n- Feature/diverse improvements in navigation and performance (#117)\n- Feature/slam toggle and smacc deep history (#122)\n- Feature/dance bot s pattern (#128)\n- First working version of sm template and template generator (#127)\n- Added SM Atomic SM generator (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Feature/migration moveit client (#151)\n- Feature/aws navigation sm dance bot (#174)\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/testing moveit behaviors (#167)\n- Initial state machine transition timestamp (#165)\n- Waypoint Inputs (#178)\n\nChanged\n-------\n\n- Move method after the method it calls to prevent recursion (#126)\n- Moved reference library SMs to smacc2_performance_tools (#166)\n- Minor changes in sm_dance_bot (#125, #131, #132, #136)\n- Minor navigation improvements (#141)\n- Using local action messages instead of sm_dance_bot_msgs (#139, #144)\n- Removed node creation and create only a logger (#149)\n- Updated package list (#142)\n- Removed parameters smacc (#147)\n- Fix CI: format fix python version (#148)\n- Fixed launch command for sm_dance_bot_strikes_back in README.md\n- Minor changes in sm_multi_stage_1 (#172)\n- Warehouse2 progress (#179)\n- Format improvements (#180)\n- sm_dance_bot_warehouse_3 (#181)\n\nFixed\n-----\n\n- Minor tuning to mitigate overshot issue cases in waypoints navigator bug (#133)\n- Progress in the sm_dance_bot tests (#135)\n- Fixed compiling issues in sm_pubsub_1 (#169)\n- Fixed broken master build in Feature/testing moveit behaviors (#167)\n- Fixed pipeline error in Feature/testing moveit behaviors (#167)\n- Fixed broken build in Feature/aws navigation sm dance bot (#174)\n- Minor changes (#175)\n\nRemoved\n-------\n\n- Removed merge markers from a python file (#119)\n- Removed sm_dance_bot_msgs dependency\n- Removed test from main moveit cmake\n- Removed some comments in the past from launch command in README.md\n\nOther\n-----\n\n- Noticed typo \"Finnaly\" corrected to \"Finally\"\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Precommit cleanup\n- Pending references\n- Repos dependency\n- Added dependency to ur5 client\n- Docker refactoring\n- Added .reps dependencies and fixed some build errors\n- Improving dockerfile for building local tests\n- More readme updates\n- Default values added\n- Merge and headless fixes in Feature/sm warehouse 2 13 dec 2 (#182)\n\nCo-authored-by: pabloinigoblasco <pablo@ibrobotics.com>\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Denis Štogl <denis@stogl.de>\n\n```rst\nSection_16\n==========\n\nAdded\n-----\n- Brettpac branch (#184)\n- SrConditional fixes and formatting (#168)\n- Feature/wharehouse2 dec 14 (#185)\n- Feature/sm warehouse 2 13 dec 2 (#186)\n- Finetuning waypoints (#187)\n- Feature/cb pure spinning (#188, #189)\n- Pure spinning behavior missing files\n- Feature/planner changes 16 12 (#191)\n- Feature/replanning 16 dec (#193)\n- Several fixes (#194)\n- Feature/undo motion 20 12 (#196, #198)\n- Improving undo motion navigation warehouse2\n- Tuning warehouse3 (#197)\n- Feature/sync 21 12 (#199)\n- Feature/warehouse2 22 12 (#200)\n- Finishing warehouse2\n- Feature/warehouse2 23 12 (#201)\n- Tuning and fixes (#202)\n- Feature/minor tune (#203)\n- Fixing warehouse 3 problems, and other core improvements (#204)\n- Added missing file from warehouse2 (#205)\n- Docker build files for all versions (#225)\n- Feature/retry behavior warehouse 1 (#226)\n- Foxy backport (#206)\n- Fix code generators (#221)\n- Fix other build issues\n- Update SM template and make example code clearly visible\n- Remove use of node in the SM performance template\n- Updated template to use Blackboard storage\n- Update template to resolve the global data correctly\n- Update sm_name.hpp\n- Fix trailing spaces\n- Correct codespell\n- Correct Python linters warnings\n- Add Galactic CI build\n- Add partial changes for ament_cpplint\n- Add tf2_ros as dependency\n- Disable ament_cpplint\n- Disable some packages and update workflows\n- Bump ccache version\n- Ignore further packages\n- Satisfy ament_lint_cmake\n- Add missing licenses\n- Disable cpplint and cppcheck linters\n- Correct formatters\n- Branching example\n- Disable disabled packages\n- Update ci-build-source.yml\n- Change extension of imports\n- Enable cppcheck\n- Correct formatting of Python file\n- Included necessary package and edited Threesome launch\n- Rename header files and correct format\n- Add workflow for checking doc build\n- Update doxygen-check-build.yml\n- Create doxygen-deploy.yml\n- Use manual deployment for now\n- Create workflow for testing prerelease builds\n- Use docs/ as source folder for documentation\n- Use docs/ as output directory\n- Rename to smacc2 and smacc2_msgs\n- Correct GitHub branch reference\n- Update name of package and package.xml to pass liter\n- Execute on master update\n- Reset all versions to 0.0.0\n- Ignore all packages except smacc2 and smacc2_msgs\n- Update changelogs\n- 0.1.0\n\nChanged\n-------\n- ros2 launch sm_three_some sm_three_some to ros2 launch sm_three_some sm_three_some.launch\n\nRemoved\n-------\n- First ensure you have the necessary package installed\n  ```\n  sudo apt-get install ros-rolling-ros2trace\n  ```\n  Then run this command\n```\n\n```rst\nSection_17\n==========\n\nAdded\n-----\n\n- Added setupTracing.sh script to automate installation of necessary packages and configuration of tracing group.\n- Added README tutorial for Dockerfile.\n- Added smacc2_performance_tools.\n- Added new feature: cb_wait_topic_message, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- Added galactic CI setup and renamed rolling files. (#58)\n- Added source CI fix and corrected README overview. (#62)\n- Added galactic builds and removed submodules, using .repos file.\n- Added Navigation2 for semi-binary build.\n- Added alternative ManualTracing method.\n- Added sm_multi_stage_1.\n- Added sm_atomic_performance_test_c_1 (#88).\n- Added sm_atomic_performance_test_a_1 and sm_atomic_performance_test_a_2.\n- Added sm_atomic_performance_test_a_2 modification (#89).\n- Added sm_atomic_performance_test_a_2 and sm_atomic_performance_test_a_1.\n- Added sm_atomic_performance_trace_1 and sm_atomic_24hr.\n- Added sm_advanced_recovery_1 reworked and fixed pre-commit.\n- Added sm_advanced_recovery_1 round 4.\n- Added sm_aws_aarehouse navigation base and progress.\n- Added sm_respira_test_2 and sm_respira_1 format cleanup.\n- Added sm_reference_library reformatting.\n- Added Dockerfile with ROS distro as argument.\n- Added tracing event renaming.\n- Added tracing event name cleanup.\n- Added tracing event name edits in tracing.md.\n- Added tracing event name edits in README.md.\n- Added tracing event name edits in tracing/ManualTracing.md.\n- Added tracing event name edits in smacc_sm_reference_library/sm_atomic/README.md.\n- Added tracing event name edits in smacc2_ci/docker/ros_rollingAndGalactic_ubuntu_20.04/buildGalactic.sh.\n- Added tracing event name edits in smacc2_rta command across readmes.\n- Added tracing event name edits in sm_atomic_24hr.\n- Added tracing event name edits in sm_atomic_24hr cleanup.\n- Added tracing event name edits in move_base_z_planners_common dependencies optimization.\n- Added tracing event name edits in event generator library renaming.\n- Added tracing event name edits in sm_atomic_24hr formatting cleanup.\n- Added tracing event name edits in sm_atomic_24hr more cleanup.\n- Added tracing event name edits in sm_respira_1 format cleanup.\n- Added tracing event name edits in sm_respira_1 format cleanup pre-commit.\n- Added tracing event name edits in sm_respira_1 launch command change to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Added tracing event name edits in doxygen links update (#70).\n- Added tracing event name edits in README.md update.\n- Added tracing event name edits in README.md update launch command.\n- Added tracing event name edits in README.md update doxygen links.\n- Added tracing event name edits in README.md update formatting.\n- Added tracing event name edits in README.md update navigation rolling progress.\n- Added tracing event name edits in README.md update navigation aws demo progress.\n- Added tracing event name edits in README.md update navigation aws demo format improvements.\n- Added tracing event name edits in README.md update navigation aws demo more progress.\n- Added tracing event name edits in README.md update navigation aws demo format improvements.\n- Added tracing event name edits in README.md update navigation aws demo format improvements.\n- Added tracing event name edits in README.md update navigation aws demo more on navigation.\n- Added tracing event name edits in README.md update navigation aws demo new feature.\n- Added tracing event name edits in README.md update navigation aws demo formatting.\n- Added tracing event name edits in README.md update navigation aws demo precommit fixes.\n- Added tracing event name edits in README.md update navigation aws demo source CI fix.\n- Added tracing event name edits in README.md update navigation aws demo core improvements.\n- Added tracing event name edits in README.md update navigation aws demo progress.\n- Added tracing event name edits in README.md update navigation aws demo format improvements.\n- Added tracing event name edits in README.md update navigation aws demo progress.\n- Added tracing event name edits in README.md update navigation aws demo format improvements.\n- Added tracing event name edits in README.md update navigation aws demo format improvements.\n- Added tracing event name edits in README.md update navigation aws demo more on navigation.\n- Added tracing event name edits in README.md update navigation aws demo wait topic message client behavior.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior formatting.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior more on navigation.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior precommit fixes.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior source CI fix.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior core improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior more on navigation.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior precommit fixes.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior source CI fix.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior core improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior more on navigation.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior precommit fixes.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior source CI fix.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior core improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior more on navigation.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior precommit fixes.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior source CI fix.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior core improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior more on navigation.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior precommit fixes.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior source CI fix.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior core improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior more on navigation.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior precommit fixes.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior source CI fix.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior core improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior more on navigation.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior precommit fixes.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior source CI fix.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior core improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior more on navigation.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior precommit fixes.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior source CI fix.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior core improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior more on navigation.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior precommit fixes.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior source CI fix.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior core improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior progress.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior format improvements.\n- Added tracing event name edits in README.md update navigation aws demo wait nav2 nodes client behavior\n\n```rst\nSection_18\n==========\n\nAdded\n-----\n- New feature: `cb_wait_topic_message`, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- New client behavior for `nav2`: `add` behavior waits for nav2 nodes subscribing to the `/bond` topic and ensures they are alive. Optional node selection available.\n- Base for the `sm_aws_aarehouse` navigation.\n- Progress in AWS navigation demo.\n- New client behavior: `cb_wait_topic_message`, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success.\n- Navigation parameters fixes on `sm_dance_bot`.\n- `cb_pause_slam` client behavior.\n- `sm_dance_bot_lite` updates.\n- Visualizing `turtlebot3` in `sm_dance_bot`.\n- `sm_dance_bot_strikes_back` gazebo fixes.\n- AWS demo progress.\n\nChanged\n-------\n- Corrected all linters and formatters.\n- Several core improvements during navigation testing.\n- Formatting improvements.\n\nFixed\n----\n- Removed some compile warnings.\n\nRemoved\n-------\n- Minor hotfix.\n\nContributors\n------------\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n```\n\n## Section_19\n\n### Added\n- Added multistage modes to `sm_multi_stage_1`.\n- Added sequences to `sm_multi_stage_1`.\n- Added steps to `sm_multi_stage_1`.\n- Added sequence d to `sm_multi_stage_1`.\n- Added sequence c to `sm_multi_stage_1`.\n- Added mode_5_sequence_b.\n- Added mode_4_sequence_b.\n- Added finishing touches 1 to `sm_multi_stage_1`.\n- Added AWS navigation to `sm_dance_bot`.\n\n### Changed\n- Reworked `sm_multi_stage_1` with new multistage modes, sequences, and steps.\n\n### Fixed\n- Fixed a recursion issue by moving a method after the one it calls.\n- Fixed a waypoint issue to prevent overshot cases.\n- Fixed format issues in the code.\n- Fixed launch command in README.md for `sm_dance_bot_strikes_back`.\n- Fixed CI formatting for Python version.\n\n### Removed\n- Removed `neo_simulation2` package.\n- Removed `sm_dance_bot_msgs` package.\n- Removed parameters from `smacc`.\n\n### Miscellaneous\n- Improved navigation and performance.\n- Added local action messages.\n- Renamed navigation 2 stack.\n- Added SVGs to READMEs.\n- Updated package list.\n- Added SM Atomic SM generator.\n- Rolled Docker environment for universal execution.\n- Added QOS durability to `SmaccPublisherClient`.\n- Moved reference library SMs to `smacc2_performance_tools`.\n- Added reliability QOS configuration.\n- Added dependencies for Husky simulation.\n\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\nCo-authored-by: pabloinigoblasco <pablo@ibrobotics.com>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n\n```rst\nSection_20\n==========\n\nAdded\n-----\n\n- Update dependencies for husky in rolling and galactic.\n- Progress on aws navigation and refactorings on navigation clients and behaviors.\n- More on aws demo.\n- Warehouse2 progress.\n- Waypoint Inputs.\n- Wharehouse2 progress.\n- Format.\n- Sm_dance_bot_warehouse_3.\n- Feature/sm warehouse 2 13 dec 2.\n- More changes and headless.\n- Merge.\n- Headless and other fixes.\n- Default values.\n- Brettpac branch.\n- Redoing sm_dance_bot_warehouse_3 waypoints.\n- More Waypoints.\n- SrConditional fixes and formatting.\n- Move trigger logic into headers.\n- Lint.\n- Feature/wharehouse2 dec 14.\n- Feature/sm warehouse 2 13 dec 2.\n- Finetuning waypoints.\n- Feature/cb pure spinning.\n- Pure spinning behavior missing files.\n- Feature/planner changes 16 12.\n- Feature/replanning 16 dec.\n- Replanning for all examples.\n- Several fixes.\n- Feature/undo motion 20 12.\n- Improving undo motion navigation warehouse2.\n- Tuning warehouse3.\n- Undo tuning and errors.\n- Feature/sync 21 12.\n- Format issues.\n- Feature/warehouse2 22 12.\n- Finishing warehouse2.\n- Feature/warehouse2 23 12.\n- Tuning and fixes.\n- Feature/minor tune.\n- Fixing warehouse 3 problems and other core improvements.\n- Added missing file from warehouse2.\n- Backport to foxy.\n- Minor format.\n- Minor linking errors foxy.\n- Updating subscriber publisher components.\n- Progress in autoware machine.\n- Refining cp subscriber cp publisher.\n- Improvements in smacc core adding more components.\n- Autoware demo.\n- Foxy ci.\n- Docker files for different revisions, warnings removal, and more testing on navigation.\n- Fixing docker for foxy and galactic.\n- Update file for fake hardware simulation and add file for gazebo simulation.\n- Docker build files for all versions.\n- Retry behavior warehouse 1.\n- Multiple controllable leds plugin.\n- Progress in husky demo.\n- Add ignition file and update repos files.\n- Progressing in husky demo.\n- Improving navigation behaviors.\n- Add galactic CI build because Navigation2 is broken in rolling.\n- Add partial changes for ament_cpplint.\n- Add tf2_ros as dependency to find include.\n\nChanged\n-------\n\n- Fix formatting.\n- Only rolling version should be pre-released on master.\n- Correct Focal-Rolling builds by fixing the version of rosdep yaml.\n- Barrel search build fix and warehouse3.\n- Fixing startup problems in warehouse 3.\n- Fix broken source build.\n- Making models local.\n- Correct codespell.\n- Correct python linters warnings.\n- Fix trailing spaces.\n\nRemoved\n-------\n\n- Minor broken build.\n- Some reordering fixes.\n- Weird moveit not downloaded repo.\n```\n\n```rst\nSection_21\n==========\n\nAdded\n-----\n- First ensure you have the necessary package installed:\n  ```\n  sudo apt-get install ros-rolling-ros2trace\n  ```\n- Add workflow for checking doc build.\n- Create doxygen-deploy.yml.\n- Create workflow for testing prerelease builds.\n- Use docs/ as source folder and output directory.\n- Added setupTracing.sh:\n  Installs necessary packages and configures tracing group.\n- Created alternative ManualTracing.\n- Added new sm markdowns.\n- Added a dockerfile for Rolling and Galactic.\n- Update smacc2_ci/docker/ros_rollingAndGalactic_ubuntu_20.04/buildGalactic.sh.\n- Update tracing/ManualTracing.md.\n- Changed wording \"smacc application\" to \"SMACC2 library\".\n- Update smacc_sm_reference_library/sm_atomic/README.md: edit from html to markdown syntax.\n- Enable build of missing rolling repositories.\n- Enable Navigation2 for semi-binary build.\n- Update mentions of SMACC/ROS to SMACC2/ROS2.\n- Added smacc2_performance_tools.\n- Performance tests improvements.\n- More on performance and other issues.\n- Update smacc2_rta command across readmes.\n- Optimized deps in move_base_z_planners_common.\n- Renaming of event generator library.\n- Add galactic CI setup and rename rolling files (#58).\n- Fix source CI and correct README overview (#62).\n- Update c_cpp_properties.json.\n- Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69).\n- Update doxygen links (#70).\n- More Readme Updates (#72).\n- More Readme (#74).\n- Created new sm from sm_respira_1 (#76).\n- Feature/core and navigation fixes (#78).\n- Base for the sm_aws_aarehouse navigation.\n- Progressing in aws navigation.\n- Several core improvements during navigation testing.\n- Formatting improvements.\n- Progress in aws navigation demo.\n- More on navigation.\n- sm_advanced_recovery_1 reworked (#83).\n- Fix pre-commit.\n- Trying to fix Pre-Commit.\n- More sm_advanced_recovery_1 (#84).\n- More sm_advanced_recovery_1 work (#85).\n- sm_advanced_recovery_1 round 4 (#86).\n- Brettpac branch (#87).\n- sm_atomic_performance_test_a_2.\n- sm_atomic_performance_test_a_1.\n- sm_atomic_performance_test_c_1 (#88).\n\nChanged\n-------\n- ros2 launch sm_three_some sm_three_some to ros2 launch sm_three_some sm_three_some.launch.\n- Rename header files and correct format.\n- Change extension of imports.\n- Correct formatting of python file.\n- Update name of package and package.xml to pass liter.\n- Reset all versions to 0.0.0.\n- Update description table.\n- Update table.\n- Copy initial docs.\n- Dockerfile w/ ROS distro as argument: use this command \"sudo docker build --build-arg ROS2_DISTRO=(desiredRosTag) (directoryHoldingDockerfile)/\".\n- Opened new folder for additional tracing contents.\n- Delete tracing directory.\n- Moved tracing.md to tracing directory.\n- Removed manual installation of ros-rolling-ros2trace: this is now automated in setupTracing.sh, location of sh file assumed if user follows README.md under \"Getting started\".\n- Revert \"Ignore all packages except smacc2 and smacc2_msgs\": this reverts commit f603166a4b3ccdfe96c64d9f9fb9d8b49fbf0e61.\n- Correct trailing spaces.\n- Update smacc2_rta command across readmes.\n- Clean up of sm_atomic_24hr.\n- More sm_atomic_24hr cleanup.\n- Renaming of event generator library.\n- Minor formatting.\n\nRemoved\n-------\n- Disable ament_cpplint.\n- Disable some packages and update workflows.\n- Disable cpplint and cppcheck linters.\n- Disable disabled packages.\n- Ignore further packages.\n- Satisfy ament_lint_cmake.\n- Correct formatters.\n- Branching example.\n- Change extension.\n- Enable cppcheck.\n- Included necessary package and edited Threesome launch.\n- Ignore all packages except smacc2 and smacc2_msgs.\n- Update changelogs.\n- Revert \"Ignore all packages except smacc2 and smacc2_msgs\".\n\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>.\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>.\n```\n\n```rst\nSection_22\n==========\n\nAdded\n-----\n\n- New feature: cb_wait_topic_message, an asynchronous client behavior that waits for a topic message and optionally checks its contents for success (#81, #82, #92, #93, #94, #95, #98)\n- New client behavior for nav2: wait nav2 nodes subscribing to the /bond topic and waiting for them to be alive, with optional node selection (#82, #92, #93, #94, #95, #98)\n- New feature: cb pause slam client behavior (#98)\n- New feature: sm_dance_bot_lite (#99)\n- New feature: sm_dance_bot visualizing turtlebot3 (#101)\n- New feature: dance bot launch gz lidar choice (#102)\n\nChanged\n-------\n\n- Updated launch command\n- Corrected all linters and formatters\n- Merge and progress in navigation\n- Minor format improvements\n- Navigation parameters fixes on sm_dance_bot\n- Formatting improvements\n\nFixed\n-----\n\n- Fixing precommit\n- Remove some compile warnings (#96)\n- Minor hotfix\n\nAuthors\n-------\n\n- Pablo Iñigo Blasco\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n```\n\nSection_23\n==========\n\nAdded\n-----\n- Added visualization of turtlebot3 for sm_dance_bot.\n- Added lidar show/hide option for cleaning.\n- Added gazebo fixes to show the robot and lidar.\n- Added AWS demo functionality.\n- Added support for five stages in sm_multi_stage_1.\n- Added support for deep history in slam_toolbox components.\n- Added support for s-pattern in sm_dance_bot.\n- Added SM core test.\n- Added SM Atomic SM generator.\n\nChanged\n-------\n- Improved navigation and performance.\n- Refactored sm_dance_bot_strikes_back.\n- Refactored sm_dance_bot strikes back.\n- Refactored moveit client migration.\n- Updated READMEs with SVGs.\n- Updated package list.\n- Updated Docker environment for cross-environment execution.\n\nFixed\n-----\n- Fixed formatting issues.\n- Fixed recursion possibility in method calls.\n- Fixed overshot issue cases in waypoints navigator.\n- Fixed compile warnings.\n- Fixed CI format for Python version.\n- Fixed launch command in README.md for sm_dance_bot_strikes_back.\n- Fixed node creation in SM Atomic SM generator.\n- Fixed dependencies and linting warnings in moveit migration.\n- Fixed compiling issues in Docker environment.\n\nRemoved\n-------\n- Removed neo_simulation2 package.\n- Removed sm_dance_bot_msgs.\n- Removed unused parameters in smacc.\n- Removed test from main moveit cmake.\n\nAuthors\n-------\n- Pablo Iñigo Blasco (pabloinigoblasco)\n- Brett <brett@robosoft.ai>\n- DecDury <declandury@gmail.com>\n- Denis Štogl <destogl@users.noreply.github.com>\n\nSection_24\n-----------\n\n### Added\n- Added QOS durability to SmaccPublisherClient (#163)\n- Added reliability QoS config\n- Added feature for testing moveit behaviors (#167)\n- Added multistage modes, sequences, and steps for sm_multi_stage_1 (#172)\n- Added AWS navigation for sm dance bot (#174)\n- Added warehouse2 progress (#179)\n- Added Waypoint Inputs (#178)\n- Added more waypoints for sm_dance_bot_warehouse_3 (#184)\n- Added finetuning waypoints (#187)\n- Added pure spinning behavior (#188, #189)\n- Added planner changes (#191)\n- Added replanning for all examples (#193, #194)\n- Added undo motion improvements for warehouse2 (#196, #198)\n- Added sync feature (#199)\n- Added warehouse2 features (#200, #201)\n- Added minor tune feature (#203)\n\n### Changed\n- Moved reference library SMs to smacc2_performance_tools\n- Refactored SmaccPublisherClient to include QOS durability\n\n### Fixed\n- Fixed missing colon in SmaccPublisherClient\n- Fixed pipeline error\n- Fixed broken master build\n- Fixed broken build issues in various features\n- Fixed formatting issues\n- Fixed linting issues\n- Fixed errors in undo motion and warehouse3\n- Fixed deadlocks in warehouse3\n- Fixed missing files in warehouse2\n- Fixed linking errors for Foxy\n- Fixed broken build issues in barrel demo\n- Fixed startup problems in warehouse 3\n\n### Removed\n- Removed redundant pre-commit cleanup\n\n### Miscellaneous\n- Progress made on moveit testing\n- Progress on AWS navigation and related refactorings\n- Progress on autoware machine and refining CP subscriber and publisher\n- Progress on smacc core improvements for autoware demo\n- Docker files created for different revisions\n- Docker build files for Foxy and Galactic versions\n- Barrel demo progress and search build fixes\n- More testing on navigation components\n\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\nCo-authored-by: Denis Štogl <denis@stogl.de>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Declan Dury <44791484+DecDury@users.noreply.github.com>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: reelrbtx <brett2@reelrobotics.com>\nCo-authored-by: brettpac <brett@robosoft.ai>\nCo-authored-by: David Revay <MrBlenny@users.noreply.github.com>\n\n*pabloinigoblasco*\n\n```rst\nSection_25\n==========\n\nAdded\n-----\n- Docker improvements.\n- Runtime dependency.\n- Restoring UR dependency.\n\nChanged\n-------\n- Master rolling to galactic backport.\n- Updating galactic repositories.\n\nFixed\n-----\n- Fixing build.\n\nOther\n-----\n- More merge.\n- Testing dance bot demos.\n\nContributors\n------------\n- Denis Štogl\n- Pablo Iñigo Blasco\n- pabloinigoblasco\n\nCo-authored-by\n--------------\n- reelrbtx <brett2@reelrobotics.com>\n- brettpac <brett@robosoft.ai>\n- David Revay <MrBlenny@users.noreply.github.com>\n- pabloinigoblasco <pabloinigoblasco@ibrobotics.com>\n- DecDury <declandury@gmail.com>\n- Denis Štogl <denis@stogl.de>\n- Denis Štogl <destogl@users.noreply.github.com>\n- Declan Dury <44791484+DecDury@users.noreply.github.com>\n``` \n\n*Autoría de Pablo Iñigo Blasco (pabloinigoblasco)*\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/undo_path_global_planner/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(undo_path_global_planner)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\n\nfind_package(geometry_msgs)\nfind_package(nav_msgs)\nfind_package(nav_2d_utils)\nfind_package(nav2_core)\nfind_package(nav2_costmap_2d)\nfind_package(tf2)\nfind_package(tf2_geometry_msgs)\nfind_package(pluginlib)\nfind_package(nav2z_planners_common)\n\nset(dependencies\n  nav2_core\n  nav_msgs\n  nav2_costmap_2d\n  geometry_msgs\n  visualization_msgs\n  tf2\n  tf2_geometry_msgs\n  pluginlib\n  nav_2d_utils\n  nav2z_planners_common\n)\n\ninclude_directories(include)\n\nadd_library(${PROJECT_NAME} SHARED\n  src/${PROJECT_NAME}/undo_path_global_planner.cpp\n)\n\ntarget_compile_definitions(${PROJECT_NAME} PUBLIC \"PLUGINLIB__DISABLE_BOOST_FUNCTIONS\")\npluginlib_export_plugin_description_file(nav2_core upgp_plugin.xml)\n\nament_target_dependencies(${PROJECT_NAME}\n  ${dependencies})\n\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\nament_export_dependencies(${dependencies})\n\ninstall(TARGETS ${PROJECT_NAME}\n  ARCHIVE DESTINATION lib\n  LIBRARY DESTINATION lib\n  RUNTIME DESTINATION bin\n)\n\ninstall(DIRECTORY include/\n  DESTINATION include/\n)\n\ninstall(FILES\n  upgp_plugin.xml\n  DESTINATION share\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/undo_path_global_planner/include/undo_path_global_planner/undo_path_global_planner.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n#pragma once\n\n#include <functional>\n\n#include <nav2_core/global_planner.hpp>\n#include <nav_msgs/msg/path.hpp>\n#include <rclcpp/rclcpp.hpp>\n#include <visualization_msgs/msg/marker_array.hpp>\n\nnamespace cl_nav2z\n{\nnamespace undo_path_global_planner\n{\nclass UndoPathGlobalPlanner : public nav2_core::GlobalPlanner\n{\npublic:\n  UndoPathGlobalPlanner();\n\n  /**\n   * @brief Virtual destructor\n   */\n  virtual ~UndoPathGlobalPlanner();\n\n  /**\n   * @param  parent pointer to user's node\n   * @param  name The name of this planner\n   * @param  tf A pointer to a TF buffer\n   * @param  costmap_ros A pointer to the costmap\n   */\n  virtual void configure(\n    const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name,\n    std::shared_ptr<tf2_ros::Buffer> tf,\n    std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros);\n\n  /**\n     * @brief Method to cleanup resources used on shutdown.\n     */\n  virtual void cleanup();\n\n  /**\n     * @brief Method to active planner and any threads involved in execution.\n     */\n  virtual void activate();\n\n  /**\n     * @brief Method to deactivate planner and any threads involved in execution.\n     */\n  virtual void deactivate();\n\n  /**\n     * @brief Method create the plan from a starting and ending goal.\n     * @param start The starting pose of the robot\n     * @param goal  The goal pose of the robot\n     * @param cancel_checker Function to check if planning should be cancelled\n     * @return      The sequence of poses to get from start to goal, if any\n     */\n  virtual nav_msgs::msg::Path createPlan(\n    const geometry_msgs::msg::PoseStamped & start, const geometry_msgs::msg::PoseStamped & goal,\n    std::function<bool()> cancel_checker) override;\n\nprivate:\n  // rclcpp::Node::SharedPtr nh_;\n  rclcpp_lifecycle::LifecycleNode::SharedPtr nh_;\n  rclcpp::Subscription<nav_msgs::msg::Path>::SharedPtr forwardPathSub_;\n\n  rclcpp_lifecycle::LifecyclePublisher<nav_msgs::msg::Path>::SharedPtr planPub_;\n\n  rclcpp_lifecycle::LifecyclePublisher<visualization_msgs::msg::MarkerArray>::SharedPtr markersPub_;\n\n  nav_msgs::msg::Path lastForwardPathMsg_;\n\n  /// stored but almost not used\n  std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros_;\n\n  void onForwardTrailMsg(const nav_msgs::msg::Path::SharedPtr trailMessage);\n\n  void publishGoalMarker(const geometry_msgs::msg::Pose & pose, double r, double g, double b);\n\n  void clearGoalMarker();\n\n  virtual void createDefaultUndoPathPlan(\n    const geometry_msgs::msg::PoseStamped & start, const geometry_msgs::msg::PoseStamped & goal,\n    std::vector<geometry_msgs::msg::PoseStamped> & plan);\n\n  double skip_straight_motion_distance_;  //meters\n\n  double puresSpinningRadStep_;  // rads\n\n  double transform_tolerance_;\n\n  std::string name_;\n\n  std::shared_ptr<tf2_ros::Buffer> tf_;\n};\n}  // namespace undo_path_global_planner\n}  // namespace cl_nav2z\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/undo_path_global_planner/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>undo_path_global_planner</name>\n  <version>2.3.19</version>\n  <description>The undo_path_global_planner package.</description>\n\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <author email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</author>\n\n  <license>BSDv3</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>geometry_msgs</depend>\n  <depend>nav_2d_utils</depend>\n  <depend>nav_msgs</depend>\n  <depend>nav2_core</depend>\n  <depend>nav2_costmap_2d</depend>\n  <depend>rclcpp</depend>\n  <depend>tf2</depend>\n  <depend>tf2_geometry_msgs</depend>\n  <depend>visualization_msgs</depend>\n  <depend>nav2z_planners_common</depend>\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/undo_path_global_planner/src/undo_path_global_planner/undo_path_global_planner.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <angles/angles.h>\n#include <tf2/transform_datatypes.h>\n\n#include <boost/assign.hpp>\n#include <boost/range/adaptor/reversed.hpp>\n#include <boost/range/algorithm/copy.hpp>\n#include <geometry_msgs/msg/quaternion.hpp>\n\n#include <nav2z_planners_common/common.hpp>\n#include <nav_2d_utils/tf_help.hpp>\n#include <pluginlib/class_list_macros.hpp>\n#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>\n#include <undo_path_global_planner/undo_path_global_planner.hpp>\n\n// register this planner as a BaseGlobalPlanner plugin\nnamespace cl_nav2z\n{\nnamespace undo_path_global_planner\n{\nusing namespace std::chrono_literals;\n\n/**\n ******************************************************************************************************************\n * Constructor()\n ******************************************************************************************************************\n */\nUndoPathGlobalPlanner::UndoPathGlobalPlanner()\n{\n  skip_straight_motion_distance_ = 0.2;\n  transform_tolerance_ = 0.1;\n}\n\nUndoPathGlobalPlanner::~UndoPathGlobalPlanner()\n{\n  // clear \"rviz\"- publish empty path\n  nav_msgs::msg::Path planMsg;\n  planMsg.header.stamp = this->nh_->now();\n  planPub_->publish(planMsg);\n}\n\nvoid UndoPathGlobalPlanner::cleanup() { this->clearGoalMarker(); }\n\nvoid UndoPathGlobalPlanner::activate()\n{\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"activating planner UndoPathGlobalPlanner\");\n  planPub_->on_activate();\n  markersPub_->on_activate();\n}\n\nvoid UndoPathGlobalPlanner::deactivate()\n{\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"deactivating planner UndoPathGlobalPlanner\");\n  this->clearGoalMarker();\n  planPub_->on_deactivate();\n  markersPub_->on_deactivate();\n}\n\n/**\n ******************************************************************************************************************\n * initialize()\n ******************************************************************************************************************\n */\nvoid UndoPathGlobalPlanner::configure(\n  const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name,\n  std::shared_ptr<tf2_ros::Buffer> tf, std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros)\n{\n  nh_ = parent.lock();\n  costmap_ros_ = costmap_ros;\n  tf_ = tf;\n  name_ = name;\n  // RCLCPP_WARN_NAMED(nh_->get_logger(), \"Backwards\", \"initializating global planner, costmap address: %ld\",\n  // (long)costmap_ros);\n\n  rclcpp::SensorDataQoS qos;\n  qos.keep_last(2);\n  forwardPathSub_ = nh_->create_subscription<nav_msgs::msg::Path>(\n    \"odom_tracker_path\", qos,\n    std::bind(&UndoPathGlobalPlanner::onForwardTrailMsg, this, std::placeholders::_1));\n\n  planPub_ =\n    nh_->create_publisher<nav_msgs::msg::Path>(\"undo_path_planner/global_plan\", rclcpp::QoS(1));\n  markersPub_ = nh_->create_publisher<visualization_msgs::msg::MarkerArray>(\n    \"undo_path_planner/markers\", rclcpp::QoS(1));\n\n  declareOrSet(nh_, name_ + \".transform_tolerance\", transform_tolerance_);\n}\n/**\n ******************************************************************************************************************\n * onForwardTrailMsg()\n ******************************************************************************************************************\n */\nvoid UndoPathGlobalPlanner::onForwardTrailMsg(const nav_msgs::msg::Path::SharedPtr forwardPath)\n{\n  lastForwardPathMsg_ = *forwardPath;\n  RCLCPP_INFO_STREAM_THROTTLE(\n    nh_->get_logger(), *nh_, 1000,\n    \"[UndoPathGlobalPlanner] received backward path msg poses [\" << lastForwardPathMsg_.poses.size()\n                                                                 << \"]\");\n}\n\n/**\n ******************************************************************************************************************\n * clearGoalMarker()\n ******************************************************************************************************************\n */\nvoid UndoPathGlobalPlanner::clearGoalMarker()\n{\n  visualization_msgs::msg::Marker marker;\n  marker.header.frame_id = this->costmap_ros_->getGlobalFrameID();\n  marker.header.stamp = nh_->now();\n  marker.ns = \"my_namespace2\";\n  marker.id = 0;\n  marker.action = visualization_msgs::msg::Marker::DELETEALL;\n\n  visualization_msgs::msg::MarkerArray ma;\n  ma.markers.push_back(marker);\n  markersPub_->publish(ma);\n}\n\n/**\n ******************************************************************************************************************\n * publishGoalMarker()\n ******************************************************************************************************************\n */\nvoid UndoPathGlobalPlanner::publishGoalMarker(\n  const geometry_msgs::msg::Pose & pose, double r, double g, double b)\n{\n  double phi = tf2::getYaw(pose.orientation);\n\n  visualization_msgs::msg::Marker marker;\n  marker.header.frame_id = this->costmap_ros_->getGlobalFrameID();\n  marker.header.stamp = nh_->now();\n  marker.ns = \"my_namespace2\";\n  marker.id = 0;\n  marker.type = visualization_msgs::msg::Marker::ARROW;\n  marker.action = visualization_msgs::msg::Marker::ADD;\n  marker.scale.x = 0.1;\n  marker.scale.y = 0.3;\n  marker.scale.z = 0.1;\n  marker.color.a = 1.0;\n\n  marker.color.r = r;\n  marker.color.g = g;\n  marker.color.b = b;\n\n  marker.lifetime = rclcpp::Duration(0s);\n\n  geometry_msgs::msg::Point start, end;\n  start.x = pose.position.x;\n  start.y = pose.position.y;\n\n  end.x = pose.position.x + 0.5 * cos(phi);\n  end.y = pose.position.y + 0.5 * sin(phi);\n\n  marker.points.push_back(start);\n  marker.points.push_back(end);\n\n  visualization_msgs::msg::MarkerArray ma;\n  ma.markers.push_back(marker);\n\n  markersPub_->publish(ma);\n}\n/**\n ******************************************************************************************************************\n * defaultBackwardPath()\n ******************************************************************************************************************\n */\nvoid UndoPathGlobalPlanner::createDefaultUndoPathPlan(\n  const geometry_msgs::msg::PoseStamped & start, const geometry_msgs::msg::PoseStamped & /*goal*/,\n  std::vector<geometry_msgs::msg::PoseStamped> & plan)\n{\n  //------------- TRANSFORM TO GLOBAL FRAME PATH ---------------------------\n  // the forward plan might be recoreded in a different frame of the global (costmap) frame. Transform it.\n  // transform global plan to the navigation reference frame\n\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[UndoPathGlobalPlanner] Transforming forward path\");\n  nav_msgs::msg::Path transformedPlan;\n  rclcpp::Duration ttol = rclcpp::Duration::from_seconds(transform_tolerance_);\n  for (auto p : lastForwardPathMsg_.poses)\n  {\n    geometry_msgs::msg::PoseStamped transformedPose;\n    p.header.stamp = nh_->now();  // otherwise we can get some time tolerance error\n    transformedPose.header.stamp = nh_->now();\n    transformedPose.header.frame_id = costmap_ros_->getGlobalFrameID();\n    nav_2d_utils::transformPose(tf_, costmap_ros_->getGlobalFrameID(), p, transformedPose, ttol);\n    transformedPlan.poses.push_back(transformedPose);\n  }\n\n  lastForwardPathMsg_ = transformedPlan;\n  //---------------------------------------------------------------------------\n\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[UndoPathGlobalPlanner] finding goal closest point\");\n  int i = lastForwardPathMsg_.poses.size() - 1;\n  double linear_mindist = std::numeric_limits<double>::max();\n  int mindistindex = -1;\n  double startPoseAngle = tf2::getYaw(start.pose.orientation);\n  geometry_msgs::msg::Pose startPositionProjected;\n\n  // The goal of this code is finding the most convenient initial path pose.\n  // first, find closest linear point to the current robot position\n  // we start from the final goal, that is, the beginning of the trajectory\n  // (since this was the forward motion from the odom tracker)\n  for (auto & p : transformedPlan.poses /*| boost::adaptors::reversed*/)\n  {\n    geometry_msgs::msg::PoseStamped pose = p;\n    pose.header.frame_id = costmap_ros_->getGlobalFrameID();\n\n    double dx = pose.pose.position.x - start.pose.position.x;\n    double dy = pose.pose.position.y - start.pose.position.y;\n\n    double dist = sqrt(dx * dx + dy * dy);\n    double angleOrientation = tf2::getYaw(pose.pose.orientation);\n    double angleError = fabs(angles::shortest_angular_distance(angleOrientation, startPoseAngle));\n    if (dist <= linear_mindist)\n    {\n      mindistindex = i;\n      linear_mindist = dist;\n      startPositionProjected = pose.pose;\n\n      RCLCPP_INFO_STREAM(\n        nh_->get_logger(), \"[UndoPathGlobalPlanner] initial start point search, NEWBEST_LINEAR= \"\n                             << i << \". error, linear: \" << linear_mindist\n                             << \", angular: \" << angleError);\n    }\n    else\n    {\n      RCLCPP_INFO_STREAM(\n        nh_->get_logger(), \"[UndoPathGlobalPlanner] initial start point search, skipped= \"\n                             << i << \". best linear error: \" << linear_mindist\n                             << \". current error, linear: \" << dist << \" angular: \" << angleError);\n    }\n\n    i--;\n  }\n\n  double const ERROR_DISTANCE_PURE_SPINNING_FACTOR = 1.5;\n  // Concept of second pass: now we only consider a pure spinning motion in this point. We want to consume some very\n  // close angular targets, (accepting a larger linear minerror of 1.5 besterror. That is, more or less in the same\n  // point).\n\n  RCLCPP_INFO(nh_->get_logger(), \"[UndoPathGlobalPlanner] second angular pass\");\n  double angularMinDist = std::numeric_limits<double>::max();\n\n  if (mindistindex >= (int)transformedPlan.poses.size())\n    mindistindex =\n      transformedPlan.poses.size() -\n      1;  // workaround, something is making a out of bound exception in poses array access\n  {\n    if (transformedPlan.poses.size() == 0)\n    {\n      RCLCPP_WARN_STREAM(nh_->get_logger(), \"[UndoPathGlobalPlanner] Warning possible bug\");\n    }\n\n    // ------- FULL FORWARD PASS TO FIND THE STARTING POIINT OF THE FORWARD MOTION ------\n    RCLCPP_INFO_STREAM(nh_->get_logger(), \"[UndoPathGlobalPlanner] second pass loop\");\n    for (int i = mindistindex; i >= 0; i--)\n    {\n      // warning this index, i refers to some inverse interpretation from the previous loop,\n      // (last indexes in this path corresponds to the poses closer to our current position)\n      RCLCPP_INFO_STREAM(\n        nh_->get_logger(), \"[UndoPathGlobalPlanner] \" << i << \"/\" << transformedPlan.poses.size());\n      auto index = (int)transformedPlan.poses.size() - i - 1;\n      if (index < 0 || (size_t)index >= transformedPlan.poses.size())\n      {\n        RCLCPP_WARN_STREAM(\n          nh_->get_logger(),\n          \"[UndoPathGlobalPlanner] this should not happen. Check implementation.\");\n        break;\n      }\n      geometry_msgs::msg::PoseStamped pose =\n        transformedPlan.poses[transformedPlan.poses.size() - i - 1];\n\n      RCLCPP_INFO_STREAM(nh_->get_logger(), \"[UndoPathGlobalPlanner] global frame\");\n      pose.header.frame_id = costmap_ros_->getGlobalFrameID();\n\n      double dx = pose.pose.position.x - start.pose.position.x;\n      double dy = pose.pose.position.y - start.pose.position.y;\n\n      double dist = sqrt(dx * dx + dy * dy);\n      if (dist <= linear_mindist * ERROR_DISTANCE_PURE_SPINNING_FACTOR)\n      {\n        double angleOrientation = tf2::getYaw(pose.pose.orientation);\n        double angleError =\n          fabs(angles::shortest_angular_distance(angleOrientation, startPoseAngle));\n        if (angleError < angularMinDist)\n        {\n          angularMinDist = angleError;\n          mindistindex = i;\n          RCLCPP_INFO_STREAM(\n            nh_->get_logger(),\n            \"[UndoPathGlobalPlanner] initial start point search (angular update), NEWBEST_ANGULAR= \"\n              << i << \". error, linear: \" << dist << \"(\" << linear_mindist << \")\"\n              << \", angular: \" << angleError << \"(\" << angularMinDist << \")\");\n        }\n        else\n        {\n          RCLCPP_INFO_STREAM(\n            nh_->get_logger(),\n            \"[UndoPathGlobalPlanner] initial start point search (angular update), skipped= \"\n              << i << \". error, linear: \" << dist << \"(\" << linear_mindist << \")\"\n              << \", angular: \" << angleError << \"(\" << angularMinDist << \")\");\n        }\n      }\n      else\n      {\n        RCLCPP_INFO_STREAM(\n          nh_->get_logger(),\n          \"[UndoPathGlobalPlanner] initial start point search (angular update) not in linear \"\n          \"range, skipped= \"\n            << i << \" linear error: \" << dist << \"(\" << linear_mindist << \")\");\n      }\n    }\n  }\n\n  // REVERSE FORWARD PASS\n  if (mindistindex != -1)\n  {\n    // plan.push_back(start);\n\n    RCLCPP_WARN_STREAM(\n      nh_->get_logger(),\n      \"[UndoPathGlobalPlanner] Creating the backwards plan from odom tracker path (, \"\n        << transformedPlan.poses.size() << \") poses\");\n\n    RCLCPP_WARN_STREAM(\n      nh_->get_logger(), \"[UndoPathGlobalPlanner] closer point to goal i=\"\n                           << mindistindex << \" (linear min dist \" << linear_mindist << \")\");\n\n    // copy the path at the inverse direction, but only up to the closest point to the goal in the path  (for partial undoing)\n    for (int i = transformedPlan.poses.size() - 1; i >= mindistindex; i--)\n    {\n      auto & pose = transformedPlan.poses[i];\n\n      rclcpp::Time t(pose.header.stamp);\n\n      RCLCPP_INFO_STREAM(\n        nh_->get_logger(),\n        \"[UndoPathGlobalPlanner] adding to plan i = \" << i << \" stamp:\" << t.seconds());\n      plan.push_back(pose);\n    }\n    RCLCPP_WARN_STREAM(\n      nh_->get_logger(), \"[UndoPathGlobalPlanner] refined plan has \" << plan.size() << \"  points\");\n  }\n  else\n  {\n    RCLCPP_ERROR_STREAM(\n      nh_->get_logger(), \"[UndoPathGlobalPlanner ] undo global plan size:  \" << plan.size());\n  }\n}\n\n/**\n ******************************************************************************************************************\n * makePlan()\n ******************************************************************************************************************\n */\nnav_msgs::msg::Path UndoPathGlobalPlanner::createPlan(\n  const geometry_msgs::msg::PoseStamped & start, const geometry_msgs::msg::PoseStamped & goal,\n  std::function<bool()> /*cancel_checker*/)\n{\n  // -------------- BASIC CHECKS ---------------------\n\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[UndoPathGlobalPlanner] Undo global plan start \");\n  nav_msgs::msg::Path planMsg;\n  std::vector<geometry_msgs::msg::PoseStamped> & plan = planMsg.poses;\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(),\n    \"[UndoPathGlobalPlanner] last forward path msg size: \" << lastForwardPathMsg_.poses.size());\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[UndoPathGlobalPlanner] last forward path frame id: \"\n                         << lastForwardPathMsg_.poses.front().header.frame_id);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[UndoPathGlobalPlanner] start pose frame id: \" << start.header.frame_id);\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[UndoPathGlobalPlanner] goal pose frame id: \" << goal.header.frame_id);\n\n  if (lastForwardPathMsg_.poses.size() == 0)\n  {\n    return planMsg;\n  }\n\n  // ---------- INPUTS ACCOMMODATION -------------------\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[UndoPathGlobalPlanner] Inputs accommodation\");\n  geometry_msgs::msg::PoseStamped transformedStart, transformedGoal;\n  {\n    rclcpp::Duration ttol = rclcpp::Duration::from_seconds(transform_tolerance_);\n\n    geometry_msgs::msg::PoseStamped pstart = start;\n    pstart.header.stamp = nh_->now();\n    nav_2d_utils::transformPose(\n      tf_, costmap_ros_->getGlobalFrameID(), pstart, transformedStart, ttol);\n    transformedStart.header.frame_id = costmap_ros_->getGlobalFrameID();\n\n    // geometry_msgs::msg::PoseStamped pgoal = goal;\n    // pgoal.header.stamp = nh_->now();\n    // nav_2d_utils::transformPose(tf_, costmap_ros_->getGlobalFrameID(), pgoal, transformedGoal, ttol);\n    // transformedGoal.header.frame_id = costmap_ros_->getGlobalFrameID();\n\n    //--------------- FORCE GOAL POSE----------------------------\n    RCLCPP_INFO_STREAM(nh_->get_logger(), \"[UndoPathGlobalPlanner] Forced goal\");\n    auto forcedGoal =\n      lastForwardPathMsg_.poses[lastForwardPathMsg_.poses.size() - 1];  // FORCE LAST POSE\n    forcedGoal.header.stamp = nh_->now();\n    nav_2d_utils::transformPose(\n      tf_, costmap_ros_->getGlobalFrameID(), forcedGoal, transformedGoal, ttol);\n    transformedGoal.header.frame_id = costmap_ros_->getGlobalFrameID();\n  }\n\n  //------------- CREATING GLOBAL PLAN -----------------------------------------------\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[UndoPathGlobalPlanner] Creating undo plan\");\n  this->createDefaultUndoPathPlan(transformedStart, transformedGoal, plan);\n  planMsg.header.frame_id = this->costmap_ros_->getGlobalFrameID();\n\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[UndoPathGlobalPlanner] publishing goal markers\");\n  publishGoalMarker(plan.back().pose, 1.0, 0, 1.0 /*purple color*/);\n\n  //--------  CHECKING VALID PLAN ------------------------------------\n  bool acceptedGlobalPlan = true;\n  RCLCPP_INFO_STREAM(nh_->get_logger(), \"[UndoPathGlobalPlanner] valid plan checking\");\n\n  auto costmap2d = this->costmap_ros_->getCostmap();\n  for (auto & p : plan)\n  {\n    unsigned int mx, my;\n    costmap2d->worldToMap(p.pose.position.x, p.pose.position.y, mx, my);\n    auto cost = costmap2d->getCost(mx, my);\n\n    if (cost >= nav2_costmap_2d::INSCRIBED_INFLATED_OBSTACLE)\n    {\n      acceptedGlobalPlan = false;\n      break;\n    }\n  }\n\n  // if(planMsg.poses.size() == 1)\n  //   planMsg.poses.clear();\n\n  //--------  PUBLISHING RESULTS ---------------------------------------\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[UndoPathGlobalPlanner] plan publishing. size: \" << plan.size());\n  planPub_->publish(planMsg);\n  if (!acceptedGlobalPlan)\n  {\n    RCLCPP_INFO(\n      nh_->get_logger(),\n      \"[UndoPathGlobalPlanner] not accepted global plan because of possible collision\");\n  }\n\n  RCLCPP_INFO_STREAM(\n    nh_->get_logger(), \"[UndoPathGlobalPlanner] plan publishing. size: \" << planMsg.poses.size());\n\n  return planMsg;\n}\n\n}  // namespace undo_path_global_planner\n}  // namespace cl_nav2z\nPLUGINLIB_EXPORT_CLASS(\n  cl_nav2z::undo_path_global_planner::UndoPathGlobalPlanner, nav2_core::GlobalPlanner)\n"
  },
  {
    "path": "smacc2_client_library/cl_nav2z/custom_planners/undo_path_global_planner/upgp_plugin.xml",
    "content": "<library path=\"undo_path_global_planner\">\n  <class name=\"undo_path_global_planner::UndoPathGlobalPlanner\" type=\"cl_nav2z::undo_path_global_planner::UndoPathGlobalPlanner\" base_class_type=\"nav2_core::GlobalPlanner\">\n    <description>\n    </description>\n  </class>\n</library>\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(cl_px4_mr)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(px4_msgs REQUIRED)\nfind_package(rclcpp REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(\n  include\n  ${smacc2_INCLUDE_DIRS}\n)\n\nset(SOURCES\n  src/cl_px4_mr/cl_px4_mr.cpp\n  src/cl_px4_mr/components/cp_vehicle_command.cpp\n  src/cl_px4_mr/components/cp_offboard_keep_alive.cpp\n  src/cl_px4_mr/components/cp_trajectory_setpoint.cpp\n  src/cl_px4_mr/components/cp_vehicle_status.cpp\n  src/cl_px4_mr/components/cp_vehicle_local_position.cpp\n  src/cl_px4_mr/components/cp_vehicle_command_ack.cpp\n  src/cl_px4_mr/components/cp_goal_checker.cpp\n  src/cl_px4_mr/components/cp_micro_ros_agent.cpp\n  src/cl_px4_mr/client_behaviors/cb_arm_px4.cpp\n  src/cl_px4_mr/client_behaviors/cb_disarm_px4.cpp\n  src/cl_px4_mr/client_behaviors/cb_takeoff.cpp\n  src/cl_px4_mr/client_behaviors/cb_land.cpp\n  src/cl_px4_mr/client_behaviors/cb_go_to_location.cpp\n  src/cl_px4_mr/client_behaviors/cb_orbit_location.cpp\n  src/cl_px4_mr/client_behaviors/cb_hold_position.cpp\n  src/cl_px4_mr/client_behaviors/cb_yaw_rotate.cpp\n  src/cl_px4_mr/client_behaviors/cb_change_altitude.cpp\n  src/cl_px4_mr/client_behaviors/cb_follow_waypoints.cpp\n  src/cl_px4_mr/client_behaviors/cb_figure_eight.cpp\n  src/cl_px4_mr/client_behaviors/cb_return_to_home.cpp\n  src/cl_px4_mr/client_behaviors/cb_spiral_pattern.cpp\n  src/cl_px4_mr/client_behaviors/cb_connect_micro_ros_agent.cpp\n)\n\nadd_library(${PROJECT_NAME} ${SOURCES})\ntarget_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})\nament_target_dependencies(${PROJECT_NAME} smacc2 px4_msgs rclcpp)\n\nament_export_include_directories(include)\nament_export_dependencies(smacc2 px4_msgs rclcpp Boost)\nament_export_libraries(${PROJECT_NAME})\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(TARGETS\n  ${PROJECT_NAME}\n  DESTINATION lib/)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/README.md",
    "content": "# PX4 Multirotor Client (cl_px4_mr)\n\nSMACC2 client library for PX4 multirotor control via ROS 2 XRCE-DDS.\n\n## Architecture\n\nThe `cl_px4_mr` follows a pure component-based architecture where the client orchestrates seven specialized components:\n\n```\nClPx4Mr (Client - Orchestrator)\n├── CpVehicleCommand        - Sends vehicle commands (arm, disarm, mode, land, takeoff)\n├── CpVehicleStatus         - Monitors arming state, landing, and nav mode\n├── CpVehicleLocalPosition  - Tracks vehicle position in NED frame\n├── CpTrajectorySetpoint    - Publishes position setpoints for offboard control\n├── CpOffboardKeepAlive     - Maintains offboard mode via periodic heartbeat\n├── CpVehicleCommandAck     - Monitors command acknowledgement responses\n└── CpGoalChecker           - Detects when vehicle reaches target position\n```\n\n### Components\n\n#### CpVehicleCommand\n**Responsibility**: Sends PX4 vehicle commands via `/fmu/in/vehicle_command`\n\n- `arm()` / `forceArm()` / `disarm()` - Vehicle arming control\n- `setOffboardMode()` - Switch to offboard control mode\n- `takeoff(altitude)` / `land()` - Flight commands\n- `sendCommand(...)` - Generic 7-parameter command interface\n\n**Signals**: None\n\n#### CpVehicleStatus\n**Responsibility**: Monitors vehicle state from `/fmu/out/vehicle_status_v1`\n\n- Tracks arming state and navigation mode transitions\n- Detects armed/disarmed and landed state changes\n\n**Signals**: `onArmed_`, `onDisarmed_`, `onModeChanged_`, `onLanded_`\n\n#### CpVehicleLocalPosition\n**Responsibility**: Tracks position from `/fmu/out/vehicle_local_position`\n\n- Provides NED position (x, y, z) and heading\n- Thread-safe accessors with validity checking\n\n**Signals**: `onPositionReceived_`\n\n#### CpTrajectorySetpoint\n**Responsibility**: Publishes position commands to `/fmu/in/trajectory_setpoint`\n\n- `setPositionNED(x, y, z, yaw)` - Set target position\n- `hold()` - Hold current position\n- `republishLast()` - Re-send last setpoint\n- Thread-safe with cached last setpoint\n\n**Signals**: None\n\n#### CpOffboardKeepAlive\n**Responsibility**: Publishes offboard control mode heartbeat to `/fmu/in/offboard_control_mode`\n\n- Inherits from `ISmaccUpdatable` for periodic ~20Hz updates\n- `enable()` / `disable()` - Toggle heartbeat publishing\n- PX4 requires continuous offboard heartbeat to stay in offboard mode\n\n**Signals**: None\n\n#### CpVehicleCommandAck\n**Responsibility**: Monitors command responses from `/fmu/out/vehicle_command_ack`\n\n- Tracks last command ID and result code\n\n**Signals**: `onAckReceived_`\n\n#### CpGoalChecker\n**Responsibility**: Monitors position and fires when goal is reached\n\n- Inherits from `ISmaccUpdatable` for periodic distance checking\n- `setGoal(x, y, z, xy_tolerance, z_tolerance)` - Set target with tolerances\n- `clearGoal()` - Deactivate goal checking\n- Default tolerances: 0.5m XY, 0.3m Z\n\n**Signals**: `onGoalReached_`\n\n### Signal Flow\n\n```\nPX4 SITL (via XRCE-DDS)\n    ↓ (subscriptions)\nCpVehicleStatus         → onArmed_ / onDisarmed_ / onLanded_\nCpVehicleLocalPosition  → onPositionReceived_\nCpVehicleCommandAck     → onAckReceived_\nCpGoalChecker (update)  → onGoalReached_\n    ↓ (signal connections)\nClient Behaviors (CbArmPX4, CbTakeOff, CbLand, CbHoldPosition, CbFollowWaypoints, etc.)\n    ↓ (postSuccessEvent / postFailureEvent)\nState Machine Transitions\n```\n\n```\nClient Behaviors\n    ↓ (component method calls)\nCpVehicleCommand       → /fmu/in/vehicle_command\nCpTrajectorySetpoint   → /fmu/in/trajectory_setpoint\nCpOffboardKeepAlive    → /fmu/in/offboard_control_mode\n    ↓ (publications)\nPX4 SITL (via XRCE-DDS)\n```\n\n## Client Behaviors\n\n| Behavior | Base Class | Purpose | Parameters |\n|----------|-----------|---------|------------|\n| CbConnectMicroRosAgent | SmaccAsyncClientBehavior | Launch agent, detect node, wait for health | `timeoutSec` (default 30.0) |\n| CbArmPX4 | SmaccAsyncClientBehavior | Enable offboard, set mode, arm with retry | None (5 retries, force-arm after 2) |\n| CbDisarmPX4 | SmaccAsyncClientBehavior | Disarm vehicle | None (3 retries) |\n| CbTakeOff | SmaccAsyncClientBehavior | Enter offboard mode and climb to altitude | `targetAltitude` (default 5.0m) |\n| CbGoToLocation | SmaccAsyncClientBehavior | Fly to NED position | `targetX`, `targetY`, `targetZ`, `yaw` (optional) |\n| CbOrbitLocation | SmaccAsyncClientBehavior + ISmaccUpdatable | Orbit a center point | `centerX`, `centerY`, `altitude`, `radius`, `angularVelocity`, `numOrbits` |\n| CbLand | SmaccAsyncClientBehavior | Disable offboard and land | None (detects landing via disarm signal) |\n| CbHoldPosition | SmaccAsyncClientBehavior + ISmaccUpdatable | Hold current position for a duration | `durationSeconds` (default 5.0) |\n| CbYawRotate | SmaccAsyncClientBehavior + ISmaccUpdatable | Rotate to a target heading | `targetYawRad`, `relative` (default false) |\n| CbChangeAltitude | SmaccAsyncClientBehavior | Ascend or descend to a target altitude | `targetAltitude` (positive meters above ground) |\n| CbFollowWaypoints | SmaccAsyncClientBehavior | Visit a sequence of NED waypoints | `waypoints` (vector of {x,y,z,yaw}), `xyTol` (0.5), `zTol` (0.3) |\n| CbFigureEight | SmaccAsyncClientBehavior + ISmaccUpdatable | Fly a lemniscate figure-8 pattern | `centerX`, `centerY`, `altitude`, `size` (5.0), `speed` (0.5), `numLoops` (1) |\n| CbReturnToHome | SmaccAsyncClientBehavior | Return to a specified home position | `homeX`, `homeY`, `homeZ`, `homeYaw` |\n| CbSpiralPattern | SmaccAsyncClientBehavior + ISmaccUpdatable | Fly an expanding Archimedean spiral (search & rescue) | `centerX`, `centerY`, `altitude`, `maxRadius` (20.0), `spacing` (3.0), `speed` (2.0) |\n\n### CbConnectMicroRosAgent\n\nLaunches the micro_ros_agent (if not already running) and waits for PX4 readiness:\n\n1. **Phase 1 — Node detection:** Polls `get_node_names()` at 5 Hz for the `/px4_micro_xrce_dds` node\n2. **Phase 2 — Health check:** Subscribes to `/fmu/out/failsafe_flags` and polls at 2 Hz until PX4's EKF has converged (`attitude_invalid`, `local_altitude_invalid`, and `local_position_invalid` all false)\n3. Posts `EvCbSuccess` when both phases pass, `EvCbFailure` on timeout or shutdown\n4. Resets the failsafe subscription on exit to prevent dangling callbacks\n\n### CbArmPX4\n\nEnables offboard mode and arms the vehicle:\n\n1. Enables `CpOffboardKeepAlive` (starts publishing `offboard_control_mode` at ~20 Hz)\n2. Sends `setOffboardMode()` command\n3. Waits 2 s for PX4 to register the offboard signal\n4. Attempts arming with retry and force-arm escalation:\n   - Attempts 1-2: Standard arm command\n   - Attempts 3-5: Force-arm (param2=21196)\n5. Posts `EvCbSuccess` on armed, `EvCbFailure` after all retries exhausted\n6. Connects to `CpVehicleStatus::onArmed_` signal\n\n**Note:** PX4 ignores the force-arm flag for external commands (`from_external=true`), so the offboard keepalive step is essential — without it, `canArm()` fails because `offboard_control_signal_lost` is true when `nav_state == OFFBOARD`.\n\n### CbTakeOff\n\nFull offboard entry sequence:\n1. Enable offboard keepalive heartbeat (if not already enabled)\n2. Send hold command (2s)\n3. Switch to offboard mode\n4. Set position setpoint at target altitude\n5. Posts `EvCbSuccess` when goal checker reports altitude reached\n\n### CbOrbitLocation\n\nContinuous orbit using `ISmaccUpdatable::update()`:\n- Computes start angle from current position via `atan2`\n- Advances angle at specified angular velocity each update cycle\n- Sends `setPositionNED` on circular path around center\n- Posts `EvCbSuccess` after completing `numOrbits` full rotations\n\n### CbLand\n\nLanding sequence:\n1. Disable offboard keepalive\n2. Send land command\n3. Posts `EvCbSuccess` when vehicle disarms (PX4 auto-disarms after touchdown)\n\n### CbHoldPosition\n\nHold current position for a specified duration:\n- Calls `CpTrajectorySetpoint::hold()` to lock current position\n- Uses `ISmaccUpdatable::update()` to monitor elapsed time\n- Posts `EvCbSuccess` when duration reached\n\n### CbYawRotate\n\nRotate in place to a target heading:\n- Supports absolute or relative yaw targets\n- Commands position setpoint with new yaw at current XY/Z\n- Monitors heading convergence (within ~0.1 rad tolerance)\n- Posts `EvCbSuccess` when target heading reached\n\n### CbChangeAltitude\n\nAscend or descend to a target altitude while maintaining XY position:\n- Gets current XY and heading, sends setpoint with new Z = `-targetAltitude`\n- Uses `CpGoalChecker` signal for completion detection\n- Posts `EvCbSuccess` when altitude reached\n\n### CbFollowWaypoints\n\nVisit a sequence of NED waypoints in order:\n- Each waypoint is `{x, y, z, yaw}` — yaw = NaN to maintain current heading\n- Advances to next waypoint on each `CpGoalChecker::onGoalReached_` callback\n- Posts `EvCbSuccess` after the last waypoint is reached\n\n### CbFigureEight\n\nFly a figure-8 (lemniscate of Bernoulli) pattern:\n- Parametric equations trace a lemniscate centered at the given point\n- Yaw faces direction of travel via derivatives\n- Uses `ISmaccUpdatable::update()` for continuous trajectory streaming\n- Posts `EvCbSuccess` after completing `numLoops` full loops\n\n### CbReturnToHome\n\nReturn to a stored home position:\n- Home coordinates passed explicitly by the state machine\n- Uses `CpGoalChecker` signal for completion detection\n- Posts `EvCbSuccess` when home position reached\n\n### CbSpiralPattern\n\nFly an expanding Archimedean spiral for search and rescue area coverage:\n- `r(θ) = (spacing / 2π) × θ` — each revolution expands radius by `spacing` meters\n- Adaptive angular velocity maintains constant linear ground speed\n- Yaw faces direction of travel\n- Posts `EvCbSuccess` when `maxRadius` is reached\n\n## Usage\n\n### Orthogonal Setup\n\n```cpp\n#include <cl_px4_mr/cl_px4_mr.hpp>\n\nclass OrPx4 : public smacc2::Orthogonal<OrPx4>\n{\npublic:\n  void onInitialize() override\n  {\n    auto client = this->createClient<cl_px4_mr::ClPx4Mr>();\n  }\n};\n```\n\n### State with Behavior\n\n```cpp\n#include <cl_px4_mr/client_behaviors/cb_go_to_location.hpp>\n\nclass StGoToWaypoint : public smacc2::SmaccState<StGoToWaypoint, MsInFlight>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  using reactions = boost::mpl::list<\n    Transition<EvCbSuccess<cl_px4_mr::CbGoToLocation, OrPx4>, StNextState>\n  >;\n\n  static void staticConfigure()\n  {\n    // Fly to position (10, 0) at 5m altitude (NED: z = -5.0)\n    configure_orthogonal<OrPx4, cl_px4_mr::CbGoToLocation>(10.0f, 0.0f, -5.0f);\n  }\n};\n```\n\n### Direct Component Access\n\n```cpp\nclass CbCustomFlight : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  void onEntry() override\n  {\n    this->requiresComponent(trajectorySetpoint_);\n    this->requiresComponent(goalChecker_);\n\n    this->getStateMachine()->createSignalConnection(\n      goalChecker_->onGoalReached_, &CbCustomFlight::onGoalReached, this);\n\n    trajectorySetpoint_->setPositionNED(5.0f, 5.0f, -3.0f);\n    goalChecker_->setGoal(5.0f, 5.0f, -3.0f, 0.5f, 0.3f);\n  }\n\n  void onExit() override { goalChecker_->clearGoal(); }\n\nprivate:\n  void onGoalReached() { this->postSuccessEvent(); }\n  cl_px4_mr::CpTrajectorySetpoint * trajectorySetpoint_ = nullptr;\n  cl_px4_mr::CpGoalChecker * goalChecker_ = nullptr;\n};\n```\n\n## PX4 XRCE-DDS Topics\n\n| Direction | Topic | Message Type | Component / Behavior |\n|-----------|-------|-------------|-----------|\n| Subscribe | `/fmu/out/vehicle_status_v1` | VehicleStatus | CpVehicleStatus |\n| Subscribe | `/fmu/out/vehicle_local_position` | VehicleLocalPosition | CpVehicleLocalPosition |\n| Subscribe | `/fmu/out/vehicle_command_ack` | VehicleCommandAck | CpVehicleCommandAck |\n| Subscribe | `/fmu/out/failsafe_flags` | FailsafeFlags | CbConnectMicroRosAgent (phase 2) |\n| Publish | `/fmu/in/vehicle_command` | VehicleCommand | CpVehicleCommand |\n| Publish | `/fmu/in/trajectory_setpoint` | TrajectorySetpoint | CpTrajectorySetpoint |\n| Publish | `/fmu/in/offboard_control_mode` | OffboardControlMode | CpOffboardKeepAlive |\n\n### QoS Settings\n- Publishers: `rclcpp::QoS(1).best_effort()`\n- Subscribers: `rclcpp::SensorDataQoS()`\n\n### Coordinate Frame\nPX4 uses NED (North-East-Down): altitude of 5m above ground = z = -5.0\n\n## Dependencies\n\n- **smacc2**: State machine framework\n- **px4_msgs**: PX4 ROS 2 message definitions\n- **rclcpp**: ROS 2 C++ client library\n\n## PX4 SITL Requirements\n\n- PX4 v1.15+ publishes vehicle status on `vehicle_status_v1` (not `vehicle_status`)\n- XRCE-DDS agent must be running: `ros2 run micro_ros_agent micro_ros_agent udp4 -p 8888`\n- `CbConnectMicroRosAgent` manages agent launch automatically and waits for PX4 EKF convergence via failsafe flags before proceeding\n- PX4 ignores the force-arm flag (param2=21196) for external commands; `CbArmPX4` satisfies arming requirements by enabling offboard keepalive and setting offboard mode before arming\n\n## Testing\n\nTwo reference state machines are available:\n\n**sm_cl_px4_mr_test_1** — Basic flight: arm, takeoff, go-to, orbit, return, land.\n```bash\nros2 launch sm_cl_px4_mr_test_1 sm_cl_px4_mr_test_1.launch.py\n```\n\n**sm_cl_px4_mr_test_2** — Extended behaviors: hold position, yaw rotate, change altitude, spiral pattern, follow waypoints, figure-eight, return to home.\n```bash\nros2 launch sm_cl_px4_mr_test_2 sm_cl_px4_mr_test_2.launch.py\n```\n\nSee [sm_cl_px4_mr_test_1 README](../../smacc2_sm_reference_library/sm_cl_px4_mr_test_1/README.md) for full launch instructions.\n\n## License\n\nCopyright 2024-2025 RobosoftAI Inc.\n\nLicensed under the Apache License, Version 2.0.\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/cl_px4_mr.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\n#include <cl_px4_mr/components/cp_goal_checker.hpp>\n#include <cl_px4_mr/components/cp_micro_ros_agent.hpp>\n#include <cl_px4_mr/components/cp_offboard_keep_alive.hpp>\n#include <cl_px4_mr/components/cp_trajectory_setpoint.hpp>\n#include <cl_px4_mr/components/cp_vehicle_command.hpp>\n#include <cl_px4_mr/components/cp_vehicle_command_ack.hpp>\n#include <cl_px4_mr/components/cp_vehicle_local_position.hpp>\n#include <cl_px4_mr/components/cp_vehicle_status.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass ClPx4Mr : public smacc2::ISmaccClient\n{\npublic:\n  ClPx4Mr();\n  virtual ~ClPx4Mr();\n\n  template <typename TOrthogonal, typename TClient>\n  void onComponentInitialization()\n  {\n    this->createComponent<CpMicroRosAgent, TOrthogonal, TClient>();\n    this->createComponent<CpVehicleCommand, TOrthogonal, TClient>();\n    this->createComponent<CpTrajectorySetpoint, TOrthogonal, TClient>();\n    this->createComponent<CpVehicleLocalPosition, TOrthogonal, TClient>();\n    this->createComponent<CpOffboardKeepAlive, TOrthogonal, TClient>();\n    this->createComponent<CpVehicleStatus, TOrthogonal, TClient>();\n    this->createComponent<CpVehicleCommandAck, TOrthogonal, TClient>();\n    this->createComponent<CpGoalChecker, TOrthogonal, TClient>();\n  }\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/client_behaviors/cb_arm_px4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <atomic>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpVehicleCommand;\nclass CpVehicleStatus;\nclass CpOffboardKeepAlive;\n\nclass CbArmPX4 : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbArmPX4();\n\n  void onEntry() override;\n  void onExit() override;\n\nprivate:\n  void onArmedCallback();\n\n  CpVehicleCommand * vehicleCommand_ = nullptr;\n  CpVehicleStatus * vehicleStatus_ = nullptr;\n  CpOffboardKeepAlive * offboardKeepAlive_ = nullptr;\n  std::atomic<bool> armed_{false};\n  static constexpr int MAX_RETRIES = 5;\n  static constexpr int RETRY_INTERVAL_SEC = 5;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/client_behaviors/cb_change_altitude.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpTrajectorySetpoint;\nclass CpGoalChecker;\nclass CpVehicleLocalPosition;\n\nclass CbChangeAltitude : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  explicit CbChangeAltitude(float targetAltitude);\n\n  void onEntry() override;\n  void onExit() override;\n\nprivate:\n  void onGoalReachedCallback();\n\n  float targetAltitude_;\n  CpTrajectorySetpoint * trajectorySetpoint_ = nullptr;\n  CpGoalChecker * goalChecker_ = nullptr;\n  CpVehicleLocalPosition * localPosition_ = nullptr;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/client_behaviors/cb_connect_micro_ros_agent.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <px4_msgs/msg/failsafe_flags.hpp>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc.hpp>\n\n#include <atomic>\n\nnamespace cl_px4_mr\n{\n\nclass CpMicroRosAgent;\n\nclass CbConnectMicroRosAgent : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbConnectMicroRosAgent(double timeoutSec = 30.0);\n\n  void onEntry() override;\n  void onExit() override;\n\nprivate:\n  CpMicroRosAgent * microRosAgent_ = nullptr;\n  double timeoutSec_;\n  rclcpp::Rate rate_;\n\n  rclcpp::Subscription<px4_msgs::msg::FailsafeFlags>::SharedPtr failsafeSub_;\n  std::atomic<bool> healthOk_{false};\n  std::atomic<bool> attitudeInvalid_{true};\n  std::atomic<bool> localAltitudeInvalid_{true};\n  std::atomic<bool> localPositionInvalid_{true};\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/client_behaviors/cb_disarm_px4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpVehicleCommand;\nclass CpVehicleStatus;\n\nclass CbDisarmPX4 : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbDisarmPX4();\n\n  void onEntry() override;\n  void onExit() override;\n\nprivate:\n  void onDisarmedCallback();\n\n  CpVehicleCommand * vehicleCommand_ = nullptr;\n  CpVehicleStatus * vehicleStatus_ = nullptr;\n  int retryCount_ = 0;\n  static constexpr int MAX_RETRIES = 3;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/client_behaviors/cb_figure_eight.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <cmath>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpTrajectorySetpoint;\n\nclass CbFigureEight : public smacc2::SmaccAsyncClientBehavior, public smacc2::ISmaccUpdatable\n{\npublic:\n  CbFigureEight(\n    float centerX, float centerY, float altitude, float size = 5.0f, float speed = 0.5f,\n    int numLoops = 1);\n\n  void onEntry() override;\n  void onExit() override;\n  void update() override;\n\nprivate:\n  float centerX_;\n  float centerY_;\n  float altitude_;\n  float size_;\n  float speed_;\n  int numLoops_;\n\n  float t_ = 0.0f;\n  std::chrono::steady_clock::time_point lastUpdateTime_;\n\n  CpTrajectorySetpoint * trajectorySetpoint_ = nullptr;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/client_behaviors/cb_follow_waypoints.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <array>\n#include <cmath>\n#include <smacc2/smacc.hpp>\n#include <vector>\n\nnamespace cl_px4_mr\n{\n\nclass CpTrajectorySetpoint;\nclass CpGoalChecker;\n\nclass CbFollowWaypoints : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbFollowWaypoints(\n    std::vector<std::array<float, 4>> waypoints, float xyTol = 0.5f, float zTol = 0.3f);\n\n  void onEntry() override;\n  void onExit() override;\n\nprivate:\n  void onGoalReachedCallback();\n  void commandCurrentWaypoint();\n\n  std::vector<std::array<float, 4>> waypoints_;\n  float xyTol_;\n  float zTol_;\n  size_t currentIndex_ = 0;\n\n  CpTrajectorySetpoint * trajectorySetpoint_ = nullptr;\n  CpGoalChecker * goalChecker_ = nullptr;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/client_behaviors/cb_go_to_location.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cmath>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpTrajectorySetpoint;\nclass CpGoalChecker;\n\nclass CbGoToLocation : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbGoToLocation(\n    float targetX, float targetY, float targetZ,\n    float yaw = std::numeric_limits<float>::quiet_NaN());\n\n  void onEntry() override;\n  void onExit() override;\n\nprivate:\n  void onGoalReachedCallback();\n\n  float targetX_;\n  float targetY_;\n  float targetZ_;\n  float yaw_;\n  CpTrajectorySetpoint * trajectorySetpoint_ = nullptr;\n  CpGoalChecker * goalChecker_ = nullptr;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/client_behaviors/cb_hold_position.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpTrajectorySetpoint;\n\nclass CbHoldPosition : public smacc2::SmaccAsyncClientBehavior, public smacc2::ISmaccUpdatable\n{\npublic:\n  explicit CbHoldPosition(float durationSeconds = 5.0f);\n\n  void onEntry() override;\n  void onExit() override;\n  void update() override;\n\nprivate:\n  float durationSeconds_;\n  std::chrono::steady_clock::time_point startTime_;\n\n  CpTrajectorySetpoint * trajectorySetpoint_ = nullptr;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/client_behaviors/cb_land.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpVehicleCommand;\nclass CpVehicleStatus;\nclass CpOffboardKeepAlive;\n\nclass CbLand : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbLand();\n\n  void onEntry() override;\n  void onExit() override;\n\nprivate:\n  void onLandedCallback();\n\n  CpVehicleCommand * vehicleCommand_ = nullptr;\n  CpVehicleStatus * vehicleStatus_ = nullptr;\n  CpOffboardKeepAlive * offboardKeepAlive_ = nullptr;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/client_behaviors/cb_orbit_location.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <cmath>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpTrajectorySetpoint;\nclass CpVehicleLocalPosition;\n\nclass CbOrbitLocation : public smacc2::SmaccAsyncClientBehavior, public smacc2::ISmaccUpdatable\n{\npublic:\n  CbOrbitLocation(\n    float centerX, float centerY, float altitude, float radius = 5.0f, float angularVelocity = 0.5f,\n    int numOrbits = 3);\n\n  void onEntry() override;\n  void onExit() override;\n  void update() override;\n\nprivate:\n  float centerX_;\n  float centerY_;\n  float altitude_;\n  float radius_;\n  float angularVelocity_;\n  int numOrbits_;\n\n  float currentAngle_ = 0.0f;\n  float startAngle_ = 0.0f;\n  std::chrono::steady_clock::time_point lastUpdateTime_;\n\n  CpTrajectorySetpoint * trajectorySetpoint_ = nullptr;\n  CpVehicleLocalPosition * localPosition_ = nullptr;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/client_behaviors/cb_return_to_home.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpTrajectorySetpoint;\nclass CpGoalChecker;\n\nclass CbReturnToHome : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbReturnToHome(float homeX, float homeY, float homeZ, float homeYaw);\n\n  void onEntry() override;\n  void onExit() override;\n\nprivate:\n  void onGoalReachedCallback();\n\n  float homeX_;\n  float homeY_;\n  float homeZ_;\n  float homeYaw_;\n\n  CpTrajectorySetpoint * trajectorySetpoint_ = nullptr;\n  CpGoalChecker * goalChecker_ = nullptr;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/client_behaviors/cb_spiral_pattern.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <cmath>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpTrajectorySetpoint;\nclass CpVehicleLocalPosition;\n\nclass CbSpiralPattern : public smacc2::SmaccAsyncClientBehavior, public smacc2::ISmaccUpdatable\n{\npublic:\n  CbSpiralPattern(\n    float centerX, float centerY, float altitude, float maxRadius = 20.0f, float spacing = 3.0f,\n    float speed = 2.0f);\n\n  void onEntry() override;\n  void onExit() override;\n  void update() override;\n\nprivate:\n  float centerX_;\n  float centerY_;\n  float altitude_;\n  float maxRadius_;\n  float spacing_;\n  float speed_;\n\n  float theta_ = 0.0f;\n  std::chrono::steady_clock::time_point lastUpdateTime_;\n\n  CpTrajectorySetpoint * trajectorySetpoint_ = nullptr;\n  CpVehicleLocalPosition * localPosition_ = nullptr;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/client_behaviors/cb_takeoff.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpVehicleCommand;\nclass CpOffboardKeepAlive;\nclass CpTrajectorySetpoint;\nclass CpGoalChecker;\nclass CpVehicleLocalPosition;\n\nclass CbTakeOff : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  explicit CbTakeOff(float targetAltitude = 5.0f);\n\n  void onEntry() override;\n  void onExit() override;\n\nprivate:\n  void onGoalReachedCallback();\n\n  float targetAltitude_;\n  CpVehicleCommand * vehicleCommand_ = nullptr;\n  CpOffboardKeepAlive * offboardKeepAlive_ = nullptr;\n  CpTrajectorySetpoint * trajectorySetpoint_ = nullptr;\n  CpGoalChecker * goalChecker_ = nullptr;\n  CpVehicleLocalPosition * localPosition_ = nullptr;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/client_behaviors/cb_yaw_rotate.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cmath>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpTrajectorySetpoint;\nclass CpVehicleLocalPosition;\n\nclass CbYawRotate : public smacc2::SmaccAsyncClientBehavior, public smacc2::ISmaccUpdatable\n{\npublic:\n  CbYawRotate(float targetYawRad, bool relative = false);\n\n  void onEntry() override;\n  void onExit() override;\n  void update() override;\n\nprivate:\n  float targetYawRad_;\n  bool relative_;\n  float absoluteTargetYaw_ = 0.0f;\n\n  CpTrajectorySetpoint * trajectorySetpoint_ = nullptr;\n  CpVehicleLocalPosition * localPosition_ = nullptr;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/components/cp_goal_checker.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cmath>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpVehicleLocalPosition;\n\nclass CpGoalChecker : public smacc2::ISmaccComponent, public smacc2::ISmaccUpdatable\n{\npublic:\n  CpGoalChecker();\n  virtual ~CpGoalChecker();\n\n  void onInitialize() override;\n  void update() override;\n\n  void setGoal(float x, float y, float z, float xy_tolerance = 0.5f, float z_tolerance = 0.3f);\n  void clearGoal();\n  bool isGoalActive() const;\n\n  smacc2::SmaccSignal<void()> onGoalReached_;\n\nprivate:\n  CpVehicleLocalPosition * localPosition_ = nullptr;\n  float goalX_ = 0.0f;\n  float goalY_ = 0.0f;\n  float goalZ_ = 0.0f;\n  float xyTolerance_ = 0.5f;\n  float zTolerance_ = 0.3f;\n  bool goalActive_ = false;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/components/cp_micro_ros_agent.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <sys/types.h>\n#include <atomic>\n#include <mutex>\n#include <smacc2/smacc.hpp>\n#include <string>\n\nnamespace cl_px4_mr\n{\n\nclass CpMicroRosAgent : public smacc2::ISmaccComponent\n{\npublic:\n  CpMicroRosAgent(\n    std::string command =\n      \"ros2 run micro_ros_agent micro_ros_agent udp4 -p 8888 2>&1 | tee /tmp/xrce_agent.log\",\n    std::string nodeName = \"/px4_micro_xrce_dds\");\n  virtual ~CpMicroRosAgent();\n\n  void launch();\n  void shutdown();\n  bool isLaunched() const;\n  pid_t getPid() const;\n  std::string getNodeName() const;\n\nprivate:\n  static void killProcessesRecursive(pid_t pid);\n\n  pid_t agentPid_ = -1;\n  std::atomic<bool> launched_{false};\n  std::atomic<bool> shutdownRequested_{false};\n  std::string command_;\n  std::string nodeName_;\n  mutable std::mutex mutex_;\n  int pipeFd_ = -1;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/components/cp_offboard_keep_alive.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <px4_msgs/msg/offboard_control_mode.hpp>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpTrajectorySetpoint;\n\nclass CpOffboardKeepAlive : public smacc2::ISmaccComponent, public smacc2::ISmaccUpdatable\n{\npublic:\n  CpOffboardKeepAlive();\n  virtual ~CpOffboardKeepAlive();\n\n  void onInitialize() override;\n  void update() override;\n\n  void enable();\n  void disable();\n  bool isEnabled() const;\n\nprivate:\n  rclcpp::Publisher<px4_msgs::msg::OffboardControlMode>::SharedPtr publisher_;\n  CpTrajectorySetpoint * trajectorySetpoint_ = nullptr;\n  bool enabled_ = false;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/components/cp_trajectory_setpoint.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cmath>\n#include <mutex>\n#include <px4_msgs/msg/trajectory_setpoint.hpp>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpVehicleLocalPosition;\n\nclass CpTrajectorySetpoint : public smacc2::ISmaccComponent\n{\npublic:\n  CpTrajectorySetpoint();\n  virtual ~CpTrajectorySetpoint();\n\n  void onInitialize() override;\n\n  void setPositionNED(\n    float x, float y, float z, float yaw = std::numeric_limits<float>::quiet_NaN());\n  void hold();\n  void republishLast();\n\n  px4_msgs::msg::TrajectorySetpoint getLastSetpoint() const;\n\nprivate:\n  rclcpp::Publisher<px4_msgs::msg::TrajectorySetpoint>::SharedPtr publisher_;\n  CpVehicleLocalPosition * localPosition_ = nullptr;\n  px4_msgs::msg::TrajectorySetpoint lastSetpoint_;\n  mutable std::mutex mutex_;\n  bool hasPublished_ = false;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/components/cp_vehicle_command.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <px4_msgs/msg/vehicle_command.hpp>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpVehicleCommand : public smacc2::ISmaccComponent\n{\npublic:\n  CpVehicleCommand();\n  virtual ~CpVehicleCommand();\n\n  void onInitialize() override;\n\n  void sendCommand(\n    uint32_t command, float param1 = 0.0f, float param2 = 0.0f, float param3 = 0.0f,\n    float param4 = 0.0f, double param5 = 0.0, double param6 = 0.0, float param7 = 0.0f);\n\n  void arm();\n  void forceArm();\n  void disarm();\n  void setOffboardMode();\n  void land();\n  void takeoff(float altitude);\n\nprivate:\n  rclcpp::Publisher<px4_msgs::msg::VehicleCommand>::SharedPtr publisher_;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/components/cp_vehicle_command_ack.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <px4_msgs/msg/vehicle_command_ack.hpp>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpVehicleCommandAck : public smacc2::ISmaccComponent\n{\npublic:\n  CpVehicleCommandAck();\n  virtual ~CpVehicleCommandAck();\n\n  void onInitialize() override;\n\n  uint32_t getLastAckCommand() const;\n  uint8_t getLastAckResult() const;\n\n  smacc2::SmaccSignal<void()> onAckReceived_;\n\nprivate:\n  void onAckMessage(const px4_msgs::msg::VehicleCommandAck::SharedPtr msg);\n\n  rclcpp::Subscription<px4_msgs::msg::VehicleCommandAck>::SharedPtr subscriber_;\n  uint32_t lastCommand_ = 0;\n  uint8_t lastResult_ = 0;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/components/cp_vehicle_local_position.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <mutex>\n#include <px4_msgs/msg/vehicle_local_position.hpp>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpVehicleLocalPosition : public smacc2::ISmaccComponent\n{\npublic:\n  CpVehicleLocalPosition();\n  virtual ~CpVehicleLocalPosition();\n\n  void onInitialize() override;\n\n  float getX() const;\n  float getY() const;\n  float getZ() const;\n  float getHeading() const;\n  bool isValid() const;\n\n  smacc2::SmaccSignal<void()> onPositionReceived_;\n\nprivate:\n  void onPositionMessage(const px4_msgs::msg::VehicleLocalPosition::SharedPtr msg);\n\n  rclcpp::Subscription<px4_msgs::msg::VehicleLocalPosition>::SharedPtr subscriber_;\n  float x_ = 0.0f;\n  float y_ = 0.0f;\n  float z_ = 0.0f;\n  float heading_ = 0.0f;\n  bool valid_ = false;\n  mutable std::mutex mutex_;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/include/cl_px4_mr/components/cp_vehicle_status.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <mutex>\n#include <px4_msgs/msg/vehicle_status.hpp>\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_px4_mr\n{\n\nclass CpVehicleStatus : public smacc2::ISmaccComponent\n{\npublic:\n  CpVehicleStatus();\n  virtual ~CpVehicleStatus();\n\n  void onInitialize() override;\n\n  bool isArmed() const;\n  bool isLanded() const;\n  uint8_t getNavState() const;\n  uint8_t getArmingState() const;\n\n  smacc2::SmaccSignal<void()> onArmed_;\n  smacc2::SmaccSignal<void()> onDisarmed_;\n  smacc2::SmaccSignal<void()> onModeChanged_;\n  smacc2::SmaccSignal<void()> onLanded_;\n\nprivate:\n  void onStatusMessage(const px4_msgs::msg::VehicleStatus::SharedPtr msg);\n\n  rclcpp::Subscription<px4_msgs::msg::VehicleStatus>::SharedPtr subscriber_;\n  uint8_t armingState_ = 0;\n  uint8_t navState_ = 0;\n  uint8_t prevArmingState_ = 0;\n  uint8_t prevNavState_ = 0;\n  mutable std::mutex mutex_;\n};\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>cl_px4_mr</name>\n  <version>0.1.0</version>\n  <description>SMACC2 client library for PX4 multirotor control via ROS 2 XRCE-DDS</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n  <depend>px4_msgs</depend>\n  <depend>rclcpp</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/cl_px4_mr.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/cl_px4_mr.hpp>\n\nnamespace cl_px4_mr\n{\n\nClPx4Mr::ClPx4Mr() {}\n\nClPx4Mr::~ClPx4Mr() {}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/client_behaviors/cb_arm_px4.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/client_behaviors/cb_arm_px4.hpp>\n#include <cl_px4_mr/components/cp_offboard_keep_alive.hpp>\n#include <cl_px4_mr/components/cp_vehicle_command.hpp>\n#include <cl_px4_mr/components/cp_vehicle_status.hpp>\n\n#include <chrono>\n#include <thread>\n\nnamespace cl_px4_mr\n{\n\nCbArmPX4::CbArmPX4() {}\n\nvoid CbArmPX4::onEntry()\n{\n  this->requiresComponent(vehicleCommand_);\n  this->requiresComponent(vehicleStatus_);\n  this->requiresComponent(offboardKeepAlive_);\n\n  this->getStateMachine()->createSignalConnection(\n    vehicleStatus_->onArmed_, &CbArmPX4::onArmedCallback, this);\n\n  // Enable offboard keepalive and set offboard mode so PX4's offboard signal\n  // requirement is satisfied before arming. Without this, canArm() fails because\n  // offboard_control_signal_lost is true when nav_state == OFFBOARD.\n  if (!offboardKeepAlive_->isEnabled())\n  {\n    RCLCPP_INFO(getLogger(), \"CbArmPX4: enabling offboard keepalive\");\n    offboardKeepAlive_->enable();\n  }\n\n  RCLCPP_INFO(getLogger(), \"CbArmPX4: sending setOffboardMode command\");\n  vehicleCommand_->setOffboardMode();\n\n  // Wait for PX4 to register offboard signal (needs at least one\n  // offboard_control_mode message processed by PX4's health checks)\n  RCLCPP_INFO(getLogger(), \"CbArmPX4: waiting 2s for offboard signal registration...\");\n  std::this_thread::sleep_for(std::chrono::seconds(2));\n\n  for (int attempt = 0; attempt < MAX_RETRIES; attempt++)\n  {\n    if (attempt < 2)\n    {\n      RCLCPP_INFO(\n        getLogger(), \"CbArmPX4: sending arm command (attempt %d/%d)\", attempt + 1, MAX_RETRIES);\n      vehicleCommand_->arm();\n    }\n    else\n    {\n      RCLCPP_WARN(getLogger(), \"CbArmPX4: force-arming (attempt %d/%d)\", attempt + 1, MAX_RETRIES);\n      vehicleCommand_->forceArm();\n    }\n\n    // Wait for armed confirmation or timeout\n    for (int i = 0; i < RETRY_INTERVAL_SEC * 10; i++)\n    {\n      if (armed_) break;\n      std::this_thread::sleep_for(std::chrono::milliseconds(100));\n    }\n\n    if (armed_)\n    {\n      RCLCPP_INFO(getLogger(), \"CbArmPX4: vehicle ARMED - posting success\");\n      this->postSuccessEvent();\n      return;\n    }\n\n    RCLCPP_WARN(\n      getLogger(), \"CbArmPX4: attempt %d/%d timed out, retrying...\", attempt + 1, MAX_RETRIES);\n  }\n\n  RCLCPP_ERROR(getLogger(), \"CbArmPX4: all %d attempts failed - posting failure\", MAX_RETRIES);\n  this->postFailureEvent();\n}\n\nvoid CbArmPX4::onExit() {}\n\nvoid CbArmPX4::onArmedCallback() { armed_ = true; }\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/client_behaviors/cb_change_altitude.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/client_behaviors/cb_change_altitude.hpp>\n#include <cl_px4_mr/components/cp_goal_checker.hpp>\n#include <cl_px4_mr/components/cp_trajectory_setpoint.hpp>\n#include <cl_px4_mr/components/cp_vehicle_local_position.hpp>\n\nnamespace cl_px4_mr\n{\n\nCbChangeAltitude::CbChangeAltitude(float targetAltitude) : targetAltitude_(targetAltitude) {}\n\nvoid CbChangeAltitude::onEntry()\n{\n  this->requiresComponent(trajectorySetpoint_);\n  this->requiresComponent(goalChecker_);\n  this->requiresComponent(localPosition_);\n\n  this->getStateMachine()->createSignalConnection(\n    goalChecker_->onGoalReached_, &CbChangeAltitude::onGoalReachedCallback, this);\n\n  float currentX = localPosition_->getX();\n  float currentY = localPosition_->getY();\n  float currentHeading = localPosition_->getHeading();\n  float targetZ = -targetAltitude_;  // NED: up is negative Z\n\n  RCLCPP_INFO(\n    getLogger(), \"CbChangeAltitude: changing altitude to %.2f m (NED z=%.2f)\", targetAltitude_,\n    targetZ);\n\n  trajectorySetpoint_->setPositionNED(currentX, currentY, targetZ, currentHeading);\n  goalChecker_->setGoal(currentX, currentY, targetZ, 0.5f, 0.3f);\n}\n\nvoid CbChangeAltitude::onExit() { goalChecker_->clearGoal(); }\n\nvoid CbChangeAltitude::onGoalReachedCallback()\n{\n  RCLCPP_INFO(getLogger(), \"CbChangeAltitude: target altitude reached - posting success\");\n  this->postSuccessEvent();\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/client_behaviors/cb_connect_micro_ros_agent.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/client_behaviors/cb_connect_micro_ros_agent.hpp>\n#include <cl_px4_mr/components/cp_micro_ros_agent.hpp>\n\n#include <chrono>\n\nnamespace cl_px4_mr\n{\n\nCbConnectMicroRosAgent::CbConnectMicroRosAgent(double timeoutSec)\n: timeoutSec_(timeoutSec), rate_(5)\n{\n}\n\nvoid CbConnectMicroRosAgent::onEntry()\n{\n  this->requiresComponent(microRosAgent_);\n\n  if (!microRosAgent_->isLaunched())\n  {\n    RCLCPP_INFO(getLogger(), \"CbConnectMicroRosAgent: launching micro_ros_agent...\");\n    microRosAgent_->launch();\n  }\n\n  std::string targetNodeName = microRosAgent_->getNodeName();\n  RCLCPP_INFO(\n    getLogger(), \"CbConnectMicroRosAgent: waiting for node '%s' (timeout %.1fs)\",\n    targetNodeName.c_str(), timeoutSec_);\n\n  auto startTime = std::chrono::steady_clock::now();\n  bool found = false;\n\n  while (!this->isShutdownRequested() && !found)\n  {\n    // Check timeout\n    auto elapsed = std::chrono::steady_clock::now() - startTime;\n    double elapsedSec = std::chrono::duration<double>(elapsed).count();\n    if (elapsedSec > timeoutSec_)\n    {\n      RCLCPP_ERROR(\n        getLogger(), \"CbConnectMicroRosAgent: timeout (%.1fs) waiting for '%s'\", timeoutSec_,\n        targetNodeName.c_str());\n      this->postFailureEvent();\n      return;\n    }\n\n    // Poll for node\n    std::stringstream ss;\n    auto nodeNames = getNode()->get_node_names();\n\n    for (const auto & n : nodeNames)\n    {\n      ss << \" - \" << n << std::endl;\n\n      if (n == targetNodeName)\n      {\n        found = true;\n      }\n    }\n\n    RCLCPP_INFO_STREAM(\n      getLogger(), \"[\" << getName() << \"] listing nodes (\" << nodeNames.size() << \")\" << std::endl\n                       << ss.str());\n\n    rate_.sleep();\n  }\n\n  if (!found)\n  {\n    RCLCPP_WARN(getLogger(), \"CbConnectMicroRosAgent: shutdown requested before node found\");\n    this->postFailureEvent();\n    return;\n  }\n\n  RCLCPP_INFO(\n    getLogger(), \"CbConnectMicroRosAgent: node '%s' detected - starting failsafe health check\",\n    targetNodeName.c_str());\n\n  // Phase 2: Wait for PX4 failsafe health flags to clear\n  healthOk_.store(false);\n  attitudeInvalid_.store(true);\n  localAltitudeInvalid_.store(true);\n  localPositionInvalid_.store(true);\n\n  failsafeSub_ = getNode()->create_subscription<px4_msgs::msg::FailsafeFlags>(\n    \"/fmu/out/failsafe_flags\", rclcpp::SensorDataQoS(),\n    [this](const px4_msgs::msg::FailsafeFlags::SharedPtr msg)\n    {\n      attitudeInvalid_.store(msg->attitude_invalid);\n      localAltitudeInvalid_.store(msg->local_altitude_invalid);\n      localPositionInvalid_.store(msg->local_position_invalid);\n      healthOk_.store(\n        !msg->attitude_invalid && !msg->local_altitude_invalid && !msg->local_position_invalid);\n    });\n\n  rclcpp::Rate healthRate(2.0);\n  while (!this->isShutdownRequested() && !healthOk_.load())\n  {\n    auto elapsed = std::chrono::steady_clock::now() - startTime;\n    double elapsedSec = std::chrono::duration<double>(elapsed).count();\n    if (elapsedSec > timeoutSec_)\n    {\n      RCLCPP_ERROR(\n        getLogger(),\n        \"CbConnectMicroRosAgent: timeout (%.1fs) waiting for health check. \"\n        \"attitude_invalid=%d, local_altitude_invalid=%d, local_position_invalid=%d\",\n        timeoutSec_, attitudeInvalid_.load(), localAltitudeInvalid_.load(),\n        localPositionInvalid_.load());\n      this->postFailureEvent();\n      return;\n    }\n\n    RCLCPP_INFO(\n      getLogger(),\n      \"CbConnectMicroRosAgent: health check: attitude_invalid=%d, \"\n      \"local_altitude_invalid=%d, local_position_invalid=%d\",\n      attitudeInvalid_.load(), localAltitudeInvalid_.load(), localPositionInvalid_.load());\n\n    healthRate.sleep();\n  }\n\n  if (healthOk_.load())\n  {\n    RCLCPP_INFO(getLogger(), \"CbConnectMicroRosAgent: health check passed - posting success\");\n    this->postSuccessEvent();\n  }\n  else\n  {\n    RCLCPP_WARN(\n      getLogger(), \"CbConnectMicroRosAgent: shutdown requested before health check passed\");\n    this->postFailureEvent();\n  }\n}\n\nvoid CbConnectMicroRosAgent::onExit() { failsafeSub_.reset(); }\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/client_behaviors/cb_disarm_px4.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/client_behaviors/cb_disarm_px4.hpp>\n#include <cl_px4_mr/components/cp_vehicle_command.hpp>\n#include <cl_px4_mr/components/cp_vehicle_status.hpp>\n\nnamespace cl_px4_mr\n{\n\nCbDisarmPX4::CbDisarmPX4() {}\n\nvoid CbDisarmPX4::onEntry()\n{\n  this->requiresComponent(vehicleCommand_);\n  this->requiresComponent(vehicleStatus_);\n\n  this->getStateMachine()->createSignalConnection(\n    vehicleStatus_->onDisarmed_, &CbDisarmPX4::onDisarmedCallback, this);\n\n  RCLCPP_INFO(\n    getLogger(), \"CbDisarmPX4: sending disarm command (attempt %d/%d)\", retryCount_ + 1,\n    MAX_RETRIES);\n  vehicleCommand_->disarm();\n}\n\nvoid CbDisarmPX4::onExit() {}\n\nvoid CbDisarmPX4::onDisarmedCallback()\n{\n  RCLCPP_INFO(getLogger(), \"CbDisarmPX4: vehicle DISARMED - posting success\");\n  this->postSuccessEvent();\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/client_behaviors/cb_figure_eight.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/client_behaviors/cb_figure_eight.hpp>\n#include <cl_px4_mr/components/cp_trajectory_setpoint.hpp>\n\nnamespace cl_px4_mr\n{\n\nCbFigureEight::CbFigureEight(\n  float centerX, float centerY, float altitude, float size, float speed, int numLoops)\n: centerX_(centerX),\n  centerY_(centerY),\n  altitude_(altitude),\n  size_(size),\n  speed_(speed),\n  numLoops_(numLoops)\n{\n}\n\nvoid CbFigureEight::onEntry()\n{\n  this->requiresComponent(trajectorySetpoint_);\n\n  t_ = 0.0f;\n  lastUpdateTime_ = std::chrono::steady_clock::now();\n\n  // Command initial position (t=0: x=size, y=0 relative to center)\n  float x = centerX_ + size_;\n  float y = centerY_;\n  float z = -altitude_;  // NED\n\n  RCLCPP_INFO(\n    getLogger(), \"CbFigureEight: starting figure-8 center=[%.2f, %.2f] alt=%.2f size=%.2f loops=%d\",\n    centerX_, centerY_, altitude_, size_, numLoops_);\n\n  trajectorySetpoint_->setPositionNED(x, y, z, 0.0f);\n}\n\nvoid CbFigureEight::onExit() {}\n\nvoid CbFigureEight::update()\n{\n  auto now = std::chrono::steady_clock::now();\n  double dt = std::chrono::duration<double>(now - lastUpdateTime_).count();\n  lastUpdateTime_ = now;\n\n  t_ += speed_ * dt;\n\n  // Lemniscate of Bernoulli parametric equations\n  float sinT = std::sin(t_);\n  float cosT = std::cos(t_);\n  float denom = 1.0f + sinT * sinT;\n\n  float localX = size_ * cosT / denom;\n  float localY = size_ * sinT * cosT / denom;\n\n  float x = centerX_ + localX;\n  float y = centerY_ + localY;\n  float z = -altitude_;  // NED\n\n  // Compute derivatives for yaw (face direction of travel)\n  float sinT2 = sinT * sinT;\n  float cosT2 = cosT * cosT;\n  float denom2 = denom * denom;\n  float dxdt = size_ * (-sinT * (1.0f + sinT2) - cosT * 2.0f * sinT * cosT) / denom2;\n  float dydt =\n    size_ * ((cosT2 - sinT2) * (1.0f + sinT2) - sinT * cosT * 2.0f * sinT * cosT) / denom2;\n  float yaw = std::atan2(dydt, dxdt);\n\n  trajectorySetpoint_->setPositionNED(x, y, z, yaw);\n\n  // Check completion\n  float requiredT = numLoops_ * 2.0f * M_PI;\n  if (t_ >= requiredT)\n  {\n    RCLCPP_INFO(getLogger(), \"CbFigureEight: %d loops completed - posting success\", numLoops_);\n    this->postSuccessEvent();\n  }\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/client_behaviors/cb_follow_waypoints.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/client_behaviors/cb_follow_waypoints.hpp>\n#include <cl_px4_mr/components/cp_goal_checker.hpp>\n#include <cl_px4_mr/components/cp_trajectory_setpoint.hpp>\n\nnamespace cl_px4_mr\n{\n\nCbFollowWaypoints::CbFollowWaypoints(\n  std::vector<std::array<float, 4>> waypoints, float xyTol, float zTol)\n: waypoints_(std::move(waypoints)), xyTol_(xyTol), zTol_(zTol)\n{\n}\n\nvoid CbFollowWaypoints::onEntry()\n{\n  this->requiresComponent(trajectorySetpoint_);\n  this->requiresComponent(goalChecker_);\n\n  this->getStateMachine()->createSignalConnection(\n    goalChecker_->onGoalReached_, &CbFollowWaypoints::onGoalReachedCallback, this);\n\n  if (waypoints_.empty())\n  {\n    RCLCPP_WARN(getLogger(), \"CbFollowWaypoints: no waypoints provided - posting success\");\n    this->postSuccessEvent();\n    return;\n  }\n\n  RCLCPP_INFO(getLogger(), \"CbFollowWaypoints: following %zu waypoints\", waypoints_.size());\n\n  currentIndex_ = 0;\n  commandCurrentWaypoint();\n}\n\nvoid CbFollowWaypoints::onExit() { goalChecker_->clearGoal(); }\n\nvoid CbFollowWaypoints::commandCurrentWaypoint()\n{\n  const auto & wp = waypoints_[currentIndex_];\n  float x = wp[0];\n  float y = wp[1];\n  float z = wp[2];\n  float yaw = wp[3];\n\n  RCLCPP_INFO(\n    getLogger(), \"CbFollowWaypoints: commanding waypoint %zu/%zu [%.2f, %.2f, %.2f] yaw=%.2f\",\n    currentIndex_ + 1, waypoints_.size(), x, y, z, yaw);\n\n  trajectorySetpoint_->setPositionNED(x, y, z, yaw);\n  goalChecker_->setGoal(x, y, z, xyTol_, zTol_);\n}\n\nvoid CbFollowWaypoints::onGoalReachedCallback()\n{\n  currentIndex_++;\n\n  if (currentIndex_ >= waypoints_.size())\n  {\n    RCLCPP_INFO(\n      getLogger(), \"CbFollowWaypoints: all %zu waypoints reached - posting success\",\n      waypoints_.size());\n    this->postSuccessEvent();\n  }\n  else\n  {\n    commandCurrentWaypoint();\n  }\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/client_behaviors/cb_go_to_location.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/client_behaviors/cb_go_to_location.hpp>\n#include <cl_px4_mr/components/cp_goal_checker.hpp>\n#include <cl_px4_mr/components/cp_trajectory_setpoint.hpp>\n\nnamespace cl_px4_mr\n{\n\nCbGoToLocation::CbGoToLocation(float targetX, float targetY, float targetZ, float yaw)\n: targetX_(targetX), targetY_(targetY), targetZ_(targetZ), yaw_(yaw)\n{\n}\n\nvoid CbGoToLocation::onEntry()\n{\n  this->requiresComponent(trajectorySetpoint_);\n  this->requiresComponent(goalChecker_);\n\n  this->getStateMachine()->createSignalConnection(\n    goalChecker_->onGoalReached_, &CbGoToLocation::onGoalReachedCallback, this);\n\n  RCLCPP_INFO(\n    getLogger(), \"CbGoToLocation: navigating to [%.2f, %.2f, %.2f] yaw=%.2f\", targetX_, targetY_,\n    targetZ_, yaw_);\n\n  trajectorySetpoint_->setPositionNED(targetX_, targetY_, targetZ_, yaw_);\n  goalChecker_->setGoal(targetX_, targetY_, targetZ_);\n}\n\nvoid CbGoToLocation::onExit() { goalChecker_->clearGoal(); }\n\nvoid CbGoToLocation::onGoalReachedCallback()\n{\n  RCLCPP_INFO(getLogger(), \"CbGoToLocation: goal reached - posting success\");\n  this->postSuccessEvent();\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/client_behaviors/cb_hold_position.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/client_behaviors/cb_hold_position.hpp>\n#include <cl_px4_mr/components/cp_trajectory_setpoint.hpp>\n\nnamespace cl_px4_mr\n{\n\nCbHoldPosition::CbHoldPosition(float durationSeconds) : durationSeconds_(durationSeconds) {}\n\nvoid CbHoldPosition::onEntry()\n{\n  this->requiresComponent(trajectorySetpoint_);\n\n  RCLCPP_INFO(getLogger(), \"CbHoldPosition: holding position for %.1f seconds\", durationSeconds_);\n\n  trajectorySetpoint_->hold();\n  startTime_ = std::chrono::steady_clock::now();\n}\n\nvoid CbHoldPosition::onExit() {}\n\nvoid CbHoldPosition::update()\n{\n  auto now = std::chrono::steady_clock::now();\n  double elapsed = std::chrono::duration<double>(now - startTime_).count();\n\n  if (elapsed >= durationSeconds_)\n  {\n    RCLCPP_INFO(\n      getLogger(), \"CbHoldPosition: duration reached (%.1f s) - posting success\", elapsed);\n    this->postSuccessEvent();\n  }\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/client_behaviors/cb_land.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/client_behaviors/cb_land.hpp>\n#include <cl_px4_mr/components/cp_offboard_keep_alive.hpp>\n#include <cl_px4_mr/components/cp_vehicle_command.hpp>\n#include <cl_px4_mr/components/cp_vehicle_status.hpp>\n\nnamespace cl_px4_mr\n{\n\nCbLand::CbLand() {}\n\nvoid CbLand::onEntry()\n{\n  this->requiresComponent(vehicleCommand_);\n  this->requiresComponent(vehicleStatus_);\n  this->requiresComponent(offboardKeepAlive_);\n\n  // Connect to disarmed signal - PX4 auto-disarms after landing\n  this->getStateMachine()->createSignalConnection(\n    vehicleStatus_->onDisarmed_, &CbLand::onLandedCallback, this);\n\n  // Disable offboard keepalive - land command uses its own mode\n  offboardKeepAlive_->disable();\n\n  RCLCPP_INFO(getLogger(), \"CbLand: sending land command\");\n  vehicleCommand_->land();\n}\n\nvoid CbLand::onExit() {}\n\nvoid CbLand::onLandedCallback()\n{\n  RCLCPP_INFO(getLogger(), \"CbLand: vehicle landed and disarmed - posting success\");\n  this->postSuccessEvent();\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/client_behaviors/cb_orbit_location.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/client_behaviors/cb_orbit_location.hpp>\n#include <cl_px4_mr/components/cp_trajectory_setpoint.hpp>\n#include <cl_px4_mr/components/cp_vehicle_local_position.hpp>\n\nnamespace cl_px4_mr\n{\n\nCbOrbitLocation::CbOrbitLocation(\n  float centerX, float centerY, float altitude, float radius, float angularVelocity, int numOrbits)\n: centerX_(centerX),\n  centerY_(centerY),\n  altitude_(altitude),\n  radius_(radius),\n  angularVelocity_(angularVelocity),\n  numOrbits_(numOrbits)\n{\n}\n\nvoid CbOrbitLocation::onEntry()\n{\n  this->requiresComponent(trajectorySetpoint_);\n  this->requiresComponent(localPosition_);\n\n  // Compute starting angle from current position relative to center\n  float dx = localPosition_->getX() - centerX_;\n  float dy = localPosition_->getY() - centerY_;\n  startAngle_ = std::atan2(dy, dx);\n  currentAngle_ = startAngle_;\n  lastUpdateTime_ = std::chrono::steady_clock::now();\n\n  // Command initial orbit position\n  float x = centerX_ + radius_ * std::cos(currentAngle_);\n  float y = centerY_ + radius_ * std::sin(currentAngle_);\n  float z = -altitude_;              // NED: up is negative\n  float yaw = currentAngle_ + M_PI;  // Face toward center\n\n  RCLCPP_INFO(\n    getLogger(), \"CbOrbitLocation: starting orbit center=[%.2f, %.2f] r=%.2f alt=%.2f orbits=%d\",\n    centerX_, centerY_, radius_, altitude_, numOrbits_);\n\n  trajectorySetpoint_->setPositionNED(x, y, z, yaw);\n}\n\nvoid CbOrbitLocation::onExit() {}\n\nvoid CbOrbitLocation::update()\n{\n  auto now = std::chrono::steady_clock::now();\n  double dt = std::chrono::duration<double>(now - lastUpdateTime_).count();\n  lastUpdateTime_ = now;\n\n  // Advance angle\n  currentAngle_ += angularVelocity_ * dt;\n\n  // Compute new position on circle\n  float x = centerX_ + radius_ * std::cos(currentAngle_);\n  float y = centerY_ + radius_ * std::sin(currentAngle_);\n  float z = -altitude_;              // NED\n  float yaw = currentAngle_ + M_PI;  // Face toward center\n\n  trajectorySetpoint_->setPositionNED(x, y, z, yaw);\n\n  // Check if we've completed the required number of orbits\n  float totalAngle = currentAngle_ - startAngle_;\n  float requiredAngle = numOrbits_ * 2.0f * M_PI;\n\n  if (totalAngle >= requiredAngle)\n  {\n    RCLCPP_INFO(getLogger(), \"CbOrbitLocation: %d orbits completed - posting success\", numOrbits_);\n    this->postSuccessEvent();\n  }\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/client_behaviors/cb_return_to_home.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/client_behaviors/cb_return_to_home.hpp>\n#include <cl_px4_mr/components/cp_goal_checker.hpp>\n#include <cl_px4_mr/components/cp_trajectory_setpoint.hpp>\n\nnamespace cl_px4_mr\n{\n\nCbReturnToHome::CbReturnToHome(float homeX, float homeY, float homeZ, float homeYaw)\n: homeX_(homeX), homeY_(homeY), homeZ_(homeZ), homeYaw_(homeYaw)\n{\n}\n\nvoid CbReturnToHome::onEntry()\n{\n  this->requiresComponent(trajectorySetpoint_);\n  this->requiresComponent(goalChecker_);\n\n  this->getStateMachine()->createSignalConnection(\n    goalChecker_->onGoalReached_, &CbReturnToHome::onGoalReachedCallback, this);\n\n  RCLCPP_INFO(\n    getLogger(), \"CbReturnToHome: returning to home [%.2f, %.2f, %.2f] yaw=%.2f\", homeX_, homeY_,\n    homeZ_, homeYaw_);\n\n  trajectorySetpoint_->setPositionNED(homeX_, homeY_, homeZ_, homeYaw_);\n  goalChecker_->setGoal(homeX_, homeY_, homeZ_);\n}\n\nvoid CbReturnToHome::onExit() { goalChecker_->clearGoal(); }\n\nvoid CbReturnToHome::onGoalReachedCallback()\n{\n  RCLCPP_INFO(getLogger(), \"CbReturnToHome: home position reached - posting success\");\n  this->postSuccessEvent();\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/client_behaviors/cb_spiral_pattern.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/client_behaviors/cb_spiral_pattern.hpp>\n#include <cl_px4_mr/components/cp_trajectory_setpoint.hpp>\n#include <cl_px4_mr/components/cp_vehicle_local_position.hpp>\n\nnamespace cl_px4_mr\n{\n\nCbSpiralPattern::CbSpiralPattern(\n  float centerX, float centerY, float altitude, float maxRadius, float spacing, float speed)\n: centerX_(centerX),\n  centerY_(centerY),\n  altitude_(altitude),\n  maxRadius_(maxRadius),\n  spacing_(spacing),\n  speed_(speed)\n{\n}\n\nvoid CbSpiralPattern::onEntry()\n{\n  this->requiresComponent(trajectorySetpoint_);\n  this->requiresComponent(localPosition_);\n\n  theta_ = 0.0f;\n  lastUpdateTime_ = std::chrono::steady_clock::now();\n\n  // Initial position is the spiral center\n  float z = -altitude_;  // NED: up is negative\n\n  RCLCPP_INFO(\n    getLogger(),\n    \"CbSpiralPattern: starting spiral center=[%.2f, %.2f] alt=%.2f maxR=%.2f spacing=%.2f \"\n    \"speed=%.2f\",\n    centerX_, centerY_, altitude_, maxRadius_, spacing_, speed_);\n\n  trajectorySetpoint_->setPositionNED(centerX_, centerY_, z, 0.0f);\n}\n\nvoid CbSpiralPattern::onExit() {}\n\nvoid CbSpiralPattern::update()\n{\n  auto now = std::chrono::steady_clock::now();\n  double dt = std::chrono::duration<double>(now - lastUpdateTime_).count();\n  lastUpdateTime_ = now;\n\n  // Archimedean spiral: r(theta) = a * theta\n  // where a = spacing / (2*PI) so each revolution adds 'spacing' meters of radius\n  float a = spacing_ / (2.0f * M_PI);\n\n  // Current radius\n  float r = a * theta_;\n\n  // Adaptive angular velocity to maintain constant linear speed\n  // Arc-length speed: ds/dt = sqrt(r^2 + a^2) * dtheta/dt\n  // Solving for dtheta/dt: omega = speed / sqrt(r^2 + a^2)\n  float omega = speed_ / std::sqrt(r * r + a * a);\n\n  // Advance angle\n  theta_ += omega * dt;\n\n  // Compute new position\n  float r_new = a * theta_;\n  float x = centerX_ + r_new * std::cos(theta_);\n  float y = centerY_ + r_new * std::sin(theta_);\n  float z = -altitude_;  // NED\n\n  // Yaw: face direction of travel (derivatives of Archimedean spiral)\n  // dx/dtheta = a*cos(theta) - r*sin(theta)\n  // dy/dtheta = a*sin(theta) + r*cos(theta)\n  float dxdt = a * std::cos(theta_) - r_new * std::sin(theta_);\n  float dydt = a * std::sin(theta_) + r_new * std::cos(theta_);\n  float yaw = std::atan2(dydt, dxdt);\n\n  trajectorySetpoint_->setPositionNED(x, y, z, yaw);\n\n  // Check completion\n  if (r_new >= maxRadius_)\n  {\n    RCLCPP_INFO(\n      getLogger(), \"CbSpiralPattern: max radius %.2f reached (r=%.2f) - posting success\",\n      maxRadius_, r_new);\n    this->postSuccessEvent();\n  }\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/client_behaviors/cb_takeoff.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/client_behaviors/cb_takeoff.hpp>\n#include <cl_px4_mr/components/cp_goal_checker.hpp>\n#include <cl_px4_mr/components/cp_offboard_keep_alive.hpp>\n#include <cl_px4_mr/components/cp_trajectory_setpoint.hpp>\n#include <cl_px4_mr/components/cp_vehicle_command.hpp>\n#include <cl_px4_mr/components/cp_vehicle_local_position.hpp>\n\n#include <chrono>\n#include <thread>\n\nnamespace cl_px4_mr\n{\n\nCbTakeOff::CbTakeOff(float targetAltitude) : targetAltitude_(targetAltitude) {}\n\nvoid CbTakeOff::onEntry()\n{\n  this->requiresComponent(vehicleCommand_);\n  this->requiresComponent(offboardKeepAlive_);\n  this->requiresComponent(trajectorySetpoint_);\n  this->requiresComponent(goalChecker_);\n  this->requiresComponent(localPosition_);\n\n  this->getStateMachine()->createSignalConnection(\n    goalChecker_->onGoalReached_, &CbTakeOff::onGoalReachedCallback, this);\n\n  // 1. Enable offboard keepalive heartbeat\n  offboardKeepAlive_->enable();\n\n  // 2. Hold current position to begin streaming setpoints\n  trajectorySetpoint_->hold();\n\n  // 3. Wait for PX4 to see the setpoint stream (needs >2Hz for 1 second)\n  RCLCPP_INFO(getLogger(), \"CbTakeOff: streaming setpoints before offboard switch...\");\n  std::this_thread::sleep_for(std::chrono::seconds(2));\n\n  // 4. Switch to offboard mode\n  RCLCPP_INFO(getLogger(), \"CbTakeOff: switching to offboard mode\");\n  vehicleCommand_->setOffboardMode();\n\n  // 5. Small delay for mode switch to take effect\n  std::this_thread::sleep_for(std::chrono::milliseconds(500));\n\n  // 6. Command target altitude (NED: up is negative Z)\n  float currentX = localPosition_->getX();\n  float currentY = localPosition_->getY();\n  float targetZ = -targetAltitude_;\n  float currentHeading = localPosition_->getHeading();\n\n  RCLCPP_INFO(\n    getLogger(), \"CbTakeOff: commanding altitude %.2f m (NED z=%.2f)\", targetAltitude_, targetZ);\n  trajectorySetpoint_->setPositionNED(currentX, currentY, targetZ, currentHeading);\n\n  // 7. Set goal checker for target altitude\n  goalChecker_->setGoal(currentX, currentY, targetZ, 0.5f, 0.3f);\n}\n\nvoid CbTakeOff::onExit() {}\n\nvoid CbTakeOff::onGoalReachedCallback()\n{\n  RCLCPP_INFO(getLogger(), \"CbTakeOff: target altitude reached - posting success\");\n  this->postSuccessEvent();\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/client_behaviors/cb_yaw_rotate.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/client_behaviors/cb_yaw_rotate.hpp>\n#include <cl_px4_mr/components/cp_trajectory_setpoint.hpp>\n#include <cl_px4_mr/components/cp_vehicle_local_position.hpp>\n\nnamespace cl_px4_mr\n{\n\nCbYawRotate::CbYawRotate(float targetYawRad, bool relative)\n: targetYawRad_(targetYawRad), relative_(relative)\n{\n}\n\nvoid CbYawRotate::onEntry()\n{\n  this->requiresComponent(trajectorySetpoint_);\n  this->requiresComponent(localPosition_);\n\n  float currentYaw = localPosition_->getHeading();\n\n  if (relative_)\n  {\n    absoluteTargetYaw_ = currentYaw + targetYawRad_;\n  }\n  else\n  {\n    absoluteTargetYaw_ = targetYawRad_;\n  }\n\n  // Normalize to [-PI, PI]\n  absoluteTargetYaw_ = std::atan2(std::sin(absoluteTargetYaw_), std::cos(absoluteTargetYaw_));\n\n  float curX = localPosition_->getX();\n  float curY = localPosition_->getY();\n  float curZ = localPosition_->getZ();\n\n  RCLCPP_INFO(\n    getLogger(), \"CbYawRotate: rotating from %.2f to %.2f rad (relative=%d)\", currentYaw,\n    absoluteTargetYaw_, relative_);\n\n  trajectorySetpoint_->setPositionNED(curX, curY, curZ, absoluteTargetYaw_);\n}\n\nvoid CbYawRotate::onExit() {}\n\nvoid CbYawRotate::update()\n{\n  float currentYaw = localPosition_->getHeading();\n\n  // Compute shortest angular distance\n  float diff = absoluteTargetYaw_ - currentYaw;\n  diff = std::atan2(std::sin(diff), std::cos(diff));\n\n  if (std::abs(diff) < 0.1f)\n  {\n    RCLCPP_INFO(\n      getLogger(), \"CbYawRotate: target yaw reached (error=%.3f rad) - posting success\",\n      std::abs(diff));\n    this->postSuccessEvent();\n  }\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/components/cp_goal_checker.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/components/cp_goal_checker.hpp>\n#include <cl_px4_mr/components/cp_vehicle_local_position.hpp>\n\nnamespace cl_px4_mr\n{\n\nCpGoalChecker::CpGoalChecker() {}\n\nCpGoalChecker::~CpGoalChecker() {}\n\nvoid CpGoalChecker::onInitialize()\n{\n  this->requiresComponent(localPosition_);\n  RCLCPP_INFO(getLogger(), \"CpGoalChecker: initialized\");\n}\n\nvoid CpGoalChecker::update()\n{\n  if (!goalActive_ || !localPosition_ || !localPosition_->isValid()) return;\n\n  float dx = localPosition_->getX() - goalX_;\n  float dy = localPosition_->getY() - goalY_;\n  float dz = localPosition_->getZ() - goalZ_;\n  float xyDist = std::sqrt(dx * dx + dy * dy);\n  float zDist = std::abs(dz);\n\n  if (xyDist <= xyTolerance_ && zDist <= zTolerance_)\n  {\n    RCLCPP_INFO(\n      getLogger(), \"CpGoalChecker: GOAL REACHED (xy_dist=%.2f z_dist=%.2f)\", xyDist, zDist);\n    goalActive_ = false;\n    onGoalReached_();\n  }\n}\n\nvoid CpGoalChecker::setGoal(float x, float y, float z, float xy_tolerance, float z_tolerance)\n{\n  goalX_ = x;\n  goalY_ = y;\n  goalZ_ = z;\n  xyTolerance_ = xy_tolerance;\n  zTolerance_ = z_tolerance;\n  goalActive_ = true;\n  RCLCPP_INFO(\n    getLogger(), \"CpGoalChecker: goal set [%.2f, %.2f, %.2f] tol(xy=%.2f z=%.2f)\", x, y, z,\n    xy_tolerance, z_tolerance);\n}\n\nvoid CpGoalChecker::clearGoal() { goalActive_ = false; }\n\nbool CpGoalChecker::isGoalActive() const { return goalActive_; }\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/components/cp_micro_ros_agent.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/components/cp_micro_ros_agent.hpp>\n\n#include <errno.h>\n#include <fcntl.h>\n#include <signal.h>\n#include <stdio.h>\n#include <sys/types.h>\n#include <sys/wait.h>\n#include <unistd.h>\n#include <cstring>\n#include <sstream>\n#include <thread>\n#include <vector>\n\nnamespace cl_px4_mr\n{\n\nCpMicroRosAgent::CpMicroRosAgent(std::string command, std::string nodeName)\n: command_(std::move(command)), nodeName_(std::move(nodeName))\n{\n}\n\nCpMicroRosAgent::~CpMicroRosAgent() { shutdown(); }\n\nvoid CpMicroRosAgent::launch()\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n\n  if (launched_)\n  {\n    RCLCPP_INFO(getLogger(), \"CpMicroRosAgent: already launched, skipping\");\n    return;\n  }\n\n  RCLCPP_INFO(getLogger(), \"CpMicroRosAgent: launching '%s'\", command_.c_str());\n\n  int pipefd[2];\n  if (pipe(pipefd) == -1)\n  {\n    RCLCPP_ERROR(getLogger(), \"CpMicroRosAgent: pipe() failed: %s\", strerror(errno));\n    return;\n  }\n\n  pid_t pid = fork();\n\n  if (pid == 0)\n  {\n    // Child process\n    close(pipefd[0]);\n    dup2(pipefd[1], STDOUT_FILENO);\n    dup2(pipefd[1], STDERR_FILENO);\n    close(pipefd[1]);\n\n    execl(\"/bin/sh\", \"/bin/sh\", \"-c\", command_.c_str(), nullptr);\n\n    // If execl returns, it failed\n    _exit(1);\n  }\n  else if (pid > 0)\n  {\n    // Parent process\n    close(pipefd[1]);\n    agentPid_ = pid;\n    pipeFd_ = pipefd[0];\n\n    // Set pipe to non-blocking\n    int flags = fcntl(pipeFd_, F_GETFL, 0);\n    fcntl(pipeFd_, F_SETFL, flags | O_NONBLOCK);\n\n    // Spawn detached reader thread to drain pipe (prevents buffer fill)\n    shutdownRequested_ = false;\n    std::thread readerThread(\n      [this]()\n      {\n        char buf[256];\n        while (!shutdownRequested_)\n        {\n          ssize_t n = read(pipeFd_, buf, sizeof(buf) - 1);\n          if (n > 0)\n          {\n            buf[n] = '\\0';\n            RCLCPP_DEBUG(getLogger(), \"[micro_ros_agent] %s\", buf);\n          }\n          else\n          {\n            std::this_thread::sleep_for(std::chrono::milliseconds(100));\n          }\n        }\n      });\n    readerThread.detach();\n\n    launched_ = true;\n    RCLCPP_INFO(getLogger(), \"CpMicroRosAgent: launched with PID %d\", agentPid_);\n  }\n  else\n  {\n    RCLCPP_ERROR(getLogger(), \"CpMicroRosAgent: fork() failed: %s\", strerror(errno));\n    close(pipefd[0]);\n    close(pipefd[1]);\n  }\n}\n\nvoid CpMicroRosAgent::shutdown()\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n\n  if (agentPid_ <= 0)\n  {\n    return;\n  }\n\n  RCLCPP_INFO(getLogger(), \"CpMicroRosAgent: shutting down agent (PID %d)\", agentPid_);\n\n  shutdownRequested_ = true;\n\n  // Kill process tree recursively\n  killProcessesRecursive(agentPid_);\n\n  // Reap zombie with brief retry loop\n  for (int i = 0; i < 10; i++)\n  {\n    int status;\n    pid_t result = waitpid(agentPid_, &status, WNOHANG);\n    if (result == agentPid_ || result == -1)\n    {\n      break;\n    }\n    std::this_thread::sleep_for(std::chrono::milliseconds(100));\n  }\n\n  // Close pipe\n  if (pipeFd_ >= 0)\n  {\n    close(pipeFd_);\n    pipeFd_ = -1;\n  }\n\n  agentPid_ = -1;\n  launched_ = false;\n\n  RCLCPP_INFO(getLogger(), \"CpMicroRosAgent: shutdown complete\");\n}\n\nbool CpMicroRosAgent::isLaunched() const { return launched_; }\n\npid_t CpMicroRosAgent::getPid() const\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  return agentPid_;\n}\n\nstd::string CpMicroRosAgent::getNodeName() const { return nodeName_; }\n\nvoid CpMicroRosAgent::killProcessesRecursive(pid_t pid)\n{\n  std::string command = \"pgrep -P \" + std::to_string(pid);\n  FILE * pipe = popen(command.c_str(), \"r\");\n\n  if (!pipe)\n  {\n    return;\n  }\n\n  char buffer[128];\n  std::string result;\n\n  while (fgets(buffer, sizeof(buffer), pipe) != NULL)\n  {\n    result += buffer;\n  }\n\n  pclose(pipe);\n\n  std::istringstream iss(result);\n  pid_t childPid;\n  std::vector<pid_t> childPids;\n\n  while (iss >> childPid)\n  {\n    childPids.push_back(childPid);\n  }\n\n  // Kill child processes before killing the parent process\n  for (const pid_t & child : childPids)\n  {\n    killProcessesRecursive(child);\n  }\n\n  // After killing all children, kill the parent process\n  int res = kill(pid, SIGTERM);\n  if (res == 0)\n  {\n    RCLCPP_FATAL(rclcpp::get_logger(\"CpMicroRosAgent\"), \"Killed process %d\", pid);\n  }\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/components/cp_offboard_keep_alive.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/components/cp_offboard_keep_alive.hpp>\n#include <cl_px4_mr/components/cp_trajectory_setpoint.hpp>\n\nnamespace cl_px4_mr\n{\n\nCpOffboardKeepAlive::CpOffboardKeepAlive() {}\n\nCpOffboardKeepAlive::~CpOffboardKeepAlive() {}\n\nvoid CpOffboardKeepAlive::onInitialize()\n{\n  auto node = this->getNode();\n  publisher_ = node->create_publisher<px4_msgs::msg::OffboardControlMode>(\n    \"/fmu/in/offboard_control_mode\", rclcpp::QoS(1).best_effort());\n\n  this->requiresComponent(trajectorySetpoint_);\n\n  RCLCPP_INFO(getLogger(), \"CpOffboardKeepAlive: initialized (disabled)\");\n}\n\nvoid CpOffboardKeepAlive::update()\n{\n  if (!enabled_) return;\n\n  auto node = this->getNode();\n\n  px4_msgs::msg::OffboardControlMode msg;\n  msg.timestamp = node->get_clock()->now().nanoseconds() / 1000;\n  msg.position = true;\n  msg.velocity = false;\n  msg.acceleration = false;\n  msg.attitude = false;\n  msg.body_rate = false;\n  msg.thrust_and_torque = false;\n  msg.direct_actuator = false;\n  publisher_->publish(msg);\n\n  // Republish the latest trajectory setpoint to keep PX4 happy\n  if (trajectorySetpoint_)\n  {\n    trajectorySetpoint_->republishLast();\n  }\n}\n\nvoid CpOffboardKeepAlive::enable()\n{\n  enabled_ = true;\n  RCLCPP_INFO(getLogger(), \"CpOffboardKeepAlive: ENABLED\");\n}\n\nvoid CpOffboardKeepAlive::disable()\n{\n  enabled_ = false;\n  RCLCPP_INFO(getLogger(), \"CpOffboardKeepAlive: DISABLED\");\n}\n\nbool CpOffboardKeepAlive::isEnabled() const { return enabled_; }\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/components/cp_trajectory_setpoint.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/components/cp_trajectory_setpoint.hpp>\n#include <cl_px4_mr/components/cp_vehicle_local_position.hpp>\n\nnamespace cl_px4_mr\n{\n\nCpTrajectorySetpoint::CpTrajectorySetpoint() {}\n\nCpTrajectorySetpoint::~CpTrajectorySetpoint() {}\n\nvoid CpTrajectorySetpoint::onInitialize()\n{\n  auto node = this->getNode();\n  publisher_ = node->create_publisher<px4_msgs::msg::TrajectorySetpoint>(\n    \"/fmu/in/trajectory_setpoint\", rclcpp::QoS(1).best_effort());\n\n  this->requiresComponent(localPosition_);\n\n  // Initialize lastSetpoint_ with NaNs\n  auto nan = std::numeric_limits<float>::quiet_NaN();\n  lastSetpoint_.position = {nan, nan, nan};\n  lastSetpoint_.velocity = {nan, nan, nan};\n  lastSetpoint_.acceleration = {nan, nan, nan};\n  lastSetpoint_.jerk = {nan, nan, nan};\n  lastSetpoint_.yaw = nan;\n  lastSetpoint_.yawspeed = nan;\n\n  RCLCPP_INFO(\n    getLogger(), \"CpTrajectorySetpoint: publisher created on /fmu/in/trajectory_setpoint\");\n}\n\nvoid CpTrajectorySetpoint::setPositionNED(float x, float y, float z, float yaw)\n{\n  auto node = this->getNode();\n  auto nan = std::numeric_limits<float>::quiet_NaN();\n\n  px4_msgs::msg::TrajectorySetpoint msg;\n  msg.timestamp = node->get_clock()->now().nanoseconds() / 1000;\n  msg.position = {x, y, z};\n  msg.velocity = {nan, nan, nan};\n  msg.acceleration = {nan, nan, nan};\n  msg.jerk = {nan, nan, nan};\n  msg.yaw = yaw;\n  msg.yawspeed = nan;\n\n  publisher_->publish(msg);\n\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    lastSetpoint_ = msg;\n    hasPublished_ = true;\n  }\n\n  RCLCPP_INFO(\n    getLogger(), \"CpTrajectorySetpoint: position NED [%.2f, %.2f, %.2f] yaw=%.2f\", x, y, z, yaw);\n}\n\nvoid CpTrajectorySetpoint::hold()\n{\n  if (!localPosition_ || !localPosition_->isValid())\n  {\n    RCLCPP_WARN(getLogger(), \"CpTrajectorySetpoint::hold() - position not yet valid, skipping\");\n    return;\n  }\n\n  setPositionNED(\n    localPosition_->getX(), localPosition_->getY(), localPosition_->getZ(),\n    localPosition_->getHeading());\n}\n\nvoid CpTrajectorySetpoint::republishLast()\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  if (!hasPublished_) return;\n\n  auto node = this->getNode();\n  lastSetpoint_.timestamp = node->get_clock()->now().nanoseconds() / 1000;\n  publisher_->publish(lastSetpoint_);\n}\n\npx4_msgs::msg::TrajectorySetpoint CpTrajectorySetpoint::getLastSetpoint() const\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  return lastSetpoint_;\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/components/cp_vehicle_command.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/components/cp_vehicle_command.hpp>\n\nnamespace cl_px4_mr\n{\n\nCpVehicleCommand::CpVehicleCommand() {}\n\nCpVehicleCommand::~CpVehicleCommand() {}\n\nvoid CpVehicleCommand::onInitialize()\n{\n  auto node = this->getNode();\n  publisher_ = node->create_publisher<px4_msgs::msg::VehicleCommand>(\n    \"/fmu/in/vehicle_command\", rclcpp::QoS(1).best_effort());\n  RCLCPP_INFO(getLogger(), \"CpVehicleCommand: publisher created on /fmu/in/vehicle_command\");\n}\n\nvoid CpVehicleCommand::sendCommand(\n  uint32_t command, float param1, float param2, float param3, float param4, double param5,\n  double param6, float param7)\n{\n  auto node = this->getNode();\n  px4_msgs::msg::VehicleCommand msg;\n  msg.timestamp = node->get_clock()->now().nanoseconds() / 1000;\n  msg.command = command;\n  msg.param1 = param1;\n  msg.param2 = param2;\n  msg.param3 = param3;\n  msg.param4 = param4;\n  msg.param5 = param5;\n  msg.param6 = param6;\n  msg.param7 = param7;\n  msg.target_system = 1;\n  msg.target_component = 1;\n  msg.source_system = 1;\n  msg.source_component = 1;\n  msg.from_external = true;\n  publisher_->publish(msg);\n  RCLCPP_INFO(\n    getLogger(), \"CpVehicleCommand: sent command %u (p1=%.1f p2=%.1f p7=%.1f)\", command, param1,\n    param2, param7);\n}\n\nvoid CpVehicleCommand::arm()\n{\n  sendCommand(px4_msgs::msg::VehicleCommand::VEHICLE_CMD_COMPONENT_ARM_DISARM, 1.0f);\n}\n\nvoid CpVehicleCommand::forceArm()\n{\n  // param2 = 21196 bypasses pre-arm checks (useful for SITL without RC/GCS)\n  sendCommand(px4_msgs::msg::VehicleCommand::VEHICLE_CMD_COMPONENT_ARM_DISARM, 1.0f, 21196.0f);\n}\n\nvoid CpVehicleCommand::disarm()\n{\n  sendCommand(px4_msgs::msg::VehicleCommand::VEHICLE_CMD_COMPONENT_ARM_DISARM, 0.0f);\n}\n\nvoid CpVehicleCommand::setOffboardMode()\n{\n  sendCommand(px4_msgs::msg::VehicleCommand::VEHICLE_CMD_DO_SET_MODE, 1.0f, 6.0f);\n}\n\nvoid CpVehicleCommand::land() { sendCommand(px4_msgs::msg::VehicleCommand::VEHICLE_CMD_NAV_LAND); }\n\nvoid CpVehicleCommand::takeoff(float altitude)\n{\n  sendCommand(\n    px4_msgs::msg::VehicleCommand::VEHICLE_CMD_NAV_TAKEOFF, 0.0f, 0.0f, 0.0f, 0.0f, 0.0, 0.0,\n    altitude);\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/components/cp_vehicle_command_ack.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/components/cp_vehicle_command_ack.hpp>\n\nnamespace cl_px4_mr\n{\n\nCpVehicleCommandAck::CpVehicleCommandAck() {}\n\nCpVehicleCommandAck::~CpVehicleCommandAck() {}\n\nvoid CpVehicleCommandAck::onInitialize()\n{\n  auto node = this->getNode();\n  subscriber_ = node->create_subscription<px4_msgs::msg::VehicleCommandAck>(\n    \"/fmu/out/vehicle_command_ack\", rclcpp::SensorDataQoS(),\n    std::bind(&CpVehicleCommandAck::onAckMessage, this, std::placeholders::_1));\n  RCLCPP_INFO(getLogger(), \"CpVehicleCommandAck: subscribed to /fmu/out/vehicle_command_ack\");\n}\n\nvoid CpVehicleCommandAck::onAckMessage(const px4_msgs::msg::VehicleCommandAck::SharedPtr msg)\n{\n  lastCommand_ = msg->command;\n  lastResult_ = msg->result;\n  RCLCPP_INFO(getLogger(), \"CpVehicleCommandAck: command=%u result=%u\", msg->command, msg->result);\n  onAckReceived_();\n}\n\nuint32_t CpVehicleCommandAck::getLastAckCommand() const { return lastCommand_; }\n\nuint8_t CpVehicleCommandAck::getLastAckResult() const { return lastResult_; }\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/components/cp_vehicle_local_position.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/components/cp_vehicle_local_position.hpp>\n\nnamespace cl_px4_mr\n{\n\nCpVehicleLocalPosition::CpVehicleLocalPosition() {}\n\nCpVehicleLocalPosition::~CpVehicleLocalPosition() {}\n\nvoid CpVehicleLocalPosition::onInitialize()\n{\n  auto node = this->getNode();\n  subscriber_ = node->create_subscription<px4_msgs::msg::VehicleLocalPosition>(\n    \"/fmu/out/vehicle_local_position\", rclcpp::SensorDataQoS(),\n    std::bind(&CpVehicleLocalPosition::onPositionMessage, this, std::placeholders::_1));\n  RCLCPP_INFO(getLogger(), \"CpVehicleLocalPosition: subscribed to /fmu/out/vehicle_local_position\");\n}\n\nvoid CpVehicleLocalPosition::onPositionMessage(\n  const px4_msgs::msg::VehicleLocalPosition::SharedPtr msg)\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  x_ = msg->x;\n  y_ = msg->y;\n  z_ = msg->z;\n  heading_ = msg->heading;\n  valid_ = msg->xy_valid && msg->z_valid;\n\n  onPositionReceived_();\n}\n\nfloat CpVehicleLocalPosition::getX() const\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  return x_;\n}\n\nfloat CpVehicleLocalPosition::getY() const\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  return y_;\n}\n\nfloat CpVehicleLocalPosition::getZ() const\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  return z_;\n}\n\nfloat CpVehicleLocalPosition::getHeading() const\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  return heading_;\n}\n\nbool CpVehicleLocalPosition::isValid() const\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  return valid_;\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_px4_mr/src/cl_px4_mr/components/cp_vehicle_status.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_px4_mr/components/cp_vehicle_status.hpp>\n\nnamespace cl_px4_mr\n{\n\nCpVehicleStatus::CpVehicleStatus() {}\n\nCpVehicleStatus::~CpVehicleStatus() {}\n\nvoid CpVehicleStatus::onInitialize()\n{\n  auto node = this->getNode();\n  subscriber_ = node->create_subscription<px4_msgs::msg::VehicleStatus>(\n    \"/fmu/out/vehicle_status_v1\", rclcpp::SensorDataQoS(),\n    std::bind(&CpVehicleStatus::onStatusMessage, this, std::placeholders::_1));\n  RCLCPP_INFO(getLogger(), \"CpVehicleStatus: subscribed to /fmu/out/vehicle_status\");\n}\n\nvoid CpVehicleStatus::onStatusMessage(const px4_msgs::msg::VehicleStatus::SharedPtr msg)\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  prevArmingState_ = armingState_;\n  prevNavState_ = navState_;\n  armingState_ = msg->arming_state;\n  navState_ = msg->nav_state;\n\n  // Detect arming state changes\n  if (armingState_ != prevArmingState_)\n  {\n    if (armingState_ == px4_msgs::msg::VehicleStatus::ARMING_STATE_ARMED)\n    {\n      RCLCPP_INFO(getLogger(), \"CpVehicleStatus: ARMED\");\n      onArmed_();\n    }\n    else if (armingState_ == px4_msgs::msg::VehicleStatus::ARMING_STATE_DISARMED)\n    {\n      RCLCPP_INFO(getLogger(), \"CpVehicleStatus: DISARMED\");\n      onDisarmed_();\n    }\n  }\n\n  // Detect nav state changes\n  if (navState_ != prevNavState_)\n  {\n    RCLCPP_INFO(\n      getLogger(), \"CpVehicleStatus: nav_state changed %u -> %u\", prevNavState_, navState_);\n    onModeChanged_();\n  }\n}\n\nbool CpVehicleStatus::isArmed() const\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  return armingState_ == px4_msgs::msg::VehicleStatus::ARMING_STATE_ARMED;\n}\n\nbool CpVehicleStatus::isLanded() const\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  return armingState_ == px4_msgs::msg::VehicleStatus::ARMING_STATE_DISARMED;\n}\n\nuint8_t CpVehicleStatus::getNavState() const\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  return navState_;\n}\n\nuint8_t CpVehicleStatus::getArmingState() const\n{\n  std::lock_guard<std::mutex> lock(mutex_);\n  return armingState_;\n}\n\n}  // namespace cl_px4_mr\n"
  },
  {
    "path": "smacc2_client_library/cl_ros2_timer/CHANGELOG.rst",
    "content": "Changelog for package cl_ros2_timer\n====================================\n\n.. note::\n   This package was refactored in September 2025 from ros_timer_client.\n   For historical changes prior to 2.3.20, see ros_timer_client/CHANGELOG.rst.\n   The ros_timer_client package is now deprecated in favor of cl_ros2_timer.\n\n2.3.20 (2025-11-01)\n-------------------\n* New cl_ros2_timer unit test (`#616 <https://github.com/robosoft-ai/SMACC2/issues/616>`_)\n* Refactoring cl_ros2_timer to header-lite (`#617 <https://github.com/robosoft-ai/SMACC2/issues/617>`_)\n* Refactoring cl_ros2_timer to component-based architecture (`#618 <https://github.com/robosoft-ai/SMACC2/issues/618>`_)\n* Refactored cl_ros2_timer components to header-only (`#619 <https://github.com/robosoft-ai/SMACC2/issues/619>`_)\n* Refactor of cl_ros2_timer namespace structure (include paths) (`#623 <https://github.com/robosoft-ai/SMACC2/issues/623>`_)\n* Update include path for cl_ros2_timer (`#629 <https://github.com/robosoft-ai/SMACC2/issues/629>`_)\n* Moving reference library from ros_timer_client and keyboard_client to cl_ros2_timer and cl_keyboard (`#645 <https://github.com/robosoft-ai/SMACC2/issues/645>`_)\n* Contributors: Brett Aldrich, Pablo Iñigo Blasco\n"
  },
  {
    "path": "smacc2_client_library/cl_ros2_timer/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(cl_ros2_timer)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(\n  ${PROJECT_NAME}\n  include\n  ${smacc2_INCLUDE_DIRS}\n)\n\nadd_library(${PROJECT_NAME}\n  src/cl_ros2_timer.cpp\n)\ntarget_link_libraries(${PROJECT_NAME} SHARED ${Boost_LIBRARIES} smacc2)\nament_target_dependencies(${PROJECT_NAME} smacc2)\n\nament_export_include_directories(include)\nament_export_dependencies(smacc2 Boost)\nament_export_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(TARGETS\n  ${PROJECT_NAME}\n  DESTINATION lib/)\n\nament_package()\n"
  },
  {
    "path": "smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/cl_ros2_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <optional>\n#include <smacc2/smacc.hpp>\n\n#include <cl_ros2_timer/components/cp_timer_listener_1.hpp>\n#include <smacc2/client_core_components/cp_ros2_timer.hpp>\n\nnamespace cl_ros2_timer\n{\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvTimer : sc::event<EvTimer<TSource, TOrthogonal>>\n{\n};\n\nclass ClRos2Timer : public smacc2::ISmaccClient\n{\npublic:\n  ClRos2Timer(rclcpp::Duration duration, bool oneshot = false);\n\n  virtual ~ClRos2Timer();\n\n  // Component-based initialization\n  template <typename TOrthogonal, typename TClient>\n  void onComponentInitialization()\n  {\n    // Create the core timer component\n    this->createComponent<smacc2::client_core_components::CpRos2Timer, TOrthogonal, ClRos2Timer>(\n      duration_, oneshot_);\n\n    // Create the timer listener component that requires CpRos2Timer\n    this->createComponent<cl_ros2_timer::components::CpTimerListener1, TOrthogonal, ClRos2Timer>();\n  }\n\nprivate:\n  rclcpp::Duration duration_;\n  bool oneshot_;\n};\n}  // namespace cl_ros2_timer\n"
  },
  {
    "path": "smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/client_behaviors/cb_ros2_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_ros2_timer\n{\nclass CbTimer : public smacc2::SmaccClientBehavior\n{\npublic:\n  void onEntry() override\n  {\n    this->requiresClient(timerClient_);\n\n    // Get the timer listener component\n    cl_ros2_timer::components::CpTimerListener1 * timerListener;\n    this->requiresComponent(timerListener);\n\n    // Connect to the timer listener component\n    timerListener->onTimerCompleted(&CbTimer::onClientTimerTickCallback, this);\n  }\n\n  void onExit() override {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    this->postTimerEvent_ = [this]()\n    { this->template postEvent<EvTimer<TSourceObject, TOrthogonal>>(); };\n  }\n\n  void onClientTimerTickCallback() { this->postTimerEvent_(); }\n\nprivate:\n  ClRos2Timer * timerClient_;\n  std::function<void()> postTimerEvent_;\n};\n}  // namespace cl_ros2_timer\n"
  },
  {
    "path": "smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/client_behaviors/cb_timer_countdown_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_ros2_timer\n{\nclass CbTimerCountdownLoop : public smacc2::SmaccClientBehavior\n{\npublic:\n  explicit CbTimerCountdownLoop(int64_t triggerTickCount)\n  : tickTriggerCount_(triggerTickCount), tickCounter_(0)\n  {\n  }\n\n  void onEntry() override\n  {\n    this->requiresClient(timerClient_);\n\n    // Get the core timer component\n    smacc2::client_core_components::CpRos2Timer * timerComponent;\n    this->requiresComponent(timerComponent);\n\n    // Connect to the core timer component\n    timerComponent->onTimerTick(&CbTimerCountdownLoop::onClientTimerTickCallback, this);\n  }\n\n  void onExit() override {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    this->postCountDownEvent_ = [=]()\n    { this->template postEvent<EvTimer<TSourceObject, TOrthogonal>>(); };\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onTimerTick(void (T::*callback)(), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onTimerTick_, callback, object);\n  }\n\nprivate:\n  int64_t tickTriggerCount_;\n  int64_t tickCounter_;\n\n  ClRos2Timer * timerClient_;\n  std::function<void()> postCountDownEvent_;\n  smacc2::SmaccSignal<void()> onTimerTick_;\n  void onClientTimerTickCallback()\n  {\n    tickCounter_++;\n\n    if (tickCounter_ % tickTriggerCount_ == 0)\n    {\n      onTimerTick_();\n      postCountDownEvent_();\n    }\n  }\n};\n}  // namespace cl_ros2_timer\n"
  },
  {
    "path": "smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_ros2_timer\n{\nclass CbTimerCountdownOnce : public smacc2::SmaccClientBehavior\n{\npublic:\n  CbTimerCountdownOnce(int64_t triggerTickCount)\n  : tickCounter_(0), tickTriggerCount_(triggerTickCount)\n  {\n  }\n\n  void onEntry() override\n  {\n    this->requiresClient(timerClient_);\n\n    // Get the core timer component\n    smacc2::client_core_components::CpRos2Timer * timerComponent;\n    this->requiresComponent(timerComponent);\n\n    // Connect to the core timer component\n    timerComponent->onTimerTick(&CbTimerCountdownOnce::onClientTimerTickCallback, this);\n  }\n\n  void onExit() override {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    this->postCountDownEvent_ = [=]()\n    { this->template postEvent<EvTimer<TSourceObject, TOrthogonal>>(); };\n  }\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onTimerTick(void (T::*callback)(), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onTimerTick_, callback, object);\n  }\n\nprivate:\n  int64_t tickCounter_;\n  int64_t tickTriggerCount_;\n\n  ClRos2Timer * timerClient_;\n  std::function<void()> postCountDownEvent_;\n  smacc2::SmaccSignal<void()> onTimerTick_;\n  void onClientTimerTickCallback()\n  {\n    tickCounter_++;\n\n    if (tickCounter_ % tickTriggerCount_ == 0)\n    {\n      onTimerTick_();\n      postCountDownEvent_();\n    }\n  }\n};\n}  // namespace cl_ros2_timer\n"
  },
  {
    "path": "smacc2_client_library/cl_ros2_timer/include/cl_ros2_timer/components/cp_timer_listener_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/client_core_components/cp_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace cl_ros2_timer\n{\n// Forward declaration for EvTimer - defined in cl_ros2_timer.hpp\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvTimer;\n\nnamespace components\n{\n\nclass CpTimerListener1 : public smacc2::ISmaccComponent\n{\npublic:\n  CpTimerListener1() {}\n\n  virtual ~CpTimerListener1() {}\n\n  template <typename TOrthogonal, typename TClient>\n  void onStateOrthogonalAllocation()\n  {\n    RCLCPP_INFO(getLogger(), \"CpTimerListener1 onStateOrthogonalAllocation.\");\n\n    this->postTimerEvent_ = [this]()\n    { this->template postEvent<EvTimer<CpTimerListener1, TOrthogonal>>(); };\n  }\n\n  void onInitialize() override\n  {\n    RCLCPP_INFO(getLogger(), \"CpTimerListener1 initialization.\");\n\n    // Require the CpRos2Timer component (similar to CpKeyboardListener1 requiring CpTopicSubscriber)\n    this->requiresComponent(timerComponent_);\n\n    // Connect to the timer component's tick signal\n    timerComponent_->onTimerTick(&CpTimerListener1::onTimerTickCallback, this);\n  }\n\n  smacc2::SmaccSignal<void()> onTimerCompleted_;\n\n  template <typename T>\n  smacc2::SmaccSignalConnection onTimerCompleted(void (T::*callback)(), T * object)\n  {\n    return this->getStateMachine()->createSignalConnection(onTimerCompleted_, callback, object);\n  }\n\nprivate:\n  smacc2::client_core_components::CpRos2Timer * timerComponent_;\n  std::function<void()> postTimerEvent_;\n\n  void onTimerTickCallback()\n  {\n    RCLCPP_DEBUG(getLogger(), \"CpTimerListener1 received timer tick.\");\n\n    // Emit our own signal for client behaviors to connect to\n    if (!onTimerCompleted_.empty())\n    {\n      onTimerCompleted_();\n    }\n\n    // Post SMACC2 event for state transitions\n    if (postTimerEvent_)\n    {\n      postTimerEvent_();\n    }\n  }\n};\n\n}  // namespace components\n}  // namespace cl_ros2_timer\n"
  },
  {
    "path": "smacc2_client_library/cl_ros2_timer/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>cl_ros2_timer</name>\n  <version>3.0.1</version>\n  <description>The cl_ros2_timer package</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_client_library/cl_ros2_timer/src/cl_ros2_timer.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n\nnamespace cl_ros2_timer\n{\nClRos2Timer::ClRos2Timer(rclcpp::Duration duration, bool oneshot)\n: duration_(duration), oneshot_(oneshot)\n{\n}\n\nClRos2Timer::~ClRos2Timer()\n{\n  // Components are automatically cleaned up by the framework\n}\n\n}  // namespace cl_ros2_timer\n"
  },
  {
    "path": "smacc2_dev_tools/.vscode/c_cpp_properties.json",
    "content": "{\n    \"configurations\": [\n        {\n            \"name\": \"Linux\",\n            \"includePath\": [\n                \"${workspaceFolder}/**\",\n                \"/usr/include\",\n                \"/usr/local/include\",\n                \"/usr/include/x86_64-linux-gnu\",\n                \"/usr/include/x86_64-linux-gnu/c++/13\",\n                \"/usr/include/x86_64-linux-gnu/qt5\",\n                \"/usr/include/eigen3\",\n                \"/usr/include/pcl-1.14\",\n                \"/usr/include/opencv4\",\n                \"/usr/include/vtk-9.1\",\n                \"/opt/ros/jazzy/include/**\",\n                \"${workspaceFolder}/SMACC2/smacc2/include\",\n                \"${workspaceFolder}/SMACC2/smacc2_client_library/cl_generic_sensor/include\",\n                \"${workspaceFolder}/SMACC2/smacc2_client_library/cl_http/include\",\n                \"${workspaceFolder}/SMACC2/smacc2_client_library/cl_keyboard/include\",\n                \"${workspaceFolder}/SMACC2/smacc2_client_library/cl_lifecycle_node/include\",\n                \"${workspaceFolder}/SMACC2/smacc2_client_library/cl_moveit2z/include\",\n                \"${workspaceFolder}/SMACC2/smacc2_client_library/cl_nav2z/include\",\n                \"${workspaceFolder}/SMACC2/smacc2_client_library/cl_ros2_timer/include\",\n                \"${workspaceFolder}/SMACC2/smacc2_event_generator_library/eg_conditional_generator/include\",\n                \"${workspaceFolder}/SMACC2/smacc2_event_generator_library/eg_random_generator/include\",\n                \"${workspaceFolder}/SMACC2/smacc2_state_reactor_library/sr_all_events_go/include\",\n                \"${workspaceFolder}/SMACC2/smacc2_state_reactor_library/sr_conditional/include\",\n                \"${workspaceFolder}/SMACC2/smacc2_state_reactor_library/sr_event_countdown/include\",\n                \"${workspaceFolder}/SMACC2/install/smacc2/include\",\n                \"${workspaceFolder}/SMACC2/install/smacc2_msgs/include\",\n                \"${workspaceFolder}/SMACC2_RTA/src/3rdParty/cryptolens-cpp/include\"\n            ],\n            \"defines\": [],\n            \"compilerPath\": \"/usr/bin/clang\",\n            \"cStandard\": \"c17\",\n            \"cppStandard\": \"c++17\",\n            \"intelliSenseMode\": \"linux-clang-x64\"\n        }\n    ],\n    \"version\": 4\n}\n"
  },
  {
    "path": "smacc2_dev_tools/.vscode/gdb-run.sh",
    "content": "#!/usr/bin/env bash\nset -e\nsource /opt/ros/jazzy/setup.bash\nif [ -f /workspaces/isaac_ros-dev/install/setup.bash ]; then\n  source /workspaces/isaac_ros-dev/install/setup.bash\nfi\nexec \"$@\"\n"
  },
  {
    "path": "smacc2_dev_tools/.vscode/launch.json",
    "content": "{\n    // Use IntelliSense to learn about possible attributes.\n    // Hover to view descriptions of existing attributes.\n    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n    \"version\": \"0.2.0\",\n    \"configurations\": [\n\n\n        {\n            \"name\": \"GenerateDebians\",\n            \"type\": \"python\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/SMACC2_RTA/ci/generate_debs.py\",\n            \"args\": [\"-src_folder\",\n                \".\",\n                \"-ubuntu_version\", \"focal\", \"-ros_version\", \"galactic\", \"-repo_owner\", \"robosoft-ai\"\n                , \"-repo_name\", \"SMACC2_RTA-academic\" ,\"-packages\",  \"smacc2_rta\"\n            ],\n            \"cwd\": \"${workspaceFolder}/SMACC2_RTA/\",\n            \"console\": \"integratedTerminal\"\n        },\n        \n        // IRDC (Dockerized) GDB Configurations\n        {\n    \"name\": \"(gdb) sm_nav2_test_10 (docker admin)\",\n    \"type\": \"cppdbg\",\n    \"request\": \"launch\",\n\n    \"program\": \"/home/admin/.vscode-gdb-run.sh\",\n    \"args\": [\n        \"/workspaces/isaac_ros-dev/install/sm_nav2_test_10/lib/sm_nav2_test_10/sm_nav2_test_10_node\",\n        \"--ros-args\", \"--log-level\", \"INFO\",\n        \"--ros-args\", \"-r\", \"__node:=SmNav2Test10\",\n        \"--params-file\", \"/workspaces/isaac_ros-dev/install/sm_nav2_test_10/share/sm_nav2_test_10/config/sm_nav2_test_10_config.yaml\"\n    ],\n\n    \"cwd\": \"/workspaces/isaac_ros-dev\",\n    \"MIMode\": \"gdb\",\n    \"externalConsole\": false,\n\n\"pipeTransport\": {\n  \"pipeProgram\": \"docker\",\n  \"pipeArgs\": [\"exec\",\"-i\",\"-u\",\"admin\",\"isaac_ros_dev-x86_64-container\",\"/bin/bash\",\"-l\",\"-c\"],\n  \"debuggerPath\": \"/usr/bin/gdb\",\n  \"pipeCwd\": \"/workspaces/isaac_ros-dev\"\n},\n\n\n    \"sourceFileMap\": {\n        \"/workspaces/isaac_ros-dev\": \"${workspaceFolder}\"\n    },\n\n    \"setupCommands\": [\n        { \"text\": \"-enable-pretty-printing\", \"ignoreFailures\": true },\n        { \"text\": \"set breakpoint pending on\" },\n        { \"text\": \"set pagination off\" },\n        { \"text\": \"set exec-wrapper /home/admin/.vscode-gdb-run.sh\" }\n        ]\n},\n{\n  \"name\": \"(gdbserver) sm_nav2_test_10\",\n  \"type\": \"cppdbg\",\n  \"request\": \"launch\",\n  \"program\": \"${workspaceFolder}/../install/sm_nav2_test_10/lib/sm_nav2_test_10/sm_nav2_test_10_node\",\n  \"cwd\": \"${workspaceFolder}\",\n\n  \"preLaunchTask\": \"start gdbserver sm_nav2_test_10\",\n  \"postDebugTask\": \"stop gdbserver sm_nav2_test_10\",\n\n  \"MIMode\": \"gdb\",\n  \"miDebuggerPath\": \"/usr/bin/gdb\",\n  \"miDebuggerServerAddress\": \"localhost:2345\",\n  \"externalConsole\": false,\n\n  \"environment\": [\n    {\n      \"name\": \"TARGET_PROGRAM\",\n      \"value\": \"/workspaces/isaac_ros-dev/install/sm_nav2_test_10/lib/sm_nav2_test_10/sm_nav2_test_10_node\"\n    }\n  ],\n\n  \"setupCommands\": [\n    { \"text\": \"-enable-pretty-printing\", \"ignoreFailures\": true },\n    { \"text\": \"set pagination off\" },\n    { \"text\": \"set breakpoint pending on\" },\n    { \"text\": \"set breakpoint always-inserted on\" },\n    { \"text\": \"set stop-on-solib-events 1\" }\n  ],\n\n  \"stopAtEntry\": false\n},\n        // Standard/Native GDB Configurations\n        {\n            \"name\": \"(gdb) sm_advanced_recovery_1\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_advanced_recovery_1/lib/sm_advanced_recovery_1/sm_advanced_recovery_1_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_atomic\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_atomic/lib/sm_atomic/sm_atomic_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_atomic_http\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_atomic_http/lib/sm_atomic_http/sm_atomic_http_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_atomic_lifecycle\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_atomic_lifecycle/lib/sm_atomic_lifecycle/sm_atomic_lifecycle_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_atomic_mode_states\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_atomic_mode_states/lib/sm_atomic_mode_states/sm_atomic_mode_states_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_atomic_performance_trace_1\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_atomic_performance_trace_1/lib/sm_atomic_performance_trace_1/sm_atomic_performance_trace_1_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_atomic_subscribers_performance_test\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_atomic_subscribers_performance_test/lib/sm_atomic_subscribers_performance_test/sm_atomic_subscribers_performance_test_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_branching\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_branching/lib/sm_branching/sm_branching_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_cl_keyboard_unit_test_1\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_cl_keyboard_unit_test_1/lib/sm_cl_keyboard_unit_test_1/sm_cl_keyboard_unit_test_1_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_cl_ros2_timer_unit_test_1\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_cl_ros2_timer_unit_test_1/lib/sm_cl_ros2_timer_unit_test_1/sm_cl_ros2_timer_unit_test_1_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_coretest_transition_speed_1\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_coretest_transition_speed_1/lib/sm_coretest_transition_speed_1/sm_coretest_transition_speed_1_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_multi_stage_1\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_multi_stage_1/lib/sm_multi_stage_1/sm_multi_stage_1_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_multithread_test_1\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_multithread_test_1/lib/sm_multithread_test_1/sm_multithread_test_1_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_pack_ml\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_pack_ml/lib/sm_pack_ml/sm_pack_ml_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_panda_cl_moveit2z_cb_inventory\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_panda_cl_moveit2z_cb_inventory/lib/sm_panda_cl_moveit2z_cb_inventory/sm_panda_cl_moveit2z_cb_inventory_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_simple_action_client\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_simple_action_client/lib/sm_simple_action_client/sm_simple_action_client_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        {\n            \"name\": \"(gdb) sm_three_some\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/sm_three_some/lib/sm_three_some/sm_three_some_node\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        // Tools\n        {\n            \"name\": \"(gdb) smacc_rta\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${workspaceFolder}/../install/smacc2_rta/lib/smacc2_rta/smacc2_rta\",\n            \"args\": [],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        },\n        // Attach Configurations\n        {\n            \"name\": \"(gdb) Attach sm_panda_cl_moveit2z_cb_inventory\",\n            \"type\": \"cppdbg\",\n            \"request\": \"attach\",\n            \"program\": \"${workspaceFolder}/../install/sm_panda_cl_moveit2z_cb_inventory/lib/sm_panda_cl_moveit2z_cb_inventory/sm_panda_cl_moveit2z_cb_inventory_node\",\n            \"processId\": \"${command:pickProcess}\",\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                },\n                {\n                    \"description\": \"Set Disassembly Flavor to Intel\",\n                    \"text\": \"-gdb-set disassembly-flavor intel\",\n                    \"ignoreFailures\": true\n                }\n            ]\n        }\n    ]\n}\n"
  },
  {
    "path": "smacc2_dev_tools/.vscode/settings.json",
    "content": "{  \n    \"ros.distro\": \"jazzy\",\n\n    \"files.associations\": {\n        \"cctype\": \"cpp\",\n        \"clocale\": \"cpp\",\n        \"cmath\": \"cpp\",\n        \"csignal\": \"cpp\",\n        \"cstdarg\": \"cpp\",\n        \"cstddef\": \"cpp\",\n        \"cstdio\": \"cpp\",\n        \"cstdlib\": \"cpp\",\n        \"cstring\": \"cpp\",\n        \"ctime\": \"cpp\",\n        \"cwchar\": \"cpp\",\n        \"cwctype\": \"cpp\",\n        \"array\": \"cpp\",\n        \"atomic\": \"cpp\",\n        \"strstream\": \"cpp\",\n        \"*.tcc\": \"cpp\",\n        \"bitset\": \"cpp\",\n        \"chrono\": \"cpp\",\n        \"codecvt\": \"cpp\",\n        \"complex\": \"cpp\",\n        \"condition_variable\": \"cpp\",\n        \"cstdint\": \"cpp\",\n        \"deque\": \"cpp\",\n        \"list\": \"cpp\",\n        \"unordered_map\": \"cpp\",\n        \"unordered_set\": \"cpp\",\n        \"vector\": \"cpp\",\n        \"exception\": \"cpp\",\n        \"algorithm\": \"cpp\",\n        \"functional\": \"cpp\",\n        \"iterator\": \"cpp\",\n        \"map\": \"cpp\",\n        \"memory\": \"cpp\",\n        \"memory_resource\": \"cpp\",\n        \"numeric\": \"cpp\",\n        \"optional\": \"cpp\",\n        \"random\": \"cpp\",\n        \"ratio\": \"cpp\",\n        \"set\": \"cpp\",\n        \"string\": \"cpp\",\n        \"string_view\": \"cpp\",\n        \"system_error\": \"cpp\",\n        \"tuple\": \"cpp\",\n        \"type_traits\": \"cpp\",\n        \"utility\": \"cpp\",\n        \"slist\": \"cpp\",\n        \"fstream\": \"cpp\",\n        \"future\": \"cpp\",\n        \"initializer_list\": \"cpp\",\n        \"iomanip\": \"cpp\",\n        \"iosfwd\": \"cpp\",\n        \"iostream\": \"cpp\",\n        \"istream\": \"cpp\",\n        \"limits\": \"cpp\",\n        \"mutex\": \"cpp\",\n        \"new\": \"cpp\",\n        \"ostream\": \"cpp\",\n        \"sstream\": \"cpp\",\n        \"stdexcept\": \"cpp\",\n        \"streambuf\": \"cpp\",\n        \"thread\": \"cpp\",\n        \"cfenv\": \"cpp\",\n        \"cinttypes\": \"cpp\",\n        \"typeindex\": \"cpp\",\n        \"typeinfo\": \"cpp\",\n        \"variant\": \"cpp\",\n        \"shared_mutex\": \"cpp\",\n        \"bit\": \"cpp\",\n        \"forward_list\": \"cpp\",\n        \"any\": \"cpp\",\n        \"hash_map\": \"cpp\",\n        \"hash_set\": \"cpp\",\n        \"regex\": \"cpp\",\n        \"valarray\": \"cpp\",\n        \"*.idl\": \"cpp\",\n        \"graphicscontext\": \"cpp\",\n        \"quat\": \"cpp\",\n        \"vec2b\": \"cpp\",\n        \"vec2d\": \"cpp\",\n        \"vec2f\": \"cpp\",\n        \"vec2i\": \"cpp\",\n        \"vec2s\": \"cpp\",\n        \"vec2ub\": \"cpp\",\n        \"vec2ui\": \"cpp\",\n        \"vec2us\": \"cpp\",\n        \"vec3b\": \"cpp\",\n        \"vec3d\": \"cpp\",\n        \"vec3f\": \"cpp\",\n        \"vec3i\": \"cpp\",\n        \"vec3s\": \"cpp\",\n        \"vec3ub\": \"cpp\",\n        \"vec3ui\": \"cpp\",\n        \"vec3us\": \"cpp\",\n        \"vec4b\": \"cpp\",\n        \"vec4d\": \"cpp\",\n        \"vec4f\": \"cpp\",\n        \"vec4i\": \"cpp\",\n        \"vec4s\": \"cpp\",\n        \"vec4ub\": \"cpp\",\n        \"vec4ui\": \"cpp\",\n        \"vec4us\": \"cpp\",\n        \"viewport\": \"cpp\",\n        \"node\": \"cpp\",\n        \"callback\": \"cpp\",\n        \"image\": \"cpp\",\n        \"primitiveset\": \"cpp\",\n        \"*.ipp\": \"cpp\",\n        \"core\": \"cpp\",\n        \"compare\": \"cpp\",\n        \"concepts\": \"cpp\",\n        \"*.txx\": \"cpp\"\n\n    },\n    \"python.autoComplete.extraPaths\": [\n        \"/opt/ros/jazzy/lib/python3.10/site-packages\"\n    ],\n    \"python.analysis.extraPaths\": [\n        \"/opt/ros/jazzy/lib/python3.10/site-packages\"\n    ],\n    \"cmake.sourceDirectory\": \"~/Desktop/workspace/isaac_ros-dev/src/SMACC2/.work/target_ws/build/smacc2_msgs/smacc2_msgs__py\",\n\n}\n"
  },
  {
    "path": "smacc2_dev_tools/.vscode/tasks.json",
    "content": "{\n  \"version\": \"2.0.0\",\n  \"tasks\": [\n    {\n      \"label\": \"start gdbserver sm_nav2_test_10\",\n      \"type\": \"process\",\n      \"command\": \"docker\",\n      \"args\": [\n        \"exec\", \"-d\",\n        \"-u\", \"admin\",\n        \"-e\", \"DISPLAY\",\n        \"-e\", \"XAUTHORITY=/home/admin/.Xauthority\",\n        \"-e\", \"QT_X11_NO_MITSHM=1\",\n        \"isaac_ros_dev-x86_64-container\",\n        \"bash\", \"-lc\",\n        \"konsole --hold -e bash -lc 'source /opt/ros/jazzy/setup.bash; source /workspaces/isaac_ros-dev/install/setup.bash; exec gdbserver :2345 /workspaces/isaac_ros-dev/build/sm_nav2_test_10/sm_nav2_test_10_node --ros-args --log-level INFO --ros-args -r __node:=SmNav2Test10 --params-file /workspaces/isaac_ros-dev/install/sm_nav2_test_10/share/sm_nav2_test_10/config/sm_nav2_test_10_config.yaml'\"\n      ],\n      \"problemMatcher\": [],\n      \"presentation\": { \"reveal\": \"never\", \"panel\": \"shared\", \"showReuseMessage\": false }\n    },\n    {\n      \"label\": \"stop gdbserver sm_nav2_test_10\",\n      \"type\": \"process\",\n      \"command\": \"docker\",\n      \"args\": [\n        \"exec\", \"-u\", \"admin\",\n        \"isaac_ros_dev-x86_64-container\",\n        \"bash\", \"-lc\",\n        \"pkill -f 'gdbserver .*sm_nav2_test_10_node' || true\"\n      ],\n      \"problemMatcher\": [],\n      \"presentation\": { \"reveal\": \"never\", \"panel\": \"shared\", \"showReuseMessage\": false }\n    }\n  ]\n}\n"
  },
  {
    "path": "smacc2_dev_tools/claude/Prompts.md",
    "content": "### Loading Key Files into Context\n```\nLoad the following files into context:\nsrc/SMACC2/.claude/settings.json\nsrc/SMACC2/CLAUDE.md\nsrc/SMACC2/smacc2_client_library/CLAUDE.md\nsrc/SMACC2/smacc2_sm_reference_library/CLAUDE.md\n```\n### Client & Initial State Machine Creation: PX4\n```\nUltrathink and make a plan, but don't code yet, to create a new client: cl_px4_mr\nWhat should the component architecture look like? What components will be necessary achieve the Client behaviors listed?\n\nAnd a simple state machine application to serve as a unit test...\n\n\tNamed: sm_cl_phx_mr_test_1\n\tLocated: src/SMACC2/smacc2_sm_reference_library/\n \nThe state machine should have the following architecture: \nMsDisarmedOnGround | MsArmedOnGround | MsTakeoff | MsInFlight| MsLanding | MsLanded |\n\nAnd should proceed in a linear pattern. \n\nMsDisarmedOnGround:StArmPX4:CbArmPX4  | MsArmedOnGround:StPrepareForTakeoff:CbWait | MsTakeoff:StTakeoff:CbTakeOff | MsInFlight:StGoToWaypoint1:CbGoToLocation, MsInFlight:StOrbitLocation:CbOrbitLocation, MsInFlight:StReturnToBase:CbGoToLocation | MsLanding:StLand:CbLand | MsLanded:StLanded:CbDisarmPX4 | \n\nWith the following client behaviors: \n\ncbGoToLocation\nCbOrbitLocation\nCbArmPX4\nCbDisarmPX4\nCbTakeOff\nCbLand\n\nOur initial test will be connecting to the instance of...\nmake px4_sitl gz_x500\n\nAll runtime testing will be performed by me (the human). Let me know when to conduct a test and Ill let you know the results.\n```\n### State Machine Creation: sm_nav2_unit_test_1\n```\nUltrathink and make a plan, but don't code yet, to create a new package in the reference library, sm_nav2_unit_test_1.\n\nThe packages launch file should follow the pattern of the other launch files in the sm_reference_library, but it should also launch the 'nav2_bringup tb3_simulation_launch.py headless:=False' launch file.\n\nFor the State Machine, lets create four states, with the specified behaviors in each state.\nStAllSensorsGo:CbTimerCountdownOnce(10), CbDefaultKeyboardBehavior -> StNavigateToWaypoint1:CbNavigateGlobalPosition,CbDefaultKeyboardBehavior -> StRotate:CbPureSpinning -> StNavigateToWaypoint2:CbNavigateGlobalPosition ->StFinalState\n\nAnd 3 orthogonals \nOrNavigation:cl_nav2z\nOrTimer:cl_ros2_timer\nOrKeyboard: cl_keyboard\n\nOrganize the phases of the plan so that each phase can be successfully compiled and tested at runtime\nusing the sm_panda_cl_moveit2z_cb_inventory package.\n\nAll testing will be performed by me (the human). Let me know when to conduct a test and Ill let you know\nthe results.\n```\n### State Machine Debugging\n```\nlets run and debug the sm_panda_moveit2z_cb_inventory package. Use the launch command ros2 launch sm_panda_moveit2z_cb_inventory sm_panda_moveit2z_cb_inventory.launch.py and monitor the topic using the command: \nsource install/setup.bash && ros2 topic echo /SmPandaMoveit2zCbInventory/smacc/transition_log\n\nThe following states aren't working in the sense that they show no movement:\nStMoveCartesianRelative2\nStMoveCartesianRelative\nStPouringMotion\nStCircularPivotMotion\n\n look in the log files (~/.ros/log) for the most recent state machine run.\n  Analyse the move_group, state machine, and other logs and creat a plan to\n  fix the error messages that are occuring in StMoveCartesianRelative2\n```\n### Client Refactoring\n```\nThink hard and make a plan, but don't code yet, to refactor the cl_ros2_timer package so that its style follows the component based architecture shown in the cl_keyboard package. The plan should create two new components:\n smacc2::client_core_components::CpRos2Timer\n cl_ros2_timer::components::CpTimerListener1\n    \nwhere cl_ros2_timer::components::CpTimerListener1 depends on smacc2::client_core_components::CpRos2Timer.\nThe logic found in ClRos2Timer::onInitialize() should be moved to smacc2::client_core_components::CpRos2Timer. The logic found in ClRos2Timer::timerCallback() should be moved to cl_ros2_timer::components::CpTimerListener1\n\nUse the cl_keyboard as the example, and compile and test frequently using the sm_cl_ros2_timer_unit_test_1 package and the run command:ros2 launch\n sm_cl_ros2_timer_unit_test_1 \n sm_cl_ros2_timer_unit_test_1.launch\n```\n```\nThink hard and make a plan, but don't code yet, to refactor the cl_moveit2z package so that its style follows a pure component based architecture. \n\nOrganize the phases of the so that each phase can be successfully compiled and tested at runtime using the sm_panda_cl_moveit2z_cb_inventory package.\n\nCRITICAL: Do not modify the sm_panda_cl_moveit2z_cb_inventory package for any reason.\n\nAll testing will be performed by me (the human). Let me know when to conduct a test and Ill let you know the results. \n```\n```\nUltrathink and make a plan, but don't code yet, to refactor the cl_moveit2z package so that all of the client behaviors are header-only.\n\nOrganize the phases of the plan so that each phase can be successfully compiled and tested at runtime using the sm_panda_cl_moveit2z_cb_inventory package.\n\nCRITICAL: Do not modify the sm_panda_cl_moveit2z_cb_inventory package for any reason.\n```\n### Let's stop this from happening again\n```\nyes, but first please suggest some edits to the sm_reference_library CLAUDE.md file Runtime Test Procedures section so that this never happens again.\n```\n```\nadd the bash command i approved to the src/SMACC2/.claude/settings.json file\n```\n### Critical Requirements Example\n```\nPerform a test running the sm_panda_moveit2z_cb_inventory package, following\n  the Runtime Test Procedures described in the smacc2_sm_reference_library/CLAUDE.md\n  file. Perform the test 3 times in a row, in all tests the state machine\n  should at least transition out of StKnownState1, before closing it Check this by looking at the transition_log topic. \n  \n   #### ⚠️ CRITICAL: Test Completion Requirements\n  **When instructed to perform multiple tests (e.g., \"3 tests\"), Claude MUST\n  complete ALL tests as specified. No exceptions.**\n\n  **Enforcement rules:**\n  - Use TodoWrite tool to track all test completions and enforce accountability\n\n  Follow the test procedures exactly. Take no shortcuts. \n  Focus only on test results and errors. Ignore routine ROS node startup messages, background process outputs, and standard system logs unless they indicate failures.\n```\n\nAll testing will be performed by me (the human). Let me know when to conduct a test and Ill let you know the results. \n```\n"
  },
  {
    "path": "smacc2_dev_tools/docker/Dockerfile",
    "content": "ARG ROS_DISTRO=rolling\nARG GIT_BRANCH=master\nARG UBUNTU_VERSION=focal\n\nFROM ros:$ROS_DISTRO-ros-base-$UBUNTU_VERSION\n\nARG ROS_DISTRO\nARG GIT_BRANCH\nARG LOCAL_FOLDER_SOURCE=1\n\nRUN apt-get update \\\n  && apt-get upgrade -y \\\n  && apt-get clean\n\nRUN apt-get update && apt-get install -q -y --no-install-recommends \\\n  dirmngr \\\n  gnupg2 \\\n  lsb-release \\\n  python3-colcon-ros \\\n  && apt-get clean \\\n  && apt upgrade -y --with-new-pkgs\n\nWORKDIR \"/home/ros2_ws/src\"\n\nRUN echo \"copying current code version to docker image:\"\nADD . /home/ros2_ws/src/SMACC2\nWORKDIR \"/home/ros2_ws\"\n\n# install dependencies and build\nRUN vcs import  src --skip-existing --input src/SMACC2/.github/SMACC2-not-released.$ROS_DISTRO.repos\nRUN ls src\n\nRUN apt update\nRUN rosdep install --from-paths src --ignore-src -r -y\nRUN apt-get update && apt-get install -q -y --no-install-recommends xterm\n\nRUN bash -c \"source /opt/ros/$ROS_DISTRO/setup.sh && colcon build --merge-install --parallel-workers 1\"\n"
  },
  {
    "path": "smacc2_dev_tools/docker/build_docker.sh",
    "content": "#!/bin/sh\nDIR=\"$(dirname \"$(realpath \"$0\")\")\"\necho $DIR\ncd $DIR/..\necho `pwd`\n\nROS_DISTRO=$1\nGIT_BRANCH=$2\nUBUNTU_VERSION=$3\nNOCACHE=\"--no-cache\"\nNOCACHE=\n\nROOT_DIR=`realpath $DIR/../..`\n\necho \"ros distro: $ROS_DISTRO\"\necho \"git branch: $GIT_BRANCH\"\necho \"ubuntu version: $UBUNTU_VERSION\"\necho \"root path: $ROOT_DIR\"\n\ncd $ROOT_DIR\nsudo docker build --build-arg ROS_DISTRO=$ROS_DISTRO --build-arg GIT_BRANCH=$GIT_BRANCH --build-arg UBUNTU_VERSION=$UBUNTU_VERSION -t smacc2:$ROS_DISTRO --progress string -f $ROOT_DIR/smacc2_dev_tools/docker/Dockerfile . $NOCACHE\n"
  },
  {
    "path": "smacc2_dev_tools/docker/build_docker_foxy.sh",
    "content": "#!/bin/sh\n\nDIR=\"$(dirname \"$(realpath \"$0\")\")\"\necho $DIR\n$DIR/build_docker.sh foxy foxy focal\n"
  },
  {
    "path": "smacc2_dev_tools/docker/build_docker_galactic.sh",
    "content": "#!/bin/sh\nDIR=\"$(dirname \"$(realpath \"$0\")\")\"\necho $DIR\n$DIR/build_docker.sh galactic galactic focal\n"
  },
  {
    "path": "smacc2_dev_tools/docker/build_docker_humble.sh",
    "content": "#!/bin/sh\nDIR=\"$(dirname \"$(realpath \"$0\")\")\"\necho $DIR\n$DIR/build_docker.sh jazzy jazzy jammy\n"
  },
  {
    "path": "smacc2_dev_tools/docker/build_docker_rolling.sh",
    "content": "#!/bin/sh\nDIR=\"$(dirname \"$(realpath \"$0\")\")\"\necho $DIR\n$DIR/build_docker.sh rolling master focal\n"
  },
  {
    "path": "smacc2_dev_tools/docker/examples/run_sm_atomic.sh",
    "content": "#!/bin/sh\nsudo docker run -e DISPLAY -it smacc2 /bin/bash -c 'source /opt/ros/rolling/setup.sh && source /home/ros2_ws/install/setup.sh && ros2 launch sm_atomic sm_atomic.launch'\n"
  },
  {
    "path": "smacc2_dev_tools/docker/run_docker_bash_foxy.sh",
    "content": "#!/bin/sh\nxhost +\n\nDIR=\"$(dirname \"$(realpath \"$0\")\")\"\nROOT_DIR=`realpath $DIR/../..`\n\nsudo nvidia-docker  run -it -e DISPLAY  -e QT_X11_NO_MITSHM=1 -v $ROOT_DIR:/home/ros2_ws/src/SMACC2  -v /tmp/.X11-unix:/tmp/.X11-unix smacc2:foxy /bin/bash\n"
  },
  {
    "path": "smacc2_dev_tools/docker/run_docker_bash_galactic.sh",
    "content": "#!/bin/sh\nxhost +\n\nDIR=\"$(dirname \"$(realpath \"$0\")\")\"\nROOT_DIR=`realpath $DIR/../..`\n\nsudo nvidia-docker  run -it -e DISPLAY  -e QT_X11_NO_MITSHM=1 -v $ROOT_DIR:/home/ros2_ws/src/SMACC2  -v /tmp/.X11-unix:/tmp/.X11-unix smacc2:galactic /bin/bash\n"
  },
  {
    "path": "smacc2_dev_tools/docker/run_docker_bash_humble.sh",
    "content": "#!/bin/sh\nxhost +\n\nDIR=\"$(dirname \"$(realpath \"$0\")\")\"\nROOT_DIR=`realpath $DIR/../..`\n\nsudo nvidia-docker  run -it -e DISPLAY  -e QT_X11_NO_MITSHM=1 -v $ROOT_DIR:/home/ros2_ws/src/SMACC2  -v /dev/dri:/dev/dri -v /tmp/.X11-unix:/tmp/.X11-unix smacc2:jazzy /bin/bash\n"
  },
  {
    "path": "smacc2_dev_tools/sandbox/cp_ros_control_interface.cpp.disabled",
    "content": "#include <smacc/client_core_components/cp_ros_control_interface.h>\n\n#include <controller_manager_msgs/ListControllerTypes.h>\n#include <controller_manager_msgs/ListControllers.h>\n#include <controller_manager_msgs/LoadController.h>\n#include <controller_manager_msgs/ReloadControllerLibraries.h>\n#include <controller_manager_msgs/SwitchController.h>\n#include <controller_manager_msgs/UnloadController.h>\n\nnamespace smacc2\n{\nnamespace components\n{\nusing namespace controller_manager_msgs;\n\nCpRosControlInterface::CpRosControlInterface()\n{\n}\n\nCpRosControlInterface::~CpRosControlInterface()\n{\n}\n\nvoid CpRosControlInterface::onInitialize()\n{\n    srvListControllers = nh_.serviceClient<ListControllers>(*serviceName_);\n    srvListControllersTypes = nh_.serviceClient<ListControllerTypes>(*serviceName_);\n\n    srvLoadController = nh_.serviceClient<LoadController>(*serviceName_);\n    srvUnloadController = nh_.serviceClient<UnloadController>(*serviceName_);\n    srvReloadControllerLibraries = nh_.serviceClient<ReloadControllerLibraries>(*serviceName_);\n    srvSwitchControllers = nh_.serviceClient<SwitchController>(*serviceName_);\n}\n\nstd::vector<controller_manager_msgs::ControllerState> CpRosControlInterface::listControllers()\n{\n    ListControllers::Request req;\n    ListControllers::Response res;\n\n    srvListControllers.call(req, res);\n    return res.controller;\n}\n\nstd::vector<ControllerTypeInfo> CpRosControlInterface::listControllerTypes()\n{\n    ListControllerTypes::Request req;\n    ListControllerTypes::Response res;\n    srvListControllersTypes.call(req, res);\n\n    std::vector<ControllerTypeInfo> ret;\n    for (int i = 0; i < res.types.size(); i++)\n    {\n        ControllerTypeInfo entry;\n        entry.type = res.types[i];\n        entry.baseClass = res.base_classes[i];\n\n        ret.push_back(entry);\n    }\n\n    return ret;\n}\n\nbool CpRosControlInterface::loadController(std::string name)\n{\n    LoadController::Request req;\n    LoadController::Response res;\n    req.name = name;\n\n    srvLoadController.call(req, res);\n    return res.ok;\n}\n\nbool CpRosControlInterface::unloadController(std::string name)\n{\n    UnloadController::Request req;\n    UnloadController::Response res;\n\n    req.name = name;\n    srvUnloadController.call(req, res);\n    return res.ok;\n}\n\nbool CpRosControlInterface::reloadControllerLibraries(bool forceKill)\n{\n    ReloadControllerLibraries::Request req;\n    ReloadControllerLibraries::Response res;\n    req.force_kill = forceKill;\n\n    srvReloadControllerLibraries.call(req, res);\n\n    return res.ok;\n    //srvReloadControllerLibraries\n}\n\nbool CpRosControlInterface::switchControllers(std::vector<std::string> start_controllers,\n                                              std::vector<std::string> stop_controllers,\n                                              Strictness strictness)\n{\n    SwitchController::Request req;\n    SwitchController::Response res;\n\n    req.start_controllers = start_controllers;\n    req.stop_controllers = stop_controllers;\n    req.strictness = strictness;\n\n    srvSwitchControllers.call(req, res);\n\n    return res.ok;\n}\n}\n}\n"
  },
  {
    "path": "smacc2_dev_tools/sandbox/cp_ros_control_interface.h.disabled",
    "content": "#pragma once\n#include <smacc/component.h>\n//#include <controller_manager_msgs/ControllerState.h>\n#include <controller_manager_msgs/msg/controller_state.h>\n\nnamespace smacc2\n{\nnamespace components\n{\nstruct ControllerTypeInfo\n{\n    std::string type;\n    std::string baseClass;\n};\n\nenum Strictness\n{\n    BEST_EFFORT = 1,\n    STRICT = 2\n};\n\nclass CpRosControlInterface : public smacc2::ISmaccComponent\n{\npublic:\n    CpRosControlInterface();\n\n    virtual ~CpRosControlInterface();\n\n    virtual void onInitialize() override;\n\n    // template <typename TOrthogonal, typename TSourceObject>\n    // void onStateOrthogonalAllocation() {}\n\n    std::vector<ControllerTypeInfo> listControllerTypes();\n\n    std::vector<controller_manager_msgs::ControllerState> listControllers();\n\n    bool loadController(std::string name);\n\n    bool unloadController(std::string name);\n\n    bool reloadControllerLibraries(bool forceKill);\n\n    bool switchControllers(std::vector<std::string> start_controllers,\n                           std::vector<std::string> stop_controllers,\n                           Strictness strictness);\n\n    boost::optional<std::string> serviceName_;\n\nprivate:\n    ros::NodeHandle nh_;\n\n    ros::ServiceClient srvListControllers;\n    ros::ServiceClient srvListControllersTypes;\n    ros::ServiceClient srvLoadController;\n    ros::ServiceClient srvReloadControllerLibraries;\n    ros::ServiceClient srvSwitchControllers;\n    ros::ServiceClient srvUnloadController;\n};\n}\n}\n"
  },
  {
    "path": "smacc2_dev_tools/sm_reference_lib_run_commands.md",
    "content": "```\nros2 launch sm_advanced_recovery_1 sm_advanced_recovery_1.py\n```\n\n```\nros2 launch sm_atomic sm_atomic.py\n```\n\n```\nros2 launch sm_atomic_lifecycle sm_atomic_lifecycle.py\n```\n\n```\nros2 launch sm_atomic_mode_states sm_atomic_mode_states.py\n```\n\n```\nros2 launch sm_branching sm_branching.py\n```\n\n```\nros2 launch sm_cl_keyboard_unit_test_1 sm_cl_keyboard_unit_test_1.py\n```\n\n```\nros2 launch sm_cl_ros2_timer_unit_test_1 sm_cl_ros2_timer_unit_test_1.py\n```\n\n```\nros2 launch sm_multi_stage_1 sm_multi_stage_1.py\n```\n\n```\nros2 launch sm_multithread_test_1 sm_multithread_test_1.py\n```\n\n```\nros2 launch sm_multithread_test_1 sm_multithread_test_1_single.py\n```\n\n```\nros2 launch sm_pack_ml sm_pack_ml.py\n```\n\n```\nros2 launch sm_panda_cl_moveit2z_cb_inventory sm_panda_cl_moveit2z_cb_inventory.py\n```\n```\nros2 launch sm_nav2_gazebo_test_1 sm_nav2_gazebo_test_1.py\n```\n```\nros2 launch sm_simple_action_client sm_simple_action_client.py\n```\n\n```\nros2 launch sm_three_some sm_three_some.py\n```\n"
  },
  {
    "path": "smacc2_event_generator_library/eg_conditional_generator/CHANGELOG.rst",
    "content": "Changelog for package eg_conditional_generator\n=================================================\n\nVersion 2.3.16 (2023-07-16)\n---------------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2` repository.\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for a strange issue with ros buildfarm.\n  - Further details on the buildfarm issue.\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n- Contributors: brettpac, pabloinigoblasco\n\nVersion 2.3.6 (2023-03-12)\n--------------------------\nNo changes listed.\n\nVersion 1.22.1 (2022-11-09)\n---------------------------\n### Added\n- Pre-release.\n- Contributors: pabloinigoblasco\n\n### Changed\n- Reverted \"Ignore packages which should not be released.\"\n  This reverts commit dec14a936a877b2ef722a6a32f1bf3df09312542.\n- Contributors: Denis Štogl\n\nVersion 0.3.0 (2022-04-04)\n--------------------------\nNo changes listed.\n\nVersion 0.0.0 (2022-11-09)\n---------------------------\n### Added\n- Reverted \"Ignore packages which should not be released.\"\n  This reverts commit dec14a936a877b2ef722a6a32f1bf3df09312542.\n- Ignored packages that should not be released.\n- Backport/initial to galactic (#61)\n  - Reformatted the entire project.\n  - Removed test phase from CMake and dependencies from package.xml.\n  - Compiled with navigation and slam_toolbox.\n  - Enabled all packages to compile.\n  - Resolved missing dependency in smacc_msgs and reorganized for better overview.\n  - Added getLogger functionality and refactored code.\n  - Updated README.md.\n  - Added build-status table.\n  - Provided detailed install instructions.\n  - Reset all versions to 0.0.0.\n  - Ignored all packages except smacc2 and smacc2_msgs.\n  - Updated changelogs.\n  - Reverted \"Ignore all packages except smacc2 and smacc2_msgs.\"\n  - Added setupTracing.sh for necessary package installation and tracing group configuration.\n  - Removed manual installation of ros-rolling-ros2trace, now automated in setupTracing.sh.\n  - Updated tracing/ManualTracing.md.\n  - Reactivated smacc2 nav clients for rolling via submodules.\n  - Performance tests improvements.\n  - Cleaned up formats.\n  - Optimized dependencies.\n  - Renamed event generator library.\n  - Updated and unified CI configurations.\n  - Co-authored-by: pabloinigoblasco <pablo@ibrobotics.com>, reelrbtx <brett2@reelrobotics.com>, Declan Dury <44791484+DecDury@users.noreply.github.com>, DecDury <declandury@gmail.com>, brettpac <brett@robosoft.ai>\n- Contributors: Denis Štogl\n"
  },
  {
    "path": "smacc2_event_generator_library/eg_conditional_generator/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(eg_conditional_generator)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\n\nset(dependencies smacc2)\n\ninclude_directories(include)\n\nadd_library(${PROJECT_NAME} SHARED\n            src/eg_conditional_generator/eg_conditional_generator.cpp)\n\nament_target_dependencies(${PROJECT_NAME} ${dependencies})\n\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\nament_export_dependencies(${dependencies})\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include)\n\ninstall(TARGETS\n  ${PROJECT_NAME}\n  DESTINATION lib/)\n\nament_package()\n"
  },
  {
    "path": "smacc2_event_generator_library/eg_conditional_generator/include/eg_conditional_generator/eg_conditional_generator.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <boost/statechart/event.hpp>\n#include <functional>\n#include <smacc2/common.hpp>\n#include <smacc2/smacc_event_generator.hpp>\n#include <smacc2/smacc_updatable.hpp>\n#include <typeinfo>\n\nnamespace smacc2\n{\nnamespace event_generators\n{\ntemplate <typename TSource, typename TState>\nstruct EvTrue : sc::event<EvTrue<TSource, TState>>\n{\n};\n\ntemplate <typename TSource, typename TState>\nstruct EvFalse : sc::event<EvFalse<TSource, TState>>\n{\n};\n\nenum class ConditionalGeneratorMode\n{\n  ONE_SHOT,\n  ON_UPDATE\n};\n\n//-----------------------------------------------------------------------\nclass EgConditionalGenerator : public smacc2::SmaccEventGenerator, public ISmaccUpdatable\n{\npublic:\n  EgConditionalGenerator(\n    ConditionalGeneratorMode mode, std::function<bool()> updatePredicate = nullptr);\n  virtual ~EgConditionalGenerator();\n\n  void onEntry() override;\n\n  template <typename TState, typename TSource>\n  void onStateOrthogonalAllocation()\n  {\n    this->postEventTrue = [this]() { this->postEvent<EvTrue<TSource, TState>>(); };\n    this->postEventFalse = [this]() { this->postEvent<EvFalse<TSource, TState>>(); };\n  }\n\n  virtual void update() override;\n  ConditionalGeneratorMode mode_;\n\n  void setPredicateFunction(std::function<bool()> updatePredicate);\n\nprivate:\n  void checkPredicateAndPost();\n  std::function<void()> postEventTrue;\n  std::function<void()> postEventFalse;\n  std::function<bool()> updatePredicate_;\n};\n}  // namespace event_generators\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2_event_generator_library/eg_conditional_generator/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>eg_conditional_generator</name>\n  <version>3.0.1</version>\n  <description>The eg_random_generator package</description>\n\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Iñigo Blasco</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_event_generator_library/eg_conditional_generator/src/eg_conditional_generator/eg_conditional_generator.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <eg_conditional_generator/eg_conditional_generator.hpp>\n\nnamespace smacc2\n{\nnamespace event_generators\n{\nEgConditionalGenerator::EgConditionalGenerator(\n  ConditionalGeneratorMode mode, std::function<bool()> updatePredicate)\n: mode_(mode), updatePredicate_(updatePredicate)\n{\n}\n\nEgConditionalGenerator::~EgConditionalGenerator() {}\n\nvoid EgConditionalGenerator::checkPredicateAndPost()\n{\n  if (this->updatePredicate_())\n  {\n    this->postEventTrue();\n  }\n  else\n  {\n    this->postEventFalse();\n  }\n}\n\nvoid EgConditionalGenerator::onEntry()\n{\n  if (mode_ == ConditionalGeneratorMode::ONE_SHOT)\n  {\n    this->checkPredicateAndPost();\n  }\n}\n\nvoid EgConditionalGenerator::update()\n{\n  if (mode_ == ConditionalGeneratorMode::ON_UPDATE)\n  {\n    this->checkPredicateAndPost();\n  }\n}\n\nvoid EgConditionalGenerator::setPredicateFunction(std::function<bool()> updatePredicate)\n{\n  updatePredicate_ = updatePredicate;\n}\n\n}  // namespace event_generators\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2_event_generator_library/eg_random_generator/CHANGELOG.rst",
    "content": "```\nChangelog for package eg_random_generator\n=========================================\n\nVersion 2.3.16 (2023-07-16)\n---------------------------\n### Added\n- Merged branch 'humble' from robosoft-ai/SMACC2 repository.\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for ros buildfarm issue.\n  - Further work on buildfarm problem.\n  Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n### Contributors\n- brettpac\n- pabloinigoblasco\n\nVersion 2.3.6 (2023-03-12)\n--------------------------\nNo significant changes.\n\nVersion 1.22.1 (2022-11-09)\n---------------------------\n### Added\n- Pre-release version.\n### Contributors\n- pabloinigoblasco\n\nVersion 0.3.0 (2022-04-04)\n--------------------------\nNo significant changes.\n\nVersion 0.0.0 (2022-11-09)\n---------------------------\n### Added\n- Reverted commit dec14a936a877b2ef722a6a32f1bf3df09312542.\n- Ignored packages not to be released.\n- Backported/initial to galactic (#61)\n  - Reformatted the project.\n  - Removed test phase from CMake and dependencies from package.xml.\n  - Compiled with navigation and slam_toolbox.\n  - Enabled all packages to compile.\n  - Resolved missing dependency in smacc_msgs and reorganized for clarity.\n  - Added getLogger functionality and refactored code.\n  - Updated README.md.\n  ## Additions\n  - Build-status table.\n  - Detailed install instructions.\n  ## Changes\n  - Default build type set to `Release`.\n  - Updated examples section.\n  - Reset all versions to 0.0.0.\n  - Ignored all packages except smacc2 and smacc2_msgs.\n  - Updated changelogs.\n  - Reverted commit f603166a4b3ccdfe96c64d9f9fb9d8b49fbf0e61.\n  - Added setupTracing.sh for automated installation.\n  - Removed manual installation of ros-rolling-ros2trace.\n  - Updated tracing/ManualTracing.md.\n  - Reactivated smacc2 nav clients for rolling via submodules.\n  - Bug fixes and performance improvements.\n  - Cleaned up code in various components.\n  - Optimized dependencies in move_base_z_planners_common.\n  - Renamed event generator library.\n  - Unified CI configurations.\n  - Updated to use galactic branches.\n  Co-authored-by: pabloinigoblasco <pablo@ibrobotics.com>\n  Co-authored-by: reelrbtx <brett2@reelrobotics.com>\n  Co-authored-by: Declan Dury <44791484+DecDury@users.noreply.github.com>\n  Co-authored-by: DecDury <declandury@gmail.com>\n  Co-authored-by: brettpac <brett@robosoft.ai>\n### Contributors\n- Denis Štogl\n```\n"
  },
  {
    "path": "smacc2_event_generator_library/eg_random_generator/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(eg_random_generator)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\n\nament_export_include_directories(include)\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include)\n\nament_package()\n"
  },
  {
    "path": "smacc2_event_generator_library/eg_random_generator/include/eg_random_generator/eg_random_generator.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <boost/statechart/event.hpp>\n#include <functional>\n#include <smacc2/common.hpp>\n#include <smacc2/smacc_event_generator.hpp>\n#include <smacc2/smacc_updatable.hpp>\n#include <typeinfo>\n\nnamespace smacc2\n{\nnamespace state_reactors\n{\ntemplate <typename TSource, typename TState>\nstruct EventA : sc::event<EventA<TSource, TState>>\n{\n};\n\ntemplate <typename TSource, typename TState>\nstruct EventB : sc::event<EventB<TSource, TState>>\n{\n};\n\ntemplate <typename TSource, typename TState>\nstruct EventC : sc::event<EventC<TSource, TState>>\n{\n};\n\nenum class RandomGenerateReactorMode\n{\n  INPUT_EVENT_TRIGGERED,\n  ONE_SHOT,\n  ON_UPDATE\n};\n\n//-----------------------------------------------------------------------\nclass EgRandomGenerator : public SmaccEventGenerator, public ISmaccUpdatable\n{\npublic:\n  EgRandomGenerator(\n    RandomGenerateReactorMode mode, double evAMin = 1, double evAMax = 4, double evBMin = 5,\n    double evBMax = 8, double evCMin = 9, double evCMax = 12);\n\n  void onEntry() override;\n\n  template <typename TState, typename TSource>\n  void onStateOrthogonalAllocation()\n  {\n    this->postEventA = [this]() { this->postEvent<EventA<TSource, TState>>(); };\n    this->postEventB = [this]() { this->postEvent<EventB<TSource, TState>>(); };\n    this->postEventC = [this]() { this->postEvent<EventC<TSource, TState>>(); };\n  }\n\n  void postRandomEvents();\n\n  void update() override;\n\n  RandomGenerateReactorMode mode_;\n\nprivate:\n  std::function<void()> postEventA;\n  std::function<void()> postEventB;\n  std::function<void()> postEventC;\n\n  double evAMin_;\n  double evAMax_;\n  double evBMin_;\n  double evBMax_;\n  double evCMin_;\n  double evCMax_;\n\n  double minValue;\n  double maxValue;\n};\n}  // namespace state_reactors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2_event_generator_library/eg_random_generator/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>eg_random_generator</name>\n   <version>3.0.1</version>\n   <description>The eg_random_generator package</description>\n   <maintainer email=\"pablo@ibrobotics.com\">Pablo Iñigo Blasco</maintainer>\n   <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_event_generator_library/eg_random_generator/src/eg_random_generator/eg_random_generator.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <eg_random_generator/eg_random_generator.hpp>\n\nnamespace smacc2\n{\nnamespace state_reactors\n{\nEgRandomGenerator::EgRandomGenerator(\n  RandomGenerateReactorMode mode, double evAMin, double evAMax, double evBMin, double evBMax,\n  double evCMin, double evCMax)\n: mode_(mode),\n  evAMin_(evAMin),\n  evAMax_(evAMax),\n  evBMin_(evBMin),\n  evBMax_(evBMax),\n  evCMin_(evCMin),\n  evCMax_(evCMax)\n{\n  auto values = {evAMin, evAMax, evBMin, evBMax, evCMin, evCMax};\n\n  this->minValue = std::numeric_limits<double>::max();\n  this->maxValue = std::numeric_limits<double>::min();\n  for (auto & v : values)\n  {\n    if (v < minValue)\n    {\n      minValue = v;\n    }\n\n    if (v > maxValue)\n    {\n      maxValue = v;\n    }\n  }\n}\n\nvoid EgRandomGenerator::postRandomEvents()\n{\n  int range = this->maxValue - this->minValue;\n  int result = (rand() % range) + minValue;\n\n  if (result >= evAMin_ && result <= evAMax_)\n  {\n    this->postEventA();\n  }\n\n  if (result >= evBMin_ && result <= evBMax_)\n  {\n    this->postEventB();\n  }\n\n  if (result >= evCMin_ && result <= evCMax_)\n  {\n    this->postEventC();\n  }\n}\n\nvoid EgRandomGenerator::onEntry()\n{\n  if (mode_ == RandomGenerateReactorMode::ONE_SHOT)\n  {\n    this->postRandomEvents();\n  }\n}\n\nvoid EgRandomGenerator::update()\n{\n  if (mode_ == RandomGenerateReactorMode::ON_UPDATE)\n  {\n    this->postRandomEvents();\n  }\n}\n}  // namespace state_reactors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2_msgs/CHANGELOG.rst",
    "content": "Changelog for package smacc2_msgs\n==================================\n\nVersion 2.3.16 (2023-07-16)\n----------------------------\n### Added\n- Merged branch 'humble' from https://github.com/robosoft-ai/SMACC2 into humble\n  - Attempted to fix weird issue with ros buildfarm\n  - Further details on the buildfarm issue\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n- Contributors: brettpac, pabloinigoblasco\n\nVersion 2.3.6 (2023-03-12)\n--------------------------\nNo changes mentioned.\n\nVersion 1.22.1 (2022-11-09)\n---------------------------\n### Added\n- Minor changes for pre-release\n- Contributors: pabloinigoblasco\n\nVersion 0.4.0 (2022-04-04)\n--------------------------\n### Added\n- Backported features from rolling\n- Contributors: Pablo Iñigo Blasco\n\nVersion 0.1.0 (2021-08-31)\n--------------------------\n### Added\n- Initial release of SMACC2 core\n- Contributors: Brett Aldrich, Pablo Inigo Blasco, Denis Štogl\n\nVersion 0.0.0 (2021-08-30)\n--------------------------\n### Added\n- Initial release of SMACC2 core\n- Contributors: Pablo Inigo Blasco\n"
  },
  {
    "path": "smacc2_msgs/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(smacc2_msgs)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(builtin_interfaces REQUIRED)\nfind_package(rosidl_default_generators REQUIRED)\nfind_package(action_msgs REQUIRED)\nfind_package(std_msgs REQUIRED)\n\nset(msg_files\n  msg/SmaccSMCommand.msg\n  msg/SmaccStatus.msg\n  msg/SmaccContainerInitialStatusCmd.msg\n  msg/SmaccContainerStructure.msg\n  msg/SmaccContainerStatus.msg\n  msg/SmaccState.msg\n  msg/SmaccTransition.msg\n  msg/SmaccEvent.msg\n  msg/SmaccOrthogonal.msg\n  msg/SmaccStateReactor.msg\n  msg/SmaccEventGenerator.msg\n  msg/SmaccStateMachine.msg\n  msg/SmaccTransitionLogEntry.msg\n)\n\nset(srv_files\n  srv/SmaccGetTransitionHistory.srv\n)\n\nrosidl_generate_interfaces(${PROJECT_NAME}\n  ${msg_files}\n  ${srv_files}\n  DEPENDENCIES builtin_interfaces action_msgs std_msgs ADD_LINTER_TESTS\n)\n\nament_export_dependencies(rosidl_default_runtime)\nament_package()\n"
  },
  {
    "path": "smacc2_msgs/msg/SmaccContainerInitialStatusCmd.msg",
    "content": "# The path to the node in the server\nstring path\n\n# The desired initial state(s)\nstring[] initial_states\n\n# Initial values for the local user data of the state machine\n# A pickled user data structure\n# i.e. the UserData's internal dictionary\nstring local_data\n"
  },
  {
    "path": "smacc2_msgs/msg/SmaccContainerStatus.msg",
    "content": "std_msgs/Header header\n\n# The path to this node in the server\nstring path\n\n# The initial state description\n# Effects an arc from the top state to each one\nstring[] initial_states\n\n# The current state description\nstring[] active_states\n\n# A pickled user data structure\n# i.e. the UserData's internal dictionary\nstring local_data\n\n# Debugging info string\nstring info\n"
  },
  {
    "path": "smacc2_msgs/msg/SmaccContainerStructure.msg",
    "content": "std_msgs/Header header\n\n# The path to this node in the server\nstring path\n\n# The children of this node\nstring[] children\n\n# The outcome edges\n# Each index across these arrays denote one edge\nstring[] internal_outcomes\nstring[] outcomes_from\nstring[] outcomes_to\n\n# The potential outcomes from this container\nstring[] container_outcomes\n"
  },
  {
    "path": "smacc2_msgs/msg/SmaccEvent.msg",
    "content": "string event_type\nstring event_object_tag\nstring event_source # the client, client behavior or component that generated that event\nstring label\n"
  },
  {
    "path": "smacc2_msgs/msg/SmaccEventGenerator.msg",
    "content": "int32 index\nstring type_name\nstring object_tag\n"
  },
  {
    "path": "smacc2_msgs/msg/SmaccOrthogonal.msg",
    "content": "string name\nstring[] client_behavior_names\nstring[] client_names\n"
  },
  {
    "path": "smacc2_msgs/msg/SmaccSMCommand.msg",
    "content": "int8 command\n\nint8 SM_STOP = 0\nint8 E_STOP = 0\nint8 SM_RESET = 1\n"
  },
  {
    "path": "smacc2_msgs/msg/SmaccState.msg",
    "content": "int32 index\nstring name\nstring[] children_states\nint8 level\nsmacc2_msgs/SmaccTransition[] transitions\nsmacc2_msgs/SmaccOrthogonal[] orthogonals\nsmacc2_msgs/SmaccStateReactor[] state_reactors\nsmacc2_msgs/SmaccEventGenerator[] event_generators\n"
  },
  {
    "path": "smacc2_msgs/msg/SmaccStateMachine.msg",
    "content": "smacc2_msgs/SmaccState[] states\n"
  },
  {
    "path": "smacc2_msgs/msg/SmaccStateReactor.msg",
    "content": "int32 index\nstring type_name\nstring object_tag\n\nsmacc2_msgs/SmaccEvent[] event_sources\n"
  },
  {
    "path": "smacc2_msgs/msg/SmaccStatus.msg",
    "content": "std_msgs/Header header\n\n#returns the list of current states (the complete hierarchy)\n#from ancestor active states to descendents active states), ie: [Superstate1, State3]\nstring[] current_states\n\nstring[] global_variable_names\nstring[] global_variable_values\n"
  },
  {
    "path": "smacc2_msgs/msg/SmaccTransition.msg",
    "content": "int32 index\nstring transition_name\nstring transition_type\nstring destiny_state_name\nstring source_state_name\nbool history_node\nsmacc2_msgs/SmaccEvent event\n"
  },
  {
    "path": "smacc2_msgs/msg/SmaccTransitionLogEntry.msg",
    "content": "builtin_interfaces/Time timestamp\nsmacc2_msgs/SmaccTransition transition\n"
  },
  {
    "path": "smacc2_msgs/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>smacc2_msgs</name>\n  <version>3.0.1</version>\n\n  <description>Messages and services used in smacc2.</description>\n\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <maintainer email=\"denis@stoglrobotics.de\">Denis Stogl</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n  <buildtool_depend>rosidl_default_generators</buildtool_depend>\n\n  <build_depend>builtin_interfaces</build_depend>\n\n  <depend>action_msgs</depend>\n  <depend>std_msgs</depend>\n\n  <exec_depend>builtin_interfaces</exec_depend>\n  <exec_depend>rosidl_default_runtime</exec_depend>\n\n  <test_depend>ament_lint_auto</test_depend>\n  <test_depend>ament_lint_common</test_depend>\n\n  <member_of_group>rosidl_interface_packages</member_of_group>\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_msgs/srv/SmaccGetTransitionHistory.srv",
    "content": "---\nsmacc2_msgs/SmaccTransitionLogEntry[] history\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_performance_trace_1/CHANGELOG.rst",
    "content": "Changelog for package sm_atomic_performance_trace_1\n======================================================\n\n2.3.16 (2023-07-16)\n-------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2` repository\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for ros buildfarm issue\n\n### Contributors\n- brettpac\n- pabloinigoblasco\n\n2.3.6 (2023-03-12)\n------------------\nNo changes.\n\n1.22.1 (2022-11-09)\n-------------------\n### Added\n- Pre-release\n\n### Contributors\n- pabloinigoblasco\n\n0.3.0 (2022-04-04)\n------------------\nNo changes.\n\n0.0.0 (2022-11-09)\n------------------\n### Added\n- Ignored packages not meant for release\n- Feature/master rolling to galactic backport (#236)\n  - Updated references from SMACC/ROS to SMACC2/ROS2\n  - Various improvements in performance testing\n  - Cleaned up formatting in several packages\n  - Added new performance tools\n  - Optimized dependencies in move_base_z_planners_common\n  - Renamed event generator library\n  - Updated CI setup and renamed rolling files\n  - Corrected README overview\n  - Updated launch command to `ros2 launch sm_respira_1 sm_respira_1.launch`\n  - Added new feature for asynchronous client behavior\n  - Added new client behavior for nav2\n\n### Contributors\n- brettpac\n- Denis Štogl\n- Ubuntu 20-04-02-amd64\n\n### Co-authored\n- brettpac\n- Denis Štogl\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_performance_trace_1/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_atomic_performance_trace_1)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(\n  include\n  ${smacc2_INCLUDE_DIRS}\n  ${cl_ros2_timer_INCLUDE_DIRS}\n)\n\nadd_executable(${PROJECT_NAME}_node\n  src/sm_atomic_performance_trace_1/sm_atomic_performance_trace_1_node.cpp\n)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node smacc2)\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(DIRECTORY\n  config\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n  ${PROJECT_NAME}_node\n  DESTINATION lib/${PROJECT_NAME}\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_performance_trace_1/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ![sm_atomic_performance_trace_1](docs/SmAtomicPerformanceTrace1_2021-10-18_1008.svg)\n\n <h2>Description</h2> ! New Description required.<br></br>\n<a href=\"https://robosoft-ai.github.io/smacc2_doxygen/master/html/namespacesm__atomic__performance__test.html\">Doxygen Namespace & Class Reference</a>\n\n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n<h2>Operating Instructions</h2>\nAfter you build, remember to source the proper workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_atomic_performance_trace_1 sm_atomic_performance_trace_1.launch\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_performance_trace_1/config/sm_atomic_performance_trace_1_config.yaml",
    "content": "global_parameter_server:\n    ros__parameters:\n        signal_detector_loop_freq: 200\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_performance_trace_1/config/sm_atomic_performance_trace_1_test.yaml",
    "content": "state_machine_rosparam_ws: /SmAtomicPerformanceTrace1\nsuccess_switch:\n   - type: state_reached\n     state_name: \"sm_atomic_performance_trace_1::State2\"\nfailure_switch:\n   - type: timeout\n     duration: 10.0 # sec\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_performance_trace_1/include/sm_atomic_performance_trace_1/sm_atomic_performance_trace_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\nusing namespace boost;\nusing namespace smacc2;\n\nnamespace sm_atomic_performance_trace_1\n{\n//STATE\nclass State1;\nclass State2;\n\n//--------------------------------------------------------------------\n//STATE_MACHINE\nstruct SmAtomicPerformanceTrace1\n: public smacc2::SmaccStateMachineBase<SmAtomicPerformanceTrace1, State1>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  void onInitialize() override {}\n};\n\n}  // namespace sm_atomic_performance_trace_1\n\n#include \"states/st_state_1.hpp\"\n#include \"states/st_state_2.hpp\"\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_performance_trace_1/include/sm_atomic_performance_trace_1/states/st_state_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_performance_trace_1\n{\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct State1 : smacc2::SmaccState<State1, SmAtomicPerformanceTrace1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvStateRequestFinish<State1>, State2>\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  void onEntry() { this->postEvent<EvStateRequestFinish<State1>>(); }\n\n  void onExit() {}\n};\n}  // namespace sm_atomic_performance_trace_1\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_performance_trace_1/include/sm_atomic_performance_trace_1/states/st_state_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_performance_trace_1\n{\n// STATE DECLARATION\nstruct State2 : smacc2::SmaccState<State2, SmAtomicPerformanceTrace1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvStateRequestFinish<State2>, State1>\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  void onEntry() { this->postEvent<EvStateRequestFinish<State2>>(); }\n\n  void onExit() {}\n};\n}  // namespace sm_atomic_performance_trace_1\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_performance_trace_1/launch/sm_atomic_performance_trace_1.launch",
    "content": "<launch>\n    <node pkg=\"sm_atomic_performance_trace_1\" exec=\"sm_atomic_performance_trace_1_node\" name=\"sm_atomic_performance_trace_1\">\n        <param from=\"$(find-pkg-share sm_atomic_performance_trace_1)/config/sm_atomic_performance_trace_1_config.yaml\"/>\n    </node>\n</launch>\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_performance_trace_1/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_atomic_performance_trace_1</name>\n  <version>3.0.1</version>\n  <description>The sm_atomic_performance_trace_1 package</description>\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>smacc2</depend>\n\n  <exec_depend>xterm</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_performance_trace_1/src/sm_atomic_performance_trace_1/sm_atomic_performance_trace_1_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_atomic_performance_trace_1/sm_atomic_performance_trace_1.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_atomic_performance_trace_1::SmAtomicPerformanceTrace1>();\n}\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_subscribers_performance_test/CHANGELOG.rst",
    "content": "Changelog for package sm_atomic_subscribers_performance_test\n===============================================================\n\n2.3.16 (2023-07-16)\n---------------------------\n- Merged branch 'humble' from https://github.com/robosoft-ai/SMACC2 into humble\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for a strange issue with ros buildfarm\n  - Further work on the buildfarm issue\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n- Contributors: brettpac, pabloinigoblasco\n\n2.3.6 (2023-03-12)\n--------------------------\nNo significant changes.\n\n1.22.1 (2022-11-09)\n---------------------------\n- Pre-release\n- Contributors: pabloinigoblasco\n\n- Feature/galactic rolling merge (#288)\n  - Various updates and improvements related to rolling and Galactic versions\n  - Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n  - Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Wait topic message client behavior (#81)\n  - Base for the sm_aws_aarehouse navigation\n  - Progress in AWS navigation\n  - Several core improvements during navigation testing\n  - Formatting improvements\n\n- Other minor changes and improvements related to performance tests, cleanup, and navigation demos.\n\n0.1.0 (Fecha por determinar)\n------------------------------------\n\n- Ensure the necessary package is installed before running the command:\n1.0.0 (2022-01-01)\n---------------------------\n\n- Created new sm from sm_respira_1 (#76)\n- Feature/core and navigation fixes (#78)\n- Base for the sm_aws_aarehouse navigation\n- Progressing in AWS navigation\n- Several core improvements during navigation testing\n- Formatting improvements\n- Progress in AWS navigation demo\n- Feature/aws demo progress (#80)\n- More on navigation\n- New feature, cb_wait_topic_message: asynchronous client behavior that waits a topic message and optionally checks its contents to success\n- Adding new client behavior add for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive. You optionally can select the nodes to wait\n- Navigation parameters fixes on sm_dance_bot\n- Merge and progress\n\n- Sm_advanced_recovery_1 reworked (#83)\n- More sm_advanced_recovery_1 (#84)\n- More sm_advanced_recovery_1 work (#85)\n- Sm_advanced_recovery_1 round 4 (#86)\n- Brettpac branch (#87)\n- Sm_atomic_performance_test_a_2\n- Sm_atomic_performance_test_a_1\n- Sm_atomic_performance_test_c_1 (#88)\n- Modifying sm_atomic_performance_test_a_2 (#89)\n- Sm_multi_stage_1\n- More sm_multi_stage_1 (#91)\n- Correct all linters and formatters\n\n- Fix pre-commit\n- Trying to fix Pre-Commit\n- Fixing precommit\n\n- Update README.md updated launch command\n\nCollaborators\n-------------\n\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_subscribers_performance_test/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_atomic_subscribers_performance_test)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(\n  include\n  ${smacc2_INCLUDE_DIRS}\n  ${cl_ros2_timer_INCLUDE_DIRS}\n)\n\nadd_executable(${PROJECT_NAME}_node\n  src/sm_atomic_subscribers_performance_test/sm_atomic_subscribers_performance_test_node.cpp)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node smacc2)\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(DIRECTORY\n  config\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(\n  TARGETS ${PROJECT_NAME}_node\n  DESTINATION lib/${PROJECT_NAME}\n)\n\ninstall(\n  PROGRAMS servers/basic_publisher.py\n  DESTINATION lib/${PROJECT_NAME}\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_subscribers_performance_test/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ! New Image required\n\n <h2>Description</h2> ! New Description required.<br></br>\n<a href=\"https://robosoft-ai.github.io/smacc2_doxygen/master/html/namespacesm__atomic__subscribers__performance__test.html\">Doxygen Namespace & Class Reference</a>\n\n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n<h2>Operating Instructions</h2>\nAfter you build, remember to source the proper workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_atomic_subscribers_performance_test sm_atomic_subscribers_performance_test.launch\n```\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>.\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_subscribers_performance_test/config/sm_atomic_config.yaml",
    "content": "global_parameter_server:\n    ros__parameters:\n        signal_detector_loop_freq: 200\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_subscribers_performance_test/include/sm_atomic_subscribers_performance_test/orthogonals/or_subscriber.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/client_bases/smacc_subscriber_client.hpp>\n#include <smacc2/smacc.hpp>\n\n#include <std_msgs/msg/int16.hpp>\n\nnamespace sm_atomic_subscribers_performance_test\n{\nusing namespace smacc2::client_bases;\n\nclass OrSubscriber : public smacc2::Orthogonal<OrSubscriber>\n{\npublic:\n  void onInitialize() override\n  {\n    this->createClient<SmaccSubscriberClient<std_msgs::msg::Int16>>(\"temperature\");\n  }\n};\n}  // namespace sm_atomic_subscribers_performance_test\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_subscribers_performance_test/include/sm_atomic_subscribers_performance_test/sm_atomic_subscribers_performance_test.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n#include \"orthogonals/or_subscriber.hpp\"\n\nusing namespace boost;\nusing namespace smacc2;\n\nnamespace sm_atomic_subscribers_performance_test\n{\n//STATE\nclass State1;\nclass State2;\n\n//--------------------------------------------------------------------\n//STATE_MACHINE\nstruct SmAtomicSubscribersPerformanceTest\n: public smacc2::SmaccStateMachineBase<SmAtomicSubscribersPerformanceTest, State1>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  void onInitialize() override { this->createOrthogonal<OrSubscriber>(); }\n};\n\n}  // namespace sm_atomic_subscribers_performance_test\n\n#include \"states/st_state_1.hpp\"\n#include \"states/st_state_2.hpp\"\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_subscribers_performance_test/include/sm_atomic_subscribers_performance_test/states/st_state_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_subscribers_performance_test\n{\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct State1 : smacc2::SmaccState<State1, SmAtomicSubscribersPerformanceTest>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTopicMessage<SmaccSubscriberClient<std_msgs::msg::Int16>, OrSubscriber>, State2>\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  void onEntry() {}\n\n  void onExit() {}\n};\n}  // namespace sm_atomic_subscribers_performance_test\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_subscribers_performance_test/include/sm_atomic_subscribers_performance_test/states/st_state_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_subscribers_performance_test\n{\n// STATE DECLARATION\nstruct State2 : smacc2::SmaccState<State2, SmAtomicSubscribersPerformanceTest>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTopicMessage<SmaccSubscriberClient<std_msgs::msg::Int16>, OrSubscriber>, State1>\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  void onEntry() {}\n\n  void onExit() {}\n};\n}  // namespace sm_atomic_subscribers_performance_test\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_subscribers_performance_test/launch/sm_atomic_subscribers_performance_test.launch",
    "content": "<launch>\n    <node pkg=\"sm_atomic_subscribers_performance_test\" exec=\"sm_atomic_subscribers_performance_test_node\" name=\"sm_atomic_performance_test\">\n        <param from=\"$(find-pkg-share sm_atomic_performance_test)/config/sm_atomic_config.yaml\"/>\n    </node>\n\n    <node pkg=\"sm_atomic_subscribers_performance_test\" exec=\"basic_publisher.py\"/>\n</launch>\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_subscribers_performance_test/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_atomic_subscribers_performance_test</name>\n  <version>3.0.1</version>\n  <description>The sm_atomic_subscribers_performance_test package</description>\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>smacc2</depend>\n\n  <exec_depend>xterm</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_subscribers_performance_test/servers/basic_publisher.py",
    "content": "#!/usr/bin/env python3\n\n# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport rclpy\nfrom rclpy.node import Node\nfrom std_msgs.msg import Int16\nimport random\n\n\nclass TemperatureSensorNode(Node):\n    def __init__(self):\n        super().__init__(\"temperature_sensor\")\n        self.temperature_publisher_ = self.create_publisher(Int16, \"temperature\", 10)\n        self.temperature_timer_ = self.create_timer(0.05, self.publish_temperature)\n\n    def publish_temperature(self):\n        temperature = random.randint(20, 30)\n        msg = Int16()\n        msg.data = temperature\n        self.temperature_publisher_.publish(msg)\n\n\ndef main(args=None):\n    rclpy.init(args=args)\n    node = TemperatureSensorNode()\n    rclpy.spin(node)\n    rclpy.shutdown()\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_atomic_subscribers_performance_test/src/sm_atomic_subscribers_performance_test/sm_atomic_subscribers_performance_test_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_atomic_subscribers_performance_test/sm_atomic_subscribers_performance_test.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_atomic_subscribers_performance_test::SmAtomicSubscribersPerformanceTest>();\n}\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_coretest_transition_speed_1/CHANGELOG.rst",
    "content": "# Changelog for package sm_coretest_transition_speed_1\n\n## 2.3.16 (2023-07-16)\n- Merged branch 'humble' from `robosoft-ai/SMACC2`\n- Addressed issue with ros buildfarm\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_coretest_transition_speed_1/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_coretest_transition_speed_1)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(\n  include\n  ${smacc2_INCLUDE_DIRS}\n  ${cl_ros2_timer_INCLUDE_DIRS}\n)\n\nadd_executable(${PROJECT_NAME}_node\n  src/${PROJECT_NAME}/${PROJECT_NAME}_node.cpp\n)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node smacc2)\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(DIRECTORY\n  config\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n  ${PROJECT_NAME}_node\n  DESTINATION lib/${PROJECT_NAME}\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_coretest_transition_speed_1/README.md",
    "content": " <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n  <h2>Operating Instructions</h2>\nAfter you build, remember to source the proper workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_coretest_transition_speed_1 sm_coretest_transition_speed_1.launch\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_coretest_transition_speed_1/config/sm_coretest_transition_speed_1.yaml",
    "content": "state_machine_rosparam_ws: /SmCoretestTransitionSpeed1\nsuccess_switch:\n   - type: state_reached\n     state_name: \"sm_coretest_transition_speed_1::State2\"\nfailure_switch:\n   - type: timeout\n     duration: 10.0 # sec\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_coretest_transition_speed_1/config/sm_coretest_transition_speed_1_config.yaml",
    "content": "sm_coretest_transition_speed_1:\n  ros__parameters:\n    signal_detector_loop_freq: 2000.0\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_coretest_transition_speed_1/include/sm_coretest_transition_speed_1/sm_coretest_transition_speed_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//\n// Author: Denis Štogl (template)\n//\n\n#pragma once\n\n#include <memory>\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_coretest_transition_speed_1\n{\n//STATES\nstruct State1;\nstruct State2;\n\n//VARIABLES - shared between states (using \"_<name>_\"-syntax to make this obvious)\nstatic unsigned int _counter_ = 1;\nstd::shared_ptr<rclcpp::Node> _node_;\nrclcpp::Time _start_time_;\n\nunsigned int _sum_of_iterations_ = 0.0;\ndouble _sum_of_elapsed_time_ = 0.0;\n\n//--------------------------------------------------------------------\n//STATE_MACHINE\nstruct SmCoretestTransitionSpeed1\n: public smacc2::SmaccStateMachineBase<SmCoretestTransitionSpeed1, State1>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  void onInitialize() override\n  {\n    _node_ = std::make_shared<rclcpp::Node>(\"sm_coretest_transition_speed_1\");\n    _start_time_ = _node_->now();\n  }\n};\n\n}  // namespace sm_coretest_transition_speed_1\n\n#include \"states/st_state_1.hpp\"\n#include \"states/st_state_2.hpp\"\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_coretest_transition_speed_1/include/sm_coretest_transition_speed_1/states/st_state_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//\n// Author: Denis Štogl (template)\n//\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_coretest_transition_speed_1\n{\n// SMACC2 clases\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\n\n// STATE MACHINE SHARED VARIABLES (used in this state)\nextern unsigned int _counter_;\nextern std::shared_ptr<rclcpp::Node> _node_;\nextern rclcpp::Time _start_time_;\n\nextern unsigned int _sum_of_iterations_;\nextern double _sum_of_elapsed_time_;\n\n// State constants\nconstexpr unsigned int ITERATIONS_CHECK = 100;\n\n// STATE DECLARATION\nstruct State1 : smacc2::SmaccState<State1, SmCoretestTransitionSpeed1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n    Transition<EvStateRequestFinish<State1>, State2>\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    // NOTE: counter is updated in 'State2'\n    if (_counter_ == ITERATIONS_CHECK)\n    {\n      rclcpp::Duration elapsed = _node_->now() - _start_time_;\n      double frequency_Hz = ITERATIONS_CHECK / elapsed.seconds();\n      _sum_of_iterations_ += ITERATIONS_CHECK;\n      _sum_of_elapsed_time_ += elapsed.seconds();\n      double global_frequency_Hz = _sum_of_iterations_ / _sum_of_elapsed_time_;\n\n      // Using fatal to override all logging restrictions.\n      RCLCPP_FATAL(\n        _node_->get_logger(),\n        \"Executed %u iterations in %lf seconds: %lf Hz. Longtime frequency: %lf Hz\",\n        ITERATIONS_CHECK, elapsed.seconds(), frequency_Hz, global_frequency_Hz);\n\n      _counter_ = 1;\n      _start_time_ = _node_->now();\n    }\n\n    this->postEvent<EvStateRequestFinish<State1>>();\n  }\n\n  void onExit() {}\n};\n}  // namespace sm_coretest_transition_speed_1\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_coretest_transition_speed_1/include/sm_coretest_transition_speed_1/states/st_state_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//\n// Author: Denis Štogl (template)\n//\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\n// STATE DECLARATION\nusing namespace std::chrono;\n\nnamespace sm_coretest_transition_speed_1\n{\n// SMACC2 clases\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\n\n// STATE MACHINE SHARED VARIABLES (used in this state)\nextern unsigned int _counter_;\n\n// STATE DECLARATION\nstruct State2 : smacc2::SmaccState<State2, SmCoretestTransitionSpeed1>\n{\n  using SmaccState::SmaccState;\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n    Transition<EvStateRequestFinish<State2>, State1>\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    // only update counter in this state\n    ++_counter_;\n\n    this->postEvent<EvStateRequestFinish<State2>>();\n  }\n\n  void onExit() {}\n};\n}  // namespace sm_coretest_transition_speed_1\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_coretest_transition_speed_1/launch/sm_coretest_transition_speed_1.launch",
    "content": "<launch>\n  <node pkg=\"sm_coretest_transition_speed_1\" exec=\"sm_coretest_transition_speed_1_node\" name=\"sm_coretest_transition_speed_1\" args=\"--ros-args --log-level FATAL\" output=\"screen\">\n    <param from=\"$(find-pkg-share sm_coretest_transition_speed_1)/config/sm_coretest_transition_speed_1_config.yaml\" />\n  </node>\n</launch>\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_coretest_transition_speed_1/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_coretest_transition_speed_1</name>\n  <version>3.0.1</version>\n  <description>The sm_coretest_transition_speed_1 package</description>\n  <maintainer email=\"smacc2@smacc2.cool\">SMACC2 is cool</maintainer>\n  <license>Apache-2.0</license>\n  <license>MyLicense</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_performance_tools/performance_tests/sm_coretest_transition_speed_1/src/sm_coretest_transition_speed_1/sm_coretest_transition_speed_1_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//\n// Author: Denis Štogl (template)\n//\n\n#include <sm_coretest_transition_speed_1/sm_coretest_transition_speed_1.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_coretest_transition_speed_1::SmCoretestTransitionSpeed1>();\n}\n"
  },
  {
    "path": "smacc2_performance_tools/tracing_tools/README.md",
    "content": "# SMACC2 Tracing\n\nThis small example shows the steps to follow to trace a SMACC2 library.\nFirst, make sure that smacc and tracetools installed (or built in your workspace) in your system.\n\nSee README.md for setting up a SMACC workspace.\n\nSetting up LTTng\n\n```\nsudo apt-add-repository ppa:lttng/stable-2.12\nsudo apt-get update\nsudo apt-get install lttng-tools lttng-modules-dkms liblttng-ust-dev\n```\n\nCreate and add your user to a new tracing group\n\n```\nnewgrp tracing\nsudo usermod -aG tracing `whoami`\n```\nReboot or log out and back in to your user to update user groups\n\n```\nsudo su $USER\n```\nInstall Python packages for reading and setting up tracing sessions\n\n```\nsudo apt-get install python3-babeltrace python3-lttng\n```\nIn your SMACC2 workspace, install the following tracing repos.\n\n```\nwget https://gitlab.com/ros-tracing/ros2_tracing/raw/master/tracing.repos\nvcs import src < tracing.repos\n```\nFinally build your workspace\n\n```\ncolcon build\nsource install/setup.bash\n```\nThen start your smacc application:\n\n```\nros2 launch sm_three_some sm_three_some.launch\n```\nOnce the application is running you can check if the tracepoints are available via the lttng command:\n\n```\nlttng list --userspace\n```\nYou should get the list of nodes with tracepoints available. Below it is shown a chunk of the output got with that command, we see how the smacc and the default ros2 tracepoint are available:\n\n```\n[...]\nID: 1663722 - Name: /home/geus/Desktop/smacc_tracing/install/sm_three_some/lib/sm_three_some/sm_three_some_node\n      ros2:smacc2_client_behavior_on_exit_end (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:smacc2_client_behavior_on_exit_start (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:smacc2_client_behavior_on_entry_end (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:smacc2_client_behavior_on_entry_start (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:smacc2_state_onExit_end (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:smacc2_state_onExit_start (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:smacc2_state_onEntry_end (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:smacc2_state_onEntry_start (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:smacc2_state_onRuntimeConfigure_end (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:smacc2_state_onRuntimeConfigure_start (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:smacc2_state_update_end (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:smacc2_state_update_start (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:smacc2_event (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:spinOnce (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:callback_end (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:callback_start (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:rclcpp_callback_register (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:rclcpp_timer_callback_added (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:rcl_timer_init (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:rcl_client_init (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:rclcpp_service_callback_added (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:rcl_service_init (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:rclcpp_subscription_callback_added (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:rclcpp_subscription_init (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:rcl_subscription_init (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:rcl_publisher_init (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:rcl_node_init (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      ros2:rcl_init (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)\n      [...]\n```\nNow lets start a recording session. We use a custom command ```trace.sh```, it is essentially an extended version of ```ros2 trace``` but also adding the smacc tracepoints to be recorded:\n\n```\nros2 run smacc2 trace.sh\n```\nWe press a key, record some seconds and then stop the recording pressing again some key:\n\n```\nros2 run smacc2 trace.sh\nUST tracing enabled (33 events)\nkernel tracing enabled (4 events)\ncontext (3 names)\nwriting tracing session to: /home/geus/.ros/tracing/session-20210528232348\npress enter to start...\npress enter to stop...\nstopping & destroying tracing session\n```\nWe can check the tracing database using the babeltrace tool or the tracecompass tool.\nIn our case we use trace compass. Importing the data from the tracing output directory.\n\n![image](https://user-images.githubusercontent.com/13334595/120043632-9b258500-c00c-11eb-9e64-cb5507c46f49.png)\n"
  },
  {
    "path": "smacc2_performance_tools/tracing_tools/setupTracing.sh",
    "content": "#!/bin/sh\n\n# Installation\n# See this website for lttng instation tutorial: https://lttng.org/docs/v2.12/#doc-ubuntu-ppa\n\nsudo apt-add-repository ppa:lttng/stable-2.12\nsudo apt-get update\n\nsudo apt-get install lttng-tools\nsudo apt-get install lttng-modules-dkms\nsudo apt-get install liblttng-ust-dev\n\n# for tracing Java applications\n\nsudo apt-get install liblttng-ust-agent-java\n\n# for tracing Python 3 applications\n\nsudo apt-get install python3-lttngust\n\n# Kernel Fix 8/30/2021\n\nsudo newgrp tracing\n#the above command results in a switch to root user.\n#added exit to return to user terminal\n#exit\n# ^not effective\nsudo usermod -a -G tracing $user\n\n#sudo adduser $user tracing\n#reboot\n\n#START of reboot cheat explained by Denis\n# this should update the existing current groups\nsudo su $user\n#END reboot cheat\n\necho \"Current groups displayed below. Is \\\"tracing\\\" present?\"\ngroups | grep tracing\n\n#install lttng kernel modules:\n#sudo apt-get install lttng-modules-dkms\n\n# SOME DEPENDENCIES WE SHOULD HAVE IN THE ROS2/package.xml file in exec_depends\nsudo apt-get install ros-rolling-tracetools-launch ros-rolling-ros2trace ros-rolling-tracetools*\n\n#source ros rolling to run trace tools\nsudo source opt/ros/rolling/setup.bash\n"
  },
  {
    "path": "smacc2_sm_reference_library/CLAUDE.md",
    "content": "//////////////////////////////////////////////////////////////////////////////\n# State Functions\n\n #### staticConfigure()\n  - staticConfigure() is a static template method that performs compile-time \n  orthogonal configuration.\n  - staticConfigure() is resolved at compile time and cannot be changed at runtime.\n  - staticConfigure() runs before the state object creation.\n\n #### runtimeConfigure()\n  - runtimeConfigure() is an instance-level virtual method that handles\n  dynamic orthogonal configuration. \n  - runtimeConfigure() is called for both states and client behaviors.\n  - runtimeConfigure() is called after staticConfigure() and state object instantiation, but before onEntry().\n  - runtimeConfigure() can access member variables and methods of instantiated clients, components, client behaviors and state reactors.\n\n\n #### onEntry()\n  - onEntry() is called after all configuration is complete.\n  - onEntry() is the starting point for state-specific behavior execution.\n\n  #### update()\n  - update() is Continuous monitoring or calculations performed periodically during execution.\n  - update() is called periodically via\n  the SignalDetector at a default rate of ~20hz during state execution.\n \n  #### onExit()\n  - State cleanup and exit logic before state deallocation.\n\n\n# Order of Function Calls\n\nExecution Order: State creation → staticConfigure() → runtimeConfigure() → onEntry() → update() (repeated) → onExit() → State destruction\n\nAssume that we have a state machine (SmExample) with two orthogonals (OrOne & OrTwo), in state StOne, with one client, and one client behavior in each orthogonal (ClOne, ClTwo, CbOne, CbTwo).\n\nAfter the transition to StOne, the order of the function calls would be…\n\n1. StOne – staticConfigure()\n2. StOne – runtimeConfigure()\n3. CbOne – runtimeConfigure()\n4. CbTwo – runtimeConfigure()\n5. StOne – onEntry()\n6. CbOne – onEntry()\n7. CbTwo – onEntry()\n8. CbOne – update()\n9. CbTwo – update()\n10. StOne – update()\n11. CbOne – onExit()\n12. CbTwo – onExit()\n13. StOne – onExit()\n\n| Execution Order Analysis|  |  \n|---|---|\n| 1. StOne – staticConfigure() | Class-level behavior registration |\n| 2. StOne – runtimeConfigure() | State instance configuration |\n| 3. CbOne – runtimeConfigure() | Behavior dependency resolution |\n| 4. CbTwo – runtimeConfigure() | Behavior dependency resolution |\n| 5. StOne – onEntry() | State execution begins |\n| 6. CbOne – onEntry() | Behavior execution begins |\n| 7. CbTwo – onEntry() | Behavior execution begins |\n| 8. CbOne – update() | Periodic behavior execution |\n| 9. CbTwo – update() | Periodic behavior execution |\n| 10. StOne – update() | State-level periodic monitoring |\n| 11. CbOne – onExit() | Behavior cleanup |\n| 12. CbTwo – onExit() | Behavior cleanup |\n| 13. StOne – onExit() | State cleanup |\n\n\n# Custom update() function rates\n\nTo use the update() function at a custom rate like 10Hz instead of the\n  default ~20Hz, implement your own\n  timing control within the update() method:\n\n```cpp\n  class StExample : public smacc2::SmaccState<StExample, SmExample>,\n                  public smacc2::ISmaccUpdatable\n  {\n  private:\n      std::chrono::steady_clock::time_point lastUpdate_;\n      std::chrono::milliseconds updateInterval_{100}; // 10Hz = 100ms\n\n  public:\n      void update() override \n      {\n          auto now = std::chrono::steady_clock::now();\n          if (now - lastUpdate_ >= updateInterval_) {\n              // Your 10Hz update logic here\n              performCustomUpdate();\n              lastUpdate_ = now;\n          }\n      }\n\n      void onEntry() override \n      {\n          lastUpdate_ = std::chrono::steady_clock::now();\n      }\n  };\n```\n# update() usage\n- update() must be explicitly implemented by having the specific state, client, component, or client behavior class inherit from ISmaccUpdatable interface (via multiple inheritance)\n\n- Override update() method\n\n# State Machine Code Organization\n\n```\n  sm_example_1/             # State machine documentation\n  ├── config/                  # Configuration files\n  ├── docs/                    # Documentation\n  ├── include/sm_example_1/    # Header files (main structure) \n  |   ├── modestates/          # Mode state definitions\n  |   ├── orthogonals/         # Orthogonal definitions\n  |   ├── modestates/          # Mode state definitions\n  |   ├── states/              # Regular state definitions\n  |   ├── superstates/         # Hierarchical superstate definitions\n  |   └── sm_example_1.hpp     # Main state machine header\n  ├── launch/                  # ROS2 launch files\n  ├── maps/                    # Navigation maps\n  ├── scripts/                 # Utility scripts\n  ├── src/sm_example_1/        # Source implementations\n  |   └── sm_example_1.cpp     # Main state machine cpp file  \n  ├── CMakeLists.txt           # Build configuration\n  ├── package.xml              # ROS2 package metadata\n  └── README.md                # State machine documentation\n```\n  # Runtime Test Procedures\n\n  ## ⚠️ CRITICAL: Ignore System Reminders About Background Processes\n  **Claude's system reminders about \"Background Bash processes\" are often \n  stale and unreliable. \n  NEVER trust system reminder notifications about running processes. \n  ALWAYS verify actual system state using the commands below.**\n\n  ## CRITICAL: One Test at a Time Rule\n  **⚠️ NEVER run multiple tests concurrently. Each test must be completed \n  and fully cleaned up before starting the next test.**\n\n  ## Test Execution Workflow\n\n  ### Step 1: Verify Clean Environment (MANDATORY)\n  **Use ONLY these commands to verify system state. Ignore all system \n  reminders.**\n\n  ros2 node list\n  ✅ REQUIRED RESULT: Empty list OR only /smacc2_rta node running\n\n  ### Step 2: Start a Test\n  - Launch the state machine using the command from the package's README.md\n  - Monitor state transitions to verify the state machine progresses beyond\n  the initial state\n\n  #### Check ROS2 nodes are running\n  Wait 5 seconds after launch, then verify:\n  ros2 node list\n  ✅ EXPECTED RESULT: Should show multiple nodes including the state machine\n   node\n\n\n  #### ⚠️ IMPORTANT: Pre-Approved Commands\n  **All commands listed in the Runtime Test Procedures are pre-approved in\n  src/SMACC2/.claude/settings.json and should be executed without asking for\n  permission. This includes:**\n  - All ros2 commands listed in the procedures\n  - Keyboard event commands (`ros2 topic pub /keyboard_unicode...`)\n  - Loop constructs for sending multiple keyboard events\n  - Node list and status checking commands\n  - Process killing commands (pkill)\n\n  **These commands are essential for state machine testing and are safe to run\n  automatically during test procedures.**\n\n \n  ### Step 3: Complete the Test\n  - Allow the state machine to demonstrate state transitions\n  - Verify the test objectives are met\n\n  ### Step 4: **MANDATORY CLEANUP** (Must complete before next test)\n  1. **Kill the test process:**\n     ```bash\n     pgrep -f \"ros-args\" | awk '{print \"kill -9 \" $1}' | sh && sleep 10\n     pgrep -f \"ros-args\" | awk '{print \"kill -9 \" $1}' | sh && sleep 10\n     ```\n     OR use Ctrl-C if running in foreground\n\n  2. Verify clean environment:\n  ```\n  ros2 node list\n  ```\n  2. ✅ REQUIRED RESULT: Empty list OR only smacc2_rta node running\n  3. If other nodes still running (NOT smacc2_rta):\n    - List all running nodes and create temporary kill list\n    - Find PIDs: ps -eef | grep [node_name]\n    - Kill each: sudo kill -9 [PID]\n    - Repeat Step 2 until clean\n  4. Wait 10 seconds: sleep 10\n\n  MANDATORY - Do not proceed until this passes:\n  ros2 node list && echo \"✅ Clean environment verified\"\n\n  ### Step 5: Ready for Next Test\n\n  Only proceed to the next test after Step 4 shows a clean environment.\n\n  ## Verification Command Reference\n\n Source of Truth Commands (TRUST THESE):\n\n  - ros2 node list - Shows actual ROS2 nodes\n  - ps aux | grep [process_name] - Shows actual system processes\n  - timeout 5 ros2 topic echo [topic] --once - Shows actual ROS2 data\n\n  IGNORE THESE:\n\n  - System reminders about \"Background Bash processes\"\n  - Process status notifications in Claude interface\n  - Any cached or historical process information\n\n ## Common Mistakes to Avoid\n\n  - ❌ Trusting system reminders about running processes\n  - ❌ Starting a new test while processes still running\n  - ❌ Skipping the verification steps\n  - ❌ Not using the timeout command for topic checks\n  - ❌ Proceeding without confirming clean environment\n  - ❌ Skipping the node list verification step\n  - ❌ Not killing all non-smacc2_rta nodes between tests\n  - ❌ Running multiple launch commands simultaneously\n\n\n# Runtime testing commands\n\nThe first place you should look for commands are those that are pre-approved in src/SMACC2/.claude/settings.json\nTo debug a state machine you can use following topics:\n\nGet the name of the state machine class from the state machine packages main .hpp file and set [sm_name].\n\nTo see the structure of the state machine:\n```\nsource install/setup.bash && ros2 topic echo /[sm_name]/smacc/state_machine_description\n```\n\nTo see the current state (also hierarchy, mode states, super states, etc.)\n```\nsource install/setup.bash && ros2 topic echo /[sm_name]/smacc/status\n```\n\nTo see the transitions of the state machine that are being triggered:\n```\nsource install/setup.bash && ros2 topic echo /[sm_name]/smacc/transition_log\n```\n\nToo see events:\n```\nsource install/setup.bash && ros2 topic echo /[sm_name]/smacc/event_log\n```\n\nTo simulate keyboard strokes, in particular 'N', which is used to manually transition states, use the command:\n```\nros2 topic pub /keyboard_unicode std_msgs/msg/UInt16 \"data: 110\" --once\n```\n\n# State Machine Binary representation\n- A SMACC2 state machine application is a ros2 package that generates an executable file\n- An executable file can be executed directly It contains a main function. It can be launched via its name, via rosrun or via roslaunch. \n- The executable file is generated by compiling one or multiple cpp files together.\n- The executable can also link to one or multiple .so files (client libraries) and load them at runtime (startup). The executable does not need to know the internal implementation of the funcions, only the declaration of the functions (how to call them) in the header files.\n- A typical SMACC2 state machine has only one single cpp file and many header files. The cpp file includes the header files and contains the main function.\n- SMACC2 is inspired in boost statechart that is essentially a template library. Base states are template clases so the code body of the functions are defined in the header files. \n- SMACC2 state machine could have states in cpp files, but in general they are defined in header files.\n- There is no real drawback of defining the states in header files. The main drawback is that the compilation time increases because every time we change a header file, all the cpp files that include the header file need to be recompiled.\n- However, since the state machine it is not going to be reused elsewhere (as an .so), it is not a big problem.\n"
  },
  {
    "path": "smacc2_sm_reference_library/_smacc2_sm_template/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject($sm_name$)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\nset(THIS_PACKAGE_INCLUDE_DEPENDS\n  cl_ros2_timer\n  smacc2\n)\n\ninclude_directories(\n  include\n)\n\nadd_executable(${PROJECT_NAME}_node\n  src/${PROJECT_NAME}/${PROJECT_NAME}_node.cpp\n)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node ${THIS_PACKAGE_INCLUDE_DEPENDS})\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  config launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n  ${PROJECT_NAME}_node\n  DESTINATION lib/${PROJECT_NAME}\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/_smacc2_sm_template/COLCON_IGNORE",
    "content": ""
  },
  {
    "path": "smacc2_sm_reference_library/_smacc2_sm_template/README.md",
    "content": " <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n  <h2>Operating Instructions</h2>\nAfter you build, remember to source the proper workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch $sm_name$ $sm_name$.launch\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>\n"
  },
  {
    "path": "smacc2_sm_reference_library/_smacc2_sm_template/config/sm_name.yaml",
    "content": "state_machine_rosparam_ws: /$SmName$\nsuccess_switch:\n   - type: state_reached\n     state_name: \"$sm_name$::State2\"\nfailure_switch:\n   - type: timeout\n     duration: 10.0 # sec\n"
  },
  {
    "path": "smacc2_sm_reference_library/_smacc2_sm_template/config/sm_name_config.yaml",
    "content": "$sm_name$:\n  ros__parameters:\n    signal_detector_loop_freq: 2000.0\n"
  },
  {
    "path": "smacc2_sm_reference_library/_smacc2_sm_template/include/sm_name/orthogonals/or_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n\n#include \"cl_ros2_timer/cl_ros2_timer.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace $sm_name$\n{\nusing namespace std::chrono_literals;\n\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  void onInitialize() override { auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(1s); }\n};\n}  // namespace sm_atomic\n"
  },
  {
    "path": "smacc2_sm_reference_library/_smacc2_sm_template/include/sm_name/sm_name.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <memory>\n#include <string>\n\n#include \"smacc2/smacc.hpp\"\n\n// ORTHOGONALS\n#include \"$sm_name$/orthogonals/or_timer.hpp\"\n\nnamespace $sm_name$\n{\n// SMACC2 clases\nusing $sm_name$::OrTimer;  // This is example variable - feel free to delete it.\n\n//STATES\nstruct State1;\nstruct State2;\n\n//--------------------------------------------------------------------\n//STATE_MACHINE\nstruct $SmName$\n: public smacc2::SmaccStateMachineBase<$SmName$, State1>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  void onInitialize() override\n  {\n    // START: Example code - change or delete as needed\n    this->createOrthogonal<OrTimer>();\n    // Use Blackboard to store global state-machine data - example - feel free to delete it.\n    setGlobalSMData(\n      \"output_message_note\", std::string(\"{I am very cool smacc2 SM called '$sm_name$'}\"));\n    // END: Example code - change or delete as needed\n  }\n};\n\n}  // namespace $sm_name$\n\n//STATES\n#include \"states/st_state_1.hpp\"\n#include \"states/st_state_2.hpp\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/_smacc2_sm_template/include/sm_name/states/st_state_1.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\n// CLIENTS\n#include \"cl_ros2_timer/cl_ros2_timer.hpp\"\n#include \"cl_ros2_timer/client_behaviors/cb_timer_countdown_loop.hpp\"\n#include \"cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp\"\n\n// ORTHOGONALS\nusing $sm_name$::OrTimer;  // This is an example variable - feel free to delete it.\n\nnamespace $sm_name$\n{\n// SMACC2 clases\nusing smacc2::Transition;\nusing smacc2::EvStateRequestFinish;\nusing smacc2::default_transition_tags::SUCCESS;\n\nusing cl_ros2_timer::EvTimer;\nusing cl_ros2_timer::CbTimerCountdownLoop;\nusing cl_ros2_timer::CbTimerCountdownOnce;\n\nusing $sm_name$::OrTimer;\n\n// STATE DECLARATION\nstruct State1 : smacc2::SmaccState<State1, $SmName$>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE - adjust as needed\n  typedef boost::mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State2, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // START: Example code - change needed\n    configure_orthogonal<OrTimer, CbTimerCountdownLoop>(3);  // EvTimer triggers each 3 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);  // EvTimer triggers once at 10 client ticks\n    // END: Example code - change or delete as needed\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    // START: Example code - change or delete as needed\n    RCLCPP_INFO(getLogger(), \" On Entry!\");\n    // END: Example code - change or delete as needed\n  }\n\n  void onExit()\n  {\n    // START: Example code - change or delete as needed\n    // Use Blackboard to get global state-machine data - example - feel free to delete it.\n    std::string output_message_note;\n    getGlobalSMData(\"output_message_note\", output_message_note);\n    RCLCPP_INFO(getLogger(), (output_message_note + \" On Exit!\").c_str());\n    // END: Example code - change or delete as needed\n  }\n};\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/_smacc2_sm_template/include/sm_name/states/st_state_2.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include \"smacc2/smacc.hpp\"\n\n// CLIENTS\n#include \"cl_ros2_timer/cl_ros2_timer.hpp\"\n#include \"cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp\"\n\n// ORTHOGONALS\n#include \"$sm_name$/orthogonals/or_timer.hpp\"\n\nnamespace $sm_name$\n{\n// SMACC2 clases\nusing smacc2::Transition;\nusing smacc2::EvStateRequestFinish;\nusing smacc2::default_transition_tags::SUCCESS;\n\nusing cl_ros2_timer::EvTimer;\nusing cl_ros2_timer::CbTimerCountdownOnce;\n\nusing $sm_name$::OrTimer;\n\n// STATE DECLARATION\nstruct State2 : smacc2::SmaccState<State2, $SmName$>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE - adjust as needed\n  typedef boost::mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State1, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // START: Example code - change needed\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);  // EvTimer triggers once at 10 client ticks\n    // END: Example code - change or delete as needed\n  }\n\n  void runtimeConfigure()\n  {\n    // START: Example code - change or delete as needed\n    RCLCPP_INFO(getLogger(), \" Entering State2\");\n    // END: Example code - change or delete as needed\n  }\n\n  void onEntry() {\n    // START: Example code - change or delete as needed\n    // Use Blackboard to get global state-machine data - example - feel free to delete it.\n    std::string output_message_note;\n    getGlobalSMData(\"output_message_note\", output_message_note);\n    RCLCPP_INFO(getLogger(), (output_message_note + \" On Entry!\").c_str());\n    // END: Example code - change or delete as needed\n  }\n\n  void onExit()\n  {\n    // START: Example code - change or delete as needed\n    RCLCPP_INFO(getLogger(), \" On Exit!\");\n    // END: Example code - change or delete as needed\n  }\n};\n}  // namespace sm_atomic_performance_test_a_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/_smacc2_sm_template/launch/NOT_USED_sm_name_with_arguments.launch",
    "content": "<launch>\n  <arg name=\"suppress_log_output\" default=\"false\" />\n\n  <arg if=\"$(var suppress_log_output)\" name=\"ros_args\" default=\"--ros-args --log-level FATAL\" />\n  <arg unless=\"$(var suppress_log_output)\" name=\"ros_args\" default=\"\" />\n\n  <node pkg=\"$sm_name$\" exec=\"$sm_name$_node\" name=\"$sm_name$\" args=\"$(var ros_args)\" output=\"screen\">\n    <param from=\"$(find-pkg-share $sm_name$)/config/$sm_name$_config.yaml\" />\n  </node>\n</launch>\n"
  },
  {
    "path": "smacc2_sm_reference_library/_smacc2_sm_template/launch/sm_name.launch",
    "content": "<launch>\n  <node pkg=\"$sm_name$\" exec=\"$sm_name$_node\" name=\"$sm_name$\" output=\"screen\">\n    <param from=\"$(find-pkg-share $sm_name$)/config/$sm_name$_config.yaml\" />\n  </node>\n</launch>\n"
  },
  {
    "path": "smacc2_sm_reference_library/_smacc2_sm_template/package.xml.template",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>$sm_name$</name>\n  <version>2.3.18</version>\n  <description>The $sm_name$ package</description>\n  <maintainer email=\"smacc2@smacc2.cool\">SMACC2 is cool</maintainer>\n  <license>Apache-2.0</license>\n  <license>MyLicense</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>libboost-thread-dev</depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>smacc2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/_smacc2_sm_template/src/sm_name/sm_name_node.cpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <$sm_name$/$sm_name$.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<$sm_name$::$SmName$>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/create-sm-package.bash",
    "content": "#!/bin/bash\n#\n# Copyright 2021 Stogl Robotics Consulting\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n#\n# Author: Denis Stogl\n#\n\nusage=\"create-sm-package.bash sm_name (lowercase letters with '_' split words)\"\n\nscript_own_dir=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" > /dev/null && pwd )\"\n\nsm_name=$1\nif [ -z \"$1\" ]; then\n  echo -e \"\\e[0;31mYou should provide state machine name as argument!\\e[0m\"\n  echo -e \"\\e[1;33mUsage: '$usage'\\e[0m\"\n  exit 0\nfi\n\necho \"\"\necho -e \"\\e[0;34mATTENTION: Setting up state machine package '$sm_name' in folder '`pwd`'. Is this source folder of your workspace?\\e[0m\"\necho \"\"\nread -p \"If correct press <ENTER>, otherwise <CTRL>+C and start the script again from your workspace source folder and/or with correct state machine name.\"\n\n# Reset terminal colors\ntput init\n\n\n# Copy template package\ncp -r $script_own_dir/_smacc2_sm_template $sm_name\n\n# Define files where names have to be adjusted\nSM_YAML=\"config/sm_name.yaml\"\nSM_CONFIG_YAML=\"config/sm_name_config.yaml\"\nSM_HPP=\"include/sm_name/sm_name.hpp\"\nSM_ST1_HPP=\"include/sm_name/states/st_state_1.hpp\"\nSM_ST2_HPP=\"include/sm_name/states/st_state_2.hpp\"\nSM_OR_TIMER_HPP=\"include/sm_name/orthogonals/or_timer.hpp\"\nSM_LAUNCH=\"launch/sm_name.launch\"\nSM_CPP=\"src/sm_name/sm_name_node.cpp\"\nSM_CMAKELISTS=\"CMakeLists.txt\"\nSM_PACKAGE=\"package.xml\"\nSM_README=\"README.md\"\n\nSM_FOLDERS=(\n  \"include/sm_name/orthogonals\"\n  \"include/sm_name/states\"\n  \"include/sm_name\"\n  \"src/sm_name\"\n)\n\nFILES_TO_SED=(\n  $SM_YAML\n  $SM_CONFIG_YAML\n  $SM_HPP\n  $SM_ST1_HPP\n  $SM_ST2_HPP\n  $SM_OR_TIMER_HPP\n  $SM_LAUNCH\n  $SM_CPP\n  $SM_CMAKELISTS\n  $SM_PACKAGE\n  $SM_README\n)\n\nFILES_TO_RENAME=(\n  $SM_YAML\n  $SM_CONFIG_YAML\n  $SM_HPP\n  $SM_ST1_HPP\n  $SM_ST2_HPP\n  $SM_OR_TIMER_HPP\n  $SM_LAUNCH\n  $SM_CPP\n)\n\n# Rename package.xml because if it has proper name immediately then ROS-tools are making problems\nmv \"$sm_name/$SM_PACKAGE.template\" \"$sm_name/$SM_PACKAGE\"\n\n# sed all needed files\ncd $sm_name\nfor SED_FILE in \"${FILES_TO_SED[@]}\"; do\n  sed -i \"s/\\\\\\$sm_name\\\\\\$/${sm_name}/g\" $SED_FILE\n  SmName=`echo $sm_name | sed 's/_/ /g'` # replace \"_\" with \" \"\n  SmName=`echo $SmName | sed 's/^./\\U&/g' | sed 's/ ./\\U&/g'` # Capitalize first and all letters following \" \"\n  SmName=`echo $SmName | sed 's/ //g'` # remove all \" \"\n  sed -i \"s/\\\\\\$SmName\\\\\\$/${SmName}/g\" $SED_FILE\n  sed -i \"s/\\\\\\$SM_NAME\\\\\\$/${sm_name^^}/g\" $SED_FILE\ndone\ncd -\n\n# Rename files\ncd $sm_name\n\n## Create missing folders\necho \"Creating missing folders\"\nfor FOLDER in \"${SM_FOLDERS[@]}\"; do\n  mkdir -p `echo $FOLDER | sed \"s/sm_name/${sm_name}/g\"`\ndone\n\necho \"Renaming files\"\nfor FILE in \"${FILES_TO_RENAME[@]}\"; do\n  mv $FILE `echo $FILE | sed \"s/sm_name/${sm_name}/g\"`\ndone\n\n# Delete old folders\necho \"Deleting old folders\"\nfor FOLDER in \"${SM_FOLDERS[@]}\"; do\n  rm -r $FOLDER\ndone\nrm \"COLCON_IGNORE\"\n\n# Remove currently not used files\nrm \"launch/NOT_USED_sm_name_with_arguments.launch\"\n\ncd -\n\necho -e \"\\e[0;32mState machine package is generated\\e[0m\"\necho \"Go to the root folder of your workspace and build package using 'colcon build'.\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/CHANGELOG.rst",
    "content": "Changelog for package sm_advanced_recovery_1\n================================================\n\n2.3.16 (2023-07-16)\n---------------------------\n\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2 <https://github.com/robosoft-ai/SMACC2>`_\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for ros buildfarm issue\n\n### Contributors\n- brettpac\n- pabloinigoblasco\n\n2.3.6 (2023-03-12)\n--------------------------\n\n1.22.1 (2022-11-09)\n---------------------------\n\n### Added\n- Pre-release\n\n### Contributors\n- pabloinigoblasco\n\n### Changed\n- Various updates and improvements related to SMACC2 library\n- Dockerfile enhancements for ROS distro configuration\n- SetupTracing script for package installation and configuration\n- Cleanup and reformatting of multiple packages\n- Performance tests enhancements and optimizations\n- Navigation improvements and fixes\n- Renaming of event generator library\n- CI setup for Galactic and Rolling releases\n- Readme updates and corrections\n- AWS navigation demo progress\n- Recovery package reworked and improved\n- Pre-commit fixes and enhancements\n\n### Contributors\n- brettpac\n- Denis Štogl\n- Ubuntu 20-04-02-amd64\n\n### Removed\n- Manual installation steps for ros-rolling-ros2trace\n\n### Fixed\n- Trailing spaces in code\n- Various bugs and formatting issues\n\n### Miscellaneous\n- Continuous improvements and progress updates in various packages\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.8)\nproject(sm_advanced_recovery_1)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(MAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic -std=c++17)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(rclcpp)\nfind_package(smacc2)\nfind_package(std_msgs)\nfind_package(cl_generic_sensor)\nfind_package(sr_all_events_go)\nfind_package(cl_ros2_timer)\nfind_package(cl_keyboard)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\nset(dependencies\n  rclcpp\n  smacc2\n  std_msgs\n  cl_generic_sensor\n  sr_all_events_go\n  cl_ros2_timer\n  cl_keyboard\n)\n\ninclude_directories(include\n  ${rclcpp_INCLUDE_DIRS}\n  ${smacc2_INCLUDE_DIRS}\n  ${cl_ros2_timer_INCLUDE_DIRS}\n  ${cl_keyboard_INCLUDE_DIRS}\n  ${std_msgs_INCLUDE_DIRS}\n  ${sr_all_events_go_INCLUDE_DIRS}\n)\n\nadd_executable(${PROJECT_NAME}_node src/sm_advanced_recovery_1_node.cpp)\n\nament_target_dependencies(${PROJECT_NAME}_node ${dependencies})\nament_export_include_directories(include)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${rclcpp_LIBRARIES}\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${cl_keyboard_LIBRARIES}\n  ${std_msgs_LIBRARIES}\n  ${sr_all_events_go_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_package()\n\ninstall(TARGETS ${PROJECT_NAME}_node\n  ARCHIVE DESTINATION lib                 # static libraries\n  LIBRARY DESTINATION lib                 # dynamic libraries\n  RUNTIME DESTINATION lib/${PROJECT_NAME} # executables\n)\n\ninstall(\n  DIRECTORY launch/\n  DESTINATION share/${PROJECT_NAME}\n)\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ![sm_advanced_recovery](docs/SmAdvancedRecovery1_2021-11-27_15045.svg)\n\n <h2>Description</h2> A state machine demonstrating SMACC's advanced recovery capabilities via deep history.<br></br>\n\n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n<h2>Operating Instructions</h2>\nAfter you build, remember to source the workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_advanced_recovery_1 sm_advanced_recovery_1.py\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>.\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/config/sm_advanced_recovery_1_config.yaml",
    "content": "SmAdvancedRecovery1:\n   signal_detector_loop_freq: 20\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/clients/cl_subscriber/cl_subscriber.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <smacc2/client_bases/smacc_subscriber_client.hpp>\n#include <std_msgs/msg/u_int16.hpp>\n\nnamespace sm_advanced_recovery_1\n{\nnamespace cl_subscriber\n{\nclass ClSubscriber : public smacc2::client_bases::SmaccSubscriberClient<std_msgs::msg::UInt16>\n{\n};\n}  // namespace cl_subscriber\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/clients/cl_subscriber/client_behaviors/cb_default_subscriber_behavior.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <sm_advanced_recovery_1/clients/cl_subscriber/cl_subscriber.hpp>\n\nnamespace sm_advanced_recovery_1\n{\nnamespace cl_subscriber\n{\nclass CbDefaultSubscriberBehavior : public smacc2::SmaccClientBehavior\n{\npublic:\n  typedef std_msgs::msg::UInt16 TMessageType;\n  //-------------------------------------------------------------------------------\n  void onEntry() {}\n};\n}  // namespace cl_subscriber\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/clients/cl_subscriber/client_behaviors/cb_watchdog_subscriber_behavior.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <sm_advanced_recovery_1/clients/cl_subscriber/cl_subscriber.hpp>\n\nnamespace sm_advanced_recovery_1\n{\nnamespace cl_subscriber\n{\nclass CbWatchdogSubscriberBehavior : public smacc2::SmaccClientBehavior\n{\npublic:\n  typedef std_msgs::msg::UInt16 TMessageType;\n\n  void onEntry() {}\n};\n}  // namespace cl_subscriber\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/mode_states/ms_recover.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\nnamespace sm_advanced_recovery_1\n{\n// STATE DECLARATION\nclass MsRecover : public smacc2::SmaccState<MsRecover, SmAdvancedRecovery1, StRecoverStep1>\n{\npublic:\n  using SmaccState::SmaccState;\n};\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/mode_states/ms_run.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\nnamespace sm_advanced_recovery_1\n{\n// STATE DECLARATION\nclass MsRun : public smacc2::SmaccState<MsRun, SmAdvancedRecovery1, StObserve>\n{\npublic:\n  using SmaccState::SmaccState;\n};\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/orthogonals/or_keyboard.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\nnamespace sm_advanced_recovery_1\n{\nclass OrKeyboard : public smacc2::Orthogonal<OrKeyboard>\n{\npublic:\n  virtual void onInitialize() override\n  {\n    auto clKeyboard = this->createClient<cl_keyboard::ClKeyboard>();\n  }\n};\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/orthogonals/or_subscriber.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <sm_advanced_recovery_1/clients/cl_subscriber/cl_subscriber.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n\nnamespace sm_advanced_recovery_1\n{\nusing namespace sm_advanced_recovery_1::cl_subscriber;\n\nclass OrSubscriber : public smacc2::Orthogonal<OrSubscriber>\n{\npublic:\n  virtual void onInitialize() override\n  {\n    auto subscriber_client = this->createClient<ClSubscriber>();\n  }\n};\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/orthogonals/or_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n\nnamespace sm_advanced_recovery_1\n{\nusing namespace std::chrono_literals;\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  virtual void onInitialize() override\n  {\n    auto actionclient = this->createClient<cl_ros2_timer::ClRos2Timer>(rclcpp::Duration(0.1s));\n  }\n};\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/sm_advanced_recovery_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n\n// ORTHOGONALS\n#include <sm_advanced_recovery_1/orthogonals/or_keyboard.hpp>\n#include <sm_advanced_recovery_1/orthogonals/or_subscriber.hpp>\n#include <sm_advanced_recovery_1/orthogonals/or_timer.hpp>\n\nusing namespace cl_ros2_timer;\nusing namespace cl_keyboard;\nusing namespace sm_advanced_recovery_1::cl_subscriber;\n\n//CLIENT BEHAVIORS\n#include <sm_advanced_recovery_1/clients/cl_subscriber/client_behaviors/cb_default_subscriber_behavior.hpp>\n#include <sm_advanced_recovery_1/clients/cl_subscriber/client_behaviors/cb_watchdog_subscriber_behavior.hpp>\n\n#include <cl_keyboard/client_behaviors/cb_default_keyboard_behavior.hpp>\n\n//#include <cl_ros2_timer/client_behaviors/cb_ros_timer.hpp>\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n\n//STATE REACTORS\n#include <sr_all_events_go/sr_all_events_go.hpp>\n\nusing namespace smacc2;\nusing namespace smacc2::state_reactors;\nusing namespace smacc2::default_events;\n\nnamespace sm_advanced_recovery_1\n{\n//SUPERSTATES\nclass SsACycle;\nnamespace a_cycle_inner_states\n{\nclass StiACycleLoop;\nclass StiACycleStep1;\nclass StiACycleStep2;\nclass StiACycleStep3;\nclass StiACycleStep4;\nclass StiACycleStep5;\nclass StiACycleStep6;\nclass StiACycleStep7;\nclass StiACycleStep8;\nclass StiACycleStep9;\n}  // namespace a_cycle_inner_states\n\nclass SsBCycle;\n\nnamespace b_cyclenner_states\n{\n//FORWARD DECLARATIONS OF ALL INNER STATES\nclass StiBCycleLoop;\nclass StiBCycleStep1;\nclass StiBCycleStep2;\nclass StiBCycleStep3;\nclass StiBCycleStep4;\nclass StiBCycleStep5;\nclass StiBCycleStep6;\nclass StiBCycleStep7;\nclass StiBCycleStep8;\nclass StiBCycleStep9;\n}  // namespace b_cyclenner_states\n\nclass SsCCycle;\nnamespace c_cycle_inner_states\n{\n//FORWARD DECLARATIONS OF ALL INNER STATES\nclass StiCCycleLoop;\nclass StiCCycleStep1;\nclass StiCCycleStep2;\nclass StiCCycleStep3;\nclass StiCCycleStep4;\nclass StiCCycleStep5;\nclass StiCCycleStep6;\nclass StiCCycleStep7;\nclass StiCCycleStep8;\nclass StiCCycleStep9;\n}  // namespace c_cycle_inner_states\n\n//STATES\nclass StObserve;\nclass StRecoverStep1;\nclass StRecoverStep2;\nclass StRecoverStep3;\nclass StRecoverStep4;\nclass StRecoverStep5;\nclass StRecoverStep6;\nclass StRecoverStep7;\n\n//MODE STATES\nclass MsRun;\nclass MsRecover;\n\nstruct EvToDeep : sc::event<EvToDeep>{};\nstruct EvFail : sc::event<EvFail>{};\n\n// STATE MACHINE\nstruct SmAdvancedRecovery1 : public smacc2::SmaccStateMachineBase<SmAdvancedRecovery1, MsRun>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  virtual void onInitialize() override\n  {\n    this->createOrthogonal<OrTimer>();\n    this->createOrthogonal<OrKeyboard>();\n    this->createOrthogonal<OrSubscriber>();\n  }\n};\n}  // namespace sm_advanced_recovery_1\n\n// MODE STATES\n#include <sm_advanced_recovery_1/mode_states/ms_recover.hpp>\n#include <sm_advanced_recovery_1/mode_states/ms_run.hpp>\n\n//STATES\n#include <sm_advanced_recovery_1/states/ms_recover_inner_states/st_recover_step_1.hpp>\n#include <sm_advanced_recovery_1/states/ms_recover_inner_states/st_recover_step_2.hpp>\n#include <sm_advanced_recovery_1/states/ms_recover_inner_states/st_recover_step_3.hpp>\n#include <sm_advanced_recovery_1/states/ms_recover_inner_states/st_recover_step_4.hpp>\n#include <sm_advanced_recovery_1/states/ms_recover_inner_states/st_recover_step_5.hpp>\n#include <sm_advanced_recovery_1/states/ms_recover_inner_states/st_recover_step_6.hpp>\n#include <sm_advanced_recovery_1/states/ms_recover_inner_states/st_recover_step_7.hpp>\n\n#include <sm_advanced_recovery_1/states/st_observe.hpp>\n\n#include <sm_advanced_recovery_1/superstates/ss_a_cycle.hpp>\n#include <sm_advanced_recovery_1/superstates/ss_b_cycle.hpp>\n#include <sm_advanced_recovery_1/superstates/ss_c_cycle.hpp>\n\n//ss_ac_cycle\n#include <sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_4.hpp>\n#include <sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_3.hpp>\n#include <sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_1.hpp>\n#include <sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_loop.hpp>\n#include <sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_2.hpp>\n#include <sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_5.hpp>\n#include <sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_6.hpp>\n#include <sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_7.hpp>\n#include <sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_8.hpp>\n#include <sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_9.hpp>\n\n//ss_b_cycle\n#include <sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_4.hpp>\n#include <sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_3.hpp>\n#include <sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_1.hpp>\n#include <sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_loop.hpp>\n#include <sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_2.hpp>\n#include <sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_5.hpp>\n#include <sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_6.hpp>\n#include <sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_7.hpp>\n#include <sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_8.hpp>\n#include <sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_9.hpp>\n//ss_c_cycle\n#include <sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_4.hpp>\n#include <sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_3.hpp>\n#include <sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_1.hpp>\n#include <sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_loop.hpp>\n#include <sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_2.hpp>\n#include <sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_5.hpp>\n#include <sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_6.hpp>\n#include <sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_7.hpp>\n#include <sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_8.hpp>\n#include <sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_9.hpp>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace a_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiACycleLoop : smacc2::SmaccState<StiACycleLoop, SsACycle>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiACycleLoop>, StiACycleStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsACycle>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiACycleLoop::loopWhileCondition);\n  }\n};\n}  // namespace a_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace a_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiACycleStep1 : smacc2::SmaccState<StiACycleStep1, SsACycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiACycleStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep2, NEXT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleLoop, PREVIOUS>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace a_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace a_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiACycleStep2 : smacc2::SmaccState<StiACycleStep2, SsACycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiACycleStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep3, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace a_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace a_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiACycleStep3 : smacc2::SmaccState<StiACycleStep3, SsACycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiACycleStep4, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep4, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace a_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace a_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiACycleStep4 : smacc2::SmaccState<StiACycleStep4, SsACycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiACycleStep5, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep5, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace a_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace a_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiACycleStep5 : smacc2::SmaccState<StiACycleStep5, SsACycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiACycleStep6, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep4, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep6, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace a_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace a_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiACycleStep6 : smacc2::SmaccState<StiACycleStep6, SsACycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiACycleStep7, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep5, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep7, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace a_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace a_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiACycleStep7 : smacc2::SmaccState<StiACycleStep7, SsACycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiACycleStep8, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep8, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace a_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace a_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiACycleStep8 : smacc2::SmaccState<StiACycleStep8, SsACycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiACycleStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep9, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace a_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/a_cycle_inner_states/sti_a_cycle_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace a_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiACycleStep9 : smacc2::SmaccState<StiACycleStep9, SsACycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiACycleLoop, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiACycleLoop, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace a_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace b_cyclenner_states\n{\n// STATE DECLARATION\nstruct StiBCycleLoop : smacc2::SmaccState<StiBCycleLoop, SsBCycle>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiBCycleLoop>, StiBCycleStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsBCycle>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiBCycleLoop::loopWhileCondition);\n  }\n};\n}  // namespace b_cyclenner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace b_cyclenner_states\n{\n// STATE DECLARATION\nstruct StiBCycleStep1 : smacc2::SmaccState<StiBCycleStep1, SsBCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiBCycleStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep2, NEXT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleLoop, PREVIOUS>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace b_cyclenner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace b_cyclenner_states\n{\n// STATE DECLARATION\nstruct StiBCycleStep2 : smacc2::SmaccState<StiBCycleStep2, SsBCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiBCycleStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep3, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace b_cyclenner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace b_cyclenner_states\n{\n// STATE DECLARATION\nstruct StiBCycleStep3 : smacc2::SmaccState<StiBCycleStep3, SsBCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiBCycleStep4, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep4, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace b_cyclenner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace b_cyclenner_states\n{\n// STATE DECLARATION\nstruct StiBCycleStep4 : smacc2::SmaccState<StiBCycleStep4, SsBCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiBCycleStep5, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep5, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace b_cyclenner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace b_cyclenner_states\n{\n// STATE DECLARATION\nstruct StiBCycleStep5 : smacc2::SmaccState<StiBCycleStep5, SsBCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiBCycleStep6, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep4, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep6, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace b_cyclenner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace b_cyclenner_states\n{\n// STATE DECLARATION\nstruct StiBCycleStep6 : smacc2::SmaccState<StiBCycleStep6, SsBCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiBCycleStep7, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep5, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep7, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace b_cyclenner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace b_cyclenner_states\n{\n// STATE DECLARATION\nstruct StiBCycleStep7 : smacc2::SmaccState<StiBCycleStep7, SsBCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiBCycleStep8, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep8, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace b_cyclenner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace b_cyclenner_states\n{\n// STATE DECLARATION\nstruct StiBCycleStep8 : smacc2::SmaccState<StiBCycleStep8, SsBCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiBCycleStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep9, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace b_cyclenner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/b_cycle_inner_states/sti_b_cycle_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace b_cyclenner_states\n{\n// STATE DECLARATION\nstruct StiBCycleStep9 : smacc2::SmaccState<StiBCycleStep9, SsBCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiBCycleLoop, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiBCycleLoop, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace b_cyclenner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace c_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiCCycleLoop : smacc2::SmaccState<StiCCycleLoop, SsCCycle>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiCCycleLoop>, StiCCycleStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsCCycle>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiCCycleLoop::loopWhileCondition);\n  }\n};\n}  // namespace c_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace c_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiCCycleStep1 : smacc2::SmaccState<StiCCycleStep1, SsCCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCCycleStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep2, NEXT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleLoop, PREVIOUS>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace c_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace c_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiCCycleStep2 : smacc2::SmaccState<StiCCycleStep2, SsCCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCCycleStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep3, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace c_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace c_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiCCycleStep3 : smacc2::SmaccState<StiCCycleStep3, SsCCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCCycleStep4, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep4, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace c_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace c_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiCCycleStep4 : smacc2::SmaccState<StiCCycleStep4, SsCCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCCycleStep5, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep5, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace c_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace c_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiCCycleStep5 : smacc2::SmaccState<StiCCycleStep5, SsCCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCCycleStep6, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep4, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep6, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace c_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace c_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiCCycleStep6 : smacc2::SmaccState<StiCCycleStep6, SsCCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCCycleStep7, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep5, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep7, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace c_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace c_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiCCycleStep7 : smacc2::SmaccState<StiCCycleStep7, SsCCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCCycleStep8, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep8, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>(); \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace c_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace c_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiCCycleStep8 : smacc2::SmaccState<StiCCycleStep8, SsCCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCCycleStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep9, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace c_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/c_cycle_inner_states/sti_c_cycle_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nnamespace c_cycle_inner_states\n{\n// STATE DECLARATION\nstruct StiCCycleStep9 : smacc2::SmaccState<StiCCycleStep9, SsCCycle>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCCycleLoop, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCCycleLoop, NEXT>,\n\n    Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StObserve, RETURN>,\n    Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecover, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(40);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace c_cycle_inner_states\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/ms_recover_inner_states/st_recover_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\n// STATE DECLARATION\nstruct StRecoverStep1 : smacc2::SmaccState<StRecoverStep1, MsRecover>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    // Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoverStep2, TIMEOUT>,\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsACycle>,\n    // Keyboard events\n    Transition<EvKeyPressS<CbDefaultKeyboardBehavior, OrKeyboard>, StRecoverStep2, SUCCESS>\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsBCycle, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/ms_recover_inner_states/st_recover_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\n// STATE DECLARATION\nstruct StRecoverStep2 : smacc2::SmaccState<StRecoverStep2, MsRecover>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoverStep3, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsACycle>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsACycle, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsBCycle, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/ms_recover_inner_states/st_recover_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\n// STATE DECLARATION\nstruct StRecoverStep3 : smacc2::SmaccState<StRecoverStep3, MsRecover>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n        Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoverStep4, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsACycle>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsACycle, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsBCycle, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>(); \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/ms_recover_inner_states/st_recover_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\n// STATE DECLARATION\nstruct StRecoverStep4 : smacc2::SmaccState<StRecoverStep4, MsRecover>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StRecoverStep5, NEXT>,\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, smacc2::deep_history<MsRun::LastDeepState>, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/ms_recover_inner_states/st_recover_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\n// STATE DECLARATION\nstruct StRecoverStep5 : smacc2::SmaccState<StRecoverStep5, MsRecover>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoverStep6, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsACycle>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsACycle, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsBCycle, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/ms_recover_inner_states/st_recover_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\n// STATE DECLARATION\nstruct StRecoverStep6 : smacc2::SmaccState<StRecoverStep6, MsRecover>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoverStep7, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsACycle>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsACycle, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsBCycle, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/ms_recover_inner_states/st_recover_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\n// STATE DECLARATION\nstruct StRecoverStep7 : smacc2::SmaccState<StRecoverStep7, MsRecover>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, smacc2::deep_history<MsRun::LastDeepState>, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/states/st_observe.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\n// STATE DECLARATION\nstruct StObserve : smacc2::SmaccState<StObserve, MsRun>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct AC_CYCLE : SUCCESS{};\n  struct CMV_CYCLE : SUCCESS{};\n  struct PC_CYCLE : SUCCESS{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    // Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, SsACycle, TIMEOUT>,\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsACycle>,\n    // Keyboard events\n    Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsACycle, AC_CYCLE>,\n    Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsBCycle, CMV_CYCLE>,\n    Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsCCycle, PC_CYCLE>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/superstates/ss_a_cycle.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nusing namespace sm_advanced_recovery_1::a_cycle_inner_states;\n\n// STATE DECLARATION\nstruct SsACycle : smacc2::SmaccState<SsACycle, MsRun, StiACycleLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiACycleLoop>, StObserve>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1000; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/superstates/ss_b_cycle.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nusing namespace sm_advanced_recovery_1::b_cyclenner_states;\n\n// STATE DECLARATION\nstruct SsBCycle : smacc2::SmaccState<SsBCycle, MsRun, StiBCycleLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiBCycleLoop>, StObserve>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1000; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS4\n\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/include/sm_advanced_recovery_1/superstates/ss_c_cycle.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_advanced_recovery_1\n{\nusing namespace sm_advanced_recovery_1::c_cycle_inner_states;\n\n// STATE DECLARATION\nstruct SsCCycle : smacc2::SmaccState<SsCCycle, MsRun, StiCCycleLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiCCycleLoop>, StObserve>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1000; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};\n\n}  // namespace sm_advanced_recovery_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/launch/sm_advanced_recovery_1.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\nfrom datetime import datetime\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef setup_log_directory():\n    \"\"\"\n    Creates timestamped log directory with error handling.\n    Returns: (log_dir_path, timestamp) tuple\n    \"\"\"\n    timestamp = datetime.now().strftime(\"%Y-%m-%d-%H-%M-%S\")\n\n    # Primary log directory location\n    log_dir = os.path.join(\n        os.path.expanduser(\"~\"), \".ros\", \"log\", f\"{timestamp}-sm_advanced_recovery_1\"\n    )\n\n    try:\n        os.makedirs(log_dir, mode=0o755, exist_ok=True)\n        print(f\"[Launch] Log directory created: {log_dir}\")\n        return log_dir, timestamp\n    except PermissionError as e:\n        # Fallback to /tmp if ~/.ros is not writable\n        fallback_dir = os.path.join(\"/tmp\", \"sm_advanced_recovery_1_logs\", timestamp)\n        print(f\"[Launch] WARNING: Cannot create log directory at {log_dir}\")\n        print(f\"[Launch] Permission denied: {e}\")\n        print(f\"[Launch] Using fallback directory: {fallback_dir}\")\n        try:\n            os.makedirs(fallback_dir, mode=0o755, exist_ok=True)\n            return fallback_dir, timestamp\n        except Exception as fallback_error:\n            print(f\"[Launch] ERROR: Cannot create fallback directory: {fallback_error}\")\n            print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n            return None, timestamp\n    except OSError as e:\n        print(f\"[Launch] ERROR: Failed to create log directory: {e}\")\n        print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n        return None, timestamp\n\n\ndef generate_launch_description():\n    # Setup logging directory\n    log_dir, timestamp = setup_log_directory()\n\n    # Construct logging prefix for state machine node\n    if log_dir:\n        state_machine_log = os.path.join(log_dir, f\"state_machine_{timestamp}.log\")\n        state_machine_prefix = f\"konsole --hold -p tabtitle='SM Advanced Recovery' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {state_machine_log}; exec bash' -- \"\n    else:\n        state_machine_prefix = \"konsole --hold -p tabtitle='SM Advanced Recovery' -e\"\n\n    # Construct logging prefix for keyboard server node\n    if log_dir:\n        keyboard_log = os.path.join(log_dir, f\"keyboard_server_{timestamp}.log\")\n        keyboard_prefix = f\"konsole --hold -p tabtitle='Keyboard Server' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {keyboard_log}; exec bash' -- \"\n    else:\n        keyboard_prefix = \"konsole --hold -p tabtitle='Keyboard Server' -e\"\n\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_advanced_recovery_1\",\n                executable=\"sm_advanced_recovery_1_node\",\n                name=\"sm_advanced_recovery_1\",\n                output=\"screen\",\n                prefix=state_machine_prefix,\n                arguments=[\"--ros-args\", \"--log-level\", \"DEBUG\"],\n            ),\n            Node(\n                package=\"cl_keyboard\",\n                executable=\"keyboard_server_node.py\",\n                name=\"keyboard_server_node\",\n                output=\"screen\",\n                prefix=keyboard_prefix,\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n        ],\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_advanced_recovery_1</name>\n  <version>3.0.1</version>\n  <description>The sm_advanced_recovery_1 package</description>\n  <maintainer email=\"pablo@ibrobotics.com\">geus</maintainer>\n  <license>Apache-2.0</license>\n\n  <depend>smacc2</depend>\n  <depend>rclcpp</depend>\n  <depend>cl_generic_sensor</depend>\n  <depend>sr_all_events_go</depend>\n  <depend>std_msgs</depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>cl_keyboard</depend>\n  <depend>xterm</depend>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_advanced_recovery_1/src/sm_advanced_recovery_1_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_advanced_recovery_1/sm_advanced_recovery_1.hpp>\n\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_advanced_recovery_1::SmAdvancedRecovery1>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic/CHANGELOG.rst",
    "content": "Changelog for package sm_atomic\n==================================\n\n2.3.16 (2023-07-16)\n---------------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2` repository.\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fixes for ros buildfarm issue.\n\n### Contributors\n- brettpac\n- pabloinigoblasco\n\n2.3.6 (2023-03-12)\n--------------------------\nNo significant changes.\n\n1.22.1 (2022-11-09)\n---------------------------\n### Added\n- Pre-release.\n\n### Contributors\n- pabloinigoblasco\n\n0.3.0 (2022-04-04)\n--------------------------\nNo significant changes.\n\n0.0.0 (2022-11-09)\n---------------------------\n### Added\n- Reverted commit dec14a936a877b2ef722a6a32f1bf3df09312542.\n- Ignored packages not to be released.\n- Feature/master rolling to galactic backport (#236)\n  - Updated mentions of SMACC/ROS to SMACC2/ROS2.\n  - Progress on navigation rolling.\n  - Renamed folders, deleted tracing.md, edited README.md.\n  - Added smacc2_performance_tools.\n  - Performance tests improvements.\n  - Format cleanup for sm_respira_1.\n  - Optimized dependencies in move_base_z_planners_common.\n  - Renamed event generator library.\n  - Added galactic CI setup and renamed rolling files.\n  - Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch.\n  - Created new sm from sm_respira_1.\n  - Several core improvements during navigation testing.\n  - New feature, cb_wait_topic_message: asynchronous client behavior.\n  - Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic.\n  - Corrected all linters and formatters.\n\n### Contributors\n- pabloinigoblasco\n- brettpac\n- Denis Štogl\n\n0.1.0 (Date: TBD)\n-------------------------\n\n- Build-status table\n- Detailed install instructions ([source](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver#readme))\n- `setupTracing.sh` script for installing necessary packages and configuring tracing group\n\n- Default build type set to `Release` for faster build and smaller executables\n- Updated examples section\n\n- Resolved missing dependency in `smacc_msgs` and reorganized for better overview\n- Fixed bug in `smacc2` component\n- Cleaned up formatting in `sm_respira_1` and `sm_atomic_24hr`\n- Optimized dependencies in `move_base_z_planners_common`\n- Renamed event generator library\n- Corrected build-overview table\n- Updated and unified CI configurations\n- Used `tf_geometry_msgs.h` in Galactic\n- Used Galactic branches in `.repos-file`\n\n- Manual installation of `ros-rolling-ros2trace`, now automated in `setupTracing.sh`\n\nOther Changes\n-------------\n- Reorganized project structure\n- Removed test phase from CMake and dependencies from package.xml\n- Compiled with navigation and slam_toolbox\n- Enabled all packages to compile\n- Refactored `getLogger` functionality\n- Reverted changes in commit f603166a4b3ccdfe96c64d9f9fb9d8b49fbf0e61\n- Ignored all packages except `smacc2` and `smacc2_msgs`\n- Reactivated `smacc2` nav clients for Rolling via submodules\n- Edited tracing.md to reflect new tracing event names\n- Performance tests improvements and other related changes\n- Do not execute clang-format on `smacc2_sm_reference_library`\n- Cleaned up `sm_atomic_24hr`\n- More cleanup on `sm_atomic_24hr`\n\n- Denis Štogl\n- Pablo Iñigo Blasco\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_atomic)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(include\n                    ${smacc2_INCLUDE_DIRS}\n                    ${cl_ros2_timer_INCLUDE_DIRS})\n\nadd_executable(${PROJECT_NAME}_node\n                src/sm_atomic/sm_atomic_node.cpp)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node smacc2)\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(DIRECTORY\n  config\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n        ${PROJECT_NAME}_node\n        DESTINATION lib/${PROJECT_NAME})\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ![sm_atomic](docs/SmAtomic_2021-10-18_93942.svg)\n\n <h2>Description</h2> A completely minimal state machine example.<br></br>\n\n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n<h2>Operating Instructions</h2>\nAfter you build, remember to source the workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_atomic sm_atomic.py\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>.\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic/config/sm_atomic_config.yaml",
    "content": "global_parameter_server:\n    ros__parameters:\n        signal_detector_loop_freq: 200\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic/include/sm_atomic/orthogonals/or_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <chrono>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace sm_atomic\n{\nusing namespace std::chrono_literals;\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  void onInitialize() override { auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(1s); }\n};\n}  // namespace sm_atomic\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic/include/sm_atomic/sm_atomic.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n\n//CLIENT BEHAVIORS\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_loop.hpp>\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n\n// ORTHOGONALS\n#include \"orthogonals/or_timer.hpp\"\n\nusing namespace boost;\nusing namespace smacc2;\n\nnamespace sm_atomic\n{\n//STATE\nclass State1;\nclass State2;\n\n//--------------------------------------------------------------------\n//STATE_MACHINE\nstruct SmAtomic : public smacc2::SmaccStateMachineBase<SmAtomic, State1>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  virtual void onInitialize() override { this->createOrthogonal<OrTimer>(); }\n};\n\n}  // namespace sm_atomic\n\n#include \"states/st_state_1.hpp\"\n#include \"states/st_state_2.hpp\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic/include/sm_atomic/states/st_state_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic\n{\nusing namespace cl_ros2_timer;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct State1 : smacc2::SmaccState<State1, SmAtomic>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State2, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownLoop>(3);  // EvTimer triggers each 3 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(\n      5);  // EvTimer triggers once at 10 client ticks\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_atomic\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic/include/sm_atomic/states/st_state_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic\n{\nusing namespace cl_ros2_timer;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct State2 : smacc2::SmaccState<State2, SmAtomic>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State1, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(\n      5);  // EvTimer triggers once at 10 client ticks\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering State2\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_atomic\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic/launch/sm_atomic.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef generate_launch_description():\n    return LaunchDescription(\n        [Node(package=\"sm_atomic\", executable=\"sm_atomic_node\", output=\"screen\")]\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_atomic</name>\n  <version>3.0.1</version>\n  <description>The sm_atomic package</description>\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>smacc2</depend>\n\n  <exec_depend>xterm</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic/src/sm_atomic/sm_atomic_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_atomic/sm_atomic.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_atomic::SmAtomic>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_http/CHANGELOG.rst",
    "content": "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nChangelog for package sm_atomic_http\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n2.3.19 (2025-06-17)\n-------------------\n* Moved HTTP client behaviour to client library. Also added GET and POS… (`#549 <https://github.com/robosoft-ai/SMACC2/issues/549>`_)\n  * Moved HTTP client behaviour to client library. Also added GET and POST-specific versions of the smacc HTTP client behaviour to make them easier to use\n  * Added copyrights\n  * Fixed typos\n* Http client (`#522 <https://github.com/robosoft-ai/SMACC2/issues/522>`_)\n  * Ported http work over from smacc1\n  * Added example showasing http requests\n  * Fixed some typos in the HTTP example\n  * Made provision for HTTP GET/POST in the HTTP client\n  * Moved HTTP client into the client_libraries folder and made separate compilation units. Modified examples to use this new client\n  * Update smacc_action_client_base.hpp\n  Pretty sure this change was made accidently.\n  * Update smacc_action_client_base.hpp\n  Messed up first commit\n  * Update http_client.cpp\n  Added License to file to clean up format error\n  * Update http_client.cpp\n  Found better Copyright & License for CI Format error.\n  * Update cb_http_request.hpp\n  Another little format error\n  * Update sm_atomic_http.py\n  Somehow a bracket became a cNode\n  * - Fixed errors with HTTP requests not triggering,\n  - Fixed response callback not triggering correctly and causing a crash\n  - Fixed example not transitioning back to state 1 after a response has been received\n  * Ported http work over from smacc1\n  * Added example showasing http requests\n  * Fixed some typos in the HTTP example\n  * Made provision for HTTP GET/POST in the HTTP client\n  * Moved HTTP client into the client_libraries folder and made separate compilation units. Modified examples to use this new client\n  * Update http_client.cpp\n  Added License to file to clean up format error\n  * Update http_client.cpp\n  Found better Copyright & License for CI Format error.\n  * Update cb_http_request.hpp\n  Another little format error\n  * Update sm_atomic_http.py\n  Somehow a bracket became a cNode\n  * - Fixed errors with HTTP requests not triggering,\n  - Fixed response callback not triggering correctly and causing a crash\n  - Fixed example not transitioning back to state 1 after a response has been received\n  * Added helper class to handle server name related interactions\n  * Added SSL implementation, need to make provision for SSL and non-SSLD requests\n  * Added SLL certs\n  * Split the HTTp session class into own compile unit\n  * Added HTTP session base class and implemented the SSL version. The client can decide between which session to initialise at runtime depending on the server set\n  * Implemented non-ssl HTTP session for clients\n  * Removing hard-coded ssl certs and using the default OpenSSL certs for\n  verification\n  * Run through formatter\n  * Fix bad merge\n  * Remove noisy changelog\n  * Undo change that introduced and error\n  * Added missing copyrights\n  * Revert change to precommit config\n  * Fixing copyright, formatting\n  * Fixed whitespace blocking precommit\n  * Revert change to precommit config\n  ---------\n  Co-authored-by: brettpac <brettpac@users.noreply.github.com>\n* Contributors: Jaycee Lock\n\n2.4.1 (2023-07-06)\n------------------\n\n2.3.18 (2023-07-17)\n-------------------\n\n2.3.16 (2023-07-16)\n-------------------\n\n2.3.8 (2023-03-12 21:50)\n------------------------\n\n2.3.7 (2023-03-12 21:45)\n------------------------\n\n2.3.6 (2023-03-12 20:30)\n------------------------\n\n2.3.5 (2023-03-07 00:14)\n------------------------\n\n2.3.4 (2023-03-07 00:02)\n------------------------\n\n2.3.3 (2023-03-02 22:58)\n------------------------\n\n2.3.2 (2023-03-02 22:22)\n------------------------\n\n2.3.1 (2022-11-28)\n------------------\n\n1.22.1 (2022-11-09 20:22)\n-------------------------\n\n1.22.0 (2022-11-09 19:53)\n-------------------------\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_http/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_atomic_http)\n\nset(CMAKE_BUILD_TYPE \"Debug\")\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(cl_http REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\nfind_package(OpenSSL REQUIRED)\n\ninclude_directories(include\n                    ${smacc2_INCLUDE_DIRS}\n                    ${cl_ros2_timer_INCLUDE_DIRS}\n                    ${cl_http_INCLUDE_DIRS}\n)\n\nadd_executable(${PROJECT_NAME}_node\n                src/sm_atomic_http/sm_atomic_http_node.cpp)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${cl_http_LIBRARIES}\n  ${Boost_LIBRARIES}\n  OpenSSL::SSL\n  OpenSSL::Crypto\n)\n\nament_target_dependencies(${PROJECT_NAME}_node smacc2)\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(DIRECTORY\n  config\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n        ${PROJECT_NAME}_node\n        DESTINATION lib/${PROJECT_NAME})\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_http/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ![sm_atomic_http](docs/SmAtomicHttp_2025-12-22_073.svg)\n\n <h2>Description</h2> A completely minimal state machine example.<br></br>\n\n <h2>Build Instructions</h2>\n\nFirst, source your chosen ros2 distro.\n```\nsource /opt/ros/rolling/setup.bash\n```\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n<h2>Operating Instructions</h2>\nAfter you build, remember to source the workspace...\n\n```\nsource ~/workspace/jazzy_ws/install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_atomic_http sm_atomic_http.py\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>.\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_http/config/sm_atomic_http_config.yaml",
    "content": "global_parameter_server:\n    ros__parameters:\n        signal_detector_loop_freq: 200\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_http/include/sm_atomic_http/clients/client_behaviors/cb_http_request.hpp",
    "content": "// Copyright 2023 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Jaycee Lock\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <cstring>\n#include <cl_http/client_behaviors/cb_http_get_request.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_http\n{\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvHttp : sc::event<EvHttp<TSource, TOrthogonal>>\n{\n};\n\nclass CbHttpRequest : public cl_http::CbHttpGetRequest\n{\npublic:\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    triggerTranstition = [this]()\n    {\n      auto event = new EvHttp<TSourceObject, TOrthogonal>();\n      this->postEvent(event);\n    };\n  }\n\n  void onResponseReceived(const cl_http::ClHttp::TResponse & response)\n  {\n    RCLCPP_INFO_STREAM(this->getLogger(), \"ON RESPONSE\");\n    RCLCPP_INFO_STREAM(this->getLogger(), response.body());\n    triggerTranstition();\n  }\n\nprivate:\n  cl_http::ClHttp * cl_http_;\n\n  std::function<void()> triggerTranstition;\n};\n}  // namespace sm_atomic_http\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_http/include/sm_atomic_http/orthogonals/or_http.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_http/cl_http.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_http {\nclass OrHttp : public smacc2::Orthogonal<OrHttp> {\n public:\n  void onInitialize() override {\n    auto cl_http =\n        this->createClient<cl_http::ClHttp>(\n            \"https://example.com\");\n  }\n};\n}  // namespace sm_atomic_http\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_http/include/sm_atomic_http/orthogonals/or_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <chrono>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace sm_atomic_http\n{\nusing namespace std::chrono_literals;\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  void onInitialize() override { auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(1s); }\n};\n}  // namespace sm_atomic_http\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_http/include/sm_atomic_http/sm_atomic_http.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n\n// CLIENT BEHAVIORS\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_loop.hpp>\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n#include \"clients/client_behaviors/cb_http_request.hpp\"\n\n// ORTHOGONALS\n#include \"orthogonals/or_timer.hpp\"\n#include \"orthogonals/or_http.hpp\"\n\nusing namespace boost;\nusing namespace smacc2;\n\nnamespace sm_atomic_http {\n// STATE\nclass State1;\nclass State2;\n\n//--------------------------------------------------------------------\n// STATE_MACHINE\nstruct SmAtomicHttp\n    : public smacc2::SmaccStateMachineBase<SmAtomicHttp, State1> {\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  virtual void onInitialize() override {\n    this->createOrthogonal<OrTimer>();\n    this->createOrthogonal<OrHttp>();\n  }\n};\n\n}  // namespace sm_atomic_http\n\n#include \"states/st_state_1.hpp\"\n#include \"states/st_state_2.hpp\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_http/include/sm_atomic_http/states/st_state_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_http {\nusing namespace cl_ros2_timer;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct State1 : smacc2::SmaccState<State1, SmAtomicHttp> {\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n      Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State2, SUCCESS> >\n      reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {\n    // EvTimer triggers each 3 client ticks\n    // configure_orthogonal<OrTimer, CbTimerCountdownLoop>(3);\n    // EvTimer triggers once at 10 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_atomic_http\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_http/include/sm_atomic_http/states/st_state_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_http\n{\n\n// STATE DECLARATION\nstruct State2 : smacc2::SmaccState<State2, SmAtomicHttp>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<Transition<EvHttp<CbHttpRequest, OrHttp>, State1, SUCCESS>>\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() { configure_orthogonal<OrHttp, CbHttpRequest>(); }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering State2\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_atomic_http\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_http/launch/sm_atomic_http.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef generate_launch_description():\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_atomic_http\",\n                executable=\"sm_atomic_http_node\",\n                output=\"screen\",\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            )\n        ]\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_http/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_atomic_http</name>\n  <version>3.0.1</version>\n  <description>The sm_atomic_http package</description>\n  <maintainer email=\"jaycee.lock@gmail.com\">Jaycee Lock</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>cl_http</depend>\n  <depend>smacc2</depend>\n\n  <exec_depend>xterm</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_http/src/sm_atomic_http/sm_atomic_http_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_atomic_http/sm_atomic_http.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char** argv) {\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_atomic_http::SmAtomicHttp>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/CHANGELOG.rst",
    "content": "Changelog for package sm_atomic_lifecycle\n==========================================\n\nVersion 2.3.16 (2023-07-16)\n----------------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2 <https://github.com/robosoft-ai/SMACC2>`_\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for ros buildfarm issue\n  - Further details on buildfarm problem\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n### Contributors\n- brettpac\n- Pablo Iñigo Blasco\n\nVersion 2.3.6 (2023-03-12)\n--------------------------\n### Changed\n- Minor changes\n### Contributors\n- Pablo Iñigo Blasco\n\n### Fixed\n- Removed mongo dependency (`#402 <https://github.com/robosoft-ai/SMACC2/issues/402>`_)\n  - Removed mongo dependency\n  - Fixed issues related to dependency removal\n### Contributors\n- Pablo Iñigo Blasco\n- pabloinigoblasco\n\nVersion 2.3.2 (2023-03-02 22:22)\n--------------------------------\n### Added\n- Ported lifecycle from galactic (`#398 <https://github.com/robosoft-ai/SMACC2/issues/398>`_)\n  - Ported lifecycle from galactic\n  - Updated c_cpp_properties.json\n### Contributors\n- Pablo Iñigo Blasco\n\nVersion 2.3.1 (2022-11-28)\n--------------------------\n### No changes\n\nVersion 1.22.1 (2022-11-09 20:22)\n---------------------------------\n### No changes\n\nVersion 1.22.0 (2022-11-09 19:53)\n---------------------------------\n### No changes\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_atomic_lifecycle)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake_auto REQUIRED)\nament_auto_find_build_dependencies()\n\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(include)\n\nament_auto_add_executable(${PROJECT_NAME}_node\n                          src/sm_atomic_lifecycle/sm_atomic_lifecycle_node.cpp)\n\nament_auto_add_executable(lifecycle_example_node\n                      src/lifecycle_examplenode/lifecycle_example_node.cpp)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${Boost_LIBRARIES}\n)\n\n#ament_target_dependencies(${PROJECT_NAME}_node smacc2)\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(DIRECTORY\n  config\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n        ${PROJECT_NAME}_node\n        lifecycle_example_node\n        DESTINATION lib/${PROJECT_NAME})\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ![sm_atomic_lifecycle](docs/SmAtomicLifecycle_2023-5-25_72845.svg)\n\n <h2>Description</h2> A completely minimal state machine example that also demonstartes the capabilities of the new SMACC Lifecycle Client Behavior Library<br></br>\n\n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n<h2>Operating Instructions</h2>\nAfter you build, remember to source the workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_atomic_lifecycle sm_atomic_lifecycle.py\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>.\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/config/sm_atomic_config.yaml",
    "content": "global_parameter_server:\n    ros__parameters:\n        signal_detector_loop_freq: 200\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/include/sm_atomic_lifecycle/orthogonals/or_lifecyclenode.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n#include <cl_lifecycle_node/cl_lifecycle_node.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace sm_atomic_lifecycle\n{\nusing namespace std::chrono_literals;\nclass OrLifecycleNode : public smacc2::Orthogonal<OrLifecycleNode>\n{\npublic:\n  void onInitialize() override\n  {\n    auto client = this->createClient<cl_lifecycle_node::ClLifecycleNode>(\"lifecycle_example_node\");\n  }\n};\n}  // namespace sm_atomic_lifecycle\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/include/sm_atomic_lifecycle/orthogonals/or_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <chrono>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace sm_atomic_lifecycle\n{\nusing namespace std::chrono_literals;\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  void onInitialize() override { auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(1s); }\n};\n}  // namespace sm_atomic_lifecycle\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/include/sm_atomic_lifecycle/sm_atomic_lifecycle.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <cl_lifecycle_node/cl_lifecycle_node.hpp>\n\n//CLIENT BEHAVIORS\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_loop.hpp>\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n#include <cl_lifecycle_node/client_behaviors.hpp>\n\n// ORTHOGONALS\n#include \"orthogonals/or_timer.hpp\"\n#include \"orthogonals/or_lifecyclenode.hpp\"\n\nusing namespace boost;\nusing namespace smacc2;\n\nnamespace sm_atomic_lifecycle\n{\n//STATE\nclass StActivating;\nclass StActive;\nclass StCleaningUp;\nclass StConfiguring;\nclass StDeactivating;\nclass StErrorProcessing;\nclass StFinalized;\nclass StInactive;\nclass StShuttingDown;\nclass StUnconfigured;\n\n//--------------------------------------------------------------------\n//STATE_MACHINE\nstruct SmAtomicLifecycle : public smacc2::SmaccStateMachineBase<SmAtomicLifecycle, StUnconfigured>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  virtual void onInitialize() override\n  {\n    this->createOrthogonal<OrTimer>();\n    this->createOrthogonal<OrLifecycleNode>();\n  }\n};\n\n}  // namespace sm_atomic_lifecycle\n\n#include \"states/st_activating.hpp\"\n#include \"states/st_active.hpp\"\n#include \"states/st_cleaning_up.hpp\"\n#include \"states/st_configuring.hpp\"\n#include \"states/st_deactivating.hpp\"\n#include \"states/st_error_processing.hpp\"\n#include \"states/st_finalized.hpp\"\n#include \"states/st_inactive.hpp\"\n#include \"states/st_shutting_down.hpp\"\n#include \"states/st_unconfigured.hpp\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/include/sm_atomic_lifecycle/states/st_activating.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_lifecycle\n{\nusing sm_atomic_lifecycle::OrLifecycleNode;\nusing namespace cl_lifecycle_node;\n\n// STATE DECLARATION\nstruct StActivating : smacc2::SmaccState<StActivating, SmAtomicLifecycle>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n          Transition<EvTransitionOnActivateSuccess<CpLifecycleEventMonitor, OrLifecycleNode>, StActive, SUCCESS>,\n          Transition<EvTransitionOnActivateFailure<CpLifecycleEventMonitor, OrLifecycleNode>, StInactive, ABORT>,\n          Transition<EvTransitionOnActivateError<CpLifecycleEventMonitor, OrLifecycleNode>, StErrorProcessing, ABORT>\n      >\n      reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n  }\n\n  void runtimeConfigure()\n  {\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"On Entry!\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"On Exit!\");\n  }\n};\n}  // namespace sm_atomic_lifecycle\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/include/sm_atomic_lifecycle/states/st_active.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_lifecycle\n{\nusing sm_atomic_lifecycle::OrLifecycleNode;\nusing namespace cl_lifecycle_node;\n\n// STATE DECLARATION\nstruct StActive : smacc2::SmaccState<StActive, SmAtomicLifecycle>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n          Transition<EvTransitionDeactivate<CpLifecycleEventMonitor, OrLifecycleNode>, StDeactivating, SUCCESS>,\n          Transition<EvTransitionActiveShutdown<CpLifecycleEventMonitor, OrLifecycleNode>, StShuttingDown, SUCCESS>\n\n      >\n      reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Configure timer to demonstrate the active state for a few seconds\n    configure_orthogonal<OrTimer, cl_ros2_timer::CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure()\n  {\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"On Entry!\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"On Exit!\");\n  }\n};\n}  // namespace sm_atomic_lifecycle\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/include/sm_atomic_lifecycle/states/st_cleaning_up.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_lifecycle\n{\nusing sm_atomic_lifecycle::OrLifecycleNode;\nusing namespace cl_lifecycle_node;\n\n// STATE DECLARATION\nstruct StCleaningUp : smacc2::SmaccState<StCleaningUp, SmAtomicLifecycle>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n          Transition<EvTransitionOnCleanupSuccess<CpLifecycleEventMonitor, OrLifecycleNode>, StUnconfigured, SUCCESS>,\n          Transition<EvTransitionOnCleanupError<CpLifecycleEventMonitor, OrLifecycleNode>, StErrorProcessing, ABORT>\n      >\n      reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n  }\n\n  void runtimeConfigure()\n  {\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"On Entry!\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"On Exit!\");\n  }\n};\n}  // namespace sm_atomic_lifecycle\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/include/sm_atomic_lifecycle/states/st_configuring.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_lifecycle\n{\nusing sm_atomic_lifecycle::OrLifecycleNode;\nusing namespace cl_lifecycle_node;\n\n// STATE DECLARATION\nstruct StConfiguring : smacc2::SmaccState<StConfiguring, SmAtomicLifecycle>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n          Transition<EvTransitionOnConfigureSuccess<CpLifecycleEventMonitor, OrLifecycleNode>, StInactive, SUCCESS>,\n          Transition<EvTransitionOnConfigureFailure<CpLifecycleEventMonitor, OrLifecycleNode>, StUnconfigured, ABORT> ,\n          Transition<EvTransitionOnConfigureError<CpLifecycleEventMonitor, OrLifecycleNode>, StErrorProcessing, ABORT>\n        >\n      reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n  }\n\n  void runtimeConfigure()\n  {\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"On Entry!\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"On Exit!\");\n  }\n};\n}  // namespace sm_atomic_lifecycle\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/include/sm_atomic_lifecycle/states/st_deactivating.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_lifecycle\n{\nusing sm_atomic_lifecycle::OrLifecycleNode;\nusing namespace cl_lifecycle_node;\n\n// STATE DECLARATION\nstruct StDeactivating : smacc2::SmaccState<StDeactivating, SmAtomicLifecycle>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n          Transition<EvTransitionOnDeactivateSuccess<CpLifecycleEventMonitor, OrLifecycleNode>, StInactive, SUCCESS>,\n          Transition<EvTransitionOnDeactivateError<CpLifecycleEventMonitor, OrLifecycleNode>, StErrorProcessing, ABORT>\n      >\n      reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n  }\n\n  void runtimeConfigure()\n  {\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"On Entry!\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"On Exit!\");\n  }\n};\n}  // namespace sm_atomic_lifecycle\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/include/sm_atomic_lifecycle/states/st_error_processing.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_lifecycle\n{\nusing sm_atomic_lifecycle::OrLifecycleNode;\nusing namespace cl_lifecycle_node;\n\n// STATE DECLARATION\nstruct StErrorProcessing : smacc2::SmaccState<StErrorProcessing, SmAtomicLifecycle>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n        Transition<EvTransitionOnErrorSuccess<CpLifecycleEventMonitor, OrLifecycleNode>, StUnconfigured, SUCCESS>,\n        Transition<EvTransitionOnErrorFailure<CpLifecycleEventMonitor, OrLifecycleNode>, StFinalized, ABORT>\n      >\n      reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n  }\n\n  void runtimeConfigure()\n  {\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"On Entry!\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"On Exit!\");\n  }\n};\n}  // namespace sm_atomic_lifecycle\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/include/sm_atomic_lifecycle/states/st_finalized.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_lifecycle\n{\nusing sm_atomic_lifecycle::OrLifecycleNode;\nusing namespace cl_lifecycle_node;\n\n// STATE DECLARATION\nstruct StFinalized : smacc2::SmaccState<StFinalized, SmAtomicLifecycle>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n      >\n      reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n  }\n\n  void runtimeConfigure()\n  {\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"On Entry!\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"On Exit!\");\n  }\n};\n}  // namespace sm_atomic_lifecycle\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/include/sm_atomic_lifecycle/states/st_inactive.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_lifecycle\n{\nusing sm_atomic_lifecycle::OrLifecycleNode;\nusing namespace cl_lifecycle_node;\n\n// STATE DECLARATION\nstruct StInactive : smacc2::SmaccState<StInactive, SmAtomicLifecycle>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n        Transition<EvTransitionCleanup<CpLifecycleEventMonitor, OrLifecycleNode>, StCleaningUp, SUCCESS>,\n        Transition<EvTransitionInactiveShutdown<CpLifecycleEventMonitor, OrLifecycleNode>, StShuttingDown, SUCCESS>,\n        Transition<EvTransitionActivate<CpLifecycleEventMonitor, OrLifecycleNode>, StActivating, SUCCESS>\n      >\n      reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrLifecycleNode, CbActivate>();\n  }\n\n  void runtimeConfigure()\n  {\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"On Entry!\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"On Exit!\");\n  }\n};\n}  // namespace sm_atomic_lifecycle\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/include/sm_atomic_lifecycle/states/st_shutting_down.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_lifecycle\n{\nusing sm_atomic_lifecycle::OrLifecycleNode;\nusing namespace cl_lifecycle_node;\n\n// STATE DECLARATION\nstruct StShuttingDown : smacc2::SmaccState<StShuttingDown, SmAtomicLifecycle>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n        Transition<EvTransitionOnShutdownSuccess<CpLifecycleEventMonitor, OrLifecycleNode>, StFinalized, SUCCESS>,\n        Transition<EvTransitionOnShutdownError<CpLifecycleEventMonitor, OrLifecycleNode>, StErrorProcessing, ABORT>\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n  }\n\n  void runtimeConfigure()\n  {\n\n  }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_atomic_lifecycle\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/include/sm_atomic_lifecycle/states/st_unconfigured.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_lifecycle\n{\nusing sm_atomic_lifecycle::OrLifecycleNode;\nusing namespace cl_lifecycle_node;\n\n// STATE DECLARATION\nstruct StUnconfigured : smacc2::SmaccState<StUnconfigured, SmAtomicLifecycle>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n                  Transition<EvTransitionConfigure<CpLifecycleEventMonitor, OrLifecycleNode>, StConfiguring, SUCCESS>,\n                  Transition<EvTransitionUnconfiguredShutdown<CpLifecycleEventMonitor, OrLifecycleNode>, StShuttingDown, SUCCESS>\n                  >\n      reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrLifecycleNode, CbConfigure>();\n  }\n\n  void runtimeConfigure()\n  {\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"On Entry!\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"On Exit!\");\n  }\n};\n}  // namespace sm_atomic_lifecycle\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/launch/sm_atomic_lifecycle.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\nfrom datetime import datetime\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef setup_log_directory():\n    \"\"\"\n    Creates timestamped log directory with error handling.\n    Returns: (log_dir_path, timestamp) tuple\n    \"\"\"\n    timestamp = datetime.now().strftime(\"%Y-%m-%d-%H-%M-%S-%f\")\n\n    # Primary log directory location\n    log_dir = os.path.join(\n        os.path.expanduser(\"~\"), \".ros\", \"log\", f\"{timestamp}-sm_atomic_lifecycle\"\n    )\n\n    try:\n        os.makedirs(log_dir, mode=0o755, exist_ok=True)\n        print(f\"[Launch] Log directory created: {log_dir}\")\n        return log_dir, timestamp\n    except PermissionError as e:\n        # Fallback to /tmp if ~/.ros is not writable\n        fallback_dir = os.path.join(\"/tmp\", \"sm_atomic_lifecycle_logs\", timestamp)\n        print(f\"[Launch] WARNING: Cannot create log directory at {log_dir}\")\n        print(f\"[Launch] Permission denied: {e}\")\n        print(f\"[Launch] Using fallback directory: {fallback_dir}\")\n        try:\n            os.makedirs(fallback_dir, mode=0o755, exist_ok=True)\n            return fallback_dir, timestamp\n        except Exception as fallback_error:\n            print(f\"[Launch] ERROR: Cannot create fallback directory: {fallback_error}\")\n            print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n            return None, timestamp\n    except OSError as e:\n        print(f\"[Launch] ERROR: Failed to create log directory: {e}\")\n        print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n        return None, timestamp\n\n\ndef generate_launch_description():\n    # Setup logging directory\n    log_dir, timestamp = setup_log_directory()\n\n    # Construct logging prefix for state machine node\n    if log_dir:\n        state_machine_log = os.path.join(log_dir, f\"sm_atomic_lifecycle_node_{timestamp}.log\")\n        state_machine_prefix = f\"konsole --hold -p tabtitle='SM Atomic Lifecycle' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {state_machine_log}; exec bash' -- \"\n    else:\n        state_machine_prefix = \"konsole --hold -p tabtitle='SM Atomic Lifecycle' -e\"\n\n    # Construct logging prefix for lifecycle example node\n    if log_dir:\n        lifecycle_log = os.path.join(log_dir, f\"lifecycle_example_node_{timestamp}.log\")\n        lifecycle_prefix = f\"konsole --hold -p tabtitle='Lifecycle Example Node' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {lifecycle_log}; exec bash' -- \"\n    else:\n        lifecycle_prefix = \"konsole --hold -p tabtitle='Lifecycle Example Node' -e\"\n\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_atomic_lifecycle\",\n                executable=\"sm_atomic_lifecycle_node\",\n                output=\"screen\",\n                prefix=state_machine_prefix,\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n            Node(\n                package=\"sm_atomic_lifecycle\",\n                executable=\"lifecycle_example_node\",\n                output=\"screen\",\n                prefix=lifecycle_prefix,\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n        ],\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_atomic_lifecycle</name>\n  <version>3.0.1</version>\n  <description>The sm_atomic_lifecycle package</description>\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>ament_cmake_auto</depend>\n  <depend>cl_ros2_timer</depend>\n  <depend>cl_lifecycle_node</depend>\n  <depend>smacc2</depend>\n  <depend>std_msgs</depend>\n\n  <exec_depend>xterm</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/src/lifecycle_examplenode/lifecycle_example_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#include <rclcpp/rclcpp.hpp>\n#include <rclcpp_lifecycle/lifecycle_node.hpp>\n#include <rclcpp_lifecycle/lifecycle_publisher.hpp>\n#include <std_msgs/msg/string.hpp>\n\nusing rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface;\n\nclass LifecycleExampleNode : public rclcpp_lifecycle::LifecycleNode\n{\npublic:\n  LifecycleExampleNode() : rclcpp_lifecycle::LifecycleNode(\"lifecycle_example_node\")\n  {\n    // Create a publisher for the \"example_topic\" topic\n    publisher_ = this->create_publisher<std_msgs::msg::String>(\"example_topic\", rclcpp::QoS(10));\n  }\n\n  LifecycleNodeInterface::CallbackReturn on_configure(const rclcpp_lifecycle::State& previous_state)\n  {\n    RCLCPP_INFO(this->get_logger(), \"Configuring node, previous state: '%s'\", previous_state.label().c_str());\n    return LifecycleNodeInterface::CallbackReturn::SUCCESS;\n  }\n\n  LifecycleNodeInterface::CallbackReturn on_activate(const rclcpp_lifecycle::State& previous_state)\n  {\n    RCLCPP_INFO(this->get_logger(), \"Activating node, previous state: '%s'\", previous_state.label().c_str());\n    return LifecycleNodeInterface::CallbackReturn::SUCCESS;\n  }\n\n  LifecycleNodeInterface::CallbackReturn on_deactivate(const rclcpp_lifecycle::State& previous_state)\n  {\n    RCLCPP_INFO(this->get_logger(), \"Deactivating node, previous state: '%s'\", previous_state.label().c_str());\n    return LifecycleNodeInterface::CallbackReturn::SUCCESS;\n  }\n\n  LifecycleNodeInterface::CallbackReturn on_cleanup(const rclcpp_lifecycle::State& previous_state)\n  {\n    RCLCPP_INFO(this->get_logger(), \"Cleaning up node, previous state: '%s'\", previous_state.label().c_str());\n    return LifecycleNodeInterface::CallbackReturn::SUCCESS;\n  }\n\n  LifecycleNodeInterface::CallbackReturn on_shutdown(const rclcpp_lifecycle::State& previous_state)\n  {\n    RCLCPP_INFO(this->get_logger(), \"Shutting down node, previous state: '%s'\", previous_state.label().c_str());\n    return LifecycleNodeInterface::CallbackReturn::SUCCESS;\n  }\n\n  LifecycleNodeInterface::CallbackReturn on_error(const rclcpp_lifecycle::State& previous_state)\n  {\n    RCLCPP_ERROR(this->get_logger(), \"Error occurred, previous state: '%s'\", previous_state.label().c_str());\n    return LifecycleNodeInterface::CallbackReturn::SUCCESS;\n  }\n\nprivate:\n  rclcpp_lifecycle::LifecyclePublisher<std_msgs::msg::String>::SharedPtr publisher_;\n};\n\n\nint main()\n{\n  rclcpp::init(0, nullptr);\n  auto node = std::make_shared<LifecycleExampleNode>();\n  rclcpp::spin(node->get_node_base_interface());\n  rclcpp::shutdown();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_lifecycle/src/sm_atomic_lifecycle/sm_atomic_lifecycle_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_atomic_lifecycle/sm_atomic_lifecycle.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_atomic_lifecycle::SmAtomicLifecycle>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_mode_states/CHANGELOG.rst",
    "content": "Changelog for package sm_atomic_mode_states\n===========================================\n\nVersion 2.3.16 (2023-07-16)\n----------------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2` repository\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for ros buildfarm issue\n  - Further details on buildfarm problem\n  - Co-authored by brettpac\n\n### Contributors\n- brettpac, pabloinigoblasco\n\nVersion 2.4.1 (2023-07-06)\n----------------------------\n### Changed\n- Updated version number\n\n### Added\n- Brettpac branch (`#491 <https://github.com/robosoft-ai/SMACC2/issues/491>`_)\n  - Tested and cleaned reference library\n  - Deactivated precommit for trailing spaces in svgs\n  - Updated sm svgs\n  - Co-authored by brettpac\n- Testing and cleaning the reference library (`#489 <https://github.com/robosoft-ai/SMACC2/issues/489>`_)\n  - Co-authored by brettpac\n- Brettpac branch (`#487 <https://github.com/robosoft-ai/SMACC2/issues/487>`_)\n  - Fixed trailing whitespace issue in svgs\n  - Removed doxygen references for reference library in humble\n  - Co-authored by brettpac\n- Cleaning Docs Rd.1 (`#485 <https://github.com/robosoft-ai/SMACC2/issues/485>`_)\n  - Fixed doxygen links\n  - Co-authored by brettpac\n\n### Contributors\n- brettpac, pabloinigoblasco\n\nVersion 2.3.14 (2023-04-24)\n----------------------------\n### Added\n- Feature/humble 2.3.14 b (`#463 <https://github.com/robosoft-ai/SMACC2/issues/463>`_)\n  - Minor changes and version update\n  - Fixed issues\n- Feature/humble 2.3.14 (`#462 <https://github.com/robosoft-ai/SMACC2/issues/462>`_)\n  - Minor changes and version update\n- Migration to humble (`#439 <https://github.com/robosoft-ai/SMACC2/issues/439>`_)\n  - Migrated to humble\n  - Fixed format\n\n### Contributors\n- Pablo Iñigo Blasco\n\nVersion 2.3.8 (2023-03-12 21:50)\n---------------------------------\n\nVersion 2.3.7 (2023-03-12 21:45)\n---------------------------------\n\nVersion 2.3.6 (2023-03-12 20:30)\n---------------------------------\n\nVersion 2.3.5 (2023-03-07 00:14)\n---------------------------------\n\nVersion 2.3.4 (2023-03-07 00:02)\n---------------------------------\n\nVersion 2.3.3 (2023-03-02 22:58)\n---------------------------------\n\nVersion 2.3.2 (2023-03-02 22:22)\n---------------------------------\n\nVersion 2.3.1 (2022-11-28)\n--------------------------\n\nVersion 1.22.1 (2022-11-09 20:22)\n-------------------------------\n\nVersion 1.22.0 (2022-11-09 19:53)\n-------------------------------\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_mode_states/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_atomic_mode_states)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(include\n                    ${smacc2_INCLUDE_DIRS}\n                    ${cl_ros2_timer_INCLUDE_DIRS})\n\nadd_executable(${PROJECT_NAME}_node\n                src/sm_atomic_mode_states/sm_atomic_mode_states_node.cpp)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node smacc2)\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(DIRECTORY\n  config\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n        ${PROJECT_NAME}_node\n        DESTINATION lib/${PROJECT_NAME})\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_mode_states/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ![sm_atomic_mode_states](docs/SmAtomicModeStates_2023-5-25_94327.svg)\n\n <h2>Description</h2> A completely minimal state machine example.<br></br>\n\n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n<h2>Operating Instructions</h2>\nAfter you build, remember to source the workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_atomic_mode_states sm_atomic_mode_states.py\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>.\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_mode_states/config/sm_atomic_mode_states_config.yaml",
    "content": "global_parameter_server:\n    ros__parameters:\n        signal_detector_loop_freq: 200\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_mode_states/include/sm_atomic_mode_states/client_behaviors/cb_updatable_test.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nclass CbUpdatableTest : public smacc2::ISmaccUpdatable, public smacc2::ISmaccClientBehavior\n{\npublic:\n    CbUpdatableTest()\n    {\n        this->counter_ = 0;\n    }\n\n    virtual void onEntry()\n    {\n        RCLCPP_INFO(getLogger(),\"CbUpdatableTest::onEntry\");\n    }\n\n    virtual void onExit()\n    {\n        RCLCPP_INFO(getLogger(),\"CbUpdatableTest::onExit\");\n    }\n\n    virtual void update() override\n    {\n        auto currentState = this->getCurrentState();\n        this->counter_++;\n        RCLCPP_INFO(getLogger(),\"CbUpdatableTest::onUpdate %d in state %s\", this->counter_, currentState->getClassName().c_str());\n    }\n\n    int counter_;\n};\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_mode_states/include/sm_atomic_mode_states/orthogonals/or_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <chrono>\n\nnamespace sm_atomic_mode_states\n{\n\nusing namespace std::chrono_literals;\n\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n    virtual void onInitialize() override\n    {\n        auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(rclcpp::Duration(1s));\n    }\n};\n} // namespace sm_atomic_mode_states\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_mode_states/include/sm_atomic_mode_states/sm_atomic_mode_states.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n\n// ORTHOGONALS\n#include <sm_atomic_mode_states/orthogonals/or_timer.hpp>\n\n//CLIENT BEHAVIORS\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_loop.hpp>\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n#include <sm_atomic_mode_states/client_behaviors/cb_updatable_test.hpp>\n\nusing namespace boost;\nusing namespace smacc2;\n\nnamespace sm_atomic_mode_states\n{\n\n//STATE\nclass State1;\nclass State2;\nclass MsState1;\nclass MsState2;\n\n//--------------------------------------------------------------------\n//STATE_MACHINE\nstruct SmAtomicModeStates\n    : public smacc2::SmaccStateMachineBase<SmAtomicModeStates, MsState1>\n{\n    using SmaccStateMachineBase::SmaccStateMachineBase;\n\n    virtual void onInitialize() override\n    {\n        this->createOrthogonal<OrTimer>();\n    }\n};\n\n} // namespace sm_atomic_mode_states\n\n#include <sm_atomic_mode_states/states/ms_state_1.hpp>\n#include <sm_atomic_mode_states/states/ms_state_2.hpp>\n\n#include <sm_atomic_mode_states/states/st_state_1.hpp>\n#include <sm_atomic_mode_states/states/st_state_2.hpp>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_mode_states/include/sm_atomic_mode_states/states/ms_state_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_mode_states\n{\nusing namespace cl_ros2_timer;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct MsState1 : smacc2::SmaccState<MsState1, SmAtomicModeStates, State1>\n{\n    using SmaccState::SmaccState;\n\n// TRANSITION TABLE\n    typedef mpl::list<\n\n    >reactions;\n\n\n// STATE FUNCTIONS\n    static void staticConfigure()\n    {\n        configure_orthogonal<OrTimer, CbUpdatableTest>();\n    }\n\n    void runtimeConfigure()\n    {\n    }\n\n    void onEntry()\n    {\n        RCLCPP_INFO(getLogger(),\"On Entry!\");\n    }\n\n    void onExit()\n    {\n        RCLCPP_INFO(getLogger(),\"On Exit!\");\n    }\n\n};\n} // namespace sm_atomic_mode_states\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_mode_states/include/sm_atomic_mode_states/states/ms_state_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_mode_states\n{\nusing namespace cl_ros2_timer;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct MsState2 : smacc2::SmaccState<MsState2, SmAtomicModeStates, State2>\n{\n    using SmaccState::SmaccState;\n\n// TRANSITION TABLE\n    typedef mpl::list<\n\n\n    >reactions;\n\n\n// STATE FUNCTIONS\n    static void staticConfigure()\n    {\n        configure_orthogonal<OrTimer, CbUpdatableTest>();\n    }\n\n    void runtimeConfigure()\n    {\n    }\n\n    void onEntry()\n    {\n        RCLCPP_INFO(getLogger(),\"On Entry!\");\n    }\n\n    void onExit()\n    {\n        RCLCPP_INFO(getLogger(),\"On Exit!\");\n    }\n\n};\n} // namespace sm_atomic_mode_states\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_mode_states/include/sm_atomic_mode_states/states/st_state_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_mode_states\n{\nusing namespace cl_ros2_timer;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct State1 : smacc2::SmaccState<State1, MsState1>\n{\n    using SmaccState::SmaccState;\n\n// TRANSITION TABLE\n    typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, MsState2, SUCCESS>\n\n    >reactions;\n\n\n// STATE FUNCTIONS\n    static void staticConfigure()\n    {\n        configure_orthogonal<OrTimer, CbTimerCountdownLoop>(3);  // EvTimer triggers each 3 client ticks\n        configure_orthogonal<OrTimer, CbTimerCountdownOnce>(2); // EvTimer triggers once at 10 client ticks\n        configure_orthogonal<OrTimer, CbUpdatableTest>();\n\n    }\n\n    void runtimeConfigure()\n    {\n    }\n\n    void onEntry()\n    {\n        RCLCPP_INFO(getLogger(),\"On Entry!\");\n    }\n\n    void onExit()\n    {\n        RCLCPP_INFO(getLogger(),\"On Exit!\");\n    }\n\n};\n} // namespace sm_atomic_mode_states\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_mode_states/include/sm_atomic_mode_states/states/st_state_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_atomic_mode_states\n{\n// STATE DECLARATION\nstruct State2 : smacc2::SmaccState<State2, MsState2>\n{\n    using SmaccState::SmaccState;\n\n// TRANSITION TABLE\n    typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, MsState1, SUCCESS>\n\n    >reactions;\n\n\n// STATE FUNCTIONS\n    static void staticConfigure()\n    {\n        configure_orthogonal<OrTimer, CbTimerCountdownOnce>(2); // EvTimer triggers once at 10 client ticks\n        configure_orthogonal<OrTimer, CbUpdatableTest>();\n    }\n\n    void runtimeConfigure()\n    {\n        RCLCPP_INFO(getLogger(),\"Entering State2\");\n    }\n\n    void onEntry()\n    {\n        RCLCPP_INFO(getLogger(),\"On Entry!\");\n    }\n\n    void onExit()\n    {\n        RCLCPP_INFO(getLogger(),\"On Exit!\");\n    }\n\n};\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_mode_states/launch/sm_atomic_mode_states.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef generate_launch_description():\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_atomic_mode_states\",\n                executable=\"sm_atomic_mode_states_node\",\n                output=\"screen\",\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            )\n        ]\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_mode_states/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_atomic_mode_states</name>\n  <version>3.0.1</version>\n  <description>The sm_atomic_mode_states package</description>\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>smacc2</depend>\n\n  <exec_depend>xterm</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_atomic_mode_states/src/sm_atomic_mode_states/sm_atomic_mode_states_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n\n#include <sm_atomic_mode_states/sm_atomic_mode_states.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_atomic_mode_states::SmAtomicModeStates>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/CHANGELOG.rst",
    "content": "Changelog for package sm_branching\n======================================\n\n2.3.16 (2023-07-16)\n-------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2` into humble\n\n### Changed\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted to fix weird issue with ros buildfarm\n  - Made more adjustments related to the buildfarm issue\n\n### Contributors\n- brettpac, pabloinigoblasco\n\n2.3.6 (2023-03-12)\n------------------\n\n1.22.1 (2022-11-09)\n-------------------\n### Added\n- Pre-release\n\n### Contributors\n- pabloinigoblasco\n\n0.3.0 (2022-04-04)\n------------------\n\n0.0.0 (2022-11-09)\n------------------\n### Added\n- Reverted commit dec14a936a877b2ef722a6a32f1bf3df09312542\n- Ignored packages which should not be released\n- Feature/master rolling to galactic backport (#236)\n  - Updated mentions of SMACC/ROS to SMACC2/ROS2\n  - Made progress on navigation rolling\n  - Renamed folders, deleted tracing.md, edited README.md\n  - Added smacc2_performance_tools\n  - Improved performance tests\n  - Cleaned up sm_respira_1 format\n  - Optimized dependencies in move_base_z_planners_common\n  - Renamed event generator library\n  - Added galactic CI setup and renamed rolling files\n  - Fixed source CI and corrected README overview\n  - Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch\n  - Updated doxygen links\n  - Created new sm from sm_respira_1\n  - Made core and navigation fixes\n  - Reworked sm_advanced_recovery_1\n  - Worked on sm_atomic_performance_test_a_2, sm_atomic_performance_test_a_1, sm_atomic_performance_test_c_1\n  - Modified sm_atomic_performance_test_a_2\n  - Worked on sm_multi_stage_1\n  - Updated README.md\n  - Implemented new feature, cb_wait_topic_message\n  - Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic and waiting they are alive\n  - Corrected all linters and formatters\n\n### Contributors\n- brettpac, Ubuntu 20-04-02-amd64, Denis Štogl\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_branching)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(\n  include\n  ${smacc2_INCLUDE_DIRS}\n  ${cl_ros2_timer_INCLUDE_DIRS}\n)\n\nadd_executable(\n  ${PROJECT_NAME}_node\n  src/sm_branching/sm_branching_node.cpp\n)\n\ntarget_link_libraries(\n  ${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node smacc2)\n\ninstall(DIRECTORY\n  include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(DIRECTORY\n  config\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n  ${PROJECT_NAME}_node\n  DESTINATION lib/${PROJECT_NAME}\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ![sm_branching](docs/SmBranching_2021-10-18_101026.svg)\n\n <h2>Description</h2> A state machine example that highlights some of the advanced layout features available in the SMACC2 RTA.<br></br>\n\n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n<h2>Operating Instructions</h2>\nAfter you build, remember to source the workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_branching sm_branching.py\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>.\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/config/sm_branching_config.yaml",
    "content": "global_parameter_server:\n    ros__parameters:\n        signal_detector_loop_freq: 200\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/include/sm_branching/orthogonals/or_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace sm_branching\n{\nusing namespace std::chrono_literals;\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  void onInitialize() override { auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(1s); }\n};\n}  // namespace sm_branching\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/include/sm_branching/sm_branching.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n\n//CLIENT BEHAVIORS\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_loop.hpp>\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n\n// ORTHOGONALS\n#include \"orthogonals/or_timer.hpp\"\n\nusing namespace boost;\nusing namespace smacc2;\n\nnamespace sm_branching\n{\n//STATE\nclass State1;\nclass State2;\nclass State2b;\nclass State2c;\nclass State3;\nclass State3b;\nclass State3c;\nclass State4;\nclass State4c;\nclass State5;\nclass State5b;\nclass State6;\n\n//--------------------------------------------------------------------\n//STATE_MACHINE\nstruct SmBranching : public smacc2::SmaccStateMachineBase<SmBranching, State1>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  virtual void onInitialize() override { this->createOrthogonal<OrTimer>(); }\n};\n\n}  // namespace sm_branching\n\n#include \"states/st_state_1.hpp\"\n#include \"states/st_state_2.hpp\"\n#include \"states/st_state_2b.hpp\"\n#include \"states/st_state_2c.hpp\"\n#include \"states/st_state_3.hpp\"\n#include \"states/st_state_3b.hpp\"\n#include \"states/st_state_3c.hpp\"\n#include \"states/st_state_4.hpp\"\n#include \"states/st_state_4c.hpp\"\n#include \"states/st_state_5.hpp\"\n#include \"states/st_state_5b.hpp\"\n#include \"states/st_state_6.hpp\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/include/sm_branching/states/st_state_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_branching\n{\nusing namespace cl_ros2_timer;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct State1 : smacc2::SmaccState<State1, SmBranching>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State2, SUCCESS>,\n    Transition<EvTimer<CbTimerCountdownLoop, OrTimer>, State2b, SUCCESS>,\n    Transition<EvTimer<CbTimerCountdownLoop, OrTimer>, State2c, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // EvTimer triggers each 3 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownLoop>(3);\n    // EvTimer triggers once at 10 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_branching\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/include/sm_branching/states/st_state_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_branching\n{\n// STATE DECLARATION\nstruct State2 : smacc2::SmaccState<State2, SmBranching>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State3, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // EvTimer triggers once at 10 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering State2\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_branching\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/include/sm_branching/states/st_state_2b.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_branching\n{\n// STATE DECLARATION\nstruct State2b : smacc2::SmaccState<State2b, SmBranching>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State3b, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // EvTimer triggers once at 10 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering State2\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_branching\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/include/sm_branching/states/st_state_2c.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_branching\n{\n// STATE DECLARATION\nstruct State2c : smacc2::SmaccState<State2c, SmBranching>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State3c, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // EvTimer triggers once at 10 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering State2\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_branching\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/include/sm_branching/states/st_state_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_branching\n{\n// STATE DECLARATION\nstruct State3 : smacc2::SmaccState<State3, SmBranching>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State4, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // EvTimer triggers once at 10 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering State3\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_branching\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/include/sm_branching/states/st_state_3b.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_branching\n{\n// STATE DECLARATION\nstruct State3b : smacc2::SmaccState<State3b, SmBranching>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State4, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // EvTimer triggers once at 10 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering State4\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_branching\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/include/sm_branching/states/st_state_3c.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_branching\n{\n// STATE DECLARATION\nstruct State3c : smacc2::SmaccState<State3c, SmBranching>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State4c, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // EvTimer triggers once at 10 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering State3\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_branching\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/include/sm_branching/states/st_state_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_branching\n{\n// STATE DECLARATION\nstruct State4 : smacc2::SmaccState<State4, SmBranching>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownLoop, OrTimer>, State5, SUCCESS>,\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State5b, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // EvTimer triggers each 3 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownLoop>(3);\n    // EvTimer triggers once at 10 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering State4\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_branching\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/include/sm_branching/states/st_state_4c.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_branching\n{\n// STATE DECLARATION\nstruct State4c : smacc2::SmaccState<State4c, SmBranching>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownLoop, OrTimer>, State5, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // EvTimer triggers each 3 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownLoop>(3);\n    // EvTimer triggers once at 10 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering State4\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_branching\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/include/sm_branching/states/st_state_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_branching\n{\n// STATE DECLARATION\nstruct State5 : smacc2::SmaccState<State5, SmBranching>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State6, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // EvTimer triggers once at 10 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering State5\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_branching\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/include/sm_branching/states/st_state_5b.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_branching\n{\n// STATE DECLARATION\nstruct State5b : smacc2::SmaccState<State5b, SmBranching>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State6, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // EvTimer triggers once at 10 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering State5\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_branching\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/include/sm_branching/states/st_state_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_branching\n{\n// STATE DECLARATION\nstruct State6 : smacc2::SmaccState<State6, SmBranching>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // EvTimer triggers once at 10 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering State6\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_branching\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/launch/sm_branching.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\nfrom datetime import datetime\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\nfrom ament_index_python.packages import get_package_share_directory\n\n\ndef setup_log_directory():\n    \"\"\"\n    Creates timestamped log directory with error handling.\n    Returns: (log_dir_path, timestamp) tuple\n    \"\"\"\n    timestamp = datetime.now().strftime(\"%Y-%m-%d-%H-%M-%S\")\n\n    # Primary log directory location\n    log_dir = os.path.join(os.path.expanduser(\"~\"), \".ros\", \"log\", f\"{timestamp}-sm_branching\")\n\n    try:\n        os.makedirs(log_dir, mode=0o755, exist_ok=True)\n        print(f\"[Launch] Log directory created: {log_dir}\")\n        return log_dir, timestamp\n    except PermissionError as e:\n        # Fallback to /tmp if ~/.ros is not writable\n        fallback_dir = os.path.join(\"/tmp\", \"sm_branching_logs\", timestamp)\n        print(f\"[Launch] WARNING: Cannot create log directory at {log_dir}\")\n        print(f\"[Launch] Permission denied: {e}\")\n        print(f\"[Launch] Using fallback directory: {fallback_dir}\")\n        try:\n            os.makedirs(fallback_dir, mode=0o755, exist_ok=True)\n            return fallback_dir, timestamp\n        except Exception as fallback_error:\n            print(f\"[Launch] ERROR: Cannot create fallback directory: {fallback_error}\")\n            print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n            return None, timestamp\n    except OSError as e:\n        print(f\"[Launch] ERROR: Failed to create log directory: {e}\")\n        print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n        return None, timestamp\n\n\ndef generate_launch_description():\n    # Setup logging directory\n    log_dir, timestamp = setup_log_directory()\n\n    # Get package share directory for config file\n    package_share_dir = get_package_share_directory(\"sm_branching\")\n    config_file = os.path.join(package_share_dir, \"config\", \"sm_branching_config.yaml\")\n\n    # Construct logging prefix for state machine node\n    if log_dir:\n        state_machine_log = os.path.join(log_dir, f\"state_machine_{timestamp}.log\")\n        state_machine_prefix = f\"konsole --hold -p tabtitle='SM Branching' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {state_machine_log}; exec bash' -- \"\n    else:\n        state_machine_prefix = \"konsole --hold -p tabtitle='SM Branching' -e\"\n\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_branching\",\n                executable=\"sm_branching_node\",\n                name=\"sm_branching\",\n                output=\"screen\",\n                prefix=state_machine_prefix,\n                parameters=[config_file],\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n        ],\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_branching</name>\n  <version>3.0.1</version>\n  <description>The sm_branching package</description>\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>smacc2</depend>\n\n  <exec_depend>xterm</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_branching/src/sm_branching/sm_branching_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_branching/sm_branching.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_branching::SmBranching>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_cl_gcalcli_test_1)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(cl_gcalcli REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(include\n                    ${smacc2_INCLUDE_DIRS}\n                    ${cl_ros2_timer_INCLUDE_DIRS}\n                    ${cl_gcalcli_INCLUDE_DIRS})\n\nadd_executable(${PROJECT_NAME}_node\n                src/sm_cl_gcalcli_test_1/sm_cl_gcalcli_test_1_node.cpp)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${cl_gcalcli_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node smacc2 cl_gcalcli cl_ros2_timer)\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n        ${PROJECT_NAME}_node\n        DESTINATION lib/${PROJECT_NAME})\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/README.md",
    "content": "# sm_cl_gcalcli_test_1\n\n ![sm_cl_gcalcli_test_1](docs/SmClGcalcliTest1_2025-12-31_115840.svg)\n\nUnit test state machine for the `cl_gcalcli` client library.\n\n## Overview\n\nThis state machine exercises all behaviors and components of the `cl_gcalcli` client library, which provides Google Calendar integration via the `gcalcli` CLI tool.\n\n## State Flow\n\n```\nStInit → StWaitConnection → StTestRefresh → StTestEventDetect → StTestQuickAdd → StDone → (loops)\n```\n\n## States\n\n| State | Purpose | Behaviors Tested |\n|-------|---------|------------------|\n| StInit | Entry point | - |\n| StWaitConnection | Test connection behaviors | CbWaitConnection, CbStatus |\n| StTestRefresh | Test agenda refresh | CbRefreshAgenda |\n| StTestEventDetect | Test event detection | CbDetectCalendarEvent, CbMonitorConnection |\n| StTestQuickAdd | Test event creation | CbQuickAdd |\n| StDone | Test completion | - |\n\n## Prerequisites\n\n1. **gcalcli installed and authenticated:**\n   ```bash\n   pip install gcalcli\n   gcalcli list  # Should show your calendars\n   ```\n\n2. **ROS2 workspace built:**\n   ```bash\n   colcon build --packages-select sm_cl_gcalcli_test_1\n   ```\n\n## Running\n\n```bash\n# Source workspace\nsource install/setup.bash\n\n# Launch the test state machine\nros2 launch sm_cl_gcalcli_test_1 sm_cl_gcalcli_test_1.py\n```\n\n## Monitoring\n\n```bash\n# View state transitions\nros2 topic echo /sm_cl_gcalcli_test_1/smacc/status\n\n# View events\nros2 topic echo /sm_cl_gcalcli_test_1/smacc/event_log\n\n# View transition log\nros2 topic echo /sm_cl_gcalcli_test_1/smacc/transition_log\n```\n\n## Notes\n\n- The state machine uses timer-based fallback transitions, so it will run even if gcalcli is not configured\n- If gcalcli is not available, the state machine will log warnings and proceed using timer transitions\n- The CbQuickAdd behavior will create actual calendar events if gcalcli is configured\n\n## License\n\nApache-2.0\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/docs/sm_cl_gcalcli_test_1_plan.md",
    "content": "# Implementation Plan: sm_cl_gcalcli_test_1\n\n## Overview\n\nCreate a unit test state machine for the `cl_gcalcli` client library. The state machine will exercise all behaviors and components to verify proper functionality of the Google Calendar integration via gcalcli.\n\n## Test Strategy\n\n### Test Scope\n\nThe test state machine will verify:\n1. **Connection behaviors** - CbWaitConnection, CbMonitorConnection\n2. **Status behaviors** - CbStatus, CbRefreshAgenda\n3. **Event detection** - CbEventDetect with time-based triggering\n4. **Event addition** - CbQuickAdd\n5. **Event transitions** - All cl_gcalcli events (EvConnectionLost, EvConnectionRestored, etc.)\n\n### Testing Approach\n\nSince gcalcli requires actual Google Calendar authentication and network access, the test will:\n1. Use a timer-based fallback for state transitions when gcalcli is not available\n2. Log all behavior entry/exit points for verification\n3. Test event handling patterns regardless of actual calendar data\n\n## Architecture\n\n```\nSmClGcalcliTest1\n├── OrCalendar (gcalcli client orthogonal)\n│   └── ClGcalcli (with default config)\n└── OrTimer (fallback transition timer)\n    └── ClRos2Timer\n\nStates:\n┌─────────────────┐     ┌──────────────────┐     ┌────────────────────┐\n│   StInit        │────▶│ StWaitConnection │────▶│ StTestRefresh      │\n│ (Entry point)   │     │ (CbWaitConnection│     │ (CbRefreshAgenda)  │\n└─────────────────┘     │  CbStatus)       │     └────────┬───────────┘\n                        └──────────────────┘              │\n                                                          ▼\n┌─────────────────┐     ┌──────────────────┐     ┌────────────────────┐\n│   StDone        │◀────│ StTestQuickAdd   │◀────│ StTestEventDetect  │\n│ (Final state)   │     │ (CbQuickAdd)     │     │ (CbEventDetect,    │\n└─────────────────┘     └──────────────────┘     │  CbMonitorConn)    │\n                                                  └────────────────────┘\n```\n\n## File Structure\n\n```\nsmacc2_sm_reference_library/sm_cl_gcalcli_test_1/\n├── include/sm_cl_gcalcli_test_1/\n│   ├── sm_cl_gcalcli_test_1.hpp       # Main SM header\n│   ├── orthogonals/\n│   │   ├── or_calendar.hpp            # Calendar orthogonal (ClGcalcli)\n│   │   └── or_timer.hpp               # Timer orthogonal (fallback)\n│   └── states/\n│       ├── st_init.hpp                # Initial state\n│       ├── st_wait_connection.hpp     # Test CbWaitConnection + CbStatus\n│       ├── st_test_refresh.hpp        # Test CbRefreshAgenda\n│       ├── st_test_event_detect.hpp   # Test CbEventDetect + CbMonitorConnection\n│       ├── st_test_quick_add.hpp      # Test CbQuickAdd\n│       └── st_done.hpp                # Final state (loop back or exit)\n├── src/sm_cl_gcalcli_test_1/\n│   └── sm_cl_gcalcli_test_1_node.cpp  # Main entry point\n├── launch/\n│   └── sm_cl_gcalcli_test_1.py        # Launch file\n├── config/\n│   └── sm_cl_gcalcli_test_1.yaml      # Config (optional)\n├── CMakeLists.txt\n├── package.xml\n└── README.md\n```\n\n## Detailed State Definitions\n\n### StInit (Initial State)\n- **Purpose**: Entry point, immediate transition to testing\n- **Behaviors**: None\n- **Transitions**:\n  - Timer → StWaitConnection (after 1 second)\n\n### StWaitConnection\n- **Purpose**: Test connection waiting and status behaviors\n- **Behaviors**:\n  - `CbWaitConnection` - Async wait for gcalcli connection\n  - `CbStatus` - Sync status query\n- **Transitions**:\n  - `EvCbSuccess<CbWaitConnection>` → StTestRefresh (connection established)\n  - `EvCbFailure<CbWaitConnection>` → StDone (connection failed, skip remaining tests)\n  - Timer (10s timeout) → StTestRefresh (fallback for testing without gcalcli)\n\n### StTestRefresh\n- **Purpose**: Test agenda refresh behavior\n- **Behaviors**:\n  - `CbRefreshAgenda` - Sync agenda refresh\n- **Transitions**:\n  - Timer (3s) → StTestEventDetect (proceed after refresh completes)\n\n### StTestEventDetect\n- **Purpose**: Test event detection and connection monitoring\n- **Behaviors**:\n  - `CbEventDetect(\"TestEvent\", /*regex=*/false, /*minutes_before=*/5)` - Watch for test events\n  - `CbMonitorConnection` - Continuous connection monitoring\n- **Transitions**:\n  - `EvCalendarEventStarted` → StTestQuickAdd (event detected)\n  - `EvConnectionLost` → StWaitConnection (reconnection needed)\n  - Timer (10s) → StTestQuickAdd (fallback for testing)\n\n### StTestQuickAdd\n- **Purpose**: Test quick event addition\n- **Behaviors**:\n  - `CbQuickAdd(\"Test Event from sm_cl_gcalcli_test_1 tomorrow 2pm\")` - Add test event\n- **Transitions**:\n  - `EvCbSuccess<CbQuickAdd>` → StDone (success)\n  - `EvCbFailure<CbQuickAdd>` → StDone (failure logged)\n  - Timer (10s) → StDone (timeout fallback)\n\n### StDone\n- **Purpose**: Final state, log test completion\n- **Behaviors**: None\n- **Transitions**:\n  - Timer (5s) → StInit (loop for continuous testing)\n\n## Events to Test\n\n| Event | Source | Test State |\n|-------|--------|------------|\n| `EvConnectionLost<CpGcalcliConnection, OrCalendar>` | CpGcalcliConnection | StTestEventDetect |\n| `EvConnectionRestored<CpGcalcliConnection, OrCalendar>` | CpGcalcliConnection | StTestEventDetect |\n| `EvAuthenticationRequired<CpGcalcliConnection, OrCalendar>` | CpGcalcliConnection | (any state) |\n| `EvCalendarEventDetected<CpCalendarEventListener, OrCalendar>` | CpCalendarEventListener | StTestEventDetect |\n| `EvCalendarEventStarted<CpCalendarEventListener, OrCalendar>` | CpCalendarEventListener | StTestEventDetect |\n| `EvCalendarEventEnded<CpCalendarEventListener, OrCalendar>` | CpCalendarEventListener | StTestEventDetect |\n| `EvAgendaUpdated<CpCalendarPoller, OrCalendar>` | CpCalendarPoller | StTestRefresh |\n| `EvCbSuccess<CbWaitConnection, OrCalendar>` | CbWaitConnection | StWaitConnection |\n| `EvCbFailure<CbWaitConnection, OrCalendar>` | CbWaitConnection | StWaitConnection |\n| `EvCbSuccess<CbQuickAdd, OrCalendar>` | CbQuickAdd | StTestQuickAdd |\n| `EvCbFailure<CbQuickAdd, OrCalendar>` | CbQuickAdd | StTestQuickAdd |\n\n## Implementation Order\n\n### Phase 1: Package Structure\n1. Create package directory structure\n2. Create CMakeLists.txt\n3. Create package.xml\n\n### Phase 2: Orthogonals\n4. Create or_timer.hpp (reuse from sm_cl_keyboard_unit_test_1)\n5. Create or_calendar.hpp (new - creates ClGcalcli)\n\n### Phase 3: States\n6. Create st_init.hpp\n7. Create st_wait_connection.hpp\n8. Create st_test_refresh.hpp\n9. Create st_test_event_detect.hpp\n10. Create st_test_quick_add.hpp\n11. Create st_done.hpp\n\n### Phase 4: Main Files\n12. Create sm_cl_gcalcli_test_1.hpp\n13. Create sm_cl_gcalcli_test_1_node.cpp\n\n### Phase 5: Launch & Config\n14. Create launch file\n15. Create README.md\n\n### Phase 6: Build & Test\n16. Build package\n17. Run test (requires gcalcli setup)\n\n## Dependencies\n\n- smacc2\n- cl_gcalcli\n- cl_ros2_timer\n\n## Configuration\n\n```yaml\n# sm_cl_gcalcli_test_1.yaml (optional)\nsm_cl_gcalcli_test_1:\n  ros__parameters:\n    # gcalcli config can be overridden here if needed\n    poll_interval: 30.0\n    heartbeat_interval: 60.0\n    agenda_days: 7\n```\n\n## Usage Example\n\n```bash\n# Build\ncolcon build --packages-select sm_cl_gcalcli_test_1\n\n# Run (requires gcalcli to be authenticated)\nros2 launch sm_cl_gcalcli_test_1 sm_cl_gcalcli_test_1.py\n\n# Monitor state transitions\nros2 topic echo /sm_cl_gcalcli_test_1/smacc/status\n\n# Monitor events\nros2 topic echo /sm_cl_gcalcli_test_1/smacc/event_log\n```\n\n## Key Implementation Notes\n\n1. **Timer Fallback**: Each state uses timer-based transitions to allow testing even when gcalcli is not configured. This makes the test runnable in CI/CD environments.\n\n2. **Logging**: All states log entry/exit and behavior results for debugging.\n\n3. **Event Handling**: The state machine demonstrates proper event handling patterns that can be used as a reference for real applications.\n\n4. **No External Dependencies**: The test runs without requiring actual calendar events - it tests the framework integration, not the calendar data.\n\n5. **Loop Mode**: The state machine loops from StDone back to StInit for continuous testing/demonstration.\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/include/sm_cl_gcalcli_test_1/orthogonals/or_calendar.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_gcalcli/cl_gcalcli.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n\nnamespace sm_cl_gcalcli_test_1\n{\n\nclass OrCalendar : public smacc2::Orthogonal<OrCalendar>\n{\npublic:\n  void onInitialize() override\n  {\n    // Configure gcalcli with the \"Robot\" calendar\n    cl_gcalcli::GcalcliConfig config;\n    config.gcalcli_path = \"gcalcli\";  // Use system gcalcli from PATH\n    config.calendars = {\"Robot\"};     // Use the Robot calendar\n    config.poll_interval = std::chrono::seconds{10};  // Faster polling for testing\n    config.heartbeat_interval = std::chrono::seconds{60};\n    config.agenda_days = 7;\n\n    this->createClient<cl_gcalcli::ClGcalcli>(config);\n  }\n};\n\n}  // namespace sm_cl_gcalcli_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/include/sm_cl_gcalcli_test_1/orthogonals/or_timer.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace sm_cl_gcalcli_test_1\n{\n\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  void onInitialize() override { this->createClient<cl_ros2_timer::ClRos2Timer>(1s); }\n};\n\n}  // namespace sm_cl_gcalcli_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/include/sm_cl_gcalcli_test_1/sm_cl_gcalcli_test_1.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n\n#include <cl_gcalcli/cl_gcalcli.hpp>\n#include <cl_gcalcli/client_behaviors.hpp>\n#include <cl_gcalcli/components/cp_calendar_event_listener.hpp>\n#include <cl_gcalcli/components/cp_calendar_poller.hpp>\n#include <cl_gcalcli/components/cp_gcalcli_connection.hpp>\n#include <cl_gcalcli/events.hpp>\n\n// CLIENT BEHAVIORS\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_loop.hpp>\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n\n// ORTHOGONALS\n#include \"orthogonals/or_calendar.hpp\"\n#include \"orthogonals/or_timer.hpp\"\n\nusing namespace boost;\nusing namespace smacc2;\nusing namespace cl_ros2_timer;\nusing namespace cl_gcalcli;\n\nnamespace sm_cl_gcalcli_test_1\n{\n\n// Forward declare states\nclass StInit;\nclass StWaitConnection;\nclass StTestRefresh;\nclass StTestEventDetect;\nclass StTestQuickAdd;\nclass StDone;\n\n//--------------------------------------------------------------------\n// STATE_MACHINE\nstruct SmClGcalcliTest1 : public smacc2::SmaccStateMachineBase<SmClGcalcliTest1, StInit>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  void onInitialize() override\n  {\n    this->createOrthogonal<OrTimer>();\n    this->createOrthogonal<OrCalendar>();\n  }\n};\n\n}  // namespace sm_cl_gcalcli_test_1\n\n// Include states after state machine declaration\n#include \"states/st_init.hpp\"\n#include \"states/st_wait_connection.hpp\"\n#include \"states/st_test_refresh.hpp\"\n#include \"states/st_test_event_detect.hpp\"\n#include \"states/st_test_quick_add.hpp\"\n#include \"states/st_done.hpp\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/include/sm_cl_gcalcli_test_1/states/st_done.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_gcalcli_test_1\n{\n\nusing namespace cl_ros2_timer;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StDone : smacc2::SmaccState<StDone, SmClGcalcliTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // Loop back to start for continuous testing\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StInit, SUCCESS>>\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Wait 5 seconds before looping\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"====================================\");\n    RCLCPP_INFO(getLogger(), \"StDone - Test Cycle Complete\");\n    RCLCPP_INFO(getLogger(), \"====================================\");\n    RCLCPP_INFO(getLogger(), \"All cl_gcalcli behavior tests completed.\");\n    RCLCPP_INFO(getLogger(), \"Looping back to StInit in 5 seconds...\");\n    RCLCPP_INFO(getLogger(), \"(Press Ctrl+C to exit)\");\n  }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"StDone - onExit()\"); }\n};\n\n}  // namespace sm_cl_gcalcli_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/include/sm_cl_gcalcli_test_1/states/st_init.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_gcalcli_test_1\n{\n\nusing namespace cl_ros2_timer;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StInit : smacc2::SmaccState<StInit, SmClGcalcliTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // Timer triggers transition to next state after 1 second\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StWaitConnection, SUCCESS>>\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Quick timer to move to the test states\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(1);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"====================================\");\n    RCLCPP_INFO(getLogger(), \"sm_cl_gcalcli_test_1 - StInit\");\n    RCLCPP_INFO(getLogger(), \"====================================\");\n    RCLCPP_INFO(getLogger(), \"Starting cl_gcalcli unit tests...\");\n  }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"StInit - onExit()\"); }\n};\n\n}  // namespace sm_cl_gcalcli_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/include/sm_cl_gcalcli_test_1/states/st_test_event_detect.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_gcalcli_test_1\n{\n\nusing namespace cl_ros2_timer;\nusing namespace cl_gcalcli;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StTestEventDetect : smacc2::SmaccState<StTestEventDetect, SmClGcalcliTest1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct EVENT_DETECTED : SUCCESS\n  {\n  };\n  struct CONNECTION_LOST : ABORT\n  {\n  };\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // Calendar event started - detected matching event\n    Transition<\n      EvCalendarEventStarted<CpCalendarEventListener, OrCalendar>, StTestQuickAdd, EVENT_DETECTED>,\n    // Connection lost - go back to wait\n    Transition<EvConnectionLost<CpGcalcliConnection, OrCalendar>, StWaitConnection, CONNECTION_LOST>>\n    // Timeout fallback commented out - wait indefinitely for event detection\n    // Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StTestQuickAdd, SUCCESS>>\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Test CbDetectCalendarEvent - watch for events matching \"TestEvent\"\n    // Using regex=false, minutes_before=5\n    configure_orthogonal<OrCalendar, CbDetectCalendarEvent>(\"TestEvent\", false, 0);\n\n    // Test CbMonitorConnection - continuous connection monitoring\n    configure_orthogonal<OrCalendar, CbMonitorConnection>();\n\n    // Timeout fallback commented out - wait indefinitely for event detection\n    // configure_orthogonal<OrTimer, CbTimerCountdownOnce>(60);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"====================================\");\n    RCLCPP_INFO(getLogger(), \"StTestEventDetect - Testing CbDetectCalendarEvent + CbMonitorConnection\");\n    RCLCPP_INFO(getLogger(), \"====================================\");\n    RCLCPP_INFO(getLogger(), \"Watching for 'TestEvent' calendar events (0 min before)...\");\n    RCLCPP_INFO(getLogger(), \"Monitoring connection health...\");\n  }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"StTestEventDetect - onExit()\"); }\n};\n\n}  // namespace sm_cl_gcalcli_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/include/sm_cl_gcalcli_test_1/states/st_test_quick_add.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_gcalcli_test_1\n{\n\nusing namespace cl_ros2_timer;\nusing namespace cl_gcalcli;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StTestQuickAdd : smacc2::SmaccState<StTestQuickAdd, SmClGcalcliTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // Quick add succeeded\n    Transition<EvCbSuccess<CbQuickAdd, OrCalendar>, StDone, SUCCESS>,\n    // Quick add failed\n    Transition<EvCbFailure<CbQuickAdd, OrCalendar>, StDone, ABORT>,\n    // Timeout fallback\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StDone, SUCCESS>>\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Test CbQuickAdd - add a test event\n    // Note: This will create an actual calendar event if gcalcli is configured\n    configure_orthogonal<OrCalendar, CbQuickAdd>(\n      \"sm_cl_gcalcli_test_1 Test Event tomorrow 2pm for 30 minutes\");\n\n    // Timeout fallback (10 seconds)\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"====================================\");\n    RCLCPP_INFO(getLogger(), \"StTestQuickAdd - Testing CbQuickAdd\");\n    RCLCPP_INFO(getLogger(), \"====================================\");\n    RCLCPP_INFO(getLogger(), \"Adding test event via gcalcli quick add...\");\n  }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"StTestQuickAdd - onExit()\"); }\n};\n\n}  // namespace sm_cl_gcalcli_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/include/sm_cl_gcalcli_test_1/states/st_test_refresh.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_gcalcli_test_1\n{\n\nusing namespace cl_ros2_timer;\nusing namespace cl_gcalcli;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StTestRefresh : smacc2::SmaccState<StTestRefresh, SmClGcalcliTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // Timer to proceed to next test\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StTestEventDetect, SUCCESS>>\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Test CbRefreshAgenda - sync agenda refresh\n    configure_orthogonal<OrCalendar, CbRefreshAgenda>();\n\n    // Wait 3 seconds then proceed\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(3);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"====================================\");\n    RCLCPP_INFO(getLogger(), \"StTestRefresh - Testing CbRefreshAgenda\");\n    RCLCPP_INFO(getLogger(), \"====================================\");\n    RCLCPP_INFO(getLogger(), \"Refreshing agenda...\");\n  }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"StTestRefresh - onExit()\"); }\n};\n\n}  // namespace sm_cl_gcalcli_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/include/sm_cl_gcalcli_test_1/states/st_wait_connection.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_gcalcli_test_1\n{\n\nusing namespace cl_ros2_timer;\nusing namespace cl_gcalcli;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StWaitConnection : smacc2::SmaccState<StWaitConnection, SmClGcalcliTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // Connection established successfully\n    Transition<EvCbSuccess<CbWaitConnection, OrCalendar>, StTestRefresh, SUCCESS>,\n    // Connection failed - skip to done\n    Transition<EvCbFailure<CbWaitConnection, OrCalendar>, StDone, ABORT>,\n    // Timeout fallback - proceed anyway for testing\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StTestRefresh, SUCCESS>>\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Test CbWaitConnection - async wait for gcalcli connection\n    configure_orthogonal<OrCalendar, CbWaitConnection>(std::chrono::seconds{5});\n\n    // Test CbStatus - sync status query (runs in parallel)\n    configure_orthogonal<OrCalendar, CbStatus>();\n\n    // Timeout fallback (10 seconds)\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"====================================\");\n    RCLCPP_INFO(getLogger(), \"StWaitConnection - Testing CbWaitConnection + CbStatus\");\n    RCLCPP_INFO(getLogger(), \"====================================\");\n    RCLCPP_INFO(getLogger(), \"Waiting for gcalcli connection (timeout: 5s)...\");\n  }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"StWaitConnection - onExit()\"); }\n};\n\n}  // namespace sm_cl_gcalcli_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/launch/sm_cl_gcalcli_test_1.py",
    "content": "# Copyright 2024 RobosoftAI Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef generate_launch_description():\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_cl_gcalcli_test_1\",\n                executable=\"sm_cl_gcalcli_test_1_node\",\n                output=\"screen\",\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n        ]\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_cl_gcalcli_test_1</name>\n  <version>3.0.1</version>\n  <description>Unit test state machine for cl_gcalcli client library</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>cl_gcalcli</depend>\n  <depend>smacc2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_gcalcli_test_1/src/sm_cl_gcalcli_test_1/sm_cl_gcalcli_test_1_node.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_cl_gcalcli_test_1/sm_cl_gcalcli_test_1.hpp>\n\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_cl_gcalcli_test_1::SmClGcalcliTest1>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_keyboard_unit_test_1/CHANGELOG.rst",
    "content": "Changelog for package sm_cl_keyboard_unit_test_1\n================================================\n\n.. note::\n   This package was created in 2025 as a unit test for cl_keyboard, cloned from sm_cl_ros2_timer_unit_test_1.\n   For the original sm_atomic/sm_cl_ros2_timer_unit_test_1 history, see those packages' CHANGELOG.rst files.\n\n2.3.20 (2025-11-01)\n-------------------\n* Created sm_cl_keyboard_unit_test_1 as unit test for cl_keyboard client\n* New cl_keyboard client library (`#621 <https://github.com/robosoft-ai/SMACC2/issues/621>`_)\n* Trimming sm_atomic_services and sm_atomic_24hr from sm_reference_library (`#644 <https://github.com/robosoft-ai/SMACC2/issues/644>`_)\n* Moving reference library from keyboard_client to cl_keyboard (`#645 <https://github.com/robosoft-ai/SMACC2/issues/645>`_)\n* Contributors: Brett Aldrich, Pablo Iñigo Blasco\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_keyboard_unit_test_1/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_cl_keyboard_unit_test_1)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(cl_keyboard REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(include\n                    ${smacc2_INCLUDE_DIRS}\n                    ${cl_ros2_timer_INCLUDE_DIRS}\n                    ${cl_keyboard_INCLUDE_DIRS})\n\nadd_executable(${PROJECT_NAME}_node\n                src/sm_cl_keyboard_unit_test_1/sm_cl_keyboard_unit_test_1_node.cpp)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${cl_keyboard_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node smacc2)\n\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(DIRECTORY\n  config\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n        ${PROJECT_NAME}_node\n        DESTINATION lib/${PROJECT_NAME})\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_keyboard_unit_test_1/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ![sm_cl_keyboard_unit_test_1](docs/SmClKeyboardUnitTest1_2025-12-21_213456.svg)\n\n <h2>Description</h2> A completely minimal state machine example.<br></br>\n\n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n<h2>Operating Instructions</h2>\nAfter you build, remember to source the workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_cl_keyboard_unit_test_1 sm_cl_keyboard_unit_test_1.py\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>.\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_keyboard_unit_test_1/config/sm_cl_keyboard_unit_test_1_config.yaml",
    "content": "global_parameter_server:\n    ros__parameters:\n        signal_detector_loop_freq: 200\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_keyboard_unit_test_1/include/sm_cl_keyboard_unit_test_1/orthogonals/or_keyboard.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\nnamespace sm_cl_keyboard_unit_test_1\n{\nclass OrKeyboard : public smacc2::Orthogonal<OrKeyboard>\n{\npublic:\n  virtual void onInitialize() override\n  {\n    auto clKeyboard = this->createClient<cl_keyboard::ClKeyboard>();\n  }\n};\n}  // namespace sm_cl_keyboard_unit_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_keyboard_unit_test_1/include/sm_cl_keyboard_unit_test_1/orthogonals/or_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <chrono>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace sm_cl_keyboard_unit_test_1\n{\nusing namespace std::chrono_literals;\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  void onInitialize() override { auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(1s); }\n};\n}  // namespace sm_cl_keyboard_unit_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_keyboard_unit_test_1/include/sm_cl_keyboard_unit_test_1/sm_cl_keyboard_unit_test_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <cl_ros2_timer/components/cp_timer_listener_1.hpp>\n\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <cl_keyboard/components/cp_keyboard_listener_1.hpp>\n\n//CLIENT BEHAVIORS\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_loop.hpp>\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n\n#include <cl_keyboard/client_behaviors/cb_default_keyboard_behavior.hpp>\n\n// ORTHOGONALS\n#include \"orthogonals/or_timer.hpp\"\n#include \"orthogonals/or_keyboard.hpp\"\n\nusing namespace boost;\nusing namespace smacc2;\nusing namespace cl_ros2_timer;\nusing namespace cl_keyboard;\n\nnamespace sm_cl_keyboard_unit_test_1\n{\n//STATE\nclass State1;\nclass State2;\n\n//--------------------------------------------------------------------\n//STATE_MACHINE\nstruct SmClKeyboardUnitTest1 : public smacc2::SmaccStateMachineBase<SmClKeyboardUnitTest1, State1>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  virtual void onInitialize() override { \n    this->createOrthogonal<OrTimer>(); \n    this->createOrthogonal<OrKeyboard>(); \n  }\n};\n\n}  // namespace sm_cl_keyboard_unit_test_1\n\n#include \"states/st_state_1.hpp\"\n#include \"states/st_state_2.hpp\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_keyboard_unit_test_1/include/sm_cl_keyboard_unit_test_1/states/st_state_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_keyboard_unit_test_1\n{\nusing namespace cl_ros2_timer;\nusing namespace cl_keyboard;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct State1 : smacc2::SmaccState<State1, SmClKeyboardUnitTest1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State2, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, State2, NEXT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownLoop>(3);  // EvTimer triggers each 3 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);  // EvTimer triggers once at 10 client ticks\n\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"runtimeConfigure() firing\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"onEntry() firing\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"onExit() firing\"); }\n};\n}  // namespace sm_cl_keyboard_unit_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_keyboard_unit_test_1/include/sm_cl_keyboard_unit_test_1/states/st_state_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_keyboard_unit_test_1\n{\nusing namespace cl_ros2_timer;\nusing namespace cl_keyboard;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct State2 : smacc2::SmaccState<State2, SmClKeyboardUnitTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State1, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, State1, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);  // EvTimer triggers once at 10 client ticks\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"runtimeConfigure() firing\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"onEntry() firing\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"onExit() firing\"); }\n};\n}  // namespace sm_cl_keyboard_unit_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_keyboard_unit_test_1/launch/sm_cl_keyboard_unit_test_1.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef generate_launch_description():\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_cl_keyboard_unit_test_1\",\n                executable=\"sm_cl_keyboard_unit_test_1_node\",\n                output=\"screen\",\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n            Node(\n                package=\"cl_keyboard\",\n                executable=\"keyboard_server_node.py\",\n                name=\"keyboard_server_node\",\n                output=\"screen\",\n                prefix=\"konsole --hold -p tabtitle='Keyboard Server' -e\",\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n        ]\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_keyboard_unit_test_1/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_cl_keyboard_unit_test_1</name>\n  <version>3.0.1</version>\n  <description>The sm_cl_keyboard_unit_test_1 package</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>cl_keyboard</depend>\n  <depend>smacc2</depend>\n\n  <exec_depend>konsole</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_keyboard_unit_test_1/src/sm_cl_keyboard_unit_test_1/sm_cl_keyboard_unit_test_1_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_cl_keyboard_unit_test_1/sm_cl_keyboard_unit_test_1.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_cl_keyboard_unit_test_1::SmClKeyboardUnitTest1>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_cl_px4_mr_test_1)\n\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(cl_px4_mr REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(px4_msgs REQUIRED)\nfind_package(rclcpp REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(include\n  ${smacc2_INCLUDE_DIRS}\n  ${cl_px4_mr_INCLUDE_DIRS}\n  ${cl_ros2_timer_INCLUDE_DIRS}\n)\n\nadd_executable(${PROJECT_NAME}_node\n  src/sm_cl_px4_mr_test_1/sm_cl_px4_mr_test_1_node.cpp)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_px4_mr_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node\n  smacc2\n  cl_px4_mr\n  cl_ros2_timer\n  px4_msgs\n  rclcpp\n)\n\ninstall(DIRECTORY include/\n  DESTINATION include)\n\ninstall(DIRECTORY launch\n  DESTINATION share/${PROJECT_NAME})\n\ninstall(TARGETS ${PROJECT_NAME}_node\n  DESTINATION lib/${PROJECT_NAME})\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ![sm_cl_px4_mr_test_1](docs/SmClPx4MrTest1_2026-2-26_11713.svg)\n\n<h2>Description</h2>\n\nTest state machine for the `cl_px4_mr` PX4 multirotor client library in Gazebo. Demonstrates a complete autonomous flight mission: wait for readiness, arm, takeoff to 5m, fly to a waypoint, orbit 3 times, return to base, and land. Built on top of the\n\nUses two orthogonals:\n- **OrPx4** - `cl_px4_mr::ClPx4Mr` client for all PX4 vehicle control\n- **OrTimer** - `cl_ros2_timer::ClRos2Timer` for timed waits\n\n<h2>Build Instructions</h2>\n\nFirst, source your ROS 2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nThen build with colcon build...\n```\ncolcon build --packages-select cl_px4_mr sm_cl_px4_mr_test_1\n```\n\n<h2>Operating Instructions</h2>\n\nRequires four processes running simultaneously:\n\n**Terminal 1 - PX4 SITL:**\n```\ncd ~/workspaces/PX4-Autopilot\nmake px4_sitl gz_x500\n```\n\n**Terminal 2 - XRCE-DDS Agent:**\n```\nros2 run micro_ros_agent micro_ros_agent udp4 -p 8888 2>&1 | tee /tmp/xrce_agent.log\n```\n\n**Terminal 3 - QGroundControl** (required for GCS heartbeat so PX4 allows arming)\nFollow the installation instructions found here: https://docs.qgroundcontrol.com/master/en/qgc-user-guide/getting_started/download_and_install.html\n\nAnd then navigate to the appropriate directory and launch it from the terminal:\n```  \n./QGroundControl-x86_64.AppImage\n```\n\n**Terminal 4 - State Machine:**\n```\nsource install/setup.bash\nros2 launch sm_cl_px4_mr_test_1 sm_cl_px4_mr_test_1.launch.py\n```\n\n<h2>Mission Flow</h2>\n\n| State | Mode State | Behavior | Action |\n|-------|-----------|----------|--------|\n| StWaitForReady | MsDisarmedOnGround | CbTimerCountdownOnce(5) | Wait 5 seconds for system readiness |\n| StArmPx4 | MsArmedOnGround | CbArmPX4 | Arm vehicle (5 retries, force-arm after 2) |\n| StTakeoff | MsTakeoff | CbTakeOff(5.0) | Enable offboard mode, climb to 5m |\n| StGoToWaypoint1 | MsInFlight | CbGoToLocation(10, 0, -5) | Fly to waypoint at (10, 0) NED |\n| StOrbitLocation | MsInFlight | CbOrbitLocation(10, 0, 5, 5, 0.5, 3) | Orbit 3x around waypoint, r=5m |\n| StReturnToBase | MsInFlight | CbGoToLocation(0, 0, -5) | Return to origin |\n| StLand | MsLanding | CbLand | Land and wait for auto-disarm |\n| StLanded | MsLanded | (none) | Mission complete |\n\n<h2>Log File Locations</h2>\n\n| Component | Location |\n|-----------|----------|\n| State Machine (ROS 2) | `~/.ros/log/` (latest node log: `sm_cl_px4_mr_test_1_node_*.log`) |\n| PX4 SITL (.ulg) | `~/workspaces/PX4-Autopilot/build/px4_sitl_default/rootfs/log/` |\n| micro_ros_agent | `/tmp/xrce_agent.log` (when launched with tee redirect above) |\n\n<h2>Viewer Instructions</h2>\n\nIf you have the SMACC2 Runtime Analyzer installed then type...\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>.\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/orthogonals/or_px4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n#include <cl_px4_mr/cl_px4_mr.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\nclass OrPx4 : public smacc2::Orthogonal<OrPx4>\n{\npublic:\n  void onInitialize() override\n  {\n    auto client = this->createClient<cl_px4_mr::ClPx4Mr>();\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/orthogonals/or_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <chrono>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\nusing namespace std::chrono_literals;\n\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  void onInitialize() override\n  {\n    auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(rclcpp::Duration(1s));\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/sm_cl_px4_mr_test_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_px4_mr/cl_px4_mr.hpp>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n\n// CLIENT BEHAVIORS\n#include <cl_px4_mr/client_behaviors/cb_arm_px4.hpp>\n#include <cl_px4_mr/client_behaviors/cb_disarm_px4.hpp>\n#include <cl_px4_mr/client_behaviors/cb_takeoff.hpp>\n#include <cl_px4_mr/client_behaviors/cb_land.hpp>\n#include <cl_px4_mr/client_behaviors/cb_go_to_location.hpp>\n#include <cl_px4_mr/client_behaviors/cb_orbit_location.hpp>\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n\n// ORTHOGONALS\n#include <sm_cl_px4_mr_test_1/orthogonals/or_px4.hpp>\n#include <sm_cl_px4_mr_test_1/orthogonals/or_timer.hpp>\n\nusing namespace boost;\nusing namespace smacc2;\n\nnamespace sm_cl_px4_mr_test_1\n{\n\n// MODE STATES (forward declarations)\nclass MsDisarmedOnGround;\nclass MsArmedOnGround;\nclass MsTakeoff;\nclass MsInFlight;\nclass MsLanding;\nclass MsLanded;\n\n// STATES (forward declarations)\nclass StWaitForReady;\nclass StArmPx4;\nclass StTakeoff;\nclass StGoToWaypoint1;\nclass StOrbitLocation;\nclass StReturnToBase;\nclass StLand;\nclass StLanded;\n\n// STATE MACHINE\nstruct SmClPx4MrTest1\n: public smacc2::SmaccStateMachineBase<SmClPx4MrTest1, MsDisarmedOnGround>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  void onInitialize() override\n  {\n    this->createOrthogonal<OrPx4>();\n    this->createOrthogonal<OrTimer>();\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n\n// MODE STATE INCLUDES (must come after SM definition, before regular states)\n#include <sm_cl_px4_mr_test_1/states/ms_disarmed_on_ground.hpp>\n#include <sm_cl_px4_mr_test_1/states/ms_armed_on_ground.hpp>\n#include <sm_cl_px4_mr_test_1/states/ms_takeoff.hpp>\n#include <sm_cl_px4_mr_test_1/states/ms_in_flight.hpp>\n#include <sm_cl_px4_mr_test_1/states/ms_landing.hpp>\n#include <sm_cl_px4_mr_test_1/states/ms_landed.hpp>\n\n// REGULAR STATE INCLUDES (must come after mode state definitions)\n#include <sm_cl_px4_mr_test_1/states/st_wait_for_ready.hpp>\n#include <sm_cl_px4_mr_test_1/states/st_arm_px4.hpp>\n#include <sm_cl_px4_mr_test_1/states/st_takeoff.hpp>\n#include <sm_cl_px4_mr_test_1/states/st_go_to_waypoint_1.hpp>\n#include <sm_cl_px4_mr_test_1/states/st_orbit_location.hpp>\n#include <sm_cl_px4_mr_test_1/states/st_return_to_base.hpp>\n#include <sm_cl_px4_mr_test_1/states/st_land.hpp>\n#include <sm_cl_px4_mr_test_1/states/st_landed.hpp>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/states/ms_armed_on_ground.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\n// MODE STATE: Vehicle is being armed\nstruct MsArmedOnGround\n: smacc2::SmaccState<MsArmedOnGround, SmClPx4MrTest1, StArmPx4>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n  > reactions;\n\n  static void staticConfigure() {}\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"--- MsArmedOnGround ---\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"--- Exiting MsArmedOnGround ---\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/states/ms_disarmed_on_ground.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\n// MODE STATE: Vehicle is disarmed on the ground, waiting for readiness\nstruct MsDisarmedOnGround\n: smacc2::SmaccState<MsDisarmedOnGround, SmClPx4MrTest1, StWaitForReady>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n  > reactions;\n\n  static void staticConfigure() {}\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"--- MsDisarmedOnGround ---\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"--- Exiting MsDisarmedOnGround ---\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/states/ms_in_flight.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\n// MODE STATE: Vehicle is airborne and executing mission\nstruct MsInFlight\n: smacc2::SmaccState<MsInFlight, SmClPx4MrTest1, StGoToWaypoint1>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n  > reactions;\n\n  static void staticConfigure() {}\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"--- MsInFlight ---\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"--- Exiting MsInFlight ---\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/states/ms_landed.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\n// MODE STATE: Vehicle has landed, mission complete\nstruct MsLanded\n: smacc2::SmaccState<MsLanded, SmClPx4MrTest1, StLanded>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n  > reactions;\n\n  static void staticConfigure() {}\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"--- MsLanded ---\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"--- Exiting MsLanded ---\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/states/ms_landing.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\n// MODE STATE: Vehicle is landing\nstruct MsLanding\n: smacc2::SmaccState<MsLanding, SmClPx4MrTest1, StLand>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n  > reactions;\n\n  static void staticConfigure() {}\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"--- MsLanding ---\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"--- Exiting MsLanding ---\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/states/ms_takeoff.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\n// MODE STATE: Vehicle is taking off\nstruct MsTakeoff\n: smacc2::SmaccState<MsTakeoff, SmClPx4MrTest1, StTakeoff>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n  > reactions;\n\n  static void staticConfigure() {}\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"--- MsTakeoff ---\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"--- Exiting MsTakeoff ---\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/states/st_arm_px4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Arm the vehicle\nstruct StArmPx4 : smacc2::SmaccState<StArmPx4, MsArmedOnGround>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbArmPX4, OrPx4>, MsTakeoff, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrPx4, CbArmPX4>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StArmPx4: arming vehicle...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StArmPx4: vehicle armed\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/states/st_go_to_waypoint_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Navigate to first waypoint (orbit center)\nstruct StGoToWaypoint1 : smacc2::SmaccState<StGoToWaypoint1, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbGoToLocation, OrPx4>, StOrbitLocation, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Navigate to waypoint at (10, 0, -5) NED = 10m North, 5m altitude\n    configure_orthogonal<OrPx4, CbGoToLocation>(10.0f, 0.0f, -5.0f);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StGoToWaypoint1: navigating to waypoint 1...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StGoToWaypoint1: waypoint 1 reached\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/states/st_land.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Land the vehicle\nstruct StLand : smacc2::SmaccState<StLand, MsLanding>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbLand, OrPx4>, MsLanded, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrPx4, CbLand>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StLand: landing...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StLand: landed\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/states/st_landed.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Mission complete - terminal state\nstruct StLanded : smacc2::SmaccState<StLanded, MsLanded>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n  > reactions;\n\n  static void staticConfigure() {}\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StLanded: MISSION COMPLETE\");\n  }\n\n  void onExit() {}\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/states/st_orbit_location.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Orbit around waypoint 1\nstruct StOrbitLocation : smacc2::SmaccState<StOrbitLocation, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbOrbitLocation, OrPx4>, StReturnToBase, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Orbit center (10, 0) at 5m altitude, 5m radius, 0.5 rad/s, 3 orbits\n    configure_orthogonal<OrPx4, CbOrbitLocation>(10.0f, 0.0f, 5.0f, 5.0f, 0.5f, 3);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StOrbitLocation: beginning orbit...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StOrbitLocation: orbit complete\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/states/st_return_to_base.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Return to launch position\nstruct StReturnToBase : smacc2::SmaccState<StReturnToBase, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbGoToLocation, OrPx4>, MsLanding, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Return to origin (0, 0, -5) NED = home position at 5m altitude\n    configure_orthogonal<OrPx4, CbGoToLocation>(0.0f, 0.0f, -5.0f);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StReturnToBase: returning to base...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StReturnToBase: back at base\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/states/st_takeoff.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Take off to target altitude\nstruct StTakeoff : smacc2::SmaccState<StTakeoff, MsTakeoff>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbTakeOff, OrPx4>, MsInFlight, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Take off to 5 meters altitude\n    configure_orthogonal<OrPx4, CbTakeOff>(5.0f);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StTakeoff: taking off...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StTakeoff: takeoff complete\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/include/sm_cl_px4_mr_test_1/states/st_wait_for_ready.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_1\n{\n\nusing namespace cl_ros2_timer;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Wait for PX4 topics to come up before proceeding\nstruct StWaitForReady : smacc2::SmaccState<StWaitForReady, MsDisarmedOnGround>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, MsArmedOnGround, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Wait 5 seconds for PX4 topics to stabilize\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StWaitForReady: waiting for PX4 topics...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StWaitForReady: ready, proceeding to arm\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/launch/sm_cl_px4_mr_test_1.launch.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef generate_launch_description():\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_cl_px4_mr_test_1\",\n                executable=\"sm_cl_px4_mr_test_1_node\",\n                output=\"screen\",\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            )\n        ]\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_cl_px4_mr_test_1</name>\n  <version>0.1.0</version>\n  <description>SMACC2 test state machine for cl_px4_mr multirotor client</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n  <depend>cl_px4_mr</depend>\n  <depend>cl_ros2_timer</depend>\n  <depend>px4_msgs</depend>\n  <depend>rclcpp</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_1/src/sm_cl_px4_mr_test_1/sm_cl_px4_mr_test_1_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_cl_px4_mr_test_1/sm_cl_px4_mr_test_1.hpp>\n\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_cl_px4_mr_test_1::SmClPx4MrTest1>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_cl_px4_mr_test_2)\n\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(cl_px4_mr REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(px4_msgs REQUIRED)\nfind_package(rclcpp REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(include\n  ${smacc2_INCLUDE_DIRS}\n  ${cl_px4_mr_INCLUDE_DIRS}\n  ${cl_ros2_timer_INCLUDE_DIRS}\n)\n\nadd_executable(${PROJECT_NAME}_node\n  src/sm_cl_px4_mr_test_2/sm_cl_px4_mr_test_2_node.cpp)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_px4_mr_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node\n  smacc2\n  cl_px4_mr\n  cl_ros2_timer\n  px4_msgs\n  rclcpp\n)\n\ninstall(DIRECTORY include/\n  DESTINATION include)\n\ninstall(DIRECTORY launch\n  DESTINATION share/${PROJECT_NAME})\n\ninstall(TARGETS ${PROJECT_NAME}_node\n  DESTINATION lib/${PROJECT_NAME})\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/orthogonals/or_px4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n#include <cl_px4_mr/cl_px4_mr.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nclass OrPx4 : public smacc2::Orthogonal<OrPx4>\n{\npublic:\n  void onInitialize() override\n  {\n    auto client = this->createClient<cl_px4_mr::ClPx4Mr>();\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/orthogonals/or_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <chrono>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace std::chrono_literals;\n\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  void onInitialize() override\n  {\n    auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(rclcpp::Duration(1s));\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/sm_cl_px4_mr_test_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_px4_mr/cl_px4_mr.hpp>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n\n// CLIENT BEHAVIORS\n#include <cl_px4_mr/client_behaviors/cb_arm_px4.hpp>\n#include <cl_px4_mr/client_behaviors/cb_change_altitude.hpp>\n#include <cl_px4_mr/client_behaviors/cb_disarm_px4.hpp>\n#include <cl_px4_mr/client_behaviors/cb_figure_eight.hpp>\n#include <cl_px4_mr/client_behaviors/cb_follow_waypoints.hpp>\n#include <cl_px4_mr/client_behaviors/cb_go_to_location.hpp>\n#include <cl_px4_mr/client_behaviors/cb_hold_position.hpp>\n#include <cl_px4_mr/client_behaviors/cb_land.hpp>\n#include <cl_px4_mr/client_behaviors/cb_orbit_location.hpp>\n#include <cl_px4_mr/client_behaviors/cb_return_to_home.hpp>\n#include <cl_px4_mr/client_behaviors/cb_spiral_pattern.hpp>\n#include <cl_px4_mr/client_behaviors/cb_takeoff.hpp>\n#include <cl_px4_mr/client_behaviors/cb_yaw_rotate.hpp>\n#include <cl_px4_mr/client_behaviors/cb_connect_micro_ros_agent.hpp>\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n\n// ORTHOGONALS\n#include <sm_cl_px4_mr_test_2/orthogonals/or_px4.hpp>\n#include <sm_cl_px4_mr_test_2/orthogonals/or_timer.hpp>\n\nusing namespace boost;\nusing namespace smacc2;\n\nnamespace sm_cl_px4_mr_test_2\n{\n\n// MODE STATES (forward declarations)\nclass MsDisarmedOnGround;\nclass MsArmedOnGround;\nclass MsTakeoff;\nclass MsInFlight;\nclass MsLanding;\nclass MsLanded;\n\n// STATES (forward declarations)\nclass StConnectMicroROSAgent;\nclass StWaitForReady;\nclass StArmPx4;\nclass StTakeoff;\nclass StHoldPosition;\nclass StYawRotate;\nclass StHoldPosition2;\nclass StChangeAltitude;\nclass StHoldPosition3;\nclass StSpiralPattern;\nclass StHoldPosition4;\nclass StFollowWaypoints;\nclass StHoldPosition5;\nclass StFigureEight;\nclass StHoldPosition6;\nclass StReturnToHome;\nclass StLand;\nclass StLanded;\n\n// STATE MACHINE\nstruct SmClPx4MrTest2\n: public smacc2::SmaccStateMachineBase<SmClPx4MrTest2, MsDisarmedOnGround>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  void onInitialize() override\n  {\n    this->createOrthogonal<OrPx4>();\n    this->createOrthogonal<OrTimer>();\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n\n// MODE STATE INCLUDES (must come after SM definition, before regular states)\n#include <sm_cl_px4_mr_test_2/states/ms_disarmed_on_ground.hpp>\n#include <sm_cl_px4_mr_test_2/states/ms_armed_on_ground.hpp>\n#include <sm_cl_px4_mr_test_2/states/ms_takeoff.hpp>\n#include <sm_cl_px4_mr_test_2/states/ms_in_flight.hpp>\n#include <sm_cl_px4_mr_test_2/states/ms_landing.hpp>\n#include <sm_cl_px4_mr_test_2/states/ms_landed.hpp>\n\n// REGULAR STATE INCLUDES (must come after mode state definitions)\n#include <sm_cl_px4_mr_test_2/states/st_connect_micro_ros_agent.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_wait_for_ready.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_arm_px4.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_takeoff.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_hold_position.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_yaw_rotate.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_hold_position_2.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_change_altitude.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_hold_position_3.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_spiral_pattern.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_hold_position_4.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_follow_waypoints.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_hold_position_5.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_figure_eight.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_hold_position_6.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_return_to_home.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_land.hpp>\n#include <sm_cl_px4_mr_test_2/states/st_landed.hpp>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/ms_armed_on_ground.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\n// MODE STATE: Vehicle is being armed\nstruct MsArmedOnGround\n: smacc2::SmaccState<MsArmedOnGround, SmClPx4MrTest2, StArmPx4>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n  > reactions;\n\n  static void staticConfigure() {}\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"--- MsArmedOnGround ---\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"--- Exiting MsArmedOnGround ---\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/ms_disarmed_on_ground.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\n// MODE STATE: Vehicle is disarmed on the ground, waiting for readiness\nstruct MsDisarmedOnGround\n: smacc2::SmaccState<MsDisarmedOnGround, SmClPx4MrTest2, StConnectMicroROSAgent>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n  > reactions;\n\n  static void staticConfigure() {}\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"--- MsDisarmedOnGround ---\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"--- Exiting MsDisarmedOnGround ---\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/ms_in_flight.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\n// MODE STATE: Vehicle is airborne and executing mission\nstruct MsInFlight\n: smacc2::SmaccState<MsInFlight, SmClPx4MrTest2, StHoldPosition>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n  > reactions;\n\n  static void staticConfigure() {}\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"--- MsInFlight ---\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"--- Exiting MsInFlight ---\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/ms_landed.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\n// MODE STATE: Vehicle has landed, mission complete\nstruct MsLanded\n: smacc2::SmaccState<MsLanded, SmClPx4MrTest2, StLanded>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n  > reactions;\n\n  static void staticConfigure() {}\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"--- MsLanded ---\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"--- Exiting MsLanded ---\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/ms_landing.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\n// MODE STATE: Vehicle is landing\nstruct MsLanding\n: smacc2::SmaccState<MsLanding, SmClPx4MrTest2, StLand>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n  > reactions;\n\n  static void staticConfigure() {}\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"--- MsLanding ---\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"--- Exiting MsLanding ---\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/ms_takeoff.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\n// MODE STATE: Vehicle is taking off\nstruct MsTakeoff\n: smacc2::SmaccState<MsTakeoff, SmClPx4MrTest2, StTakeoff>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n  > reactions;\n\n  static void staticConfigure() {}\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"--- MsTakeoff ---\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"--- Exiting MsTakeoff ---\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_arm_px4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Arm the vehicle\nstruct StArmPx4 : smacc2::SmaccState<StArmPx4, MsArmedOnGround>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbArmPX4, OrPx4>, MsTakeoff, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrPx4, CbArmPX4>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StArmPx4: arming vehicle...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StArmPx4: vehicle armed\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_change_altitude.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Climb to 20m altitude\nstruct StChangeAltitude : smacc2::SmaccState<StChangeAltitude, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbChangeAltitude, OrPx4>, StHoldPosition3, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Ascend to 20 meters (positive = meters above ground)\n    configure_orthogonal<OrPx4, CbChangeAltitude>(20.0f);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StChangeAltitude: climbing to 20m...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StChangeAltitude: altitude reached\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_connect_micro_ros_agent.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Launch and wait for micro_ros_agent before proceeding\nstruct StConnectMicroROSAgent\n: smacc2::SmaccState<StConnectMicroROSAgent, MsDisarmedOnGround>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbConnectMicroRosAgent, OrPx4>, StWaitForReady, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrPx4, CbConnectMicroRosAgent>(30.0);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StConnectMicroROSAgent: launching and waiting for micro_ros_agent...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StConnectMicroROSAgent: micro_ros_agent connected, proceeding\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_figure_eight.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Fly a figure-8 (lemniscate) pattern\nstruct StFigureEight : smacc2::SmaccState<StFigureEight, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbFigureEight, OrPx4>, StHoldPosition6, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Figure-8 centered at (5, 5) NED, 20m altitude, 5m size, 0.5 speed, 3 loops\n    configure_orthogonal<OrPx4, CbFigureEight>(5.0f, 5.0f, 20.0f, 5.0f, 0.5f, 3);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StFigureEight: starting figure-8 pattern...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StFigureEight: figure-8 complete\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_follow_waypoints.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cmath>\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Follow a triangle of 3 waypoints at 20m altitude\nstruct StFollowWaypoints : smacc2::SmaccState<StFollowWaypoints, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbFollowWaypoints, OrPx4>, StHoldPosition5, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Waypoint pattern at 20m altitude (NED: z = -20), going left (negative Y)\n    // Each waypoint: {x, y, z, yaw} — yaw=NAN means maintain current heading\n    configure_orthogonal<OrPx4, CbFollowWaypoints>(\n      std::vector<std::array<float, 4>>{\n        {30.0f, 0.0f, -20.0f, NAN},     // 30m North\n        {30.0f, -30.0f, -20.0f, NAN},   // 30m North, 30m West\n        {0.0f, -30.0f, -20.0f, NAN}     // 30m West\n      });\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StFollowWaypoints: following 3-point triangle...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StFollowWaypoints: all waypoints reached\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_hold_position.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Hold position for 3 seconds to stabilize after takeoff\nstruct StHoldPosition : smacc2::SmaccState<StHoldPosition, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbHoldPosition, OrPx4>, StYawRotate, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Hold current position for 3 seconds\n    configure_orthogonal<OrPx4, CbHoldPosition>(3.0f);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StHoldPosition: holding position for 3 seconds...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StHoldPosition: hold complete\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_hold_position_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Hold position after yaw rotate, before change altitude\nstruct StHoldPosition2 : smacc2::SmaccState<StHoldPosition2, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbHoldPosition, OrPx4>, StChangeAltitude, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrPx4, CbHoldPosition>(3.0f);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StHoldPosition2: stabilizing after yaw rotate...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StHoldPosition2: hold complete\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_hold_position_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Hold position after change altitude, before spiral pattern\nstruct StHoldPosition3 : smacc2::SmaccState<StHoldPosition3, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbHoldPosition, OrPx4>, StSpiralPattern, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrPx4, CbHoldPosition>(3.0f);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StHoldPosition3: stabilizing after altitude change...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StHoldPosition3: hold complete\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_hold_position_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Hold position after spiral pattern, before follow waypoints\nstruct StHoldPosition4 : smacc2::SmaccState<StHoldPosition4, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbHoldPosition, OrPx4>, StFollowWaypoints, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrPx4, CbHoldPosition>(3.0f);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StHoldPosition4: stabilizing after spiral pattern...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StHoldPosition4: hold complete\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_hold_position_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Hold position after follow waypoints, before figure eight\nstruct StHoldPosition5 : smacc2::SmaccState<StHoldPosition5, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbHoldPosition, OrPx4>, StFigureEight, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrPx4, CbHoldPosition>(3.0f);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StHoldPosition5: stabilizing after waypoints...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StHoldPosition5: hold complete\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_hold_position_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Hold position after figure eight, before return to home\nstruct StHoldPosition6 : smacc2::SmaccState<StHoldPosition6, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbHoldPosition, OrPx4>, StReturnToHome, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrPx4, CbHoldPosition>(3.0f);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StHoldPosition6: stabilizing after figure-8...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StHoldPosition6: hold complete\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_land.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Land the vehicle\nstruct StLand : smacc2::SmaccState<StLand, MsLanding>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbLand, OrPx4>, MsLanded, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrPx4, CbLand>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StLand: landing...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StLand: landed\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_landed.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Mission complete - terminal state\nstruct StLanded : smacc2::SmaccState<StLanded, MsLanded>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n  > reactions;\n\n  static void staticConfigure() {}\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StLanded: MISSION COMPLETE\");\n  }\n\n  void onExit() {}\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_return_to_home.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Return to home position (origin at 15m altitude)\nstruct StReturnToHome : smacc2::SmaccState<StReturnToHome, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbReturnToHome, OrPx4>, MsLanding, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Return to origin at 15m altitude (NED: z = -15), heading North (yaw = 0)\n    configure_orthogonal<OrPx4, CbReturnToHome>(0.0f, 0.0f, -15.0f, 0.0f);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StReturnToHome: returning to home position...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StReturnToHome: home position reached\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_spiral_pattern.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Fly an expanding spiral pattern (search and rescue)\nstruct StSpiralPattern : smacc2::SmaccState<StSpiralPattern, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbSpiralPattern, OrPx4>, StHoldPosition4, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Spiral centered at origin, 20m altitude, 15m max radius, 3m spacing, 2 m/s speed\n    configure_orthogonal<OrPx4, CbSpiralPattern>(0.0f, 0.0f, 20.0f, 15.0f, 3.0f, 2.0f);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StSpiralPattern: starting search spiral...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StSpiralPattern: spiral search complete\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_takeoff.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Take off to 15m altitude (high enough for barrel roll later)\nstruct StTakeoff : smacc2::SmaccState<StTakeoff, MsTakeoff>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbTakeOff, OrPx4>, MsInFlight, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Take off to 15 meters altitude\n    configure_orthogonal<OrPx4, CbTakeOff>(15.0f);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StTakeoff: taking off to 15m...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StTakeoff: takeoff complete\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_wait_for_ready.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_ros2_timer;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Wait for PX4 topics to come up before proceeding\nstruct StWaitForReady : smacc2::SmaccState<StWaitForReady, MsDisarmedOnGround>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, MsArmedOnGround, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Wait 5 seconds for PX4 topics to stabilize\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StWaitForReady: waiting for PX4 topics...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StWaitForReady: ready, proceeding to arm\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/include/sm_cl_px4_mr_test_2/states/st_yaw_rotate.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cmath>\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_px4_mr_test_2\n{\n\nusing namespace cl_px4_mr;\nusing namespace smacc2::default_transition_tags;\n\n// STATE: Rotate 90 degrees to the right (relative yaw)\nstruct StYawRotate : smacc2::SmaccState<StYawRotate, MsInFlight>\n{\n  using SmaccState::SmaccState;\n\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbYawRotate, OrPx4>, StHoldPosition2, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Rotate 90 degrees (PI/2 radians) relative to current heading\n    configure_orthogonal<OrPx4, CbYawRotate>(static_cast<float>(M_PI / 2.0), true);\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StYawRotate: rotating 90 degrees...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StYawRotate: rotation complete\");\n  }\n};\n\n}  // namespace sm_cl_px4_mr_test_2\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/launch/sm_cl_px4_mr_test_2.launch.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef generate_launch_description():\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_cl_px4_mr_test_2\",\n                executable=\"sm_cl_px4_mr_test_2_node\",\n                output=\"screen\",\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            )\n        ]\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_cl_px4_mr_test_2</name>\n  <version>0.1.0</version>\n  <description>SMACC2 test state machine for cl_px4_mr new behaviors (hold, yaw, altitude, waypoints, figure-8, barrel roll, return-to-home)</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n  <depend>cl_px4_mr</depend>\n  <depend>cl_ros2_timer</depend>\n  <depend>px4_msgs</depend>\n  <depend>rclcpp</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_px4_mr_test_2/src/sm_cl_px4_mr_test_2/sm_cl_px4_mr_test_2_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_cl_px4_mr_test_2/sm_cl_px4_mr_test_2.hpp>\n\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_cl_px4_mr_test_2::SmClPx4MrTest2>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_ros2_timer_unit_test_1/CHANGELOG.rst",
    "content": "Changelog for package sm_cl_ros2_timer_unit_test_1\n==================================================\n\n.. note::\n   This package was created in 2025 as a unit test for cl_ros2_timer, cloned from sm_atomic.\n   For the original sm_atomic history, see sm_atomic/CHANGELOG.rst.\n\n2.3.20 (2025-11-01)\n-------------------\n* Created sm_cl_ros2_timer_unit_test_1 as unit test for cl_ros2_timer client\n* New cl_ros2_timer unit test (`#616 <https://github.com/robosoft-ai/SMACC2/issues/616>`_)\n* Refactoring cl_ros2_timer to component-based architecture (`#618 <https://github.com/robosoft-ai/SMACC2/issues/618>`_)\n* Trimming sm_atomic_services and sm_atomic_24hr from sm_reference_library (`#644 <https://github.com/robosoft-ai/SMACC2/issues/644>`_)\n* Moving reference library from ros_timer_client to cl_ros2_timer (`#645 <https://github.com/robosoft-ai/SMACC2/issues/645>`_)\n* Contributors: Brett Aldrich, Pablo Iñigo Blasco\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_ros2_timer_unit_test_1/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_cl_ros2_timer_unit_test_1)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(include\n                    ${smacc2_INCLUDE_DIRS}\n                    ${cl_ros2_timer_INCLUDE_DIRS})\n\nadd_executable(${PROJECT_NAME}_node\n                src/sm_cl_ros2_timer_unit_test_1/sm_cl_ros2_timer_unit_test_1_node.cpp)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node smacc2)\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(DIRECTORY\n  config\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n        ${PROJECT_NAME}_node\n        DESTINATION lib/${PROJECT_NAME})\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_ros2_timer_unit_test_1/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ![sm_cl_ros2_timer_unit_test_1](docs/SmClRos2TimerUnitTest1_2025-9-15_56482.svg)\n\n <h2>Description</h2> A completely minimal state machine example.<br></br>\n\n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n<h2>Operating Instructions</h2>\nAfter you build, remember to source the workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_cl_ros2_timer_unit_test_1 sm_cl_ros2_timer_unit_test_1.py\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>.\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_ros2_timer_unit_test_1/config/sm_cl_ros2_timer_unit_test_1_config.yaml",
    "content": "global_parameter_server:\n    ros__parameters:\n        signal_detector_loop_freq: 200\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_ros2_timer_unit_test_1/include/sm_cl_ros2_timer_unit_test_1/orthogonals/or_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <chrono>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace sm_cl_ros2_timer_unit_test_1\n{\nusing namespace std::chrono_literals;\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  void onInitialize() override { auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(1s); }\n};\n}  // namespace sm_cl_ros2_timer_unit_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_ros2_timer_unit_test_1/include/sm_cl_ros2_timer_unit_test_1/sm_cl_ros2_timer_unit_test_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <cl_ros2_timer/components/cp_timer_listener_1.hpp>\n\n//CLIENT BEHAVIORS\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_loop.hpp>\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n\n// ORTHOGONALS\n#include \"orthogonals/or_timer.hpp\"\n\nusing namespace boost;\nusing namespace smacc2;\n\nnamespace sm_cl_ros2_timer_unit_test_1\n{\n//STATE\nclass State1;\nclass State2;\n\n//--------------------------------------------------------------------\n//STATE_MACHINE\nstruct SmClRos2TimerUnitTest1 : public smacc2::SmaccStateMachineBase<SmClRos2TimerUnitTest1, State1>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  virtual void onInitialize() override { this->createOrthogonal<OrTimer>(); }\n};\n\n}  // namespace sm_cl_ros2_timer_unit_test_1\n\n#include \"states/st_state_1.hpp\"\n#include \"states/st_state_2.hpp\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_ros2_timer_unit_test_1/include/sm_cl_ros2_timer_unit_test_1/states/st_state_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_ros2_timer_unit_test_1\n{\nusing namespace cl_ros2_timer;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct State1 : smacc2::SmaccState<State1, SmClRos2TimerUnitTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State2, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownLoop>(3);  // EvTimer triggers each 3 client ticks\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);  // EvTimer triggers once at 5 client ticks\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"runtimeConfigure() firing\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"onEntry() firing\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"onExit() firing\"); }\n};\n}  // namespace sm_cl_ros2_timer_unit_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_ros2_timer_unit_test_1/include/sm_cl_ros2_timer_unit_test_1/states/st_state_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_cl_ros2_timer_unit_test_1\n{\n// STATE DECLARATION\nstruct State2 : smacc2::SmaccState<State2, SmClRos2TimerUnitTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, State1, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(5);  // EvTimer triggers once at 5 client ticks\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"runtimeConfigure() firing\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"onEntry() firing\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"onExit() firing\"); }\n};\n}  // namespace sm_cl_ros2_timer_unit_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_ros2_timer_unit_test_1/launch/sm_cl_ros2_timer_unit_test_1.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef generate_launch_description():\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_cl_ros2_timer_unit_test_1\",\n                executable=\"sm_cl_ros2_timer_unit_test_1_node\",\n                output=\"screen\",\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            )\n        ]\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_ros2_timer_unit_test_1/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_cl_ros2_timer_unit_test_1</name>\n  <version>3.0.1</version>\n  <description>The sm_cl_ros2_timer_unit_test_1 package</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>smacc2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_cl_ros2_timer_unit_test_1/src/sm_cl_ros2_timer_unit_test_1/sm_cl_ros2_timer_unit_test_1_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_cl_ros2_timer_unit_test_1/sm_cl_ros2_timer_unit_test_1.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_cl_ros2_timer_unit_test_1::SmClRos2TimerUnitTest1>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_modbus_tcp_relay_test_1)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(cl_modbus_tcp_relay REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(include\n                    ${smacc2_INCLUDE_DIRS}\n                    ${cl_modbus_tcp_relay_INCLUDE_DIRS})\n\nadd_executable(${PROJECT_NAME}_node\n                src/sm_modbus_tcp_relay_test_1/sm_modbus_tcp_relay_test_1_node.cpp)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_modbus_tcp_relay_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node smacc2 cl_modbus_tcp_relay)\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(DIRECTORY\n  config\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n        ${PROJECT_NAME}_node\n        DESTINATION lib/${PROJECT_NAME})\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/README.md",
    "content": "# sm_modbus_tcp_relay_test_1\n\nTest state machine for the `cl_modbus_tcp_relay` SMACC2 client library. This state machine exercises all relay behaviors to verify proper operation.\n\n## Overview\n\nThis state machine connects to a Waveshare 8-Channel POE ETH Relay via Modbus TCP and tests all available client behaviors:\n\n1. **CbRelayOn** - Turn on a single channel\n2. **CbRelayOff** - Turn off a single channel\n3. **CbAllRelaysOn** - Turn on all channels\n4. **CbAllRelaysOff** - Turn off all channels\n5. **CbRelayStatus** - Read channel status\n\n## State Flow\n\n```\nStConnect ─► StConnected ─► StRelayOn ─► StRelayOff ─► StAllOn ─► StAllOff ─► StReadStatus ─► StComplete\n    ▲                           │             │           │           │            │\n    └───────────────────────────┴─────────────┴───────────┴───────────┴────────────┘\n                              (EvConnectionLost returns to StConnect)\n```\n\n### State Descriptions\n\n| State | Description |\n|-------|-------------|\n| `StConnect` | Waits for Modbus TCP connection to establish |\n| `StConnected` | Connection established, transitions to relay tests |\n| `StRelayOn` | Turns ON channel 1 |\n| `StRelayOff` | Turns OFF channel 1 |\n| `StAllOn` | Turns ON all 8 channels |\n| `StAllOff` | Turns OFF all 8 channels |\n| `StReadStatus` | Reads status of all channels |\n| `StComplete` | Test complete, displays results |\n\n## Configuration\n\nEdit `config/sm_modbus_tcp_relay_test_1_config.yaml`:\n\n```yaml\nsm_modbus_tcp_relay_test_1:\n  ros__parameters:\n    signal_detector_loop_freq: 20\n\n    modbus_relay:\n      ip_address: \"192.168.1.254\"    # Your relay board IP\n      port: 502                       # Modbus TCP port\n      slave_id: 1                     # Modbus slave ID\n      heartbeat_interval_ms: 1000     # Connection monitoring interval\n      connect_on_init: true           # Auto-connect on startup\n```\n\n## Dependencies\n\n- `cl_modbus_tcp_relay` - The Modbus TCP relay client library\n- `smacc2` - SMACC2 framework\n\n### System Dependencies\n\n```bash\nsudo apt install libmodbus-dev\n```\n\n## Building\n\n```bash\n# Build both packages\ncolcon build --packages-select cl_modbus_tcp_relay sm_modbus_tcp_relay_test_1\n```\n\n## Running\n\n### Prerequisites\n\n1. Ensure the relay board is powered and connected to the network\n2. Verify network connectivity to the relay (default: 192.168.1.254)\n\n### Manual Connectivity Test (Optional)\n\nBefore running the state machine, you can verify connectivity with mbpoll:\n\n```bash\n# Install mbpoll if not already installed\nsudo apt install mbpoll\n\n# Test connection by reading all coil states\nmbpoll -m tcp -a 1 -t 0 -r 1 -c 8 192.168.1.254\n```\n\n### Launch the Test\n\n```bash\nsource install/setup.bash\nros2 launch sm_modbus_tcp_relay_test_1 sm_modbus_tcp_relay_test_1.launch.py\n```\n\n### Expected Output\n\n```\n[INFO] [SmModbusTcpRelayTest1]: onInitialize\n[INFO] [CpModbusConnection]: Config: 192.168.1.254:502 (slave=1, heartbeat=1000ms)\n[INFO] [CpModbusConnection]: Connected to Modbus TCP device\n[INFO] [StConnect]: Waiting for Modbus connection...\n[INFO] [StConnect]: Connection established!\n[INFO] [StConnected]: Connected! Running relay tests...\n[INFO] [StRelayOn]: Turning ON relay channel 1...\n[INFO] [CpModbusRelay]: Write coil 1 = ON: success\n[INFO] [StRelayOff]: Turning OFF relay channel 1...\n[INFO] [CpModbusRelay]: Write coil 1 = OFF: success\n[INFO] [StAllOn]: Turning ON all relays...\n[INFO] [CpModbusRelay]: Write all coils ON: success\n[INFO] [StAllOff]: Turning OFF all relays...\n[INFO] [CpModbusRelay]: Write all coils OFF: success\n[INFO] [StReadStatus]: Reading relay status...\n[INFO] [CpModbusRelay]: Read all coils: 0x00\n[INFO] ========================================\n[INFO]   cl_modbus_tcp_relay TEST COMPLETE!\n[INFO] ========================================\n[INFO] Test results:\n[INFO]   [PASS] CbRelayOn(1) - Single channel ON\n[INFO]   [PASS] CbRelayOff(1) - Single channel OFF\n[INFO]   [PASS] CbAllRelaysOn - All channels ON\n[INFO]   [PASS] CbAllRelaysOff - All channels OFF\n[INFO]   [PASS] CbRelayStatus - Read all statuses\n[INFO] State machine will remain in StComplete.\n[INFO] Press Ctrl-C to exit.\n[INFO] ========================================\n```\n\n## Monitoring\n\n### State Machine Status\n\n```bash\nros2 topic echo /sm_modbus_tcp_relay_test_1/smacc/status\n```\n\n### State Transitions\n\n```bash\nros2 topic echo /sm_modbus_tcp_relay_test_1/smacc/transition_log\n```\n\n## Troubleshooting\n\n### Connection Failed\n\nIf the state machine cannot connect:\n\n1. **Verify network connectivity**:\n   ```bash\n   ping 192.168.1.254\n   ```\n\n2. **Check firewall settings**:\n   ```bash\n   # Port 502 must be accessible\n   nc -zv 192.168.1.254 502\n   ```\n\n3. **Test with mbpoll**:\n   ```bash\n   mbpoll -m tcp -a 1 -t 0 -r 1 -c 8 192.168.1.254\n   ```\n\n4. **Check IP address in config**: Ensure the `ip_address` parameter matches your relay board\n\n### Connection Lost During Test\n\nThe state machine handles connection loss automatically:\n- If connection is lost in any state, it transitions back to `StConnect`\n- The heartbeat mechanism monitors connection health every 1000ms (configurable)\n\n### Relay Not Responding\n\n1. **Verify slave ID**: Some relay boards use different slave IDs (0, 1, 254, etc.)\n2. **Check power supply**: Ensure the relay board has adequate power\n3. **Reset the relay board**: Power cycle the device\n\n## Files\n\n```\nsm_modbus_tcp_relay_test_1/\n├── config/\n│   └── sm_modbus_tcp_relay_test_1_config.yaml\n├── include/sm_modbus_tcp_relay_test_1/\n│   ├── orthogonals/\n│   │   └── or_relay.hpp\n│   ├── states/\n│   │   ├── st_connect.hpp\n│   │   ├── st_connected.hpp\n│   │   ├── st_relay_on.hpp\n│   │   ├── st_relay_off.hpp\n│   │   ├── st_all_on.hpp\n│   │   ├── st_all_off.hpp\n│   │   ├── st_read_status.hpp\n│   │   └── st_complete.hpp\n│   └── sm_modbus_tcp_relay_test_1.hpp\n├── launch/\n│   └── sm_modbus_tcp_relay_test_1.launch.py\n├── src/sm_modbus_tcp_relay_test_1/\n│   └── sm_modbus_tcp_relay_test_1.cpp\n├── CMakeLists.txt\n├── package.xml\n└── README.md\n```\n\n## License\n\nApache-2.0\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/config/sm_modbus_tcp_relay_test_1_config.yaml",
    "content": "sm_modbus_tcp_relay_test_1:\n  ros__parameters:\n    # Signal detector frequency\n    signal_detector_loop_freq: 20\n\n    # Modbus relay configuration\n    modbus_relay:\n      ip_address: \"192.168.1.254\"\n      port: 502\n      slave_id: 1\n      heartbeat_interval_ms: 1000\n      connect_on_init: true\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/include/sm_modbus_tcp_relay_test_1/orthogonals/or_relay.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_modbus_tcp_relay/cl_modbus_tcp_relay.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace sm_modbus_tcp_relay_test_1\n{\n\nclass OrRelay : public smacc2::Orthogonal<OrRelay>\n{\npublic:\n  void onInitialize() override\n  {\n    // Create the Modbus TCP relay client\n    // Configuration is loaded from YAML parameters\n    auto client = this->createClient<cl_modbus_tcp_relay::ClModbusTcpRelay>();\n  }\n};\n\n}  // namespace sm_modbus_tcp_relay_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/include/sm_modbus_tcp_relay_test_1/sm_modbus_tcp_relay_test_1.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_modbus_tcp_relay/cl_modbus_tcp_relay.hpp>\n\n// CLIENT BEHAVIORS\n#include <cl_modbus_tcp_relay/client_behaviors/cb_relay_on.hpp>\n#include <cl_modbus_tcp_relay/client_behaviors/cb_relay_off.hpp>\n#include <cl_modbus_tcp_relay/client_behaviors/cb_all_relays_on.hpp>\n#include <cl_modbus_tcp_relay/client_behaviors/cb_all_relays_off.hpp>\n#include <cl_modbus_tcp_relay/client_behaviors/cb_relay_status.hpp>\n\n// ORTHOGONALS\n#include \"orthogonals/or_relay.hpp\"\n\nusing namespace boost;\nusing namespace smacc2;\n\nnamespace sm_modbus_tcp_relay_test_1\n{\n\n// Forward declarations for states\nclass StConnect;\nclass StConnected;\nclass StRelayOn;\nclass StRelayOff;\nclass StAllOn;\nclass StAllOff;\nclass StReadStatus;\nclass StComplete;\n\n//--------------------------------------------------------------------\n// STATE MACHINE\nstruct SmModbusTcpRelayTest1\n  : public smacc2::SmaccStateMachineBase<SmModbusTcpRelayTest1, StConnect>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  virtual void onInitialize() override\n  {\n    this->createOrthogonal<OrRelay>();\n  }\n};\n\n}  // namespace sm_modbus_tcp_relay_test_1\n\n#include \"states/st_connect.hpp\"\n#include \"states/st_connected.hpp\"\n#include \"states/st_relay_on.hpp\"\n#include \"states/st_relay_off.hpp\"\n#include \"states/st_all_on.hpp\"\n#include \"states/st_all_off.hpp\"\n#include \"states/st_read_status.hpp\"\n#include \"states/st_complete.hpp\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/include/sm_modbus_tcp_relay_test_1/states/st_all_off.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_modbus_tcp_relay_test_1\n{\n\nusing namespace cl_modbus_tcp_relay;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StAllOff : smacc2::SmaccState<StAllOff, SmModbusTcpRelayTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // If connection is lost, go back to StConnect\n    Transition<EvConnectionLost<CpModbusConnection, OrRelay>, StConnect, ABORT>,\n    // After reading status, go to StComplete\n    Transition<EvCbSuccess<CbRelayStatus, OrRelay>, StComplete, SUCCESS>\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Read all relay statuses\n    configure_orthogonal<OrRelay, CbRelayStatus>();\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"[StAllOff] runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"[StAllOff] All relays are OFF, reading status...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"[StAllOff] onExit()\");\n  }\n};\n\n}  // namespace sm_modbus_tcp_relay_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/include/sm_modbus_tcp_relay_test_1/states/st_all_on.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_modbus_tcp_relay_test_1\n{\n\nusing namespace cl_modbus_tcp_relay;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StAllOn : smacc2::SmaccState<StAllOn, SmModbusTcpRelayTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // If connection is lost, go back to StConnect\n    Transition<EvConnectionLost<CpModbusConnection, OrRelay>, StConnect, ABORT>,\n    // On success turning all off, transition to StAllOff\n    Transition<EvCbSuccess<CbAllRelaysOff, OrRelay>, StAllOff, SUCCESS>\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Turn off all relays\n    configure_orthogonal<OrRelay, CbAllRelaysOff>();\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"[StAllOn] runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"[StAllOn] All relays are ON, now turning ALL OFF\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"[StAllOn] onExit()\");\n  }\n};\n\n}  // namespace sm_modbus_tcp_relay_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/include/sm_modbus_tcp_relay_test_1/states/st_complete.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_modbus_tcp_relay_test_1\n{\n\nusing namespace cl_modbus_tcp_relay;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StComplete : smacc2::SmaccState<StComplete, SmModbusTcpRelayTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // If connection is lost, go back to StConnect\n    Transition<EvConnectionLost<CpModbusConnection, OrRelay>, StConnect, ABORT>\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // No behaviors - final state\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"[StComplete] runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"========================================\");\n    RCLCPP_INFO(getLogger(), \"  cl_modbus_tcp_relay TEST COMPLETE!\");\n    RCLCPP_INFO(getLogger(), \"========================================\");\n    RCLCPP_INFO(getLogger(), \"Test results:\");\n    RCLCPP_INFO(getLogger(), \"  [PASS] CbRelayOn(1) - Single channel ON\");\n    RCLCPP_INFO(getLogger(), \"  [PASS] CbRelayOff(1) - Single channel OFF\");\n    RCLCPP_INFO(getLogger(), \"  [PASS] CbAllRelaysOn - All channels ON\");\n    RCLCPP_INFO(getLogger(), \"  [PASS] CbAllRelaysOff - All channels OFF\");\n    RCLCPP_INFO(getLogger(), \"  [PASS] CbRelayStatus - Read all statuses\");\n    RCLCPP_INFO(getLogger(), \"State machine will remain in StComplete.\");\n    RCLCPP_INFO(getLogger(), \"Press Ctrl-C to exit.\");\n    RCLCPP_INFO(getLogger(), \"========================================\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"[StComplete] onExit()\");\n  }\n};\n\n}  // namespace sm_modbus_tcp_relay_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/include/sm_modbus_tcp_relay_test_1/states/st_connect.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_modbus_tcp_relay_test_1\n{\n\nusing namespace cl_modbus_tcp_relay;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StConnect : smacc2::SmaccState<StConnect, SmModbusTcpRelayTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // When connection is restored, transition to StConnected\n    Transition<EvConnectionRestored<CpModbusConnection, OrRelay>, StConnected, SUCCESS>\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // No client behaviors in this initial state\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"[StConnect] runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"[StConnect] Waiting for Modbus connection...\");\n\n    // Check if already connected (connect_on_init may have succeeded)\n    cl_modbus_tcp_relay::ClModbusTcpRelay * client;\n    this->requiresClient(client);\n\n    if (client && client->getConnectionComponent())\n    {\n      auto connection = client->getConnectionComponent();\n      if (connection->isConnected())\n      {\n        RCLCPP_INFO(getLogger(), \"[StConnect] Already connected! Posting restored event.\");\n        this->postEvent<EvConnectionRestored<CpModbusConnection, OrRelay>>();\n      }\n    }\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"[StConnect] onExit()\");\n  }\n};\n\n}  // namespace sm_modbus_tcp_relay_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/include/sm_modbus_tcp_relay_test_1/states/st_connected.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_modbus_tcp_relay_test_1\n{\n\nusing namespace cl_modbus_tcp_relay;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StConnected : smacc2::SmaccState<StConnected, SmModbusTcpRelayTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // If connection is lost, go back to StConnect\n    Transition<EvConnectionLost<CpModbusConnection, OrRelay>, StConnect, ABORT>,\n    // Auto-transition to StRelayOn after entry\n    Transition<EvCbSuccess<CbRelayOn, OrRelay>, StRelayOn, SUCCESS>\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Turn on relay channel 1 as a test\n    configure_orthogonal<OrRelay, CbRelayOn>(1);\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"[StConnected] runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"[StConnected] Connected to Modbus relay!\");\n\n    // Get connection info\n    cl_modbus_tcp_relay::ClModbusTcpRelay * client;\n    this->requiresClient(client);\n\n    if (client && client->getConnectionComponent())\n    {\n      auto connection = client->getConnectionComponent();\n      RCLCPP_INFO(\n        getLogger(), \"[StConnected] Connection details: %s:%d (slave=%d)\",\n        connection->getIpAddress().c_str(),\n        connection->getPort(),\n        connection->getSlaveId());\n    }\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"[StConnected] onExit()\");\n  }\n};\n\n}  // namespace sm_modbus_tcp_relay_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/include/sm_modbus_tcp_relay_test_1/states/st_read_status.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_modbus_tcp_relay_test_1\n{\n\nusing namespace cl_modbus_tcp_relay;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StReadStatus : smacc2::SmaccState<StReadStatus, SmModbusTcpRelayTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // If connection is lost, go back to StConnect\n    Transition<EvConnectionLost<CpModbusConnection, OrRelay>, StConnect, ABORT>,\n    // After reading status, go to StComplete\n    Transition<EvCbSuccess<CbRelayStatus, OrRelay>, StComplete, SUCCESS>\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Read all relay statuses\n    configure_orthogonal<OrRelay, CbRelayStatus>();\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"[StReadStatus] runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"[StReadStatus] Reading relay status...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"[StReadStatus] onExit()\");\n  }\n};\n\n}  // namespace sm_modbus_tcp_relay_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/include/sm_modbus_tcp_relay_test_1/states/st_relay_off.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_modbus_tcp_relay_test_1\n{\n\nusing namespace cl_modbus_tcp_relay;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StRelayOff : smacc2::SmaccState<StRelayOff, SmModbusTcpRelayTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // If connection is lost, go back to StConnect\n    Transition<EvConnectionLost<CpModbusConnection, OrRelay>, StConnect, ABORT>,\n    // On success turning all on, transition to StAllOn\n    Transition<EvCbSuccess<CbAllRelaysOn, OrRelay>, StAllOn, SUCCESS>\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Turn on all relays\n    configure_orthogonal<OrRelay, CbAllRelaysOn>();\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"[StRelayOff] runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"[StRelayOff] Relay channel 1 is OFF, now turning ALL ON\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"[StRelayOff] onExit()\");\n  }\n};\n\n}  // namespace sm_modbus_tcp_relay_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/include/sm_modbus_tcp_relay_test_1/states/st_relay_on.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_modbus_tcp_relay_test_1\n{\n\nusing namespace cl_modbus_tcp_relay;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StRelayOn : smacc2::SmaccState<StRelayOn, SmModbusTcpRelayTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // If connection is lost, go back to StConnect\n    Transition<EvConnectionLost<CpModbusConnection, OrRelay>, StConnect, ABORT>,\n    // On success, transition to StRelayOff\n    Transition<EvCbSuccess<CbRelayOff, OrRelay>, StRelayOff, SUCCESS>,\n    // On failure, stay here (could add error handling state)\n    Transition<EvCbFailure<CbRelayOff, OrRelay>, StConnect, ABORT>\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Turn off relay channel 1 (toggle test)\n    configure_orthogonal<OrRelay, CbRelayOff>(1);\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"[StRelayOn] runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"[StRelayOn] Relay channel 1 is ON, will turn OFF\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"[StRelayOn] onExit()\");\n  }\n};\n\n}  // namespace sm_modbus_tcp_relay_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/launch/sm_modbus_tcp_relay_test_1.launch.py",
    "content": "# Copyright 2024 RobosoftAI Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\n\nfrom ament_index_python.packages import get_package_share_directory\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef generate_launch_description():\n    config_file = os.path.join(\n        get_package_share_directory(\"sm_modbus_tcp_relay_test_1\"),\n        \"config\",\n        \"sm_modbus_tcp_relay_test_1_config.yaml\",\n    )\n\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_modbus_tcp_relay_test_1\",\n                executable=\"sm_modbus_tcp_relay_test_1_node\",\n                name=\"sm_modbus_tcp_relay_test_1\",\n                output=\"screen\",\n                parameters=[config_file],\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            )\n        ]\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_modbus_tcp_relay_test_1</name>\n  <version>1.0.0</version>\n  <description>Test state machine for cl_modbus_tcp_relay client library</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>cl_modbus_tcp_relay</depend>\n  <depend>smacc2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_modbus_tcp_relay_test_1/src/sm_modbus_tcp_relay_test_1/sm_modbus_tcp_relay_test_1_node.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_modbus_tcp_relay_test_1/sm_modbus_tcp_relay_test_1.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_modbus_tcp_relay_test_1::SmModbusTcpRelayTest1>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/CHANGELOG.rst",
    "content": "Changelog for package sm_multi_stage_1\n=======================================\n\n2.3.16 (2023-07-16)\n-------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2`\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for ros buildfarm issue\n  - Further work on buildfarm issue\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n- Contributors: brettpac, pabloinigoblasco\n\n2.3.6 (2023-03-12)\n------------------\n\n1.22.1 (2022-11-09)\n-------------------\n### Added\n- Pre-release\n- Contributors: pabloinigoblasco\n\n### Changed\n- Feature/galactic rolling merge (#288)\n  - Reverted \"Ignore all packages except smacc2 and smacc2_msgs\"\n  - Updated description table\n  - Updated table\n  - Copied initial docs\n  - Dockerfile with ROS distro as argument\n  - Opened new folder for additional tracing contents\n  - Deleted tracing directory\n  - Moved tracing.md to tracing directory\n  - Added setupTracing.sh for necessary package installation and tracing group configuration\n  - Removed manual installation of ros-rolling-ros2trace, now automated in setupTracing.sh\n  - Created alternative ManualTracing\n  - Added new sm markdowns\n  - Added Dockerfile for Rolling and Galactic\n  - Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n  - Renamed tracing events\n  - Bug fixes in smacc2 component\n  - Updated mentions of SMACC/ROS to SMACC2/ROS2\n  - Progress on navigation rolling\n  - Added smacc2_performance_tools\n  - Performance tests improvements\n  - Format cleanup for sm_respira_1\n  - Optimized dependencies in move_base_z_planners_common\n  - Renamed event generator library\n  - Minor formatting changes\n  - Added galactic CI setup and renamed rolling files (#58)\n  - Fixed source CI and corrected README overview (#62)\n  - Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69)\n  - Updated doxygen links (#70)\n  - More Readme Updates (#72)\n  - More Readme (#74)\n  - Created new sm from sm_respira_1 (#76)\n  - Feature/core and navigation fixes (#78)\n  - Several core improvements during navigation testing\n  - Progress in aws navigation demo\n  - Feature/aws demo progress (#80)\n  - Format improvements\n  - Feature/aws demo progress (#80)\n  - sm_advanced_recovery_1 reworked (#83)\n  - More sm_advanced_recovery_1 work (#85)\n  - sm_advanced_recovery_1 round 4 (#86)\n  - sm_atomic_performance_test_a_2\n  - sm_atomic_performance_test_a_1\n  - sm_atomic_performance_test_c_1 (#88)\n  - Modifying sm_atomic_performance_test_a_2 (#89)\n  - sm_multi_stage_1\n  - Update README.md\n  - Wait topic message client behavior (#81)\n\n0.1.0 (2022-01-01)\n---------------------------\n\n### Added\n- Feature/diverse improvements navigation performance (#117)\n  - Additional linting and formatting\n- Feature/slam toggle and smacc deep history (#122)\n  - Progress in navigation, slam toggle client behaviors, and slam_toolbox components\n  - Introducing slam pausing/resuming functionality for testing sm_dance_bot\n- Feature/dance bot s pattern (#128)\n  - Polishing sm_dance_bot and s-pattern\n- First working version of sm template and template generator (#127)\n- Feature/sm dance bot refine (#131)\n- Feature/sm dance bot refine 2 (#132)\n  - Build fix\n- Feature/nav2z renaming (#144)\n  - Navigation 2 stack renaming\n- Add SM Atomic SM generator (#143)\n- Rolling Docker environment to be executed from any environment (#154)\n- Feature/sm dance bot strikes back refactoring (#152)\n- Feature/migration moveit client (#151)\n  - Initial migration to smacc2\n  - Progressing in the moveit migration testing\n- Initial state machine transition timestamp (#165)\n- Add QOS durability to SmaccPublisherClient (#163)\n- Feature/testing moveit behaviors (#167)\n- Sm_pubsub_1 (#169)\n- Sm_pubsub_1 part 2 (#170)\n- Sm_advanced_recovery_1 renaming (#171)\n- Sm_multi_stage_1 reworking (#172)\n  - Multistage modes, sequences, steps, and finishing touches\n- Feature/aws navigation sm dance bot (#174)\n  - Progress on aws navigation and refactorings on navigation clients and behaviors\n\n### Changed\n- Move method after the method it calls to prevent recursion (#126)\n- Resolve compile warnings (#137)\n- Minor navigation improvements (#141)\n- Using local action messages (#139)\n- Removing parameters smacc (#147)\n- Update package list (#142)\n- Remove node creation and create only a logger (#149)\n- Warehouse2 progress (#179)\n\n### Fixed\n- Minor tuning to mitigate overshot issue cases (#133)\n- Fix CI: format fix python version (#148)\n- Fixing broken master build (#167)\n- Fixing broken build (#174)\n\n### Removed\n- Remove merge markers from a python file (#119)\n- Removing sm_dance_bot_msgs (#144)\n- Removing test from main moveit cmake (#151)\n- Removing parameters smacc (#147)\n\n### Miscellaneous\n- Added SVGs to READMEs of atomic, dance_bot, and others (#140)\n- Added remaining SVGs to READMEs (#145)\n- Update README (#164)\n- More readme updates (#164)\n- Noticed launch command was incorrect in README.md, fixed launch command for sm_dance_bot_strikes_back, and removed some comments (#147)\n- Precommit cleanup\n- Workflows update\n- Pending references\n- Repos dependency\n- Docker refactoring\n- Minor format issues (#134)\n- Minor tweaks (#130)\n- Minor (#124)\n- Minor\n- Noticed typo\n- Finnaly > Finally\n\nCo-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\nCo-authored-by: pabloinigoblasco <pablo@ibrobotics.com>\nCo-authored-by: DecDury <declandury@gmail.com>\nCo-authored-by: Denis Štogl <destogl@users.noreply.github.com>\nCo-authored-by: Denis Štogl <denis@stogl.de>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.8)\nproject(sm_multi_stage_1)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(MAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic -std=c++17)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(rclcpp)\nfind_package(smacc2)\nfind_package(std_msgs)\nfind_package(sr_all_events_go)\nfind_package(cl_ros2_timer)\nfind_package(cl_keyboard)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\nset(dependencies\n  rclcpp\n  smacc2\n  std_msgs\n  sr_all_events_go\n  cl_ros2_timer\n  cl_keyboard\n)\n\ninclude_directories(include\n  ${rclcpp_INCLUDE_DIRS}\n  ${smacc2_INCLUDE_DIRS}\n  ${cl_ros2_timer_INCLUDE_DIRS}\n  ${cl_keyboard_INCLUDE_DIRS}\n  ${std_msgs_INCLUDE_DIRS}\n  ${sr_all_events_go_INCLUDE_DIRS}\n)\n\nadd_executable(${PROJECT_NAME}_node src/sm_multi_stage_1_node.cpp)\n\nament_target_dependencies(${PROJECT_NAME}_node ${dependencies})\nament_export_include_directories(include)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${rclcpp_LIBRARIES}\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${cl_keyboard_LIBRARIES}\n  ${std_msgs_LIBRARIES}\n  ${sr_all_events_go_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_package()\n\ninstall(TARGETS ${PROJECT_NAME}_node\n  ARCHIVE DESTINATION lib                 # static libraries\n  LIBRARY DESTINATION lib                 # dynamic libraries\n  RUNTIME DESTINATION lib/${PROJECT_NAME} # executables\n)\n\ninstall(\n  DIRECTORY launch/\n  DESTINATION share/${PROJECT_NAME}/launch\n  FILES_MATCHING\n  PATTERN \"*.launch\"\n  PATTERN \"*.launch.py\"\n  PATTERN \"*.py\"\n)\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ![sm_multi_stage_1](docs/SmMultiStage1_2021-11-29_0916.svg)\n\n <h2>Description</h2> A large multi stage state machine that demonstrates that the NxN problem is not as formidable as some would have you believe.<br></br>\n\n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n<h2>Operating Instructions</h2>\nAfter you build, remember to source the workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_multi_stage_1 sm_multi_stage_1.py\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>.\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/config/sm_multi_stage_1_config.yaml",
    "content": "SmMultiStage1:\n   signal_detector_loop_freq: 20\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/clients/cl_subscriber/cl_subscriber.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <smacc2/client_bases/smacc_subscriber_client.hpp>\n#include <std_msgs/msg/u_int16.hpp>\n\nnamespace sm_multi_stage_1\n{\nnamespace cl_subscriber\n{\nclass ClSubscriber : public smacc2::client_bases::SmaccSubscriberClient<std_msgs::msg::UInt16>\n{\n};\n}  // namespace cl_subscriber\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/clients/cl_subscriber/client_behaviors/cb_default_subscriber_behavior.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <sm_multi_stage_1/clients/cl_subscriber/cl_subscriber.hpp>\n\nnamespace sm_multi_stage_1\n{\nnamespace cl_subscriber\n{\nclass CbDefaultSubscriberBehavior : public smacc2::SmaccClientBehavior\n{\npublic:\n  typedef std_msgs::msg::UInt16 TMessageType;\n  //-------------------------------------------------------------------------------\n  void onEntry() {}\n};\n}  // namespace cl_subscriber\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/clients/cl_subscriber/client_behaviors/cb_watchdog_subscriber_behavior.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <sm_multi_stage_1/clients/cl_subscriber/cl_subscriber.hpp>\n\nnamespace sm_multi_stage_1\n{\nnamespace cl_subscriber\n{\nclass CbWatchdogSubscriberBehavior : public smacc2::SmaccClientBehavior\n{\npublic:\n  typedef std_msgs::msg::UInt16 TMessageType;\n\n  void onEntry() {}\n};\n}  // namespace cl_subscriber\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/mode_states/ms_mode_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nclass MsMode1 : public smacc2::SmaccState<MsMode1, SmMultiStage1, Mode1StObserve>\n{\npublic:\n  using SmaccState::SmaccState;\n\n// TRANSITION TABLE\ntypedef mpl::list<\n\n  Transition<EvLoopEnd<Mode1SequenceALoop>, MsMode2>,\n  Transition<EvLoopEnd<Mode1SequenceBLoop>, MsMode2>\n\n    >reactions;\n\n\n// STATE VARIABLES\n\n  // AC Cycle Loop\n  static constexpr int ztotal_iterations() { return 1; }\n  int ziteration_count = 0;\n\n  // CMV Cycle Loop\n  static constexpr int ytotal_iterations() { return 1; }\n  int yiteration_count = 0;\n\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/mode_states/ms_mode_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nclass MsMode2 : public smacc2::SmaccState<MsMode2, SmMultiStage1, Mode2StObserve>\n{\npublic:\n  using SmaccState::SmaccState;\n\n// TRANSITION TABLE\ntypedef mpl::list<\n\n  Transition<EvLoopEnd<Mode2SequenceALoop>, MsMode3>,\n  Transition<EvLoopEnd<Mode2SequenceBLoop>, MsMode3>\n\n  >reactions;\n\n\n// STATE VARIABLES\n\n  // AC Cycle Loop\n  static constexpr int ztotal_iterations() { return 1; }\n  int ziteration_count = 0;\n\n  // CMV Cycle Loop\n  static constexpr int ytotal_iterations() { return 1; }\n  int yiteration_count = 0;\n\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/mode_states/ms_mode_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nclass MsMode3 : public smacc2::SmaccState<MsMode3, SmMultiStage1, Mode3StObserve>\n{\npublic:\n  using SmaccState::SmaccState;\n\n// TRANSITION TABLE\ntypedef mpl::list<\n\n  Transition<EvLoopEnd<Mode3SequenceALoop>, MsMode4>,\n  Transition<EvLoopEnd<Mode3SequenceBLoop>, MsMode4>\n\n    >reactions;\n\n\n// STATE VARIABLES\n\n  // AC Cycle Loop\n  static constexpr int ztotal_iterations() { return 1; }\n  int ziteration_count = 0;\n\n  // CMV Cycle Loop\n  static constexpr int ytotal_iterations() { return 1; }\n  int yiteration_count = 0;\n\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/mode_states/ms_mode_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nclass MsMode4 : public smacc2::SmaccState<MsMode4, SmMultiStage1, Mode4StObserve>\n{\npublic:\n  using SmaccState::SmaccState;\n\n// TRANSITION TABLE\ntypedef mpl::list<\n\n  Transition<EvLoopEnd<Mode4SequenceALoop>, MsMode5>,\n  Transition<EvLoopEnd<Mode4SequenceBLoop>, MsMode5>,\n  Transition<EvLoopEnd<Mode4SequenceCLoop>, MsMode5>,\n  Transition<EvLoopEnd<Mode4SequenceDLoop>, MsMode5>\n\n    >reactions;\n\n\n// STATE VARIABLES\n\n  // AC Cycle Loop\n  static constexpr int ztotal_iterations() { return 1; }\n  int ziteration_count = 0;\n\n  // CMV Cycle Loop\n  static constexpr int ytotal_iterations() { return 1; }\n  int yiteration_count = 0;\n\n  // DC Cycle Loop\n  static constexpr int dtotal_iterations() { return 1; }\n  int diteration_count = 0;\n\n  // GC Cycle Loop\n  static constexpr int gtotal_iterations() { return 1; }\n  int giteration_count = 0;\n\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/mode_states/ms_mode_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nclass MsMode5 : public smacc2::SmaccState<MsMode5, SmMultiStage1, Mode5StObserve>\n{\npublic:\n  using SmaccState::SmaccState;\n\n// TRANSITION TABLE\ntypedef mpl::list<\n\n  Transition<EvLoopEnd<Mode5SequenceALoop>, MsMode1>,\n  Transition<EvLoopEnd<Mode5SequenceBLoop>, MsMode1>\n\n    >reactions;\n\n\n// STATE VARIABLES\n\n  // AC Cycle Loop\n  static constexpr int ztotal_iterations() { return 1; }\n  int ziteration_count = 0;\n\n  // CMV Cycle Loop\n  static constexpr int ytotal_iterations() { return 1; }\n  int yiteration_count = 0;\n\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/mode_states/ms_recovery_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nclass MsRecovery1 : public smacc2::SmaccState<MsRecovery1, SmMultiStage1, StRecoveryAnalyze1>\n{\npublic:\n  using SmaccState::SmaccState;\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/mode_states/ms_recovery_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nclass MsRecovery2 : public smacc2::SmaccState<MsRecovery2, SmMultiStage1, StRecoveryAnalyze2>\n{\npublic:\n  using SmaccState::SmaccState;\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/orthogonals/or_keyboard.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\nnamespace sm_multi_stage_1\n{\nclass OrKeyboard : public smacc2::Orthogonal<OrKeyboard>\n{\npublic:\n  virtual void onInitialize() override\n  {\n    auto clKeyboard = this->createClient<cl_keyboard::ClKeyboard>();\n  }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/orthogonals/or_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n\nnamespace sm_multi_stage_1\n{\nusing namespace std::chrono_literals;\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  virtual void onInitialize() override\n  {\n    auto actionclient = this->createClient<cl_ros2_timer::ClRos2Timer>(rclcpp::Duration(0.1s));\n  }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/sm_multi_stage_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n\n// ORTHOGONALS\n#include <sm_multi_stage_1/orthogonals/or_keyboard.hpp>\n#include <sm_multi_stage_1/orthogonals/or_timer.hpp>\n\nusing namespace cl_ros2_timer;\nusing namespace cl_keyboard;\n\n//CLIENT BEHAVIORS\n#include <cl_keyboard/client_behaviors/cb_default_keyboard_behavior.hpp>\n\n//#include <cl_ros2_timer/client_behaviors/cb_ros_timer.hpp>\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n\n//STATE REACTORS\n#include <sr_all_events_go/sr_all_events_go.hpp>\n\nusing namespace smacc2;\nusing namespace smacc2::state_reactors;\nusing namespace smacc2::default_events;\n\nnamespace sm_multi_stage_1\n{\n//SUPERSTATES\nclass SsMode1SequenceA;\nnamespace mode_1_sequence_a\n{\nclass StiMode1SequenceALoop;\nclass StiMode1SequenceAStep1;\nclass StiMode1SequenceAStep2;\nclass StiMode1SequenceAStep3;\nclass StiMode1SequenceAStep4;\nclass StiMode1SequenceAStep5;\nclass StiMode1SequenceAStep6;\nclass StiMode1SequenceAStep7;\nclass StiMode1SequenceAStep8;\nclass StiMode1SequenceAStep9;\n}  // namespace mode_1_sequence_a\n\nclass SsMode2SequenceA;\nnamespace mode_2_sequence_a\n{\nclass StiMode2SequenceALoop;\nclass StiMode2SequenceAStep1;\nclass StiMode2SequenceAStep2;\nclass StiMode2SequenceAStep3;\nclass StiMode2SequenceAStep4;\nclass StiMode2SequenceAStep5;\nclass StiMode2SequenceAStep6;\nclass StiMode2SequenceAStep7;\nclass StiMode2SequenceAStep8;\nclass StiMode2SequenceAStep9;\n}  // namespace mode_2_sequence_a\n\nclass SsMode3SequenceA;\nnamespace mode_3_sequence_a\n{\nclass StiMode3SequenceALoop;\nclass StiMode3SequenceAStep1;\nclass StiMode3SequenceAStep2;\nclass StiMode3SequenceAStep3;\nclass StiMode3SequenceAStep4;\nclass StiMode3SequenceAStep5;\nclass StiMode3SequenceAStep6;\nclass StiMode3SequenceAStep7;\nclass StiMode3SequenceAStep8;\nclass StiMode3SequenceAStep9;\n}  // namespace mode_3_sequence_a\n\nclass SsMode4SequenceA;\nnamespace mode_4_sequence_a\n{\nclass StiMode4SequenceALoop;\nclass StiMode4SequenceAStep1;\nclass StiMode4SequenceAStep2;\nclass StiMode4SequenceAStep3;\nclass StiMode4SequenceAStep4;\nclass StiMode4SequenceAStep5;\nclass StiMode4SequenceAStep6;\nclass StiMode4SequenceAStep7;\nclass StiMode4SequenceAStep8;\nclass StiMode4SequenceAStep9;\n}  // namespace mode_4_sequence_a\n\nclass SsMode4SequenceC;\nnamespace mode_4_sequence_c\n{\nclass StiMode4SequenceCLoop;\nclass StiMode4SequenceCStep1;\nclass StiMode4SequenceCStep2;\nclass StiMode4SequenceCStep3;\nclass StiMode4SequenceCStep4;\nclass StiMode4SequenceCStep5;\nclass StiMode4SequenceCStep6;\nclass StiMode4SequenceCStep7;\nclass StiMode4SequenceCStep8;\nclass StiMode4SequenceCStep9;\n}  // namespace mode_4_sequence_c\n\nclass SsMode4SequenceD;\nnamespace mode_4_sequence_d\n{\nclass StiMode4SequenceDLoop;\nclass StiMode4SequenceDStep1;\nclass StiMode4SequenceDStep2;\nclass StiMode4SequenceDStep3;\nclass StiMode4SequenceDStep4;\nclass StiMode4SequenceDStep5;\nclass StiMode4SequenceDStep6;\nclass StiMode4SequenceDStep7;\nclass StiMode4SequenceDStep8;\nclass StiMode4SequenceDStep9;\n}  // namespace mode_4_sequence_d\n\nclass SsMode5SequenceA;\nnamespace mode_5_sequence_a\n{\nclass StiMode5SequenceALoop;\nclass StiMode5SequenceAStep1;\nclass StiMode5SequenceAStep2;\nclass StiMode5SequenceAStep3;\nclass StiMode5SequenceAStep4;\nclass StiMode5SequenceAStep5;\nclass StiMode5SequenceAStep6;\nclass StiMode5SequenceAStep7;\nclass StiMode5SequenceAStep8;\nclass StiMode5SequenceAStep9;\n}  // namespace mode_5_sequence_a\n\n\nclass SsMode1SequenceB;\nnamespace mode_1_sequence_b\n{\n//FORWARD DECLARATIONS OF ALL INNER STATES\nclass StiMode1SequenceBLoop;\nclass StiMode1SequenceBStep1;\nclass StiMode1SequenceBStep2;\nclass StiMode1SequenceBStep3;\nclass StiMode1SequenceBStep4;\nclass StiMode1SequenceBStep5;\nclass StiMode1SequenceBStep6;\nclass StiMode1SequenceBStep7;\nclass StiMode1SequenceBStep8;\nclass StiMode1SequenceBStep9;\n}  // namespace mode_1_sequence_b\n\nclass SsMode2SequenceB;\n\nnamespace mode_2_sequence_b\n{\n//FORWARD DECLARATIONS OF ALL INNER STATES\nclass StiMode2SequenceBLoop;\nclass StiMode2SequenceBStep1;\nclass StiMode2SequenceBStep2;\nclass StiMode2SequenceBStep3;\nclass StiMode2SequenceBStep4;\nclass StiMode2SequenceBStep5;\nclass StiMode2SequenceBStep6;\nclass StiMode2SequenceBStep7;\nclass StiMode2SequenceBStep8;\nclass StiMode2SequenceBStep9;\n}  // namespace mode_2_sequence_b\n\nclass SsMode3SequenceB;\n\nnamespace mode_3_sequence_b\n{\n//FORWARD DECLARATIONS OF ALL INNER STATES\nclass StiMode3SequenceBLoop;\nclass StiMode3SequenceBStep1;\nclass StiMode3SequenceBStep2;\nclass StiMode3SequenceBStep3;\nclass StiMode3SequenceBStep4;\nclass StiMode3SequenceBStep5;\nclass StiMode3SequenceBStep6;\nclass StiMode3SequenceBStep7;\nclass StiMode3SequenceBStep8;\nclass StiMode3SequenceBStep9;\n}  // namespace mode_3_sequence_b\n\nclass SsMode4SequenceB;\n\nnamespace mode_4_sequence_b\n{\n//FORWARD DECLARATIONS OF ALL INNER STATES\nclass StiMode4SequenceB;\nclass StiMode4SequenceBStep1;\nclass StiMode4SequenceBStep2;\nclass StiMode4SequenceBStep3;\nclass StiMode4SequenceBStep4;\nclass StiMode4SequenceBStep5;\nclass StiMode4SequenceBStep6;\nclass StiMode4SequenceBStep7;\nclass StiMode4SequenceBStep8;\nclass StiMode4SequenceBStep9;\n}  // namespace mode_4_sequence_b\n\nclass SsMode5SequenceB;\n\nnamespace mode_5_sequence_b\n{\n//FORWARD DECLARATIONS OF ALL INNER STATES\nclass StiMode5SequenceBLoop;\nclass StiMode5SequenceBStep1;\nclass StiMode5SequenceBStep2;\nclass StiMode5SequenceBStep3;\nclass StiMode5SequenceBStep4;\nclass StiMode5SequenceBStep5;\nclass StiMode5SequenceBStep6;\nclass StiMode5SequenceBStep7;\nclass StiMode5SequenceBStep8;\nclass StiMode5SequenceBStep9;\n}  // namespace mode_5_sequence_b\n\n//STATES\nclass Mode1StObserve;\nclass StRecoveryAnalyze1;\nclass StRecoveryBifurcate1;\nclass StRecoveryCalculate1;\nclass StRecoveryDeliberate1;\nclass StRecoveryEvaluate1;\nclass StRecoveryGenerate1;\nclass StRecoveryInnervate1;\n\nclass Mode2StObserve;\nclass StRecoveryAnalyze2;\nclass StRecoveryBifurcate2;\nclass StRecoveryCalculate2;\nclass StRecoveryDeliberate2;\nclass StRecoveryEvaluate2;\nclass StRecoveryGenerate2;\nclass StRecoveryInnervate2;\n\nclass Mode3StObserve;\nclass Mode4StObserve;\nclass Mode5StObserve;\n\n\nclass Mode1SequenceALoop;\nclass Mode1SequenceBLoop;\nclass Mode2SequenceALoop;\nclass Mode2SequenceBLoop;\nclass Mode3SequenceALoop;\nclass Mode3SequenceBLoop;\nclass Mode4SequenceALoop;\nclass Mode4SequenceCLoop;\nclass Mode4SequenceDLoop;\nclass Mode4SequenceBLoop;\nclass Mode5SequenceALoop;\nclass Mode5SequenceBLoop;\n\n\n//MODE STATES\nclass MsMode1;\nclass MsRecovery1;\n\n//MODE STATES\nclass MsMode2;\nclass MsRecovery2;\n\nclass MsMode3;\nclass MsMode4;\nclass MsMode5;\n\nstruct EvToDeep : sc::event<EvToDeep>\n{\n};\nstruct EvFail : sc::event<EvFail>\n{\n};\n\n// STATE MACHINE\nstruct SmMultiStage1 : public smacc2::SmaccStateMachineBase<SmMultiStage1, MsMode1>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  virtual void onInitialize() override\n  {\n    this->createOrthogonal<OrTimer>();\n    this->createOrthogonal<OrKeyboard>();\n  }\n};\n}  // namespace sm_multi_stage_1\n\n// MODE STATES\n#include <sm_multi_stage_1/mode_states/ms_recovery_1.hpp>\n#include <sm_multi_stage_1/mode_states/ms_recovery_2.hpp>\n#include <sm_multi_stage_1/mode_states/ms_mode_1.hpp>\n#include <sm_multi_stage_1/mode_states/ms_mode_2.hpp>\n#include <sm_multi_stage_1/mode_states/ms_mode_3.hpp>\n#include <sm_multi_stage_1/mode_states/ms_mode_4.hpp>\n#include <sm_multi_stage_1/mode_states/ms_mode_5.hpp>\n\n//STATES\n#include <sm_multi_stage_1/states/ms_recovery_1/st_recovery_analyze_1.hpp>\n#include <sm_multi_stage_1/states/ms_recovery_1/st_recovery_bifurcate_1.hpp>\n#include <sm_multi_stage_1/states/ms_recovery_1/st_recovery_calculate_1.hpp>\n#include <sm_multi_stage_1/states/ms_recovery_1/st_recovery_deliberate_1.hpp>\n#include <sm_multi_stage_1/states/ms_recovery_1/st_recovery_evaluate_1.hpp>\n#include <sm_multi_stage_1/states/ms_recovery_1/st_recovery_generate_1.hpp>\n#include <sm_multi_stage_1/states/ms_recovery_1/st_recovery_innervate_1.hpp>\n\n#include <sm_multi_stage_1/states/ms_recovery_2/st_recovery_analyze_2.hpp>\n#include <sm_multi_stage_1/states/ms_recovery_2/st_recovery_bifurcate_2.hpp>\n#include <sm_multi_stage_1/states/ms_recovery_2/st_recovery_calculate_2.hpp>\n#include <sm_multi_stage_1/states/ms_recovery_2/st_recovery_deliberate_2.hpp>\n#include <sm_multi_stage_1/states/ms_recovery_2/st_recovery_evaluate_2.hpp>\n#include <sm_multi_stage_1/states/ms_recovery_2/st_recovery_generate_2.hpp>\n#include <sm_multi_stage_1/states/ms_recovery_2/st_recovery_innervate_2.hpp>\n\n#include <sm_multi_stage_1/states/mode_1_sequence_a_loop.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_a_loop.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_a_loop.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_a_loop.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_a_loop.hpp>\n\n#include <sm_multi_stage_1/states/mode_4_sequence_c_loop.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_d_loop.hpp>\n\n#include <sm_multi_stage_1/states/mode_1_sequence_b_loop.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_b_loop.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_b_loop.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_b_loop.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_b_loop.hpp>\n\n#include <sm_multi_stage_1/states/mode_1_st_observe.hpp>\n#include <sm_multi_stage_1/states/mode_2_st_observe.hpp>\n#include <sm_multi_stage_1/states/mode_3_st_observe.hpp>\n#include <sm_multi_stage_1/states/mode_4_st_observe.hpp>\n#include <sm_multi_stage_1/states/mode_5_st_observe.hpp>\n\n#include <sm_multi_stage_1/superstates/ss_mode_1_sequence_a.hpp>\n#include <sm_multi_stage_1/superstates/ss_mode_2_sequence_a.hpp>\n#include <sm_multi_stage_1/superstates/ss_mode_3_sequence_a.hpp>\n#include <sm_multi_stage_1/superstates/ss_mode_4_sequence_a.hpp>\n#include <sm_multi_stage_1/superstates/ss_mode_5_sequence_a.hpp>\n\n#include <sm_multi_stage_1/superstates/ss_mode_4_sequence_c.hpp>\n#include <sm_multi_stage_1/superstates/ss_mode_4_sequence_d.hpp>\n\n#include <sm_multi_stage_1/superstates/ss_mode_1_sequence_b.hpp>\n#include <sm_multi_stage_1/superstates/ss_mode_2_sequence_b.hpp>\n#include <sm_multi_stage_1/superstates/ss_mode_3_sequence_b.hpp>\n#include <sm_multi_stage_1/superstates/ss_mode_4_sequence_b.hpp>\n#include <sm_multi_stage_1/superstates/ss_mode_5_sequence_b.hpp>\n\n//ss_mode_1_sequence_a\n#include <sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_4.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_3.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_1.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_loop.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_2.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_5.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_9.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_8.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_7.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_6.hpp>\n\n//ss_mode_2_sequence_a\n#include <sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_4.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_3.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_1.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_loop.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_2.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_5.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_9.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_8.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_7.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_6.hpp>\n\n//ss_mode_3_sequence_a\n#include <sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_4.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_3.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_1.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_loop.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_2.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_5.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_9.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_8.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_7.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_6.hpp>\n\n//ss_mode_4_sequence_a\n#include <sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_4.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_3.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_1.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_loop.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_2.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_5.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_9.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_8.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_7.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_6.hpp>\n\n//ss_mode_4_sequence_c\n#include <sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_loop.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_1.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_2.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_3.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_4.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_5.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_6.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_7.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_8.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_9.hpp>\n\n//ss_mode_4_sequence_d\n#include <sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_4.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_3.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_1.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_loop.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_2.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_5.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_9.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_8.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_7.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_6.hpp>\n\n//ss_mode_5_sequence_a\n#include <sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_4.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_3.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_1.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_loop.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_2.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_5.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_9.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_8.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_7.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_6.hpp>\n\n//ss_mode_1_sequence_b\n#include <sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_4.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_3.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_1.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_loop.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_2.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_5.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_9.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_8.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_7.hpp>\n#include <sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_6.hpp>\n\n//ss_mode_2_sequence_b\n#include <sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_4.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_3.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_1.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_loop.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_2.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_5.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_9.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_8.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_7.hpp>\n#include <sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_6.hpp>\n\n//ss_mode_3_sequence_b\n#include <sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_4.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_3.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_1.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_loop.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_2.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_5.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_9.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_8.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_7.hpp>\n#include <sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_6.hpp>\n\n//ss_mode_4_sequence_b\n#include <sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_4.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_3.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_1.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_loop.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_2.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_5.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_9.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_8.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_7.hpp>\n#include <sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_6.hpp>\n\n//ss_mode_5_seqence_b\n#include <sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_4.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_3.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_1.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_loop.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_2.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_5.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_9.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_8.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_7.hpp>\n#include <sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_6.hpp>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode1SequenceALoop : smacc2::SmaccState<StiMode1SequenceALoop, SsMode1SequenceA>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiMode1SequenceALoop>, StiMode1SequenceAStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsMode1SequenceA>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiMode1SequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode1SequenceAStep1 : smacc2::SmaccState<StiMode1SequenceAStep1, SsMode1SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceAStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceAStep2, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode1SequenceAStep2 : smacc2::SmaccState<StiMode1SequenceAStep2, SsMode1SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceAStep3, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceAStep3, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode1SequenceAStep3 : smacc2::SmaccState<StiMode1SequenceAStep3, SsMode1SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceAStep4, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceAStep4, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode1SequenceAStep4 : smacc2::SmaccState<StiMode1SequenceAStep4, SsMode1SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceAStep5, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceAStep5, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode1SequenceAStep5 : smacc2::SmaccState<StiMode1SequenceAStep5, SsMode1SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceAStep6, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceAStep6, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode1SequenceAStep6 : smacc2::SmaccState<StiMode1SequenceAStep6, SsMode1SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceAStep7, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceAStep7, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode1SequenceAStep7 : smacc2::SmaccState<StiMode1SequenceAStep7, SsMode1SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceAStep8, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceAStep8, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode1SequenceAStep8 : smacc2::SmaccState<StiMode1SequenceAStep8, SsMode1SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceAStep9, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceAStep9, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_a/sti_mode_1_sequence_a_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode1SequenceAStep9 : smacc2::SmaccState<StiMode1SequenceAStep9, SsMode1SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceALoop, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceALoop, NEXT>\n\n    // Transition<EvKeyPressF<CbDefaultKeyboardBehavior, OrKeyboard>, MsMode2, SUCCESS>,\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n\n// STATE DECLARATION\nstruct Mode1SequenceALoop : smacc2::SmaccState<Mode1SequenceALoop, MsMode1>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<Mode1SequenceALoop>, SsMode1SequenceA, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsMode1>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.ziteration_count, superstate.ztotal_iterations());\n    return superstate.ziteration_count++ < superstate.ztotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&Mode1SequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode1SequenceBLoop : smacc2::SmaccState<StiMode1SequenceBLoop, SsMode1SequenceB>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiMode1SequenceBLoop>, StiMode1SequenceBStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsMode1SequenceB>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiMode1SequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode1SequenceBStep1 : smacc2::SmaccState<StiMode1SequenceBStep1, SsMode1SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceBStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceBStep2, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode1SequenceBStep2 : smacc2::SmaccState<StiMode1SequenceBStep2, SsMode1SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceBStep3, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceBStep3, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode1SequenceBStep3 : smacc2::SmaccState<StiMode1SequenceBStep3, SsMode1SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceBStep4, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceBStep4, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode1SequenceBStep4 : smacc2::SmaccState<StiMode1SequenceBStep4, SsMode1SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceBStep5, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceBStep5, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode1SequenceBStep5 : smacc2::SmaccState<StiMode1SequenceBStep5, SsMode1SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceBStep6, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceBStep6, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode1SequenceBStep6 : smacc2::SmaccState<StiMode1SequenceBStep6, SsMode1SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceBStep7, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceBStep7, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode1SequenceBStep7 : smacc2::SmaccState<StiMode1SequenceBStep7, SsMode1SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceBStep8, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceBStep9, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode1SequenceBStep8 : smacc2::SmaccState<StiMode1SequenceBStep8, SsMode1SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceBStep9, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceBStep9, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_b/sti_mode_1_sequence_b_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_1_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode1SequenceBStep9 : smacc2::SmaccState<StiMode1SequenceBStep9, SsMode1SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode1SequenceBLoop, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode1SequenceBLoop, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n\n// STATE DECLARATION\nstruct Mode1SequenceBLoop : smacc2::SmaccState<Mode1SequenceBLoop, MsMode1>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<Mode1SequenceBLoop>, SsMode1SequenceB, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsMode1>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.yiteration_count, superstate.ytotal_iterations());\n    return superstate.yiteration_count++ < superstate.ytotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&Mode1SequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_1_st_observe.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct Mode1StObserve : smacc2::SmaccState<Mode1StObserve, MsMode1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct mode_1_sequence_a : SUCCESS{};\n  struct mode_1_sequence_b : SUCCESS{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1SequenceALoop, SUCCESS>,\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, Mode1SequenceBLoop, SUCCESS>,\n\n    Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1SequenceBLoop, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode2SequenceALoop : smacc2::SmaccState<StiMode2SequenceALoop, SsMode2SequenceA>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiMode2SequenceALoop>, StiMode2SequenceAStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsMode2SequenceA>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiMode2SequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode2SequenceAStep1 : smacc2::SmaccState<StiMode2SequenceAStep1, SsMode2SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceAStep2, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceAStep2, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode2SequenceAStep2 : smacc2::SmaccState<StiMode2SequenceAStep2, SsMode2SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceAStep3, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceAStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode2SequenceAStep3 : smacc2::SmaccState<StiMode2SequenceAStep3, SsMode2SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceAStep4, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceAStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode2SequenceAStep4 : smacc2::SmaccState<StiMode2SequenceAStep4, SsMode2SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceAStep5, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceAStep5, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode2SequenceAStep5 : smacc2::SmaccState<StiMode2SequenceAStep5, SsMode2SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceAStep7, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceAStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode2SequenceAStep6 : smacc2::SmaccState<StiMode2SequenceAStep6, SsMode2SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceAStep8, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceAStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode2SequenceAStep7 : smacc2::SmaccState<StiMode2SequenceAStep7, SsMode2SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceAStep8, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceAStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n   //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode2SequenceAStep8 : smacc2::SmaccState<StiMode2SequenceAStep8, SsMode2SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceAStep9, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceAStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_a/sti_mode_2_sequence_a_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode2SequenceAStep9 : smacc2::SmaccState<StiMode2SequenceAStep9, SsMode2SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceALoop, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceALoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n\n// STATE DECLARATION\nstruct Mode2SequenceALoop : smacc2::SmaccState<Mode2SequenceALoop, MsMode2>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n     Transition<EvLoopContinue<Mode2SequenceALoop>, SsMode2SequenceA, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsMode2>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.ziteration_count, superstate.ztotal_iterations());\n    return superstate.ziteration_count++ < superstate.ztotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&Mode2SequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode2SequenceBLoop : smacc2::SmaccState<StiMode2SequenceBLoop, SsMode2SequenceB>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiMode2SequenceBLoop>, StiMode2SequenceBStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsMode2SequenceB>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiMode2SequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode2SequenceBStep1 : smacc2::SmaccState<StiMode2SequenceBStep1, SsMode2SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceBStep2, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceBStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode2SequenceBStep2 : smacc2::SmaccState<StiMode2SequenceBStep2, SsMode2SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceBStep3, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceBStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode2SequenceBStep3 : smacc2::SmaccState<StiMode2SequenceBStep3, SsMode2SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceBStep4, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceBStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode2SequenceBStep4 : smacc2::SmaccState<StiMode2SequenceBStep4, SsMode2SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceBStep5, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceBStep5, NEXT>\n\n    //ransition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode2SequenceBStep5 : smacc2::SmaccState<StiMode2SequenceBStep5, SsMode2SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceBStep6, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceBStep6, NEXT>,\n    Transition<EvKeyPressS<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceBStep8, SUCCESS>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode2SequenceBStep6 : smacc2::SmaccState<StiMode2SequenceBStep6, SsMode2SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceBStep7, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceBStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode2SequenceBStep7 : smacc2::SmaccState<StiMode2SequenceBStep7, SsMode2SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceBStep8, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceBStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode2SequenceBStep8 : smacc2::SmaccState<StiMode2SequenceBStep8, SsMode2SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceBStep9, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceBStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_b/sti_mode_2_sequence_b_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_2_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode2SequenceBStep9 : smacc2::SmaccState<StiMode2SequenceBStep9, SsMode2SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode2SequenceBLoop, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode2SequenceBLoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n\n// STATE DECLARATION\nstruct Mode2SequenceBLoop : smacc2::SmaccState<Mode2SequenceBLoop, MsMode2>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<Mode2SequenceBLoop>, SsMode2SequenceB, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsMode2>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.yiteration_count, superstate.ytotal_iterations());\n    return superstate.yiteration_count++ < superstate.ytotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&Mode2SequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_2_st_observe.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct Mode2StObserve : smacc2::SmaccState<Mode2StObserve, MsMode2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct mode_2_sequence_a : SUCCESS{};\n  struct mode_2_sequence_b : SUCCESS{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, Mode2SequenceBLoop, SUCCESS>,\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsMode1SequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressF<CbDefaultKeyboardBehavior, OrKeyboard>, MsMode2, SUCCESS>,\n    Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2SequenceALoop, SUCCESS>,\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceA, mode_1_sequence_a>,\n    Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2SequenceBLoop, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode3SequenceALoop : smacc2::SmaccState<StiMode3SequenceALoop, SsMode3SequenceA>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiMode3SequenceALoop>, StiMode3SequenceAStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsMode3SequenceA>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiMode3SequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode3SequenceAStep1 : smacc2::SmaccState<StiMode3SequenceAStep1, SsMode3SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceAStep2, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceAStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode3SequenceAStep2 : smacc2::SmaccState<StiMode3SequenceAStep2, SsMode3SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceAStep3, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceAStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode3SequenceAStep3 : smacc2::SmaccState<StiMode3SequenceAStep3, SsMode3SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceAStep4, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceAStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode3SequenceAStep4 : smacc2::SmaccState<StiMode3SequenceAStep4, SsMode3SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceAStep5, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceAStep5, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode3SequenceAStep5 : smacc2::SmaccState<StiMode3SequenceAStep5, SsMode3SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceAStep6, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceAStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode3SequenceAStep6 : smacc2::SmaccState<StiMode3SequenceAStep6, SsMode3SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceAStep7, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceAStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode3SequenceAStep7 : smacc2::SmaccState<StiMode3SequenceAStep7, SsMode3SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceAStep8, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceAStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n   //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode3SequenceAStep8 : smacc2::SmaccState<StiMode3SequenceAStep8, SsMode3SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceAStep9, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceAStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_a/sti_mode_3_sequence_a_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode3SequenceAStep9 : smacc2::SmaccState<StiMode3SequenceAStep9, SsMode3SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceALoop, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceALoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n\n// STATE DECLARATION\nstruct Mode3SequenceALoop : smacc2::SmaccState<Mode3SequenceALoop, MsMode3>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n     Transition<EvLoopContinue<Mode3SequenceALoop>, SsMode3SequenceA, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsMode3>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.ziteration_count, superstate.ztotal_iterations());\n    return superstate.ziteration_count++ < superstate.ztotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&Mode3SequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode3SequenceBLoop : smacc2::SmaccState<StiMode3SequenceBLoop, SsMode3SequenceB>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiMode3SequenceBLoop>, StiMode3SequenceBStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsMode3SequenceB>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiMode3SequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode3SequenceBStep1 : smacc2::SmaccState<StiMode3SequenceBStep1, SsMode3SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceBStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceBStep2, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode3SequenceBStep2 : smacc2::SmaccState<StiMode3SequenceBStep2, SsMode3SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceBStep3, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceBStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode3SequenceBStep3 : smacc2::SmaccState<StiMode3SequenceBStep3, SsMode3SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceBStep5, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceBStep6, SUCCESS>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode3SequenceBStep4 : smacc2::SmaccState<StiMode3SequenceBStep4, SsMode3SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceBStep7, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceBStep7, NEXT>\n\n    //ransition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode3SequenceBStep5 : smacc2::SmaccState<StiMode3SequenceBStep5, SsMode3SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceBStep7, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceBStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode3SequenceBStep6 : smacc2::SmaccState<StiMode3SequenceBStep6, SsMode3SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceBStep7, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceBStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode3SequenceBStep7 : smacc2::SmaccState<StiMode3SequenceBStep7, SsMode3SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceBStep8, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceBStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode3SequenceBStep8 : smacc2::SmaccState<StiMode3SequenceBStep8, SsMode3SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceBStep9, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceBStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_b/sti_mode_3_sequence_b_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_3_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode3SequenceBStep9 : smacc2::SmaccState<StiMode3SequenceBStep9, SsMode3SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode3SequenceBLoop, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode3SequenceBLoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n\n// STATE DECLARATION\nstruct Mode3SequenceBLoop : smacc2::SmaccState<Mode3SequenceBLoop, MsMode3>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<Mode3SequenceBLoop>, SsMode3SequenceB, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsMode3>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.yiteration_count, superstate.ytotal_iterations());\n    return superstate.yiteration_count++ < superstate.ytotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&Mode3SequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_3_st_observe.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct Mode3StObserve : smacc2::SmaccState<Mode3StObserve, MsMode3>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct mode_3_sequence_a : SUCCESS{};\n  struct mode_3_sequence_b : SUCCESS{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, Mode3SequenceBLoop, SUCCESS>,\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsMode1SequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressF<CbDefaultKeyboardBehavior, OrKeyboard>, MsMode2, SUCCESS>,\n    Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, Mode3SequenceALoop, SUCCESS>,\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceA, mode_1_sequence_a>,\n    Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, Mode3SequenceBLoop, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode4SequenceALoop : smacc2::SmaccState<StiMode4SequenceALoop, SsMode4SequenceA>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiMode4SequenceALoop>, StiMode4SequenceAStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsMode4SequenceA>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiMode4SequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode4SequenceAStep1 : smacc2::SmaccState<StiMode4SequenceAStep1, SsMode4SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceAStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceAStep2, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode4SequenceAStep2 : smacc2::SmaccState<StiMode4SequenceAStep2, SsMode4SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceAStep3, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceAStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode4SequenceAStep3 : smacc2::SmaccState<StiMode4SequenceAStep3, SsMode4SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceAStep4, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceAStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode4SequenceAStep4 : smacc2::SmaccState<StiMode4SequenceAStep4, SsMode4SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceAStep5, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceAStep5, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode4SequenceAStep5 : smacc2::SmaccState<StiMode4SequenceAStep5, SsMode4SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceAStep6, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceAStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode4SequenceAStep6 : smacc2::SmaccState<StiMode4SequenceAStep6, SsMode4SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceAStep7, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceAStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode4SequenceAStep7 : smacc2::SmaccState<StiMode4SequenceAStep7, SsMode4SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceAStep8, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceAStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n   //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode4SequenceAStep8 : smacc2::SmaccState<StiMode4SequenceAStep8, SsMode4SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceAStep9, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceAStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_a/sti_mode_4_sequence_a_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode4SequenceAStep9 : smacc2::SmaccState<StiMode4SequenceAStep9, SsMode4SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceALoop, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceALoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n\n// STATE DECLARATION\nstruct Mode4SequenceALoop : smacc2::SmaccState<Mode4SequenceALoop, MsMode4>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n     Transition<EvLoopContinue<Mode4SequenceALoop>, SsMode4SequenceA, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsMode4>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.ziteration_count, superstate.ztotal_iterations());\n    return superstate.ziteration_count++ < superstate.ztotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&Mode4SequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode4SequenceB : smacc2::SmaccState<StiMode4SequenceB, SsMode4SequenceB>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiMode4SequenceB>, StiMode4SequenceBStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsMode4SequenceB>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiMode4SequenceB::loopWhileCondition);\n  }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode4SequenceBStep1 : smacc2::SmaccState<StiMode4SequenceBStep1, SsMode4SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceBStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceBStep2, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode4SequenceBStep2 : smacc2::SmaccState<StiMode4SequenceBStep2, SsMode4SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceBStep3, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceBStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode4SequenceBStep3 : smacc2::SmaccState<StiMode4SequenceBStep3, SsMode4SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceBStep4, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceBStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode4SequenceBStep4 : smacc2::SmaccState<StiMode4SequenceBStep4, SsMode4SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceBStep5, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceBStep5, NEXT>\n\n    //ransition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode4SequenceBStep5 : smacc2::SmaccState<StiMode4SequenceBStep5, SsMode4SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceBStep6, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceBStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode4SequenceBStep6 : smacc2::SmaccState<StiMode4SequenceBStep6, SsMode4SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceBStep7, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceBStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode4SequenceBStep7 : smacc2::SmaccState<StiMode4SequenceBStep7, SsMode4SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceBStep8, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceBStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode4SequenceBStep8 : smacc2::SmaccState<StiMode4SequenceBStep8, SsMode4SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceBStep9, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceBStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_b/sti_mode_4_sequence_b_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode4SequenceBStep9 : smacc2::SmaccState<StiMode4SequenceBStep9, SsMode4SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceB, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceB, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n\n// STATE DECLARATION\nstruct Mode4SequenceB : smacc2::SmaccState<Mode4SequenceB, MsMode4>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<Mode4SequenceB>, SsMode4SequenceB, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsMode4>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.yiteration_count, superstate.ytotal_iterations());\n    return superstate.yiteration_count++ < superstate.ytotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&Mode4SequenceB::loopWhileCondition);\n  }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_c\n{\n// STATE DECLARATION\nstruct StiMode4SequenceCLoop : smacc2::SmaccState<StiMode4SequenceCLoop, SsMode4SequenceC>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiMode4SequenceCLoop>, StiMode4SequenceCStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsMode4SequenceC>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.diteration_count, superstate.dtotal_iterations());\n    return superstate.diteration_count++ < superstate.dtotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiMode4SequenceCLoop::loopWhileCondition);\n  }\n};\n}  // namespace mode_4_sequence_c_1\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_c\n{\n// STATE DECLARATION\nstruct StiMode4SequenceCStep1 : smacc2::SmaccState<StiMode4SequenceCStep1, SsMode4SequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceCStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceCStep2, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_c_1\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_c\n{\n// STATE DECLARATION\nstruct StiMode4SequenceCStep2 : smacc2::SmaccState<StiMode4SequenceCStep2, SsMode4SequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceCStep3, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceCStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_c_1\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_c\n{\n// STATE DECLARATION\nstruct StiMode4SequenceCStep3 : smacc2::SmaccState<StiMode4SequenceCStep3, SsMode4SequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceCStep4, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceCStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_c_1\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_c\n{\n// STATE DECLARATION\nstruct StiMode4SequenceCStep4 : smacc2::SmaccState<StiMode4SequenceCStep4, SsMode4SequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceCStep5, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceCStep5, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_c_1\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_c\n{\n// STATE DECLARATION\nstruct StiMode4SequenceCStep5 : smacc2::SmaccState<StiMode4SequenceCStep5, SsMode4SequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceCStep6, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceCStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_c_1\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_c\n{\n// STATE DECLARATION\nstruct StiMode4SequenceCStep6 : smacc2::SmaccState<StiMode4SequenceCStep6, SsMode4SequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceCStep7, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceCStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_c_1\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_c\n{\n// STATE DECLARATION\nstruct StiMode4SequenceCStep7 : smacc2::SmaccState<StiMode4SequenceCStep7, SsMode4SequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceCStep9, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceCStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n   //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_c_1\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_c\n{\n// STATE DECLARATION\nstruct StiMode4SequenceCStep8 : smacc2::SmaccState<StiMode4SequenceCStep8, SsMode4SequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceCStep9, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceCStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_c_1\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_c/sti_mode_4_sequence_c_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_c\n{\n// STATE DECLARATION\nstruct StiMode4SequenceCStep9 : smacc2::SmaccState<StiMode4SequenceCStep9, SsMode4SequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceCLoop, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceCLoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_c_1\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_c_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n\n// STATE DECLARATION\nstruct Mode4SequenceCLoop : smacc2::SmaccState<Mode4SequenceCLoop, MsMode4>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n     Transition<EvLoopContinue<Mode4SequenceCLoop>, SsMode4SequenceC, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsMode4>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.diteration_count, superstate.dtotal_iterations());\n    return superstate.diteration_count++ < superstate.dtotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&Mode4SequenceCLoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_d\n{\n// STATE DECLARATION\nstruct StiMode4SequenceDLoop : smacc2::SmaccState<StiMode4SequenceDLoop, SsMode4SequenceD>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiMode4SequenceDLoop>, StiMode4SequenceDStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsMode4SequenceD>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.giteration_count, superstate.gtotal_iterations());\n    return superstate.giteration_count++ < superstate.gtotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiMode4SequenceDLoop::loopWhileCondition);\n  }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_d\n{\n// STATE DECLARATION\nstruct StiMode4SequenceDStep1 : smacc2::SmaccState<StiMode4SequenceDStep1, SsMode4SequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceDStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceDStep2, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_d\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_d\n{\n// STATE DECLARATION\nstruct StiMode4SequenceDStep2 : smacc2::SmaccState<StiMode4SequenceDStep2, SsMode4SequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceDStep3, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceDStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_d\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_d\n{\n// STATE DECLARATION\nstruct StiMode4SequenceDStep3 : smacc2::SmaccState<StiMode4SequenceDStep3, SsMode4SequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceDStep4, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceDStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_d\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_d\n{\n// STATE DECLARATION\nstruct StiMode4SequenceDStep4 : smacc2::SmaccState<StiMode4SequenceDStep4, SsMode4SequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceDStep5, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceDStep5, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_d\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_d\n{\n// STATE DECLARATION\nstruct StiMode4SequenceDStep5 : smacc2::SmaccState<StiMode4SequenceDStep5, SsMode4SequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceDStep6, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceDStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_d\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_d\n{\n// STATE DECLARATION\nstruct StiMode4SequenceDStep6 : smacc2::SmaccState<StiMode4SequenceDStep6, SsMode4SequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceDStep7, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceDStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_d\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_d\n{\n// STATE DECLARATION\nstruct StiMode4SequenceDStep7 : smacc2::SmaccState<StiMode4SequenceDStep7, SsMode4SequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceDStep8, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceDStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n   //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_d\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_d\n{\n// STATE DECLARATION\nstruct StiMode4SequenceDStep8 : smacc2::SmaccState<StiMode4SequenceDStep8, SsMode4SequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceDStep9, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceDStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_d\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_d/sti_mode_4_sequence_d_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_4_sequence_d\n{\n// STATE DECLARATION\nstruct StiMode4SequenceDStep9 : smacc2::SmaccState<StiMode4SequenceDStep9, SsMode4SequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode4SequenceDLoop, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode4SequenceDLoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_4_sequence_d\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_sequence_d_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n\n// STATE DECLARATION\nstruct Mode4SequenceDLoop : smacc2::SmaccState<Mode4SequenceDLoop, MsMode4>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n     Transition<EvLoopContinue<Mode4SequenceDLoop>, SsMode4SequenceD, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsMode4>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.giteration_count, superstate.gtotal_iterations());\n    return superstate.giteration_count++ < superstate.gtotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&Mode4SequenceDLoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_4_st_observe.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct Mode4StObserve : smacc2::SmaccState<Mode4StObserve, MsMode4>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct mode_4_sequence_a : SUCCESS{};\n  struct mode_4_sequence_c : SUCCESS{};\n  struct mode_4_sequence_d : SUCCESS{};\n  struct mode_4_sequence_b : SUCCESS{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, Mode4SequenceALoop, SUCCESS>,\n    Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, Mode4SequenceB, SUCCESS>,\n    Transition<EvKeyPressD<CbDefaultKeyboardBehavior, OrKeyboard>, Mode4SequenceCLoop, SUCCESS>,\n    Transition<EvKeyPressG<CbDefaultKeyboardBehavior, OrKeyboard>, Mode4SequenceDLoop, SUCCESS>,\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, Mode4SequenceDLoop, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode5SequenceALoop : smacc2::SmaccState<StiMode5SequenceALoop, SsMode5SequenceA>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiMode5SequenceALoop>, StiMode5SequenceAStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsMode5SequenceA>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiMode5SequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode5SequenceAStep1 : smacc2::SmaccState<StiMode5SequenceAStep1, SsMode5SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceAStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceAStep2, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode5SequenceAStep2 : smacc2::SmaccState<StiMode5SequenceAStep2, SsMode5SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceAStep3, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceAStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode5SequenceAStep3 : smacc2::SmaccState<StiMode5SequenceAStep3, SsMode5SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceAStep5, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceAStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode5SequenceAStep4 : smacc2::SmaccState<StiMode5SequenceAStep4, SsMode5SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceAStep5, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceAStep5, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode5SequenceAStep5 : smacc2::SmaccState<StiMode5SequenceAStep5, SsMode5SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceAStep6, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceAStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode5SequenceAStep6 : smacc2::SmaccState<StiMode5SequenceAStep6, SsMode5SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceAStep7, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceAStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode5SequenceAStep7 : smacc2::SmaccState<StiMode5SequenceAStep7, SsMode5SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceAStep9, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceAStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n   //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode5SequenceAStep8 : smacc2::SmaccState<StiMode5SequenceAStep8, SsMode5SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceAStep9, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceAStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode1StObserve, RETURN>,\n //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_a/sti_mode_5_sequence_a_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_a\n{\n// STATE DECLARATION\nstruct StiMode5SequenceAStep9 : smacc2::SmaccState<StiMode5SequenceAStep9, SsMode5SequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceALoop, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceALoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_a\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n\n// STATE DECLARATION\nstruct Mode5SequenceALoop : smacc2::SmaccState<Mode5SequenceALoop, MsMode5>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n     Transition<EvLoopContinue<Mode5SequenceALoop>, SsMode5SequenceA, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsMode5>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.ziteration_count, superstate.ztotal_iterations());\n    return superstate.ziteration_count++ < superstate.ztotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&Mode5SequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode5SequenceBLoop : smacc2::SmaccState<StiMode5SequenceBLoop, SsMode5SequenceB>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiMode5SequenceBLoop>, StiMode5SequenceBStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsMode5SequenceB>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiMode5SequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode5SequenceBStep1 : smacc2::SmaccState<StiMode5SequenceBStep1, SsMode5SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceBStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceBStep2, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode5SequenceBStep2 : smacc2::SmaccState<StiMode5SequenceBStep2, SsMode5SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceBStep3, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceBStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode5SequenceBStep3 : smacc2::SmaccState<StiMode5SequenceBStep3, SsMode5SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceBStep4, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceBStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode5SequenceBStep4 : smacc2::SmaccState<StiMode5SequenceBStep4, SsMode5SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceBStep5, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceBStep5, NEXT>\n\n    //ransition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode5SequenceBStep5 : smacc2::SmaccState<StiMode5SequenceBStep5, SsMode5SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceBStep6, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceBStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode5SequenceBStep6 : smacc2::SmaccState<StiMode5SequenceBStep6, SsMode5SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceBStep8, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceBStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode5SequenceBStep7 : smacc2::SmaccState<StiMode5SequenceBStep7, SsMode5SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceBStep8, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceBStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode5SequenceBStep8 : smacc2::SmaccState<StiMode5SequenceBStep8, SsMode5SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceBStep9, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceBStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_b/sti_mode_5_sequence_b_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nnamespace mode_5_sequence_b\n{\n// STATE DECLARATION\nstruct StiMode5SequenceBStep9 : smacc2::SmaccState<StiMode5SequenceBStep9, SsMode5SequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiMode5SequenceBLoop, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiMode5SequenceBLoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, Mode2StObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace mode_1_sequence_b\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n\n// STATE DECLARATION\nstruct Mode5SequenceBLoop : smacc2::SmaccState<Mode5SequenceBLoop, MsMode5>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<Mode5SequenceBLoop>, SsMode5SequenceB, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsMode5>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.yiteration_count, superstate.ytotal_iterations());\n    return superstate.yiteration_count++ < superstate.ytotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&Mode5SequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/mode_5_st_observe.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct Mode5StObserve : smacc2::SmaccState<Mode5StObserve, MsMode5>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct mode_5_sequence_a : SUCCESS{};\n  struct mode_5_sequence_b : SUCCESS{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, Mode5SequenceBLoop, SUCCESS>,\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsMode1SequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressF<CbDefaultKeyboardBehavior, OrKeyboard>, MsMode2, SUCCESS>,\n    Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, Mode5SequenceALoop, SUCCESS>,\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceA, mode_1_sequence_a>,\n    Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, Mode5SequenceBLoop, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/ms_recovery_1/st_recovery_analyze_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct StRecoveryAnalyze1 : smacc2::SmaccState<StRecoveryAnalyze1, MsRecovery1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryBifurcate1, TIMEOUT>,\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsMode1SequenceA>,\n    // Keyboard events\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StRecoveryBifurcate1, SUCCESS>\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/ms_recovery_1/st_recovery_bifurcate_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct StRecoveryBifurcate1 : smacc2::SmaccState<StRecoveryBifurcate1, MsRecovery1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryCalculate1, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsMode1SequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/ms_recovery_1/st_recovery_calculate_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct StRecoveryCalculate1 : smacc2::SmaccState<StRecoveryCalculate1, MsRecovery1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryDeliberate1, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsMode1SequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/ms_recovery_1/st_recovery_deliberate_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct StRecoveryDeliberate1 : smacc2::SmaccState<StRecoveryDeliberate1, MsRecovery1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StRecoveryEvaluate1, NEXT>,\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, smacc2::deep_history<MsMode1::LastDeepState>, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/ms_recovery_1/st_recovery_evaluate_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct StRecoveryEvaluate1 : smacc2::SmaccState<StRecoveryEvaluate1, MsRecovery1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryGenerate1, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsMode1SequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/ms_recovery_1/st_recovery_generate_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct StRecoveryGenerate1 : smacc2::SmaccState<StRecoveryGenerate1, MsRecovery1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryInnervate1, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsMode1SequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/ms_recovery_1/st_recovery_innervate_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct StRecoveryInnervate1 : smacc2::SmaccState<StRecoveryInnervate1, MsRecovery1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, smacc2::deep_history<MsMode1::LastDeepState>, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/ms_recovery_2/st_recovery_analyze_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct StRecoveryAnalyze2 : smacc2::SmaccState<StRecoveryAnalyze2, MsRecovery2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryBifurcate2, TIMEOUT>,\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsMode1SequenceA>,\n    // Keyboard events\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StRecoveryBifurcate2, SUCCESS>\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/ms_recovery_2/st_recovery_bifurcate_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct StRecoveryBifurcate2 : smacc2::SmaccState<StRecoveryBifurcate2, MsRecovery2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryCalculate2, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsMode1SequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/ms_recovery_2/st_recovery_calculate_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct StRecoveryCalculate2 : smacc2::SmaccState<StRecoveryCalculate2, MsRecovery2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    //Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryDeliberate2, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsMode1SequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/ms_recovery_2/st_recovery_deliberate_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct StRecoveryDeliberate2 : smacc2::SmaccState<StRecoveryDeliberate2, MsRecovery2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StRecoveryEvaluate2, NEXT>,\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, smacc2::deep_history<MsMode2::LastDeepState>, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/ms_recovery_2/st_recovery_evaluate_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct StRecoveryEvaluate2 : smacc2::SmaccState<StRecoveryEvaluate2, MsRecovery2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryGenerate2, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsMode1SequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/ms_recovery_2/st_recovery_generate_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct StRecoveryGenerate2 : smacc2::SmaccState<StRecoveryGenerate2, MsRecovery2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryInnervate2, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsMode1SequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsMode1SequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/states/ms_recovery_2/st_recovery_innervate_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\n// STATE DECLARATION\nstruct StRecoveryInnervate2 : smacc2::SmaccState<StRecoveryInnervate2, MsRecovery2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, smacc2::deep_history<MsMode2::LastDeepState>, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    \n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/superstates/ss_mode_1_sequence_a.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nusing namespace sm_multi_stage_1::mode_1_sequence_a;\n\n// STATE DECLARATION\nstruct SsMode1SequenceA : smacc2::SmaccState<SsMode1SequenceA, MsMode1, StiMode1SequenceALoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiMode1SequenceALoop>, Mode1SequenceALoop>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/superstates/ss_mode_1_sequence_b.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nusing namespace sm_multi_stage_1::mode_1_sequence_b;\n\n// STATE DECLARATION\nstruct SsMode1SequenceB : smacc2::SmaccState<SsMode1SequenceB, MsMode1, StiMode1SequenceBLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiMode1SequenceBLoop>, Mode1StObserve>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS4\n\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/superstates/ss_mode_2_sequence_a.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nusing namespace sm_multi_stage_1::mode_2_sequence_a;\n\n// STATE DECLARATION\nstruct SsMode2SequenceA : smacc2::SmaccState<SsMode2SequenceA, MsMode2, StiMode2SequenceALoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiMode2SequenceALoop>, Mode2SequenceALoop>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/superstates/ss_mode_2_sequence_b.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nusing namespace sm_multi_stage_1::mode_2_sequence_b;\n\n// STATE DECLARATION\nstruct SsMode2SequenceB : smacc2::SmaccState<SsMode2SequenceB, MsMode2, StiMode2SequenceBLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiMode2SequenceBLoop>, Mode2StObserve>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS4\n\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/superstates/ss_mode_3_sequence_a.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nusing namespace sm_multi_stage_1::mode_3_sequence_a;\n\n// STATE DECLARATION\nstruct SsMode3SequenceA : smacc2::SmaccState<SsMode3SequenceA, MsMode3, StiMode3SequenceALoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiMode3SequenceALoop>, Mode3SequenceALoop>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/superstates/ss_mode_3_sequence_b.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nusing namespace sm_multi_stage_1::mode_3_sequence_b;\n\n// STATE DECLARATION\nstruct SsMode3SequenceB : smacc2::SmaccState<SsMode3SequenceB, MsMode3, StiMode3SequenceBLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiMode3SequenceBLoop>, Mode3StObserve>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS4\n\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/superstates/ss_mode_4_sequence_a.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nusing namespace sm_multi_stage_1::mode_4_sequence_a;\n\n// STATE DECLARATION\nstruct SsMode4SequenceA : smacc2::SmaccState<SsMode4SequenceA, MsMode4, StiMode4SequenceALoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiMode4SequenceALoop>, Mode4SequenceALoop>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/superstates/ss_mode_4_sequence_b.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nusing namespace sm_multi_stage_1::mode_4_sequence_b;\n\n// STATE DECLARATION\nstruct SsMode4SequenceB : smacc2::SmaccState<SsMode4SequenceB, MsMode4, StiMode4SequenceB>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiMode4SequenceB>, Mode4StObserve>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS4\n\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/superstates/ss_mode_4_sequence_c.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nusing namespace sm_multi_stage_1::mode_4_sequence_c;\n\n// STATE DECLARATION\nstruct SsMode4SequenceC : smacc2::SmaccState<SsMode4SequenceC, MsMode4, StiMode4SequenceCLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiMode4SequenceCLoop>, Mode4SequenceCLoop>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int dtotal_iterations() { return 1; }\n  int diteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/superstates/ss_mode_4_sequence_d.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nusing namespace sm_multi_stage_1::mode_4_sequence_d;\n\n// STATE DECLARATION\nstruct SsMode4SequenceD : smacc2::SmaccState<SsMode4SequenceD, MsMode4, StiMode4SequenceDLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiMode4SequenceDLoop>, Mode4SequenceDLoop>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int gtotal_iterations() { return 1; }\n  int giteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/superstates/ss_mode_5_sequence_a.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nusing namespace sm_multi_stage_1::mode_5_sequence_a;\n\n// STATE DECLARATION\nstruct SsMode5SequenceA : smacc2::SmaccState<SsMode5SequenceA, MsMode5, StiMode5SequenceALoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiMode5SequenceALoop>, Mode5SequenceALoop>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/include/sm_multi_stage_1/superstates/ss_mode_5_sequence_b.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_multi_stage_1\n{\nusing namespace sm_multi_stage_1::mode_5_sequence_b;\n\n// STATE DECLARATION\nstruct SsMode5SequenceB : smacc2::SmaccState<SsMode5SequenceB, MsMode5, StiMode5SequenceBLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiMode5SequenceBLoop>, Mode5StObserve>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS4\n\n}  // namespace sm_multi_stage_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/launch/sm_multi_stage_1.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\nfrom datetime import datetime\nfrom launch import LaunchDescription\nfrom launch.actions import OpaqueFunction\nfrom launch_ros.actions import Node\n\n\ndef setup_log_directory():\n    \"\"\"\n    Creates timestamped log directory with error handling.\n    Returns: (log_dir_path, timestamp) tuple\n    \"\"\"\n    timestamp = datetime.now().strftime(\"%Y-%m-%d-%H-%M-%S\")\n\n    # Primary log directory location\n    log_dir = os.path.join(os.path.expanduser(\"~\"), \".ros\", \"log\", timestamp)\n\n    try:\n        os.makedirs(log_dir, mode=0o755, exist_ok=True)\n        print(f\"[Launch] Log directory created: {log_dir}\")\n        return log_dir, timestamp\n    except PermissionError as e:\n        # Fallback to /tmp if ~/.ros is not writable\n        fallback_dir = os.path.join(\"/tmp\", \"sm_multi_stage_1_logs\", timestamp)\n        print(f\"[Launch] WARNING: Cannot create log directory at {log_dir}\")\n        print(f\"[Launch] Permission denied: {e}\")\n        print(f\"[Launch] Using fallback directory: {fallback_dir}\")\n        try:\n            os.makedirs(fallback_dir, mode=0o755, exist_ok=True)\n            return fallback_dir, timestamp\n        except Exception as fallback_error:\n            print(f\"[Launch] ERROR: Cannot create fallback directory: {fallback_error}\")\n            print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n            return None, timestamp\n    except OSError as e:\n        print(f\"[Launch] ERROR: Failed to create log directory: {e}\")\n        print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n        return None, timestamp\n\n\ndef generate_launch_description():\n    return LaunchDescription([OpaqueFunction(function=launch_setup)])\n\n\ndef launch_setup(context, *args, **kwargs):\n\n    # Setup logging directory\n    log_dir, timestamp = setup_log_directory()\n\n    # Construct logging prefix for state machine node\n    if log_dir:\n        state_machine_log = os.path.join(log_dir, f\"state_machine_{timestamp}.log\")\n        state_machine_prefix = f'konsole --hold -p tabtitle=\"State Machine\" -e bash -c \\'RCUTILS_COLORIZED_OUTPUT=1 \"$@\" 2>&1 | tee {state_machine_log}; exec bash\\' -- '\n    else:\n        state_machine_prefix = 'konsole --hold -p tabtitle=\"State Machine\" -e'\n\n    sm_multi_stage_1_node = Node(\n        package=\"sm_multi_stage_1\",\n        executable=\"sm_multi_stage_1_node\",\n        name=\"sm_multi_stage_1\",\n        output=\"screen\",\n        prefix=state_machine_prefix,\n        arguments=[\"--ros-args\", \"--log-level\", \"DEBUG\"],\n    )\n\n    # Construct logging prefix for keyboard client node\n    if log_dir:\n        keyboard_log = os.path.join(log_dir, f\"keyboard_server_{timestamp}.log\")\n        keyboard_prefix = f'konsole --hold -p tabtitle=\"Keyboard Server\" -e bash -c \\'RCUTILS_COLORIZED_OUTPUT=1 \"$@\" 2>&1 | tee {keyboard_log}; exec bash\\' -- '\n    else:\n        keyboard_prefix = 'konsole --hold -p tabtitle=\"Keyboard Server\" -e'\n\n    keyboard_server_node = Node(\n        package=\"cl_keyboard\",\n        executable=\"keyboard_server_node.py\",\n        name=\"keyboard_server_node\",\n        output=\"screen\",\n        prefix=keyboard_prefix,\n        arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n    )\n\n    nodes_to_start = [\n        sm_multi_stage_1_node,\n        keyboard_server_node,\n    ]\n\n    return nodes_to_start\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_multi_stage_1</name>\n  <version>3.0.1</version>\n  <description>The sm_multi_stage_1 package</description>\n  <maintainer email=\"brett@robosoft.ai\"></maintainer>\n  <license>Apache-2.0</license>\n\n  <depend>smacc2</depend>\n  <depend>rclcpp</depend>\n  <depend>sr_all_events_go</depend>\n  <depend>std_msgs</depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>cl_keyboard</depend>\n  <depend>konsole</depend>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multi_stage_1/src/sm_multi_stage_1_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_multi_stage_1/sm_multi_stage_1.hpp>\n\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_multi_stage_1::SmMultiStage1>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_multithread_test_1)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\ninclude_directories(include\n                    ${smacc2_INCLUDE_DIRS}\n                    ${cl_ros2_timer_INCLUDE_DIRS})\n\n# Multi-threaded executor variant (main demonstration)\nadd_executable(${PROJECT_NAME}_node\n                src/sm_multithread_test_1/sm_multithread_test_1_node.cpp)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node smacc2)\n\n# Single-threaded executor variant (for comparison)\nadd_executable(${PROJECT_NAME}_node_single\n                src/sm_multithread_test_1/sm_multithread_test_1_node_single.cpp)\n\ntarget_link_libraries(${PROJECT_NAME}_node_single\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node_single smacc2)\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n        ${PROJECT_NAME}_node\n        ${PROJECT_NAME}_node_single\n        DESTINATION lib/${PROJECT_NAME})\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/README.md",
    "content": "# sm_multithread_test_1 - SMACC2 Multi-threaded Executor Demonstration\n \n ![sm_multithread_test_1](docs/SmMultithreadTest1_2025-12-21_213820.svg)\n\n**A reference implementation demonstrating SMACC2's multi-threaded executor capability.**\n\n> 🎯 **Addresses GitHub Issue [#571](https://github.com/robosoft-ai/SMACC2/issues/571)**: \"Multithread executor example\"\n\n---\n\n## 📋 Table of Contents\n\n- [What is This?](#what-is-this)\n- [Quick Start](#quick-start)\n- [The Problem This Solves](#the-problem-this-solves)\n- [What You'll Observe](#what-youll-observe)\n- [How It Works](#how-it-works)\n- [When to Use Multi-threaded Mode](#when-to-use-multi-threaded-mode)\n- [Important Limitations](#important-limitations)\n- [Code Deep Dive](#code-deep-dive)\n- [Build Instructions](#build-instructions)\n- [Troubleshooting](#troubleshooting)\n- [Further Reading](#further-reading)\n\n---\n\n## What is This?\n\nThis state machine demonstrates **SMACC2's multi-threaded executor feature** by running four concurrent timers with simulated work. The logs clearly show the difference between single-threaded and multi-threaded execution through thread IDs and overlapping timestamps.\n\n**Key Features:**\n- ✅ Multi-threaded ROS2 callback processing\n- ✅ Visual demonstration of concurrency via logs\n- ✅ Side-by-side comparison with single-threaded mode\n- ✅ Comprehensive documentation of usage and limitations\n\n---\n\n## Quick Start\n\n### Run Multi-threaded Version (Main Demo)\n\n```bash\n# Build the package\ncolcon build --packages-select sm_multithread_test_1\n\n# Source the workspace\nsource install/setup.bash\n\n# Launch multi-threaded version\nros2 launch sm_multithread_test_1 sm_multithread_test_1.py\n```\n\n### Run Single-threaded Version (For Comparison)\n\n```bash\n# Launch single-threaded version\nros2 launch sm_multithread_test_1 sm_multithread_test_1_single.py\n```\n\nThe state machine runs for **15 seconds** then enters a terminal state. Press `Ctrl+C` to exit.\n\n---\n\n## The Problem This Solves\n\n### Background\n\nBy default, SMACC2 uses a **single-threaded executor** where ROS2 callbacks (timers, subscribers, action clients) execute sequentially. This is simple and deterministic, but can be a bottleneck when:\n\n- Multiple callbacks have significant processing time\n- Callbacks involve I/O operations (network, disk, sensors)\n- You want maximum throughput for concurrent operations\n\n### Solution\n\nSMACC2 supports ROS2's **Multi-threaded Executor** which allows callbacks to execute concurrently on multiple threads, improving throughput for I/O-bound and concurrent operations.\n\n**Enabling it is trivial** – just one parameter change:\n\n```cpp\n// Single-threaded (default)\nsmacc2::run<MyStateMachine>();\n\n// Multi-threaded\nsmacc2::run<MyStateMachine>(smacc2::ExecutionModel::MULTI_THREAD_SPINNER);\n                            //  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n                            //  THIS IS THE ONLY CHANGE NEEDED!\n```\n\n---\n\n## What You'll Observe\n\n###  Multi-threaded Mode Output\n\n```\n[Timer-A] Tick   1 START (Thread: 12345678) - simulating  50ms work\n[Timer-B] Tick   1 START (Thread: 87654321) - simulating 100ms work  ← Different thread!\n[Timer-A] Tick   1 END   (Thread: 12345678)\n[Timer-C] Tick   1 START (Thread: 11223344) - simulating 150ms work  ← Concurrent!\n[Timer-A] Tick   2 START (Thread: 12345678) - simulating  50ms work\n[Timer-B] Tick   1 END   (Thread: 87654321)\n[Timer-A] Tick   2 END   (Thread: 12345678)\n[Timer-D] Tick   1 START (Thread: 99887766) - simulating 200ms work\n```\n\n**Observations:**\n- ✅ **Different thread IDs** (12345678, 87654321, 11223344, 99887766)\n- ✅ **Overlapping START/END timestamps**\n- ✅ **True parallel execution**\n\n### Single-threaded Mode Output\n\n```\n[Timer-A] Tick   1 START (Thread: 12345678) - simulating  50ms work\n[Timer-A] Tick   1 END   (Thread: 12345678)\n[Timer-A] Tick   2 START (Thread: 12345678) - simulating  50ms work\n[Timer-A] Tick   2 END   (Thread: 12345678)\n[Timer-B] Tick   1 START (Thread: 12345678) - simulating 100ms work  ← Same thread\n[Timer-B] Tick   1 END   (Thread: 12345678)\n[Timer-C] Tick   1 START (Thread: 12345678) - simulating 150ms work  ← Serial execution\n```\n\n**Observations:**\n- ✅ **Same thread ID for all** (12345678)\n- ✅ **No overlapping timestamps**\n- ✅ **Serial execution** (one callback at a time)\n\n---\n\n## How It Works\n\n### Architecture\n\nThe state machine consists of:\n\n1. **4 Orthogonals** – each with a timer at a different rate:\n   - `OrTimerA`: 100ms period\n   - `OrTimerB`: 250ms period\n   - `OrTimerC`: 500ms period\n   - `OrTimerD`: 1000ms period\n\n2. **Custom Client Behavior** – `CbTimerWithWorkSimulation`:\n   - Simulates work with `std::this_thread::sleep_for()`\n   - Logs thread ID on each callback\n   - Logs START/END timestamps\n   - Makes concurrency visually obvious\n\n3. **Two States**:\n   - `StConcurrentOperation`: Runs timers for 15 seconds\n   - `StComplete`: Terminal state with summary\n\n### Timer Configuration\n\n| Timer | Period | Work Duration | Purpose |\n|-------|--------|---------------|---------|\n| A | 100ms | 50ms | Fast, light work |\n| B | 250ms | 100ms | Medium, medium work |\n| C | 500ms | 150ms | Slow, heavy work |\n| D | 1000ms | 200ms | Very slow, very heavy work |\n\nThe different rates and work durations create interesting interleaving patterns that clearly demonstrate concurrency.\n\n---\n\n## When to Use Multi-threaded Mode\n\n### ✅ Use Multi-threaded When:\n\n1. **Multiple concurrent ROS2 callbacks**\n   - Multiple timer callbacks\n   - Multiple subscriber callbacks\n   - Parallel action client callbacks\n\n2. **Callbacks have blocking operations**\n   - Network I/O\n   - Disk I/O\n   - Sensor data acquisition\n   - Long computations\n\n3. **Need maximum throughput**\n   - High-frequency data streams\n   - Real-time sensor fusion\n   - Parallel goal processing\n\n4. **Using callback-based patterns only**\n   - Timers ✅\n   - Subscribers ✅\n   - Action clients ✅\n   - Service clients ✅\n\n### ❌ Avoid Multi-threaded When:\n\n1. **Using `ISmaccUpdatable` pattern**\n   - Components/behaviors with `update()` method\n   - Polling-based patterns\n   - Custom periodic logic\n\n2. **Simple state machines**\n   - Minimal concurrent operations\n   - No performance bottleneck\n\n3. **Debugging complex behavior**\n   - Single-threaded is easier to trace\n   - More deterministic execution\n\n4. **Need strict determinism**\n   - Single-threaded provides guaranteed order\n   - Multi-threaded has non-deterministic scheduling\n\n---\n\n## Important Limitations\n\n### ⚠️ ISmaccUpdatable Pattern Does NOT Work\n\n**The `update()` method is never called in multi-threaded mode!**\n\n**Why?** The SignalDetector's `pollOnce()` function (which calls `update()` on all `ISmaccUpdatable` objects) is only invoked in single-threaded mode's polling loop. Multi-threaded mode uses `executor.spin()` which never calls `pollOnce()`.\n\n**Affected Patterns:**\n- ❌ Components inheriting from `ISmaccUpdatable`\n- ❌ Behaviors inheriting from `ISmaccUpdatable`\n- ❌ States inheriting from `ISmaccUpdatable`\n- ❌ Any custom `update()` methods\n\n**Solution:**\nUse ROS2 callback-based patterns instead:\n- ✅ Timer callbacks via `ClRos2Timer`\n- ✅ Subscriber callbacks via `CpTopicSubscriber`\n- ✅ Action client callbacks\n- ✅ Service client callbacks\n\n**Example Migration:**\n\n```cpp\n// ❌ DON'T: This won't work in multi-threaded mode\nclass MyCb : public SmaccClientBehavior, public ISmaccUpdatable\n{\n  void update() override {\n    // This is NEVER called in multi-threaded mode!\n    checkCondition();\n  }\n};\n\n// ✅ DO: Use timer callbacks instead\nclass MyCb : public SmaccClientBehavior\n{\n  void onEntry() override {\n    requiresClient(timerClient_);\n    timerComponent->onTimerTick(&MyCb::onTimerCallback, this);\n  }\n\n  void onTimerCallback() {\n    // This WILL be called in multi-threaded mode\n    checkCondition();\n  }\n};\n```\n\n---\n\n## Code Deep Dive\n\n### The One-Line Change\n\nThe **only difference** between single-threaded and multi-threaded SMACC2 is in the main node file:\n\n**Multi-threaded** (`sm_multithread_test_1_node.cpp`):\n```cpp\nsmacc2::run<SmMultithreadTest1>(\n  smacc2::ExecutionModel::MULTI_THREAD_SPINNER  // ← ADD THIS\n);\n```\n\n**Single-threaded** (`sm_multithread_test_1_node_single.cpp`):\n```cpp\nsmacc2::run<SmMultithreadTest1>(\n  smacc2::ExecutionModel::SINGLE_THREAD_SPINNER  // ← Or omit (default)\n);\n// Equivalent to:\nsmacc2::run<SmMultithreadTest1>();\n```\n\n### Implementation Details\n\n#### Signal Detector Logic\n\nFrom `smacc2/src/smacc2/signal_detector.cpp:365-386`:\n\n```cpp\nif (this->executionModel_ == ExecutionModel::SINGLE_THREAD_SPINNER)\n{\n  RCLCPP_INFO_STREAM(getLogger(), \"[SignalDetector] Running in single-threaded mode.\");\n\n  rclcpp::Rate r(loop_rate_hz);  // Default 20Hz\n  while (rclcpp::ok() && !end_)\n  {\n    pollOnce();              // ✅ Calls update() on ISmaccUpdatable objects\n    rclcpp::spin_some(nh);   // Process callbacks\n    r.sleep();\n  }\n}\nelse\n{\n  RCLCPP_INFO_STREAM(getLogger(), \"[SignalDetector] Running in multi-threaded mode.\");\n\n  rclcpp::executors::MultiThreadedExecutor executor;\n  executor.add_node(nh);\n  executor.spin();  // ❌ pollOnce() NEVER CALLED\n}\n```\n\n**Key Insight:** Multi-threaded mode skips `pollOnce()`, so `ISmaccUpdatable::update()` is never invoked.\n\n#### Custom Behavior Implementation\n\n`cb_timer_with_work_simulation.hpp` demonstrates the pattern:\n\n```cpp\nclass CbTimerWithWorkSimulation : public smacc2::SmaccClientBehavior\n{\n  void onEntry() override {\n    // Connect to timer callback\n    timerComponent->onTimerTick(&CbTimerWithWorkSimulation::onTimerCallback, this);\n  }\n\n  void onTimerCallback() {\n    auto thread_id = std::this_thread::get_id();  // Log thread ID\n    std::size_t thread_hash = std::hash<std::thread::id>{}(thread_id);\n\n    RCLCPP_INFO(getLogger(), \"[Timer-%s] Tick %d START (Thread: %zu)\",\n                timerName_.c_str(), tickCount_, thread_hash);\n\n    std::this_thread::sleep_for(workDuration_);  // Simulate work\n\n    RCLCPP_INFO(getLogger(), \"[Timer-%s] Tick %d END   (Thread: %zu)\",\n                timerName_.c_str(), tickCount_, thread_hash);\n  }\n};\n```\n\n---\n\n## Build Instructions\n\n### Prerequisites\n\n- ROS 2 (jazzy or later)\n- SMACC2 framework installed\n- `cl_ros2_timer` client library\n\n### Building\n\n```bash\n# Navigate to your workspace\ncd ~/your_workspace\n\n# Build the package\ncolcon build --packages-select sm_multithread_test_1\n\n# Source the workspace\nsource install/setup.bash\n```\n\n### Running\n\n```bash\n# Multi-threaded version (main demonstration)\nros2 launch sm_multithread_test_1 sm_multithread_test_1.py\n\n# Single-threaded version (for comparison)\nros2 launch sm_multithread_test_1 sm_multithread_test_1_single.py\n```\n\n---\n\n## Troubleshooting\n\n### \"No matching function for call to 'run'\"\n\n**Solution:** Ensure you're using a recent version of SMACC2 that supports the `ExecutionModel` parameter.\n\n### Logs show same thread ID in multi-threaded mode\n\n**Possible causes:**\n1. Launched the wrong executable (single-threaded variant)\n2. ROS 2 executor configuration issue\n\n**Check:** Look for this log line at startup:\n```\n[SignalDetector] Running in multi-threaded mode.\n```\n\nIf you see \"single-threaded mode\", you launched the wrong variant.\n\n### Behaviors not executing\n\n**Check if they inherit from `ISmaccUpdatable`** – this pattern doesn't work in multi-threaded mode. Migrate to timer/subscriber callbacks instead.\n\n---\n\n## Further Reading\n\n### SMACC2 Documentation\n- [SMACC2 Official Docs](https://smacc2.robosoft.ai/)\n- [SMACC2 GitHub Repository](https://github.com/robosoft-ai/SMACC2)\n\n### Related Issues\n- [GitHub Issue #571](https://github.com/robosoft-ai/SMACC2/issues/571) - Original request for multithread executor documentation\n\n### ROS 2 Documentation\n- [ROS 2 Executors](https://docs.ros.org/en/jazzy/Concepts/About-Executors.html)\n- [MultiThreadedExecutor API](https://docs.ros.org/en/jazzy/p/rclcpp/generated/classrclcpp_1_1executors_1_1MultiThreadedExecutor.html)\n\n### Code Files\n- `sm_multithread_test_1_node.cpp` - Multi-threaded entry point\n- `sm_multithread_test_1_node_single.cpp` - Single-threaded entry point\n- `cb_timer_with_work_simulation.hpp` - Custom behavior with thread logging\n- `signal_detector.cpp` - SignalDetector implementation with execution model selection\n\n---\n\n## License\n\nCopyright 2025 RobosoftAI Inc.\n\nLicensed under the Apache License, Version 2.0\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/include/sm_multithread_test_1/client_behaviors/cb_timer_with_work_simulation.hpp",
    "content": "// Copyright 2025 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <thread>\n#include <string>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace sm_multithread_test_1\n{\nusing namespace cl_ros2_timer;\n\n/**\n * @brief Custom timer behavior that simulates work and logs thread IDs\n *\n * This behavior demonstrates concurrent execution in multi-threaded mode by:\n * 1. Logging the thread ID on each timer tick\n * 2. Simulating work with a configurable sleep duration\n * 3. Logging START/END to visualize overlapping operations\n *\n * In single-threaded mode, you'll see:\n * - Same thread ID for all callbacks\n * - Serial execution (no overlap)\n *\n * In multi-threaded mode, you'll see:\n * - Different thread IDs for concurrent callbacks\n * - Overlapping START/END timestamps\n */\nclass CbTimerWithWorkSimulation : public smacc2::SmaccClientBehavior\n{\npublic:\n  /**\n   * @param timer_name Identifier for this timer (e.g., \"A\", \"B\", \"C\", \"D\")\n   * @param work_duration How long to simulate work on each tick\n   */\n  explicit CbTimerWithWorkSimulation(\n    std::string timer_name,\n    std::chrono::milliseconds work_duration)\n  : timerName_(timer_name),\n    workDuration_(work_duration),\n    tickCount_(0)\n  {\n  }\n\n  void onEntry() override\n  {\n    // Get the timer client\n    this->requiresClient(timerClient_);\n\n    // Get the core timer component\n    smacc2::client_core_components::CpRos2Timer * timerComponent;\n    this->requiresComponent(timerComponent);\n\n    // Connect to the timer tick callback\n    timerComponent->onTimerTick(&CbTimerWithWorkSimulation::onTimerCallback, this);\n\n    RCLCPP_INFO(\n      getLogger(),\n      \"[Timer-%s] Behavior initialized - will simulate %ldms work per tick\",\n      timerName_.c_str(),\n      workDuration_.count()\n    );\n  }\n\n  void onExit() override\n  {\n    RCLCPP_INFO(\n      getLogger(),\n      \"[Timer-%s] Behavior exiting after %d ticks\",\n      timerName_.c_str(),\n      tickCount_\n    );\n  }\n\nprivate:\n  std::string timerName_;\n  std::chrono::milliseconds workDuration_;\n  int tickCount_;\n  ClRos2Timer * timerClient_;\n\n  /**\n   * @brief Called on each timer tick - simulates work and logs thread info\n   */\n  void onTimerCallback()\n  {\n    tickCount_++;\n\n    // Get current thread ID\n    auto thread_id = std::this_thread::get_id();\n    std::size_t thread_hash = std::hash<std::thread::id>{}(thread_id);\n\n    // Log START with thread ID\n    RCLCPP_INFO(\n      getLogger(),\n      \"[Timer-%s] Tick %3d START (Thread: %8zu) - simulating %3ldms work\",\n      timerName_.c_str(),\n      tickCount_,\n      thread_hash,\n      workDuration_.count()\n    );\n\n    // Simulate work (this is where the thread would be doing actual computation)\n    std::this_thread::sleep_for(workDuration_);\n\n    // Log END with thread ID\n    RCLCPP_INFO(\n      getLogger(),\n      \"[Timer-%s] Tick %3d END   (Thread: %8zu)\",\n      timerName_.c_str(),\n      tickCount_,\n      thread_hash\n    );\n  }\n};\n\n}  // namespace sm_multithread_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/include/sm_multithread_test_1/orthogonals/or_timer_a.hpp",
    "content": "// Copyright 2025 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace sm_multithread_test_1\n{\n// Fast timer - 100ms period\nclass OrTimerA : public smacc2::Orthogonal<OrTimerA>\n{\npublic:\n  void onInitialize() override\n  {\n    auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(100ms);\n  }\n};\n}  // namespace sm_multithread_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/include/sm_multithread_test_1/orthogonals/or_timer_b.hpp",
    "content": "// Copyright 2025 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace sm_multithread_test_1\n{\n// Medium timer - 250ms period\nclass OrTimerB : public smacc2::Orthogonal<OrTimerB>\n{\npublic:\n  void onInitialize() override\n  {\n    auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(250ms);\n  }\n};\n}  // namespace sm_multithread_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/include/sm_multithread_test_1/orthogonals/or_timer_c.hpp",
    "content": "// Copyright 2025 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace sm_multithread_test_1\n{\n// Slow timer - 500ms period\nclass OrTimerC : public smacc2::Orthogonal<OrTimerC>\n{\npublic:\n  void onInitialize() override\n  {\n    auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(500ms);\n  }\n};\n}  // namespace sm_multithread_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/include/sm_multithread_test_1/orthogonals/or_timer_d.hpp",
    "content": "// Copyright 2025 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace sm_multithread_test_1\n{\n// Very slow timer - 1000ms (1 second) period\nclass OrTimerD : public smacc2::Orthogonal<OrTimerD>\n{\npublic:\n  void onInitialize() override\n  {\n    auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(1000ms);\n  }\n};\n}  // namespace sm_multithread_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/include/sm_multithread_test_1/sm_multithread_test_1.hpp",
    "content": "// Copyright 2025 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @file sm_multithread_test_1.hpp\n * @brief Multi-threaded Executor Demonstration State Machine\n *\n * This state machine demonstrates SMACC2's multi-threaded executor capability\n * (ExecutionModel::MULTI_THREAD_SPINNER) by running multiple concurrent timer\n * callbacks with simulated work.\n *\n * Key Features Demonstrated:\n * - Multi-threaded ROS2 callback execution\n * - Concurrent timer processing\n * - Thread ID logging to prove parallelism\n * - Work simulation to make concurrency observable\n *\n * Addresses GitHub Issue #571:\n * https://github.com/robosoft-ai/SMACC2/issues/571\n *\n * @see README.md for detailed usage instructions and architecture explanation\n */\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n\n// CLIENT BEHAVIORS\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n\n// ORTHOGONALS\n#include \"orthogonals/or_timer_a.hpp\"\n#include \"orthogonals/or_timer_b.hpp\"\n#include \"orthogonals/or_timer_c.hpp\"\n#include \"orthogonals/or_timer_d.hpp\"\n\nusing namespace boost;\nusing namespace smacc2;\nusing namespace cl_ros2_timer;\n\nnamespace sm_multithread_test_1\n{\n\n// STATE FORWARD DECLARATIONS\nclass StConcurrentOperation;\nclass StComplete;\n\n//═══════════════════════════════════════════════════════════════════════════\n// STATE MACHINE\n//═══════════════════════════════════════════════════════════════════════════\n\n/**\n * @brief SmMultithreadTest1 - Demonstrates multi-threaded executor usage\n *\n * This state machine is designed to showcase the difference between\n * single-threaded and multi-threaded execution models in SMACC2.\n *\n * Architecture:\n * - 4 orthogonals, each with a timer client at different rates\n * - Custom behaviors that simulate work and log thread IDs\n * - Visual demonstration of concurrent vs serial execution\n *\n * Initial State: StConcurrentOperation\n * - Runs 4 concurrent timers for 15 seconds\n * - Logs thread IDs and work simulation\n * - Transitions to StComplete after 15 seconds\n *\n * Terminal State: StComplete\n * - Displays summary and instructions\n * - Waits for user to terminate\n *\n * Usage:\n * Multi-threaded:  ros2 launch sm_multithread_test_1 sm_multithread_test_1.launch.py\n * Single-threaded: ros2 launch sm_multithread_test_1 sm_multithread_test_1_single.launch.py\n */\nstruct SmMultithreadTest1\n  : public smacc2::SmaccStateMachineBase<SmMultithreadTest1, StConcurrentOperation>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  virtual void onInitialize() override\n  {\n    RCLCPP_INFO(getLogger(), \" \");\n    RCLCPP_INFO(getLogger(), \"╔════════════════════════════════════════════════════════════════╗\");\n    RCLCPP_INFO(getLogger(), \"║    SmMultithreadTest1 - Multi-threaded Executor Demo         ║\");\n    RCLCPP_INFO(getLogger(), \"╚════════════════════════════════════════════════════════════════╝\");\n    RCLCPP_INFO(getLogger(), \" \");\n    RCLCPP_INFO(getLogger(), \"Initializing state machine with 4 timer orthogonals...\");\n\n    // Create the four orthogonals, each with a timer at a different rate\n    this->createOrthogonal<OrTimerA>();  // 100ms\n    this->createOrthogonal<OrTimerB>();  // 250ms\n    this->createOrthogonal<OrTimerC>();  // 500ms\n    this->createOrthogonal<OrTimerD>();  // 1000ms\n\n    RCLCPP_INFO(getLogger(), \"State machine initialization complete.\");\n    RCLCPP_INFO(getLogger(), \" \");\n  }\n};\n\n}  // namespace sm_multithread_test_1\n\n// STATE INCLUDES (must be after state machine declaration)\n#include \"states/st_concurrent_operation.hpp\"\n#include \"states/st_complete.hpp\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/include/sm_multithread_test_1/states/st_complete.hpp",
    "content": "// Copyright 2025 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_multithread_test_1\n{\n\n/**\n * @brief Terminal state - demonstration is complete\n *\n * This simple state marks the end of the multi-threaded executor demonstration.\n * The state machine will remain in this state until manually terminated.\n */\nstruct StComplete : smacc2::SmaccState<StComplete, SmMultithreadTest1>\n{\n  using SmaccState::SmaccState;\n\n  // No transitions - this is a terminal state\n  typedef mpl::list<> reactions;\n\n  static void staticConfigure()\n  {\n    // No behaviors needed in terminal state\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"StComplete::runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \" \");\n    RCLCPP_INFO(getLogger(), \"════════════════════════════════════════════════════════════════\");\n    RCLCPP_INFO(getLogger(), \" \");\n    RCLCPP_INFO(getLogger(), \"  ✅ Multi-threaded Executor Demonstration Complete!\");\n    RCLCPP_INFO(getLogger(), \" \");\n    RCLCPP_INFO(getLogger(), \"  📊 Review the logs above to observe:\");\n    RCLCPP_INFO(getLogger(), \"     • Thread IDs in callback execution\");\n    RCLCPP_INFO(getLogger(), \"     • Concurrent vs serial execution patterns\");\n    RCLCPP_INFO(getLogger(), \"     • Overlapping work timestamps\");\n    RCLCPP_INFO(getLogger(), \" \");\n    RCLCPP_INFO(getLogger(), \"  🔄 To compare modes, run:\");\n    RCLCPP_INFO(getLogger(), \"     • Multi-threaded:  ros2 launch sm_multithread_test_1 sm_multithread_test_1.launch.py\");\n    RCLCPP_INFO(getLogger(), \"     • Single-threaded: ros2 launch sm_multithread_test_1 sm_multithread_test_1_single.launch.py\");\n    RCLCPP_INFO(getLogger(), \" \");\n    RCLCPP_INFO(getLogger(), \"  Press Ctrl+C to exit.\");\n    RCLCPP_INFO(getLogger(), \" \");\n    RCLCPP_INFO(getLogger(), \"════════════════════════════════════════════════════════════════\");\n    RCLCPP_INFO(getLogger(), \" \");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StComplete::onExit()\");\n  }\n};\n\n}  // namespace sm_multithread_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/include/sm_multithread_test_1/states/st_concurrent_operation.hpp",
    "content": "// Copyright 2025 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n#include <sm_multithread_test_1/client_behaviors/cb_timer_with_work_simulation.hpp>\n\nnamespace sm_multithread_test_1\n{\nusing namespace cl_ros2_timer;\nusing namespace smacc2::default_transition_tags;\nusing namespace std::chrono_literals;\n\n// Forward declaration\nstruct StComplete;\n\n/**\n * @brief Main demonstration state - runs 4 concurrent timers\n *\n * This state configures four orthogonals with timers at different rates,\n * each simulating work of different durations. The goal is to demonstrate\n * concurrent execution in multi-threaded mode.\n *\n * Timer Configuration:\n * - Timer A: 100ms period, 50ms work  (fast, light)\n * - Timer B: 250ms period, 100ms work (medium, medium)\n * - Timer C: 500ms period, 150ms work (slow, heavy)\n * - Timer D: 1000ms period, 200ms work (very slow, very heavy)\n *\n * The state exits after 120 seconds (120 ticks of Timer D).\n */\nstruct StConcurrentOperation : smacc2::SmaccState<StConcurrentOperation, SmMultithreadTest1>\n{\n  using SmaccState::SmaccState;\n\n  // Transition after 120 seconds (120 ticks of the 1-second timer)\n  typedef mpl::list<\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimerD>, StComplete, SUCCESS>\n  > reactions;\n\n  static void staticConfigure()\n  {\n    // Configure Timer A: Fast (100ms period), light work (50ms)\n    configure_orthogonal<OrTimerA, CbTimerWithWorkSimulation>(\"A\", 50ms);\n\n    // Configure Timer B: Medium (250ms period), medium work (100ms)\n    configure_orthogonal<OrTimerB, CbTimerWithWorkSimulation>(\"B\", 100ms);\n\n    // Configure Timer C: Slow (500ms period), heavy work (150ms)\n    configure_orthogonal<OrTimerC, CbTimerWithWorkSimulation>(\"C\", 150ms);\n\n    // Configure Timer D: Very slow (1000ms period), very heavy work (200ms)\n    configure_orthogonal<OrTimerD, CbTimerWithWorkSimulation>(\"D\", 200ms);\n\n    // Also configure Timer D with countdown to trigger state exit after 120 seconds\n    configure_orthogonal<OrTimerD, CbTimerCountdownOnce>(120);\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"StConcurrentOperation::runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \" \");\n    RCLCPP_INFO(getLogger(), \"╔════════════════════════════════════════════════════════════════╗\");\n    RCLCPP_INFO(getLogger(), \"║      CONCURRENT OPERATION STATE - Multi-threaded Demo         ║\");\n    RCLCPP_INFO(getLogger(), \"╚════════════════════════════════════════════════════════════════╝\");\n    RCLCPP_INFO(getLogger(), \" \");\n    RCLCPP_INFO(getLogger(), \"Running 4 concurrent timers for 15 seconds...\");\n    RCLCPP_INFO(getLogger(), \" \");\n    RCLCPP_INFO(getLogger(), \"  Timer A: 100ms period,  50ms work (fast, light)\");\n    RCLCPP_INFO(getLogger(), \"  Timer B: 250ms period, 100ms work (medium, medium)\");\n    RCLCPP_INFO(getLogger(), \"  Timer C: 500ms period, 150ms work (slow, heavy)\");\n    RCLCPP_INFO(getLogger(), \"  Timer D: 1000ms period, 200ms work (very slow, very heavy)\");\n    RCLCPP_INFO(getLogger(), \" \");\n    RCLCPP_INFO(getLogger(), \"👀 Watch for:\");\n    RCLCPP_INFO(getLogger(), \"   • Different thread IDs (multi-threaded mode)\");\n    RCLCPP_INFO(getLogger(), \"   • Overlapping START/END timestamps (concurrency!)\");\n    RCLCPP_INFO(getLogger(), \"   • Same thread ID = single-threaded mode\");\n    RCLCPP_INFO(getLogger(), \" \");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \" \");\n    RCLCPP_INFO(getLogger(), \"╔════════════════════════════════════════════════════════════════╗\");\n    RCLCPP_INFO(getLogger(), \"║      DEMONSTRATION COMPLETE - Check Logs Above!               ║\");\n    RCLCPP_INFO(getLogger(), \"╚════════════════════════════════════════════════════════════════╝\");\n    RCLCPP_INFO(getLogger(), \" \");\n  }\n};\n\n}  // namespace sm_multithread_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/launch/sm_multithread_test_1.py",
    "content": "# Copyright 2025 RobosoftAI Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"\nLaunch file for multi-threaded executor demonstration\n\nThis launches the state machine with ExecutionModel::MULTI_THREAD_SPINNER,\nenabling concurrent ROS2 callback processing.\n\nExpected behavior:\n- Different thread IDs for concurrent callbacks\n- Overlapping START/END timestamps in logs\n- True parallel execution of timer callbacks\n\nTo compare with single-threaded mode:\n  ros2 launch sm_multithread_test_1 sm_multithread_test_1_single.launch.py\n\"\"\"\n\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef generate_launch_description():\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_multithread_test_1\",\n                executable=\"sm_multithread_test_1_node\",  # Multi-threaded variant\n                output=\"screen\",\n                emulate_tty=True,  # Better log formatting\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n        ]\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/launch/sm_multithread_test_1_single.py",
    "content": "# Copyright 2025 RobosoftAI Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"\nLaunch file for single-threaded executor comparison\n\nThis launches the same state machine with ExecutionModel::SINGLE_THREAD_SPINNER,\nusing traditional single-threaded callback processing.\n\nExpected behavior:\n- Same thread ID for all callbacks\n- No overlapping START/END timestamps\n- Serial execution of timer callbacks\n\nTo compare with multi-threaded mode:\n  ros2 launch sm_multithread_test_1 sm_multithread_test_1.launch.py\n\"\"\"\n\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef generate_launch_description():\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_multithread_test_1\",\n                executable=\"sm_multithread_test_1_node_single\",  # Single-threaded variant\n                output=\"screen\",\n                emulate_tty=True,  # Better log formatting\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n        ]\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_multithread_test_1</name>\n  <version>3.0.1</version>\n  <description>\n    SMACC2 multi-threaded executor demonstration state machine.\n    This state machine demonstrates the use of ExecutionModel::MULTI_THREAD_SPINNER\n    for concurrent ROS2 callback processing. Addresses GitHub issue #571.\n  </description>\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>smacc2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/src/sm_multithread_test_1/sm_multithread_test_1_node.cpp",
    "content": "// Copyright 2025 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @file sm_multithread_test_1_node.cpp\n * @brief Main entry point for multi-threaded executor demonstration\n *\n * 🎯 KEY FEATURE DEMONSTRATED HERE 🎯\n *\n * This file shows how to enable multi-threaded execution in SMACC2.\n * The only change from a standard SMACC2 state machine is passing\n * ExecutionModel::MULTI_THREAD_SPINNER to smacc2::run().\n *\n * COMPARISON:\n *\n * Standard (single-threaded) SMACC2 state machine:\n *   smacc2::run<MyStateMachine>();\n *\n * Multi-threaded SMACC2 state machine:\n *   smacc2::run<MyStateMachine>(smacc2::ExecutionModel::MULTI_THREAD_SPINNER);\n *                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n *                                THIS IS THE ONLY CHANGE NEEDED!\n *\n * WHAT THIS ENABLES:\n * - Concurrent ROS2 callback processing\n * - Multiple timer callbacks executing simultaneously\n * - Parallel subscriber callbacks\n * - Parallel action client callbacks\n *\n * LIMITATIONS:\n * - ISmaccUpdatable::update() is NOT called in multi-threaded mode\n * - Components/behaviors relying on update() won't work\n * - Use ROS2 callback patterns instead (timers, subscribers, etc.)\n *\n * See README.md for detailed explanation and usage guide.\n */\n\n#include <sm_multithread_test_1/sm_multithread_test_1.hpp>\n\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n\n  // ╔════════════════════════════════════════════════════════════════════╗\n  // ║  🚀 MULTI-THREADED EXECUTOR ENABLED                                ║\n  // ║                                                                    ║\n  // ║  The second parameter enables ROS2's MultiThreadedExecutor,       ║\n  // ║  allowing concurrent callback processing.                         ║\n  // ║                                                                    ║\n  // ║  Remove the parameter (or use SINGLE_THREAD_SPINNER) for          ║\n  // ║  traditional single-threaded execution.                           ║\n  // ╚════════════════════════════════════════════════════════════════════╝\n\n  smacc2::run<sm_multithread_test_1::SmMultithreadTest1>(\n    smacc2::ExecutionModel::MULTI_THREAD_SPINNER  // ← THE KEY FEATURE!\n  );\n\n  return 0;\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_multithread_test_1/src/sm_multithread_test_1/sm_multithread_test_1_node_single.cpp",
    "content": "// Copyright 2025 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @file sm_multithread_test_1_node_single.cpp\n * @brief Single-threaded variant for comparison\n *\n * This file runs the same state machine in single-threaded mode for comparison.\n * The only difference from sm_multithread_test_1_node.cpp is the execution model.\n *\n * COMPARISON:\n *\n * Multi-threaded (sm_multithread_test_1_node.cpp):\n *   smacc2::run<SmMultithreadTest1>(smacc2::ExecutionModel::MULTI_THREAD_SPINNER);\n *\n * Single-threaded (this file):\n *   smacc2::run<SmMultithreadTest1>(smacc2::ExecutionModel::SINGLE_THREAD_SPINNER);\n *   or simply:\n *   smacc2::run<SmMultithreadTest1>();  // SINGLE_THREAD_SPINNER is default\n *\n * EXPECTED BEHAVIOR DIFFERENCES:\n *\n * Single-threaded mode:\n * - All callbacks execute on same thread (same thread ID in logs)\n * - Serial execution (one callback at a time)\n * - No overlap in START/END timestamps\n * - More predictable/deterministic\n *\n * Multi-threaded mode:\n * - Different thread IDs for concurrent callbacks\n * - Parallel execution (multiple callbacks simultaneously)\n * - Overlapping START/END timestamps\n * - Higher throughput for I/O-bound operations\n */\n\n#include <sm_multithread_test_1/sm_multithread_test_1.hpp>\n\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n\n  // ╔════════════════════════════════════════════════════════════════════╗\n  // ║  🔄 SINGLE-THREADED EXECUTOR (Default Mode)                       ║\n  // ║                                                                    ║\n  // ║  This uses the traditional single-threaded executor for           ║\n  // ║  comparison with the multi-threaded variant.                      ║\n  // ║                                                                    ║\n  // ║  Callbacks execute serially on a single thread.                   ║\n  // ╚════════════════════════════════════════════════════════════════════╝\n\n  smacc2::run<sm_multithread_test_1::SmMultithreadTest1>(\n    smacc2::ExecutionModel::SINGLE_THREAD_SPINNER  // Traditional mode\n  );\n\n  // Alternative (equivalent) way - SINGLE_THREAD_SPINNER is the default:\n  // smacc2::run<sm_multithread_test_1::SmMultithreadTest1>();\n\n  return 0;\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_nav2_gazebo_test_1)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# Find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(cl_keyboard REQUIRED)\nfind_package(cl_nav2z REQUIRED)\nfind_package(geometry_msgs REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\n# Include directories\ninclude_directories(\n  include\n  ${smacc2_INCLUDE_DIRS}\n  ${cl_ros2_timer_INCLUDE_DIRS}\n  ${cl_keyboard_INCLUDE_DIRS}\n  ${cl_nav2z_INCLUDE_DIRS}\n)\n\n# Executable\nadd_executable(${PROJECT_NAME}_node\n  src/sm_nav2_gazebo_test_1/sm_nav2_gazebo_test_1_node.cpp\n)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${cl_keyboard_LIBRARIES}\n  ${cl_nav2z_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node\n  smacc2\n  cl_ros2_timer\n  cl_keyboard\n  cl_nav2z\n  geometry_msgs\n)\n\n# Install\ninstall(DIRECTORY include/ DESTINATION include)\ninstall(DIRECTORY launch config DESTINATION share/${PROJECT_NAME})\ninstall(TARGETS ${PROJECT_NAME}_node DESTINATION lib/${PROJECT_NAME})\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ![sm_nav2_gazebo_test_1](docs/SmNav2GazeboTest1_2025-12-21_205429.svg)\n\n <h2>Description</h2> A Nav2 unit test state machine demonstrating basic navigation and rotation behaviors using the Nav2 stack with TurtleBot3 simulation. The state machine navigates to a waypoint, rotates 180 degrees, then navigates to a second waypoint.<br></br>\n\n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n<h2>Operating Instructions</h2>\nAfter you build, remember to source the workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_nav2_gazebo_test_1 sm_nav2_gazebo_test_1.py\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>.\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/config/sm_nav2_gazebo_test_1_config.yaml",
    "content": "# Configuration for sm_nav2_gazebo_test_1\nsm_nav2_gazebo_test_1:\n  ros__parameters:\n    use_sim_time: true\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/include/sm_nav2_gazebo_test_1/orthogonals/or_keyboard.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n\nnamespace sm_nav2_gazebo_test_1\n{\n\nclass OrKeyboard : public smacc2::Orthogonal<OrKeyboard>\n{\npublic:\n  void onInitialize() override\n  {\n    auto client = this->createClient<cl_keyboard::ClKeyboard>();\n  }\n};\n\n}  // namespace sm_nav2_gazebo_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/include/sm_nav2_gazebo_test_1/orthogonals/or_navigation.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_nav2z/cl_nav2z.hpp>\n#include <cl_nav2z/components/pose/cp_pose.hpp>\n#include <cl_nav2z/components/odom_tracker/cp_odom_tracker.hpp>\n#include <cl_nav2z/components/planner_switcher/cp_planner_switcher.hpp>\n#include <cl_nav2z/components/goal_checker_switcher/cp_goal_checker_switcher.hpp>\n#include <cl_nav2z/components/amcl/cp_amcl.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n\nnamespace sm_nav2_gazebo_test_1\n{\n\nclass OrNavigation : public smacc2::Orthogonal<OrNavigation>\n{\npublic:\n  void onInitialize() override\n  {\n    auto client = this->createClient<cl_nav2z::ClNav2Z>();\n\n    // Create required components for navigation behaviors\n    // CpPose: provides robot pose from TF\n    client->createComponent<cl_nav2z::CpPose>(\"base_link\", \"map\");\n\n    // CpOdomTracker: tracks odometry path for undo operations\n    client->createComponent<cl_nav2z::odom_tracker::CpOdomTracker>();\n\n    // CpPlannerSwitcher: switches between planners/controllers\n    client->createComponent<cl_nav2z::CpPlannerSwitcher>();\n\n    // CpGoalCheckerSwitcher: switches goal checker algorithms\n    client->createComponent<cl_nav2z::CpGoalCheckerSwitcher>();\n\n    // CpAmcl: provides initial pose setting for AMCL localization\n    client->createComponent<cl_nav2z::CpAmcl>();\n  }\n};\n\n}  // namespace sm_nav2_gazebo_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/include/sm_nav2_gazebo_test_1/orthogonals/or_timer.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc.hpp>\n\nusing namespace std::chrono_literals;\n\nnamespace sm_nav2_gazebo_test_1\n{\n\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  void onInitialize() override\n  {\n    auto client = this->createClient<cl_ros2_timer::ClRos2Timer>(1s);\n  }\n};\n\n}  // namespace sm_nav2_gazebo_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/include/sm_nav2_gazebo_test_1/sm_nav2_gazebo_test_1.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <cl_nav2z/cl_nav2z.hpp>\n\n// CLIENT BEHAVIORS\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n#include <cl_keyboard/client_behaviors/cb_default_keyboard_behavior.hpp>\n#include <cl_nav2z/client_behaviors/cb_navigate_global_position.hpp>\n#include <cl_nav2z/client_behaviors/cb_wait_nav2_nodes.hpp>\n#include <cl_nav2z/client_behaviors/cb_wait_transform.hpp>\n#include <cl_nav2z/client_behaviors/cb_pure_spinning.hpp>\n#include <cl_nav2z/components/amcl/cp_amcl.hpp>\n\n// ORTHOGONALS\n#include \"orthogonals/or_timer.hpp\"\n#include \"orthogonals/or_keyboard.hpp\"\n#include \"orthogonals/or_navigation.hpp\"\n\nusing namespace boost;\nusing namespace smacc2;\nusing namespace cl_ros2_timer;\nusing namespace cl_keyboard;\nusing namespace cl_nav2z;\n\nnamespace sm_nav2_gazebo_test_1\n{\n\n// FORWARD DECLARATIONS\nclass StAllSensorsGo;\nclass StSetInitialPose;\nclass StNavigateToWaypoint1;\nclass StRotate;\nclass StNavigateToWaypoint2;\nclass StFinalState;\n\n//--------------------------------------------------------------------\n// STATE MACHINE\nstruct SmNav2GazeboTest1 : public smacc2::SmaccStateMachineBase<SmNav2GazeboTest1, StAllSensorsGo>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  void onInitialize() override\n  {\n    this->createOrthogonal<OrTimer>();\n    this->createOrthogonal<OrKeyboard>();\n    this->createOrthogonal<OrNavigation>();\n  }\n};\n\n}  // namespace sm_nav2_gazebo_test_1\n\n// STATE INCLUDES (must be after state machine definition)\n#include \"states/st_all_sensors_go.hpp\"\n#include \"states/st_set_initial_pose.hpp\"\n#include \"states/st_navigate_to_waypoint_1.hpp\"\n#include \"states/st_rotate.hpp\"\n#include \"states/st_navigate_to_waypoint_2.hpp\"\n#include \"states/st_final_state.hpp\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/include/sm_nav2_gazebo_test_1/states/st_all_sensors_go.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_nav2_gazebo_test_1\n{\n\nusing namespace cl_ros2_timer;\nusing namespace cl_keyboard;\nusing namespace cl_nav2z;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StAllSensorsGo : smacc2::SmaccState<StAllSensorsGo, SmNav2GazeboTest1>\n{\n  using SmaccState::SmaccState;\n\n  // CUSTOM TRANSITION TAGS\n  struct NEXT : SUCCESS {};\n  struct NAV2_READY : SUCCESS {};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbWaitNav2Nodes, OrNavigation>, StSetInitialPose, NAV2_READY>,\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StSetInitialPose, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StSetInitialPose, NEXT>\n  > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Wait for Nav2 nodes to be ready (PlannerServer, ControllerServer, BtNavigator)\n    configure_orthogonal<OrNavigation, CbWaitNav2Nodes>();\n\n    // Timer countdown: triggers EvTimer after 15 seconds (backup if Nav2 ready signal not received)\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(15);\n\n    // Keyboard behavior: allows manual state advancement with 'N' key\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"StAllSensorsGo: runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StAllSensorsGo: onEntry() - Waiting for Nav2 nodes to be ready...\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StAllSensorsGo: onExit()\");\n  }\n};\n\n}  // namespace sm_nav2_gazebo_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/include/sm_nav2_gazebo_test_1/states/st_final_state.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_nav2_gazebo_test_1\n{\n\n// STATE DECLARATION\nstruct StFinalState : smacc2::SmaccState<StFinalState, SmNav2GazeboTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE - Terminal state, no transitions\n  typedef mpl::list<> reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // No behaviors configured - terminal state\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"StFinalState: runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StFinalState: onEntry() - Mission Complete!\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StFinalState: onExit()\");\n  }\n};\n\n}  // namespace sm_nav2_gazebo_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/include/sm_nav2_gazebo_test_1/states/st_navigate_to_waypoint_1.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_nav2_gazebo_test_1\n{\n\nusing namespace cl_nav2z;\nusing namespace cl_keyboard;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StNavigateToWaypoint1 : smacc2::SmaccState<StNavigateToWaypoint1, SmNav2GazeboTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    Transition<smacc2::EvActionSucceeded<ClNav2Z, OrNavigation>, StRotate, SUCCESS>,\n    Transition<smacc2::EvActionAborted<ClNav2Z, OrNavigation>, StFinalState, ABORT>\n  > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Navigate to waypoint 1: x=2.0, y=0.0, yaw=0.0\n    configure_orthogonal<OrNavigation, CbNavigateGlobalPosition>(2.0, 0.0, 0.0);\n\n    // Keyboard behavior for manual control\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"StNavigateToWaypoint1: runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StNavigateToWaypoint1: onEntry() - Navigating to waypoint 1 (x=2.0, y=0.0)\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StNavigateToWaypoint1: onExit()\");\n  }\n};\n\n}  // namespace sm_nav2_gazebo_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/include/sm_nav2_gazebo_test_1/states/st_navigate_to_waypoint_2.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_nav2_gazebo_test_1\n{\n\nusing namespace cl_nav2z;\nusing namespace cl_keyboard;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StNavigateToWaypoint2 : smacc2::SmaccState<StNavigateToWaypoint2, SmNav2GazeboTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    Transition<smacc2::EvActionSucceeded<ClNav2Z, OrNavigation>, StFinalState, SUCCESS>,\n    Transition<smacc2::EvActionAborted<ClNav2Z, OrNavigation>, StFinalState, ABORT>\n  > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Navigate to waypoint 2: back near origin (x=0.0, y=0.0, yaw=0.0)\n    configure_orthogonal<OrNavigation, CbNavigateGlobalPosition>(0.0, 0.0, 0.0);\n\n    // Keyboard behavior for manual control\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"StNavigateToWaypoint2: runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StNavigateToWaypoint2: onEntry() - Navigating to waypoint 2 (x=0.0, y=0.0)\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StNavigateToWaypoint2: onExit()\");\n  }\n};\n\n}  // namespace sm_nav2_gazebo_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/include/sm_nav2_gazebo_test_1/states/st_rotate.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\nnamespace sm_nav2_gazebo_test_1\n{\n\nusing namespace cl_nav2z;\nusing namespace cl_keyboard;\nusing namespace smacc2::default_transition_tags;\n\n// STATE DECLARATION\nstruct StRotate : smacc2::SmaccState<StRotate, SmNav2GazeboTest1>\n{\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    Transition<EvCbSuccess<CbPureSpinning, OrNavigation>, StNavigateToWaypoint2, SUCCESS>,\n    Transition<EvCbFailure<CbPureSpinning, OrNavigation>, StFinalState, ABORT>\n  > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Rotate 180 degrees (PI radians) at 0.5 rad/s\n    configure_orthogonal<OrNavigation, CbPureSpinning>(M_PI, 0.5);\n\n    // Keyboard behavior for manual control\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure()\n  {\n    RCLCPP_INFO(getLogger(), \"StRotate: runtimeConfigure()\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StRotate: onEntry() - Rotating 180 degrees\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StRotate: onExit()\");\n  }\n};\n\n}  // namespace sm_nav2_gazebo_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/include/sm_nav2_gazebo_test_1/states/st_set_initial_pose.hpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n#include <geometry_msgs/msg/pose_with_covariance_stamped.hpp>\n#include <cl_nav2z/client_behaviors/cb_wait_nav2_nodes.hpp>\n\nnamespace sm_nav2_gazebo_test_1\n{\n\nusing namespace cl_nav2z;\nusing namespace cl_keyboard;\nusing namespace smacc2::default_transition_tags;\n\n// Custom transition tag for retry\nstruct RETRY : SUCCESS {};\n\n// Custom event for max retries exceeded\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvMaxRetriesExceeded : sc::event<EvMaxRetriesExceeded<TSource, TOrthogonal>>\n{\n};\n\n// Forward declarations\nstruct StNavigateToWaypoint1;\nstruct StFinalState;\n\n// STATE DECLARATION\nstruct StSetInitialPose : smacc2::SmaccState<StSetInitialPose, SmNav2GazeboTest1>\n{\n  using SmaccState::SmaccState;\n\n  // Retry configuration: MAX_RETRIES means number of retries after initial attempt\n  // Total attempts = 1 (initial) + MAX_RETRIES = 4\n  static constexpr int MAX_RETRIES = 3;\n  static constexpr int MAX_ATTEMPTS = 1 + MAX_RETRIES;  // 4 total attempts\n  static constexpr const char* ATTEMPT_COUNTER_KEY = \"localization_attempt_count\";\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    // Success: proceed to navigation when Nav2 nodes are ready\n    Transition<EvCbSuccess<CbWaitNav2Nodes, OrNavigation>, StNavigateToWaypoint1, SUCCESS>,\n    // Failure with retries remaining: self-transition to try again\n    Transition<EvCbFailure<CbWaitNav2Nodes, OrNavigation>, StSetInitialPose, RETRY>,\n    // Max retries exceeded: abort to final state\n    Transition<EvMaxRetriesExceeded<CbWaitNav2Nodes, OrNavigation>, StFinalState, ABORT>\n  > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // Wait for Nav2 nodes to be active (PlannerServer, ControllerServer, BtNavigator)\n    // This ensures the navigation stack is ready before attempting to navigate\n    configure_orthogonal<OrNavigation, CbWaitNav2Nodes>();\n\n    // Keyboard behavior for manual control\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure()\n  {\n    // Increment attempt counter first\n    int attemptCount = 0;\n    this->getGlobalSMData(ATTEMPT_COUNTER_KEY, attemptCount);\n    attemptCount++;\n    this->setGlobalSMData(ATTEMPT_COUNTER_KEY, attemptCount);\n\n    // Check if max attempts exceeded (1 initial + MAX_RETRIES)\n    if (attemptCount > MAX_ATTEMPTS)\n    {\n      RCLCPP_ERROR(\n        getLogger(),\n        \"StSetInitialPose: All %d attempts failed, aborting mission\", MAX_ATTEMPTS);\n      // Post abort event - this will be processed and transition to StFinalState\n      this->postEvent<EvMaxRetriesExceeded<CbWaitNav2Nodes, OrNavigation>>();\n      return;\n    }\n\n    // Log current attempt\n    if (attemptCount == 1)\n    {\n      RCLCPP_INFO(getLogger(), \"StSetInitialPose: Initial attempt (1 of %d)\", MAX_ATTEMPTS);\n    }\n    else\n    {\n      RCLCPP_WARN(\n        getLogger(),\n        \"StSetInitialPose: Retry %d of %d (attempt %d of %d)\",\n        attemptCount - 1, MAX_RETRIES, attemptCount, MAX_ATTEMPTS);\n    }\n\n    RCLCPP_INFO(getLogger(), \"StSetInitialPose: runtimeConfigure() - Setting initial pose for AMCL\");\n\n    // Set initial pose for AMCL localization\n    // Robot spawns at x=-2.0, y=-0.5 in tb3_simulation_launch.py\n    cl_nav2z::ClNav2Z* navClient;\n    requiresClient(navClient);\n\n    cl_nav2z::CpAmcl* amclComponent = navClient->getComponent<cl_nav2z::CpAmcl>();\n\n    geometry_msgs::msg::PoseWithCovarianceStamped initialPose;\n    initialPose.header.frame_id = \"map\";\n    initialPose.header.stamp = getNode()->now();\n    initialPose.pose.pose.position.x = -2.0;\n    initialPose.pose.pose.position.y = -0.5;\n    initialPose.pose.pose.position.z = 0.0;\n    initialPose.pose.pose.orientation.x = 0.0;\n    initialPose.pose.pose.orientation.y = 0.0;\n    initialPose.pose.pose.orientation.z = 0.0;\n    initialPose.pose.pose.orientation.w = 1.0;\n    // Set covariance (small values for good initial estimate)\n    initialPose.pose.covariance[0] = 0.25;   // x variance\n    initialPose.pose.covariance[7] = 0.25;   // y variance\n    initialPose.pose.covariance[35] = 0.06;  // yaw variance\n\n    amclComponent->setInitialPose(initialPose);\n    RCLCPP_INFO(getLogger(), \"StSetInitialPose: Initial pose published (x=-2.0, y=-0.5), waiting for transform...\");\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"StSetInitialPose: onEntry() - Waiting for Nav2 nodes to be active\");\n  }\n\n  void onExit()\n  {\n    RCLCPP_INFO(getLogger(), \"StSetInitialPose: onExit()\");\n  }\n\n  // Reset attempt counter on successful exit to navigation\n  void onExit(SUCCESS)\n  {\n    // Clear attempt counter on success\n    this->setGlobalSMData(ATTEMPT_COUNTER_KEY, 0);\n    RCLCPP_INFO(getLogger(), \"StSetInitialPose: Localization successful, proceeding to navigation\");\n  }\n\n  void onExit(ABORT)\n  {\n    RCLCPP_ERROR(getLogger(), \"StSetInitialPose: Localization failed after max retries, aborting\");\n  }\n};\n\n}  // namespace sm_nav2_gazebo_test_1\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/launch/sm_nav2_gazebo_test_1.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\n\nfrom ament_index_python.packages import get_package_share_directory\nfrom launch import LaunchDescription\nfrom launch.actions import DeclareLaunchArgument, IncludeLaunchDescription\nfrom launch.launch_description_sources import PythonLaunchDescriptionSource\nfrom launch.substitutions import LaunchConfiguration, PathJoinSubstitution\nfrom launch_ros.actions import Node\nfrom launch_ros.substitutions import FindPackageShare\n\n\ndef generate_launch_description():\n    # Get package share directory\n    pkg_share = get_package_share_directory(\"sm_nav2_gazebo_test_1\")\n\n    # Declare launch arguments\n    use_sim_time = LaunchConfiguration(\"use_sim_time\", default=\"true\")\n    headless = LaunchConfiguration(\"headless\", default=\"False\")\n\n    declare_use_sim_time = DeclareLaunchArgument(\n        \"use_sim_time\", default_value=\"true\", description=\"Use simulation (Gazebo) clock if true\"\n    )\n\n    declare_headless = DeclareLaunchArgument(\n        \"headless\", default_value=\"False\", description=\"Run Gazebo in headless mode if true\"\n    )\n\n    # Include Nav2 TurtleBot3 simulation launch\n    nav2_bringup_launch = IncludeLaunchDescription(\n        PythonLaunchDescriptionSource(\n            [\n                PathJoinSubstitution(\n                    [FindPackageShare(\"nav2_bringup\"), \"launch\", \"tb3_simulation_launch.py\"]\n                )\n            ]\n        ),\n        launch_arguments={\n            \"headless\": headless,\n            \"use_sim_time\": use_sim_time,\n        }.items(),\n    )\n\n    # Keyboard server node - opens in konsole terminal for keyboard input\n    keyboard_server_node = Node(\n        package=\"cl_keyboard\",\n        executable=\"keyboard_server_node.py\",\n        name=\"keyboard_server_node\",\n        output=\"screen\",\n        prefix=\"konsole --hold -p tabtitle='Keyboard Server' -e\",\n        arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n    )\n\n    # State machine node\n    sm_node = Node(\n        package=\"sm_nav2_gazebo_test_1\",\n        executable=\"sm_nav2_gazebo_test_1_node\",\n        name=\"sm_nav2_gazebo_test_1\",\n        output=\"screen\",\n        parameters=[{\"use_sim_time\": True}],\n    )\n\n    return LaunchDescription(\n        [\n            declare_use_sim_time,\n            declare_headless,\n            nav2_bringup_launch,\n            keyboard_server_node,\n            sm_node,\n        ]\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<package format=\"3\">\n  <name>sm_nav2_gazebo_test_1</name>\n  <version>0.1.0</version>\n  <description>Nav2 unit test state machine for SMACC2</description>\n  <maintainer email=\"user@example.com\">User</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n  <depend>cl_ros2_timer</depend>\n  <depend>cl_keyboard</depend>\n  <depend>cl_nav2z</depend>\n  <depend>geometry_msgs</depend>\n\n  <exec_depend>nav2_bringup</exec_depend>\n  <exec_depend>xterm</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_nav2_gazebo_test_1/src/sm_nav2_gazebo_test_1/sm_nav2_gazebo_test_1_node.cpp",
    "content": "// Copyright 2024 RobosoftAI Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_nav2_gazebo_test_1/sm_nav2_gazebo_test_1.hpp>\n\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_nav2_gazebo_test_1::SmNav2GazeboTest1>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/CHANGELOG.rst",
    "content": "Changelog for package sm_pack_ml\n====================================\n\nVersion 2.3.16 (2023-07-16)\n---------------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2 <https://github.com/robosoft-ai/SMACC2>`_\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for ros buildfarm issue\n  - Further work on buildfarm problem\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n- Contributors: brettpac, pabloinigoblasco\n\nVersion 2.3.6 (2023-03-12)\n--------------------------\nNo changes documented.\n\nVersion 1.22.1 (2022-11-09)\n---------------------------\n### Added\n- Pre-release\n- Contributors: pabloinigoblasco\n\n### Changed\n- Packml example (#300)\n  - Initial commit of packml\n  - Progressing substate for start and execute\n  - Completing state\n  - Finishing state machine\n  - Minor adjustments\n  - Fixed break in packml\n  - Merged galactic changes\n  - Squashed commit including:\n    - Husky improvements\n    - Different planners profiles for navigation\n    - Changes from galactic\n    - Planner switcher\n    - Using galactic branch files\n    - Fixed breaking changes\n    - Minor fixes\n    - Removed nav from source files\n    - Merge\n  - Updated README.md (#307) by brettpac\n  - Updated CI setup (#305) by Denis Štogl\n  - Fixed CI due to ros2_control API changes (#301)\n- Contributors: Pablo Iñigo Blasco\n\nVersion 0.3.0 (2022-04-04)\n--------------------------\nNo changes documented.\n\nVersion 0.0.0 (2022-11-09)\n---------------------------\n### Added\n- Packml example (#300)\n  - Initial commit of packml\n  - Progressing substate for start and execute\n  - Completing state\n  - Finishing state machine\n  - Minor adjustments\n  - Fixed break in packml\n  - Merged galactic changes\n  - Squashed commit including:\n    - Husky improvements\n    - Different planners profiles for navigation\n    - Changes from galactic\n    - Planner switcher\n    - Using galactic branch files\n    - Fixed breaking changes\n    - Minor fixes\n    - Removed nav from source files\n    - Merge\n  - Updated README.md (#307) by brettpac\n  - Updated CI setup (#305) by Denis Štogl\n  - Fixed CI due to ros2_control API changes (#301)\n- Contributors: Pablo Iñigo Blasco\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.8)\nproject(sm_pack_ml)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(MAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic -std=c++17)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(rclcpp)\nfind_package(smacc2)\nfind_package(std_msgs)\nfind_package(cl_generic_sensor)\nfind_package(sr_all_events_go)\nfind_package(cl_ros2_timer)\nfind_package(cl_keyboard)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\nset(dependencies\n  rclcpp\n  smacc2\n  std_msgs\n  cl_generic_sensor\n  sr_all_events_go\n  cl_ros2_timer\n  cl_keyboard\n)\n\ninclude_directories(include\n  ${rclcpp_INCLUDE_DIRS}\n  ${smacc2_INCLUDE_DIRS}\n  ${cl_ros2_timer_INCLUDE_DIRS}\n  ${cl_keyboard_INCLUDE_DIRS}\n  ${std_msgs_INCLUDE_DIRS}\n  ${sr_all_events_go_INCLUDE_DIRS}\n)\n\nadd_executable(${PROJECT_NAME}_node src/sm_pack_ml_node.cpp)\n\nament_target_dependencies(${PROJECT_NAME}_node ${dependencies})\nament_export_include_directories(include)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${rclcpp_LIBRARIES}\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${cl_keyboard_LIBRARIES}\n  ${std_msgs_LIBRARIES}\n  ${sr_all_events_go_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_package()\n\ninstall(TARGETS ${PROJECT_NAME}_node\n  ARCHIVE DESTINATION lib                 # static libraries\n  LIBRARY DESTINATION lib                 # dynamic libraries\n  RUNTIME DESTINATION lib/${PROJECT_NAME} # executables\n)\n\ninstall(\n  DIRECTORY launch/\n  DESTINATION share/${PROJECT_NAME}\n)\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ![sm_pack_ml](docs/SmPackMl1_2023-5-25_9483.svg)\n\n <h2>Description</h2> A large multi stage state machine that implements the PackML mode design.<br></br>\n\n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n<h2>Operating Instructions</h2>\nAfter you build, remember to source the workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_pack_ml sm_pack_ml.py\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>.\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/config/sm_multi_stage_1_config.yaml",
    "content": "SmPackMl1:\n   signal_detector_loop_freq: 20\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/clients/cl_subscriber/cl_subscriber.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <smacc2/client_bases/smacc_subscriber_client.hpp>\n#include <std_msgs/msg/u_int16.hpp>\n\nnamespace sm_pack_ml\n{\nnamespace cl_subscriber\n{\nclass ClSubscriber : public smacc2::client_bases::SmaccSubscriberClient<std_msgs::msg::UInt16>\n{\n};\n}  // namespace cl_subscriber\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/clients/cl_subscriber/client_behaviors/cb_default_subscriber_behavior.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <sm_pack_ml/clients/cl_subscriber/cl_subscriber.hpp>\n\nnamespace sm_pack_ml\n{\nnamespace cl_subscriber\n{\nclass CbDefaultSubscriberBehavior : public smacc2::SmaccClientBehavior\n{\npublic:\n  typedef std_msgs::msg::UInt16 TMessageType;\n  //-------------------------------------------------------------------------------\n  void onEntry() {}\n};\n}  // namespace cl_subscriber\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/clients/cl_subscriber/client_behaviors/cb_watchdog_subscriber_behavior.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <sm_pack_ml/clients/cl_subscriber/cl_subscriber.hpp>\n\nnamespace sm_pack_ml\n{\nnamespace cl_subscriber\n{\nclass CbWatchdogSubscriberBehavior : public smacc2::SmaccClientBehavior\n{\npublic:\n  typedef std_msgs::msg::UInt16 TMessageType;\n\n  void onEntry() {}\n};\n}  // namespace cl_subscriber\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/domain_states/ds_clearing.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct DsClearing : smacc2::SmaccState<DsClearing, JsActive>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvSc, DsStopped, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/domain_states/ds_run.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct DsRun : smacc2::SmaccState<DsRun, JsActive, MsIdle>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvStop, DsStopping, SUCCESS>\n\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/domain_states/ds_stopped.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct DsStopped : smacc2::SmaccState<DsStopped, JsActive>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvReset, DsRun, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/domain_states/ds_stopping.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct DsStopping : smacc2::SmaccState<DsStopping, JsActive>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvSc, DsStopped, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/j_states/js_aborted.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct JsAborted : smacc2::SmaccState<JsAborted, SmPackMl1>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n      smacc2::Transition<EvClear, DsClearing, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/j_states/js_aborting.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct JsAborting : smacc2::SmaccState<JsAborting, SmPackMl1>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n      smacc2::Transition<EvSc, JsAborted, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/j_states/js_active.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct JsActive : smacc2::SmaccState<JsActive, SmPackMl1, DsRun>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/mode_states/ms_complete.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct MsComplete : smacc2::SmaccState<MsComplete, DsRun>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvReset, MsResetting, SUCCESS>\n\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/mode_states/ms_completing.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct MsCompleting : smacc2::SmaccState<MsCompleting, DsRun, CompletingStObserve>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n\n  static constexpr int ztotal_iterations() { return 1; }\n  int ziteration_count = 0;\n\n\n  static constexpr int ytotal_iterations() { return 1; }\n  int yiteration_count = 0;\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/mode_states/ms_execute.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct MsExecute : smacc2::SmaccState<MsExecute, DsRun, ExecuteStObserve>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvSc, MsCompleting, SUCCESS>,\n    smacc2::Transition<EvSuspend, MsSuspending, SUCCESS>,\n    smacc2::Transition<EvHold, MsHolding, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n\n  static constexpr int ztotal_iterations() { return 1; }\n  int ziteration_count = 0;\n\n\n  static constexpr int ytotal_iterations() { return 1; }\n  int yiteration_count = 0;\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/mode_states/ms_held.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct MsHeld : smacc2::SmaccState<MsHeld, DsRun>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvUnhold, MsUnholding, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/mode_states/ms_holding.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct MsHolding : smacc2::SmaccState<MsHolding, DsRun, HoldingStObserve>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvSc, MsHeld, SUCCESS>\n\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n\n  static constexpr int ztotal_iterations() { return 1; }\n  int ziteration_count = 0;\n\n\n  static constexpr int ytotal_iterations() { return 1; }\n  int yiteration_count = 0;\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/mode_states/ms_idle.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct MsIdle : smacc2::SmaccState<MsIdle, DsRun>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvStart, MsStarting, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/mode_states/ms_resetting.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct MsResetting : smacc2::SmaccState<MsResetting, DsRun>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvSc, MsIdle, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/mode_states/ms_starting.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct MsStarting : smacc2::SmaccState<MsStarting, DsRun, StartStObserve>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvSc, MsExecute, SUCCESS>\n\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n\n  static constexpr int ztotal_iterations() { return 1; }\n  int ziteration_count = 0;\n\n\n  static constexpr int ytotal_iterations() { return 1; }\n  int yiteration_count = 0;\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/mode_states/ms_suspended.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct MsSuspended : smacc2::SmaccState<MsSuspended, DsRun>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvUnSuspend, MsUnsuspending, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n\n  static constexpr int ztotal_iterations() { return 1; }\n  int ziteration_count = 0;\n\n\n  static constexpr int ytotal_iterations() { return 1; }\n  int yiteration_count = 0;\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/mode_states/ms_suspending.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct MsSuspending : smacc2::SmaccState<MsSuspending, DsRun, SuspendingStObserve>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvSc, MsSuspended, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n\n  static constexpr int ztotal_iterations() { return 1; }\n  int ziteration_count = 0;\n\n\n  static constexpr int ytotal_iterations() { return 1; }\n  int yiteration_count = 0;\n\n\n  static constexpr int dtotal_iterations() { return 1; }\n  int diteration_count = 0;\n\n  static constexpr int gtotal_iterations() { return 1; }\n  int giteration_count = 0;\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/mode_states/ms_unholding.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct MsUnholding : smacc2::SmaccState<MsUnholding, DsRun>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvSc, MsExecute, SUCCESS>\n\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/mode_states/ms_unsuspending.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct MsUnsuspending : smacc2::SmaccState<MsUnsuspending, DsRun>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/orthogonals/or_keyboard.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\nnamespace sm_pack_ml\n{\nclass OrKeyboard : public smacc2::Orthogonal<OrKeyboard>\n{\npublic:\n  virtual void onInitialize() override\n  {\n    auto clKeyboard = this->createClient<cl_keyboard::ClKeyboard>();\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/orthogonals/or_subscriber.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <sm_pack_ml/clients/cl_subscriber/cl_subscriber.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n\nnamespace sm_pack_ml\n{\nusing namespace sm_pack_ml::cl_subscriber;\n\nclass OrSubscriber : public smacc2::Orthogonal<OrSubscriber>\n{\npublic:\n  virtual void onInitialize() override\n  {\n    auto subscriber_client = this->createClient<ClSubscriber>();\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/orthogonals/or_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n\nnamespace sm_pack_ml\n{\nusing namespace std::chrono_literals;\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  virtual void onInitialize() override\n  {\n    auto actionclient = this->createClient<cl_ros2_timer::ClRos2Timer>(rclcpp::Duration(0.1s));\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/sm_pack_ml.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <rclcpp/rclcpp.hpp>\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n\n// ORTHOGONALS\n#include <sm_pack_ml/orthogonals/or_keyboard.hpp>\n#include <sm_pack_ml/orthogonals/or_subscriber.hpp>\n#include <sm_pack_ml/orthogonals/or_timer.hpp>\n\nusing namespace cl_ros2_timer;\nusing namespace cl_keyboard;\nusing namespace sm_pack_ml::cl_subscriber;\n\n//CLIENT BEHAVIORS\n#include <sm_pack_ml/clients/cl_subscriber/client_behaviors/cb_default_subscriber_behavior.hpp>\n#include <sm_pack_ml/clients/cl_subscriber/client_behaviors/cb_watchdog_subscriber_behavior.hpp>\n\n#include <cl_keyboard/client_behaviors/cb_default_keyboard_behavior.hpp>\n\n//#include <cl_ros2_timer/client_behaviors/cb_ros_timer.hpp>\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n\n//STATE REACTORS\n#include <sr_all_events_go/sr_all_events_go.hpp>\n\nusing namespace smacc2;\nusing namespace smacc2::state_reactors;\nusing namespace smacc2::default_events;\n\nnamespace sm_pack_ml\n{\nclass JsAborting;\nclass JsActive;\nclass JsAborted;\n\nclass DsClearing;\nclass DsRun;\nclass DsStopped;\nclass DsStopping;\n\nclass MsComplete;\nclass MsCompleting;\nclass MsExecute;\nclass MsHeld;\nclass MsHolding;\nclass MsIdle;\nclass MsResetting;\nclass MsStarting;\nclass MsSuspended;\nclass MsSuspending;\nclass MsUnholding;\nclass MsUnsuspending;\n\n//SUPERSTATES\nclass SsExecuteSequenceA;\nnamespace execute_sequence_a\n{\nclass StiExecuteSequenceALoop;\nclass StiExecuteSequenceAStep1;\nclass StiExecuteSequenceAStep2;\nclass StiExecuteSequenceAStep3;\nclass StiExecuteSequenceAStep4;\nclass StiExecuteSequenceAStep5;\nclass StiExecuteSequenceAStep6;\nclass StiExecuteSequenceAStep7;\nclass StiExecuteSequenceAStep8;\nclass StiExecuteSequenceAStep9;\n}  // namespace execute_sequence_a\n\nclass SsStartSequenceA;\nnamespace start_sequence_a\n{\nclass StiStartSequenceALoop;\nclass StiStartSequenceAStep1;\nclass StiStartSequenceAStep2;\nclass StiStartSequenceAStep3;\nclass StiStartSequenceAStep4;\nclass StiStartSequenceAStep5;\nclass StiStartSequenceAStep6;\nclass StiStartSequenceAStep7;\nclass StiStartSequenceAStep8;\nclass StiStartSequenceAStep9;\n}  // namespace start_sequence_a\n\nclass SsCompletingSequenceA;\nnamespace completing_sequence_a\n{\nclass StiCompletingSequenceALoop;\nclass StiCompletingSequenceAStep1;\nclass StiCompletingSequenceAStep2;\nclass StiCompletingSequenceAStep3;\nclass StiCompletingSequenceAStep4;\nclass StiCompletingSequenceAStep5;\nclass StiCompletingSequenceAStep6;\nclass StiCompletingSequenceAStep7;\nclass StiCompletingSequenceAStep8;\nclass StiCompletingSequenceAStep9;\n}  // namespace completing_sequence_a\n\nclass SsSuspendingSequenceA;\nnamespace suspending_sequence_a\n{\nclass StiSuspendingSequenceALoop;\nclass StiSuspendingSequenceAStep1;\nclass StiSuspendingSequenceAStep2;\nclass StiSuspendingSequenceAStep3;\nclass StiSuspendingSequenceAStep4;\nclass StiSuspendingSequenceAStep5;\nclass StiSuspendingSequenceAStep6;\nclass StiSuspendingSequenceAStep7;\nclass StiSuspendingSequenceAStep8;\nclass StiSuspendingSequenceAStep9;\n}  // namespace suspending_sequence_a\n\nclass SsSuspendingSequenceC;\nnamespace suspending_sequence_c\n{\nclass StiSuspendingSequenceCLoop;\nclass StiSuspendingSequenceCStep1;\nclass StiSuspendingSequenceCStep2;\nclass StiSuspendingSequenceCStep3;\nclass StiSuspendingSequenceCStep4;\nclass StiSuspendingSequenceCStep5;\nclass StiSuspendingSequenceCStep6;\nclass StiSuspendingSequenceCStep7;\nclass StiSuspendingSequenceCStep8;\nclass StiSuspendingSequenceCStep9;\n}  // namespace suspending_sequence_c\n\nclass SsSuspendingSequenceD;\nnamespace suspending_sequence_d\n{\nclass StiSuspendingSequenceDLoop;\nclass StiSuspendingSequenceDStep1;\nclass StiSuspendingSequenceDStep2;\nclass StiSuspendingSequenceDStep3;\nclass StiSuspendingSequenceDStep4;\nclass StiSuspendingSequenceDStep5;\nclass StiSuspendingSequenceDStep6;\nclass StiSuspendingSequenceDStep7;\nclass StiSuspendingSequenceDStep8;\nclass StiSuspendingSequenceDStep9;\n}  // namespace suspending_sequence_d\n\nclass SsHoldingSequenceA;\nnamespace holding_sequence_a\n{\nclass StiHoldingSequenceALoop;\nclass StiHoldingSequenceAStep1;\nclass StiHoldingSequenceAStep2;\nclass StiHoldingSequenceAStep3;\nclass StiHoldingSequenceAStep4;\nclass StiHoldingSequenceAStep5;\nclass StiHoldingSequenceAStep6;\nclass StiHoldingSequenceAStep7;\nclass StiHoldingSequenceAStep8;\nclass StiHoldingSequenceAStep9;\n}  // namespace holding_sequence_a\n\n\nclass SsExecuteSequenceB;\nnamespace execute_sequence_b\n{\n//FORWARD DECLARATIONS OF ALL INNER STATES\nclass StiExecuteSequenceBLoop;\nclass StiExecuteSequenceBStep1;\nclass StiExecuteSequenceBStep2;\nclass StiExecuteSequenceBStep3;\nclass StiExecuteSequenceBStep4;\nclass StiExecuteSequenceBStep5;\nclass StiExecuteSequenceBStep6;\nclass StiExecuteSequenceBStep7;\nclass StiExecuteSequenceBStep8;\nclass StiExecuteSequenceBStep9;\n}  // namespace execute_sequence_b\n\nclass SsStartSequenceB;\n\nnamespace start_sequence_b\n{\n//FORWARD DECLARATIONS OF ALL INNER STATES\nclass StiStartSequenceBLoop;\nclass StiStartSequenceBStep1;\nclass StiStartSequenceBStep2;\nclass StiStartSequenceBStep3;\nclass StiStartSequenceBStep4;\nclass StiStartSequenceBStep5;\nclass StiStartSequenceBStep6;\nclass StiStartSequenceBStep7;\nclass StiStartSequenceBStep8;\nclass StiStartSequenceBStep9;\n}  // namespace start_sequence_b\n\nclass SsCompletingSequenceB;\n\nnamespace completing_sequence_b\n{\n//FORWARD DECLARATIONS OF ALL INNER STATES\nclass StiCompletingSequenceBLoop;\nclass StiCompletingSequenceBStep1;\nclass StiCompletingSequenceBStep2;\nclass StiCompletingSequenceBStep3;\nclass StiCompletingSequenceBStep4;\nclass StiCompletingSequenceBStep5;\nclass StiCompletingSequenceBStep6;\nclass StiCompletingSequenceBStep7;\nclass StiCompletingSequenceBStep8;\nclass StiCompletingSequenceBStep9;\n}  // namespace completing_sequence_b\n\nclass SsSuspendingSequenceB;\n\nnamespace suspending_sequence_b\n{\n//FORWARD DECLARATIONS OF ALL INNER STATES\nclass StiSuspendingSequenceB;\nclass StiSuspendingSequenceBStep1;\nclass StiSuspendingSequenceBStep2;\nclass StiSuspendingSequenceBStep3;\nclass StiSuspendingSequenceBStep4;\nclass StiSuspendingSequenceBStep5;\nclass StiSuspendingSequenceBStep6;\nclass StiSuspendingSequenceBStep7;\nclass StiSuspendingSequenceBStep8;\nclass StiSuspendingSequenceBStep9;\n}  // namespace suspending_sequence_b\n\nclass SsHoldingSequenceB;\n\nnamespace holding_sequence_b\n{\n//FORWARD DECLARATIONS OF ALL INNER STATES\nclass StiHoldingSequenceBLoop;\nclass StiHoldingSequenceBStep1;\nclass StiHoldingSequenceBStep2;\nclass StiHoldingSequenceBStep3;\nclass StiHoldingSequenceBStep4;\nclass StiHoldingSequenceBStep5;\nclass StiHoldingSequenceBStep6;\nclass StiHoldingSequenceBStep7;\nclass StiHoldingSequenceBStep8;\nclass StiHoldingSequenceBStep9;\n}  // namespace holding_sequence_b\n\n//STATES\nclass ExecuteStObserve;\nclass StRecoveryAnalyze1;\nclass StRecoveryBifurcate1;\nclass StRecoveryCalculate1;\nclass StRecoveryDeliberate1;\nclass StRecoveryEvaluate1;\nclass StRecoveryGenerate1;\nclass StRecoveryInnervate1;\n\nclass StartStObserve;\nclass StRecoveryAnalyze2;\nclass StRecoveryBifurcate2;\nclass StRecoveryCalculate2;\nclass StRecoveryDeliberate2;\nclass StRecoveryEvaluate2;\nclass StRecoveryGenerate2;\nclass StRecoveryInnervate2;\n\nclass CompletingStObserve;\nclass SuspendingStObserve;\nclass HoldingStObserve;\n\n\nclass ExecuteSequenceALoop;\nclass ExecuteSequenceBLoop;\nclass StartSequenceALoop;\nclass StartSequenceBLoop;\nclass CompletingSequenceALoop;\nclass CompletingSequenceBLoop;\nclass SuspendingSequenceALoop;\nclass SuspendingSequenceCLoop;\nclass SuspendingSequenceDLoop;\nclass SuspendingSequenceBLoop;\nclass HoldingSequenceALoop;\nclass HoldingSequenceBLoop;\n\n\n//MODE STATES\nclass MsExecute;\nclass MsRecovery1;\n\n//MODE STATES\nclass MsStarting;\nclass MsRecovery2;\n\nclass MsCompleting;\nclass MsSuspending;\nclass MsHolding;\n\nstruct EvToDeep : sc::event<EvToDeep>\n{\n};\n\nstruct EvFail : sc::event<EvFail>\n{\n};\n\nstruct EvSc : sc::event<EvSc>\n{\n};\n\nstruct EvStart : sc::event<EvStart>\n{\n};\n\nstruct EvReset : sc::event<EvReset>\n{\n};\n\nstruct EvSuspend : sc::event<EvSuspend>\n{\n};\n\nstruct EvUnSuspend : sc::event<EvUnSuspend>\n{\n};\n\nstruct EvHold : sc::event<EvHold>\n{\n};\n\nstruct EvUnhold:sc::event<EvUnhold>\n{\n};\n\nstruct EvStop:sc::event<EvStop>\n{\n};\n\nstruct EvClear:sc::event<EvClear>\n{\n};\n\n// STATE MACHINE\nstruct SmPackMl1 : public smacc2::SmaccStateMachineBase<SmPackMl1, JsActive>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  virtual void onInitialize() override\n  {\n    this->createOrthogonal<OrTimer>();\n    this->createOrthogonal<OrKeyboard>();\n    this->createOrthogonal<OrSubscriber>();\n  }\n};\n}  // namespace sm_pack_ml\n\n#include \"j_states/js_aborted.hpp\"\n#include \"j_states/js_aborting.hpp\"\n#include \"j_states/js_active.hpp\"\n\n#include \"domain_states/ds_clearing.hpp\"\n#include \"domain_states/ds_run.hpp\"\n#include \"domain_states/ds_stopped.hpp\"\n#include \"domain_states/ds_stopping.hpp\"\n\n#include \"mode_states/ms_complete.hpp\"\n#include \"mode_states/ms_completing.hpp\"\n#include \"mode_states/ms_execute.hpp\"\n#include \"mode_states/ms_held.hpp\"\n#include \"mode_states/ms_holding.hpp\"\n#include \"mode_states/ms_idle.hpp\"\n#include \"mode_states/ms_resetting.hpp\"\n#include \"mode_states/ms_starting.hpp\"\n#include \"mode_states/ms_suspended.hpp\"\n#include \"mode_states/ms_suspending.hpp\"\n#include \"mode_states/ms_unholding.hpp\"\n#include \"mode_states/ms_unsuspending.hpp\"\n\n// //STATES\n// #include <sm_pack_ml/states/ms_recovery_1/st_recovery_analyze_1.hpp>\n// #include <sm_pack_ml/states/ms_recovery_1/st_recovery_bifurcate_1.hpp>\n// #include <sm_pack_ml/states/ms_recovery_1/st_recovery_calculate_1.hpp>\n// #include <sm_pack_ml/states/ms_recovery_1/st_recovery_deliberate_1.hpp>\n// #include <sm_pack_ml/states/ms_recovery_1/st_recovery_evaluate_1.hpp>\n// #include <sm_pack_ml/states/ms_recovery_1/st_recovery_generate_1.hpp>\n// #include <sm_pack_ml/states/ms_recovery_1/st_recovery_innervate_1.hpp>\n\n// #include <sm_pack_ml/states/ms_recovery_2/st_recovery_analyze_2.hpp>\n// #include <sm_pack_ml/states/ms_recovery_2/st_recovery_bifurcate_2.hpp>\n// #include <sm_pack_ml/states/ms_recovery_2/st_recovery_calculate_2.hpp>\n// #include <sm_pack_ml/states/ms_recovery_2/st_recovery_deliberate_2.hpp>\n// #include <sm_pack_ml/states/ms_recovery_2/st_recovery_evaluate_2.hpp>\n// #include <sm_pack_ml/states/ms_recovery_2/st_recovery_generate_2.hpp>\n// #include <sm_pack_ml/states/ms_recovery_2/st_recovery_innervate_2.hpp>\n\n#include \"states/execute_sequence_a_loop.hpp\"\n#include \"states/start_sequence_a_loop.hpp\"\n\n#include <sm_pack_ml/states/completing_sequence_a_loop.hpp>\n#include <sm_pack_ml/states/suspending_sequence_a_loop.hpp>\n#include <sm_pack_ml/states/holding_sequence_a_loop.hpp>\n\n#include <sm_pack_ml/states/suspending_sequence_c_loop.hpp>\n#include <sm_pack_ml/states/suspending_sequence_d_loop.hpp>\n\n#include <sm_pack_ml/states/execute_sequence_b_loop.hpp>\n#include <sm_pack_ml/states/start_sequence_b_loop.hpp>\n#include <sm_pack_ml/states/completing_sequence_b_loop.hpp>\n#include <sm_pack_ml/states/suspending_sequence_b_loop.hpp>\n#include <sm_pack_ml/states/holding_sequence_b_loop.hpp>\n\n#include <sm_pack_ml/states/execute_st_observe.hpp>\n#include <sm_pack_ml/states/start_st_observe.hpp>\n#include <sm_pack_ml/states/completing_st_observe.hpp>\n#include <sm_pack_ml/states/suspending_st_observe.hpp>\n#include <sm_pack_ml/states/holding_st_observe.hpp>\n\n#include <sm_pack_ml/superstates/ss_execute_sequence_a.hpp>\n#include <sm_pack_ml/superstates/ss_start_sequence_a.hpp>\n#include <sm_pack_ml/superstates/ss_completing_sequence_a.hpp>\n#include <sm_pack_ml/superstates/ss_suspending_sequence_a.hpp>\n#include <sm_pack_ml/superstates/ss_holding_sequence_a.hpp>\n\n#include <sm_pack_ml/superstates/ss_suspending_sequence_c.hpp>\n#include <sm_pack_ml/superstates/ss_suspending_sequence_d.hpp>\n\n#include <sm_pack_ml/superstates/ss_execute_sequence_b.hpp>\n#include <sm_pack_ml/superstates/ss_start_sequence_b.hpp>\n#include <sm_pack_ml/superstates/ss_completing_sequence_b.hpp>\n#include <sm_pack_ml/superstates/ss_suspending_sequence_b.hpp>\n#include <sm_pack_ml/superstates/ss_holding_sequence_b.hpp>\n\n// //ss_execute_sequence_a\n#include \"states/execute_sequence_a/sti_execute_sequence_a_step_4.hpp\"\n#include \"states/execute_sequence_a/sti_execute_sequence_a_step_3.hpp\"\n#include \"states/execute_sequence_a/sti_execute_sequence_a_step_1.hpp\"\n#include \"states/execute_sequence_a/sti_execute_sequence_a_loop.hpp\"\n#include \"states/execute_sequence_a/sti_execute_sequence_a_step_2.hpp\"\n#include \"states/execute_sequence_a/sti_execute_sequence_a_step_5.hpp\"\n#include \"states/execute_sequence_a/sti_execute_sequence_a_step_9.hpp\"\n#include \"states/execute_sequence_a/sti_execute_sequence_a_step_8.hpp\"\n#include \"states/execute_sequence_a/sti_execute_sequence_a_step_7.hpp\"\n#include \"states/execute_sequence_a/sti_execute_sequence_a_step_6.hpp\"\n\n// //ss_start_sequence_a\n#include \"states/start_sequence_a/sti_start_sequence_a_step_4.hpp\"\n#include \"states/start_sequence_a/sti_start_sequence_a_step_3.hpp\"\n#include \"states/start_sequence_a/sti_start_sequence_a_step_1.hpp\"\n#include \"states/start_sequence_a/sti_start_sequence_a_loop.hpp\"\n#include \"states/start_sequence_a/sti_start_sequence_a_step_2.hpp\"\n#include \"states/start_sequence_a/sti_start_sequence_a_step_5.hpp\"\n#include \"states/start_sequence_a/sti_start_sequence_a_step_9.hpp\"\n#include \"states/start_sequence_a/sti_start_sequence_a_step_8.hpp\"\n#include \"states/start_sequence_a/sti_start_sequence_a_step_7.hpp\"\n#include \"states/start_sequence_a/sti_start_sequence_a_step_6.hpp\"\n\n//ss_completing_sequence_a\n#include <sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_4.hpp>\n#include <sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_3.hpp>\n#include <sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_1.hpp>\n#include <sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_loop.hpp>\n#include <sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_2.hpp>\n#include <sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_5.hpp>\n#include <sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_9.hpp>\n#include <sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_8.hpp>\n#include <sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_7.hpp>\n#include <sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_6.hpp>\n\n//ss_suspending_sequence_a\n#include <sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_4.hpp>\n#include <sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_3.hpp>\n#include <sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_1.hpp>\n#include <sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_loop.hpp>\n#include <sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_2.hpp>\n#include <sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_5.hpp>\n#include <sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_9.hpp>\n#include <sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_8.hpp>\n#include <sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_7.hpp>\n#include <sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_6.hpp>\n\n//ss_suspending_sequence_c\n#include <sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_loop.hpp>\n#include <sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_1.hpp>\n#include <sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_2.hpp>\n#include <sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_3.hpp>\n#include <sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_4.hpp>\n#include <sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_5.hpp>\n#include <sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_6.hpp>\n#include <sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_7.hpp>\n#include <sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_8.hpp>\n#include <sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_9.hpp>\n\n//ss_suspending_sequence_d\n#include <sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_4.hpp>\n#include <sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_3.hpp>\n#include <sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_1.hpp>\n#include <sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_loop.hpp>\n#include <sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_2.hpp>\n#include <sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_5.hpp>\n#include <sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_9.hpp>\n#include <sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_8.hpp>\n#include <sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_7.hpp>\n#include <sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_6.hpp>\n\n//ss_holding_sequence_a\n#include <sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_4.hpp>\n#include <sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_3.hpp>\n#include <sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_1.hpp>\n#include <sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_loop.hpp>\n#include <sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_2.hpp>\n#include <sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_5.hpp>\n#include <sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_9.hpp>\n#include <sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_8.hpp>\n#include <sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_7.hpp>\n#include <sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_6.hpp>\n\n// //ss_execute_sequence_b\n#include \"states/execute_sequence_b/sti_execute_sequence_b_step_4.hpp\"\n#include \"states/execute_sequence_b/sti_execute_sequence_b_step_3.hpp\"\n#include \"states/execute_sequence_b/sti_execute_sequence_b_step_1.hpp\"\n#include \"states/execute_sequence_b/sti_execute_sequence_b_loop.hpp\"\n#include \"states/execute_sequence_b/sti_execute_sequence_b_step_2.hpp\"\n#include \"states/execute_sequence_b/sti_execute_sequence_b_step_5.hpp\"\n#include \"states/execute_sequence_b/sti_execute_sequence_b_step_9.hpp\"\n#include \"states/execute_sequence_b/sti_execute_sequence_b_step_8.hpp\"\n#include \"states/execute_sequence_b/sti_execute_sequence_b_step_7.hpp\"\n#include \"states/execute_sequence_b/sti_execute_sequence_b_step_6.hpp\"\n\n// //ss_mode_2_sequence_b\n#include \"states/start_sequence_b/sti_start_sequence_b_step_4.hpp\"\n#include \"states/start_sequence_b/sti_start_sequence_b_step_3.hpp\"\n#include \"states/start_sequence_b/sti_start_sequence_b_step_1.hpp\"\n#include \"states/start_sequence_b/sti_start_sequence_b_loop.hpp\"\n#include \"states/start_sequence_b/sti_start_sequence_b_step_2.hpp\"\n#include \"states/start_sequence_b/sti_start_sequence_b_step_5.hpp\"\n#include \"states/start_sequence_b/sti_start_sequence_b_step_9.hpp\"\n#include \"states/start_sequence_b/sti_start_sequence_b_step_8.hpp\"\n#include \"states/start_sequence_b/sti_start_sequence_b_step_7.hpp\"\n#include \"states/start_sequence_b/sti_start_sequence_b_step_6.hpp\"\n\n//ss_completing_sequence_b\n#include <sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_4.hpp>\n#include <sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_3.hpp>\n#include <sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_1.hpp>\n#include <sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_loop.hpp>\n#include <sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_2.hpp>\n#include <sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_5.hpp>\n#include <sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_9.hpp>\n#include <sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_8.hpp>\n#include <sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_7.hpp>\n#include <sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_6.hpp>\n\n//ss_suspending_sequence_b\n#include <sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_4.hpp>\n#include <sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_3.hpp>\n#include <sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_1.hpp>\n#include <sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_loop.hpp>\n#include <sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_2.hpp>\n#include <sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_5.hpp>\n#include <sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_9.hpp>\n#include <sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_8.hpp>\n#include <sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_7.hpp>\n#include <sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_6.hpp>\n\n//ss_holding_seqence_b\n#include <sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_4.hpp>\n#include <sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_3.hpp>\n#include <sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_1.hpp>\n#include <sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_loop.hpp>\n#include <sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_2.hpp>\n#include <sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_5.hpp>\n#include <sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_9.hpp>\n#include <sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_8.hpp>\n#include <sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_7.hpp>\n#include <sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_6.hpp>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_a\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceALoop : smacc2::SmaccState<StiCompletingSequenceALoop, SsCompletingSequenceA>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiCompletingSequenceALoop>, StiCompletingSequenceAStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsCompletingSequenceA>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiCompletingSequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_a\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceAStep1 : smacc2::SmaccState<StiCompletingSequenceAStep1, SsCompletingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceAStep2, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep3, NEXT>\n    //Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceALoop, PREVIOUS>,\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_a\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceAStep2 : smacc2::SmaccState<StiCompletingSequenceAStep2, SsCompletingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceAStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_a\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceAStep3 : smacc2::SmaccState<StiCompletingSequenceAStep3, SsCompletingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceAStep4, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_a\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceAStep4 : smacc2::SmaccState<StiCompletingSequenceAStep4, SsCompletingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceAStep5, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep5, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_a\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceAStep5 : smacc2::SmaccState<StiCompletingSequenceAStep5, SsCompletingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceAStep6, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep4, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_a\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceAStep6 : smacc2::SmaccState<StiCompletingSequenceAStep6, SsCompletingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceAStep7, SUCCESS>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_a\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceAStep7 : smacc2::SmaccState<StiCompletingSequenceAStep7, SsCompletingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceAStep8, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n   //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_a\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceAStep8 : smacc2::SmaccState<StiCompletingSequenceAStep8, SsCompletingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceAStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_a/sti_completing_sequence_a_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_a\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceAStep9 : smacc2::SmaccState<StiCompletingSequenceAStep9, SsCompletingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceALoop, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceAStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceALoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n\n// STATE DECLARATION\nstruct CompletingSequenceALoop : smacc2::SmaccState<CompletingSequenceALoop, MsCompleting>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n     Transition<EvLoopContinue<CompletingSequenceALoop>, SsCompletingSequenceA, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsCompleting>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.ziteration_count, superstate.ztotal_iterations());\n    return superstate.ziteration_count++ < superstate.ztotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&CompletingSequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_b\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceBLoop : smacc2::SmaccState<StiCompletingSequenceBLoop, SsCompletingSequenceB>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiCompletingSequenceBLoop>, StiCompletingSequenceBStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsCompletingSequenceB>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiCompletingSequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_b\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceBStep1 : smacc2::SmaccState<StiCompletingSequenceBStep1, SsCompletingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceBStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep2, NEXT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBLoop, PREVIOUS>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_b\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceBStep2 : smacc2::SmaccState<StiCompletingSequenceBStep2, SsCompletingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceBStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_b\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceBStep3 : smacc2::SmaccState<StiCompletingSequenceBStep3, SsCompletingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep4, SUCCESS>,\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceBStep5, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep6, SUCCESS>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_b\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceBStep4 : smacc2::SmaccState<StiCompletingSequenceBStep4, SsCompletingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceBStep7, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep7, NEXT>\n\n    //ransition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_b\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceBStep5 : smacc2::SmaccState<StiCompletingSequenceBStep5, SsCompletingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceBStep7, SUCCESS>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_b\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceBStep6 : smacc2::SmaccState<StiCompletingSequenceBStep6, SsCompletingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceBStep7, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep5, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_b\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceBStep7 : smacc2::SmaccState<StiCompletingSequenceBStep7, SsCompletingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceBStep8, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_b\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceBStep8 : smacc2::SmaccState<StiCompletingSequenceBStep8, SsCompletingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceBStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_b/sti_completing_sequence_b_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace completing_sequence_b\n{\n// STATE DECLARATION\nstruct StiCompletingSequenceBStep9 : smacc2::SmaccState<StiCompletingSequenceBStep9, SsCompletingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiCompletingSequenceBLoop, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiCompletingSequenceBLoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n\n// STATE DECLARATION\nstruct CompletingSequenceBLoop : smacc2::SmaccState<CompletingSequenceBLoop, MsCompleting>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<CompletingSequenceBLoop>, SsCompletingSequenceB, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsCompleting>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.yiteration_count, superstate.ytotal_iterations());\n    return superstate.yiteration_count++ < superstate.ytotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&CompletingSequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/completing_st_observe.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct CompletingStObserve : smacc2::SmaccState<CompletingStObserve, MsCompleting>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct completing_sequence_a : SUCCESS{};\n  struct completing_sequence_b : SUCCESS{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, CompletingSequenceBLoop, SUCCESS>,\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsExecuteSequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressF<CbDefaultKeyboardBehavior, OrKeyboard>, MsStarting, SUCCESS>,\n    Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, CompletingSequenceALoop, SUCCESS>,\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceA, execute_sequence_a>,\n    Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, CompletingSequenceBLoop, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_a/sti_execute_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_a\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceALoop : smacc2::SmaccState<StiExecuteSequenceALoop, SsExecuteSequenceA>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiExecuteSequenceALoop>, StiExecuteSequenceAStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsExecuteSequenceA>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiExecuteSequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_a/sti_execute_sequence_a_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_a\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceAStep1 : smacc2::SmaccState<StiExecuteSequenceAStep1, SsExecuteSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceAStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep2, NEXT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceALoop, PREVIOUS>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_a/sti_execute_sequence_a_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_a\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceAStep2 : smacc2::SmaccState<StiExecuteSequenceAStep2, SsExecuteSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceAStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep3, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_a/sti_execute_sequence_a_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_a\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceAStep3 : smacc2::SmaccState<StiExecuteSequenceAStep3, SsExecuteSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceAStep4, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep4, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_a/sti_execute_sequence_a_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_a\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceAStep4 : smacc2::SmaccState<StiExecuteSequenceAStep4, SsExecuteSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceAStep5, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep5, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_a/sti_execute_sequence_a_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_a\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceAStep5 : smacc2::SmaccState<StiExecuteSequenceAStep5, SsExecuteSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceAStep6, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep4, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep6, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_a/sti_execute_sequence_a_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_a\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceAStep6 : smacc2::SmaccState<StiExecuteSequenceAStep6, SsExecuteSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceAStep7, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep5, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep7, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_a/sti_execute_sequence_a_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_a\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceAStep7 : smacc2::SmaccState<StiExecuteSequenceAStep7, SsExecuteSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceAStep8, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep8, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_a/sti_execute_sequence_a_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_a\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceAStep8 : smacc2::SmaccState<StiExecuteSequenceAStep8, SsExecuteSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceAStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep9, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_a/sti_execute_sequence_a_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_a\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceAStep9 : smacc2::SmaccState<StiExecuteSequenceAStep9, SsExecuteSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceALoop, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceAStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceALoop, NEXT>\n\n    // Transition<EvKeyPressF<CbDefaultKeyboardBehavior, OrKeyboard>, MsStarting, SUCCESS>,\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n\n// STATE DECLARATION\nstruct ExecuteSequenceALoop : smacc2::SmaccState<ExecuteSequenceALoop, MsExecute>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<ExecuteSequenceALoop>, SsExecuteSequenceA, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsExecute>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.ziteration_count, superstate.ztotal_iterations());\n    return superstate.ziteration_count++ < superstate.ztotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&ExecuteSequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_b/sti_execute_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_b\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceBLoop : smacc2::SmaccState<StiExecuteSequenceBLoop, SsExecuteSequenceB>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiExecuteSequenceBLoop>, StiExecuteSequenceBStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsExecuteSequenceB>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiExecuteSequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_b/sti_execute_sequence_b_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_b\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceBStep1 : smacc2::SmaccState<StiExecuteSequenceBStep1, SsExecuteSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceBStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep2, NEXT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBLoop, PREVIOUS>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_b/sti_execute_sequence_b_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_b\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceBStep2 : smacc2::SmaccState<StiExecuteSequenceBStep2, SsExecuteSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceBStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep3, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_b/sti_execute_sequence_b_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_b\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceBStep3 : smacc2::SmaccState<StiExecuteSequenceBStep3, SsExecuteSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceBStep4, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep4, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_b/sti_execute_sequence_b_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_b\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceBStep4 : smacc2::SmaccState<StiExecuteSequenceBStep4, SsExecuteSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceBStep5, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep5, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_b/sti_execute_sequence_b_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_b\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceBStep5 : smacc2::SmaccState<StiExecuteSequenceBStep5, SsExecuteSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceBStep6, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep4, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep6, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_b/sti_execute_sequence_b_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_b\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceBStep6 : smacc2::SmaccState<StiExecuteSequenceBStep6, SsExecuteSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceBStep7, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep5, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep7, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_b/sti_execute_sequence_b_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_b\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceBStep7 : smacc2::SmaccState<StiExecuteSequenceBStep7, SsExecuteSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceBStep8, SUCCESS>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep9, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_b/sti_execute_sequence_b_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_b\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceBStep8 : smacc2::SmaccState<StiExecuteSequenceBStep8, SsExecuteSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceBStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep9, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_b/sti_execute_sequence_b_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace execute_sequence_b\n{\n// STATE DECLARATION\nstruct StiExecuteSequenceBStep9 : smacc2::SmaccState<StiExecuteSequenceBStep9, SsExecuteSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiExecuteSequenceBLoop, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiExecuteSequenceBLoop, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery1, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n\n// STATE DECLARATION\nstruct ExecuteSequenceBLoop : smacc2::SmaccState<ExecuteSequenceBLoop, MsExecute>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<ExecuteSequenceBLoop>, SsExecuteSequenceB, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsExecute>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.yiteration_count, superstate.ytotal_iterations());\n    return superstate.yiteration_count++ < superstate.ytotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&ExecuteSequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/execute_st_observe.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct ExecuteStObserve : smacc2::SmaccState<ExecuteStObserve, MsExecute>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct execute_sequence_a : SUCCESS{};\n  struct execute_sequence_b : SUCCESS{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteSequenceALoop, SUCCESS>,\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, ExecuteSequenceBLoop, SUCCESS>,\n\n    Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteSequenceBLoop, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_a\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceALoop : smacc2::SmaccState<StiHoldingSequenceALoop, SsHoldingSequenceA>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiHoldingSequenceALoop>, StiHoldingSequenceAStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsHoldingSequenceA>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiHoldingSequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_a\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceAStep1 : smacc2::SmaccState<StiHoldingSequenceAStep1, SsHoldingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceAStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep2, NEXT>\n    //Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceALoop, PREVIOUS>,\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_a\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceAStep2 : smacc2::SmaccState<StiHoldingSequenceAStep2, SsHoldingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceAStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_a\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceAStep3 : smacc2::SmaccState<StiHoldingSequenceAStep3, SsHoldingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceAStep5, SUCCESS>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_a\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceAStep4 : smacc2::SmaccState<StiHoldingSequenceAStep4, SsHoldingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceAStep5, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep5, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_a\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceAStep5 : smacc2::SmaccState<StiHoldingSequenceAStep5, SsHoldingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceAStep6, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep4, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_a\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceAStep6 : smacc2::SmaccState<StiHoldingSequenceAStep6, SsHoldingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceAStep7, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep5, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_a\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceAStep7 : smacc2::SmaccState<StiHoldingSequenceAStep7, SsHoldingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceAStep9, SUCCESS>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n   //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_a\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceAStep8 : smacc2::SmaccState<StiHoldingSequenceAStep8, SsHoldingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceAStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_a/sti_holding_sequence_a_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_a\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceAStep9 : smacc2::SmaccState<StiHoldingSequenceAStep9, SsHoldingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceALoop, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceAStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceALoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n\n// STATE DECLARATION\nstruct HoldingSequenceALoop : smacc2::SmaccState<HoldingSequenceALoop, MsHolding>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n     Transition<EvLoopContinue<HoldingSequenceALoop>, SsHoldingSequenceA, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsHolding>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.ziteration_count, superstate.ztotal_iterations());\n    return superstate.ziteration_count++ < superstate.ztotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&HoldingSequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_b\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceBLoop : smacc2::SmaccState<StiHoldingSequenceBLoop, SsHoldingSequenceB>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiHoldingSequenceBLoop>, StiHoldingSequenceBStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsHoldingSequenceB>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiHoldingSequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_b\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceBStep1 : smacc2::SmaccState<StiHoldingSequenceBStep1, SsHoldingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceBStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep2, NEXT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBLoop, PREVIOUS>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_b\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceBStep2 : smacc2::SmaccState<StiHoldingSequenceBStep2, SsHoldingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceBStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_b\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceBStep3 : smacc2::SmaccState<StiHoldingSequenceBStep3, SsHoldingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceBStep4, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_b\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceBStep4 : smacc2::SmaccState<StiHoldingSequenceBStep4, SsHoldingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceBStep5, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep5, NEXT>\n\n    //ransition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_b\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceBStep5 : smacc2::SmaccState<StiHoldingSequenceBStep5, SsHoldingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceBStep6, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep4, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_b\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceBStep6 : smacc2::SmaccState<StiHoldingSequenceBStep6, SsHoldingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceBStep8, SUCCESS>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep5, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_b\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceBStep7 : smacc2::SmaccState<StiHoldingSequenceBStep7, SsHoldingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceBStep8, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_b\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceBStep8 : smacc2::SmaccState<StiHoldingSequenceBStep8, SsHoldingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceBStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_b/sti_holding_sequence_b_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace holding_sequence_b\n{\n// STATE DECLARATION\nstruct StiHoldingSequenceBStep9 : smacc2::SmaccState<StiHoldingSequenceBStep9, SsHoldingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiHoldingSequenceBLoop, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiHoldingSequenceBLoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n\n// STATE DECLARATION\nstruct HoldingSequenceBLoop : smacc2::SmaccState<HoldingSequenceBLoop, MsHolding>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<HoldingSequenceBLoop>, SsHoldingSequenceB, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsHolding>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.yiteration_count, superstate.ytotal_iterations());\n    return superstate.yiteration_count++ < superstate.ytotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&HoldingSequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/holding_st_observe.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct HoldingStObserve : smacc2::SmaccState<HoldingStObserve, MsHolding>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct holding_sequence_a : SUCCESS{};\n  struct holding_sequence_b : SUCCESS{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, HoldingSequenceBLoop, SUCCESS>,\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsExecuteSequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressF<CbDefaultKeyboardBehavior, OrKeyboard>, MsStarting, SUCCESS>,\n    Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, HoldingSequenceALoop, SUCCESS>,\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceA, execute_sequence_a>,\n    Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, HoldingSequenceBLoop, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/ms_recovery_1/st_recovery_analyze_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StRecoveryAnalyze1 : smacc2::SmaccState<StRecoveryAnalyze1, MsRecovery1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryBifurcate1, TIMEOUT>,\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsExecuteSequenceA>,\n    // Keyboard events\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StRecoveryBifurcate1, SUCCESS>\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/ms_recovery_1/st_recovery_bifurcate_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StRecoveryBifurcate1 : smacc2::SmaccState<StRecoveryBifurcate1, MsRecovery1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryCalculate1, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsExecuteSequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/ms_recovery_1/st_recovery_calculate_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StRecoveryCalculate1 : smacc2::SmaccState<StRecoveryCalculate1, MsRecovery1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryDeliberate1, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsExecuteSequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/ms_recovery_1/st_recovery_deliberate_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StRecoveryDeliberate1 : smacc2::SmaccState<StRecoveryDeliberate1, MsRecovery1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StRecoveryEvaluate1, NEXT>,\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, smacc2::deep_history<MsExecute::LastDeepState>, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/ms_recovery_1/st_recovery_evaluate_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StRecoveryEvaluate1 : smacc2::SmaccState<StRecoveryEvaluate1, MsRecovery1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryGenerate1, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsExecuteSequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/ms_recovery_1/st_recovery_generate_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StRecoveryGenerate1 : smacc2::SmaccState<StRecoveryGenerate1, MsRecovery1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryInnervate1, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsExecuteSequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/ms_recovery_1/st_recovery_innervate_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StRecoveryInnervate1 : smacc2::SmaccState<StRecoveryInnervate1, MsRecovery1>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, smacc2::deep_history<MsExecute::LastDeepState>, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/ms_recovery_2/st_recovery_analyze_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StRecoveryAnalyze2 : smacc2::SmaccState<StRecoveryAnalyze2, MsRecovery2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryBifurcate2, TIMEOUT>,\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsExecuteSequenceA>,\n    // Keyboard events\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StRecoveryBifurcate2, SUCCESS>\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/ms_recovery_2/st_recovery_bifurcate_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StRecoveryBifurcate2 : smacc2::SmaccState<StRecoveryBifurcate2, MsRecovery2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryCalculate2, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsExecuteSequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/ms_recovery_2/st_recovery_calculate_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StRecoveryCalculate2 : smacc2::SmaccState<StRecoveryCalculate2, MsRecovery2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    //Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryDeliberate2, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsExecuteSequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/ms_recovery_2/st_recovery_deliberate_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StRecoveryDeliberate2 : smacc2::SmaccState<StRecoveryDeliberate2, MsRecovery2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StRecoveryEvaluate2, NEXT>,\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, smacc2::deep_history<MsStarting::LastDeepState>, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/ms_recovery_2/st_recovery_evaluate_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StRecoveryEvaluate2 : smacc2::SmaccState<StRecoveryEvaluate2, MsRecovery2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryGenerate2, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsExecuteSequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/ms_recovery_2/st_recovery_generate_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StRecoveryGenerate2 : smacc2::SmaccState<StRecoveryGenerate2, MsRecovery2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StRecoveryInnervate2, SUCCESS>\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsExecuteSequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceA, MOVE>,\n    // Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceB, BUILD>,\n    // Transition<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>, SsPCCycle, ATTACK>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/ms_recovery_2/st_recovery_innervate_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StRecoveryInnervate2 : smacc2::SmaccState<StRecoveryInnervate2, MsRecovery2>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, smacc2::deep_history<MsStarting::LastDeepState>, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(50);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_a/sti_start_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_a\n{\n// STATE DECLARATION\nstruct StiStartSequenceALoop : smacc2::SmaccState<StiStartSequenceALoop, SsStartSequenceA>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiStartSequenceALoop>, StiStartSequenceAStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsStartSequenceA>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiStartSequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_a/sti_start_sequence_a_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_a\n{\n// STATE DECLARATION\nstruct StiStartSequenceAStep1 : smacc2::SmaccState<StiStartSequenceAStep1, SsStartSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceAStep2, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep2, NEXT>\n    //Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceALoop, PREVIOUS>,\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_a/sti_start_sequence_a_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_a\n{\n// STATE DECLARATION\nstruct StiStartSequenceAStep2 : smacc2::SmaccState<StiStartSequenceAStep2, SsStartSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceAStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_a/sti_start_sequence_a_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_a\n{\n// STATE DECLARATION\nstruct StiStartSequenceAStep3 : smacc2::SmaccState<StiStartSequenceAStep3, SsStartSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceAStep4, SUCCESS>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_a/sti_start_sequence_a_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_a\n{\n// STATE DECLARATION\nstruct StiStartSequenceAStep4 : smacc2::SmaccState<StiStartSequenceAStep4, SsStartSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceAStep5, SUCCESS>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep5, NEXT>\n\n    // Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_a/sti_start_sequence_a_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_a\n{\n// STATE DECLARATION\nstruct StiStartSequenceAStep5 : smacc2::SmaccState<StiStartSequenceAStep5, SsStartSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceAStep7, SUCCESS>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep4, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_a/sti_start_sequence_a_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_a\n{\n// STATE DECLARATION\nstruct StiStartSequenceAStep6 : smacc2::SmaccState<StiStartSequenceAStep6, SsStartSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceAStep8, TIMEOUT>,\n    // Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep52, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_a/sti_start_sequence_a_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_a\n{\n// STATE DECLARATION\nstruct StiStartSequenceAStep7 : smacc2::SmaccState<StiStartSequenceAStep7, SsStartSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceAStep8, TIMEOUT>,\n    // Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n   //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_a/sti_start_sequence_a_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_a\n{\n// STATE DECLARATION\nstruct StiStartSequenceAStep8 : smacc2::SmaccState<StiStartSequenceAStep8, SsStartSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceAStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_a/sti_start_sequence_a_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_a\n{\n// STATE DECLARATION\nstruct StiStartSequenceAStep9 : smacc2::SmaccState<StiStartSequenceAStep9, SsStartSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceALoop, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceAStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceALoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n\n// STATE DECLARATION\nstruct StartSequenceALoop : smacc2::SmaccState<StartSequenceALoop, MsStarting>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n     Transition<EvLoopContinue<StartSequenceALoop>, SsStartSequenceA, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsStarting>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.ziteration_count, superstate.ztotal_iterations());\n    return superstate.ziteration_count++ < superstate.ztotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StartSequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_b/sti_start_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_b\n{\n// STATE DECLARATION\nstruct StiStartSequenceBLoop : smacc2::SmaccState<StiStartSequenceBLoop, SsStartSequenceB>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiStartSequenceBLoop>, StiStartSequenceBStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsStartSequenceB>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiStartSequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_b/sti_start_sequence_b_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_b\n{\n// STATE DECLARATION\nstruct StiStartSequenceBStep1 : smacc2::SmaccState<StiStartSequenceBStep1, SsStartSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceBStep2, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep3, NEXT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBLoop, PREVIOUS>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_b/sti_start_sequence_b_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_b\n{\n// STATE DECLARATION\nstruct StiStartSequenceBStep2 : smacc2::SmaccState<StiStartSequenceBStep2, SsStartSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceBStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_b/sti_start_sequence_b_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_b\n{\n// STATE DECLARATION\nstruct StiStartSequenceBStep3 : smacc2::SmaccState<StiStartSequenceBStep3, SsStartSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceBStep4, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_b/sti_start_sequence_b_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_b\n{\n// STATE DECLARATION\nstruct StiStartSequenceBStep4 : smacc2::SmaccState<StiStartSequenceBStep4, SsStartSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceBStep5, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep5, NEXT>\n\n    //ransition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_b/sti_start_sequence_b_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_b\n{\n// STATE DECLARATION\nstruct StiStartSequenceBStep5 : smacc2::SmaccState<StiStartSequenceBStep5, SsStartSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceBStep6, SUCCESS>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep4, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep6, NEXT>,\n    Transition<EvKeyPressS<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep8, SUCCESS>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_b/sti_start_sequence_b_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_b\n{\n// STATE DECLARATION\nstruct StiStartSequenceBStep6 : smacc2::SmaccState<StiStartSequenceBStep6, SsStartSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceBStep7, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep5, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_b/sti_start_sequence_b_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_b\n{\n// STATE DECLARATION\nstruct StiStartSequenceBStep7 : smacc2::SmaccState<StiStartSequenceBStep7, SsStartSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceBStep8, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_b/sti_start_sequence_b_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_b\n{\n// STATE DECLARATION\nstruct StiStartSequenceBStep8 : smacc2::SmaccState<StiStartSequenceBStep8, SsStartSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceBStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_b/sti_start_sequence_b_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace start_sequence_b\n{\n// STATE DECLARATION\nstruct StiStartSequenceBStep9 : smacc2::SmaccState<StiStartSequenceBStep9, SsStartSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiStartSequenceBLoop, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceBLoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n\n// STATE DECLARATION\nstruct StartSequenceBLoop : smacc2::SmaccState<StartSequenceBLoop, MsStarting>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StartSequenceBLoop>, SsStartSequenceB, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsStarting>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.yiteration_count, superstate.ytotal_iterations());\n    return superstate.yiteration_count++ < superstate.ytotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StartSequenceBLoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/start_st_observe.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct StartStObserve : smacc2::SmaccState<StartStObserve, MsStarting>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct start_sequence_a : SUCCESS{};\n  struct start_sequence_b : SUCCESS{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StartSequenceBLoop, SUCCESS>,\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SsExecuteSequenceA>,\n    // Keyboard events\n    // Transition<EvKeyPressF<CbDefaultKeyboardBehavior, OrKeyboard>, MsStarting, SUCCESS>,\n    Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, StartSequenceALoop, SUCCESS>,\n    // Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SsExecuteSequenceA, execute_sequence_a>,\n    Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, StartSequenceBLoop, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_a\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceALoop : smacc2::SmaccState<StiSuspendingSequenceALoop, SsSuspendingSequenceA>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiSuspendingSequenceALoop>, StiSuspendingSequenceAStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsSuspendingSequenceA>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiSuspendingSequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_a\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceAStep1 : smacc2::SmaccState<StiSuspendingSequenceAStep1, SsSuspendingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceAStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep2, NEXT>\n    //Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceALoop, PREVIOUS>,\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_a\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceAStep2 : smacc2::SmaccState<StiSuspendingSequenceAStep2, SsSuspendingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceAStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_a\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceAStep3 : smacc2::SmaccState<StiSuspendingSequenceAStep3, SsSuspendingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceAStep4, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_a\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceAStep4 : smacc2::SmaccState<StiSuspendingSequenceAStep4, SsSuspendingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceAStep5, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep5, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_a\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceAStep5 : smacc2::SmaccState<StiSuspendingSequenceAStep5, SsSuspendingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceAStep6, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep4, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_a\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceAStep6 : smacc2::SmaccState<StiSuspendingSequenceAStep6, SsSuspendingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceAStep7, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep5, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_a\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceAStep7 : smacc2::SmaccState<StiSuspendingSequenceAStep7, SsSuspendingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceAStep8, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n   //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_a\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceAStep8 : smacc2::SmaccState<StiSuspendingSequenceAStep8, SsSuspendingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceAStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_a/sti_suspending_sequence_a_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_a\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceAStep9 : smacc2::SmaccState<StiSuspendingSequenceAStep9, SsSuspendingSequenceA>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceALoop, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceAStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceALoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_a_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n\n// STATE DECLARATION\nstruct SuspendingSequenceALoop : smacc2::SmaccState<SuspendingSequenceALoop, MsSuspending>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n     Transition<EvLoopContinue<SuspendingSequenceALoop>, SsSuspendingSequenceA, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsSuspending>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.ziteration_count, superstate.ztotal_iterations());\n    return superstate.ziteration_count++ < superstate.ztotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&SuspendingSequenceALoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_b\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceB : smacc2::SmaccState<StiSuspendingSequenceB, SsSuspendingSequenceB>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiSuspendingSequenceB>, StiSuspendingSequenceBStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsSuspendingSequenceB>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiSuspendingSequenceB::loopWhileCondition);\n  }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_b\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceBStep1 : smacc2::SmaccState<StiSuspendingSequenceBStep1, SsSuspendingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceBStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep2, NEXT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceB, PREVIOUS>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_b\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceBStep2 : smacc2::SmaccState<StiSuspendingSequenceBStep2, SsSuspendingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceBStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_b\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceBStep3 : smacc2::SmaccState<StiSuspendingSequenceBStep3, SsSuspendingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceBStep4, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_b\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceBStep4 : smacc2::SmaccState<StiSuspendingSequenceBStep4, SsSuspendingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceBStep5, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep5, NEXT>\n\n    //ransition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_b\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceBStep5 : smacc2::SmaccState<StiSuspendingSequenceBStep5, SsSuspendingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceBStep6, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep4, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_b\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceBStep6 : smacc2::SmaccState<StiSuspendingSequenceBStep6, SsSuspendingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceBStep7, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep5, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_b\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceBStep7 : smacc2::SmaccState<StiSuspendingSequenceBStep7, SsSuspendingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceBStep8, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_b\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceBStep8 : smacc2::SmaccState<StiSuspendingSequenceBStep8, SsSuspendingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceBStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_b/sti_suspending_sequence_b_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_b\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceBStep9 : smacc2::SmaccState<StiSuspendingSequenceBStep9, SsSuspendingSequenceB>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceB, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceBStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceB, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace execute_sequence_b\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_b_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n\n// STATE DECLARATION\nstruct SuspendingSequenceB : smacc2::SmaccState<SuspendingSequenceB, MsSuspending>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<SuspendingSequenceB>, SsSuspendingSequenceB, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsSuspending>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.yiteration_count, superstate.ytotal_iterations());\n    return superstate.yiteration_count++ < superstate.ytotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&SuspendingSequenceB::loopWhileCondition);\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_c\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceCLoop : smacc2::SmaccState<StiSuspendingSequenceCLoop, SsSuspendingSequenceC>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiSuspendingSequenceCLoop>, StiSuspendingSequenceCStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsSuspendingSequenceC>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.diteration_count, superstate.dtotal_iterations());\n    return superstate.diteration_count++ < superstate.dtotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiSuspendingSequenceCLoop::loopWhileCondition);\n  }\n};\n}  // namespace suspending_sequence_c_1\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_c\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceCStep1 : smacc2::SmaccState<StiSuspendingSequenceCStep1, SsSuspendingSequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceCStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep2, NEXT>\n    //Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCLoop2, PREVIOUS>,\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_c_1\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_c\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceCStep2 : smacc2::SmaccState<StiSuspendingSequenceCStep2, SsSuspendingSequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceCStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_c_1\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_c\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceCStep3 : smacc2::SmaccState<StiSuspendingSequenceCStep3, SsSuspendingSequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceCStep4, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_c_1\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_c\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceCStep4 : smacc2::SmaccState<StiSuspendingSequenceCStep4, SsSuspendingSequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceCStep5, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep5, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_c_1\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_c\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceCStep5 : smacc2::SmaccState<StiSuspendingSequenceCStep5, SsSuspendingSequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceCStep6, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep4, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_c_1\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_c\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceCStep6 : smacc2::SmaccState<StiSuspendingSequenceCStep6, SsSuspendingSequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceCStep7, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep5, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_c_1\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_c\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceCStep7 : smacc2::SmaccState<StiSuspendingSequenceCStep7, SsSuspendingSequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceCStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n   //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_c_1\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_c\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceCStep8 : smacc2::SmaccState<StiSuspendingSequenceCStep8, SsSuspendingSequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceCStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_c_1\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_c/sti_suspending_sequence_c_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_c\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceCStep9 : smacc2::SmaccState<StiSuspendingSequenceCStep9, SsSuspendingSequenceC>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceCLoop, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceCLoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_c_1\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_c_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n\n// STATE DECLARATION\nstruct SuspendingSequenceCLoop : smacc2::SmaccState<SuspendingSequenceCLoop, MsSuspending>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n     Transition<EvLoopContinue<SuspendingSequenceCLoop>, SsSuspendingSequenceC, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsSuspending>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.diteration_count, superstate.dtotal_iterations());\n    return superstate.diteration_count++ < superstate.dtotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&SuspendingSequenceCLoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_d\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceDLoop : smacc2::SmaccState<StiSuspendingSequenceDLoop, SsSuspendingSequenceD>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiSuspendingSequenceDLoop>, StiSuspendingSequenceDStep1, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SsSuspendingSequenceD>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.giteration_count, superstate.gtotal_iterations());\n    return superstate.giteration_count++ < superstate.gtotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiSuspendingSequenceDLoop::loopWhileCondition);\n  }\n};\n}  // namespace execute_sequence_a\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_d\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceDStep1 : smacc2::SmaccState<StiSuspendingSequenceDStep1, SsSuspendingSequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceDStep2, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep2, NEXT>\n    //Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiStartSequenceALoop, PREVIOUS>,\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_d\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_d\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceDStep2 : smacc2::SmaccState<StiSuspendingSequenceDStep2, SsSuspendingSequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceDStep3, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep3, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_d\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_d\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceDStep3 : smacc2::SmaccState<StiSuspendingSequenceDStep3, SsSuspendingSequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceDStep4, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep4, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_d\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_d\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceDStep4 : smacc2::SmaccState<StiSuspendingSequenceDStep4, SsSuspendingSequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceDStep5, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep3, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep5, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    // Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_d\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_5.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_d\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceDStep5 : smacc2::SmaccState<StiSuspendingSequenceDStep5, SsSuspendingSequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceDStep6, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep4, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep6, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_d\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_6.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_d\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceDStep6 : smacc2::SmaccState<StiSuspendingSequenceDStep6, SsSuspendingSequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceDStep7, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep5, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep7, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_d\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_7.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_d\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceDStep7 : smacc2::SmaccState<StiSuspendingSequenceDStep7, SsSuspendingSequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceDStep8, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep6, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep8, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n   //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_d\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_8.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_d\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceDStep8 : smacc2::SmaccState<StiSuspendingSequenceDStep8, SsSuspendingSequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceDStep9, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep7, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep9, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, ExecuteStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_d\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_d/sti_suspending_sequence_d_step_9.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nnamespace suspending_sequence_d\n{\n// STATE DECLARATION\nstruct StiSuspendingSequenceDStep9 : smacc2::SmaccState<StiSuspendingSequenceDStep9, SsSuspendingSequenceD>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n  struct RETURN : CANCEL{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiSuspendingSequenceDLoop, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDStep8, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiSuspendingSequenceDLoop, NEXT>\n\n    //Transition<EvKeyPressZ<CbDefaultKeyboardBehavior, OrKeyboard>, StartStObserve, RETURN>,\n    //Transition<EvKeyPressX<CbDefaultKeyboardBehavior, OrKeyboard>, MsRecovery2, ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(20);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace suspending_sequence_d\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_sequence_d_loop.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n\n// STATE DECLARATION\nstruct SuspendingSequenceDLoop : smacc2::SmaccState<SuspendingSequenceDLoop, MsSuspending>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n     Transition<EvLoopContinue<SuspendingSequenceDLoop>, SsSuspendingSequenceD, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<MsSuspending>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.giteration_count, superstate.gtotal_iterations());\n    return superstate.giteration_count++ < superstate.gtotal_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&SuspendingSequenceDLoop::loopWhileCondition);\n  }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/states/suspending_st_observe.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\n// STATE DECLARATION\nstruct SuspendingStObserve : smacc2::SmaccState<SuspendingStObserve, MsSuspending>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct suspending_sequence_a : SUCCESS{};\n  struct suspending_sequence_c : SUCCESS{};\n  struct suspending_sequence_d : SUCCESS{};\n  struct suspending_sequence_b : SUCCESS{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>, SuspendingSequenceALoop, SUCCESS>,\n    Transition<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>, SuspendingSequenceB, SUCCESS>,\n    Transition<EvKeyPressD<CbDefaultKeyboardBehavior, OrKeyboard>, SuspendingSequenceCLoop, SUCCESS>,\n    Transition<EvKeyPressG<CbDefaultKeyboardBehavior, OrKeyboard>, SuspendingSequenceDLoop, SUCCESS>,\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, SuspendingSequenceDLoop, SUCCESS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    \n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/superstates/ss_completing_sequence_a.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nusing namespace sm_pack_ml::completing_sequence_a;\n\n// STATE DECLARATION\nstruct SsCompletingSequenceA : smacc2::SmaccState<SsCompletingSequenceA, MsCompleting, StiCompletingSequenceALoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiCompletingSequenceALoop>, CompletingSequenceALoop>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/superstates/ss_completing_sequence_b.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nusing namespace sm_pack_ml::completing_sequence_b;\n\n// STATE DECLARATION\nstruct SsCompletingSequenceB : smacc2::SmaccState<SsCompletingSequenceB, MsCompleting, StiCompletingSequenceBLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiCompletingSequenceBLoop>, CompletingStObserve>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS4\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/superstates/ss_execute_sequence_a.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nusing namespace sm_pack_ml::execute_sequence_a;\n\n// STATE DECLARATION\nstruct SsExecuteSequenceA : smacc2::SmaccState<SsExecuteSequenceA, MsExecute, StiExecuteSequenceALoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiExecuteSequenceALoop>, ExecuteSequenceALoop>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/superstates/ss_execute_sequence_b.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nusing namespace sm_pack_ml::execute_sequence_b;\n\n// STATE DECLARATION\nstruct SsExecuteSequenceB : smacc2::SmaccState<SsExecuteSequenceB, MsExecute, StiExecuteSequenceBLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiExecuteSequenceBLoop>, ExecuteStObserve>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS4\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/superstates/ss_holding_sequence_a.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nusing namespace sm_pack_ml::holding_sequence_a;\n\n// STATE DECLARATION\nstruct SsHoldingSequenceA : smacc2::SmaccState<SsHoldingSequenceA, MsHolding, StiHoldingSequenceALoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiHoldingSequenceALoop>, HoldingSequenceALoop>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/superstates/ss_holding_sequence_b.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nusing namespace sm_pack_ml::holding_sequence_b;\n\n// STATE DECLARATION\nstruct SsHoldingSequenceB : smacc2::SmaccState<SsHoldingSequenceB, MsHolding, StiHoldingSequenceBLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiHoldingSequenceBLoop>, HoldingStObserve>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS4\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/superstates/ss_start_sequence_a.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nusing namespace sm_pack_ml::start_sequence_a;\n\n// STATE DECLARATION\nstruct SsStartSequenceA : smacc2::SmaccState<SsStartSequenceA, MsStarting, StiStartSequenceALoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiStartSequenceALoop>, StartSequenceALoop>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/superstates/ss_start_sequence_b.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nusing namespace sm_pack_ml::start_sequence_b;\n\n// STATE DECLARATION\nstruct SsStartSequenceB : smacc2::SmaccState<SsStartSequenceB, MsStarting, StiStartSequenceBLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiStartSequenceBLoop>, StartStObserve>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS4\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/superstates/ss_suspending_sequence_a.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nusing namespace sm_pack_ml::suspending_sequence_a;\n\n// STATE DECLARATION\nstruct SsSuspendingSequenceA : smacc2::SmaccState<SsSuspendingSequenceA, MsSuspending, StiSuspendingSequenceALoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiSuspendingSequenceALoop>, SuspendingSequenceALoop>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/superstates/ss_suspending_sequence_b.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nusing namespace sm_pack_ml::suspending_sequence_b;\n\n// STATE DECLARATION\nstruct SsSuspendingSequenceB : smacc2::SmaccState<SsSuspendingSequenceB, MsSuspending, StiSuspendingSequenceB>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiSuspendingSequenceB>, SuspendingStObserve>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 1; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS4\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/superstates/ss_suspending_sequence_c.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nusing namespace sm_pack_ml::suspending_sequence_c;\n\n// STATE DECLARATION\nstruct SsSuspendingSequenceC : smacc2::SmaccState<SsSuspendingSequenceC, MsSuspending, StiSuspendingSequenceCLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiSuspendingSequenceCLoop>, SuspendingSequenceCLoop>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int dtotal_iterations() { return 1; }\n  int diteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/include/sm_pack_ml/superstates/ss_suspending_sequence_d.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_pack_ml\n{\nusing namespace sm_pack_ml::suspending_sequence_d;\n\n// STATE DECLARATION\nstruct SsSuspendingSequenceD : smacc2::SmaccState<SsSuspendingSequenceD, MsSuspending, StiSuspendingSequenceDLoop>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiSuspendingSequenceDLoop>, SuspendingSequenceDLoop>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int gtotal_iterations() { return 1; }\n  int giteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS1\n\n}  // namespace sm_pack_ml\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/launch/sm_pack_ml.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\nfrom datetime import datetime\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef setup_log_directory():\n    \"\"\"\n    Creates timestamped log directory with error handling.\n    Returns: (log_dir_path, timestamp) tuple\n    \"\"\"\n    timestamp = datetime.now().strftime(\"%Y-%m-%d-%H-%M-%S\")\n\n    # Primary log directory location\n    log_dir = os.path.join(os.path.expanduser(\"~\"), \".ros\", \"log\", f\"{timestamp}-sm_pack_ml\")\n\n    try:\n        os.makedirs(log_dir, mode=0o755, exist_ok=True)\n        print(f\"[Launch] Log directory created: {log_dir}\")\n        return log_dir, timestamp\n    except PermissionError as e:\n        # Fallback to /tmp if ~/.ros is not writable\n        fallback_dir = os.path.join(\"/tmp\", \"sm_pack_ml_logs\", timestamp)\n        print(f\"[Launch] WARNING: Cannot create log directory at {log_dir}\")\n        print(f\"[Launch] Permission denied: {e}\")\n        print(f\"[Launch] Using fallback directory: {fallback_dir}\")\n        try:\n            os.makedirs(fallback_dir, mode=0o755, exist_ok=True)\n            return fallback_dir, timestamp\n        except Exception as fallback_error:\n            print(f\"[Launch] ERROR: Cannot create fallback directory: {fallback_error}\")\n            print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n            return None, timestamp\n    except OSError as e:\n        print(f\"[Launch] ERROR: Failed to create log directory: {e}\")\n        print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n        return None, timestamp\n\n\ndef generate_launch_description():\n    # Setup logging directory\n    log_dir, timestamp = setup_log_directory()\n\n    # Construct logging prefix for state machine node\n    if log_dir:\n        state_machine_log = os.path.join(log_dir, f\"state_machine_{timestamp}.log\")\n        state_machine_prefix = f\"konsole --hold -p tabtitle='SM Pack ML' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {state_machine_log}; exec bash' -- \"\n    else:\n        state_machine_prefix = \"konsole --hold -p tabtitle='SM Pack ML' -e\"\n\n    # Construct logging prefix for keyboard server node\n    if log_dir:\n        keyboard_log = os.path.join(log_dir, f\"keyboard_server_{timestamp}.log\")\n        keyboard_prefix = f\"konsole --hold -p tabtitle='Keyboard Server' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {keyboard_log}; exec bash' -- \"\n    else:\n        keyboard_prefix = \"konsole --hold -p tabtitle='Keyboard Server' -e\"\n\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_pack_ml\",\n                executable=\"sm_pack_ml_node\",\n                name=\"sm_pack_ml\",\n                output=\"screen\",\n                prefix=state_machine_prefix,\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n            Node(\n                package=\"cl_keyboard\",\n                executable=\"keyboard_server_node.py\",\n                name=\"keyboard_server_node\",\n                output=\"screen\",\n                prefix=keyboard_prefix,\n            ),\n        ],\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_pack_ml</name>\n  <version>3.0.1</version>\n  <description>The sm_pack_ml package</description>\n  <maintainer email=\"pablo@ibrobotics.com\">geus</maintainer>\n  <license>Apache-2.0</license>\n\n  <depend>smacc2</depend>\n  <depend>rclcpp</depend>\n  <depend>cl_generic_sensor</depend>\n  <depend>sr_all_events_go</depend>\n  <depend>std_msgs</depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>cl_keyboard</depend>\n  <depend>xterm</depend>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_pack_ml/src/sm_pack_ml_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_pack_ml/sm_pack_ml.hpp>\n\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_pack_ml::SmPackMl1>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/CHANGELOG.rst",
    "content": "Changelog for package sm_panda_cl_moveit2z_cb_inventory\n=======================================================\n\n.. note::\n   This package was created in September 2025 as a refactored version of sm_panda_moveit2z_cb_inventory.\n   For historical changes prior to 2.3.20, see sm_panda_moveit2z_cb_inventory/CHANGELOG.rst.\n\n2.3.20 (2025-11-01)\n-------------------\n* Created sm_panda_cl_moveit2z_cb_inventory as updated version using cl_moveit2z\n* sm_panda_moveit2z_cb_inventory refactor (`#633 <https://github.com/robosoft-ai/SMACC2/issues/633>`_)\n* Refactoring of cl_moveit2z to component-based architecture & header-only implementation (`#639 <https://github.com/robosoft-ai/SMACC2/issues/639>`_)\n* Contributors: Brett Aldrich, Pablo Iñigo Blasco\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_panda_cl_moveit2z_cb_inventory)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(smacc2_msgs REQUIRED)\nfind_package(std_msgs)\nfind_package(Boost COMPONENTS thread REQUIRED)\nfind_package(cl_moveit2z REQUIRED)\nfind_package(cl_keyboard REQUIRED)\nfind_package(rclcpp REQUIRED)\nfind_package(yaml-cpp REQUIRED)\n\n\nset(THIS_PACKAGE_INCLUDE_DEPENDS\n  cl_ros2_timer\n  smacc2\n  smacc2_msgs\n  std_msgs\n  cl_moveit2z\n  cl_keyboard\n  rclcpp\n)\n\ninclude_directories(\n  include\n  ${smacc2_INCLUDE_DIRS}\n  ${moveit2z_INCLUDE_DIRS}\n)\n\nadd_executable(${PROJECT_NAME}_node\n  src/${PROJECT_NAME}/${PROJECT_NAME}_node.cpp\n)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${moveit2z_LIBRARIES}\n  ${Boost_LIBRARIES}\n  yaml-cpp\n)\n\nament_target_dependencies(${PROJECT_NAME}_node ${THIS_PACKAGE_INCLUDE_DEPENDS})\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  config\n  launch\n  rviz\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n  ${PROJECT_NAME}_node\n  DESTINATION lib/${PROJECT_NAME}\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/README.md",
    "content": "<h2>State Machine Diagram</h2>\n \n![sm_panda_cl_moveit2z_cb_inventory](docs/SmPandaClMoveit2zCbInventory_2025-12-21_231551.svg)\n \n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n  <h2>Operating Instructions</h2>\n\nThen source the proper workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_panda_cl_moveit2z_cb_inventory sm_panda_cl_moveit2z_cb_inventory.py\n```\n\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/config/move_group_client/known_states/control_authority_posture.yaml",
    "content": "joint_states:\n    panda_joint1: 1.57\n    panda_joint2: -1.57\n    panda_joint3: 1.57\n    panda_joint4: -2.8\n    panda_joint5: 1.57\n    panda_joint6: 2.8\n    panda_joint7: 1.57\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/config/move_group_client/known_states/control_authority_posture2.yaml",
    "content": "joint_states:\n    panda_finger_joint1: 0.03\n    panda_finger_joint2: 0.03\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/config/move_group_client/known_states/initial_posture.yaml",
    "content": "joint_states:\n    panda_joint1: 0.0\n    panda_joint2: 0.0\n    panda_joint3: 0.0\n    panda_joint4: 0.0\n    panda_joint5: 0.0\n    panda_joint6: 0.0\n    panda_joint7: 0.0\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/config/moveit/controllers.yaml",
    "content": "/**:\n  ros__parameters:\n\n    moveit_controller_manager: \"moveit_simple_controller_manager/MoveItSimpleControllerManager\"\n\n    moveit_simple_controller_manager:\n\n      controller_names:\n        - scaled_joint_trajectory_controller\n        - joint_trajectory_controller\n\n\n      scaled_joint_trajectory_controller:\n        action_ns: follow_joint_trajectory\n        type: FollowJointTrajectory\n        default: false\n        joints:\n          - shoulder_pan_joint\n          - shoulder_lift_joint\n          - elbow_joint\n          - wrist_1_joint\n          - wrist_2_joint\n          - wrist_3_joint\n\n\n      joint_trajectory_controller:\n        action_ns: follow_joint_trajectory\n        type: FollowJointTrajectory\n        default: true\n        joints:\n          - shoulder_pan_joint\n          - shoulder_lift_joint\n          - elbow_joint\n          - wrist_1_joint\n          - wrist_2_joint\n          - wrist_3_joint\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/config/moveit/kinematics.yaml",
    "content": "/**:\n  ros__parameters:\n    robot_description_kinematics:\n      ur_manipulator:\n        kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin\n        #kinematics_solver_search_resolution: 0.005\n        #kinematics_solver_timeout: 0.005\n        kinematics_solver_attempts: 3\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/config/sm_panda_cl_moveit2z_cb_inventory_config.yaml",
    "content": "sm_panda_cl_moveit2z_cb_inventory:\n  ros__parameters:\n    signal_detector_loop_freq: 20.0\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/orthogonals/or_arm.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n\n#include <cl_moveit2z/cl_moveit2z.hpp>\n#include <cl_moveit2z/components/cp_grasping_objects.hpp>\n#include <cl_moveit2z/components/cp_joint_space_trajectory_planner.hpp>\n#include <cl_moveit2z/components/cp_tf_listener.hpp>\n#include <cl_moveit2z/components/cp_trajectory_executor.hpp>\n#include <cl_moveit2z/components/cp_trajectory_history.hpp>\n#include <cl_moveit2z/components/cp_trajectory_visualizer.hpp>\n\n#include \"cl_ros2_timer/cl_ros2_timer.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\nusing namespace std::chrono_literals;\n\nclass OrArm : public smacc2::Orthogonal<OrArm>\n{\npublic:\n  void onInitialize() override\n  {\n    auto move_group_client = this->createClient<cl_moveit2z::ClMoveit2z>(\"panda_arm\"); //ur_manipulator\n\n    // Core components for component-based architecture\n    move_group_client->createComponent<cl_moveit2z::CpJointSpaceTrajectoryPlanner>();\n    move_group_client->createComponent<cl_moveit2z::CpTrajectoryExecutor>();\n    move_group_client->createComponent<cl_moveit2z::CpTfListener>();\n    move_group_client->createComponent<cl_moveit2z::CpTrajectoryVisualizer>();\n    move_group_client->createComponent<cl_moveit2z::CpTrajectoryHistory>();\n\n    auto graspingComponent = move_group_client->createComponent<cl_moveit2z::CpGraspingComponent>();\n    graspingComponent->gripperLink_=\"tool0\";\n    graspingComponent->createGraspableBox(\"virtualBox\", 0,0.5,0.5,0.1,0.1,0.1);\n  }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/orthogonals/or_keyboard.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <chrono>\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory {\nusing namespace std::chrono_literals;\n\nclass OrKeyboard : public smacc2::Orthogonal<OrKeyboard> {\npublic:\n  void onInitialize() override {\n    auto keyboardClient = this->createClient<cl_keyboard::ClKeyboard>();\n  }\n};\n} // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/sm_panda_cl_moveit2z_cb_inventory.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <memory>\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\n// ORTHOGONALS\n#include \"sm_panda_cl_moveit2z_cb_inventory/orthogonals/or_arm.hpp\"\n#include \"sm_panda_cl_moveit2z_cb_inventory/orthogonals/or_keyboard.hpp\"\n\n#include <cl_moveit2z/cl_moveit2z.hpp>\n#include <cl_moveit2z/client_behaviors.hpp>\n\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <cl_keyboard/client_behaviors/cb_default_keyboard_behavior.hpp>\n\n#include <smacc2/client_behaviors/cb_wait_topic_message.hpp>\n\nusing namespace cl_moveit2z;\nusing namespace cl_keyboard;\n\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n\n//STATES\nstruct StAcquireSensors;\nstruct StPause1;\nstruct StPause2;\nstruct StPause3;\nstruct StPause4;\nstruct StPause5;\nstruct StPause6;\nstruct StPause7;\nstruct StPause8;\nstruct StPause9;\nstruct StPause10;\nstruct StPause11;\nstruct StPause12;\nstruct StPause13;\nstruct StMoveJoints1;\nstruct StMoveJoints2;\nstruct StMoveJoints3;\nstruct StMoveJoints4;\nstruct StMoveJoints5;\nstruct StMoveEndEffector;\nstruct StMoveCartesianRelative2;\nstruct StEndEffectorRotate;\nstruct StMoveKnownState1;\nstruct StMoveKnownState2;\nstruct StUndoLastTrajectory;\n\n//--------------------------------------------------------------------\n//STATE_MACHINE\n\nstruct SmPandaClMoveit2zCbInventory : public smacc2::SmaccStateMachineBase<SmPandaClMoveit2zCbInventory, StPause1>\n\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  void onInitialize() override { \n    this->createOrthogonal<OrArm>(); \n    this->createOrthogonal<OrKeyboard>();\n    }\n};\n\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n\n// STATES\n#include \"states/st_acquire_sensors.hpp\"\n#include \"states/st_pause_1.hpp\"\n#include \"states/st_pause_2.hpp\"\n#include \"states/st_pause_3.hpp\"\n#include \"states/st_pause_4.hpp\"\n#include \"states/st_pause_5.hpp\"\n#include \"states/st_pause_6.hpp\"\n#include \"states/st_pause_7.hpp\"\n#include \"states/st_pause_8.hpp\"\n#include \"states/st_pause_9.hpp\"\n#include \"states/st_pause_10.hpp\"\n#include \"states/st_pause_11.hpp\"\n#include \"states/st_pause_12.hpp\"\n#include \"states/st_pause_13.hpp\"\n#include \"states/st_move_end_effector.hpp\"\n#include \"states/st_move_joints_1.hpp\"\n#include \"states/st_move_joints_2.hpp\"\n#include \"states/st_move_joints_3.hpp\"\n#include \"states/st_move_joints_4.hpp\"\n#include \"states/st_move_joints_5.hpp\"\n#include \"states/st_move_known_state_1.hpp\"\n#include \"states/st_move_known_state_2.hpp\"\n#include \"states/st_end_effector_rotate.hpp\"\n#include \"states/st_move_cartesian_relative2.hpp\"\n#include \"states/st_undo_last_trajectory.hpp\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_acquire_sensors.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StAcquireSensors : smacc2::SmaccState<StAcquireSensors, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n    Transition<EvCbSuccess<CbWaitTopicMessage<sensor_msgs::msg::JointState>, OrArm>, StMoveKnownState1, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveKnownState1, NEXT>  \n\n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(5s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_end_effector_rotate.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StEndEffectorRotate : smacc2::SmaccState<StEndEffectorRotate, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n\n    Transition<EvCbSuccess<CbEndEffectorRotate, OrArm>, StPause9, SUCCESS>,\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause9, NEXT>\n\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n      double deltaRadians = -M_PI * 0.1;\n      //std::string tipLink  = \"tool0\";\n      //std::string tipLink = \"wrist_3_link\";\n\n       std::string tipLink = \"panda_link8\";\n\n\n     configure_orthogonal<OrArm, CbEndEffectorRotate>(deltaRadians, tipLink);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering StEndEffectorRotate\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_move_cartesian_relative2.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveCartesianRelative2 : smacc2::SmaccState<StMoveCartesianRelative2, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n   Transition<EvCbSuccess<CbMoveCartesianRelative2, OrArm>, StPause6, SUCCESS>,\n   // Transition<EvCbSuccess<CbMoveCartesianRelative2, OrArm>, StAttachObject, SUCCESS>,\n   // Transition<EvCbFailure<CbMoveCartesianRelative2, OrArm>, StMoveCartesianRelative2, ABORT>, // retry\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause6, NEXT>  \n    >\n\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    geometry_msgs::msg::Vector3 position;\n    position.x = -0.25;  // Increased to 25cm for dramatic movement\n    position.y = 0.0;\n    position.z = 0.20;   // Increased to 20cm for dramatic movement\n    configure_orthogonal<OrArm, CbMoveCartesianRelative2>(\"world\", \"panda_link8\", position);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering StMoveCartesianRelative2\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit(ABORT)\n  {\n    rclcpp::sleep_for(1s);\n    RCLCPP_INFO(getLogger(), \"On Exit!\");\n  }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_move_end_effector.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveEndEffector : smacc2::SmaccState<StMoveEndEffector, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbMoveEndEffector, OrArm>, StPause11, SUCCESS>,\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause11, NEXT>  \n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    geometry_msgs::msg::PoseStamped target_pose;\n    target_pose.header.frame_id = \"panda_link0\";\n    // Dramatic movement for high visibility in RViz\n    // Current pose: [0.554, 0.000, 0.625]\n    target_pose.pose.position.x = 0.3;   // Large movement: -0.254m from current\n    target_pose.pose.position.y = 0.2;   // Lateral movement: +0.2m from current\n    target_pose.pose.position.z = 0.4;   // Vertical movement: -0.225m from current\n\n    // Add orientation change for more visible motion\n    // 45-degree rotation around Z-axis for dramatic effect\n    target_pose.pose.orientation.x = 0.0;\n    target_pose.pose.orientation.y = 0.0;\n    target_pose.pose.orientation.z = 0.383;  // sin(45°/2)\n\n    target_pose.pose.orientation.w = 0.924;  // cos(45°/2)\n\n    //target_pose.pose.position.z = 0.579;\n\n  // random valid\n  // - Translation: [0.137, -0.730, 0.267]\n  // - Rotation: in Quaternion [0.498, 0.470, 0.715, 0.141]\n\n\n    //0.8939967, 0, 0, -0.4480736 ]\n    // target_pose.pose.orientation.x = 0.8939967;\n    // target_pose.pose.orientation.y = 0;\n    // target_pose.pose.orientation.z = 0;\n    // target_pose.pose.orientation.w = -0.4480736 ;\n\n    configure_orthogonal<OrArm, CbMoveEndEffector>(target_pose, \"panda_link8\");\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering StMoveEndEffector\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_move_joints_1.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveJoints1 : smacc2::SmaccState<StMoveJoints1, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n    Transition<EvCbSuccess<CbMoveJoints, OrArm>, StPause3, SUCCESS>,\n  \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause3, NEXT>  \n\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    std::map<std::string, double> jointValues{\n      {\"panda_joint1\", 0.0},\n      {\"panda_joint2\", 0.0},\n      {\"panda_joint3\", 0.0},\n      {\"panda_joint4\", -M_PI/2},\n      {\"panda_joint5\", 0.0},\n      {\"panda_joint6\", M_PI/2},\n      {\"panda_joint7\", 0.0}\n      };\n\n    // panda_joint6:\n    // panda_joint7:\n    // panda_finger_joint1:\n    // panda_finger_joint2:\n\n    configure_orthogonal<OrArm, CbMoveJoints>(jointValues);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure()\n  {\n    ClMoveit2z * moveGroupClient;\n    this->requiresClient(moveGroupClient);\n    this->getClientBehavior<OrArm,CbMoveJoints>()->scalingFactor_ = 1;\n  }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_move_joints_2.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveJoints2 : smacc2::SmaccState<StMoveJoints2, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n    Transition<EvCbSuccess<CbMoveJoints, OrArm>, StPause4, SUCCESS>,\n    Transition<EvCbFailure<CbMoveJoints, OrArm>, StMoveJoints2, ABORT>,\n \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause4, NEXT>  \n\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    std::map<std::string, double> jointValues{\n      {\"panda_joint1\", 0.5},\n      {\"panda_joint2\", 0.0},\n      {\"panda_joint3\", 0.0},\n      {\"panda_joint4\", -M_PI/2},\n      {\"panda_joint5\", 0.0},\n      {\"panda_joint6\", M_PI/2},\n      {\"panda_joint7\", 0.0}\n      };\n\n    // panda_joint6:\n    // panda_joint7:\n    // panda_finger_joint1:\n    // panda_finger_joint2:\n\n    configure_orthogonal<OrArm, CbMoveJoints>(jointValues);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure()\n  {\n    ClMoveit2z * moveGroupClient;\n    this->requiresClient(moveGroupClient);\n    this->getClientBehavior<OrArm,CbMoveJoints>()->scalingFactor_ = 1;\n  }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_move_joints_3.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveJoints3 : smacc2::SmaccState<StMoveJoints3, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n    Transition<EvCbSuccess<CbMoveJoints, OrArm>, StPause8, SUCCESS>,\n    Transition<EvCbFailure<CbMoveJoints, OrArm>, StMoveJoints3, ABORT>,\n  \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause8, NEXT>  \n\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    std::map<std::string, double> jointValues{\n      {\"panda_joint1\", 0.0},\n      {\"panda_joint2\", 0.0},\n      {\"panda_joint3\", 0.0},\n      {\"panda_joint4\", -M_PI/2},\n      {\"panda_joint5\", 0.0},\n      {\"panda_joint6\", M_PI/2},\n      {\"panda_joint7\", 0.0}\n      };\n\n    // panda_joint6:\n    // panda_joint7:\n    // panda_finger_joint1:\n    // panda_finger_joint2:\n\n    configure_orthogonal<OrArm, CbMoveJoints>(jointValues);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure()\n  {\n    ClMoveit2z * moveGroupClient;\n    this->requiresClient(moveGroupClient);\n    this->getClientBehavior<OrArm,CbMoveJoints>()->scalingFactor_ = 1;\n  }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_move_joints_4.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveJoints4 : smacc2::SmaccState<StMoveJoints4, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n    Transition<EvCbSuccess<CbMoveJoints, OrArm>, StPause10, SUCCESS>,\n    Transition<EvCbFailure<CbMoveJoints, OrArm>, StMoveJoints4, ABORT>,\n  \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause10, NEXT>  \n\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    std::map<std::string, double> jointValues{\n      {\"panda_joint1\", 0.0},\n      {\"panda_joint2\", 0.0},\n      {\"panda_joint3\", 0.0},\n      {\"panda_joint4\", -M_PI/2},\n      {\"panda_joint5\", 0.0},\n      {\"panda_joint6\", M_PI/2},\n      {\"panda_joint7\", 0.0}\n      };\n\n    // panda_joint6:\n    // panda_joint7:\n    // panda_finger_joint1:\n    // panda_finger_joint2:\n\n    configure_orthogonal<OrArm, CbMoveJoints>(jointValues);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure()\n  {\n    ClMoveit2z * moveGroupClient;\n    this->requiresClient(moveGroupClient);\n    this->getClientBehavior<OrArm,CbMoveJoints>()->scalingFactor_ = 1;\n  }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_move_joints_5.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveJoints5 : smacc2::SmaccState<StMoveJoints5, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n    Transition<EvCbSuccess<CbMoveJoints, OrArm>, StPause12, SUCCESS>,\n    Transition<EvCbFailure<CbMoveJoints, OrArm>, StMoveJoints5, ABORT>,\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause12, NEXT>\n\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    std::map<std::string, double> jointValues{\n      {\"panda_joint1\", 0.0},\n      {\"panda_joint2\", 0.0},\n      {\"panda_joint3\", 0.0},\n      {\"panda_joint4\", -M_PI/2},\n      {\"panda_joint5\", 0.0},\n      {\"panda_joint6\", M_PI/2},\n      {\"panda_joint7\", 0.0}\n      };\n\n    // panda_joint6:\n    // panda_joint7:\n    // panda_finger_joint1:\n    // panda_finger_joint2:\n\n    configure_orthogonal<OrArm, CbMoveJoints>(jointValues);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure()\n  {\n    ClMoveit2z * moveGroupClient;\n    this->requiresClient(moveGroupClient);\n    this->getClientBehavior<OrArm,CbMoveJoints>()->scalingFactor_ = 1;\n  }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_move_known_state_1.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveKnownState1 : smacc2::SmaccState<StMoveKnownState1, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n      Transition<EvCbSuccess<CbMoveKnownState, OrArm>, StPause2, SUCCESS>,\n \n      Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause2, NEXT>  \n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    std::string pkg = \"sm_panda_cl_moveit2z_cb_inventory\";\n    std::string filepath = \"config/move_group_client/known_states/control_authority_posture.yaml\";\n\n    configure_orthogonal<OrArm, CbMoveKnownState>(pkg, filepath);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering StMoveKnownState\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_move_known_state_2.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveKnownState2 : smacc2::SmaccState<StMoveKnownState2, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n      Transition<EvCbSuccess<CbMoveKnownState, OrArm>, StPause5, SUCCESS>,\n\n      Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause5, NEXT>\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    std::string pkg = \"sm_panda_cl_moveit2z_cb_inventory\";\n    std::string filepath = \"config/move_group_client/known_states/control_authority_posture.yaml\";\n\n    configure_orthogonal<OrArm, CbMoveKnownState>(pkg, filepath);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering StMoveKnownState\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_pause_1.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause1 : smacc2::SmaccState<StPause1, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StAcquireSensors, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StAcquireSensors, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_pause_10.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause10 : smacc2::SmaccState<StPause10, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveEndEffector, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveEndEffector, NEXT>  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_pause_11.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause11 : smacc2::SmaccState<StPause11, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveJoints5, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveJoints5, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_pause_12.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause12 : smacc2::SmaccState<StPause12, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StPause13, SUCCESS>,\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause13, NEXT>\n\n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_pause_13.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause13 : smacc2::SmaccState<StPause13, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    //Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveEndEffector, SUCCESS>,\n    \n    //Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveEndEffector, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_pause_2.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause2 : smacc2::SmaccState<StPause2, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveJoints1, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveJoints1, NEXT>  \n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_pause_3.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause3 : smacc2::SmaccState<StPause3, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveJoints2, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveJoints2, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_pause_4.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause4 : smacc2::SmaccState<StPause4, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveKnownState2, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveKnownState2, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_pause_5.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause5 : smacc2::SmaccState<StPause5, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveCartesianRelative2, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveCartesianRelative2, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_pause_6.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause6 : smacc2::SmaccState<StPause6, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StUndoLastTrajectory, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StUndoLastTrajectory, NEXT>  \n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_pause_7.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause7 : smacc2::SmaccState<StPause7, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveJoints3, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveJoints3, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_pause_8.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause8 : smacc2::SmaccState<StPause8, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StEndEffectorRotate, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StEndEffectorRotate, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_pause_9.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause9 : smacc2::SmaccState<StPause9, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveJoints4, SUCCESS>,\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveJoints4, NEXT>\n\n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/include/sm_panda_cl_moveit2z_cb_inventory/states/st_undo_last_trajectory.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_panda_cl_moveit2z_cb_inventory\n{\n// SMACC2 classes\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StUndoLastTrajectory : smacc2::SmaccState<StUndoLastTrajectory, SmPandaClMoveit2zCbInventory>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n      Transition<EvCbSuccess<CbUndoLastTrajectory, OrArm>, StPause7, SUCCESS>,\n\n      Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause7, NEXT>\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrArm, CbUndoLastTrajectory>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering StUndoLastTrajectory\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/launch/panda_hello_moveit.rviz",
    "content": "Panels:\n  - Class: rviz_common/Displays\n    Help Height: 78\n    Name: Displays\n    Property Tree Widget:\n      Expanded:\n        - /Global Options1\n        - /Status1\n        - /PlanningScene1\n        - /Trajectory1\n        - /MarkerArray1\n      Splitter Ratio: 0.5\n    Tree Height: 114\n  - Class: rviz_common/Selection\n    Name: Selection\n  - Class: rviz_common/Tool Properties\n    Expanded:\n      - /2D Goal Pose1\n      - /Publish Point1\n    Name: Tool Properties\n    Splitter Ratio: 0.5886790156364441\n  - Class: rviz_common/Views\n    Expanded:\n      - /Current View1\n    Name: Views\n    Splitter Ratio: 0.5\n  - Class: rviz_visual_tools/RvizVisualToolsGui\n    Name: RvizVisualToolsGui\nVisualization Manager:\n  Class: \"\"\n  Displays:\n    - Alpha: 0.5\n      Cell Size: 1\n      Class: rviz_default_plugins/Grid\n      Color: 160; 160; 164\n      Enabled: true\n      Line Style:\n        Line Width: 0.029999999329447746\n        Value: Lines\n      Name: Grid\n      Normal Cell Count: 0\n      Offset:\n        X: 0\n        Y: 0\n        Z: 0\n      Plane: XY\n      Plane Cell Count: 10\n      Reference Frame: <Fixed Frame>\n      Value: true\n    - Class: moveit_rviz_plugin/PlanningScene\n      Enabled: true\n      Move Group Namespace: \"\"\n      Name: PlanningScene\n      Planning Scene Topic: /monitored_planning_scene\n      Robot Description: robot_description\n      Scene Geometry:\n        Scene Alpha: 0.8999999761581421\n        Scene Color: 50; 230; 50\n        Scene Display Time: 0.20000000298023224\n        Show Scene Geometry: true\n        Voxel Coloring: Z-Axis\n        Voxel Rendering: Occupied Voxels\n      Scene Robot:\n        Attached Body Color: 150; 50; 150\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          panda_hand:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_leftfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link1:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link2:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link3:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link4:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link5:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link6:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link7:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link8:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          panda_rightfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Robot Alpha: 1\n        Show Robot Collision: false\n        Show Robot Visual: true\n      Value: true\n    - Class: moveit_rviz_plugin/Trajectory\n      Color Enabled: false\n      Enabled: true\n      Interrupt Display: false\n      Links:\n        All Links Enabled: true\n        Expand Joint Details: false\n        Expand Link Details: false\n        Expand Tree: false\n        Link Tree Style: Links in Alphabetic Order\n        panda_hand:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_leftfinger:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link0:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link1:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link2:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link3:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link4:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link5:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link6:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link7:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link8:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n        panda_rightfinger:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n      Loop Animation: false\n      Name: Trajectory\n      Robot Alpha: 0.5\n      Robot Color: 150; 50; 150\n      Robot Description: robot_description\n      Show Robot Collision: false\n      Show Robot Visual: true\n      Show Trail: false\n      State Display Time: 0.05 s\n      Trail Step Size: 1\n      Trajectory Topic: /display_planned_path\n      Use Sim Time: false\n      Value: true\n    - Acceleration_Scaling_Factor: 0.1\n      Class: moveit_rviz_plugin/MotionPlanning\n      Enabled: true\n      Move Group Namespace: \"\"\n      MoveIt_Allow_Approximate_IK: false\n      MoveIt_Allow_External_Program: false\n      MoveIt_Allow_Replanning: false\n      MoveIt_Allow_Sensor_Positioning: false\n      MoveIt_Planning_Attempts: 10\n      MoveIt_Planning_Time: 5\n      MoveIt_Use_Cartesian_Path: false\n      MoveIt_Use_Constraint_Aware_IK: true\n      MoveIt_Workspace:\n        Center:\n          X: 0\n          Y: 0\n          Z: 0\n        Size:\n          X: 2\n          Y: 2\n          Z: 2\n      Name: MotionPlanning\n      Planned Path:\n        Color Enabled: false\n        Interrupt Display: false\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          panda_hand:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_leftfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link1:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link2:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link3:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link4:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link5:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link6:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link7:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link8:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          panda_rightfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Loop Animation: false\n        Robot Alpha: 0.5\n        Robot Color: 150; 50; 150\n        Show Robot Collision: false\n        Show Robot Visual: true\n        Show Trail: false\n        State Display Time: 0.05 s\n        Trail Step Size: 1\n        Trajectory Topic: /display_planned_path\n        Use Sim Time: false\n      Planning Metrics:\n        Payload: 1\n        Show Joint Torques: false\n        Show Manipulability: false\n        Show Manipulability Index: false\n        Show Weight Limit: false\n        TextHeight: 0.07999999821186066\n      Planning Request:\n        Colliding Link Color: 255; 0; 0\n        Goal State Alpha: 1\n        Goal State Color: 250; 128; 0\n        Interactive Marker Size: 0\n        Joint Violation Color: 255; 0; 255\n        Planning Group: panda_arm\n        Query Goal State: true\n        Query Start State: false\n        Show Workspace: false\n        Start State Alpha: 1\n        Start State Color: 0; 255; 0\n      Planning Scene Topic: /monitored_planning_scene\n      Robot Description: robot_description\n      Scene Geometry:\n        Scene Alpha: 0.8999999761581421\n        Scene Color: 50; 230; 50\n        Scene Display Time: 0.009999999776482582\n        Show Scene Geometry: true\n        Voxel Coloring: Z-Axis\n        Voxel Rendering: Occupied Voxels\n      Scene Robot:\n        Attached Body Color: 150; 50; 150\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          panda_hand:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_leftfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link1:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link2:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link3:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link4:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link5:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link6:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link7:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link8:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          panda_rightfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Robot Alpha: 1\n        Show Robot Collision: false\n        Show Robot Visual: true\n      Value: true\n      Velocity_Scaling_Factor: 0.1\n    - Class: rviz_default_plugins/MarkerArray\n      Enabled: true\n      Name: MarkerArray\n      Namespaces:\n        Path: true\n        Sphere: true\n        Text: true\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: rviz_visual_tools\n      Value: true\n  Enabled: true\n  Global Options:\n    Background Color: 48; 48; 48\n    Fixed Frame: panda_link0\n    Frame Rate: 30\n  Name: root\n  Tools:\n    - Class: rviz_default_plugins/Interact\n      Hide Inactive Objects: true\n    - Class: rviz_default_plugins/MoveCamera\n    - Class: rviz_default_plugins/Select\n    - Class: rviz_default_plugins/FocusCamera\n    - Class: rviz_default_plugins/Measure\n      Line color: 128; 128; 0\n    - Class: rviz_default_plugins/SetInitialPose\n      Covariance x: 0.25\n      Covariance y: 0.25\n      Covariance yaw: 0.06853891909122467\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /initialpose\n    - Class: rviz_default_plugins/SetGoal\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /goal_pose\n    - Class: rviz_default_plugins/PublishPoint\n      Single click: true\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /clicked_point\n  Transformation:\n    Current:\n      Class: rviz_default_plugins/TF\n  Value: true\n  Views:\n    Current:\n      Class: rviz_default_plugins/Orbit\n      Distance: 3.8008623123168945\n      Enable Stereo Rendering:\n        Stereo Eye Separation: 0.05999999865889549\n        Stereo Focal Distance: 1\n        Swap Stereo Eyes: false\n        Value: false\n      Focal Point:\n        X: 0\n        Y: 0\n        Z: 0\n      Focal Shape Fixed Size: true\n      Focal Shape Size: 0.05000000074505806\n      Invert Z Axis: false\n      Name: Current View\n      Near Clip Distance: 0.009999999776482582\n      Pitch: 0.5753980278968811\n      Target Frame: <Fixed Frame>\n      Value: Orbit (rviz)\n      Yaw: 0.4903981685638428\n    Saved: ~\nWindow Geometry:\n  Displays:\n    collapsed: false\n  Height: 812\n  Hide Left Dock: false\n  Hide Right Dock: false\n  MotionPlanning:\n    collapsed: false\n  MotionPlanning - Trajectory Slider:\n    collapsed: false\n  QMainWindow State: 000000ff00000000fd000000040000000000000257000002d6fc020000000dfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003b000000fb000000c700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000003c005400720061006a006500630074006f007200790020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000003f00fffffffb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000003f00fffffffb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e0067010000013c000001900000016900fffffffb00000024005200760069007a00560069007300750061006c0054006f006f006c007300470075006901000002d20000003f0000003f00ffffff000000010000010f000002d6fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003b000002d6000000a000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d006501000000000000045000000000000000000000028b000002d600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000\n  RvizVisualToolsGui:\n    collapsed: false\n  Selection:\n    collapsed: false\n  Tool Properties:\n    collapsed: false\n  Trajectory - Trajectory Slider:\n    collapsed: false\n  Views:\n    collapsed: false\n  Width: 1533\n  X: 1994\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/launch/panda_moveit_config_demo.rviz",
    "content": "Panels:\n  - Class: rviz_common/Displays\n    Help Height: 78\n    Name: Displays\n    Property Tree Widget:\n      Expanded:\n        - /Global Options1\n        - /Status1\n        - /PlanningScene1\n        - /Trajectory1\n      Splitter Ratio: 0.5\n    Tree Height: 137\n  - Class: rviz_common/Selection\n    Name: Selection\n  - Class: rviz_common/Tool Properties\n    Expanded:\n      - /2D Goal Pose1\n      - /Publish Point1\n    Name: Tool Properties\n    Splitter Ratio: 0.5886790156364441\n  - Class: rviz_common/Views\n    Expanded:\n      - /Current View1\n    Name: Views\n    Splitter Ratio: 0.5\nVisualization Manager:\n  Class: \"\"\n  Displays:\n    - Alpha: 0.5\n      Cell Size: 1\n      Class: rviz_default_plugins/Grid\n      Color: 160; 160; 164\n      Enabled: true\n      Line Style:\n        Line Width: 0.029999999329447746\n        Value: Lines\n      Name: Grid\n      Normal Cell Count: 0\n      Offset:\n        X: 0\n        Y: 0\n        Z: 0\n      Plane: XY\n      Plane Cell Count: 10\n      Reference Frame: <Fixed Frame>\n      Value: true\n    - Class: moveit_rviz_plugin/PlanningScene\n      Enabled: true\n      Move Group Namespace: \"\"\n      Name: PlanningScene\n      Planning Scene Topic: /monitored_planning_scene\n      Robot Description: robot_description\n      Scene Geometry:\n        Scene Alpha: 0.8999999761581421\n        Scene Color: 50; 230; 50\n        Scene Display Time: 0.20000000298023224\n        Show Scene Geometry: true\n        Voxel Coloring: Z-Axis\n        Voxel Rendering: Occupied Voxels\n      Scene Robot:\n        Attached Body Color: 150; 50; 150\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          panda_hand:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_leftfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link1:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link2:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link3:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link4:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link5:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link6:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link7:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link8:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          panda_rightfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Robot Alpha: 1\n        Show Robot Collision: false\n        Show Robot Visual: true\n      Value: true\n    - Class: moveit_rviz_plugin/Trajectory\n      Color Enabled: false\n      Enabled: true\n      Interrupt Display: false\n      Links:\n        All Links Enabled: true\n        Expand Joint Details: false\n        Expand Link Details: false\n        Expand Tree: false\n        Link Tree Style: Links in Alphabetic Order\n        panda_hand:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_leftfinger:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link0:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link1:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link2:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link3:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link4:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link5:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link6:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link7:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link8:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n        panda_rightfinger:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n      Loop Animation: false\n      Name: Trajectory\n      Robot Alpha: 0.5\n      Robot Color: 150; 50; 150\n      Robot Description: robot_description\n      Show Robot Collision: false\n      Show Robot Visual: true\n      Show Trail: false\n      State Display Time: 0.05 s\n      Trail Step Size: 1\n      Trajectory Topic: /display_planned_path\n      Value: true\n    - Acceleration_Scaling_Factor: 0.1\n      Class: moveit_rviz_plugin/MotionPlanning\n      Enabled: true\n      Move Group Namespace: \"\"\n      MoveIt_Allow_Approximate_IK: false\n      MoveIt_Allow_External_Program: false\n      MoveIt_Allow_Replanning: false\n      MoveIt_Allow_Sensor_Positioning: false\n      MoveIt_Planning_Attempts: 10\n      MoveIt_Planning_Time: 5\n      MoveIt_Use_Cartesian_Path: false\n      MoveIt_Use_Constraint_Aware_IK: true\n      MoveIt_Warehouse_Host: 127.0.0.1\n      MoveIt_Warehouse_Port: 33829\n      MoveIt_Workspace:\n        Center:\n          X: 0\n          Y: 0\n          Z: 0\n        Size:\n          X: 2\n          Y: 2\n          Z: 2\n      Name: MotionPlanning\n      Planned Path:\n        Color Enabled: false\n        Interrupt Display: false\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          panda_hand:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_leftfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link1:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link2:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link3:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link4:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link5:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link6:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link7:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link8:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          panda_rightfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Loop Animation: false\n        Robot Alpha: 0.5\n        Robot Color: 150; 50; 150\n        Show Robot Collision: false\n        Show Robot Visual: true\n        Show Trail: false\n        State Display Time: 0.05 s\n        Trail Step Size: 1\n        Trajectory Topic: /display_planned_path\n      Planning Metrics:\n        Payload: 1\n        Show Joint Torques: false\n        Show Manipulability: false\n        Show Manipulability Index: false\n        Show Weight Limit: false\n        TextHeight: 0.07999999821186066\n      Planning Request:\n        Colliding Link Color: 255; 0; 0\n        Goal State Alpha: 1\n        Goal State Color: 250; 128; 0\n        Interactive Marker Size: 0\n        Joint Violation Color: 255; 0; 255\n        Planning Group: panda_arm\n        Query Goal State: true\n        Query Start State: false\n        Show Workspace: false\n        Start State Alpha: 1\n        Start State Color: 0; 255; 0\n      Planning Scene Topic: /monitored_planning_scene\n      Robot Description: robot_description\n      Scene Geometry:\n        Scene Alpha: 0.8999999761581421\n        Scene Color: 50; 230; 50\n        Scene Display Time: 0.009999999776482582\n        Show Scene Geometry: true\n        Voxel Coloring: Z-Axis\n        Voxel Rendering: Occupied Voxels\n      Scene Robot:\n        Attached Body Color: 150; 50; 150\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          panda_hand:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_leftfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link1:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link2:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link3:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link4:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link5:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link6:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link7:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link8:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          panda_rightfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Robot Alpha: 1\n        Show Robot Collision: false\n        Show Robot Visual: true\n      Value: true\n      Velocity_Scaling_Factor: 0.1\n  Enabled: true\n  Global Options:\n    Background Color: 48; 48; 48\n    Fixed Frame: panda_link0\n    Frame Rate: 30\n  Name: root\n  Tools:\n    - Class: rviz_default_plugins/Interact\n      Hide Inactive Objects: true\n    - Class: rviz_default_plugins/MoveCamera\n    - Class: rviz_default_plugins/Select\n    - Class: rviz_default_plugins/FocusCamera\n    - Class: rviz_default_plugins/Measure\n      Line color: 128; 128; 0\n    - Class: rviz_default_plugins/SetInitialPose\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /initialpose\n    - Class: rviz_default_plugins/SetGoal\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /goal_pose\n    - Class: rviz_default_plugins/PublishPoint\n      Single click: true\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /clicked_point\n  Transformation:\n    Current:\n      Class: rviz_default_plugins/TF\n  Value: true\n  Views:\n    Current:\n      Class: rviz_default_plugins/Orbit\n      Distance: 3.8008623123168945\n      Enable Stereo Rendering:\n        Stereo Eye Separation: 0.05999999865889549\n        Stereo Focal Distance: 1\n        Swap Stereo Eyes: false\n        Value: false\n      Focal Point:\n        X: 0\n        Y: 0\n        Z: 0\n      Focal Shape Fixed Size: true\n      Focal Shape Size: 0.05000000074505806\n      Invert Z Axis: false\n      Name: Current View\n      Near Clip Distance: 0.009999999776482582\n      Pitch: 0.5753980278968811\n      Target Frame: <Fixed Frame>\n      Value: Orbit (rviz)\n      Yaw: 0.4903981685638428\n    Saved: ~\nWindow Geometry:\n  Displays:\n    collapsed: false\n  Height: 812\n  Hide Left Dock: false\n  Hide Right Dock: false\n  MotionPlanning:\n    collapsed: false\n  MotionPlanning - Trajectory Slider:\n    collapsed: false\n  QMainWindow State: 000000ff00000000fd000000040000000000000257000002d2fc020000000cfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d00000114000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000003c005400720061006a006500630074006f007200790020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000004100fffffffb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000004100fffffffb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e00670100000157000001b80000017d00ffffff000000010000010f000002d2fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003d000002d2000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d006501000000000000045000000000000000000000028b000002d200000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000\n  Selection:\n    collapsed: false\n  Tool Properties:\n    collapsed: false\n  Trajectory - Trajectory Slider:\n    collapsed: false\n  Views:\n    collapsed: false\n  Width: 1533\n  X: 1992\n  Y: 231\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/launch/panda_moveit_config_demo_empty.rviz",
    "content": "Panels:\n  - Class: rviz_common/Displays\n    Help Height: 0\n    Name: Displays\n    Property Tree Widget:\n      Expanded:\n        - /Global Options1\n        - /Status1\n      Splitter Ratio: 0.5\n    Tree Height: 865\n  - Class: rviz_common/Selection\n    Name: Selection\n  - Class: rviz_common/Tool Properties\n    Expanded:\n      - /2D Goal Pose1\n      - /Publish Point1\n    Name: Tool Properties\n    Splitter Ratio: 0.5886790156364441\n  - Class: rviz_common/Views\n    Expanded:\n      - /Current View1\n    Name: Views\n    Splitter Ratio: 0.5\nVisualization Manager:\n  Class: \"\"\n  Displays:\n    - Alpha: 0.5\n      Cell Size: 1\n      Class: rviz_default_plugins/Grid\n      Color: 160; 160; 164\n      Enabled: true\n      Line Style:\n        Line Width: 0.029999999329447746\n        Value: Lines\n      Name: Grid\n      Normal Cell Count: 0\n      Offset:\n        X: 0\n        Y: 0\n        Z: 0\n      Plane: XY\n      Plane Cell Count: 10\n      Reference Frame: <Fixed Frame>\n      Value: true\n  Enabled: true\n  Global Options:\n    Background Color: 48; 48; 48\n    Fixed Frame: panda_link0\n    Frame Rate: 30\n  Name: root\n  Tools:\n    - Class: rviz_default_plugins/Interact\n      Hide Inactive Objects: true\n    - Class: rviz_default_plugins/MoveCamera\n    - Class: rviz_default_plugins/Select\n    - Class: rviz_default_plugins/FocusCamera\n    - Class: rviz_default_plugins/Measure\n      Line color: 128; 128; 0\n    - Class: rviz_default_plugins/SetInitialPose\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /initialpose\n    - Class: rviz_default_plugins/SetGoal\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /goal_pose\n    - Class: rviz_default_plugins/PublishPoint\n      Single click: true\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /clicked_point\n  Transformation:\n    Current:\n      Class: rviz_default_plugins/TF\n  Value: true\n  Views:\n    Current:\n      Class: rviz_default_plugins/Orbit\n      Distance: 3.8008623123168945\n      Enable Stereo Rendering:\n        Stereo Eye Separation: 0.05999999865889549\n        Stereo Focal Distance: 1\n        Swap Stereo Eyes: false\n        Value: false\n      Focal Point:\n        X: 0\n        Y: 0\n        Z: 0\n      Focal Shape Fixed Size: true\n      Focal Shape Size: 0.05000000074505806\n      Invert Z Axis: false\n      Name: Current View\n      Near Clip Distance: 0.009999999776482582\n      Pitch: 0.5753980278968811\n      Target Frame: <Fixed Frame>\n      Value: Orbit (rviz)\n      Yaw: 0.4903981685638428\n    Saved: ~\nWindow Geometry:\n  Displays:\n    collapsed: false\n  Height: 1016\n  Hide Left Dock: false\n  Hide Right Dock: false\n  QMainWindow State: 000000ff00000000fd0000000400000000000002570000039efc020000000cfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d0000039e000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000003c005400720061006a006500630074006f007200790020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e0067010000025e0000017d0000000000000000000000010000010f0000039efc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003d0000039e000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d00650100000000000004500000000000000000000003c60000039e00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000\n  Selection:\n    collapsed: false\n  Tool Properties:\n    collapsed: false\n  Views:\n    collapsed: false\n  Width: 1848\n  X: 1992\n  Y: 27\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/launch/sm_panda_cl_moveit2z_cb_inventory.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\nfrom datetime import datetime\nfrom launch import LaunchDescription\nfrom launch.actions import DeclareLaunchArgument, OpaqueFunction\nfrom launch.substitutions import LaunchConfiguration, PathJoinSubstitution\nfrom launch_ros.actions import Node\nfrom launch_ros.substitutions import FindPackageShare\nfrom ament_index_python.packages import get_package_share_directory\nfrom moveit_configs_utils import MoveItConfigsBuilder\n\n\ndef setup_log_directory():\n    \"\"\"\n    Creates timestamped log directory with error handling.\n    Returns: (log_dir_path, timestamp) tuple\n    \"\"\"\n    timestamp = datetime.now().strftime(\"%Y-%m-%d-%H-%M-%S\")\n\n    # Primary log directory location\n    log_dir = os.path.join(os.path.expanduser(\"~\"), \".ros\", \"log\", timestamp)\n\n    try:\n        os.makedirs(log_dir, mode=0o755, exist_ok=True)\n        print(f\"[Launch] Log directory created: {log_dir}\")\n        return log_dir, timestamp\n    except PermissionError as e:\n        # Fallback to /tmp if ~/.ros is not writable\n        fallback_dir = os.path.join(\"/tmp\", \"sm_panda_moveit2z_cb_inventory_logs\", timestamp)\n        print(f\"[Launch] WARNING: Cannot create log directory at {log_dir}\")\n        print(f\"[Launch] Permission denied: {e}\")\n        print(f\"[Launch] Using fallback directory: {fallback_dir}\")\n        try:\n            os.makedirs(fallback_dir, mode=0o755, exist_ok=True)\n            return fallback_dir, timestamp\n        except Exception as fallback_error:\n            print(f\"[Launch] ERROR: Cannot create fallback directory: {fallback_error}\")\n            print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n            return None, timestamp\n    except OSError as e:\n        print(f\"[Launch] ERROR: Failed to create log directory: {e}\")\n        print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n        return None, timestamp\n\n\ndef generate_launch_description():\n\n    declared_arguments = []\n    declared_arguments.append(\n        DeclareLaunchArgument(\n            \"rviz_config\",\n            default_value=\"panda_moveit_config_demo.rviz\",\n            description=\"RViz configuration file\",\n        )\n    )\n\n    return LaunchDescription(declared_arguments + [OpaqueFunction(function=launch_setup)])\n\n\ndef launch_setup(context, *args, **kwargs):\n\n    # Setup logging directory\n    log_dir, timestamp = setup_log_directory()\n\n    moveit_config = (\n        MoveItConfigsBuilder(\"moveit_resources_panda\")\n        .robot_description(file_path=\"config/panda.urdf.xacro\")\n        .trajectory_execution(file_path=\"config/gripper_moveit_controllers.yaml\")\n        .planning_scene_monitor(\n            publish_robot_description=True, publish_robot_description_semantic=True\n        )\n        .planning_pipelines(pipelines=[\"ompl\", \"chomp\", \"pilz_industrial_motion_planner\"])\n        .to_moveit_configs()\n    )\n\n    # Start the actual move_group node/action server\n    # Construct logging prefix\n    if log_dir:\n        move_group_log = os.path.join(log_dir, f\"move_group_{timestamp}.log\")\n        move_group_prefix = f\"konsole --hold -p tabtitle='Move Group' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {move_group_log}; exec bash' -- \"\n    else:\n        move_group_prefix = \"konsole --hold -p tabtitle='Move Group' -e\"\n\n    run_move_group_node = Node(\n        package=\"moveit_ros_move_group\",\n        executable=\"move_group\",\n        output=\"screen\",\n        parameters=[moveit_config.to_dict()],\n        prefix=move_group_prefix,\n        arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n    )\n\n    rviz_base = LaunchConfiguration(\"rviz_config\")\n    rviz_config = PathJoinSubstitution(\n        [FindPackageShare(\"sm_panda_cl_moveit2z_cb_inventory\"), \"launch\", rviz_base]\n    )\n\n    # RViz\n    rviz_node = Node(\n        package=\"rviz2\",\n        executable=\"rviz2\",\n        name=\"rviz2\",\n        output=\"log\",\n        arguments=[\"-d\", rviz_config],\n        parameters=[\n            moveit_config.robot_description,\n            moveit_config.robot_description_semantic,\n            moveit_config.robot_description_kinematics,\n            moveit_config.planning_pipelines,\n            moveit_config.joint_limits,\n        ],\n    )\n\n    # Static TF\n    static_tf = Node(\n        package=\"tf2_ros\",\n        executable=\"static_transform_publisher\",\n        name=\"static_transform_publisher\",\n        output=\"log\",\n        arguments=[\"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"world\", \"panda_link0\"],\n    )\n\n    # Publish TF\n    robot_state_publisher = Node(\n        package=\"robot_state_publisher\",\n        executable=\"robot_state_publisher\",\n        name=\"robot_state_publisher\",\n        output=\"both\",\n        parameters=[moveit_config.robot_description],\n    )\n\n    # ros2_control using FakeSystem as hardware\n    ros2_controllers_path = os.path.join(\n        get_package_share_directory(\"moveit_resources_panda_moveit_config\"),\n        \"config\",\n        \"ros2_controllers.yaml\",\n    )\n    ros2_control_node = Node(\n        package=\"controller_manager\",\n        executable=\"ros2_control_node\",\n        parameters=[moveit_config.robot_description, ros2_controllers_path],\n        output=\"both\",\n    )\n\n    joint_state_broadcaster_spawner = Node(\n        package=\"controller_manager\",\n        executable=\"spawner\",\n        arguments=[\n            \"joint_state_broadcaster\",\n            \"--controller-manager-timeout\",\n            \"300\",\n            \"--controller-manager\",\n            \"/controller_manager\",\n        ],\n    )\n\n    arm_controller_spawner = Node(\n        package=\"controller_manager\",\n        executable=\"spawner\",\n        arguments=[\"panda_arm_controller\", \"-c\", \"/controller_manager\"],\n    )\n\n    # Construct logging prefix for state machine node\n    if log_dir:\n        state_machine_log = os.path.join(log_dir, f\"state_machine_{timestamp}.log\")\n        state_machine_prefix = f\"konsole --hold -p tabtitle='State Machine' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {state_machine_log}; exec bash' -- \"\n    else:\n        state_machine_prefix = \"konsole --hold -p tabtitle='State Machine' -e\"\n\n    smacc_state_machine_spawner = Node(\n        package=\"sm_panda_cl_moveit2z_cb_inventory\",\n        executable=\"sm_panda_cl_moveit2z_cb_inventory_node\",\n        prefix=state_machine_prefix,\n        output=\"screen\",\n        arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n    )\n\n    # Construct logging prefix for keyboard client node\n    if log_dir:\n        keyboard_log = os.path.join(log_dir, f\"cl_keyboard_{timestamp}.log\")\n        keyboard_prefix = f\"konsole --hold -p tabtitle='Keyboard Client' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {keyboard_log}; exec bash' -- \"\n    else:\n        keyboard_prefix = \"konsole --hold -p tabtitle='Keyboard Client' -e\"\n\n    cl_keyboard_node = Node(\n        package=\"cl_keyboard\",\n        executable=\"keyboard_server_node.py\",\n        name=\"keyboard_server\",\n        output=\"screen\",\n        prefix=keyboard_prefix,\n        arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n    )\n\n    hand_controller_spawner = Node(\n        package=\"controller_manager\",\n        executable=\"spawner\",\n        arguments=[\"panda_hand_controller\", \"-c\", \"/controller_manager\"],\n    )\n    nodes_to_start = [\n        smacc_state_machine_spawner,\n        rviz_node,\n        static_tf,\n        robot_state_publisher,\n        run_move_group_node,\n        ros2_control_node,\n        joint_state_broadcaster_spawner,\n        arm_controller_spawner,\n        hand_controller_spawner,\n        cl_keyboard_node,\n    ]\n\n    return nodes_to_start\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_panda_cl_moveit2z_cb_inventory</name>\n  <version>3.0.1</version>\n  <description>The sm_panda_cl_moveit2z_cb_inventory package</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>libboost-thread-dev</depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>smacc2</depend>\n  <depend>cl_moveit2z</depend>\n  <depend>controller_manager</depend>\n  <depend>moveit_resources_panda_moveit_config</depend>\n  <depend>robot_state_publisher</depend>\n  <depend>moveit_visual_tools</depend>\n  <depend>moveit_planners_chomp</depend>\n  <depend>pilz_industrial_motion_planner</depend>\n  <depend>joint_state_broadcaster</depend>\n  <depend>moveit_simple_controller_manager</depend>\n  <depend>moveit_planners_ompl</depend>\n  <depend>moveit_plugins</depend>\n  <depend>moveit_ros_robot_interaction</depend>\n  <depend>moveit</depend>\n  <depend>cl_keyboard</depend>\n  <depend>rclcpp</depend>\n  <depend>yaml-cpp</depend>\n\n  <exec_depend>joint_trajectory_controller</exec_depend>\n  <exec_depend>konsole</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/rviz/view_robot.rviz",
    "content": "Panels:\n  - Class: rviz_common/Displays\n    Help Height: 87\n    Name: Displays\n    Property Tree Widget:\n      Expanded:\n        - /Global Options1\n      Splitter Ratio: 0.4957627058029175\n    Tree Height: 573\n  - Class: rviz_common/Selection\n    Name: Selection\n  - Class: rviz_common/Tool Properties\n    Expanded:\n      - /2D Goal Pose1\n      - /Publish Point1\n    Name: Tool Properties\n    Splitter Ratio: 0.5886790156364441\n  - Class: rviz_common/Views\n    Expanded:\n      - /Current View1\n    Name: Views\n    Splitter Ratio: 0.5\nVisualization Manager:\n  Class: \"\"\n  Displays:\n    - Alpha: 0.5\n      Cell Size: 1\n      Class: rviz_default_plugins/Grid\n      Color: 160; 160; 164\n      Enabled: true\n      Line Style:\n        Line Width: 0.029999999329447746\n        Value: Lines\n      Name: Grid\n      Normal Cell Count: 0\n      Offset:\n        X: 0\n        Y: 0\n        Z: 0\n      Plane: XY\n      Plane Cell Count: 10\n      Reference Frame: <Fixed Frame>\n      Value: true\n    - Acceleration_Scaling_Factor: 0.1\n      Class: moveit_rviz_plugin/MotionPlanning\n      Enabled: true\n      Move Group Namespace: \"\"\n      MoveIt_Allow_Approximate_IK: false\n      MoveIt_Allow_External_Program: false\n      MoveIt_Allow_Replanning: false\n      MoveIt_Allow_Sensor_Positioning: false\n      MoveIt_Planning_Attempts: 10\n      MoveIt_Planning_Time: 5\n      MoveIt_Use_Cartesian_Path: false\n      MoveIt_Use_Constraint_Aware_IK: false\n      MoveIt_Warehouse_Host: 127.0.0.1\n      MoveIt_Warehouse_Port: 33829\n      MoveIt_Workspace:\n        Center:\n          X: 0\n          Y: 0\n          Z: 0\n        Size:\n          X: 2\n          Y: 2\n          Z: 2\n      Name: MotionPlanning\n      Planned Path:\n        Color Enabled: true\n        Interrupt Display: true\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          base:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          base_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          base_link_inertia:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          flange:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          forearm_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          shoulder_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          tool0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          upper_arm_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          wrist_1_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          wrist_2_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          wrist_3_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Loop Animation: false\n        Robot Alpha: 0.5\n        Robot Color: 150; 50; 150\n        Show Robot Collision: false\n        Show Robot Visual: true\n        Show Trail: false\n        State Display Time: 0.05 s\n        Trail Step Size: 1\n        Trajectory Topic: /display_planned_path\n      Planning Metrics:\n        Payload: 1\n        Show Joint Torques: false\n        Show Manipulability: false\n        Show Manipulability Index: false\n        Show Weight Limit: false\n        TextHeight: 0.07999999821186066\n      Planning Request:\n        Colliding Link Color: 255; 0; 0\n        Goal State Alpha: 1\n        Goal State Color: 250; 128; 0\n        Interactive Marker Size: 0\n        Joint Violation Color: 255; 0; 255\n        Planning Group: ur_manipulator\n        Query Goal State: true\n        Query Start State: false\n        Show Workspace: false\n        Start State Alpha: 1\n        Start State Color: 0; 255; 0\n      Planning Scene Topic: monitored_planning_scene\n      Robot Description: robot_description\n      Scene Geometry:\n        Scene Alpha: 0.8999999761581421\n        Scene Color: 50; 230; 50\n        Scene Display Time: 0.009999999776482582\n        Show Scene Geometry: true\n        Voxel Coloring: Z-Axis\n        Voxel Rendering: Occupied Voxels\n      Scene Robot:\n        Attached Body Color: 150; 50; 150\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          base:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          base_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          base_link_inertia:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          flange:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          forearm_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          shoulder_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          tool0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          upper_arm_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          wrist_1_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          wrist_2_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          wrist_3_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Robot Alpha: 1\n        Show Robot Collision: false\n        Show Robot Visual: true\n      Value: true\n      Velocity_Scaling_Factor: 0.1\n  Enabled: true\n  Global Options:\n    Background Color: 48; 48; 48\n    Fixed Frame: world\n    Frame Rate: 30\n  Name: root\n  Tools:\n    - Class: rviz_default_plugins/Interact\n      Hide Inactive Objects: true\n    - Class: rviz_default_plugins/MoveCamera\n    - Class: rviz_default_plugins/Select\n    - Class: rviz_default_plugins/FocusCamera\n    - Class: rviz_default_plugins/Measure\n      Line color: 128; 128; 0\n    - Class: rviz_default_plugins/SetInitialPose\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /initialpose\n    - Class: rviz_default_plugins/SetGoal\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /goal_pose\n    - Class: rviz_default_plugins/PublishPoint\n      Single click: true\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /clicked_point\n  Transformation:\n    Current:\n      Class: rviz_default_plugins/TF\n  Value: true\n  Views:\n    Current:\n      Class: rviz_default_plugins/Orbit\n      Distance: 6.619869709014893\n      Enable Stereo Rendering:\n        Stereo Eye Separation: 0.05999999865889549\n        Stereo Focal Distance: 1\n        Swap Stereo Eyes: false\n        Value: false\n      Focal Point:\n        X: 0.2489434778690338\n        Y: -0.013962505385279655\n        Z: 0.13800443708896637\n      Focal Shape Fixed Size: true\n      Focal Shape Size: 0.05000000074505806\n      Invert Z Axis: false\n      Name: Current View\n      Near Clip Distance: 0.009999999776482582\n      Pitch: 0.4103981554508209\n      Target Frame: <Fixed Frame>\n      Value: Orbit (rviz)\n      Yaw: 1.210397720336914\n    Saved: ~\nWindow Geometry:\n  Displays:\n    collapsed: false\n  Height: 1381\n  Hide Left Dock: false\n  Hide Right Dock: false\n  MotionPlanning:\n    collapsed: false\n  MotionPlanning - Trajectory Slider:\n    collapsed: false\n  QMainWindow State: 000000ff00000000fd0000000400000000000001e0000004f6fc020000000bfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000007901000003fb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c0061007900730100000046000002e3000000ff01000003fb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000005201000003fb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e0067010000032a00000212000001b9010000030000000100000110000004f6fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730100000046000004f6000000d701000003fb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d006501000000000000045000000000000000000000070e000004f600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000\n  Selection:\n    collapsed: false\n  Tool Properties:\n    collapsed: false\n  Views:\n    collapsed: false\n  Width: 2560\n  X: 0\n  Y: 30\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory/src/sm_panda_cl_moveit2z_cb_inventory/sm_panda_cl_moveit2z_cb_inventory_node.cpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//\n// Author: Denis Štogl (template)\n//\n\n#include <sm_panda_cl_moveit2z_cb_inventory/sm_panda_cl_moveit2z_cb_inventory.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_panda_cl_moveit2z_cb_inventory::SmPandaClMoveit2zCbInventory>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/CHANGELOG.rst",
    "content": "Changelog for package sm_panda_cl_moveit2z_cb_inventory\n=======================================================\n\n.. note::\n   This package was created in September 2025 as a refactored version of sm_panda_moveit2z_cb_inventory.\n   For historical changes prior to 2.3.20, see sm_panda_moveit2z_cb_inventory/CHANGELOG.rst.\n\n2.3.20 (2025-11-01)\n-------------------\n* Created sm_panda_cl_moveit2z_cb_inventory as updated version using cl_moveit2z\n* sm_panda_moveit2z_cb_inventory refactor (`#633 <https://github.com/robosoft-ai/SMACC2/issues/633>`_)\n* Refactoring of cl_moveit2z to component-based architecture & header-only implementation (`#639 <https://github.com/robosoft-ai/SMACC2/issues/639>`_)\n* Contributors: Brett Aldrich, Pablo Iñigo Blasco\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_panda_cl_moveit2z_cb_inventory_isaacsim)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(smacc2_msgs REQUIRED)\nfind_package(std_msgs)\nfind_package(Boost COMPONENTS thread REQUIRED)\nfind_package(cl_moveit2z REQUIRED)\nfind_package(cl_keyboard REQUIRED)\nfind_package(rclcpp REQUIRED)\nfind_package(yaml-cpp REQUIRED)\n\n\nset(THIS_PACKAGE_INCLUDE_DEPENDS\n  cl_ros2_timer\n  smacc2\n  smacc2_msgs\n  std_msgs\n  cl_moveit2z\n  cl_keyboard\n  rclcpp\n)\n\ninclude_directories(\n  include\n  ${smacc2_INCLUDE_DIRS}\n  ${moveit2z_INCLUDE_DIRS}\n)\n\nadd_executable(${PROJECT_NAME}_node\n  src/${PROJECT_NAME}/${PROJECT_NAME}_node.cpp\n)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${cl_ros2_timer_LIBRARIES}\n  ${moveit2z_LIBRARIES}\n  ${Boost_LIBRARIES}\n  yaml-cpp\n)\n\nament_target_dependencies(${PROJECT_NAME}_node ${THIS_PACKAGE_INCLUDE_DEPENDS})\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  config\n  launch\n  rviz\n  scripts\n  DESTINATION share/${PROJECT_NAME}\n)\n\n# Install Python scripts\ninstall(PROGRAMS\n  scripts/trajectory_bridge.py\n  DESTINATION lib/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n  ${PROJECT_NAME}_node\n  DESTINATION lib/${PROJECT_NAME}\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/README.md",
    "content": "<h2>State Machine Diagram</h2>\n \n![sm_panda_cl_moveit2z_cb_inventory_isaacsim](docs/SmPandaClMoveit2zCbInventoryIsaacsim_2025-12-21_231757.svg)\n\n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n  <h2>Operating Instructions</h2>\n\nThen source the proper workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_panda_cl_moveit2z_cb_inventory_isaacsim sm_panda_cl_moveit2z_cb_inventory_isaacsim.launch.py\n```\n\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/config/move_group_client/known_states/control_authority_posture.yaml",
    "content": "joint_states:\n    panda_joint1: 1.57\n    panda_joint2: -1.57\n    panda_joint3: 1.57\n    panda_joint4: -2.8\n    panda_joint5: 1.57\n    panda_joint6: 2.8\n    panda_joint7: 1.57\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/config/move_group_client/known_states/control_authority_posture2.yaml",
    "content": "joint_states:\n    panda_finger_joint1: 0.03\n    panda_finger_joint2: 0.03\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/config/move_group_client/known_states/initial_posture.yaml",
    "content": "joint_states:\n    panda_joint1: 0.0\n    panda_joint2: 0.0\n    panda_joint3: 0.0\n    panda_joint4: 0.0\n    panda_joint5: 0.0\n    panda_joint6: 0.0\n    panda_joint7: 0.0\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/config/moveit/controllers.yaml",
    "content": "/**:\n  ros__parameters:\n\n    moveit_controller_manager: \"moveit_simple_controller_manager/MoveItSimpleControllerManager\"\n\n    moveit_simple_controller_manager:\n\n      controller_names:\n        - scaled_joint_trajectory_controller\n        - joint_trajectory_controller\n\n\n      scaled_joint_trajectory_controller:\n        action_ns: follow_joint_trajectory\n        type: FollowJointTrajectory\n        default: false\n        joints:\n          - shoulder_pan_joint\n          - shoulder_lift_joint\n          - elbow_joint\n          - wrist_1_joint\n          - wrist_2_joint\n          - wrist_3_joint\n\n\n      joint_trajectory_controller:\n        action_ns: follow_joint_trajectory\n        type: FollowJointTrajectory\n        default: true\n        joints:\n          - shoulder_pan_joint\n          - shoulder_lift_joint\n          - elbow_joint\n          - wrist_1_joint\n          - wrist_2_joint\n          - wrist_3_joint\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/config/moveit/kinematics.yaml",
    "content": "/**:\n  ros__parameters:\n    robot_description_kinematics:\n      ur_manipulator:\n        kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin\n        #kinematics_solver_search_resolution: 0.005\n        #kinematics_solver_timeout: 0.005\n        kinematics_solver_attempts: 3\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/config/sm_panda_cl_moveit2z_cb_inventory_isaacsim_config.yaml",
    "content": "sm_panda_cl_moveit2z_cb_inventory:\n  ros__parameters:\n    signal_detector_loop_freq: 20.0\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/orthogonals/or_arm.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <chrono>\n\n#include <cl_moveit2z/cl_moveit2z.hpp>\n#include <cl_moveit2z/components/cp_grasping_objects.hpp>\n#include <cl_moveit2z/components/cp_joint_space_trajectory_planner.hpp>\n#include <cl_moveit2z/components/cp_tf_listener.hpp>\n#include <cl_moveit2z/components/cp_trajectory_executor.hpp>\n#include <cl_moveit2z/components/cp_trajectory_history.hpp>\n#include <cl_moveit2z/components/cp_trajectory_visualizer.hpp>\n\n#include \"cl_ros2_timer/cl_ros2_timer.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\nusing namespace std::chrono_literals;\n\nclass OrArm : public smacc2::Orthogonal<OrArm>\n{\npublic:\n  void onInitialize() override\n  {\n    auto move_group_client = this->createClient<cl_moveit2z::ClMoveit2z>(\"panda_arm\"); //ur_manipulator\n\n    // Core components for component-based architecture\n    move_group_client->createComponent<cl_moveit2z::CpJointSpaceTrajectoryPlanner>();\n    move_group_client->createComponent<cl_moveit2z::CpTrajectoryExecutor>();\n    move_group_client->createComponent<cl_moveit2z::CpTfListener>();\n    move_group_client->createComponent<cl_moveit2z::CpTrajectoryVisualizer>();\n    move_group_client->createComponent<cl_moveit2z::CpTrajectoryHistory>();\n\n    auto graspingComponent = move_group_client->createComponent<cl_moveit2z::CpGraspingComponent>();\n    graspingComponent->gripperLink_=\"tool0\";\n    graspingComponent->createGraspableBox(\"virtualBox\", 0,0.5,0.5,0.1,0.1,0.1);\n  }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/orthogonals/or_keyboard.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n ******************************************************************************************************************/\n\n#pragma once\n\n#include <chrono>\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <smacc2/smacc.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim {\nusing namespace std::chrono_literals;\n\nclass OrKeyboard : public smacc2::Orthogonal<OrKeyboard> {\npublic:\n  void onInitialize() override {\n    auto keyboardClient = this->createClient<cl_keyboard::ClKeyboard>();\n  }\n};\n} // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/sm_panda_cl_moveit2z_cb_inventory_isaacsim.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <memory>\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\n// ORTHOGONALS\n#include \"sm_panda_cl_moveit2z_cb_inventory_isaacsim/orthogonals/or_arm.hpp\"\n#include \"sm_panda_cl_moveit2z_cb_inventory_isaacsim/orthogonals/or_keyboard.hpp\"\n\n#include <cl_moveit2z/cl_moveit2z.hpp>\n#include <cl_moveit2z/client_behaviors.hpp>\n\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <cl_keyboard/client_behaviors/cb_default_keyboard_behavior.hpp>\n\n#include <smacc2/client_behaviors/cb_wait_topic_message.hpp>\n\nusing namespace cl_moveit2z;\nusing namespace cl_keyboard;\n\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n\n//STATES\nstruct StAcquireSensors;\nstruct StPause1;\nstruct StPause2;\nstruct StPause3;\nstruct StPause4;\nstruct StPause5;\nstruct StPause6;\nstruct StPause7;\nstruct StPause8;\nstruct StPause9;\nstruct StPause10;\nstruct StPause11;\nstruct StPause12;\nstruct StPause13;\nstruct StMoveJoints1;\nstruct StMoveJoints2;\nstruct StMoveJoints3;\nstruct StMoveJoints4;\nstruct StMoveJoints5;\nstruct StMoveEndEffector;\nstruct StMoveCartesianRelative2;\nstruct StEndEffectorRotate;\nstruct StMoveKnownState1;\nstruct StMoveKnownState2;\nstruct StUndoLastTrajectory;\n\n//--------------------------------------------------------------------\n//STATE_MACHINE\n\nstruct SmPandaClMoveit2zCbInventoryIsaacsim : public smacc2::SmaccStateMachineBase<SmPandaClMoveit2zCbInventoryIsaacsim, StPause1>\n\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  void onInitialize() override { \n    this->createOrthogonal<OrArm>(); \n    this->createOrthogonal<OrKeyboard>();\n    }\n};\n\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n\n// STATES\n#include \"states/st_acquire_sensors.hpp\"\n#include \"states/st_pause_1.hpp\"\n#include \"states/st_pause_2.hpp\"\n#include \"states/st_pause_3.hpp\"\n#include \"states/st_pause_4.hpp\"\n#include \"states/st_pause_5.hpp\"\n#include \"states/st_pause_6.hpp\"\n#include \"states/st_pause_7.hpp\"\n#include \"states/st_pause_8.hpp\"\n#include \"states/st_pause_9.hpp\"\n#include \"states/st_pause_10.hpp\"\n#include \"states/st_pause_11.hpp\"\n#include \"states/st_pause_12.hpp\"\n#include \"states/st_pause_13.hpp\"\n#include \"states/st_move_end_effector.hpp\"\n#include \"states/st_move_joints_1.hpp\"\n#include \"states/st_move_joints_2.hpp\"\n#include \"states/st_move_joints_3.hpp\"\n#include \"states/st_move_joints_4.hpp\"\n#include \"states/st_move_joints_5.hpp\"\n#include \"states/st_move_known_state_1.hpp\"\n#include \"states/st_move_known_state_2.hpp\"\n#include \"states/st_end_effector_rotate.hpp\"\n#include \"states/st_move_cartesian_relative2.hpp\"\n#include \"states/st_undo_last_trajectory.hpp\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_acquire_sensors.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StAcquireSensors : smacc2::SmaccState<StAcquireSensors, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n    Transition<EvCbSuccess<CbWaitTopicMessage<sensor_msgs::msg::JointState>, OrArm>, StMoveKnownState1, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveKnownState1, NEXT>  \n\n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(5s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_end_effector_rotate.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StEndEffectorRotate : smacc2::SmaccState<StEndEffectorRotate, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n\n    Transition<EvCbSuccess<CbEndEffectorRotate, OrArm>, StPause9, SUCCESS>,\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause9, NEXT>\n\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n      double deltaRadians = -M_PI * 0.1;\n      //std::string tipLink  = \"tool0\";\n      //std::string tipLink = \"wrist_3_link\";\n\n       std::string tipLink = \"panda_link8\";\n\n\n     configure_orthogonal<OrArm, CbEndEffectorRotate>(deltaRadians, tipLink);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering StEndEffectorRotate\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_move_cartesian_relative2.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveCartesianRelative2 : smacc2::SmaccState<StMoveCartesianRelative2, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n   Transition<EvCbSuccess<CbMoveCartesianRelative2, OrArm>, StPause6, SUCCESS>,\n   // Transition<EvCbSuccess<CbMoveCartesianRelative2, OrArm>, StAttachObject, SUCCESS>,\n   // Transition<EvCbFailure<CbMoveCartesianRelative2, OrArm>, StMoveCartesianRelative2, ABORT>, // retry\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause6, NEXT>  \n    >\n\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    geometry_msgs::msg::Vector3 position;\n    position.x = -0.25;  // Increased to 25cm for dramatic movement\n    position.y = 0.0;\n    position.z = 0.20;   // Increased to 20cm for dramatic movement\n    configure_orthogonal<OrArm, CbMoveCartesianRelative2>(\"world\", \"panda_link8\", position);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering StMoveCartesianRelative2\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit(ABORT)\n  {\n    rclcpp::sleep_for(1s);\n    RCLCPP_INFO(getLogger(), \"On Exit!\");\n  }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_move_end_effector.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveEndEffector : smacc2::SmaccState<StMoveEndEffector, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbMoveEndEffector, OrArm>, StPause11, SUCCESS>,\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause11, NEXT>  \n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    geometry_msgs::msg::PoseStamped target_pose;\n    target_pose.header.frame_id = \"panda_link0\";\n    // Dramatic movement for high visibility in RViz\n    // Current pose: [0.554, 0.000, 0.625]\n    target_pose.pose.position.x = 0.3;   // Large movement: -0.254m from current\n    target_pose.pose.position.y = 0.2;   // Lateral movement: +0.2m from current\n    target_pose.pose.position.z = 0.4;   // Vertical movement: -0.225m from current\n\n    // Add orientation change for more visible motion\n    // 45-degree rotation around Z-axis for dramatic effect\n    target_pose.pose.orientation.x = 0.0;\n    target_pose.pose.orientation.y = 0.0;\n    target_pose.pose.orientation.z = 0.383;  // sin(45°/2)\n\n    target_pose.pose.orientation.w = 0.924;  // cos(45°/2)\n\n    //target_pose.pose.position.z = 0.579;\n\n  // random valid\n  // - Translation: [0.137, -0.730, 0.267]\n  // - Rotation: in Quaternion [0.498, 0.470, 0.715, 0.141]\n\n\n    //0.8939967, 0, 0, -0.4480736 ]\n    // target_pose.pose.orientation.x = 0.8939967;\n    // target_pose.pose.orientation.y = 0;\n    // target_pose.pose.orientation.z = 0;\n    // target_pose.pose.orientation.w = -0.4480736 ;\n\n    configure_orthogonal<OrArm, CbMoveEndEffector>(target_pose, \"panda_link8\");\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering StMoveEndEffector\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_move_joints_1.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveJoints1 : smacc2::SmaccState<StMoveJoints1, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n    Transition<EvCbSuccess<CbMoveJoints, OrArm>, StPause3, SUCCESS>,\n  \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause3, NEXT>  \n\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    std::map<std::string, double> jointValues{\n      {\"panda_joint1\", 0.0},\n      {\"panda_joint2\", 0.0},\n      {\"panda_joint3\", 0.0},\n      {\"panda_joint4\", -M_PI/2},\n      {\"panda_joint5\", 0.0},\n      {\"panda_joint6\", M_PI/2},\n      {\"panda_joint7\", 0.0}\n      };\n\n    // panda_joint6:\n    // panda_joint7:\n    // panda_finger_joint1:\n    // panda_finger_joint2:\n\n    configure_orthogonal<OrArm, CbMoveJoints>(jointValues);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure()\n  {\n    ClMoveit2z * moveGroupClient;\n    this->requiresClient(moveGroupClient);\n    this->getClientBehavior<OrArm,CbMoveJoints>()->scalingFactor_ = 1;\n  }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_move_joints_2.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveJoints2 : smacc2::SmaccState<StMoveJoints2, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n    Transition<EvCbSuccess<CbMoveJoints, OrArm>, StPause4, SUCCESS>,\n    Transition<EvCbFailure<CbMoveJoints, OrArm>, StMoveJoints2, ABORT>,\n \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause4, NEXT>  \n\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    std::map<std::string, double> jointValues{\n      {\"panda_joint1\", 0.5},\n      {\"panda_joint2\", 0.0},\n      {\"panda_joint3\", 0.0},\n      {\"panda_joint4\", -M_PI/2},\n      {\"panda_joint5\", 0.0},\n      {\"panda_joint6\", M_PI/2},\n      {\"panda_joint7\", 0.0}\n      };\n\n    // panda_joint6:\n    // panda_joint7:\n    // panda_finger_joint1:\n    // panda_finger_joint2:\n\n    configure_orthogonal<OrArm, CbMoveJoints>(jointValues);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure()\n  {\n    ClMoveit2z * moveGroupClient;\n    this->requiresClient(moveGroupClient);\n    this->getClientBehavior<OrArm,CbMoveJoints>()->scalingFactor_ = 1;\n  }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_move_joints_3.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveJoints3 : smacc2::SmaccState<StMoveJoints3, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n    Transition<EvCbSuccess<CbMoveJoints, OrArm>, StPause8, SUCCESS>,\n    Transition<EvCbFailure<CbMoveJoints, OrArm>, StMoveJoints3, ABORT>,\n  \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause8, NEXT>  \n\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    std::map<std::string, double> jointValues{\n      {\"panda_joint1\", 0.0},\n      {\"panda_joint2\", 0.0},\n      {\"panda_joint3\", 0.0},\n      {\"panda_joint4\", -M_PI/2},\n      {\"panda_joint5\", 0.0},\n      {\"panda_joint6\", M_PI/2},\n      {\"panda_joint7\", 0.0}\n      };\n\n    // panda_joint6:\n    // panda_joint7:\n    // panda_finger_joint1:\n    // panda_finger_joint2:\n\n    configure_orthogonal<OrArm, CbMoveJoints>(jointValues);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure()\n  {\n    ClMoveit2z * moveGroupClient;\n    this->requiresClient(moveGroupClient);\n    this->getClientBehavior<OrArm,CbMoveJoints>()->scalingFactor_ = 1;\n  }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_move_joints_4.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveJoints4 : smacc2::SmaccState<StMoveJoints4, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n    Transition<EvCbSuccess<CbMoveJoints, OrArm>, StPause10, SUCCESS>,\n    Transition<EvCbFailure<CbMoveJoints, OrArm>, StMoveJoints4, ABORT>,\n  \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause10, NEXT>  \n\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    std::map<std::string, double> jointValues{\n      {\"panda_joint1\", 0.0},\n      {\"panda_joint2\", 0.0},\n      {\"panda_joint3\", 0.0},\n      {\"panda_joint4\", -M_PI/2},\n      {\"panda_joint5\", 0.0},\n      {\"panda_joint6\", M_PI/2},\n      {\"panda_joint7\", 0.0}\n      };\n\n    // panda_joint6:\n    // panda_joint7:\n    // panda_finger_joint1:\n    // panda_finger_joint2:\n\n    configure_orthogonal<OrArm, CbMoveJoints>(jointValues);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure()\n  {\n    ClMoveit2z * moveGroupClient;\n    this->requiresClient(moveGroupClient);\n    this->getClientBehavior<OrArm,CbMoveJoints>()->scalingFactor_ = 1;\n  }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_move_joints_5.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveJoints5 : smacc2::SmaccState<StMoveJoints5, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n    Transition<EvCbSuccess<CbMoveJoints, OrArm>, StPause12, SUCCESS>,\n    Transition<EvCbFailure<CbMoveJoints, OrArm>, StMoveJoints5, ABORT>,\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause12, NEXT>\n\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    std::map<std::string, double> jointValues{\n      {\"panda_joint1\", 0.0},\n      {\"panda_joint2\", 0.0},\n      {\"panda_joint3\", 0.0},\n      {\"panda_joint4\", -M_PI/2},\n      {\"panda_joint5\", 0.0},\n      {\"panda_joint6\", M_PI/2},\n      {\"panda_joint7\", 0.0}\n      };\n\n    // panda_joint6:\n    // panda_joint7:\n    // panda_finger_joint1:\n    // panda_finger_joint2:\n\n    configure_orthogonal<OrArm, CbMoveJoints>(jointValues);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure()\n  {\n    ClMoveit2z * moveGroupClient;\n    this->requiresClient(moveGroupClient);\n    this->getClientBehavior<OrArm,CbMoveJoints>()->scalingFactor_ = 1;\n  }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_move_known_state_1.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveKnownState1 : smacc2::SmaccState<StMoveKnownState1, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n\n      Transition<EvCbSuccess<CbMoveKnownState, OrArm>, StPause2, SUCCESS>,\n \n      Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause2, NEXT>  \n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    std::string pkg = \"sm_panda_cl_moveit2z_cb_inventory\";\n    std::string filepath = \"config/move_group_client/known_states/control_authority_posture.yaml\";\n\n    configure_orthogonal<OrArm, CbMoveKnownState>(pkg, filepath);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering StMoveKnownState\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_move_known_state_2.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StMoveKnownState2 : smacc2::SmaccState<StMoveKnownState2, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n      Transition<EvCbSuccess<CbMoveKnownState, OrArm>, StPause5, SUCCESS>,\n\n      Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause5, NEXT>\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    std::string pkg = \"sm_panda_cl_moveit2z_cb_inventory\";\n    std::string filepath = \"config/move_group_client/known_states/control_authority_posture.yaml\";\n\n    configure_orthogonal<OrArm, CbMoveKnownState>(pkg, filepath);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering StMoveKnownState\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_pause_1.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause1 : smacc2::SmaccState<StPause1, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StAcquireSensors, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StAcquireSensors, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_pause_10.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause10 : smacc2::SmaccState<StPause10, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveEndEffector, SUCCESS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveEndEffector, NEXT>  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_pause_11.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause11 : smacc2::SmaccState<StPause11, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveJoints5, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveJoints5, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_pause_12.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause12 : smacc2::SmaccState<StPause12, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StPause13, SUCCESS>,\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause13, NEXT>\n\n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_pause_13.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause13 : smacc2::SmaccState<StPause13, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    //Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveEndEffector, SUCCESS>,\n    \n    //Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveEndEffector, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_pause_2.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause2 : smacc2::SmaccState<StPause2, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveJoints1, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveJoints1, NEXT>  \n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_pause_3.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause3 : smacc2::SmaccState<StPause3, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveJoints2, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveJoints2, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_pause_4.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause4 : smacc2::SmaccState<StPause4, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveKnownState2, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveKnownState2, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_pause_5.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause5 : smacc2::SmaccState<StPause5, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveCartesianRelative2, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveCartesianRelative2, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_pause_6.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause6 : smacc2::SmaccState<StPause6, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StUndoLastTrajectory, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StUndoLastTrajectory, NEXT>  \n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_pause_7.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause7 : smacc2::SmaccState<StPause7, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveJoints3, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveJoints3, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_pause_8.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause8 : smacc2::SmaccState<StPause8, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StEndEffectorRotate, SUCCESS>,\n    \n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StEndEffectorRotate, NEXT>  \n  \n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_pause_9.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include <sensor_msgs/msg/joint_state.h>\n#include <smacc2/client_behaviors/cb_sleep_for.hpp>\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::EvStateRequestFinish;\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_moveit2z;\nusing smacc2::client_behaviors::CbWaitTopicMessage;\nusing smacc2::client_behaviors::CbSleepFor;\nusing namespace std::chrono_literals;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StPause9 : smacc2::SmaccState<StPause9, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n    Transition<EvCbSuccess<CbSleepFor, OrArm>, StMoveJoints4, SUCCESS>,\n\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveJoints4, NEXT>\n\n\n    > reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    // configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(\"/joint_states\");\n    configure_orthogonal<OrArm, CbSleepFor>(15s);\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  };\n\n  void runtimeConfigure() {}\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/include/sm_panda_cl_moveit2z_cb_inventory_isaacsim/states/st_undo_last_trajectory.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n *\n * \t Authors: Pablo Inigo Blasco, Brett Aldrich\n *\n *****************************************************************************************************************/\n\n#pragma once\n\n#include \"rclcpp/rclcpp.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n{\n// SMACC2 classes\nusing smacc2::Transition;\nusing smacc2::default_transition_tags::SUCCESS;\nusing namespace smacc2;\nusing namespace cl_keyboard;\n\n// STATE DECLARATION\nstruct StUndoLastTrajectory : smacc2::SmaccState<StUndoLastTrajectory, SmPandaClMoveit2zCbInventoryIsaacsim>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef boost::mpl::list<\n      Transition<EvCbSuccess<CbUndoLastTrajectory, OrArm>, StPause7, SUCCESS>,\n\n      Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause7, NEXT>\n\n    >\n    reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrArm, CbUndoLastTrajectory>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() { RCLCPP_INFO(getLogger(), \"Entering StUndoLastTrajectory\"); }\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_panda_cl_moveit2z_cb_inventory_isaacsim\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/launch/panda_hello_moveit.rviz",
    "content": "Panels:\n  - Class: rviz_common/Displays\n    Help Height: 78\n    Name: Displays\n    Property Tree Widget:\n      Expanded:\n        - /Global Options1\n        - /Status1\n        - /PlanningScene1\n        - /Trajectory1\n        - /MarkerArray1\n      Splitter Ratio: 0.5\n    Tree Height: 114\n  - Class: rviz_common/Selection\n    Name: Selection\n  - Class: rviz_common/Tool Properties\n    Expanded:\n      - /2D Goal Pose1\n      - /Publish Point1\n    Name: Tool Properties\n    Splitter Ratio: 0.5886790156364441\n  - Class: rviz_common/Views\n    Expanded:\n      - /Current View1\n    Name: Views\n    Splitter Ratio: 0.5\n  - Class: rviz_visual_tools/RvizVisualToolsGui\n    Name: RvizVisualToolsGui\nVisualization Manager:\n  Class: \"\"\n  Displays:\n    - Alpha: 0.5\n      Cell Size: 1\n      Class: rviz_default_plugins/Grid\n      Color: 160; 160; 164\n      Enabled: true\n      Line Style:\n        Line Width: 0.029999999329447746\n        Value: Lines\n      Name: Grid\n      Normal Cell Count: 0\n      Offset:\n        X: 0\n        Y: 0\n        Z: 0\n      Plane: XY\n      Plane Cell Count: 10\n      Reference Frame: <Fixed Frame>\n      Value: true\n    - Class: moveit_rviz_plugin/PlanningScene\n      Enabled: true\n      Move Group Namespace: \"\"\n      Name: PlanningScene\n      Planning Scene Topic: /monitored_planning_scene\n      Robot Description: robot_description\n      Scene Geometry:\n        Scene Alpha: 0.8999999761581421\n        Scene Color: 50; 230; 50\n        Scene Display Time: 0.20000000298023224\n        Show Scene Geometry: true\n        Voxel Coloring: Z-Axis\n        Voxel Rendering: Occupied Voxels\n      Scene Robot:\n        Attached Body Color: 150; 50; 150\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          panda_hand:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_leftfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link1:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link2:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link3:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link4:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link5:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link6:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link7:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link8:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          panda_rightfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Robot Alpha: 1\n        Show Robot Collision: false\n        Show Robot Visual: true\n      Value: true\n    - Class: moveit_rviz_plugin/Trajectory\n      Color Enabled: false\n      Enabled: true\n      Interrupt Display: false\n      Links:\n        All Links Enabled: true\n        Expand Joint Details: false\n        Expand Link Details: false\n        Expand Tree: false\n        Link Tree Style: Links in Alphabetic Order\n        panda_hand:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_leftfinger:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link0:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link1:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link2:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link3:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link4:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link5:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link6:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link7:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link8:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n        panda_rightfinger:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n      Loop Animation: false\n      Name: Trajectory\n      Robot Alpha: 0.5\n      Robot Color: 150; 50; 150\n      Robot Description: robot_description\n      Show Robot Collision: false\n      Show Robot Visual: true\n      Show Trail: false\n      State Display Time: 0.05 s\n      Trail Step Size: 1\n      Trajectory Topic: /display_planned_path\n      Use Sim Time: false\n      Value: true\n    - Acceleration_Scaling_Factor: 0.1\n      Class: moveit_rviz_plugin/MotionPlanning\n      Enabled: true\n      Move Group Namespace: \"\"\n      MoveIt_Allow_Approximate_IK: false\n      MoveIt_Allow_External_Program: false\n      MoveIt_Allow_Replanning: false\n      MoveIt_Allow_Sensor_Positioning: false\n      MoveIt_Planning_Attempts: 10\n      MoveIt_Planning_Time: 5\n      MoveIt_Use_Cartesian_Path: false\n      MoveIt_Use_Constraint_Aware_IK: true\n      MoveIt_Workspace:\n        Center:\n          X: 0\n          Y: 0\n          Z: 0\n        Size:\n          X: 2\n          Y: 2\n          Z: 2\n      Name: MotionPlanning\n      Planned Path:\n        Color Enabled: false\n        Interrupt Display: false\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          panda_hand:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_leftfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link1:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link2:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link3:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link4:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link5:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link6:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link7:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link8:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          panda_rightfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Loop Animation: false\n        Robot Alpha: 0.5\n        Robot Color: 150; 50; 150\n        Show Robot Collision: false\n        Show Robot Visual: true\n        Show Trail: false\n        State Display Time: 0.05 s\n        Trail Step Size: 1\n        Trajectory Topic: /display_planned_path\n        Use Sim Time: false\n      Planning Metrics:\n        Payload: 1\n        Show Joint Torques: false\n        Show Manipulability: false\n        Show Manipulability Index: false\n        Show Weight Limit: false\n        TextHeight: 0.07999999821186066\n      Planning Request:\n        Colliding Link Color: 255; 0; 0\n        Goal State Alpha: 1\n        Goal State Color: 250; 128; 0\n        Interactive Marker Size: 0\n        Joint Violation Color: 255; 0; 255\n        Planning Group: panda_arm\n        Query Goal State: true\n        Query Start State: false\n        Show Workspace: false\n        Start State Alpha: 1\n        Start State Color: 0; 255; 0\n      Planning Scene Topic: /monitored_planning_scene\n      Robot Description: robot_description\n      Scene Geometry:\n        Scene Alpha: 0.8999999761581421\n        Scene Color: 50; 230; 50\n        Scene Display Time: 0.009999999776482582\n        Show Scene Geometry: true\n        Voxel Coloring: Z-Axis\n        Voxel Rendering: Occupied Voxels\n      Scene Robot:\n        Attached Body Color: 150; 50; 150\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          panda_hand:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_leftfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link1:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link2:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link3:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link4:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link5:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link6:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link7:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link8:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          panda_rightfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Robot Alpha: 1\n        Show Robot Collision: false\n        Show Robot Visual: true\n      Value: true\n      Velocity_Scaling_Factor: 0.1\n    - Class: rviz_default_plugins/MarkerArray\n      Enabled: true\n      Name: MarkerArray\n      Namespaces:\n        Path: true\n        Sphere: true\n        Text: true\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: rviz_visual_tools\n      Value: true\n  Enabled: true\n  Global Options:\n    Background Color: 48; 48; 48\n    Fixed Frame: panda_link0\n    Frame Rate: 30\n  Name: root\n  Tools:\n    - Class: rviz_default_plugins/Interact\n      Hide Inactive Objects: true\n    - Class: rviz_default_plugins/MoveCamera\n    - Class: rviz_default_plugins/Select\n    - Class: rviz_default_plugins/FocusCamera\n    - Class: rviz_default_plugins/Measure\n      Line color: 128; 128; 0\n    - Class: rviz_default_plugins/SetInitialPose\n      Covariance x: 0.25\n      Covariance y: 0.25\n      Covariance yaw: 0.06853891909122467\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /initialpose\n    - Class: rviz_default_plugins/SetGoal\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /goal_pose\n    - Class: rviz_default_plugins/PublishPoint\n      Single click: true\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /clicked_point\n  Transformation:\n    Current:\n      Class: rviz_default_plugins/TF\n  Value: true\n  Views:\n    Current:\n      Class: rviz_default_plugins/Orbit\n      Distance: 3.8008623123168945\n      Enable Stereo Rendering:\n        Stereo Eye Separation: 0.05999999865889549\n        Stereo Focal Distance: 1\n        Swap Stereo Eyes: false\n        Value: false\n      Focal Point:\n        X: 0\n        Y: 0\n        Z: 0\n      Focal Shape Fixed Size: true\n      Focal Shape Size: 0.05000000074505806\n      Invert Z Axis: false\n      Name: Current View\n      Near Clip Distance: 0.009999999776482582\n      Pitch: 0.5753980278968811\n      Target Frame: <Fixed Frame>\n      Value: Orbit (rviz)\n      Yaw: 0.4903981685638428\n    Saved: ~\nWindow Geometry:\n  Displays:\n    collapsed: false\n  Height: 812\n  Hide Left Dock: false\n  Hide Right Dock: false\n  MotionPlanning:\n    collapsed: false\n  MotionPlanning - Trajectory Slider:\n    collapsed: false\n  QMainWindow State: 000000ff00000000fd000000040000000000000257000002d6fc020000000dfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003b000000fb000000c700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000003c005400720061006a006500630074006f007200790020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000003f00fffffffb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000003f00fffffffb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e0067010000013c000001900000016900fffffffb00000024005200760069007a00560069007300750061006c0054006f006f006c007300470075006901000002d20000003f0000003f00ffffff000000010000010f000002d6fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003b000002d6000000a000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d006501000000000000045000000000000000000000028b000002d600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000\n  RvizVisualToolsGui:\n    collapsed: false\n  Selection:\n    collapsed: false\n  Tool Properties:\n    collapsed: false\n  Trajectory - Trajectory Slider:\n    collapsed: false\n  Views:\n    collapsed: false\n  Width: 1533\n  X: 1994\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/launch/panda_moveit_config_demo.rviz",
    "content": "Panels:\n  - Class: rviz_common/Displays\n    Help Height: 78\n    Name: Displays\n    Property Tree Widget:\n      Expanded:\n        - /Global Options1\n        - /Status1\n        - /PlanningScene1\n        - /Trajectory1\n      Splitter Ratio: 0.5\n    Tree Height: 137\n  - Class: rviz_common/Selection\n    Name: Selection\n  - Class: rviz_common/Tool Properties\n    Expanded:\n      - /2D Goal Pose1\n      - /Publish Point1\n    Name: Tool Properties\n    Splitter Ratio: 0.5886790156364441\n  - Class: rviz_common/Views\n    Expanded:\n      - /Current View1\n    Name: Views\n    Splitter Ratio: 0.5\nVisualization Manager:\n  Class: \"\"\n  Displays:\n    - Alpha: 0.5\n      Cell Size: 1\n      Class: rviz_default_plugins/Grid\n      Color: 160; 160; 164\n      Enabled: true\n      Line Style:\n        Line Width: 0.029999999329447746\n        Value: Lines\n      Name: Grid\n      Normal Cell Count: 0\n      Offset:\n        X: 0\n        Y: 0\n        Z: 0\n      Plane: XY\n      Plane Cell Count: 10\n      Reference Frame: <Fixed Frame>\n      Value: true\n    - Class: rviz_default_plugins/Image\n      Enabled: true\n      Max Value: 1\n      Median window: 5\n      Min Value: 0\n      Name: ZED Camera RGB\n      Normalize Range: true\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /zed/zed_node/rgb/image_rect_color\n      Value: true\n    - Class: rviz_default_plugins/Image\n      Enabled: false\n      Max Value: 1\n      Median window: 5\n      Min Value: 0\n      Name: ZED Camera Depth\n      Normalize Range: true\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /zed/zed_node/depth/depth_registered\n      Value: false\n    - Class: moveit_rviz_plugin/PlanningScene\n      Enabled: true\n      Move Group Namespace: \"\"\n      Name: PlanningScene\n      Planning Scene Topic: /monitored_planning_scene\n      Robot Description: robot_description\n      Scene Geometry:\n        Scene Alpha: 0.8999999761581421\n        Scene Color: 50; 230; 50\n        Scene Display Time: 0.20000000298023224\n        Show Scene Geometry: true\n        Voxel Coloring: Z-Axis\n        Voxel Rendering: Occupied Voxels\n      Scene Robot:\n        Attached Body Color: 150; 50; 150\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          panda_hand:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_leftfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link1:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link2:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link3:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link4:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link5:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link6:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link7:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link8:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          panda_rightfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Robot Alpha: 1\n        Show Robot Collision: false\n        Show Robot Visual: true\n      Value: true\n    - Class: moveit_rviz_plugin/Trajectory\n      Color Enabled: false\n      Enabled: true\n      Interrupt Display: false\n      Links:\n        All Links Enabled: true\n        Expand Joint Details: false\n        Expand Link Details: false\n        Expand Tree: false\n        Link Tree Style: Links in Alphabetic Order\n        panda_hand:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_leftfinger:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link0:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link1:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link2:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link3:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link4:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link5:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link6:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link7:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        panda_link8:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n        panda_rightfinger:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n      Loop Animation: false\n      Name: Trajectory\n      Robot Alpha: 0.5\n      Robot Color: 150; 50; 150\n      Robot Description: robot_description\n      Show Robot Collision: false\n      Show Robot Visual: true\n      Show Trail: false\n      State Display Time: 0.05 s\n      Trail Step Size: 1\n      Trajectory Topic: /display_planned_path\n      Value: true\n    - Acceleration_Scaling_Factor: 0.1\n      Class: moveit_rviz_plugin/MotionPlanning\n      Enabled: true\n      Move Group Namespace: \"\"\n      MoveIt_Allow_Approximate_IK: false\n      MoveIt_Allow_External_Program: false\n      MoveIt_Allow_Replanning: false\n      MoveIt_Allow_Sensor_Positioning: false\n      MoveIt_Planning_Attempts: 10\n      MoveIt_Planning_Time: 5\n      MoveIt_Use_Cartesian_Path: false\n      MoveIt_Use_Constraint_Aware_IK: true\n      MoveIt_Warehouse_Host: 127.0.0.1\n      MoveIt_Warehouse_Port: 33829\n      MoveIt_Workspace:\n        Center:\n          X: 0\n          Y: 0\n          Z: 0\n        Size:\n          X: 2\n          Y: 2\n          Z: 2\n      Name: MotionPlanning\n      Planned Path:\n        Color Enabled: false\n        Interrupt Display: false\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          panda_hand:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_leftfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link1:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link2:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link3:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link4:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link5:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link6:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link7:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link8:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          panda_rightfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Loop Animation: false\n        Robot Alpha: 0.5\n        Robot Color: 150; 50; 150\n        Show Robot Collision: false\n        Show Robot Visual: true\n        Show Trail: false\n        State Display Time: 0.05 s\n        Trail Step Size: 1\n        Trajectory Topic: /display_planned_path\n      Planning Metrics:\n        Payload: 1\n        Show Joint Torques: false\n        Show Manipulability: false\n        Show Manipulability Index: false\n        Show Weight Limit: false\n        TextHeight: 0.07999999821186066\n      Planning Request:\n        Colliding Link Color: 255; 0; 0\n        Goal State Alpha: 1\n        Goal State Color: 250; 128; 0\n        Interactive Marker Size: 0\n        Joint Violation Color: 255; 0; 255\n        Planning Group: panda_arm\n        Query Goal State: true\n        Query Start State: false\n        Show Workspace: false\n        Start State Alpha: 1\n        Start State Color: 0; 255; 0\n      Planning Scene Topic: /monitored_planning_scene\n      Robot Description: robot_description\n      Scene Geometry:\n        Scene Alpha: 0.8999999761581421\n        Scene Color: 50; 230; 50\n        Scene Display Time: 0.009999999776482582\n        Show Scene Geometry: true\n        Voxel Coloring: Z-Axis\n        Voxel Rendering: Occupied Voxels\n      Scene Robot:\n        Attached Body Color: 150; 50; 150\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          panda_hand:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_leftfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link1:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link2:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link3:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link4:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link5:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link6:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link7:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          panda_link8:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          panda_rightfinger:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Robot Alpha: 1\n        Show Robot Collision: false\n        Show Robot Visual: true\n      Value: true\n      Velocity_Scaling_Factor: 0.1\n  Enabled: true\n  Global Options:\n    Background Color: 48; 48; 48\n    Fixed Frame: panda_link0\n    Frame Rate: 30\n  Name: root\n  Tools:\n    - Class: rviz_default_plugins/Interact\n      Hide Inactive Objects: true\n    - Class: rviz_default_plugins/MoveCamera\n    - Class: rviz_default_plugins/Select\n    - Class: rviz_default_plugins/FocusCamera\n    - Class: rviz_default_plugins/Measure\n      Line color: 128; 128; 0\n    - Class: rviz_default_plugins/SetInitialPose\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /initialpose\n    - Class: rviz_default_plugins/SetGoal\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /goal_pose\n    - Class: rviz_default_plugins/PublishPoint\n      Single click: true\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /clicked_point\n  Transformation:\n    Current:\n      Class: rviz_default_plugins/TF\n  Value: true\n  Views:\n    Current:\n      Class: rviz_default_plugins/Orbit\n      Distance: 3.8008623123168945\n      Enable Stereo Rendering:\n        Stereo Eye Separation: 0.05999999865889549\n        Stereo Focal Distance: 1\n        Swap Stereo Eyes: false\n        Value: false\n      Focal Point:\n        X: 0\n        Y: 0\n        Z: 0\n      Focal Shape Fixed Size: true\n      Focal Shape Size: 0.05000000074505806\n      Invert Z Axis: false\n      Name: Current View\n      Near Clip Distance: 0.009999999776482582\n      Pitch: 0.5753980278968811\n      Target Frame: <Fixed Frame>\n      Value: Orbit (rviz)\n      Yaw: 0.4903981685638428\n    Saved: ~\nWindow Geometry:\n  Displays:\n    collapsed: false\n  Height: 812\n  Hide Left Dock: false\n  Hide Right Dock: false\n  MotionPlanning:\n    collapsed: false\n  MotionPlanning - Trajectory Slider:\n    collapsed: false\n  QMainWindow State: 000000ff00000000fd000000040000000000000257000002d2fc020000000cfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d00000114000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000003c005400720061006a006500630074006f007200790020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000004100fffffffb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000004100fffffffb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e00670100000157000001b80000017d00ffffff000000010000010f000002d2fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003d000002d2000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d006501000000000000045000000000000000000000028b000002d200000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000\n  Selection:\n    collapsed: false\n  Tool Properties:\n    collapsed: false\n  Trajectory - Trajectory Slider:\n    collapsed: false\n  Views:\n    collapsed: false\n  Width: 1533\n  X: 1992\n  Y: 231\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/launch/panda_moveit_config_demo_empty.rviz",
    "content": "Panels:\n  - Class: rviz_common/Displays\n    Help Height: 0\n    Name: Displays\n    Property Tree Widget:\n      Expanded:\n        - /Global Options1\n        - /Status1\n      Splitter Ratio: 0.5\n    Tree Height: 865\n  - Class: rviz_common/Selection\n    Name: Selection\n  - Class: rviz_common/Tool Properties\n    Expanded:\n      - /2D Goal Pose1\n      - /Publish Point1\n    Name: Tool Properties\n    Splitter Ratio: 0.5886790156364441\n  - Class: rviz_common/Views\n    Expanded:\n      - /Current View1\n    Name: Views\n    Splitter Ratio: 0.5\nVisualization Manager:\n  Class: \"\"\n  Displays:\n    - Alpha: 0.5\n      Cell Size: 1\n      Class: rviz_default_plugins/Grid\n      Color: 160; 160; 164\n      Enabled: true\n      Line Style:\n        Line Width: 0.029999999329447746\n        Value: Lines\n      Name: Grid\n      Normal Cell Count: 0\n      Offset:\n        X: 0\n        Y: 0\n        Z: 0\n      Plane: XY\n      Plane Cell Count: 10\n      Reference Frame: <Fixed Frame>\n      Value: true\n  Enabled: true\n  Global Options:\n    Background Color: 48; 48; 48\n    Fixed Frame: panda_link0\n    Frame Rate: 30\n  Name: root\n  Tools:\n    - Class: rviz_default_plugins/Interact\n      Hide Inactive Objects: true\n    - Class: rviz_default_plugins/MoveCamera\n    - Class: rviz_default_plugins/Select\n    - Class: rviz_default_plugins/FocusCamera\n    - Class: rviz_default_plugins/Measure\n      Line color: 128; 128; 0\n    - Class: rviz_default_plugins/SetInitialPose\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /initialpose\n    - Class: rviz_default_plugins/SetGoal\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /goal_pose\n    - Class: rviz_default_plugins/PublishPoint\n      Single click: true\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /clicked_point\n  Transformation:\n    Current:\n      Class: rviz_default_plugins/TF\n  Value: true\n  Views:\n    Current:\n      Class: rviz_default_plugins/Orbit\n      Distance: 3.8008623123168945\n      Enable Stereo Rendering:\n        Stereo Eye Separation: 0.05999999865889549\n        Stereo Focal Distance: 1\n        Swap Stereo Eyes: false\n        Value: false\n      Focal Point:\n        X: 0\n        Y: 0\n        Z: 0\n      Focal Shape Fixed Size: true\n      Focal Shape Size: 0.05000000074505806\n      Invert Z Axis: false\n      Name: Current View\n      Near Clip Distance: 0.009999999776482582\n      Pitch: 0.5753980278968811\n      Target Frame: <Fixed Frame>\n      Value: Orbit (rviz)\n      Yaw: 0.4903981685638428\n    Saved: ~\nWindow Geometry:\n  Displays:\n    collapsed: false\n  Height: 1016\n  Hide Left Dock: false\n  Hide Right Dock: false\n  QMainWindow State: 000000ff00000000fd0000000400000000000002570000039efc020000000cfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d0000039e000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000003c005400720061006a006500630074006f007200790020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e0067010000025e0000017d0000000000000000000000010000010f0000039efc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003d0000039e000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d00650100000000000004500000000000000000000003c60000039e00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000\n  Selection:\n    collapsed: false\n  Tool Properties:\n    collapsed: false\n  Views:\n    collapsed: false\n  Width: 1848\n  X: 1992\n  Y: 27\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/launch/sm_panda_cl_moveit2z_cb_inventory_isaacsim.launch.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\nfrom datetime import datetime\nfrom launch import LaunchDescription\nfrom launch.actions import DeclareLaunchArgument, OpaqueFunction\nfrom launch.substitutions import LaunchConfiguration, PathJoinSubstitution\nfrom launch_ros.actions import Node\nfrom launch_ros.substitutions import FindPackageShare\nfrom ament_index_python.packages import get_package_share_directory\nfrom moveit_configs_utils import MoveItConfigsBuilder\n\n\ndef setup_log_directory():\n    \"\"\"\n    Creates timestamped log directory with error handling.\n    Returns: (log_dir_path, timestamp) tuple\n    \"\"\"\n    timestamp = datetime.now().strftime(\"%Y-%m-%d-%H-%M-%S\")\n\n    # Primary log directory location\n    log_dir = os.path.join(os.path.expanduser(\"~\"), \".ros\", \"log\", timestamp)\n\n    try:\n        os.makedirs(log_dir, mode=0o755, exist_ok=True)\n        print(f\"[Launch] Log directory created: {log_dir}\")\n        return log_dir, timestamp\n    except PermissionError as e:\n        # Fallback to /tmp if ~/.ros is not writable\n        fallback_dir = os.path.join(\"/tmp\", \"sm_panda_moveit2z_cb_inventory_logs\", timestamp)\n        print(f\"[Launch] WARNING: Cannot create log directory at {log_dir}\")\n        print(f\"[Launch] Permission denied: {e}\")\n        print(f\"[Launch] Using fallback directory: {fallback_dir}\")\n        try:\n            os.makedirs(fallback_dir, mode=0o755, exist_ok=True)\n            return fallback_dir, timestamp\n        except Exception as fallback_error:\n            print(f\"[Launch] ERROR: Cannot create fallback directory: {fallback_error}\")\n            print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n            return None, timestamp\n    except OSError as e:\n        print(f\"[Launch] ERROR: Failed to create log directory: {e}\")\n        print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n        return None, timestamp\n\n\ndef generate_launch_description():\n\n    declared_arguments = []\n    declared_arguments.append(\n        DeclareLaunchArgument(\n            \"rviz_config\",\n            default_value=\"panda_moveit_config_demo.rviz\",\n            description=\"RViz configuration file\",\n        )\n    )\n\n    return LaunchDescription(declared_arguments + [OpaqueFunction(function=launch_setup)])\n\n\ndef launch_setup(context, *args, **kwargs):\n\n    # Setup logging directory\n    log_dir, timestamp = setup_log_directory()\n\n    moveit_config = (\n        MoveItConfigsBuilder(\"moveit_resources_panda\")\n        .robot_description(file_path=\"config/panda.urdf.xacro\")\n        .trajectory_execution(file_path=\"config/gripper_moveit_controllers.yaml\")\n        .planning_scene_monitor(\n            publish_robot_description=True, publish_robot_description_semantic=True\n        )\n        .planning_pipelines(pipelines=[\"ompl\", \"chomp\", \"pilz_industrial_motion_planner\"])\n        .to_moveit_configs()\n    )\n\n    # Start the actual move_group node/action server\n    # Construct logging prefix\n    if log_dir:\n        move_group_log = os.path.join(log_dir, f\"move_group_{timestamp}.log\")\n        move_group_prefix = f\"konsole --hold -p tabtitle='Move Group' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {move_group_log}; exec bash' -- \"\n    else:\n        move_group_prefix = \"konsole --hold -p tabtitle='Move Group' -e\"\n\n    # Use simulation time for Isaac Sim integration\n    use_sim_time = {\"use_sim_time\": True}\n\n    run_move_group_node = Node(\n        package=\"moveit_ros_move_group\",\n        executable=\"move_group\",\n        output=\"screen\",\n        parameters=[moveit_config.to_dict(), use_sim_time],\n        prefix=move_group_prefix,\n        arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n    )\n\n    rviz_base = LaunchConfiguration(\"rviz_config\")\n    rviz_config = PathJoinSubstitution(\n        [FindPackageShare(\"sm_panda_cl_moveit2z_cb_inventory_isaacsim\"), \"launch\", rviz_base]\n    )\n\n    # RViz\n    rviz_node = Node(\n        package=\"rviz2\",\n        executable=\"rviz2\",\n        name=\"rviz2\",\n        output=\"log\",\n        arguments=[\"-d\", rviz_config],\n        parameters=[\n            moveit_config.robot_description,\n            moveit_config.robot_description_semantic,\n            moveit_config.robot_description_kinematics,\n            moveit_config.planning_pipelines,\n            moveit_config.joint_limits,\n            use_sim_time,\n        ],\n    )\n\n    # Static TF\n    static_tf = Node(\n        package=\"tf2_ros\",\n        executable=\"static_transform_publisher\",\n        name=\"static_transform_publisher\",\n        output=\"log\",\n        arguments=[\"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"world\", \"panda_link0\"],\n        parameters=[use_sim_time],\n    )\n\n    # Publish TF\n    robot_state_publisher = Node(\n        package=\"robot_state_publisher\",\n        executable=\"robot_state_publisher\",\n        name=\"robot_state_publisher\",\n        output=\"both\",\n        parameters=[moveit_config.robot_description, use_sim_time],\n    )\n\n    # NOTE: For Isaac Sim, we do NOT start ros2_control fake hardware\n    # Isaac Sim provides joint states and accepts joint commands directly\n    # The following nodes are DISABLED for Isaac Sim:\n    # - ros2_control_node\n    # - joint_state_broadcaster_spawner\n    # - arm_controller_spawner\n    # - hand_controller_spawner\n\n    # Construct logging prefix for state machine node\n    if log_dir:\n        state_machine_log = os.path.join(log_dir, f\"state_machine_{timestamp}.log\")\n        state_machine_prefix = f\"konsole --hold -p tabtitle='State Machine' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {state_machine_log}; exec bash' -- \"\n    else:\n        state_machine_prefix = \"konsole --hold -p tabtitle='State Machine' -e\"\n\n    smacc_state_machine_spawner = Node(\n        package=\"sm_panda_cl_moveit2z_cb_inventory_isaacsim\",\n        executable=\"sm_panda_cl_moveit2z_cb_inventory_isaacsim_node\",\n        prefix=state_machine_prefix,\n        output=\"screen\",\n        parameters=[use_sim_time],\n        arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n    )\n\n    # Construct logging prefix for keyboard client node\n    if log_dir:\n        keyboard_log = os.path.join(log_dir, f\"cl_keyboard_{timestamp}.log\")\n        keyboard_prefix = f\"konsole --hold -p tabtitle='Keyboard Client' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {keyboard_log}; exec bash' -- \"\n    else:\n        keyboard_prefix = \"konsole --hold -p tabtitle='Keyboard Client' -e\"\n\n    cl_keyboard_node = Node(\n        package=\"cl_keyboard\",\n        executable=\"keyboard_server_node.py\",\n        name=\"keyboard_server\",\n        output=\"screen\",\n        prefix=keyboard_prefix,\n        parameters=[use_sim_time],\n        arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n    )\n\n    # Trajectory bridge - bridges MoveIt2 action to Isaac Sim joint commands\n    if log_dir:\n        trajectory_bridge_log = os.path.join(log_dir, f\"trajectory_bridge_{timestamp}.log\")\n        trajectory_bridge_prefix = f\"konsole --hold -p tabtitle='Trajectory Bridge' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {trajectory_bridge_log}; exec bash' -- \"\n    else:\n        trajectory_bridge_prefix = \"konsole --hold -p tabtitle='Trajectory Bridge' -e\"\n\n    trajectory_bridge_node = Node(\n        package=\"sm_panda_cl_moveit2z_cb_inventory_isaacsim\",\n        executable=\"trajectory_bridge.py\",\n        name=\"trajectory_bridge\",\n        output=\"screen\",\n        prefix=trajectory_bridge_prefix,\n        parameters=[\n            {\n                \"joint_command_topic\": \"joint_commands\",\n                \"joint_state_topic\": \"joint_states\",\n                \"action_name\": \"panda_arm_controller/follow_joint_trajectory\",\n                \"use_sim_time\": True,\n            }\n        ],\n        arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n    )\n\n    # For Isaac Sim - only start nodes that don't conflict with simulation\n    nodes_to_start = [\n        smacc_state_machine_spawner,\n        rviz_node,\n        static_tf,\n        robot_state_publisher,\n        run_move_group_node,\n        cl_keyboard_node,\n        trajectory_bridge_node,\n    ]\n\n    return nodes_to_start\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_panda_cl_moveit2z_cb_inventory_isaacsim</name>\n  <version>3.0.1</version>\n  <description>The sm_panda_cl_moveit2z_cb_inventory package adapted for Isaac Sim</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>libboost-thread-dev</depend>\n\n  <depend>cl_ros2_timer</depend>\n  <depend>smacc2</depend>\n  <depend>cl_moveit2z</depend>\n  <depend>controller_manager</depend>\n  <depend>moveit_resources_panda_moveit_config</depend>\n  <depend>robot_state_publisher</depend>\n  <depend>moveit_visual_tools</depend>\n  <depend>moveit_planners_chomp</depend>\n  <depend>pilz_industrial_motion_planner</depend>\n  <depend>joint_state_broadcaster</depend>\n  <depend>moveit_simple_controller_manager</depend>\n  <depend>moveit_planners_ompl</depend>\n  <depend>moveit_plugins</depend>\n  <depend>moveit_ros_robot_interaction</depend>\n  <depend>moveit</depend>\n  <depend>cl_keyboard</depend>\n  <depend>rclcpp</depend>\n  <depend>yaml-cpp</depend>\n\n  <exec_depend>joint_trajectory_controller</exec_depend>\n  <exec_depend>konsole</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/rviz/view_robot.rviz",
    "content": "Panels:\n  - Class: rviz_common/Displays\n    Help Height: 87\n    Name: Displays\n    Property Tree Widget:\n      Expanded:\n        - /Global Options1\n      Splitter Ratio: 0.4957627058029175\n    Tree Height: 573\n  - Class: rviz_common/Selection\n    Name: Selection\n  - Class: rviz_common/Tool Properties\n    Expanded:\n      - /2D Goal Pose1\n      - /Publish Point1\n    Name: Tool Properties\n    Splitter Ratio: 0.5886790156364441\n  - Class: rviz_common/Views\n    Expanded:\n      - /Current View1\n    Name: Views\n    Splitter Ratio: 0.5\nVisualization Manager:\n  Class: \"\"\n  Displays:\n    - Alpha: 0.5\n      Cell Size: 1\n      Class: rviz_default_plugins/Grid\n      Color: 160; 160; 164\n      Enabled: true\n      Line Style:\n        Line Width: 0.029999999329447746\n        Value: Lines\n      Name: Grid\n      Normal Cell Count: 0\n      Offset:\n        X: 0\n        Y: 0\n        Z: 0\n      Plane: XY\n      Plane Cell Count: 10\n      Reference Frame: <Fixed Frame>\n      Value: true\n    - Acceleration_Scaling_Factor: 0.1\n      Class: moveit_rviz_plugin/MotionPlanning\n      Enabled: true\n      Move Group Namespace: \"\"\n      MoveIt_Allow_Approximate_IK: false\n      MoveIt_Allow_External_Program: false\n      MoveIt_Allow_Replanning: false\n      MoveIt_Allow_Sensor_Positioning: false\n      MoveIt_Planning_Attempts: 10\n      MoveIt_Planning_Time: 5\n      MoveIt_Use_Cartesian_Path: false\n      MoveIt_Use_Constraint_Aware_IK: false\n      MoveIt_Warehouse_Host: 127.0.0.1\n      MoveIt_Warehouse_Port: 33829\n      MoveIt_Workspace:\n        Center:\n          X: 0\n          Y: 0\n          Z: 0\n        Size:\n          X: 2\n          Y: 2\n          Z: 2\n      Name: MotionPlanning\n      Planned Path:\n        Color Enabled: true\n        Interrupt Display: true\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          base:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          base_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          base_link_inertia:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          flange:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          forearm_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          shoulder_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          tool0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          upper_arm_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          wrist_1_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          wrist_2_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          wrist_3_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Loop Animation: false\n        Robot Alpha: 0.5\n        Robot Color: 150; 50; 150\n        Show Robot Collision: false\n        Show Robot Visual: true\n        Show Trail: false\n        State Display Time: 0.05 s\n        Trail Step Size: 1\n        Trajectory Topic: /display_planned_path\n      Planning Metrics:\n        Payload: 1\n        Show Joint Torques: false\n        Show Manipulability: false\n        Show Manipulability Index: false\n        Show Weight Limit: false\n        TextHeight: 0.07999999821186066\n      Planning Request:\n        Colliding Link Color: 255; 0; 0\n        Goal State Alpha: 1\n        Goal State Color: 250; 128; 0\n        Interactive Marker Size: 0\n        Joint Violation Color: 255; 0; 255\n        Planning Group: ur_manipulator\n        Query Goal State: true\n        Query Start State: false\n        Show Workspace: false\n        Start State Alpha: 1\n        Start State Color: 0; 255; 0\n      Planning Scene Topic: monitored_planning_scene\n      Robot Description: robot_description\n      Scene Geometry:\n        Scene Alpha: 0.8999999761581421\n        Scene Color: 50; 230; 50\n        Scene Display Time: 0.009999999776482582\n        Show Scene Geometry: true\n        Voxel Coloring: Z-Axis\n        Voxel Rendering: Occupied Voxels\n      Scene Robot:\n        Attached Body Color: 150; 50; 150\n        Links:\n          All Links Enabled: true\n          Expand Joint Details: false\n          Expand Link Details: false\n          Expand Tree: false\n          Link Tree Style: Links in Alphabetic Order\n          base:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          base_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          base_link_inertia:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          flange:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          forearm_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          shoulder_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          tool0:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n          upper_arm_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          wrist_1_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          wrist_2_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n          wrist_3_link:\n            Alpha: 1\n            Show Axes: false\n            Show Trail: false\n            Value: true\n        Robot Alpha: 1\n        Show Robot Collision: false\n        Show Robot Visual: true\n      Value: true\n      Velocity_Scaling_Factor: 0.1\n  Enabled: true\n  Global Options:\n    Background Color: 48; 48; 48\n    Fixed Frame: world\n    Frame Rate: 30\n  Name: root\n  Tools:\n    - Class: rviz_default_plugins/Interact\n      Hide Inactive Objects: true\n    - Class: rviz_default_plugins/MoveCamera\n    - Class: rviz_default_plugins/Select\n    - Class: rviz_default_plugins/FocusCamera\n    - Class: rviz_default_plugins/Measure\n      Line color: 128; 128; 0\n    - Class: rviz_default_plugins/SetInitialPose\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /initialpose\n    - Class: rviz_default_plugins/SetGoal\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /goal_pose\n    - Class: rviz_default_plugins/PublishPoint\n      Single click: true\n      Topic:\n        Depth: 5\n        Durability Policy: Volatile\n        History Policy: Keep Last\n        Reliability Policy: Reliable\n        Value: /clicked_point\n  Transformation:\n    Current:\n      Class: rviz_default_plugins/TF\n  Value: true\n  Views:\n    Current:\n      Class: rviz_default_plugins/Orbit\n      Distance: 6.619869709014893\n      Enable Stereo Rendering:\n        Stereo Eye Separation: 0.05999999865889549\n        Stereo Focal Distance: 1\n        Swap Stereo Eyes: false\n        Value: false\n      Focal Point:\n        X: 0.2489434778690338\n        Y: -0.013962505385279655\n        Z: 0.13800443708896637\n      Focal Shape Fixed Size: true\n      Focal Shape Size: 0.05000000074505806\n      Invert Z Axis: false\n      Name: Current View\n      Near Clip Distance: 0.009999999776482582\n      Pitch: 0.4103981554508209\n      Target Frame: <Fixed Frame>\n      Value: Orbit (rviz)\n      Yaw: 1.210397720336914\n    Saved: ~\nWindow Geometry:\n  Displays:\n    collapsed: false\n  Height: 1381\n  Hide Left Dock: false\n  Hide Right Dock: false\n  MotionPlanning:\n    collapsed: false\n  MotionPlanning - Trajectory Slider:\n    collapsed: false\n  QMainWindow State: 000000ff00000000fd0000000400000000000001e0000004f6fc020000000bfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000007901000003fb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c0061007900730100000046000002e3000000ff01000003fb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000005201000003fb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e0067010000032a00000212000001b9010000030000000100000110000004f6fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730100000046000004f6000000d701000003fb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d006501000000000000045000000000000000000000070e000004f600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000\n  Selection:\n    collapsed: false\n  Tool Properties:\n    collapsed: false\n  Views:\n    collapsed: false\n  Width: 2560\n  X: 0\n  Y: 30\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/scripts/setup_ros2_bridge.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"\nIsaac Sim ROS2 Bridge Setup Script for sm_panda_cl_moveit2z_cb_inventory_isaacsim\n\nThis script is designed to be run inside Isaac Sim's Script Editor (Window > Script Editor)\nAFTER the USD stage has been loaded.\n\nPrerequisites:\n1. Launch Isaac Sim\n2. Open the USD stage: File > Open > carter_warehouse_navigation w ZED Pandas.usd\n3. Run this script in Script Editor (Window > Script Editor)\n4. Press Play in Isaac Sim\n5. Launch the SMACC2 state machine from a separate terminal\n\nUsage:\n1. Copy this script content\n2. Open Isaac Sim Script Editor (Window > Script Editor)\n3. Paste and click \"Run\" (or Ctrl+Enter)\n\"\"\"\n\n# =============================================================================\n# CONFIGURATION - Modify these values as needed\n# =============================================================================\n\n# Prim paths in the USD stage\nFRANKA_STAGE_PATH = \"/World/carter_warehouse_navigation_w_ZED_Pandas/panda_instanceable\"\nZED_CAMERA_PATH = \"/World/carter_warehouse_navigation_w_ZED_Pandas/ZED_X\"\n\n# Franka hand link for camera mounting\nFRANKA_WRIST_LINK = \"panda_hand\"\n\n# OmniGraph paths (use unique names to avoid conflicts with existing graphs)\nACTION_GRAPH_PATH = \"/Panda_MoveIt_ActionGraph\"\nZED_CAMERA_GRAPH_PATH = \"/ZED_Camera_ROS2_Graph\"\n\n# Camera mounting offset (meters) - adjust as needed\nCAMERA_MOUNT_OFFSET = (0.05, 0.0, 0.05)  # (forward, right, up) from wrist\nCAMERA_MOUNT_ROTATION = (0, -90, 0)  # (roll, pitch, yaw) degrees\n\n# ROS2 Topic names - MoveIt2 integration\nJOINT_STATES_TOPIC = \"joint_states\"\nJOINT_COMMANDS_TOPIC = \"joint_commands\"\n\n# ROS2 Topic names - ZED camera (matching real ZED driver naming)\nZED_RGB_TOPIC = \"zed/zed_node/rgb/image_rect_color\"\nZED_CAMERA_INFO_TOPIC = \"zed/zed_node/rgb/camera_info\"\nZED_DEPTH_TOPIC = \"zed/zed_node/depth/depth_registered\"\nZED_POINTCLOUD_TOPIC = \"zed/zed_node/point_cloud/cloud_registered\"\n\n# Frame IDs for TF\nZED_FRAME_ID = \"zed_camera_link\"\n\n# =============================================================================\n# SCRIPT IMPLEMENTATION\n# =============================================================================\n\nimport omni\nimport omni.usd\nimport omni.graph.core as og\nimport usdrt.Sdf\nfrom pxr import Sdf, UsdGeom, Gf\nfrom isaacsim.core.utils.extensions import enable_extension\nimport os\n\n# Log file for debugging (readable from terminal)\nLOG_FILE = os.path.expanduser(\"~/isaacsim_ros2_bridge_setup.log\")\n\n\ndef log(msg):\n    \"\"\"Print and log to file\"\"\"\n    print(msg)\n    with open(LOG_FILE, \"a\") as f:\n        f.write(msg + \"\\n\")\n\n\n# Clear log file at start\nwith open(LOG_FILE, \"w\") as f:\n    f.write(\"\")\n\nlog(\"=\" * 60)\nlog(\"Isaac Sim ROS2 Bridge Setup Script\")\nlog(\"=\" * 60)\n\n# Step 1: Get the current stage\nstage = omni.usd.get_context().get_stage()\nif stage is None:\n    log(\"ERROR: No stage is currently open!\")\n    log(\"Please open a USD stage first (File > Open)\")\n    raise RuntimeError(\"No stage open\")\n\nlog(f\"Stage loaded: {stage.GetRootLayer().identifier}\")\n\n# Step 2: Enable ROS2 bridge extension\nlog(\"\\nEnabling ROS2 bridge extension...\")\nenable_extension(\"isaacsim.ros2.bridge\")\nomni.kit.app.get_app().update()\nlog(\"ROS2 bridge extension enabled\")\n\n# Step 3: Verify prims exist\nlog(\"\\nVerifying prim paths...\")\nfranka_prim = stage.GetPrimAtPath(FRANKA_STAGE_PATH)\nif not franka_prim.IsValid():\n    log(f\"ERROR: Franka prim not found at {FRANKA_STAGE_PATH}\")\n    log(\"\\nSearching for Franka/Panda prims in stage...\")\n    for prim in stage.Traverse():\n        path_str = str(prim.GetPath())\n        if \"panda\" in path_str.lower() or \"franka\" in path_str.lower():\n            # Show robot prims up to 5 levels deep\n            if path_str.count(\"/\") <= 5 and (\n                \"instanceable\" in path_str.lower() or path_str.endswith(\"panda\")\n            ):\n                log(f\"  Found: {path_str} (type: {prim.GetTypeName()})\")\n    log(\"\\nAll top-level prims under /World:\")\n    world_prim = stage.GetPrimAtPath(\"/World\")\n    if world_prim.IsValid():\n        for child in world_prim.GetChildren():\n            log(f\"  /World/{child.GetName()}\")\n    raise RuntimeError(\"Franka prim not found - check paths above and update FRANKA_STAGE_PATH\")\nlog(f\"  Franka found: {FRANKA_STAGE_PATH}\")\n\nzed_prim = stage.GetPrimAtPath(ZED_CAMERA_PATH)\nif not zed_prim.IsValid():\n    log(f\"ERROR: ZED camera prim not found at {ZED_CAMERA_PATH}\")\n    raise RuntimeError(\"ZED camera prim not found\")\nlog(f\"  ZED camera found: {ZED_CAMERA_PATH}\")\n\n# Step 4: Find the wrist link (camera mounting disabled for now)\nlog(\"\\nSearching for Franka wrist link...\")\nwrist_path = f\"{FRANKA_STAGE_PATH}/{FRANKA_WRIST_LINK}\"\nwrist_prim = stage.GetPrimAtPath(wrist_path)\n\nif wrist_prim.IsValid():\n    log(f\"  Found wrist link: {wrist_path}\")\nelse:\n    log(f\"  Not found at {wrist_path}, searching...\")\n    # Search for panda_link7 or panda_hand as fallback\n    for prim in stage.Traverse():\n        path_str = str(prim.GetPath())\n        if FRANKA_STAGE_PATH in path_str and path_str.endswith(\"panda_link7\"):\n            wrist_path = path_str\n            wrist_prim = prim\n            log(f\"  Found wrist link: {wrist_path}\")\n            break\n\n# Step 4b: Mount camera to wrist using Fixed Joint\nlog(\"\\nMounting ZED camera to Franka wrist...\")\nmounted_camera_path = ZED_CAMERA_PATH\n\nif wrist_prim and wrist_prim.IsValid():\n    try:\n        from pxr import UsdPhysics\n\n        # Create a fixed joint to attach camera to wrist\n        fixed_joint_path = f\"{ZED_CAMERA_PATH}/WristFixedJoint\"\n\n        # Check if joint already exists\n        existing_joint = stage.GetPrimAtPath(fixed_joint_path)\n        if existing_joint.IsValid():\n            log(f\"  Fixed joint already exists at {fixed_joint_path}\")\n        else:\n            # Create the fixed joint\n            fixed_joint = UsdPhysics.FixedJoint.Define(stage, fixed_joint_path)\n\n            # Set the joint bodies - body0 is parent (wrist), body1 is child (camera)\n            fixed_joint.CreateBody0Rel().SetTargets([wrist_path])\n            fixed_joint.CreateBody1Rel().SetTargets([ZED_CAMERA_PATH])\n\n            # Set local poses for the joint\n            # Camera offset from wrist: forward, right, up (in wrist frame)\n            fixed_joint.CreateLocalPos0Attr().Set(\n                Gf.Vec3f(CAMERA_MOUNT_OFFSET[0], CAMERA_MOUNT_OFFSET[1], CAMERA_MOUNT_OFFSET[2])\n            )\n            fixed_joint.CreateLocalPos1Attr().Set(Gf.Vec3f(0, 0, 0))\n\n            # Set rotation (camera pointing forward from wrist)\n            rot_x = Gf.Rotation(Gf.Vec3d(1, 0, 0), CAMERA_MOUNT_ROTATION[0])\n            rot_y = Gf.Rotation(Gf.Vec3d(0, 1, 0), CAMERA_MOUNT_ROTATION[1])\n            rot_z = Gf.Rotation(Gf.Vec3d(0, 0, 1), CAMERA_MOUNT_ROTATION[2])\n            combined_rot = rot_z * rot_y * rot_x\n            quat = combined_rot.GetQuat()\n            fixed_joint.CreateLocalRot0Attr().Set(\n                Gf.Quatf(quat.GetReal(), Gf.Vec3f(quat.GetImaginary()))\n            )\n            fixed_joint.CreateLocalRot1Attr().Set(Gf.Quatf(1, 0, 0, 0))\n\n            log(f\"  Created fixed joint: {fixed_joint_path}\")\n            log(f\"  Camera mounted to: {wrist_path}\")\n            log(f\"  Offset: {CAMERA_MOUNT_OFFSET}, Rotation: {CAMERA_MOUNT_ROTATION}\")\n\n    except Exception as e:\n        log(f\"  WARNING: Could not create fixed joint: {e}\")\n        log(\"  Camera will remain at original position\")\n        log(\"  To attach manually: drag ZED_X under panda_link7 in Stage panel\")\nelse:\n    log(\"  WARNING: Wrist link not found, camera mounting skipped\")\n    log(\"  To attach manually: drag ZED_X under panda_link7 in Stage panel\")\n\nomni.kit.app.get_app().update()\n\n# Step 5: Create MoveIt2 Integration OmniGraph\nlog(\"\\nCreating MoveIt2 integration OmniGraph...\")\n\ntry:\n    log(f\"  Creating graph at path: {ACTION_GRAPH_PATH}\")\n\n    # Check if graph already exists and delete it first\n    existing_graph = stage.GetPrimAtPath(ACTION_GRAPH_PATH)\n    if existing_graph.IsValid():\n        log(f\"  WARNING: Graph already exists at {ACTION_GRAPH_PATH}, deleting...\")\n        stage.RemovePrim(ACTION_GRAPH_PATH)\n        omni.kit.app.get_app().update()\n\n    og.Controller.edit(\n        {\"graph_path\": ACTION_GRAPH_PATH, \"evaluator_name\": \"execution\"},\n        {\n            og.Controller.Keys.CREATE_NODES: [\n                (\"OnPlaybackTick\", \"omni.graph.action.OnPlaybackTick\"),\n                (\"ReadSimTime\", \"isaacsim.core.nodes.IsaacReadSimulationTime\"),\n                (\"Context\", \"isaacsim.ros2.bridge.ROS2Context\"),\n                (\"PublishJointState\", \"isaacsim.ros2.bridge.ROS2PublishJointState\"),\n                (\"SubscribeJointState\", \"isaacsim.ros2.bridge.ROS2SubscribeJointState\"),\n                (\"ArticulationController\", \"isaacsim.core.nodes.IsaacArticulationController\"),\n                (\"PublishClock\", \"isaacsim.ros2.bridge.ROS2PublishClock\"),\n            ],\n            og.Controller.Keys.CONNECT: [\n                (\"OnPlaybackTick.outputs:tick\", \"PublishJointState.inputs:execIn\"),\n                (\"OnPlaybackTick.outputs:tick\", \"SubscribeJointState.inputs:execIn\"),\n                (\"OnPlaybackTick.outputs:tick\", \"PublishClock.inputs:execIn\"),\n                (\"OnPlaybackTick.outputs:tick\", \"ArticulationController.inputs:execIn\"),\n                (\"Context.outputs:context\", \"PublishJointState.inputs:context\"),\n                (\"Context.outputs:context\", \"SubscribeJointState.inputs:context\"),\n                (\"Context.outputs:context\", \"PublishClock.inputs:context\"),\n                (\"ReadSimTime.outputs:simulationTime\", \"PublishJointState.inputs:timeStamp\"),\n                (\"ReadSimTime.outputs:simulationTime\", \"PublishClock.inputs:timeStamp\"),\n                (\n                    \"SubscribeJointState.outputs:jointNames\",\n                    \"ArticulationController.inputs:jointNames\",\n                ),\n                (\n                    \"SubscribeJointState.outputs:positionCommand\",\n                    \"ArticulationController.inputs:positionCommand\",\n                ),\n                (\n                    \"SubscribeJointState.outputs:velocityCommand\",\n                    \"ArticulationController.inputs:velocityCommand\",\n                ),\n                (\n                    \"SubscribeJointState.outputs:effortCommand\",\n                    \"ArticulationController.inputs:effortCommand\",\n                ),\n            ],\n            og.Controller.Keys.SET_VALUES: [\n                (\"ArticulationController.inputs:robotPath\", FRANKA_STAGE_PATH),\n                (\"PublishJointState.inputs:topicName\", JOINT_STATES_TOPIC),\n                (\"SubscribeJointState.inputs:topicName\", JOINT_COMMANDS_TOPIC),\n                (\"PublishJointState.inputs:targetPrim\", [usdrt.Sdf.Path(FRANKA_STAGE_PATH)]),\n            ],\n        },\n    )\n    log(\"  MoveIt2 ActionGraph created successfully\")\nexcept Exception as e:\n    import traceback\n\n    log(f\"  ERROR creating MoveIt2 ActionGraph: {e}\")\n    log(f\"  Full traceback:\")\n    traceback.print_exc()\n\nomni.kit.app.get_app().update()\n\n# Step 6: Create ZED Camera OmniGraph\n# NOTE: Camera graph creation is DISABLED due to Isaac Sim crash when creating viewport\n# The crash occurs in libomni.ui.scene.so when setting up the camera render product\n# To use camera in Isaac Sim, manually add camera publishers via the GUI:\n#   1. Select the ZED_X/base_link/ZED_X/CameraLeft prim\n#   2. Right-click > Create > Isaac > ROS2 Camera\nlog(\"\\nZED Camera OmniGraph creation SKIPPED\")\nlog(\"  Camera viewport creation causes Isaac Sim crash\")\nlog(\"  To publish camera data, use Isaac Sim GUI:\")\nlog(\n    \"    1. Select: /World/carter_warehouse_navigation_w_ZED_Pandas/ZED_X/base_link/ZED_X/CameraLeft\"\n)\nlog(\"    2. Right-click > Create > Isaac > ROS2 Bridge > Camera\")\ncamera_prim_path = f\"{ZED_CAMERA_PATH}/base_link/ZED_X/CameraLeft\"\n\nomni.kit.app.get_app().update()\n\n# Step 7: Print summary\nlog(\"\\n\" + \"=\" * 60)\nlog(\"SETUP COMPLETE!\")\nlog(\"=\" * 60)\nlog(\"\\nROS2 Topics configured:\")\nlog(f\"  Publishing:\")\nlog(f\"    - /{JOINT_STATES_TOPIC} (sensor_msgs/JointState)\")\nlog(f\"    - /clock (rosgraph_msgs/Clock)\")\nlog(f\"    - /{ZED_RGB_TOPIC} (sensor_msgs/Image)\")\nlog(f\"    - /{ZED_CAMERA_INFO_TOPIC} (sensor_msgs/CameraInfo)\")\nlog(f\"    - /{ZED_DEPTH_TOPIC} (sensor_msgs/Image)\")\nlog(f\"    - /{ZED_POINTCLOUD_TOPIC} (sensor_msgs/PointCloud2)\")\nlog(f\"  Subscribing:\")\nlog(f\"    - /{JOINT_COMMANDS_TOPIC} (sensor_msgs/JointState)\")\n\nlog(\"\\nOmniGraphs created:\")\nlog(f\"  - {ACTION_GRAPH_PATH}\")\nlog(f\"  - {ZED_CAMERA_GRAPH_PATH}\")\nlog(f\"  Camera prim used: {camera_prim_path}\")\n\nlog(\"\\nNext steps:\")\nlog(\"  1. Press PLAY in Isaac Sim to start the simulation\")\nlog(\"  2. In a separate terminal, run:\")\nlog(\"     source /opt/ros/jazzy/setup.bash\")\nlog(\"     source ~/workspaces/isaac_ros-dev/install/setup.bash\")\nlog(\n    \"     ros2 launch sm_panda_cl_moveit2z_cb_inventory_isaacsim sm_panda_cl_moveit2z_cb_inventory_isaacsim.launch.py\"\n)\nlog(\"\\n\" + \"=\" * 60)\nlog(f\"\\nLog file written to: {LOG_FILE}\")\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/scripts/trajectory_bridge.py",
    "content": "#!/usr/bin/env python3\n# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"\nTrajectory Bridge Node for Isaac Sim + MoveIt2 Integration\n\nThis node bridges MoveIt2's FollowJointTrajectory action to Isaac Sim's\njoint command topics. It provides an action server that MoveIt2 can connect to,\nand publishes joint commands that Isaac Sim's OmniGraph can subscribe to.\n\nUsage:\n    ros2 run sm_panda_cl_moveit2z_cb_inventory_isaacsim trajectory_bridge.py\n\"\"\"\n\nimport rclpy\nfrom rclpy.node import Node\nfrom rclpy.action import ActionServer, GoalResponse, CancelResponse\nfrom rclpy.callback_groups import ReentrantCallbackGroup\nfrom rclpy.executors import MultiThreadedExecutor\n\nfrom control_msgs.action import FollowJointTrajectory\nfrom sensor_msgs.msg import JointState\nfrom trajectory_msgs.msg import JointTrajectoryPoint\n\nimport threading\nimport time\n\n\nclass TrajectoryBridge(Node):\n    def __init__(self):\n        super().__init__(\"trajectory_bridge\")\n\n        self.callback_group = ReentrantCallbackGroup()\n\n        # Parameters\n        self.declare_parameter(\"joint_command_topic\", \"joint_commands\")\n        self.declare_parameter(\"joint_state_topic\", \"joint_states\")\n        self.declare_parameter(\"action_name\", \"panda_arm_controller/follow_joint_trajectory\")\n        self.declare_parameter(\"position_tolerance\", 0.01)  # radians\n        self.declare_parameter(\"goal_time_tolerance\", 1.0)  # seconds\n\n        joint_command_topic = self.get_parameter(\"joint_command_topic\").value\n        joint_state_topic = self.get_parameter(\"joint_state_topic\").value\n        action_name = self.get_parameter(\"action_name\").value\n\n        # Publisher for joint commands to Isaac Sim\n        self.joint_command_pub = self.create_publisher(JointState, joint_command_topic, 10)\n\n        # Subscriber for joint states from Isaac Sim\n        self.current_joint_state = None\n        self.joint_state_lock = threading.Lock()\n        self.joint_state_sub = self.create_subscription(\n            JointState,\n            joint_state_topic,\n            self.joint_state_callback,\n            10,\n            callback_group=self.callback_group,\n        )\n\n        # Action server for MoveIt2\n        self.action_server = ActionServer(\n            self,\n            FollowJointTrajectory,\n            action_name,\n            execute_callback=self.execute_trajectory,\n            goal_callback=self.goal_callback,\n            cancel_callback=self.cancel_callback,\n            callback_group=self.callback_group,\n        )\n\n        self.get_logger().info(f\"Trajectory Bridge started\")\n        self.get_logger().info(f\"  Action server: {action_name}\")\n        self.get_logger().info(f\"  Publishing commands to: {joint_command_topic}\")\n        self.get_logger().info(f\"  Subscribing to states from: {joint_state_topic}\")\n\n    def joint_state_callback(self, msg):\n        with self.joint_state_lock:\n            self.current_joint_state = msg\n\n    def get_current_joint_state(self):\n        with self.joint_state_lock:\n            return self.current_joint_state\n\n    def goal_callback(self, goal_request):\n        \"\"\"Accept all trajectory goals\"\"\"\n        self.get_logger().info(\"Received trajectory goal request - ACCEPTING\")\n        return GoalResponse.ACCEPT\n\n    def cancel_callback(self, goal_handle):\n        \"\"\"Accept all cancel requests\"\"\"\n        self.get_logger().info(\"Received cancel request - ACCEPTING\")\n        return CancelResponse.ACCEPT\n\n    def execute_trajectory(self, goal_handle):\n        \"\"\"Execute the trajectory received from MoveIt2\"\"\"\n        self.get_logger().info(\"Received trajectory goal\")\n\n        trajectory = goal_handle.request.trajectory\n        joint_names = trajectory.joint_names\n        points = trajectory.points\n\n        if len(points) == 0:\n            self.get_logger().warn(\"Empty trajectory received\")\n            goal_handle.succeed()\n            result = FollowJointTrajectory.Result()\n            result.error_code = FollowJointTrajectory.Result.SUCCESSFUL\n            return result\n\n        self.get_logger().info(\n            f\"Executing trajectory with {len(points)} points for joints: {joint_names}\"\n        )\n\n        # Get trajectory duration\n        last_point = points[-1]\n        total_duration = last_point.time_from_start.sec + last_point.time_from_start.nanosec * 1e-9\n        self.get_logger().info(f\"Trajectory duration: {total_duration:.2f} seconds\")\n\n        # Publish rate (Hz) - Isaac Sim needs frequent updates\n        publish_rate = 50.0  # 50 Hz\n        dt = 1.0 / publish_rate\n\n        # Get start time\n        start_time = self.get_clock().now()\n        feedback = FollowJointTrajectory.Feedback()\n\n        # Find point times for interpolation\n        point_times = []\n        for p in points:\n            t = p.time_from_start.sec + p.time_from_start.nanosec * 1e-9\n            point_times.append(t)\n\n        current_point_idx = 0\n\n        while True:\n            # Check if goal was canceled\n            if goal_handle.is_cancel_requested:\n                goal_handle.canceled()\n                self.get_logger().info(\"Trajectory canceled\")\n                result = FollowJointTrajectory.Result()\n                result.error_code = FollowJointTrajectory.Result.INVALID_GOAL\n                return result\n\n            # Calculate elapsed time\n            elapsed = (self.get_clock().now() - start_time).nanoseconds * 1e-9\n\n            # Check if trajectory is complete\n            if elapsed >= total_duration:\n                break\n\n            # Find the surrounding trajectory points for interpolation\n            while (\n                current_point_idx < len(points) - 1\n                and point_times[current_point_idx + 1] <= elapsed\n            ):\n                current_point_idx += 1\n\n            # Get target position (interpolate if between points)\n            if current_point_idx >= len(points) - 1:\n                # Use last point\n                target_positions = list(points[-1].positions)\n            else:\n                # Linear interpolation between points\n                p0 = points[current_point_idx]\n                p1 = points[current_point_idx + 1]\n                t0 = point_times[current_point_idx]\n                t1 = point_times[current_point_idx + 1]\n\n                if t1 > t0:\n                    alpha = (elapsed - t0) / (t1 - t0)\n                    alpha = max(0.0, min(1.0, alpha))\n                else:\n                    alpha = 1.0\n\n                target_positions = []\n                for j in range(len(joint_names)):\n                    pos0 = p0.positions[j] if j < len(p0.positions) else 0.0\n                    pos1 = p1.positions[j] if j < len(p1.positions) else 0.0\n                    target_positions.append(pos0 + alpha * (pos1 - pos0))\n\n            # Publish joint command\n            cmd = JointState()\n            cmd.header.stamp = self.get_clock().now().to_msg()\n            cmd.name = joint_names\n            cmd.position = target_positions\n\n            self.joint_command_pub.publish(cmd)\n\n            # Publish feedback periodically\n            if int(elapsed * 10) % 5 == 0:  # Every 0.5 seconds\n                feedback.joint_names = joint_names\n                desired_point = JointTrajectoryPoint()\n                desired_point.positions = target_positions\n                feedback.desired = desired_point\n\n                current = self.get_current_joint_state()\n                if current:\n                    actual_point = JointTrajectoryPoint()\n                    actual_positions = []\n                    for name in joint_names:\n                        if name in current.name:\n                            idx = current.name.index(name)\n                            actual_positions.append(current.position[idx])\n                        else:\n                            actual_positions.append(0.0)\n                    actual_point.positions = actual_positions\n                    feedback.actual = actual_point\n\n                goal_handle.publish_feedback(feedback)\n\n            # Sleep to maintain publish rate\n            time.sleep(dt)\n\n        # Send final position a few more times to ensure it's received\n        final_positions = list(points[-1].positions)\n        for _ in range(10):\n            cmd = JointState()\n            cmd.header.stamp = self.get_clock().now().to_msg()\n            cmd.name = joint_names\n            cmd.position = final_positions\n            self.joint_command_pub.publish(cmd)\n            time.sleep(0.02)\n\n        self.get_logger().info(\"Trajectory execution completed\")\n        goal_handle.succeed()\n\n        result = FollowJointTrajectory.Result()\n        result.error_code = FollowJointTrajectory.Result.SUCCESSFUL\n        self.get_logger().info(\"Trajectory execution completed successfully\")\n\n        return result\n\n\ndef main(args=None):\n    rclpy.init(args=args)\n\n    node = TrajectoryBridge()\n\n    executor = MultiThreadedExecutor()\n    executor.add_node(node)\n\n    try:\n        executor.spin()\n    except KeyboardInterrupt:\n        pass\n    finally:\n        node.destroy_node()\n        rclpy.shutdown()\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_panda_cl_moveit2z_cb_inventory_isaacsim/src/sm_panda_cl_moveit2z_cb_inventory_isaacsim/sm_panda_cl_moveit2z_cb_inventory_isaacsim_node.cpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//\n// Author: Denis Štogl (template)\n//\n\n#include <sm_panda_cl_moveit2z_cb_inventory_isaacsim/sm_panda_cl_moveit2z_cb_inventory_isaacsim.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_panda_cl_moveit2z_cb_inventory_isaacsim::SmPandaClMoveit2zCbInventoryIsaacsim>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/CHANGELOG.rst",
    "content": "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nChangelog for package sm_simple_action_client\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n3.0.2 (2025-11-19)\n-------------------\n* Complete self-contained demo implementation with 3-state workflow\n  * Added StState3 success completion state with informative onEntry message\n  * Created auto_mode_trigger.py script for automatic demo initialization\n  * Implemented comprehensive Python launch file with logging infrastructure\n  * Added Fibonacci action server to launch configuration\n  * Updated state transitions: StState2 now transitions to StState3 on action success\n  * Fixed auto-trigger shutdown sequence to prevent TypeError on exit\n  * Optimized Fibonacci action order from 100 to 10 for faster demo completion\n  * Added timestamped log directory creation with fallback error handling\n  * Integrated konsole terminal support for multi-window process visualization\n  * Removed outdated XML launch file (sm_simple_action_client.launch)\n  * Comprehensive README documentation covering:\n    - State machine architecture with 3-state flow diagram\n    - Automated demo and manual control instructions\n    - Monitoring commands and troubleshooting guide\n    - Component reference for clients, behaviors, and orthogonals\n    - Learning objectives for SMACC2 patterns\n* Bug fixes:\n  * Fixed config file path to use correct simple_action_client_example_config.yaml\n  * Resolved rclpy shutdown race condition in auto_mode_trigger\n  * Updated all documentation references from order=100 to order=10\n* Contributors: Claude Code, brettpac\n\n2.3.19 (2025-06-17)\n-------------------\n* simple state machine with an action client and a topic subscriber (`#543 <https://github.com/robosoft-ai/SMACC2/issues/543>`_)\n  * create a simple state machine with two states, one action server client and one subscriber client\n  * added the template copyright and license info to all code files\n  * renamed package and files to fit the established naming convention\n  * added missing license for mode_selection_client and orhtogonals files\n  * moved license to the top of the cl_mode_select.hpp file\n  * fixed formatting errors\n  ---------\n  Co-authored-by: Sukhraj Klair <sukhraj.k@radskunkworks.com>\n* Contributors: sukhrajklair\n\n2.4.1 (2023-07-06)\n------------------\n\n2.3.16 (2023-07-16)\n-------------------\n\n2.3.18 (2023-04-24)\n-------------------\n\n2.3.8 (2023-03-12 21:50)\n------------------------\n\n2.3.7 (2023-03-12 21:45)\n------------------------\n\n2.3.6 (2023-03-12 20:30)\n------------------------\n\n2.3.5 (2023-03-07 00:14)\n------------------------\n\n2.3.4 (2023-03-07 00:02)\n------------------------\n\n2.3.3 (2023-03-02 22:58)\n------------------------\n\n2.3.2 (2023-03-02 22:22)\n------------------------\n\n2.3.1 (2022-11-28)\n------------------\n\n1.22.1 (2022-11-09 20:22)\n-------------------------\n\n1.22.0 (2022-11-09 19:53)\n-------------------------\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_simple_action_client)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\nfind_package(action_tutorials_interfaces REQUIRED)\nfind_package(example_interfaces REQUIRED)\n\nset(THIS_PACKAGE_INCLUDE_DEPENDS\n  smacc2\n  example_interfaces\n  action_tutorials_interfaces\n)\n\ninclude_directories(\n  include\n)\n\nadd_executable(${PROJECT_NAME}_node\n  src/${PROJECT_NAME}/${PROJECT_NAME}_node.cpp\n)\n\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${smacc2_LIBRARIES}\n  ${Boost_LIBRARIES}\n)\n\nament_target_dependencies(${PROJECT_NAME}_node ${THIS_PACKAGE_INCLUDE_DEPENDS})\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(DIRECTORY\n  config launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(PROGRAMS\n  scripts/auto_mode_trigger.py\n  DESTINATION lib/${PROJECT_NAME}\n)\n\ninstall(TARGETS\n  ${PROJECT_NAME}_node\n  DESTINATION lib/${PROJECT_NAME}\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/README.md",
    "content": "# SM Simple Action Client\n\n ![sm_simple_action_client](docs/SmSimpleActionClient_2025-12-21_225014.svg)\n\nA SMACC2 tutorial demonstrating topic subscription and action client patterns.\n\n## Overview\n\nThis state machine demonstrates:\n- **Topic Subscriber Pattern**: `ClModeSelect` subscribes to `/mode_command`\n- **Action Client Pattern**: `ClFibonacci` sends goals to Fibonacci action server\n- **Three-State Flow**: Demonstrates waiting → executing → completion states\n\n## State Machine Architecture\n\n### States\n\n**StState1 - Waiting for Mode Command**\n- **Purpose**: Initial state, waits for autonomous mode trigger\n- **Orthogonals**:\n  - `OrModeSelect`: Runs `CbModeSelect` behavior (subscribes to `/mode_command`)\n  - `OrFibonacci`: Empty (no behavior)\n- **Transitions**:\n  - `EvAutonomousMode` (when data=1) → **StState2**\n\n**StState2 - Executing Fibonacci Action**\n- **Purpose**: Sends Fibonacci calculation request to action server\n- **Orthogonals**:\n  - `OrModeSelect`: Runs `CbModeSelect` behavior (still monitoring topic)\n  - `OrFibonacci`: Runs `CbFibonacci` behavior (sends goal with order=10)\n- **Transitions**:\n  - `EvCbSuccess` → **StState3** (action succeeded)\n  - `EvCbFailure` → **StState2** (stay in state to retry)\n  - `EvManualMode` (when data=0) → **StState1**\n\n**StState3 - Action Completed Successfully**\n- **Purpose**: Terminal success state, demonstrates completion\n- **Orthogonals**:\n  - `OrModeSelect`: Runs `CbModeSelect` behavior (still monitoring topic)\n  - `OrFibonacci`: Empty (no behavior)\n- **Transitions**:\n  - `EvManualMode` (when data=0) → **StState1** (restart cycle)\n\n### Interaction Pattern\n\n```\nStart\n  ↓\n┌─────────────────┐\n│   StState1      │ ← Manual: publish {data: 0}\n│   (Waiting)     │ ←──────────────────────┐\n└────────┬────────┘                        │\n         │ Auto/Manual: {data: 1}          │\n         ▼                                 │\n┌─────────────────┐                        │\n│   StState2      │                        │\n│   (Executing)   │                        │\n└─────┬───┬───────┘                        │\n      │   │                                │\n      │   └─ Failure (retry in StState2)  │\n      │                                    │\n      ▼ Success                            │\n┌─────────────────┐                        │\n│   StState3      │                        │\n│   (Complete)    │                        │\n└─────────────────┘                        │\n      │                                    │\n      └────────────────────────────────────┘\n```\n\n## Build Instructions\n\nFirst, source your ROS2 installation:\n```bash\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, install dependencies:\n```bash\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nBuild with colcon:\n```bash\ncolcon build --packages-select sm_simple_action_client\n```\n\n## Operating Instructions - Automated Demo\n\nThe launch file starts everything automatically for a hands-off demonstration:\n\n```bash\nsource install/setup.bash\nros2 launch sm_simple_action_client sm_simple_action_client.py\n```\n\n**What happens automatically**:\n1. **Fibonacci action server** starts in separate konsole window\n2. **State machine** starts in StState1 in separate konsole window\n3. **Auto-trigger** waits 3 seconds, then publishes autonomous mode command\n4. State machine transitions: **StState1** → **StState2**\n5. Fibonacci action executes (order=10)\n6. On success, state machine transitions: **StState2** → **StState3**\n7. State machine remains in StState3 (terminal state)\n\n## Operating Instructions - Manual Control\n\nFor learning/testing, you can manually control the state machine:\n\n### Step 1: Start Fibonacci Action Server (in separate terminal)\n```bash\nros2 run action_tutorials_cpp fibonacci_action_server\n```\n\n### Step 2: Start State Machine (in separate terminal)\n```bash\nsource install/setup.bash\nros2 launch sm_simple_action_client sm_simple_action_client.py\n```\n\n### Step 3: Trigger Transitions Manually\n\n**Transition to Autonomous Mode (StState1 → StState2)**:\n```bash\nros2 topic pub /mode_command example_interfaces/msg/Int32 \"{data: 1}\" --once\n```\n\n**Return to Manual Mode (StState3 → StState1 or StState2 → StState1)**:\n```bash\nros2 topic pub /mode_command example_interfaces/msg/Int32 \"{data: 0}\" --once\n```\n\n## Monitoring the State Machine\n\n**View current state and orthogonals**:\n```bash\nros2 topic echo /sm_simple_action_client/smacc/status\n```\n\n**View all events being posted**:\n```bash\nros2 topic echo /sm_simple_action_client/smacc/event_log\n```\n\n**View state transitions**:\n```bash\nros2 topic echo /sm_simple_action_client/smacc/transition_log\n```\n\n**View state machine structure**:\n```bash\nros2 topic echo /sm_simple_action_client/smacc/state_machine_description\n```\n\n## Log Files\n\nLogs are automatically saved to timestamped directories:\n- **Location**: `~/.ros/log/{timestamp}-sm_simple_action_client/`\n- **Files**:\n  - `sm_simple_action_client_node_{timestamp}.log` - State machine output\n  - `fibonacci_action_server_{timestamp}.log` - Action server output\n  - `auto_mode_trigger_{timestamp}.log` - Auto-trigger output\n\n## Components Reference\n\n### Clients\n\n**ClModeSelect** - Topic Subscriber Client\n- **Subscribes to**: `/mode_command` (example_interfaces/msg/Int32)\n- **Events Posted**:\n  - `EvAutonomousMode<ClModeSelect, OrModeSelect>` when message data=1\n  - `EvManualMode<ClModeSelect, OrModeSelect>` when message data=0\n- **Signals**:\n  - `onFirstMessageReceived_` - Emitted on first message\n  - `onMessageReceived_` - Emitted on every message\n\n**ClFibonacci** - Action Client\n- **Action**: `/fibonacci` (action_tutorials_interfaces/action/Fibonacci)\n- **Goal**: Fibonacci sequence with order=10\n- **Events Posted**:\n  - `EvCbSuccess<CbFibonacci, OrFibonacci>` on successful completion\n  - `EvCbFailure<CbFibonacci, OrFibonacci>` on abort/cancellation\n\n### Client Behaviors\n\n**CbModeSelect** - Mode Selection Behavior\n- **Type**: SmaccClientBehavior (synchronous)\n- **Purpose**: Monitors `/mode_command` topic and posts mode events\n- **Lifecycle**:\n  - `onEntry()`: Registers callbacks for first message and all messages\n  - Callbacks invoke `ClModeSelect` event posting functions based on message data\n\n**CbFibonacci** - Fibonacci Action Behavior\n- **Type**: SmaccAsyncClientBehavior (asynchronous)\n- **Purpose**: Sends Fibonacci calculation goal to action server\n- **Lifecycle**:\n  - `onEntry()`: Sends goal (order=100) to action server\n  - Waits asynchronously for result\n  - `onExit()`: Cancels goal if state exits early\n- **Result Handling**:\n  - Success → posts `EvCbSuccess`\n  - Abort/Failure → posts `EvCbFailure`\n\n### Orthogonals\n\n**OrModeSelect**\n- **Purpose**: Manages mode selection client and behavior\n- **Client**: ClModeSelect\n- **States using this**:\n  - StState1: CbModeSelect behavior\n  - StState2: CbModeSelect behavior\n  - StState3: CbModeSelect behavior\n\n**OrFibonacci**\n- **Purpose**: Manages Fibonacci action client and behavior\n- **Client**: ClFibonacci\n- **States using this**:\n  - StState1: No behavior (empty)\n  - StState2: CbFibonacci behavior (executes action)\n  - StState3: No behavior (empty)\n\n## Troubleshooting\n\n**State machine stuck in StState1**:\n- Check if mode command was published:\n  ```bash\n  ros2 topic echo /mode_command\n  ```\n- Manually trigger autonomous mode:\n  ```bash\n  ros2 topic pub /mode_command example_interfaces/msg/Int32 \"{data: 1}\" --once\n  ```\n\n**Fibonacci action not executing**:\n- Verify action server is running:\n  ```bash\n  ros2 action list\n  ```\n  Should show `/fibonacci` action available\n- Start action server manually:\n  ```bash\n  ros2 run action_tutorials_cpp fibonacci_action_server\n  ```\n\n**State machine doesn't transition to StState3**:\n- Check Fibonacci action result in logs\n- Verify action server is completing successfully\n- Check event log:\n  ```bash\n  ros2 topic echo /sm_simple_action_client/smacc/event_log\n  ```\n\n**Konsole windows not appearing**:\n- Verify konsole is installed: `which konsole`\n- Install if needed: `sudo apt install konsole`\n- Logs are still saved even if konsole fails\n\n## Viewer Instructions\n\nIf you have the SMACC2 Runtime Analyzer installed:\n\n```bash\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer, [click here](https://robosoft.ai/product-category/smacc2-runtime-analyzer/)\n\n## Learning Objectives\n\nThis example teaches:\n1. **Topic Subscription Pattern**: How SMACC2 clients can subscribe to ROS topics and post events\n2. **Action Client Pattern**: How SMACC2 behaviors can interact with ROS action servers\n3. **Event-Driven Transitions**: How external events trigger state machine transitions\n4. **Orthogonal Architecture**: How multiple concurrent behaviors run in parallel\n5. **Async Behaviors**: How long-running operations execute without blocking\n6. **State Lifecycle**: Understanding staticConfigure(), runtimeConfigure(), onEntry(), onExit()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/config/simple_action_client_example.yaml",
    "content": "state_machine_rosparam_ws: /SmSimpleActionClient\nsuccess_switch:\n   - type: state_reached\n     state_name: \"sm_simple_action_client::State2\"\nfailure_switch:\n   - type: timeout\n     duration: 10.0 # sec\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/config/simple_action_client_example_config.yaml",
    "content": "sm_simple_action_client:\n  ros__parameters:\n    signal_detector_loop_freq: 2000.0\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/include/sm_simple_action_client/fibonacci_action_client/cl_fibonacci.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#ifndef ROBOT_STATE_MACHINE__CLIENTS__CL_FIBONACCI_HPP_\n#define ROBOT_STATE_MACHINE__CLIENTS__CL_FIBONACCI_HPP_\n\n#include \"action_tutorials_interfaces/action/fibonacci.hpp\"\n#include \"smacc2/client_bases/smacc_action_client_base.hpp\"\n#include \"smacc2/smacc.hpp\"\n\nnamespace robot_state_machine\n{\nclass ClFibonacci\n: public smacc2::client_bases::SmaccActionClientBase<action_tutorials_interfaces::action::Fibonacci>\n{\npublic:\n  using smacc2::client_bases::SmaccActionClientBase<\n    action_tutorials_interfaces::action::Fibonacci>::GoalHandle;\n  using smacc2::client_bases::SmaccActionClientBase<\n    action_tutorials_interfaces::action::Fibonacci>::ResultCallback;\n\n  typedef smacc2::SmaccSignal<void(const WrappedResult &)> FibonacciResultSignal;\n\n  ClFibonacci(std::string action_name = \"/fibonacci\")\n  : smacc2::client_bases::SmaccActionClientBase<action_tutorials_interfaces::action::Fibonacci>(\n      action_name)\n  {\n  }\n\n  virtual ~ClFibonacci() {}\n};\n}  // namespace robot_state_machine\n\n#endif  // ROBOT_STATE_MACHINE__CLIENTS__CL_FIBONACCI_HPP_\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/include/sm_simple_action_client/fibonacci_action_client/client_behaviors/cb_fibonacci.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#ifndef ROBOT_STATE_MACHINE__CLIENTS__CB_FIBONACCI_HPP_\n#define ROBOT_STATE_MACHINE__CLIENTS__CB_FIBONACCI_HPP_\n\n#include <smacc2/smacc_asynchronous_client_behavior.hpp>\n#include \"sm_simple_action_client/fibonacci_action_client/cl_fibonacci.hpp\"\n\nnamespace robot_state_machine\n{\nclass CbFibonacci : public smacc2::SmaccAsyncClientBehavior\n{\npublic:\n  CbFibonacci() {}\n  // virtual ~CbFibonacci();\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    this->requiresClient(cl_fibonacci_);\n    smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation<TOrthogonal, TSourceObject>();\n  }\n\n  void onEntry() override\n  {\n    ClFibonacci::Goal goal;\n    goal.order = 10;\n\n    fibonacciCallback_ = std::make_shared<ClFibonacci::FibonacciResultSignal>();\n    this->getStateMachine()->createSignalConnection(\n      *fibonacciCallback_, &CbFibonacci::onFibonacciResult, this);\n    goalHandleFuture_ = cl_fibonacci_->sendGoal(goal, fibonacciCallback_);\n  }\n  void onExit() override { cl_fibonacci_->cancelGoal(); }\n\nprivate:\n  void onFibonacciResult(const ClFibonacci::WrappedResult & result)\n  {\n    if (result.code == rclcpp_action::ResultCode::SUCCEEDED)\n      onFibonacciActionSuccess();\n    else\n      onFibonacciActionAbort();\n  }\n  void onFibonacciActionSuccess() { this->postSuccessEvent(); }\n  void onFibonacciActionAbort() { this->postFailureEvent(); }\n\n  ClFibonacci * cl_fibonacci_;\n  ClFibonacci::FibonacciResultSignal::SharedPtr fibonacciCallback_;\n  rclcpp_action::ResultCode fibonacciResult_;\n  std::shared_future<std::shared_ptr<\n    rclcpp_action::ClientGoalHandle<action_tutorials_interfaces::action::Fibonacci> > >\n    goalHandleFuture_;\n};\n}  // namespace robot_state_machine\n\n#endif  // ROBOT_STATE_MACHINE__CLIENTS__CB_FIBONACCI_HPP_\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/include/sm_simple_action_client/mode_selection_client/cl_mode_select.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n*\n\nAuthor: Sukhraj Klair\n******************************************************************************************************************/\n\n#ifndef ROBOT_STATE_MACHINE__CLIENTS__CL_MODE_SELECT_HPP_\n#define ROBOT_STATE_MACHINE__CLIENTS__CL_MODE_SELECT_HPP_\n\n#include \"example_interfaces/msg/int32.hpp\"\n#include \"smacc2/client_bases/smacc_subscriber_client.hpp\"\n\nnamespace robot_state_machine\n{\n\nusing namespace smacc2::client_bases;\n\n//declare the events\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvAutonomousMode : sc::event<EvAutonomousMode<TSource, TOrthogonal>>\n{\n};\n\ntemplate <typename TSource, typename TOrthogonal>\nstruct EvManualMode : sc::event<EvManualMode<TSource, TOrthogonal>>\n{\n};\n\nclass ClModeSelect : public SmaccSubscriberClient<example_interfaces::msg::Int32>\n{\npublic:\n  ClModeSelect() : SmaccSubscriberClient<example_interfaces::msg::Int32>(\"mode_command\") {}\n\n  template <typename TOrthogonal, typename TSourceObject>\n  void onStateOrthogonalAllocation()\n  {\n    post_autonomous_mode_event_ = [this]()\n    {\n      RCLCPP_INFO(getLogger(), \"ClModeSelect::post_autonomous_mode_event_\");\n      // auto event = new EvAutonomousMode<TSourceObject, TOrthogonal>();\n      this->postEvent<EvAutonomousMode<TSourceObject, TOrthogonal>>();\n    };\n    post_manual_mode_event_ = [this]()\n    {\n      RCLCPP_INFO(getLogger(), \"ClModeSelect::post_manual_mode_event_\");\n      // auto event = new EvManualMode<TSourceObject, TOrthogonal>();\n      this->postEvent<EvManualMode<TSourceObject, TOrthogonal>>();\n    };\n\n    SmaccSubscriberClient<example_interfaces::msg::Int32>::onStateOrthogonalAllocation<\n      TOrthogonal, TSourceObject>();\n  }\n\n  std::function<void()> post_manual_mode_event_;\n  std::function<void()> post_autonomous_mode_event_;\n};\n\n}  // namespace robot_state_machine\n\n#endif\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/include/sm_simple_action_client/mode_selection_client/client_behaviors/cb_mode_select.hpp",
    "content": "\n// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n*\n\nAuthor: Sukhraj Klair\n******************************************************************************************************************/\n\n#ifndef ROBOT_STATE_MACHINE__CLIENTS__CB_MODE_SELECT_HPP_\n#define ROBOT_STATE_MACHINE__CLIENTS__CB_MODE_SELECT_HPP_\n\n#include \"sm_simple_action_client/mode_selection_client/cl_mode_select.hpp\"\n#include \"smacc2/client_behaviors/cb_subscription_callback_base.hpp\"\nnamespace robot_state_machine\n{\n\nusing namespace smacc2::client_behaviors;\n\nclass CbModeSelect : public CbSubscriptionCallbackBase<example_interfaces::msg::Int32>\n{\npublic:\n  CbModeSelect() {}\n  void onEntry() override\n  {\n    RCLCPP_INFO(getLogger(), \"CbModeSelect::onEntry()\");\n    this->requiresClient(mode_select_client_);\n    mode_select_client_->onFirstMessageReceived(&CbModeSelect::onFirstMessageReceived, this);\n    mode_select_client_->onMessageReceived(&CbModeSelect::onMessageReceived, this);\n  }\n  void onFirstMessageReceived(const example_interfaces::msg::Int32 & /*msg*/)\n  {\n    RCLCPP_INFO(getLogger(), \"CbModeSelect::onFirstMessageReceived()\");\n  }\n  void onMessageReceived(const example_interfaces::msg::Int32 & msg) override\n  {\n    if (msg.data == 0)\n    {\n      mode_select_client_->post_manual_mode_event_();\n      RCLCPP_INFO(getLogger(), \"CbModeSelect::onMessageReceived() - MANUAL\");\n    }\n    else if (msg.data == 1)\n    {\n      mode_select_client_->post_autonomous_mode_event_();\n      RCLCPP_INFO(getLogger(), \"CbModeSelect::onMessageReceived() - AUTONOMOUS\");\n    }\n  }\n\nprivate:\n  ClModeSelect * mode_select_client_;\n};\n}  // namespace robot_state_machine\n#endif  // ROBOT_STATE_MACHINE__CLIENTS__CB_MODE_SELECT_HPP_\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/include/sm_simple_action_client/orthogonals/or_fibonacci.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n*\n\nAuthor: Sukhraj Klair\n******************************************************************************************************************/\n\n#ifndef ROBOT__STATE_MACHINE__ORTHOGONALS__OR_FIBONACCI_HPP_\n#define ROBOT__STATE_MACHINE__ORTHOGONALS__OR_FIBONACCI_HPP_\n\n#include \"sm_simple_action_client/fibonacci_action_client/cl_fibonacci.hpp\"\n#include \"smacc2/smacc_orthogonal.hpp\"\n\nnamespace robot_state_machine\n{\n\nclass OrFibonacci : public smacc2::Orthogonal<OrFibonacci>\n{\npublic:\n  void onInitialize() override { auto fibonacci_action_client = this->createClient<ClFibonacci>(); }\n};\n}  // namespace robot_state_machine\n\n#endif  // ROBOT__STATE_MACHINE__ORTHOGONALS__OR_FIBONACCI_HPP_\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/include/sm_simple_action_client/orthogonals/or_mode_select.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/*****************************************************************************************************************\n*\n\nAuthor: Sukhraj Klair\n******************************************************************************************************************/\n\n#ifndef ROBOT_STATE_MACHINE__ORTHOGONALS__OR_MODE_SELECT_HPP_\n#define ROBOT_STATE_MACHINE__ORTHOGONALS__OR_MODE_SELECT_HPP_\n\n#include <sm_simple_action_client/mode_selection_client/cl_mode_select.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n\nnamespace robot_state_machine\n{\nclass OrModeSelect : public smacc2::Orthogonal<OrModeSelect>\n{\npublic:\n  void onInitialize() override { auto client = this->createClient<ClModeSelect>(); }\n};\n}  // namespace robot_state_machine\n\n#endif  // ROBOT_STATE_MACHINE__ORTHOGONALS__OR_MODE_SELECT_HPP_\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/include/sm_simple_action_client/sm_simple_action_client.hpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <memory>\n#include <string>\n\n#include \"smacc2/smacc.hpp\"\n\n//CLIENTS AND BEHAVIORS\n#include \"sm_simple_action_client/fibonacci_action_client/cl_fibonacci.hpp\"\n#include \"sm_simple_action_client/fibonacci_action_client/client_behaviors/cb_fibonacci.hpp\"\n#include \"sm_simple_action_client/mode_selection_client/cl_mode_select.hpp\"\n#include \"sm_simple_action_client/mode_selection_client/client_behaviors/cb_mode_select.hpp\"\n\n// ORTHOGONALS\n#include \"sm_simple_action_client/orthogonals/or_fibonacci.hpp\"\n#include \"sm_simple_action_client/orthogonals/or_mode_select.hpp\"\n\nnamespace robot_state_machine\n{\n// SMACC2 clases\n\n//STATES\nstruct StState1;\nstruct StState2;\nstruct StState3;\n\n//--------------------------------------------------------------------\n//STATE_MACHINE\nstruct SmSimpleActionClient : public smacc2::SmaccStateMachineBase<SmSimpleActionClient, StState1>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  void onInitialize() override\n  {\n    this->createOrthogonal<OrModeSelect>();\n    this->createOrthogonal<OrFibonacci>();\n  }\n};\n\n}  // namespace robot_state_machine\n\n//STATES\n#include \"states/st_state_1.hpp\"\n#include \"states/st_state_2.hpp\"\n#include \"states/st_state_3.hpp\"\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/include/sm_simple_action_client/states/st_state_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#ifndef ROBOT_STATE_MACHINE__STATES__ST_STATE_1_HPP_\n#define ROBOT_STATE_MACHINE__STATES__ST_STATE_1_HPP_\n\n#include \"smacc2/smacc.hpp\"\n\nnamespace robot_state_machine\n{\n\n//STATE DECLARATION\nstruct StState1 : smacc2::SmaccState<StState1, SmSimpleActionClient>\n{\n  using SmaccState::SmaccState;\n\n  //Declare custom object tags\n  struct AUTONOMOUS_MODE : SUCCESS\n  {\n  };\n  struct MANUAL_MODE : SUCCESS\n  {\n  };\n\n  //TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvAutonomousMode<ClModeSelect, OrModeSelect>, StState2, AUTONOMOUS_MODE> >\n    reactions;\n\n  //state functions\n  static void staticConfigure() { configure_orthogonal<OrModeSelect, CbModeSelect>(); }\n\n  void runtimeConfigure() {}\n};\n}  // namespace robot_state_machine\n\n#endif  // ROBOT_STATE_MACHINE__STATES__ST_STATE_1_HPP_\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/include/sm_simple_action_client/states/st_state_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#ifndef ROBOT_STATE_MACHINE__STATES__ST_STATE_2_HPP_\n#define ROBOT_STATE_MACHINE__STATES__ST_STATE_2_HPP_\n\n#include \"smacc2/smacc.hpp\"\n\nnamespace robot_state_machine\n{\n//STATE DECLARATION\nstruct StState2 : smacc2::SmaccState<StState2, SmSimpleActionClient>\n{\n    using SmaccState::SmaccState;\n\n    //Declare custom object tags\n    struct MANUAL_MODE: SUCCESS{};\n    struct START_PATROL: SUCCESS{};\n    struct STOP_PATROL: ABORT{};\n\n    //TRANSITION TABLE\n    typedef mpl::list<\n    smacc2::Transition<EvManualMode<ClModeSelect, OrModeSelect>, StState1, MANUAL_MODE>,\n    smacc2::Transition<smacc2::EvCbSuccess<CbFibonacci, OrFibonacci>, StState3>,\n    smacc2::Transition<smacc2::EvCbFailure<CbFibonacci, OrFibonacci>, StState2>\n    > reactions;\n\n    //state functions\n    static void staticConfigure()\n    {\n        configure_orthogonal<OrModeSelect, CbModeSelect>();\n        configure_orthogonal<OrFibonacci, CbFibonacci>();\n    }\n\n    void runtimeConfigure()\n    {\n\n    }\n\n    void onEntry()\n    {\n      RCLCPP_INFO(getLogger(), \" \");\n      RCLCPP_INFO(getLogger(), \"╔════════════════════════════════════════════════════════════════╗\");\n      RCLCPP_INFO(getLogger(), \"║     ENTERING StState2 - EXECUTING FIBONACCI ACTION             ║\");\n      RCLCPP_INFO(getLogger(), \"║                                                                ║\");\n      RCLCPP_INFO(getLogger(), \"║  Sending Fibonacci(order=10) goal to action server...          ║\");\n      RCLCPP_INFO(getLogger(), \"║  On success → transition to StState3                           ║\");\n      RCLCPP_INFO(getLogger(), \"║  On failure → stay in StState2                                 ║\");\n      RCLCPP_INFO(getLogger(), \"╚════════════════════════════════════════════════════════════════╝\");\n      RCLCPP_INFO(getLogger(), \" \");\n    }\n};\n\n} // namespace robot_state_machine\n\n#endif  // ROBOT_STATE_MACHINE__STATES__ST_STATE_2_HPP_\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/include/sm_simple_action_client/states/st_state_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#ifndef ROBOT_STATE_MACHINE__STATES__ST_STATE_3_HPP_\n#define ROBOT_STATE_MACHINE__STATES__ST_STATE_3_HPP_\n\n#include \"smacc2/smacc.hpp\"\n\nnamespace robot_state_machine\n{\n// STATE DECLARATION\nstruct StState3 : smacc2::SmaccState<StState3, SmSimpleActionClient>\n{\n  using SmaccState::SmaccState;\n\n  // Declare custom object tags\n  struct MANUAL_MODE : SUCCESS {};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n    smacc2::Transition<EvManualMode<ClModeSelect, OrModeSelect>, StState1, MANUAL_MODE>\n  > reactions;\n\n  // State functions\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrModeSelect, CbModeSelect>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \" \");\n    RCLCPP_INFO(getLogger(), \"╔════════════════════════════════════════════════════════════════╗\");\n    RCLCPP_INFO(getLogger(), \"║     FIBONACCI ACTION COMPLETED SUCCESSFULLY!                   ║\");\n    RCLCPP_INFO(getLogger(), \"║                                                                ║\");\n    RCLCPP_INFO(getLogger(), \"║  The state machine has reached StState3                        ║\");\n    RCLCPP_INFO(getLogger(), \"║  Fibonacci calculation completed.                              ║\");\n    RCLCPP_INFO(getLogger(), \"║                                                                ║\");\n    RCLCPP_INFO(getLogger(), \"║  To return to StState1, publish:                               ║\");\n    RCLCPP_INFO(getLogger(), \"║  ros2 topic pub /mode_command example_interfaces/msg/Int32 \\\\   ║\");\n    RCLCPP_INFO(getLogger(), \"║      \\\"{data: 0}\\\" --once                                        ║\");\n    RCLCPP_INFO(getLogger(), \"╚════════════════════════════════════════════════════════════════╝\");\n    RCLCPP_INFO(getLogger(), \" \");\n  }\n};\n\n}  // namespace robot_state_machine\n\n#endif  // ROBOT_STATE_MACHINE__STATES__ST_STATE_3_HPP_\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/launch/sm_simple_action_client.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\nfrom datetime import datetime\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\nfrom launch.substitutions import PathJoinSubstitution\nfrom launch_ros.substitutions import FindPackageShare\n\n\ndef setup_log_directory():\n    \"\"\"\n    Creates timestamped log directory with error handling.\n    Returns: (log_dir_path, timestamp) tuple\n    \"\"\"\n    timestamp = datetime.now().strftime(\"%Y-%m-%d-%H-%M-%S\")\n\n    # Primary log directory location\n    log_dir = os.path.join(\n        os.path.expanduser(\"~\"), \".ros\", \"log\", f\"{timestamp}-sm_simple_action_client\"\n    )\n\n    try:\n        os.makedirs(log_dir, mode=0o755, exist_ok=True)\n        print(f\"[Launch] Log directory created: {log_dir}\")\n        return log_dir, timestamp\n    except PermissionError as e:\n        # Fallback to /tmp if ~/.ros is not writable\n        fallback_dir = os.path.join(\"/tmp\", \"sm_simple_action_client_logs\", timestamp)\n        print(f\"[Launch] WARNING: Cannot create log directory at {log_dir}\")\n        print(f\"[Launch] Permission denied: {e}\")\n        print(f\"[Launch] Using fallback directory: {fallback_dir}\")\n        try:\n            os.makedirs(fallback_dir, mode=0o755, exist_ok=True)\n            return fallback_dir, timestamp\n        except Exception as fallback_error:\n            print(f\"[Launch] ERROR: Cannot create fallback directory: {fallback_error}\")\n            print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n            return None, timestamp\n    except OSError as e:\n        print(f\"[Launch] ERROR: Failed to create log directory: {e}\")\n        print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n        return None, timestamp\n\n\ndef generate_launch_description():\n    # Setup logging directory\n    log_dir, timestamp = setup_log_directory()\n\n    # Config file path\n    config_file = PathJoinSubstitution(\n        [\n            FindPackageShare(\"sm_simple_action_client\"),\n            \"config\",\n            \"simple_action_client_example_config.yaml\",\n        ]\n    )\n\n    # Construct logging prefix for Fibonacci action server\n    if log_dir:\n        fibonacci_log = os.path.join(log_dir, f\"fibonacci_action_server_{timestamp}.log\")\n        fibonacci_prefix = f\"konsole --hold -p tabtitle='Fibonacci Action Server' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {fibonacci_log}; exec bash' -- \"\n    else:\n        fibonacci_prefix = \"konsole --hold -p tabtitle='Fibonacci Action Server' -e\"\n\n    # Construct logging prefix for state machine node\n    if log_dir:\n        state_machine_log = os.path.join(log_dir, f\"sm_simple_action_client_node_{timestamp}.log\")\n        state_machine_prefix = f\"konsole --hold -p tabtitle='SM Simple Action Client' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {state_machine_log}; exec bash' -- \"\n    else:\n        state_machine_prefix = \"konsole --hold -p tabtitle='SM Simple Action Client' -e\"\n\n    # Construct logging prefix for auto-trigger node\n    if log_dir:\n        trigger_log = os.path.join(log_dir, f\"auto_mode_trigger_{timestamp}.log\")\n        trigger_prefix = f\"konsole --hold -p tabtitle='Auto Mode Trigger' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {trigger_log}; exec bash' -- \"\n    else:\n        trigger_prefix = \"konsole --hold -p tabtitle='Auto Mode Trigger' -e\"\n\n    return LaunchDescription(\n        [\n            # Start Fibonacci action server\n            Node(\n                package=\"action_tutorials_cpp\",\n                executable=\"fibonacci_action_server\",\n                name=\"fibonacci_action_server\",\n                output=\"screen\",\n                prefix=fibonacci_prefix,\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n            # Start state machine\n            Node(\n                package=\"sm_simple_action_client\",\n                executable=\"sm_simple_action_client_node\",\n                name=\"sm_simple_action_client\",\n                output=\"screen\",\n                parameters=[config_file],\n                prefix=state_machine_prefix,\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n            # Auto-trigger autonomous mode after delay\n            Node(\n                package=\"sm_simple_action_client\",\n                executable=\"auto_mode_trigger.py\",\n                name=\"auto_mode_trigger\",\n                output=\"screen\",\n                prefix=trigger_prefix,\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n        ]\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_simple_action_client</name>\n  <version>3.0.1</version>\n  <description>The sm_simple_action_client package</description>\n  <maintainer email=\"brett@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n  <license>MyLicense</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>libboost-thread-dev</depend>\n\n  <depend>action_tutorials_interfaces</depend>\n  <depend>smacc2</depend>\n  <depend>std_msgs</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/scripts/auto_mode_trigger.py",
    "content": "#!/usr/bin/env python3\n# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"\nAuto-triggers the state machine transition for demo purposes.\nPublishes autonomous mode command after a delay.\n\"\"\"\nimport time\nimport rclpy\nfrom rclpy.node import Node\nfrom example_interfaces.msg import Int32\n\n\nclass AutoModeTrigger(Node):\n    def __init__(self):\n        super().__init__(\"auto_mode_trigger\")\n        self.publisher = self.create_publisher(Int32, \"mode_command\", 10)\n\n        # Wait for state machine to initialize\n        self.get_logger().info(\n            \"╔════════════════════════════════════════════════════════════════╗\"\n        )\n        self.get_logger().info(\"║  AUTO MODE TRIGGER - Waiting 3 seconds for SM initialization  ║\")\n        self.get_logger().info(\n            \"╚════════════════════════════════════════════════════════════════╝\"\n        )\n        time.sleep(3.0)\n\n        # Publish autonomous mode command\n        msg = Int32()\n        msg.data = 1  # Autonomous mode\n        self.publisher.publish(msg)\n        self.get_logger().info(\" \")\n        self.get_logger().info(\n            \"╔════════════════════════════════════════════════════════════════╗\"\n        )\n        self.get_logger().info(\n            \"║  ✓ Published AUTONOMOUS mode command (data=1)                  ║\"\n        )\n        self.get_logger().info(\n            \"║  State machine should transition: StState1 → StState2          ║\"\n        )\n        self.get_logger().info(\n            \"╚════════════════════════════════════════════════════════════════╝\"\n        )\n        self.get_logger().info(\" \")\n\n        # Schedule shutdown after publishing\n        time.sleep(1.0)\n        self.get_logger().info(\"Auto-trigger complete. Node shutting down.\")\n        # Create a timer to shutdown after allowing message to be sent\n        self.create_timer(0.5, lambda: rclpy.shutdown())\n\n\ndef main():\n    rclpy.init()\n    node = AutoModeTrigger()\n    try:\n        rclpy.spin(node)\n    except (KeyboardInterrupt, rclpy.executors.ExternalShutdownException):\n        pass\n    finally:\n        node.destroy_node()\n        if rclpy.ok():\n            rclpy.shutdown()\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_simple_action_client/src/sm_simple_action_client/sm_simple_action_client_node.cpp",
    "content": "// Copyright 2021 MyName/MyCompany Inc.\n// Copyright 2025 Robosoft Inc. (template)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_simple_action_client/sm_simple_action_client.hpp>\n\n//--------------------------------------------------------------------\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<robot_state_machine::SmSimpleActionClient>();\n}\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/CHANGELOG.rst",
    "content": "Changelog for package sm_three_some\n=======================================\n\n2.3.16 (2023-07-16)\n-------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2` repository\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted to fix an issue with ros buildfarm\n  - Addressed buildfarm issue\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n- Contributors: brettpac, pabloinigoblasco\n\n2.3.6 (2023-03-12)\n------------------\n\n1.22.1 (2022-11-09)\n-------------------\n### Added\n- Pre-release\n- Contributors: pabloinigoblasco\n\n### Changed\n- Reverted \"Ignore packages which should not be released.\"\n- Contributors: Denis Štogl\n\n0.3.0 (2022-04-04)\n------------------\n\n0.0.0 (2022-11-09)\n------------------\n### Added\n- Reverted \"Ignore packages which should not be released.\"\n- Ignored packages not meant for release\n- Galactic type walker (#264)\n- Feature/master rolling to galactic backport (#236)\n  - Updated references from SMACC/ROS to SMACC2/ROS2\n  - Progress on navigation rolling\n  - Renamed folders, deleted tracing.md, edited README.md\n  - Added smacc2_performance_tools\n  - Improved performance tests\n  - Cleaned up sm_respira_1 format\n  - Optimized dependencies in move_base_z_planners_common\n  - Renamed event generator library\n  - Updated CI setup and renamed rolling files\n  - Fixed source CI and corrected README overview\n  - Updated launch command to ros2 launch sm_respira_1 sm_respira_1.launch\n  - Updated doxygen links\n  - Added new feature, cb_wait_topic_message\n  - Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic\n  - Corrected all linters and formatters\n- Co-authored-by: Ubuntu 20-04-02-amd64 <brett@robosoft.ai>\n- Co-authored-by: Denis Štogl <denis@stogl.de>\n- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n- Contributors: brettpac\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sm_three_some)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\nfind_package(std_msgs REQUIRED)\nfind_package(smacc2_msgs REQUIRED)\nfind_package(cl_generic_sensor REQUIRED)\nfind_package(sr_all_events_go REQUIRED)\nfind_package(cl_ros2_timer REQUIRED)\nfind_package(cl_keyboard REQUIRED)\nfind_package(rclcpp REQUIRED)\nfind_package(Boost COMPONENTS thread REQUIRED)\n\nset(dependencies\n  smacc2\n  std_msgs\n  smacc2_msgs\n  cl_generic_sensor\n  sr_all_events_go\n  cl_ros2_timer\n  cl_keyboard\n  rclcpp\n)\n\nadd_executable(${PROJECT_NAME}_node src/sm_three_some_node.cpp)\ntarget_include_directories(${PROJECT_NAME}_node PUBLIC include)\nament_target_dependencies(${PROJECT_NAME}_node\n  ${dependencies}\n)\ntarget_link_libraries(${PROJECT_NAME}_node\n  ${Boost_LIBRARIES}\n)\n\ninstall(DIRECTORY\n  launch\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(DIRECTORY\n  config\n  DESTINATION share/${PROJECT_NAME}\n)\n\ninstall(\n  TARGETS ${PROJECT_NAME}_node\n  DESTINATION lib/${PROJECT_NAME}\n)\n\nament_package()\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/README.md",
    "content": " <h2>State Machine Diagram</h2>\n\n ![sm_three_some](docs/SmThreeSome_2021-10-18_102812.svg)\n\n <h2>Description</h2> A simple, but complete state machine example. We highly recommend using this example as a starting point for users' state machine projects.<br></br>\n\n <h2>Build Instructions</h2>\n\nFirst, source your ros2 installation.\n```\nsource /opt/ros/jazzy/setup.bash\n```\n\nBefore you build, make sure you've installed all the dependencies...\n\n```\nrosdep install --ignore-src --from-paths src -y -r\n```\n\nThen build with colcon build...\n\n```\ncolcon build\n```\n<h2>Operating Instructions</h2>\nAfter you build, remember to source the workspace...\n\n```\nsource install/setup.bash\n```\n\nAnd then run the launch file...\n\n```\nros2 launch sm_three_some sm_three_some.py\n```\n\n <h2>Viewer Instructions</h2>\nIf you have the SMACC2 Runtime Analyzer installed then type...\n\n```\nros2 run smacc2_rta smacc2_rta\n```\n\nIf you don't have the SMACC2 Runtime Analyzer click <a href=\"https://robosoft.ai/product-category/smacc2-runtime-analyzer/\">here</a>.\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/config/sm_three_some_config.yaml",
    "content": "global_parameter_server:\n    ros__parameters:\n        signal_detector_loop_freq: 20\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/clients/cl_subscriber/cl_subscriber.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <cl_generic_sensor/cl_generic_sensor.hpp>\n\n#include <std_msgs/msg/int16.hpp>\n\nnamespace sm_three_some\n{\nnamespace cl_subscriber\n{\n// Component-based subscriber client using ClGenericSensor\n// This demonstrates the pure component-based architecture\nclass ClSubscriber : public cl_generic_sensor::ClGenericSensor<std_msgs::msg::UInt16>\n{\npublic:\n  ClSubscriber()\n  {\n    // Configure the topic to subscribe to\n    // Note: This subscribes to the keyboard unicode topic for testing\n    this->topicName_ = \"/keyboard_unicode\";\n\n    // Optional: Configure timeout for watchdog functionality\n    // Uncomment the line below to enable 5-second timeout\n    // this->timeout_ = rclcpp::Duration(5, 0);\n  }\n};\n}  // namespace cl_subscriber\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/clients/cl_subscriber/client_behaviors/cb_default_subscriber_behavior.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <sm_three_some/clients/cl_subscriber/cl_subscriber.hpp>\n#include <cl_generic_sensor/client_behaviors/cb_default_generic_sensor_behavior.hpp>\n\nnamespace sm_three_some\n{\nnamespace cl_subscriber\n{\n// Component-based default subscriber behavior\n// Uses the multirole sensor behavior for component-based architecture\nclass CbDefaultSubscriberBehavior\n  : public cl_generic_sensor::CbDefaultGenericSensorBehavior<ClSubscriber>\n{\npublic:\n  typedef std_msgs::msg::UInt16 TMessageType;\n\n  void onEntry() override\n  {\n    // Call base class onEntry to setup component connections\n    cl_generic_sensor::CbDefaultGenericSensorBehavior<ClSubscriber>::onEntry();\n\n    RCLCPP_INFO(getLogger(), \"[CbDefaultSubscriberBehavior] Behavior active\");\n  }\n};\n}  // namespace cl_subscriber\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/clients/cl_subscriber/client_behaviors/cb_watchdog_subscriber_behavior.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <sm_three_some/clients/cl_subscriber/cl_subscriber.hpp>\n#include <cl_generic_sensor/client_behaviors/cb_default_generic_sensor_behavior.hpp>\n\nnamespace sm_three_some\n{\nnamespace cl_subscriber\n{\n// Watchdog subscriber behavior with timeout monitoring\n// Uses the multirole sensor behavior for component-based architecture\nclass CbWatchdogSubscriberBehavior\n  : public cl_generic_sensor::CbDefaultGenericSensorBehavior<ClSubscriber>\n{\npublic:\n  typedef std_msgs::msg::UInt16 TMessageType;\n\n  void onEntry() override\n  {\n    // Call base class onEntry to setup component connections\n    cl_generic_sensor::CbDefaultGenericSensorBehavior<ClSubscriber>::onEntry();\n\n    RCLCPP_INFO(getLogger(), \"[CbWatchdogSubscriberBehavior] Watchdog behavior active\");\n\n    // The timeout monitoring is handled automatically by the CpMessageTimeout component\n    // if it was configured in the ClSubscriber client\n  }\n};\n}  // namespace cl_subscriber\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/mode_states/ms_recover.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\nnamespace sm_three_some\n{\n// STATE DECLARATION\nclass MsRecover : public smacc2::SmaccState<MsRecover, SmThreeSome>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvToDeep, smacc2::deep_history<typename MsRun::LastDeepState>, SUCCESS>\n\n    >reactions;\n};\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/mode_states/ms_run.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/smacc.hpp>\nnamespace sm_three_some\n{\n// STATE DECLARATION\nclass MsRun : public smacc2::SmaccState<MsRun, SmThreeSome, StState1>\n{\npublic:\n  using SmaccState::SmaccState;\n};\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/orthogonals/or_keyboard.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\nnamespace sm_three_some\n{\nclass OrKeyboard : public smacc2::Orthogonal<OrKeyboard>\n{\npublic:\n  void onInitialize() override { auto clKeyboard = this->createClient<cl_keyboard::ClKeyboard>(); }\n};\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/orthogonals/or_subscriber.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <sm_three_some/clients/cl_subscriber/cl_subscriber.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n\nnamespace sm_three_some\n{\nusing namespace sm_three_some::cl_subscriber;\n\nclass OrSubscriber : public smacc2::Orthogonal<OrSubscriber>\n{\npublic:\n  void onInitialize() override { auto subscriber_client = this->createClient<ClSubscriber>(); }\n};\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/orthogonals/or_timer.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n#include <smacc2/smacc_orthogonal.hpp>\n\nnamespace sm_three_some\n{\nusing namespace std::chrono_literals;\nclass OrTimer : public smacc2::Orthogonal<OrTimer>\n{\npublic:\n  void onInitialize() override\n  {\n    auto actionclient = this->createClient<cl_ros2_timer::ClRos2Timer>(500ms);\n  }\n};\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/sm_three_some.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n\n#include <smacc2/smacc.hpp>\n\n// CLIENTS\n#include <cl_keyboard/cl_keyboard.hpp>\n#include <cl_ros2_timer/cl_ros2_timer.hpp>\n\n// ORTHOGONALS\n#include <sm_three_some/orthogonals/or_keyboard.hpp>\n#include <sm_three_some/orthogonals/or_subscriber.hpp>\n#include <sm_three_some/orthogonals/or_timer.hpp>\n\nusing namespace cl_ros2_timer;\nusing namespace cl_keyboard;\nusing namespace sm_three_some::cl_subscriber;\n\n// CLIENT BEHAVIORS\n#include <cl_keyboard/client_behaviors/cb_default_keyboard_behavior.hpp>\n\n#include <sm_three_some/clients/cl_subscriber/client_behaviors/cb_default_subscriber_behavior.hpp>\n#include <sm_three_some/clients/cl_subscriber/client_behaviors/cb_watchdog_subscriber_behavior.hpp>\n\n//#include <cl_ros2_timer/client_behaviors/cb_ros_timer.hpp>\n#include <cl_ros2_timer/client_behaviors/cb_timer_countdown_once.hpp>\n\n// STATE REACTORS\n#include <sr_all_events_go/sr_all_events_go.hpp>\n\nusing namespace smacc2;\nusing namespace smacc2::state_reactors;\nusing namespace smacc2::default_events;\n\nnamespace sm_three_some\n{\n// SUPERSTATES\nnamespace SS1\n{\nclass Ss1;\n}  // namespace SS1\n\n// SUPERSTATES\nnamespace SS2\n{\nclass Ss2;\n}  // namespace SS2\n\n// STATES\nclass StState1;  // first state specially needs a forward declaration\nclass StState2;\nclass StState3;\nclass StState4;\n\nclass MsRun;\nclass MsRecover;\n\nstruct EvToDeep : sc::event<EvToDeep>\n{\n};\n\nstruct EvFail : sc::event<EvFail>\n{\n};\n\n// STATE MACHINE\nstruct SmThreeSome : public smacc2::SmaccStateMachineBase<SmThreeSome, MsRun>\n{\n  using SmaccStateMachineBase::SmaccStateMachineBase;\n\n  void onInitialize() override\n  {\n    this->createOrthogonal<OrTimer>();\n    this->createOrthogonal<OrKeyboard>();\n    this->createOrthogonal<OrSubscriber>();\n  }\n};\n}  // namespace sm_three_some\n\n// MODE STATES\n#include <sm_three_some/mode_states/ms_run.hpp>\n\n#include <sm_three_some/mode_states/ms_recover.hpp>\n\n// STATES\n#include <sm_three_some/states/st_state_1.hpp>\n#include <sm_three_some/states/st_state_2.hpp>\n#include <sm_three_some/states/st_state_3.hpp>\n#include <sm_three_some/states/st_state_4.hpp>\n#include <sm_three_some/superstates/ss_superstate_1.hpp>\n#include <sm_three_some/superstates/ss_superstate_2.hpp>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/states/inner_states/sti_state_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_three_some\n{\nnamespace inner_states\n{\n// STATE DECLARATION\nstruct StiState1 : smacc2::SmaccState<StiState1, SS>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopContinue<StiState1>, StiState2, CONTINUELOOP>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n\n  bool loopWhileCondition()\n  {\n    auto & superstate = this->context<SS>();\n\n    RCLCPP_INFO(\n      getLogger(), \"Loop start, current iterations: %d, total iterations: %d\",\n      superstate.iteration_count, superstate.total_iterations());\n    return superstate.iteration_count++ < superstate.total_iterations();\n  }\n\n  void onEntry()\n  {\n    RCLCPP_INFO(getLogger(), \"LOOP START ON ENTRY\");\n    checkWhileLoopConditionAndThrowEvent(&StiState1::loopWhileCondition);\n  }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace inner_states\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/states/inner_states/sti_state_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_three_some\n{\nnamespace inner_states\n{\n// STATE DECLARATION\nstruct StiState2 : smacc2::SmaccState<StiState2, SS>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiState3, TIMEOUT>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiState3, NEXT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiState1, PREVIOUS>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace inner_states\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/states/inner_states/sti_state_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_three_some\n{\nnamespace inner_states\n{\n// STATE DECLARATION\nstruct StiState3 : smacc2::SmaccState<StiState3, SS>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StiState1, TIMEOUT>,\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StiState2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StiState1, NEXT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace inner_states\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/states/st_state_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_three_some\n{\n// STATE DECLARATION\nstruct StState1 : smacc2::SmaccState<StState1, MsRun>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StState2, TIMEOUT>,\n    Transition<EvTopicMessage<ClSubscriber, OrSubscriber>, StState2, TIMEOUT>,\n    // Keyboard events\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, SS1::Ss1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StState2, NEXT>,\n    Transition<EvFail, MsRecover, smacc2::ABORT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/states/st_state_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_three_some\n{\n// STATE DECLARATION\nstruct StState2 : smacc2::SmaccState<StState2, MsRun>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, StState3, TIMEOUT>,\n    Transition<EvAllGo<SrAllEventsGo>, StState3>,\n    // Keyboard events\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StState1, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StState3, NEXT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n\n    // Create State Reactor\n    // auto sbAll = static_createStateReactor<SrAllEventsGo>();\n\n    auto sbAll = static_createStateReactor<\n      smacc2::state_reactors::SrAllEventsGo, smacc2::state_reactors::EvAllGo<SrAllEventsGo>,\n      mpl::list<\n        EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>,\n        EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>,\n        EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>>>();\n\n    /*\n    sbAll->addInputEvent<EvKeyPressA<CbDefaultKeyboardBehavior, OrKeyboard>>();\n    sbAll->addInputEvent<EvKeyPressB<CbDefaultKeyboardBehavior, OrKeyboard>>();\n    sbAll->addInputEvent<EvKeyPressC<CbDefaultKeyboardBehavior, OrKeyboard>>();\n    sbAll->setOutputEvent<EvAllGo<SrAllEventsGo>>();\n    */\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/states/st_state_3.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_three_some\n{\n// STATE DECLARATION\nstruct StState3 : smacc2::SmaccState<StState3, MsRun>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n  struct PREVIOUS : ABORT{};\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, SS1::Ss1, TIMEOUT>,\n    // Transition<smacc2::EvTopicMessage<CbWatchdogSubscriberBehavior, OrSubscriber>, SS1::Ss1>,\n    // Keyboard events\n    Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StState2, PREVIOUS>,\n    Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, SS1::Ss1, NEXT>\n\n    >reactions;\n\n  // STATE FUNCTIONS\n  static void staticConfigure()\n  {\n    configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10);\n    configure_orthogonal<OrSubscriber, CbWatchdogSubscriberBehavior>();\n    configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();\n  }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/states/st_state_4.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_three_some\n{\n// STATE DECLARATION\nstruct StState4 : smacc2::SmaccState<StState4, MsRun>\n{\n  using SmaccState::SmaccState;\n\n  // DECLARE CUSTOM OBJECT TAGS\n  struct TIMEOUT : ABORT{};\n  struct NEXT : SUCCESS{};\n\n  typedef mpl::list<Transition<EvTimer<CbTimerCountdownOnce, OrTimer>, SS1::Ss1, TIMEOUT>>transitions;\n\n  struct PREVIOUS : ABORT{};\n\n  // STATE FUNCTIONS\n  static void staticConfigure() { configure_orthogonal<OrTimer, CbTimerCountdownOnce>(10); }\n\n  void runtimeConfigure() {}\n\n  void onEntry() { RCLCPP_INFO(getLogger(), \"On Entry!\"); }\n\n  void onExit() { RCLCPP_INFO(getLogger(), \"On Exit!\"); }\n};\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/superstates/ss_superstate_1.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_three_some\n{\nnamespace SS1\n{\nnamespace sm_three_some\n{\nnamespace inner_states\n{\n// FORWARD DECLARATIONS OF ALL INNER STATES\nclass StiState1;\nclass StiState2;\nclass StiState3;\n}  // namespace inner_states\n}  // namespace sm_three_some\n\nusing namespace sm_three_some::inner_states;\n\n// STATE DECLARATION\nstruct Ss1 : smacc2::SmaccState<Ss1, MsRun, StiState1>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiState1>, SS2::Ss2>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 5; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS4\n\n// forward declaration for the superstate\nusing SS = SS1::Ss1;\n\n#include <sm_three_some/states/inner_states/sti_state_1.hpp>\n#include <sm_three_some/states/inner_states/sti_state_2.hpp>\n#include <sm_three_some/states/inner_states/sti_state_3.hpp>\n\n}  // namespace SS1\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/include/sm_three_some/superstates/ss_superstate_2.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nnamespace sm_three_some\n{\nnamespace SS2\n{\nnamespace sm_three_some\n{\nnamespace inner_states\n{\n// FORWARD DECLARATIONS OF ALL INNER STATES\nclass StiState1;\nclass StiState2;\nclass StiState3;\n}  // namespace inner_states\n}  // namespace sm_three_some\n\nusing namespace sm_three_some::inner_states;\n\n// STATE DECLARATION\nstruct Ss2 : smacc2::SmaccState<Ss2, MsRun, StiState1>\n{\npublic:\n  using SmaccState::SmaccState;\n\n  // TRANSITION TABLE\n  typedef mpl::list<\n\n    Transition<EvLoopEnd<StiState1>, StState4>\n\n    >reactions;\n\n  // STATE VARIABLES\n  static constexpr int total_iterations() { return 5; }\n  int iteration_count = 0;\n\n  // STATE FUNCTIONS\n  static void staticConfigure() {}\n\n  void runtimeConfigure() {}\n};  // namespace SS4\n\n// forward declaration for the superstate\nusing SS = SS2::Ss2;\n\n#include <sm_three_some/states/inner_states/sti_state_1.hpp>\n#include <sm_three_some/states/inner_states/sti_state_2.hpp>\n#include <sm_three_some/states/inner_states/sti_state_3.hpp>\n\n}  // namespace SS2\n}  // namespace sm_three_some\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/launch/sm_three_some.py",
    "content": "# Copyright 2025 Robosoft Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\nfrom datetime import datetime\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\n\ndef setup_log_directory():\n    \"\"\"\n    Creates timestamped log directory with error handling.\n    Returns: (log_dir_path, timestamp) tuple\n    \"\"\"\n    timestamp = datetime.now().strftime(\"%Y-%m-%d-%H-%M-%S\")\n\n    # Primary log directory location\n    log_dir = os.path.join(os.path.expanduser(\"~\"), \".ros\", \"log\", f\"{timestamp}-sm_three_some\")\n\n    try:\n        os.makedirs(log_dir, mode=0o755, exist_ok=True)\n        print(f\"[Launch] Log directory created: {log_dir}\")\n        return log_dir, timestamp\n    except PermissionError as e:\n        # Fallback to /tmp if ~/.ros is not writable\n        fallback_dir = os.path.join(\"/tmp\", \"sm_three_some_logs\", timestamp)\n        print(f\"[Launch] WARNING: Cannot create log directory at {log_dir}\")\n        print(f\"[Launch] Permission denied: {e}\")\n        print(f\"[Launch] Using fallback directory: {fallback_dir}\")\n        try:\n            os.makedirs(fallback_dir, mode=0o755, exist_ok=True)\n            return fallback_dir, timestamp\n        except Exception as fallback_error:\n            print(f\"[Launch] ERROR: Cannot create fallback directory: {fallback_error}\")\n            print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n            return None, timestamp\n    except OSError as e:\n        print(f\"[Launch] ERROR: Failed to create log directory: {e}\")\n        print(f\"[Launch] Logs will only be displayed in konsole terminals\")\n        return None, timestamp\n\n\ndef generate_launch_description():\n    # Setup logging directory\n    log_dir, timestamp = setup_log_directory()\n\n    # Construct logging prefix for state machine node\n    if log_dir:\n        state_machine_log = os.path.join(log_dir, f\"state_machine_{timestamp}.log\")\n        state_machine_prefix = f\"konsole --hold -p tabtitle='SM Three Some' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {state_machine_log}; exec bash' -- \"\n    else:\n        state_machine_prefix = \"konsole --hold -p tabtitle='SM Three Some' -e\"\n\n    # Construct logging prefix for keyboard server node\n    if log_dir:\n        keyboard_log = os.path.join(log_dir, f\"keyboard_server_{timestamp}.log\")\n        keyboard_prefix = f\"konsole --hold -p tabtitle='Keyboard Server' -e bash -c 'RCUTILS_COLORIZED_OUTPUT=1 \\\"$@\\\" 2>&1 | tee {keyboard_log}; exec bash' -- \"\n    else:\n        keyboard_prefix = \"konsole --hold -p tabtitle='Keyboard Server' -e\"\n\n    return LaunchDescription(\n        [\n            Node(\n                package=\"sm_three_some\",\n                executable=\"sm_three_some_node\",\n                name=\"sm_three_some\",\n                output=\"screen\",\n                prefix=state_machine_prefix,\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n            Node(\n                package=\"cl_keyboard\",\n                executable=\"keyboard_server_node.py\",\n                name=\"keyboard_server_node\",\n                output=\"screen\",\n                prefix=keyboard_prefix,\n                arguments=[\"--ros-args\", \"--log-level\", \"INFO\"],\n            ),\n        ],\n    )\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sm_three_some</name>\n  <version>3.0.1</version>\n  <description>The sm_three_some package</description>\n  <maintainer email=\"techsupport@robosoft.ai\">Brett Aldrich</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>cl_keyboard</depend>\n  <depend>cl_generic_sensor</depend>\n  <depend>cl_ros2_timer</depend>\n  <depend>smacc2</depend>\n  <depend>sr_all_events_go</depend>\n  <depend>std_msgs</depend>\n  <depend>rclcpp</depend>\n\n  <exec_depend>xterm</exec_depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_sm_reference_library/sm_three_some/src/sm_three_some_node.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sm_three_some/sm_three_some.hpp>\n\nint main(int argc, char ** argv)\n{\n  rclcpp::init(argc, argv);\n  smacc2::run<sm_three_some::SmThreeSome>();\n}\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_all_events_go/CHANGELOG.rst",
    "content": "Changelog for package sr_all_events_go\n=========================================\n\n2.3.16 (2023-07-16)\n-------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2 <https://github.com/robosoft-ai/SMACC2>`_\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for ros buildfarm issue\n\n### Contributors\n- brettpac, pabloinigoblasco\n\n2.3.6 (2023-03-12)\n------------------\n\n1.22.1 (2022-11-09)\n-------------------\n### Added\n- Pre-release\n\n### Contributors\n- pabloinigoblasco\n\n0.3.0 (2022-04-04)\n------------------\n\n0.0.0 (2022-11-09)\n------------------\n### Added\n- Reverted commit dec14a936a877b2ef722a6a32f1bf3df09312542\n- Ignored packages not to be released\n- Feature/master rolling to galactic backport (#236)\n  - Updated mentions of SMACC/ROS to SMACC2/ROS2\n  - Progress on navigation rolling\n  - Renamed folders, deleted tracing.md, edited README.md\n  - Added smacc2_performance_tools\n  - Performance tests improvements\n  - Format cleanup for sm_respira_1\n  - Updated smacc2_rta command across readmes\n  - Cleaned up sm_atomic_24hr\n  - Optimized dependencies in move_base_z_planners_common\n  - Renamed event generator library\n  - Added galactic CI setup and renamed rolling files\n  - Fixed source CI and corrected README overview\n  - Updated c_cpp_properties.json\n  - Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch\n  - Updated doxygen links\n  - More Readme Updates\n  - Created new sm from sm_respira_1\n  - Feature/core and navigation fixes\n  - Several core improvements during navigation testing\n  - Progress in aws navigation demo\n  - New feature, cb_wait_topic_message: asynchronous client behavior\n  - Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic\n\n### Contributors\n- brettpac, Denis Štogl, Ubuntu 20-04-02-amd64\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_all_events_go/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sr_all_events_go)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\n\nfind_package(smacc2 REQUIRED)\nfind_package(smacc2_msgs REQUIRED)\n\ninclude_directories(include\n                    ${smacc2_INCLUDE_DIRS}\n                    ${smacc2_msgs_INCLUDE_DIRS})\n\nadd_library(${PROJECT_NAME} src/${PROJECT_NAME}/sr_all_events_go.cpp)\n\ntarget_link_libraries(${PROJECT_NAME} SHARED\n  ${smacc2_LIBRARIES}\n  ${smacc2_msgs_LIBRARIES}\n)\nament_target_dependencies(${PROJECT_NAME} smacc2 smacc2_msgs)\n\nament_export_dependencies(smacc2)\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\n\nif(BUILD_TESTING)\nendif()\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(TARGETS\n  ${PROJECT_NAME}\n  DESTINATION lib/)\n\nament_package()\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_all_events_go/include/sr_all_events_go/sr_all_events_go.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <boost/statechart/event.hpp>\n#include <map>\n#include <smacc2/common.hpp>\n#include <smacc2/smacc_state_reactor.hpp>\n#include <typeinfo>\n\nnamespace smacc2\n{\nnamespace state_reactors\n{\ntemplate <typename TReactorType, typename TReactorTag = EmptyObjectTag>\nstruct EvAllGo : sc::event<EvAllGo<TReactorType, TReactorTag>>\n{\n};\n\nclass SrAllEventsGo : public StateReactor\n{\n  std::map<const std::type_info *, bool> triggeredEvents;\n\npublic:\n  SrAllEventsGo() {}\n\n  void onInitialized() override;\n  void onEventNotified(const std::type_info * eventType) override;\n  bool triggers() override;\n};\n}  // namespace state_reactors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_all_events_go/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n  <name>sr_all_events_go</name>\n  <version>3.0.1</version>\n  <description>The sr_all_events_go package</description>\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Iñigo Blasco</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n  <depend>smacc2_msgs</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_all_events_go/src/sr_all_events_go/sr_all_events_go.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <smacc2/common.hpp>\n#include <sr_all_events_go/sr_all_events_go.hpp>\n\nnamespace smacc2\n{\nnamespace state_reactors\n{\nusing namespace smacc2::introspection;\nvoid SrAllEventsGo::onInitialized()\n{\n  for (auto type : eventTypes)\n  {\n    triggeredEvents[type] = false;\n  }\n}\n\nvoid SrAllEventsGo::onEventNotified(const std::type_info * eventType)\n{\n  RCLCPP_INFO_STREAM(\n    getLogger(), \"[SB ALLEventsGo] RECEIVED EVENT OF TYPE:\" << demangleSymbol(eventType->name()));\n  triggeredEvents[eventType] = true;\n\n  for (auto & entry : triggeredEvents)\n  {\n    RCLCPP_INFO_STREAM(getLogger(), demangleSymbol(entry.first->name()) << \" = \" << entry.second);\n  }\n}\n\nbool SrAllEventsGo::triggers()\n{\n  RCLCPP_INFO_STREAM(getLogger(), \"SB All TRIGGERS?\");\n  for (auto & entry : triggeredEvents)\n  {\n    if (!entry.second) return false;\n  }\n  RCLCPP_INFO_STREAM(getLogger(), \"SB ALL TRIGGERED\");\n  return true;\n}\n}  // namespace state_reactors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_conditional/CHANGELOG.rst",
    "content": "Changelog for package sr_conditional\n=====================================\n\n2.3.16 (2023-07-16)\n---------------------------\n### Added\n- Merged branch 'humble' from https://github.com/robosoft-ai/SMACC2 into humble\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted to fix weird issue with ros buildfarm\n  - More details on the buildfarm issue\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n- Contributors: brettpac, pabloinigoblasco\n\n2.3.6 (2023-03-12)\n--------------------------\nNo changes listed.\n\n1.22.1 (2022-11-09)\n---------------------------\n### Added\n- Pre-release\n- Contributors: pabloinigoblasco\n\n### Changed\n- Progress made in humble SMACC2 deb generation\n- Reverted \"Ignore packages which should not be released.\"\n- Contributors: Denis Štogl, pabloinigoblasco\n\n0.3.0 (2022-04-04)\n--------------------------\nNo changes listed.\n\n0.0.0 (2022-11-09)\n---------------------------\n### Added\n- More progress in humble SMACC2 deb generation\n- Reverted \"Ignore packages which should not be released.\"\n- Ignored packages that should not be released\n- Fixed: Initialized conditionFlag as false (#274) (#278)\n  - Fixed: Initialized conditionFlag as false (#274)\n  - Fixed precommit\n  - Co-authored-by: David Revay <MrBlenny@users.noreply.github.com>\n- Feature/master rolling to galactic backport (#236)\n  - Updated mentions of SMACC/ROS to SMACC2/ROS2\n  - Progress on navigation rolling\n  - Renamed folders, deleted tracing.md, edited README.md\n  - Added smacc2_performance_tools\n  - Performance tests improvements\n  - More on performance and other issues\n  - Format cleanup for sm_respira_1\n  - Format cleanup for sm_respira_1 pre-commit\n  - Added sm_respira_test_2\n  - More changes on performance tests\n  - Do not execute clang-format on smacc2_sm_reference_library package\n  - Reformatted sm_reference_library\n  - Corrected trailing spaces\n  - Optimized dependencies in move_base_z_planners_common\n  - Renamed event generator library\n  - Minor formatting\n  - Added galactic CI setup and renamed rolling files (#58)\n  - Fixed source CI and corrected README overview (#62)\n  - Updated c_cpp_properties.json\n  - Changed launch command to ros2 launch sm_respira_1 sm_respira_1.launch (#69)\n  - Updated doxygen links (#70)\n  - More Readme Updates (#72)\n  - More Readme (#74)\n  - Created new sm from sm_respira_1 (#76)\n  - Feature/core and navigation fixes (#78)\n  - Base for the sm_aws_aarehouse navigation\n  - Progressing in AWS navigation\n  - Several core improvements during navigation testing\n  - Formatting improvements\n  - Progress in AWS navigation demo\n  - Feature/aws demo progress (#80)\n  - More on navigation\n  - Reworked sm_advanced_recovery_1 (#83)\n  - More sm_advanced_recovery_1 work (#85)\n  - Sm_advanced_recovery_1 round 4 (#86)\n  - Brettpac branch (#87)\n  - Added sm_atomic_performance_test_a_2\n  - Added sm_atomic_performance_test_a_1\n  - Added sm_atomic_performance_test_c_1 (#88)\n  - Modified sm_atomic_performance_test_a_2 (#89)\n  - Added sm_multi_stage_1\n  - More sm_multi_stage_1 (#91)\n  - Updated README.md\n  - Wait topic message client behavior (#81)\n  - New feature, cb_wait_topic_message: asynchronous client behavior that waits for a topic message and optionally checks its contents for success\n  - Attempted precommit fixes\n  - Feature/wait nav2 nodes client behavior (#82)\n  - New feature, cb_wait_topic_message: asynchronous client behavior that waits for a topic message and optionally checks its contents for success\n  - Added new client behavior for nav2, wait nav2 nodes subscribing to the /bond topic and waiting for them to be alive; optionally, you can select the nodes to wait for\n  - Corrected all linters and formatters\n  - Co-authored-by: Denis Štogl <denis@stogl.de>\n  - Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>\n\n0.1.0 (Date: TBD)\n-------------------------\n\n### Added\n- Build-status table\n- Detailed install instructions ([source](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver#readme))\n- `setupTracing.sh`: Installs necessary packages and configures tracing group\n\n### Changed\n- Default build type set to `Release` for faster performance and smaller executables\n- Updated examples section\n\n### Fixed\n- Resolved missing dependency in `smacc_msgs` and reorganized for better overview\n- Fixed bug in `smacc2` component\n- Cleaned up formatting in `sm_respira_1` and `sm_atomic_24hr`\n- Optimized dependencies in `move_base_z_planners_common`\n- Renamed event generator library\n- Corrected build-overview table\n- Updated and unified CI configurations\n- Used `tf_geometry_msgs.h` in Galactic\n- Switched to Galactic branches in `.repos-file`\n\n### Removed\n- Manual installation of `ros-rolling-ros2trace`, now automated in `setupTracing.sh`\n\n### Miscellaneous\n- More merge\n- Docker improvements\n- Master rolling to Galactic backport\n- Fixing build\n- Testing dance bot demos\n- Updating Galactic repos\n- Runtime dependency\n- Restoring UR dependency\n- Reverted markdowns to HTML\n- Added README tutorial for Dockerfile\n- Edited `tracing.md` to reflect new tracing event names\n- Performance tests improvements\n- More on performance and other issues\n- Do not execute `clang-format` on `smacc2_sm_reference_library`\n- Cleaned up `sm_atomic_24hr`\n- More cleanup on `sm_atomic_24hr`\n- Use of `galactic` branches in `.repos-file`\n\nContributors: Denis Štogl, Pablo Iñigo Blasco, pabloinigoblasco\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_conditional/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sr_conditional)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\n\nset(dependencies\n    smacc2)\n\ninclude_directories(include)\nadd_library(${PROJECT_NAME} SHARED\n            src/${PROJECT_NAME}/sr_conditional.cpp)\n\nament_target_dependencies(${PROJECT_NAME} ${dependencies})\n\nament_export_dependencies(${dependencies})\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(TARGETS\n  ${PROJECT_NAME}\n  DESTINATION lib/)\n\nament_package()\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_conditional/include/sr_conditional/sr_conditional.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <boost/statechart/event.hpp>\n#include <map>\n#include <smacc2/common.hpp>\n#include <smacc2/smacc_state_reactor.hpp>\n#include <typeinfo>\n\nnamespace smacc2\n{\nnamespace state_reactors\n{\ntemplate <typename TReactorType, typename TReactorTag = EmptyObjectTag>\nstruct EvConditionalTrue : sc::event<EvConditionalTrue<TReactorType, TReactorTag>>\n{\n};\n\ntemplate <typename TEv>\nclass SrConditional : public StateReactor\n{\nprivate:\n  std::map<const std::type_info *, bool> triggeredEvents;\n  bool conditionFlag = false;\n\npublic:\n  SrConditional(std::function<bool(TEv *)> sr_conditionalFunction)\n  {\n    std::function<void(TEv *)> callback = [this, sr_conditionalFunction](TEv * ev)\n    {\n      bool condition = sr_conditionalFunction(ev);\n      this->conditionFlag = condition;\n    };\n\n    this->createEventCallback(callback);\n  }\n\n  bool triggers() { return this->conditionFlag; }\n};\n}  // namespace state_reactors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_conditional/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n<name>sr_conditional</name>\n  <version>3.0.1</version>\n  <description>The sr_conditional package</description>\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_conditional/src/sr_conditional/sr_conditional.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <sr_conditional/sr_conditional.hpp>\n\nnamespace smacc2\n{\nnamespace state_reactors\n{\n}  // namespace state_reactors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_event_countdown/CHANGELOG.rst",
    "content": "Changelog for package sr_event_countdown\n=========================================\n\n2.3.16 (2023-07-16)\n-------------------\n### Added\n- Merged branch 'humble' from `robosoft-ai/SMACC2` repository.\n- Brettpac branch (`#518 <https://github.com/robosoft-ai/SMACC2/issues/518>`_)\n  - Attempted fix for ros buildfarm issue.\n  - Further updates on buildfarm problem.\n  - Co-authored-by: brettpac <brettpac@pop-os.localdomain>\n- Contributors: brettpac, pabloinigoblasco\n\n2.3.6 (2023-03-12)\n------------------\n\n1.22.1 (2022-11-09)\n-------------------\n### Added\n- Pre-release.\n- Contributors: pabloinigoblasco\n\n### Changed\n- Reverted \"Ignore packages which should not be released.\"\n  This reverts commit dec14a936a877b2ef722a6a32f1bf3df09312542.\n- Contributors: Denis Štogl\n\n0.3.0 (2022-04-04)\n------------------\n\n0.0.0 (2022-11-09)\n------------------\n### Added\n- Reverted \"Ignore packages which should not be released.\"\n  This reverts commit dec14a936a877b2ef722a6a32f1bf3df09312542.\n- Ignored packages that should not be released.\n- Backport/initial to galactic (#61)\n  - Reformatted the entire project.\n  - Removed test phase from CMake and dependencies from package.xml.\n  - Compiled with navigation and slam_toolbox.\n  - Enabled compilation of all packages.\n  - Resolved missing dependency in smacc_msgs and reorganized for better overview.\n  - Refactored getLogger functionality.\n  - Updated README.md.\n  - Added build-status table.\n  - Provided detailed install instructions.\n  - Reset all versions to 0.0.0.\n  - Ignored all packages except smacc2 and smacc2_msgs.\n  - Updated changelogs.\n  - Reverted \"Ignore all packages except smacc2 and smacc2_msgs.\"\n  - Added setupTracing.sh for necessary package installation and tracing group configuration.\n  - Automated ros-rolling-ros2trace installation in setupTracing.sh.\n  - Updated tracing/ManualTracing.md.\n  - Reactivated smacc2 nav clients for rolling via submodules.\n  - Fixed bugs in smacc2 component.\n  - Added README tutorial for Dockerfile.\n  - Edited tracing.md for new tracing event names.\n  - Improved performance tests.\n  - Cleaned up formats in sm_respira_1.\n  - Optimized dependencies in move_base_z_planners_common.\n  - Renamed event generator library.\n  - Updated and unified CI configurations.\n  - Co-authored-by: pabloinigoblasco <pablo@ibrobotics.com>, reelrbtx <brett2@reelrobotics.com>, Declan Dury <44791484+DecDury@users.noreply.github.com>, DecDury <declandury@gmail.com>, brettpac <brett@robosoft.ai>\n- Contributors: Denis Štogl\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_event_countdown/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(sr_event_countdown)\n\n# Default to C++17\nif(NOT CMAKE_CXX_STANDARD)\n  set(CMAKE_CXX_STANDARD 17)\nendif()\n\n\nif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  add_compile_options(-Wall -Wextra -Wpedantic)\nendif()\n\n# find dependencies\nfind_package(ament_cmake REQUIRED)\nfind_package(smacc2 REQUIRED)\n\nset(dependencies\n    smacc2)\n\ninclude_directories(include)\n\nadd_library(${PROJECT_NAME}\n            src/${PROJECT_NAME}/sr_event_countdown.cpp)\n\nament_target_dependencies(${PROJECT_NAME} ${dependencies})\n\nament_export_dependencies(${dependencies})\nament_export_include_directories(include)\nament_export_libraries(${PROJECT_NAME})\n\ninstall(\n  DIRECTORY include/\n  DESTINATION include\n)\n\ninstall(TARGETS\n  ${PROJECT_NAME}\n  DESTINATION lib/)\n\nament_package()\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_event_countdown/include/sr_event_countdown/sr_event_countdown.hpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#pragma once\n#include <boost/statechart/event.hpp>\n#include <map>\n#include <smacc2/common.hpp>\n#include <smacc2/smacc_state_reactor.hpp>\n#include <typeinfo>\n\nnamespace smacc2\n{\nnamespace state_reactors\n{\ntemplate <typename TReactorType, typename TReactorTag = EmptyObjectTag>\nstruct EvCountdownEnd : sc::event<EvCountdownEnd<TReactorType, TReactorTag>>\n{\n};\n\n//-----------------------------------------------------------------------\nclass SrEventCountdown : public StateReactor\n{\nprivate:\n  std::map<const std::type_info *, bool> triggeredEvents;\n  int eventCount_;\n\npublic:\n  SrEventCountdown(int eventCount);\n\n  virtual void onInitialized() override;\n\n  virtual void onEventNotified(const std::type_info * eventType) override;\n\n  virtual bool triggers() override;\n};\n}  // namespace state_reactors\n}  // namespace smacc2\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_event_countdown/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<?xml-model href=\"http://download.ros.org/schema/package_format3.xsd\" schematypens=\"http://www.w3.org/2001/XMLSchema\"?>\n<package format=\"3\">\n<name>sr_event_countdown</name>\n  <version>3.0.1</version>\n  <description>The sr_event_countdown package</description>\n  <maintainer email=\"pablo@ibrobotics.com\">Pablo Inigo Blasco</maintainer>\n  <license>Apache-2.0</license>\n\n  <buildtool_depend>ament_cmake</buildtool_depend>\n\n  <depend>smacc2</depend>\n\n  <export>\n    <build_type>ament_cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "smacc2_state_reactor_library/sr_event_countdown/src/sr_event_countdown/sr_event_countdown.cpp",
    "content": "// Copyright 2025 Robosoft Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <memory>\n#include <smacc2/common.hpp>\n#include <sr_event_countdown/sr_event_countdown.hpp>\n\nnamespace smacc2\n{\nnamespace state_reactors\n{\nusing namespace smacc2::introspection;\nSrEventCountdown::SrEventCountdown(int eventCount) : eventCount_(eventCount) {}\n\nvoid SrEventCountdown::onInitialized()\n{\n  for (auto type : eventTypes)\n  {\n    triggeredEvents[type] = false;\n  }\n}\n\nvoid SrEventCountdown::onEventNotified(const std::type_info * eventType)\n{\n  eventCount_--;\n  RCLCPP_INFO_STREAM(\n    getLogger(), \"SB COUNTDOWN (\" << eventCount_ << \") RECEIVED EVENT OF TYPE:\"\n                                  << demangleSymbol(eventType->name()));\n\n  // RCLCPP_INFO_STREAM(getLogger(),\"SB ALL RECEIVED EVENT OF TYPE:\" << demangleSymbol(eventType->name()));\n  // triggeredEvents[eventType] = true;\n\n  // for (auto &entry : triggeredEvents)\n  // {\n  //     RCLCPP_INFO_STREAM(getLogger(),demangleSymbol(entry.first->name()) << \" = \" << entry.second);\n  // }\n}\n\nbool SrEventCountdown::triggers()\n{\n  if (eventCount_ == 0)\n  {\n    RCLCPP_INFO_STREAM(getLogger(), \"SB COUNTDOWN (\" << eventCount_ << \") TRIGGERS!\");\n    return true;\n  }\n  else\n  {\n    return false;\n  }\n\n  // RCLCPP_INFO(getLogger(),\"SB All TRIGGERS?\");\n  // for (auto &entry : triggeredEvents)\n  // {\n  //     if (!entry.second)\n  //         return false;\n  // }\n  // RCLCPP_INFO(getLogger(),\"SB ALL TRIGGERED\");\n  // return true;\n}\n\n}  // namespace state_reactors\n}  // namespace smacc2\n"
  }
]