SMACC2
ss_radial_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 SS1
26{
28{
29namespace radial_motion_states
30{
31// FORWARD DECLARATION OF INNER STATES
32class StiRadialRotate;
33class StiRadialReturn;
34class StiRadialEndPoint;
35class StiRadialLoopStart;
36
37} // namespace radial_motion_states
38} // namespace sm_dance_bot_strikes_back
40
41// STATE DECLARATION
43: smacc2::SmaccState<SsRadialPattern1, MsDanceBotRunMode, StiRadialLoopStart>
44{
45public:
46 using SmaccState::SmaccState;
47
48 // TRANSITION TABLE
49 typedef mpl::list<
50
51 // Transition<EvLoopEnd<StiRadialLoopStart>, StRotateDegrees1, ENDLOOP>
52 Transition<EvLoopEnd<StiRadialLoopStart>, StNavigateReverse1, ENDLOOP>
53
55
56 static constexpr int total_iterations() { return 16; }
57 static constexpr float ray_angle_increment_degree() { return 360.0 / total_iterations(); }
58 static constexpr float ray_length_meters() { return 4; }
59
61
62 // STATE FUNCTIONS
63 static void staticConfigure()
64 {
65 //configure_orthogonal<OrObstaclePerception, CbLidarSensor>();
66 }
67
69};
70
71// FORWARD DECLARATION FOR THE SUPERSTATE
73
78} // namespace SS1
79} // namespace sm_dance_bot_strikes_back
mpl::list< Transition< EvLoopEnd< StiRadialLoopStart >, StNavigateReverse1, ENDLOOP > > reactions