.. _program_listing_file__tmp_ws_src_smacc2_smacc2_sm_reference_library_sm_multi_panda_sim_sm_multi_panda_sim_include_sm_multi_panda_sim_sm_multi_panda_sim.hpp: Program Listing for File sm_multi_panda_sim.hpp =============================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/smacc2/smacc2_sm_reference_library/sm_multi_panda_sim/sm_multi_panda_sim/include/sm_multi_panda_sim/sm_multi_panda_sim.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // Copyright 2021 MyName/MyCompany Inc. // Copyright 2021 RobosoftAI Inc. (template) // // 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 * *****************************************************************************************************************/ #pragma once #include #include "rclcpp/rclcpp.hpp" #include "smacc2/smacc.hpp" #include // CLIENT BEHAVIORS #include #include #include // #include // #include #include //#include #include // STATE REACTORS #include // ORTHOGONALS #include "orthogonals/or_arm_left.hpp" #include "orthogonals/or_arm_right.hpp" #include "orthogonals/or_timer.hpp" #include "orthogonals/or_keyboard.hpp" #include "orthogonals/or_updatable_publisher.hpp" // CLIENTS #include #include // CLIENT BEHAVIORS #include #include "clients/move_group/client_behaviors/cb_wait_joint_states.hpp" #include "clients/move_group/client_behaviors/cb_sleep_for.hpp" #include "clients/move_group/client_behaviors/cb_move_synchronized_link_goals.hpp" namespace sm_multi_panda_sim { using namespace cl_moveit2z; using namespace cl_ros_timer; using namespace cl_keyboard; using namespace boost; using namespace smacc2; using namespace smacc2::default_events; // STATES struct StAcquireSensors; class StLeftArmMoves; class StRightArmMoves; class StBothArmsMove; struct EvToDeep : sc::event { }; struct EvFail : sc::event { }; struct EvSc : sc::event { }; struct EvStart : sc::event { }; struct EvReset : sc::event { }; struct EvSuspend : sc::event { }; struct EvUnSuspend : sc::event { }; struct EvHold : sc::event { }; struct EvUnhold : sc::event { }; struct EvStop : sc::event { }; struct EvClear : sc::event { }; //-------------------------------------------------------------------- // STATE_MACHINE struct SmMultiPandaSim : public smacc2::SmaccStateMachineBase { using SmaccStateMachineBase::SmaccStateMachineBase; void onInitialize() override { this->createOrthogonal(); this->createOrthogonal(); } }; } // namespace sm_multi_panda_sim // STATES #include "states/st_acquire_sensors.hpp" #include "states/st_left_arm_moves.hpp" #include "states/st_right_arm_moves.hpp" #include "states/st_both_arms_move.hpp"