Aikido
DetectedObject-impl.hpp
Go to the documentation of this file.
2 
3 namespace aikido {
4 namespace perception {
5 
6 //==============================================================================
7 template <typename T>
8 T DetectedObject::getInfoByKey(const std::string& key) const
9 {
10  T value;
11  try
12  {
13  value = mYamlNode[key].as<T>();
14  }
15  catch (const YAML::ParserException& ex)
16  {
17  throw std::runtime_error(
18  "[DetectedObject] Error in converting [" + key + "] field");
19  }
20  return value;
21 }
22 
23 } // namespace perception
24 } // namespace aikido
aikido
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
aikido::perception::DetectedObject::getInfoByKey
T getInfoByKey(const std::string &key) const
Get a specific value from the information map by a key and the typename of the field.
Definition: DetectedObject-impl.hpp:8
DetectedObject.hpp
aikido::perception::DetectedObject::mYamlNode
YAML::Node mYamlNode
The information map with additional information of this object.
Definition: DetectedObject.hpp:107