SMACC2
ss_radial_pattern_3.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 SS3
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<SsRadialPattern3, MsDanceBotRunMode, StiRadialLoopStart>
44{
45public:
46 using SmaccState::SmaccState;
47
48 // TRANSITION TABLE
49 typedef mpl::list<
50
51 Transition<EvLoopEnd<StiRadialLoopStart>, StRotateDegrees4, ENDLOOP>
52
54
55 // STATE FUNCTIONS
56 static void staticConfigure()
57 {
58 //configure_orthogonal<OrObstaclePerception, CbLidarSensor>();
59 }
60
62
63 static constexpr int total_iterations() { return 16; }
64 static constexpr float ray_angle_increment_degree() { return 360.0 / total_iterations(); }
65 static constexpr float ray_length_meters() { return 4; }
66
68};
69
70// FORWARD DECLARATION FOR THE SUPERSTATE
76} // namespace SS3
77} // namespace sm_dance_bot_strikes_back
mpl::list< Transition< EvLoopEnd< StiRadialLoopStart >, StRotateDegrees4, ENDLOOP > > reactions