SMACC2
st_acquire_sensors.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#pragma once
22
23#include <smacc2/smacc.hpp>
24
26{
27using namespace smacc2::default_events;
28
29// STATE DECLARATION
30struct StAcquireSensors : smacc2::SmaccState<StAcquireSensors, SmHuskyBarrelSearch1>
31{
33
34 // DECLARE CUSTOM OBJECT TAGS
36 {
37 };
38 struct SrAcquireSensors;
39
40 // TRANSITION TABLE
41 typedef mpl::list<
42
43 // Transition<EvAllGo<SrAllEventsGo, SrAcquireSensors>, StNavigateWaypointsX>,
44 // Transition<EvGlobalError, MsDanceBotRecoveryMode>
45 // smacc2::Transition<
46 // smacc2::EvCbSuccess<cl_nav2z::CbWaitPose, OrNavigation>, StNavigateToWaypointX>,
47
49
52 >
54
55 // STATE FUNCTIONS
56 static void staticConfigure()
57 {
58 // configure_orthogonal<OrNavigation, CbLidarSensor>();
59 configure_orthogonal<OrNavigation, cl_nav2z::CbWaitPose>();
60 configure_orthogonal<OrNavigation, cl_nav2z::CbWaitNav2Nodes>();
61
62 // Create State Reactor
63 // auto srAllSensorsReady = static_createStateReactor<
64 // SrAllEventsGo, smacc2::state_reactors::EvAllGo<SrAllEventsGo, SrAcquireSensors>,
65 // mpl::list<
66 // EvTopicMessage<CbLidarSensor, OrNavigation>,
67 // // EvTopicMessage<CbConditionTemperatureSensor, OrTemperatureSensor>,
68 // EvCbSuccess<CbWaitPose, OrNavigation>>>();
69 }
70};
71} // namespace sm_husky_barrel_search_1
mpl::list< smacc2::Transition< smacc2::EvCbSuccess< cl_nav2z::CbWaitNav2Nodes, OrNavigation >, StNavigateToWaypointX, SUCCESS >, smacc2::Transition< smacc2::EvCbFailure< cl_nav2z::CbWaitPose, OrNavigation >, StNavigateToWaypointX > > reactions