SMACC2
smacc2_sm_reference_library
sm_autoware_avp
include
sm_autoware_avp
states
st_acquire_sensors.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
/*****************************************************************************************************************
17
*
18
* Authors: Pablo Inigo Blasco, Brett Aldrich
19
*
20
******************************************************************************************************************/
21
22
#pragma once
23
24
#include "rclcpp/rclcpp.hpp"
25
#include "
smacc2/smacc.hpp
"
26
27
// CLIENTS
28
29
// ORTHOGONALS
30
#include "
sm_autoware_avp/orthogonals/or_autoware_auto.hpp
"
31
32
// CLIENT BEHAVIORS
33
#include "
smacc2/client_behaviors/cb_wait_node.hpp
"
34
#include "
smacc2/client_behaviors/cb_wait_topic_message.hpp
"
35
36
namespace
sm_autoware_avp
37
{
38
// SMACC2 clases
39
using
smacc2::EvStateRequestFinish
;
40
using
smacc2::Transition
;
41
using
smacc2::client_behaviors::CbWaitNode
;
42
using
smacc2::default_transition_tags::SUCCESS
;
43
44
// STATE DECLARATION
45
struct
StAcquireSensors
:
smacc2::SmaccState
<StAcquireSensors, SmAutowareAvp>
46
{
47
using
SmaccState::SmaccState;
48
49
// TRANSITION TABLE
50
typedef
boost::mpl::list<
51
52
Transition<smacc2::EvCbSuccess<CbWaitNode, OrAutowareAuto>
,
StSetupInitialLocationEstimation
,
SUCCESS
>
53
54
>
55
reactions
;
56
57
// STATE FUNCTIONS
58
static
void
staticConfigure
()
59
{
60
configure_orthogonal<OrAutowareAuto, CbWaitNode>(
"/localization/p2d_ndt_localizer_node"
/*"/lgsvl/bridge"*/
);
// EvTimer triggers each 3 client ticks
61
}
62
63
void
runtimeConfigure
() {}
64
65
void
onEntry
() { RCLCPP_INFO(
getLogger
(),
"On Entry!"
); }
66
67
void
onExit
() { RCLCPP_INFO(
getLogger
(),
"On Exit!"
); }
68
};
69
}
// namespace sm_autoware_avp
cb_wait_node.hpp
cb_wait_topic_message.hpp
smacc2::ISmaccState::getLogger
rclcpp::Logger getLogger()
Definition:
smacc_state.hpp:36
smacc2::SmaccState
Definition:
smacc_state_base.hpp:41
smacc2::Transition
Definition:
smacc_transition.hpp:32
smacc2::client_behaviors::CbWaitNode
Definition:
cb_wait_node.hpp:36
sm_autoware_avp
Definition:
cl_autoware.hpp:33
or_autoware_auto.hpp
smacc.hpp
sm_autoware_avp::StAcquireSensors
Definition:
st_acquire_sensors.hpp:46
sm_autoware_avp::StAcquireSensors::onExit
void onExit()
Definition:
st_acquire_sensors.hpp:67
sm_autoware_avp::StAcquireSensors::staticConfigure
static void staticConfigure()
Definition:
st_acquire_sensors.hpp:58
sm_autoware_avp::StAcquireSensors::reactions
boost::mpl::list< Transition< smacc2::EvCbSuccess< CbWaitNode, OrAutowareAuto >, StSetupInitialLocationEstimation, SUCCESS > > reactions
Definition:
st_acquire_sensors.hpp:55
sm_autoware_avp::StAcquireSensors::runtimeConfigure
void runtimeConfigure()
Definition:
st_acquire_sensors.hpp:63
sm_autoware_avp::StAcquireSensors::onEntry
void onEntry()
Definition:
st_acquire_sensors.hpp:65
sm_autoware_avp::StSetupInitialLocationEstimation
Definition:
st_setup_initial_location_estimation.hpp:57
smacc2::default_events::EvStateRequestFinish
Definition:
smacc_default_events.hpp:111
smacc2::default_transition_tags::SUCCESS
Definition:
smacc_types.hpp:72
Generated by
1.9.4