4#include <action_msg_srv_shared/order_codes.hpp>
13 OrderCodes order_code;
22 for(
size_t i = 0; i < str.size(); i++) {
23 if(str.at(i) ==
' ') {
26 }
else if(processed == 1) {
27 distance = std::stod(str.substr(prev_str_ptr, i-prev_str_ptr));
28 }
else if(processed == 2) {
29 id = std::stoi(str.substr(prev_str_ptr, i-prev_str_ptr));
30 }
else if(processed == 3) {
31 angle = std::stod(str.substr(prev_str_ptr, i-prev_str_ptr));
39 return std::make_tuple(order_code, distance,
id, angle);
Definition: order_reader.hpp:7
std::tuple< OrderCodes, double, int64_t, double > get_order_as_tuple(std::string str)
Definition: order_reader.hpp:11
std::map< std::string, OrderCodes > str_to_order_code
Definition: order_reader.cpp:5