ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
https://github.com/jbeder/yaml-cpp
Checkout the https://github.com/jbeder/yaml-cpp/wiki/Tutorial
2 | No.2 Revision |
https://github.com/jbeder/yaml-cpp
Checkout the https://github.com/jbeder/yaml-cpp/wiki/Tutorial
ros::NodeHandle nh;
yaml_params_ = YAML::LoadFile(yaml_filename);
for (YAML::const_iterator it = yaml_params_.begin();
it != yaml_params_.end(); ++it) {
nh.setParam(it->first.as<std::string>(), it->second.as<double>());
}
PS: Not sure if there a better way, but this is how I do it. Obviously, there is ddynamic_reconfigure & dynamic_reconfigure, where you can store the params to *.yaml
and save/load them as needed.
3 | No.3 Revision |
https://github.com/jbeder/yaml-cpp
Checkout the https://github.com/jbeder/yaml-cpp/wiki/Tutorial
ros::NodeHandle nh;
yaml_params_ = YAML::LoadFile(yaml_filename);
for (YAML::const_iterator it = yaml_params_.begin();
yaml_params_.begin(); it != yaml_params_.end(); ++it) {
nh.setParam(it->first.as<std::string>(), it->second.as<double>());
}
PS: Not sure if there a better way, but this is how I do it. Obviously, there is ddynamic_reconfigure & dynamic_reconfigure, where you can store the params to *.yaml
and save/load them as needed.
4 | No.4 Revision |
https://github.com/jbeder/yaml-cpp
Checkout the https://github.com/jbeder/yaml-cpp/wiki/Tutorial
ros::NodeHandle nh;
yaml_params_ = YAML::LoadFile(yaml_filename);
for (YAML::const_iterator it = yaml_params_.begin(); it != yaml_params_.end(); ++it) {
nh.setParam(it->first.as<std::string>(), it->second.as<double>());
}
PS: Not sure if there is a better way, but this is how I do it. Obviously, there is ddynamic_reconfigure & dynamic_reconfigure, where you can store the params to *.yaml
and save/load them as needed.