SMACC2
ss_f_pattern_1.hpp
Go to the documentation of this file.
1// Copyright 2021 RobosoftAI Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15/*****************************************************************************************************************
16 *
17 * Authors: Pablo Inigo Blasco, Brett Aldrich
18 *
19 ******************************************************************************************************************/
20
21#include <smacc2/smacc.hpp>
22
24{
25namespace f_pattern_states
26{
27enum class TDirection
28{
29 LEFT,
30 RIGHT
31};
32
33// FORWARD DECLARATIONS OF INNER STATES
34template <typename SS>class StiFPatternRotate1;
35template <typename SS>class StiFPatternForward1;
36template <typename SS>class StiFPatternReturn1;
37template <typename SS>class StiFPatternRotate2;
38template <typename SS>class StiFPatternForward2;
39template <typename SS>class StiFPatternStartLoop;
40
41} // namespace f_pattern_states
42} // namespace sm_dance_bot_warehouse_2
44{
45namespace SS4
46{
47using namespace f_pattern_states;
48
49// STATE DECLARATION
51: smacc2::SmaccState<SsFPattern1, MsDanceBotRunMode, StiFPatternStartLoop<SsFPattern1>>
52{
53public:
54 using SmaccState::SmaccState;
55
56 // TRANSITION TABLE
57 typedef mpl::list<
58
59 Transition<EvLoopEnd<StiFPatternStartLoop<SsFPattern1>>, StForwardAisle, ENDLOOP> //,
60
62
63 // STATE VARIABLES
64 // superstate parameters
65 static constexpr float ray_lenght_meters() { return 3.25; }
66 static constexpr float pitch_lenght_meters() { return 1.9; }
67 static constexpr int total_iterations() { return 6; }
68 static constexpr TDirection direction() { return TDirection::RIGHT; }
69
70 // superstate state variables
72
73 // STATE FUNCTIONS
74 static void staticConfigure()
75 {
76 //configure_orthogonal<OrObstaclePerception, CbLidarSensor>();
77 }
78
80}; // namespace SS4
81
82// FORWARD DECLARATION FOR THE SUPERSTATE
83
84} // namespace SS4
85} // namespace sm_dance_bot_warehouse_2
86
mpl::list< Transition< EvLoopEnd< StiFPatternStartLoop< SsFPattern1 > >, StForwardAisle, ENDLOOP > > reactions
static constexpr float pitch_lenght_meters()
static constexpr TDirection direction()