SMACC2
sm_autoware_avp.hpp
Go to the documentation of this file.
1// Copyright 2021 MyName/MyCompany Inc.
2// Copyright 2021 RobosoftAI Inc. (template)
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#pragma once
17
18#include <memory>
19
20#include "rclcpp/rclcpp.hpp"
21#include "smacc2/smacc.hpp"
22
23// ORTHOGONALS
25#include "orthogonals/or_timer.hpp"
26
27// CLIENTS
29
30namespace sm_autoware_avp
31{
32// SMACC2 clases
34
35//STATES
36struct StAcquireSensors;
37struct StSetupInitialLocationEstimation;
38struct StNavigateWaypoint1;
39struct StNavigateWaypoint2;
40struct StFirstPause;
41struct StSecondPause;
42
43//--------------------------------------------------------------------
44//STATE_MACHINE
46: public smacc2::SmaccStateMachineBase<SmAutowareAvp, StAcquireSensors>
47{
48 using SmaccStateMachineBase::SmaccStateMachineBase;
49
50 void onInitialize() override
51 {
52 this->createOrthogonal<OrAutowareAuto>();
53 this->createOrthogonal<OrTimer>();
54 }
55};
56
57} // namespace sm_autoware_avp
58
59// STATES
60#include "states/st_acquire_sensors.hpp"
void onInitialize() override
this function should be implemented by the user to create the orthogonals