8#ifndef TRANSFORMS_DICTIONARY_H
9#define TRANSFORMS_DICTIONARY_H
20template <
class TRANSFORM_TYPE>
36 std::pair<std::string, std::string> framePair(frame1, frame2);
42 virtual bool removeTransform(
const std::string& frame1,
const std::string& frame2, TRANSFORM_TYPE& removedTransform) {
43 std::pair<std::string, std::string> framePair(frame1, frame2);
52 removedTransform = framePairTransformMapIterator->second;
65 throw std::runtime_error(
"No frame1 given.");
66 }
else if (frame2 ==
"") {
68 throw std::runtime_error(
"No frame2 given.");
70 std::pair<std::string, std::string> framePair(frame1, frame2);
76 const TRANSFORM_TYPE&
rv_T_frame1_frame2(
const std::string& frame1,
const std::string& frame2)
const {
78 if (frame1 == frame2) {
82 std::pair<std::string, std::string> framePair(frame1, frame2);
85 std::cout <<
YELLOW_START <<
"GMsf-TransformsDict" <<
COLOR_END <<
" No transform found between " << frame1 <<
" and " << frame2
87 throw std::runtime_error(
"No transform found for " + frame1 +
" and " + frame2 +
".");
89 return keyIterator->second;
103 std::cout <<
YELLOW_START <<
"GMsf-TransformsDict" <<
COLOR_END <<
" Transformation pair " << frame1 <<
" and " << frame2
104 <<
" already exists." << std::endl;
112 void set_T_frame1_frame2(
const std::string& frame1,
const std::string& frame2,
const TRANSFORM_TYPE T_frame1_frame2) {