SMACC2
st_attach_object.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"
28
30{
31// SMACC2 classes
34using namespace smacc2;
35
36// STATE DECLARATION
37struct StAttachObject : smacc2::SmaccState<StAttachObject, SmTestMoveitUr5Sim>
38{
40
41 // TRANSITION TABLE
42 typedef boost::mpl::list<
44 >
46
47 // STATE FUNCTIONS
48 static void staticConfigure()
49 {
50 configure_orthogonal<OrArm, CbAttachObject>("virtualBox");
51 }
52
54 {
55 RCLCPP_INFO(getLogger(), "Entering StAttachObject");
57 requiresClient(moveGroupClient);
58 }
59
60 void onEntry() { RCLCPP_INFO(getLogger(), "On Entry!"); }
61
62 void onExit() { RCLCPP_INFO(getLogger(), "On Exit!"); }
63};
64} // namespace sm_test_moveit_ur5_sim
rclcpp::Logger getLogger()
Definition: smacc_state.hpp:36
void requiresClient(SmaccClientType *&storage)
boost::mpl::list< Transition< EvCbSuccess< CbAttachObject, OrArm >, StDetatchObject, SUCCESS > > reactions