SMACC2
ss_radial_pattern_2.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 SS2
26{
28{
29namespace radial_motion_states
30{
31// FORWARD DECLARATIONS OF INNER STATES
32class StiRadialRotate;
33class StiRadialReturn;
34class StiRadialEndPoint;
35class StiRadialLoopStart;
36} // namespace radial_motion_states
37} // namespace sm_dance_bot_warehouse
39
40// STATE DECLARATION
42: smacc2::SmaccState<SsRadialPattern2, MsDanceBotRunMode, StiRadialLoopStart>
43{
44public:
45 using SmaccState::SmaccState;
46
47 // TRANSITION TABLE
48 typedef mpl::list<
49
50 Transition<EvLoopEnd<StiRadialLoopStart>, StNavigateToWaypointsX, ENDLOOP>
51
53
54 // STATE FUNCTIONS
55 static void staticConfigure()
56 {
57 //configure_orthogonal<OrObstaclePerception, CbLidarSensor>();
58 }
59
61
63 static constexpr int total_iterations() { return 35; }
64 static constexpr float ray_angle_increment_degree() { return 360.0 / total_iterations(); }
65 static constexpr float ray_length_meters() { return 5; }
66
67 void onExit()
68 {
69 rclcpp::sleep_for(5s);
70 RCLCPP_INFO(getLogger(), "[SsRadialPattern1] waiting 5 seconds");
71 }
72};
73
74// FORWARD DECLARATION FOR THE SUPERSTATE
80} // namespace SS2
81} // namespace sm_dance_bot_warehouse
rclcpp::Logger getLogger()
Definition: smacc_state.hpp:36
mpl::list< Transition< EvLoopEnd< StiRadialLoopStart >, StNavigateToWaypointsX, ENDLOOP > > reactions