setup/Rokubimini.cpp
Go to the documentation of this file.
2 
3 namespace rokubimini
4 {
5 namespace setup
6 {
7 void Rokubimini::load(const std::string& rokubiminiName, NodeHandlePtr nh)
8 {
9  std::string name_string = rokubiminiName + "/setup/name";
10  if (nh->hasParam(name_string))
11  {
12  nh->getParam(name_string, name_);
13  }
14  else
15  {
16  ROS_ERROR("Could not find rokubimini name in Parameter Server: %s", name_string.c_str());
17  }
18 
19  std::string product_code_string = rokubiminiName + "/setup/product_code";
20  if (nh->hasParam(product_code_string))
21  {
22  int product_code;
23  nh->getParam(product_code_string, product_code);
24  productCode_ = static_cast<uint32_t>(product_code);
25  }
26  else
27  {
28  ROS_ERROR("Could not find product code in Parameter Server: %s", product_code_string.c_str());
29  }
30 
31  configuration_.load(rokubiminiName, nh);
32 }
33 
34 } // namespace setup
35 } // namespace rokubimini
std::shared_ptr< ros::NodeHandle > NodeHandlePtr
virtual void load(const std::string &rokubiminiName, NodeHandlePtr nh)
Loads the sensor configuration from the parameter server.
std::string name_
The name of the Rokubimini Setup.
void load(const std::string &key, NodeHandlePtr nh)
Loads the configuration from the parameter server.
configuration::Configuration configuration_
The configuration of the Rokubimini Setup.
std::uint32_t productCode_
The product code of the Rokubimini Setup.
#define ROS_ERROR(...)
Tests Configuration.


rokubimini
Author(s):
autogenerated on Wed Mar 3 2021 03:09:12