SMACC2
Loading...
Searching...
No Matches
smacc2
include
smacc2
client_bases
smacc_ros_launch_client.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_client.hpp
>
24
#include <
smacc2/smacc_state_machine.hpp
>
25
26
#include <rclcpp_action/client.hpp>
27
#include <thread>
28
29
namespace
smacc2
30
{
31
namespace
client_bases
32
{
33
class
ClRosLaunch
:
public
ISmaccClient
34
{
35
public
:
36
ClRosLaunch
(std::string packageName, std::string launchFilename);
37
38
virtual
~ClRosLaunch
();
39
40
void
launch
();
41
42
void
stop
();
43
44
static
std::future<std::string>
executeRosLaunch
(
45
std::string packageName, std::string launchFilename, std::function<
bool
()> cancelCondition);
46
47
std::string
packageName_
;
48
49
std::string
launchFileName_
;
50
51
protected
:
52
std::future<std::string>
result_
;
53
54
std::atomic<bool>
cancellationToken_
= ATOMIC_VAR_INIT(
false
);
55
};
56
}
// namespace client_bases
57
}
// namespace smacc2
smacc2::ISmaccClient
Definition:
smacc_client.hpp:45
smacc2::client_bases::ClRosLaunch
Definition:
smacc_ros_launch_client.hpp:34
smacc2::client_bases::ClRosLaunch::cancellationToken_
std::atomic< bool > cancellationToken_
Definition:
smacc_ros_launch_client.hpp:54
smacc2::client_bases::ClRosLaunch::launchFileName_
std::string launchFileName_
Definition:
smacc_ros_launch_client.hpp:49
smacc2::client_bases::ClRosLaunch::~ClRosLaunch
virtual ~ClRosLaunch()
Definition:
smacc_ros_launch_client.cpp:32
smacc2::client_bases::ClRosLaunch::executeRosLaunch
static std::future< std::string > executeRosLaunch(std::string packageName, std::string launchFilename, std::function< bool()> cancelCondition)
Definition:
smacc_ros_launch_client.cpp:42
smacc2::client_bases::ClRosLaunch::launch
void launch()
Definition:
smacc_ros_launch_client.cpp:34
smacc2::client_bases::ClRosLaunch::result_
std::future< std::string > result_
Definition:
smacc_ros_launch_client.hpp:52
smacc2::client_bases::ClRosLaunch::packageName_
std::string packageName_
Definition:
smacc_ros_launch_client.hpp:47
smacc2::client_bases::ClRosLaunch::stop
void stop()
Definition:
smacc_ros_launch_client.cpp:40
smacc2
Definition:
callback_counter_semaphore.hpp:30
smacc_client.hpp
smacc_state_machine.hpp
Generated by
1.9.5