| 47 | } |
| 48 | |
| 49 | bool PclLoaderParameters::loadParameters(const std::string& filename) { |
| 50 | YAML::Node yamlNode = YAML::LoadFile(filename); |
| 51 | |
| 52 | const bool loadingFailed = yamlNode.IsNull(); |
| 53 | if (loadingFailed) { |
| 54 | ROS_ERROR_STREAM("PclLoaderParameters: Reading from file failed"); |
| 55 | return false; |
| 56 | } |
| 57 | |
| 58 | try { |
| 59 | handleYamlNode(yamlNode); |
| 60 | } catch (const std::runtime_error& exception) { |
| 61 | ROS_ERROR_STREAM("PclLoaderParameters: Loading parameters failed: " << exception.what()); |
| 62 | return false; |
| 63 | } |
| 64 | |
| 65 | return true; |
| 66 | } |
| 67 | |
| 68 | const PclLoaderParameters::Parameters& PclLoaderParameters::get() const { |
| 69 | return parameters_; |
nothing calls this directly
no outgoing calls
no test coverage detected