|
|
Spoken object names from PriorKnowledgeData, for use as a SpokenNameLookup.
More...
#include <RobotAPI/components/opossum_logger/ObjectSpokenNames.h>
Public Member Functions | |
| SpokenNameLookup | asLookup () |
This resolver as a SpokenNameLookup. Must not outlive this object. | |
| ObjectSpokenNames ()=default | |
| std::optional< std::string > | operator() (const std::string &dataset, const std::string &className) |
The spoken name of an object class, or std::nullopt if it has none. | |
Spoken object names from PriorKnowledgeData, for use as a SpokenNameLookup.
Looks up <dataset>/<className>/<className>_names.json via ObjectFinder; if that yields nothing (the dataset is unknown to PriorKnowledgeData, as for MobileKitchen/mobile-fridge), the class name is searched in all datasets. Results, including misses, are cached: only about a quarter of the known classes carry a names file, so misses are common and re-checking the filesystem for them would be wasteful.
Thread-safe.
Definition at line 51 of file ObjectSpokenNames.h.
|
default |
| SpokenNameLookup asLookup | ( | ) |
This resolver as a SpokenNameLookup. Must not outlive this object.
Definition at line 86 of file ObjectSpokenNames.cpp.
| std::optional< std::string > operator() | ( | const std::string & | dataset, |
| const std::string & | className ) |
The spoken name of an object class, or std::nullopt if it has none.
Definition at line 33 of file ObjectSpokenNames.cpp.
Here is the call graph for this function: