21 static std::unique_ptr<RobotConfig>
loadConfig(std::string filepath, std::vector<std::string>& errors);
26 const std::vector<std::string>&
getNames()
const {
return names_; }
28 const std::vector<std::string>&
getFamilies()
const {
return families_; }
30 const std::string&
getHrdf()
const {
return hrdf_; }
32 std::string
getGains(
const std::string& key)
const {
return gains_.count(key) == 0 ?
"" : gains_.at(key); }
34 const std::map<std::string, std::string>&
getGains()
const {
return gains_; }
38 const std::vector<arm::PluginConfig>&
getPluginConfigs()
const {
return plugin_configs_; }
61 bool getBool(
const std::string& key,
bool default_value =
false)
const {
62 auto it =
bools_.find(key);
70 bool hasBool(
const std::string& key)
const {
75 double getFloat(
const std::string& key,
double default_value = 0.0)
const {
89 std::string
getString(
const std::string& key, std::string default_value =
"")
const {
103 std::vector<bool>
getBoolList(
const std::string& key, std::vector<bool> default_value = {})
const {
108 return default_value;
117 std::vector<double>
getFloatList(
const std::string& key, std::vector<double> default_value = {})
const {
122 return default_value;
131 std::vector<std::string>
getStringList(
const std::string& key, std::vector<std::string> default_value = {})
const {
136 return default_value;
151 std::vector<std::string> names_;
152 std::vector<std::string> families_;
156 std::map<std::string, std::string> gains_;
158 std::vector<arm::PluginConfig> plugin_configs_;
160 std::string location_;
const std::map< std::string, std::string > & getGains() const
Definition: robot_config.hpp:34
const std::string & getParentDirectory() const
Definition: robot_config.hpp:36
bool hasFloat(const std::string &key) const
Definition: robot_config.hpp:84
std::vector< bool > getBoolList(const std::string &key, std::vector< bool > default_value={}) const
Definition: robot_config.hpp:103
std::map< std::string, bool > bools_
Definition: robot_config.hpp:43
std::vector< double > getFloatList(const std::string &key, std::vector< double > default_value={}) const
Definition: robot_config.hpp:117
const std::vector< std::string > & getFamilies() const
Definition: robot_config.hpp:28
bool hasFloatList(const std::string &key) const
Definition: robot_config.hpp:126
bool hasBoolList(const std::string &key) const
Definition: robot_config.hpp:112
Definition: robot_config.hpp:41
const UserData & getUserData() const
Definition: robot_config.hpp:146
static std::unique_ptr< RobotConfig > loadConfig(std::string filepath, std::vector< std::string > &errors)
Definition: robot_config.cpp:73
std::string getGains(const std::string &key) const
Definition: robot_config.hpp:32
std::map< std::string, std::string > strings_
Definition: robot_config.hpp:49
const std::vector< arm::PluginConfig > & getPluginConfigs() const
Definition: robot_config.hpp:38
std::string getString(const std::string &key, std::string default_value="") const
Definition: robot_config.hpp:89
std::map< std::string, std::vector< std::string > > string_lists_
Definition: robot_config.hpp:58
bool hasBool(const std::string &key) const
Definition: robot_config.hpp:70
std::map< std::string, std::vector< double > > float_lists_
Definition: robot_config.hpp:55
std::map< std::string, std::vector< bool > > bool_lists_
Definition: robot_config.hpp:52
std::vector< std::string > getStringList(const std::string &key, std::vector< std::string > default_value={}) const
Definition: robot_config.hpp:131
std::map< std::string, double > floats_
Definition: robot_config.hpp:46
Definition: robot_config.hpp:13
bool getBool(const std::string &key, bool default_value=false) const
Definition: robot_config.hpp:61
const std::string & getHrdf() const
Definition: robot_config.hpp:30
double getFloat(const std::string &key, double default_value=0.0) const
Definition: robot_config.hpp:75
bool hasStringList(const std::string &key) const
Definition: robot_config.hpp:140
bool hasString(const std::string &key) const
Definition: robot_config.hpp:98
const std::vector< std::string > & getNames() const
Definition: robot_config.hpp:26