SMACC2
smacc2_sm_reference_library
sm_test_moveit_ur5_sim
include
sm_test_moveit_ur5_sim
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 <sensor_msgs/msg/joint_state.h>
25
26
namespace
sm_test_moveit_ur5_sim
27
{
28
// SMACC2 classes
29
using
smacc2::EvStateRequestFinish
;
30
using
smacc2::Transition
;
31
using
smacc2::default_transition_tags::SUCCESS
;
32
using namespace
smacc2
;
33
using namespace
cl_move_group_interface
;
34
using
smacc2::client_behaviors::CbWaitTopicMessage
;
35
36
// STATE DECLARATION
37
struct
StAcquireSensors
:
smacc2::SmaccState
<StAcquireSensors, SmTestMoveitUr5Sim>
38
{
39
using
SmaccState::SmaccState
;
40
41
// TRANSITION TABLE
42
typedef
boost::mpl::list<
43
Transition<EvCbSuccess<CbWaitTopicMessage<sensor_msgs::msg::JointState>
,
OrArm
>,
StMoveJoints
,
SUCCESS
>
44
45
>
reactions
;
46
47
// STATE FUNCTIONS
48
static
void
staticConfigure
()
49
{
50
configure_orthogonal<OrArm, CbWaitTopicMessage<sensor_msgs::msg::JointState>>(
"/joint_states"
);
51
};
52
53
void
runtimeConfigure
() {}
54
};
55
}
// namespace sm_test_moveit_ur5_sim
sm_test_moveit_ur5_sim::OrArm
Definition:
or_arm.hpp:31
smacc2::SmaccState
Definition:
smacc_state_base.hpp:41
smacc2::SmaccState::SmaccState
SmaccState()=delete
smacc2::Transition
Definition:
smacc_transition.hpp:32
smacc2::client_behaviors::CbWaitTopicMessage
Definition:
cb_wait_topic_message.hpp:37
cl_move_group_interface
Definition:
cl_movegroup.hpp:35
sm_test_moveit_ur5_sim
Definition:
or_arm.hpp:27
smacc2
Definition:
cp_topic_publisher.hpp:28
sm_test_moveit_ur5_sim::StAcquireSensors
Definition:
st_acquire_sensors.hpp:38
sm_test_moveit_ur5_sim::StAcquireSensors::staticConfigure
static void staticConfigure()
Definition:
st_acquire_sensors.hpp:48
sm_test_moveit_ur5_sim::StAcquireSensors::reactions
boost::mpl::list< Transition< EvCbSuccess< CbWaitTopicMessage< sensor_msgs::msg::JointState >, OrArm >, StMoveJoints, SUCCESS > > reactions
Definition:
st_acquire_sensors.hpp:45
sm_test_moveit_ur5_sim::StAcquireSensors::runtimeConfigure
void runtimeConfigure()
Definition:
st_acquire_sensors.hpp:53
sm_test_moveit_ur5_sim::StMoveJoints
Definition:
st_move_joints.hpp:35
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