Common
common packages for kyubic
 
Loading...
Searching...
No Matches
dvl_setting.hpp
Go to the documentation of this file.
1
10#ifndef DVL_SETTING_HPP_
11#define DVL_SETTING_HPP_
12
13#include <driver_msgs/srv/command.hpp>
14#include <fstream>
15#include <rclcpp/rclcpp.hpp>
16#include <string>
17#include <vector>
18
19namespace driver::dvl_driver
20{
21
22class DVLSetting : public rclcpp::Node
23{
24public:
25 DVLSetting();
27
32 bool configure();
33
34private:
35 // ROS Service Client
36 rclcpp::Client<driver_msgs::srv::Command>::SharedPtr client_;
37
38 // Parameters
39 std::string config_file_path_;
40
41 // Helpers
42 std::vector<std::string> load_config_file(const std::string & path);
43
44 // Service wrapper (Synchronous-like)
45 std::string call_service(const std::string & command);
46
47 // Command logic
48 bool execute_command(const std::string & cmd);
49 std::string get_query_command(const std::string & cmd);
50 std::string trim(const std::string & str);
51};
52
53} // namespace driver::dvl_driver
54
55#endif // DVL_SETTING_HPP_
Definition: dvl_setting.hpp:23
bool configure()
Main routine to read config file and apply settings via Service.
Definition: dvl_setting.cpp:63
DVLSetting()
Definition: dvl_setting.cpp:32
~DVLSetting()
Definition: dvl_setting.cpp:61
Namespace for DVL driver components.