.. _program_listing_file__tmp_ws_src_smacc2_smacc2_sm_reference_library_sm_dance_bot_strikes_back_include_sm_dance_bot_strikes_back_sm_dance_bot_strikes_back.hpp: Program Listing for File sm_dance_bot_strikes_back.hpp ====================================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/smacc2/smacc2_sm_reference_library/sm_dance_bot_strikes_back/include/sm_dance_bot_strikes_back/sm_dance_bot_strikes_back.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // Copyright 2021 RobosoftAI Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /***************************************************************************************************************** * * Authors: Pablo Inigo Blasco, Brett Aldrich * ******************************************************************************************************************/ #include #include // CLIENT BEHAVIORS #include #include #include #include using namespace cl_nav2z; #include #include #include #include #include #include #include #include #include #include using namespace sm_dance_bot_strikes_back::cl_lidar; using namespace sm_dance_bot_strikes_back::cl_service3; using namespace sm_dance_bot_strikes_back::cl_string_publisher; using namespace sm_dance_bot_strikes_back::cl_temperature_sensor; using namespace sm_dance_bot_strikes_back::cl_led; //STATE REACTORS #include #include #include using namespace smacc2::state_reactors; // ORTHOGONALS #include #include #include #include #include #include #include #include namespace sm_dance_bot_strikes_back { //STATE FORWARD DECLARATIONS struct StAcquireSensors; struct StEventCountDown; struct StNavigateForward1; struct StNavigateToWaypoint1; struct StNavigateToWaypointsX; struct StRotateDegrees1; struct StRotateDegrees2; struct StRotateDegrees3; struct StRotateDegrees4; struct StRotateDegrees5; struct StRotateDegrees6; struct StNavigateReverse1; struct StNavigateReverse2; struct StNavigateReverse3; struct StNavigateReverse4; //SUPERSTATE FORWARD DECLARATIONS // MODE STATES FORWARD DECLARATIONS struct MsDanceBotRunMode; struct MsDanceBotRecoveryMode; namespace SS1 { class SsRadialPattern1; } namespace SS2 { class SsRadialPattern2; } namespace SS3 { class SsRadialPattern3; } namespace SS4 { class SsFPattern1; } namespace SS5 { class SsSPattern1; } // custom smd_dance_bot event struct EvGlobalError : sc::event { }; } // namespace sm_dance_bot_strikes_back using namespace sm_dance_bot_strikes_back; using namespace cl_ros_timer; using namespace smacc2; namespace sm_dance_bot_strikes_back { struct SmDanceBotStrikesBack : public smacc2::SmaccStateMachineBase { int counter_1; bool rt_ready_flag; typedef mpl::bool_ shallow_history; typedef mpl::bool_ deep_history; typedef mpl::bool_ inherited_deep_history; using SmaccStateMachineBase::SmaccStateMachineBase; void onInitialize() override { this->setGlobalSMData("counter_1", counter_1); this->setGlobalSMData("rt_ready_flag", rt_ready_flag); this->createOrthogonal(); this->createOrthogonal(); this->createOrthogonal(); this->createOrthogonal(); this->createOrthogonal(); this->createOrthogonal(); this->createOrthogonal(); this->createOrthogonal(); } }; } // namespace sm_dance_bot_strikes_back //MODE STATES #include #include //SUPERSTATES #include #include #include #include #include //STATES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include