backend_config.hpp
Go to the documentation of this file.
1 #ifndef RADIAL_MENU_BACKEND_BACKEND_CONFIG_HPP
2 #define RADIAL_MENU_BACKEND_BACKEND_CONFIG_HPP
3 
4 #include <string>
5 
6 #include <ros/node_handle.h>
7 
8 namespace radial_menu_backend {
9 
10 struct BackendConfig {
13  auto_select(false), enable_button(/* PS4's circle*/ 1), select_button(/* PS4's R1 */ 5),
14  ascend_button(/* PS4's L1 */ 4), pointing_axis_v(/* PS4's LEFT Y */ 1),
15  pointing_axis_h(/* PS4's LEFT X */ 0), invert_pointing_axis_v(false),
17 
18  static BackendConfig fromParamNs(const std::string &ns) {
19  ros::NodeHandle nh(ns);
20  BackendConfig config;
21  nh.getParam("allow_multi_selection", config.allow_multi_selection);
22  nh.getParam("reset_on_enabling", config.reset_on_enabling);
23  nh.getParam("reset_on_disabling", config.reset_on_disabling);
24  nh.getParam("auto_select", config.auto_select);
25  nh.getParam("enable_button", config.enable_button);
26  nh.getParam("select_button", config.select_button);
27  nh.getParam("ascend_button", config.ascend_button);
28  nh.getParam("pointing_axis_v", config.pointing_axis_v);
29  nh.getParam("invert_pointing_axis_v", config.invert_pointing_axis_v);
30  nh.getParam("pointing_axis_h", config.pointing_axis_h);
31  nh.getParam("invert_pointing_axis_h", config.invert_pointing_axis_h);
32  nh.getParam("pointing_axis_threshold", config.pointing_axis_threshold);
33  return config;
34  }
35 
46 };
47 } // namespace radial_menu_backend
48 
49 #endif
static BackendConfig fromParamNs(const std::string &ns)
bool getParam(const std::string &key, std::string &s) const


radial_menu_backend
Author(s):
autogenerated on Mon Feb 28 2022 23:22:01