15 #ifndef CONCEALER__LAUNCH_HPP_
16 #define CONCEALER__LAUNCH_HPP_
18 #include <boost/algorithm/string.hpp>
23 #include <system_error>
24 #include <type_traits>
29 template <
typename Parameters>
33 const auto argv = [&]() {
34 auto argv = std::vector<std::string>();
36 argv.push_back(
"python3");
37 argv.push_back(boost::algorithm::replace_all_copy(
dollar(
"which ros2"),
"\n",
""));
38 argv.push_back(
"launch");
39 argv.push_back(package);
42 for (
const auto & parameter : parameters) {
43 argv.push_back(parameter);
50 throw std::system_error(errno, std::system_category());
52 std::cout << std::system_error(errno, std::system_category()).what() << std::endl;
53 std::exit(EXIT_FAILURE);
Definition: autoware_universe.hpp:40
auto ros2_launch(const std::string &package, const std::string &file, const Parameters ¶meters)
Definition: launch.hpp:30
auto dollar(const std::string &command) -> std::string
Definition: execute.cpp:57
auto execute(const std::vector< std::string > &) -> int
Definition: execute.cpp:36
pid_t process_id
Definition: record.cpp:25
std::string string
Definition: junit5.hpp:26