Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
yaml_utils.h
Go to the documentation of this file.
1
26#ifndef TESSERACT_COMMON_YAML_UTILS_H
27#define TESSERACT_COMMON_YAML_UTILS_H
28
31#include <yaml-cpp/yaml.h>
32#include <set>
33#include <array>
34#include <console_bridge/console.h>
36
39
40namespace tesseract_common
41{
47inline std::string toYAMLString(const YAML::Node& node)
48{
49 std::stringstream stream;
50 stream << node;
51 return stream.str();
52}
58inline YAML::Node fromYAMLString(const std::string& string) { return YAML::Load(string); }
65inline bool compareYAML(const YAML::Node& node1, const YAML::Node& node2)
66{
67 if (node1.is(node2))
68 return true;
69
70 if (node1.Type() != node2.Type())
71 return false;
72
73 switch (node1.Type())
74 {
75 case YAML::NodeType::Scalar:
76 {
77 try
78 {
79 auto v1 = node1.as<bool>();
80 auto v2 = node2.as<bool>();
81 return (v1 == v2);
82 }
83 catch (YAML::TypedBadConversion<bool>& /*e*/)
84 {
85 try
86 {
87 auto v1 = node1.as<int>();
88 auto v2 = node2.as<int>();
89 return (v1 == v2);
90 }
91 catch (YAML::TypedBadConversion<int>& /*e*/)
92 {
93 try
94 {
95 auto v1 = node1.as<double>();
96 auto v2 = node2.as<double>();
97 return almostEqualRelativeAndAbs(v1, v2, 1e-6, std::numeric_limits<float>::epsilon());
98 }
99 catch (YAML::TypedBadConversion<double>& /*e*/)
100 {
101 try
102 {
103 auto v1 = node1.as<std::string>();
104 auto v2 = node2.as<std::string>();
105 return (v1 == v2);
106 }
107 catch (YAML::TypedBadConversion<std::string>& /*e*/)
108 {
109 return false;
110 }
111 }
112 }
113 }
114 }
115 case YAML::NodeType::Null:
116 return true;
117 case YAML::NodeType::Undefined:
118 return false;
119 case YAML::NodeType::Map:
120 case YAML::NodeType::Sequence:
121 if (node1.size() != node2.size())
122 return false;
123 }
124
125 if (node1.IsMap())
126 {
127 bool result = true;
128 for (YAML::const_iterator it1 = node1.begin(), it2; it1 != node1.end() && result; ++it1)
129 {
130 for (it2 = node2.begin(); it2 != node2.end(); ++it2)
131 {
132 if (compareYAML(it1->first, it2->first))
133 break;
134 }
135 if (it2 == node2.end())
136 return false;
137
138 result = compareYAML(it1->second, it2->second);
139 }
140 return result;
141 }
142
143 return std::equal(node1.begin(), node1.end(), node2.begin(), compareYAML);
144}
145} // namespace tesseract_common
146
147namespace YAML
148{
149template <>
150struct convert<tesseract_common::PluginInfo>
151{
152 static Node encode(const tesseract_common::PluginInfo& rhs)
153 {
154 Node node;
155 node["class"] = rhs.class_name;
156
157 if (!rhs.config.IsNull())
158 node["config"] = rhs.config;
159
160 return node;
161 }
162
163 static bool decode(const Node& node, tesseract_common::PluginInfo& rhs)
164 {
165 // Check for required entries
166 if (!node["class"])
167 throw std::runtime_error("PluginInfo, missing 'class' entry!");
168
169 rhs.class_name = node["class"].as<std::string>();
170
171 if (node["config"]) // NOLINT
172 rhs.config = node["config"];
173
174 return true;
175 }
176};
177
178template <>
179struct convert<tesseract_common::PluginInfoContainer>
180{
182 {
183 Node node;
184 if (!rhs.default_plugin.empty())
185 node["default"] = rhs.default_plugin;
186
187 node["plugins"] = rhs.plugins;
188
189 return node;
190 }
191
192 static bool decode(const Node& node, tesseract_common::PluginInfoContainer& rhs)
193 {
194 if (node["default"]) // NOLINT
195 rhs.default_plugin = node["default"].as<std::string>();
196
197 if (!node["plugins"]) // NOLINT
198 throw std::runtime_error("PluginInfoContainer, missing 'plugins' entry!");
199
200 const Node& plugins = node["plugins"];
201 if (!plugins.IsMap())
202 throw std::runtime_error("PluginInfoContainer, 'plugins' should contain a map of plugins!");
203
204 try
205 {
207 }
208 catch (const std::exception& e)
209 {
210 throw std::runtime_error(std::string("PluginInfoContainer: Constructor failed to cast 'plugins' to "
211 "tesseract_common::PluginInfoMap! Details: ") +
212 e.what());
213 }
214
215 return true;
216 }
217};
218
219template <typename T, typename A>
220struct convert<std::set<T, A>>
221{
222 static Node encode(const std::set<T, A>& rhs)
223 {
224 Node node(NodeType::Sequence);
225 for (const auto& element : rhs)
226 node.push_back(element);
227 return node;
228 }
229
230 static bool decode(const Node& node, std::set<T, A>& rhs)
231 {
232 if (!node.IsSequence())
233 return false;
234
235 rhs.clear();
236 for (const auto& element : node)
237 rhs.insert(element.as<std::string>());
238
239 return true;
240 }
241};
242
243template <>
244struct convert<Eigen::Isometry3d>
245{
246 static Node encode(const Eigen::Isometry3d& rhs)
247 {
248 Node xyz;
249 xyz["x"] = rhs.translation().x();
250 xyz["y"] = rhs.translation().y();
251 xyz["z"] = rhs.translation().z();
252
253 const Eigen::Quaterniond q(rhs.linear());
254 Node quat;
255 quat["x"] = q.x();
256 quat["y"] = q.y();
257 quat["z"] = q.z();
258 quat["w"] = q.w();
259
260 Node node;
261 node["position"] = xyz;
262 node["orientation"] = quat;
263
264 return node;
265 }
266
267 static bool decode(const Node& node, Eigen::Isometry3d& rhs)
268 {
269 Eigen::Isometry3d out = Eigen::Isometry3d::Identity();
270
271 const YAML::Node& p = node["position"];
272 out.translation().x() = p["x"].as<double>();
273 out.translation().y() = p["y"].as<double>();
274 out.translation().z() = p["z"].as<double>();
275
276 const YAML::Node& o = node["orientation"];
277 if (o["x"] && o["y"] && o["z"] && o["w"]) // NOLINT
278 {
279 Eigen::Quaterniond quat;
280 quat.x() = o["x"].as<double>();
281 quat.y() = o["y"].as<double>();
282 quat.z() = o["z"].as<double>();
283 quat.w() = o["w"].as<double>();
284 quat.normalize();
285
286 out.linear() = quat.toRotationMatrix();
287 }
288 else if (o["r"] && o["p"] && o["y"]) // NOLINT
289 {
290 auto r = o["r"].as<double>();
291 auto p = o["p"].as<double>();
292 auto y = o["y"].as<double>();
293
294 Eigen::AngleAxisd rollAngle(r, Eigen::Vector3d::UnitX());
295 Eigen::AngleAxisd pitchAngle(p, Eigen::Vector3d::UnitY());
296 Eigen::AngleAxisd yawAngle(y, Eigen::Vector3d::UnitZ());
297
298 Eigen::Quaterniond rpy{ yawAngle * pitchAngle * rollAngle };
299
300 out.linear() = rpy.toRotationMatrix();
301 }
302 else
303 {
304 throw std::runtime_error("Eigen::Isometry3d, failed to decode orientation missing (x, y, z, w) or (r, p, y)");
305 }
306
307 rhs = out;
308 return true;
309 }
310};
311
312template <>
313struct convert<Eigen::VectorXd>
314{
315 static Node encode(const Eigen::VectorXd& rhs)
316 {
317 Node node;
318 for (long i = 0; i < rhs.size(); ++i)
319 node.push_back(rhs(i));
320
321 return node;
322 }
323
324 static bool decode(const Node& node, Eigen::VectorXd& rhs)
325 {
326 if (!node.IsSequence())
327 return false;
328
329 rhs.resize(static_cast<Eigen::Index>(node.size()));
330 for (long i = 0; i < node.size(); ++i)
331 rhs(i) = node[i].as<double>();
332
333 return true;
334 }
335};
336
337template <>
338struct convert<Eigen::Vector2d>
339{
340 static Node encode(const Eigen::Vector2d& rhs)
341 {
342 Node node;
343 for (long i = 0; i < rhs.size(); ++i)
344 node.push_back(rhs(i));
345
346 return node;
347 }
348
349 static bool decode(const Node& node, Eigen::Vector2d& rhs)
350 {
351 if (!node.IsSequence() || (node.size() != 2))
352 return false;
353
354 for (long i = 0; i < 2; ++i)
355 rhs(i) = node[i].as<double>();
356
357 return true;
358 }
359};
360
361template <>
362struct convert<tesseract_common::KinematicsPluginInfo>
363{
365 {
366 const std::string SEARCH_PATHS_KEY{ "search_paths" };
367 const std::string SEARCH_LIBRARIES_KEY{ "search_libraries" };
368 const std::string FWD_KIN_PLUGINS_KEY{ "fwd_kin_plugins" };
369 const std::string INV_KIN_PLUGINS_KEY{ "inv_kin_plugins" };
370
371 YAML::Node kinematic_plugins;
372 if (!rhs.search_paths.empty())
373 kinematic_plugins[SEARCH_PATHS_KEY] = rhs.search_paths;
374
375 if (!rhs.search_libraries.empty())
376 kinematic_plugins[SEARCH_LIBRARIES_KEY] = rhs.search_libraries;
377
378 if (!rhs.fwd_plugin_infos.empty())
379 kinematic_plugins[FWD_KIN_PLUGINS_KEY] = rhs.fwd_plugin_infos;
380
381 if (!rhs.inv_plugin_infos.empty())
382 kinematic_plugins[INV_KIN_PLUGINS_KEY] = rhs.inv_plugin_infos;
383
384 return kinematic_plugins;
385 }
386
387 static bool decode(const Node& node, tesseract_common::KinematicsPluginInfo& rhs)
388 {
389 const std::string SEARCH_PATHS_KEY{ "search_paths" };
390 const std::string SEARCH_LIBRARIES_KEY{ "search_libraries" };
391 const std::string FWD_KIN_PLUGINS_KEY{ "fwd_kin_plugins" };
392 const std::string INV_KIN_PLUGINS_KEY{ "inv_kin_plugins" };
393
394 if (const YAML::Node& search_paths = node[SEARCH_PATHS_KEY])
395 {
396 std::set<std::string> sp;
397 try
398 {
399 sp = search_paths.as<std::set<std::string>>();
400 }
401 catch (const std::exception& e)
402 {
403 throw std::runtime_error("KinematicsPluginFactory: Constructor failed to cast '" + SEARCH_PATHS_KEY +
404 "' to std::set<std::string>! "
405 "Details: " +
406 e.what());
407 }
408 rhs.search_paths.insert(sp.begin(), sp.end());
409 }
410
411 if (const YAML::Node& search_libraries = node[SEARCH_LIBRARIES_KEY])
412 {
413 std::set<std::string> sl;
414 try
415 {
416 sl = search_libraries.as<std::set<std::string>>();
417 }
418 catch (const std::exception& e)
419 {
420 throw std::runtime_error("KinematicsPluginFactory: Constructor failed to cast '" + SEARCH_LIBRARIES_KEY +
421 "' to std::set<std::string>! "
422 "Details: " +
423 e.what());
424 }
425 rhs.search_libraries.insert(sl.begin(), sl.end());
426 }
427
428 if (const YAML::Node& fwd_kin_plugins = node[FWD_KIN_PLUGINS_KEY])
429 {
430 if (!fwd_kin_plugins.IsMap())
431 throw std::runtime_error(FWD_KIN_PLUGINS_KEY + ", should contain a map of group names to solver plugins!");
432
433 try
434 {
435 rhs.fwd_plugin_infos = fwd_kin_plugins.as<std::map<std::string, tesseract_common::PluginInfoContainer>>();
436 }
437 catch (const std::exception& e)
438 {
439 throw std::runtime_error("KinematicsPluginFactory: Constructor failed to cast '" + FWD_KIN_PLUGINS_KEY +
440 "' to std::map<std::string, "
441 "tesseract_common::PluginInfoContainer>! Details: " +
442 e.what());
443 }
444 }
445
446 if (const YAML::Node& inv_kin_plugins = node[INV_KIN_PLUGINS_KEY])
447 {
448 if (!inv_kin_plugins.IsMap())
449 throw std::runtime_error(INV_KIN_PLUGINS_KEY + ", should contain a map of group names to solver plugins!");
450
451 try
452 {
453 rhs.inv_plugin_infos = inv_kin_plugins.as<std::map<std::string, tesseract_common::PluginInfoContainer>>();
454 }
455 catch (const std::exception& e)
456 {
457 throw std::runtime_error("KinematicsPluginFactory: Constructor failed to cast '" + INV_KIN_PLUGINS_KEY +
458 "' to std::map<std::string, "
459 "tesseract_common::PluginInfoContainer>! Details: " +
460 e.what());
461 }
462 }
463
464 return true;
465 }
466};
467
468template <>
469struct convert<tesseract_common::ContactManagersPluginInfo>
470{
472 {
473 const std::string SEARCH_PATHS_KEY{ "search_paths" };
474 const std::string SEARCH_LIBRARIES_KEY{ "search_libraries" };
475 const std::string DISCRETE_PLUGINS_KEY{ "discrete_plugins" };
476 const std::string CONTINUOUS_PLUGINS_KEY{ "continuous_plugins" };
477
478 YAML::Node contact_manager_plugins;
479 if (!rhs.search_paths.empty())
480 contact_manager_plugins[SEARCH_PATHS_KEY] = rhs.search_paths;
481
482 if (!rhs.search_libraries.empty())
483 contact_manager_plugins[SEARCH_LIBRARIES_KEY] = rhs.search_libraries;
484
485 if (!rhs.discrete_plugin_infos.plugins.empty())
486 contact_manager_plugins[DISCRETE_PLUGINS_KEY] = rhs.discrete_plugin_infos;
487
488 if (!rhs.continuous_plugin_infos.plugins.empty())
489 contact_manager_plugins[CONTINUOUS_PLUGINS_KEY] = rhs.continuous_plugin_infos;
490
491 return contact_manager_plugins;
492 }
493
494 static bool decode(const Node& node, tesseract_common::ContactManagersPluginInfo& rhs)
495 {
496 const std::string SEARCH_PATHS_KEY{ "search_paths" };
497 const std::string SEARCH_LIBRARIES_KEY{ "search_libraries" };
498 const std::string DISCRETE_PLUGINS_KEY{ "discrete_plugins" };
499 const std::string CONTINUOUS_PLUGINS_KEY{ "continuous_plugins" };
500
501 if (const YAML::Node& search_paths = node[SEARCH_PATHS_KEY])
502 {
503 std::set<std::string> sp;
504 try
505 {
506 sp = search_paths.as<std::set<std::string>>();
507 }
508 catch (const std::exception& e)
509 {
510 throw std::runtime_error("ContactManagersPluginFactory: Constructor failed to cast '" + SEARCH_PATHS_KEY +
511 "' to std::set<std::string>! "
512 "Details: " +
513 e.what());
514 }
515 rhs.search_paths.insert(sp.begin(), sp.end());
516 }
517
518 if (const YAML::Node& search_libraries = node[SEARCH_LIBRARIES_KEY])
519 {
520 std::set<std::string> sl;
521 try
522 {
523 sl = search_libraries.as<std::set<std::string>>();
524 }
525 catch (const std::exception& e)
526 {
527 throw std::runtime_error("ContactManagersPluginFactory: Constructor failed to cast '" + SEARCH_LIBRARIES_KEY +
528 "' to std::set<std::string>! "
529 "Details: " +
530 e.what());
531 }
532 rhs.search_libraries.insert(sl.begin(), sl.end());
533 }
534
535 if (const YAML::Node& discrete_plugins = node[DISCRETE_PLUGINS_KEY])
536 {
537 if (!discrete_plugins.IsMap())
538 throw std::runtime_error(DISCRETE_PLUGINS_KEY + ", should contain a map of contact manager names to plugins!");
539
540 try
541 {
543 }
544 catch (const std::exception& e)
545 {
546 throw std::runtime_error("ContactManagersPluginFactory: Constructor failed to cast '" + DISCRETE_PLUGINS_KEY +
547 "' to tesseract_common::PluginInfoContainer! Details: " + e.what());
548 }
549 }
550
551 if (const YAML::Node& continuous_plugins = node[CONTINUOUS_PLUGINS_KEY])
552 {
553 if (!continuous_plugins.IsMap())
554 throw std::runtime_error(CONTINUOUS_PLUGINS_KEY + ", should contain a map of names to plugins!");
555
556 try
557 {
559 }
560 catch (const std::exception& e)
561 {
562 throw std::runtime_error("ContactManagersPluginFactory: Constructor failed to cast '" + CONTINUOUS_PLUGINS_KEY +
563 "' to tesseract_common::PluginInfoContainer! Details: " + e.what());
564 }
565 }
566
567 return true;
568 }
569};
570
571template <>
572struct convert<tesseract_common::TaskComposerPluginInfo>
573{
575 {
576 const std::string SEARCH_PATHS_KEY{ "search_paths" };
577 const std::string SEARCH_LIBRARIES_KEY{ "search_libraries" };
578 const std::string EXECUTOR_PLUGINS_KEY{ "executors" };
579 const std::string NODE_PLUGINS_KEY{ "tasks" };
580
581 YAML::Node task_composer_plugins;
582 if (!rhs.search_paths.empty())
583 task_composer_plugins[SEARCH_PATHS_KEY] = rhs.search_paths;
584
585 if (!rhs.search_libraries.empty())
586 task_composer_plugins[SEARCH_LIBRARIES_KEY] = rhs.search_libraries;
587
588 if (!rhs.executor_plugin_infos.plugins.empty())
589 task_composer_plugins[EXECUTOR_PLUGINS_KEY] = rhs.executor_plugin_infos;
590
591 if (!rhs.task_plugin_infos.plugins.empty())
592 task_composer_plugins[NODE_PLUGINS_KEY] = rhs.task_plugin_infos;
593
594 return task_composer_plugins;
595 }
596
597 static bool decode(const Node& node, tesseract_common::TaskComposerPluginInfo& rhs)
598 {
599 const std::string SEARCH_PATHS_KEY{ "search_paths" };
600 const std::string SEARCH_LIBRARIES_KEY{ "search_libraries" };
601 const std::string EXECUTOR_PLUGINS_KEY{ "executors" };
602 const std::string NODE_PLUGINS_KEY{ "tasks" };
603
604 if (const YAML::Node& search_paths = node[SEARCH_PATHS_KEY])
605 {
606 std::set<std::string> sp;
607 try
608 {
609 sp = search_paths.as<std::set<std::string>>();
610 }
611 catch (const std::exception& e)
612 {
613 throw std::runtime_error("TaskComposerPluginInfo: Constructor failed to cast '" + SEARCH_PATHS_KEY +
614 "' to std::set<std::string>! "
615 "Details: " +
616 e.what());
617 }
618 rhs.search_paths.insert(sp.begin(), sp.end());
619 }
620
621 if (const YAML::Node& search_libraries = node[SEARCH_LIBRARIES_KEY])
622 {
623 std::set<std::string> sl;
624 try
625 {
626 sl = search_libraries.as<std::set<std::string>>();
627 }
628 catch (const std::exception& e)
629 {
630 throw std::runtime_error("TaskComposerPluginInfo: Constructor failed to cast '" + SEARCH_LIBRARIES_KEY +
631 "' to std::set<std::string>! "
632 "Details: " +
633 e.what());
634 }
635 rhs.search_libraries.insert(sl.begin(), sl.end());
636 }
637
638 if (const YAML::Node& executor_plugins = node[EXECUTOR_PLUGINS_KEY])
639 {
640 if (!executor_plugins.IsMap())
641 throw std::runtime_error(EXECUTOR_PLUGINS_KEY + ", should contain a map of task composer executor names to "
642 "plugins!");
643
644 try
645 {
647 }
648 catch (const std::exception& e)
649 {
650 throw std::runtime_error("TaskComposerPluginInfo: Constructor failed to cast '" + EXECUTOR_PLUGINS_KEY +
651 "' to tesseract_common::PluginInfoContainer! Details: " + e.what());
652 }
653 }
654
655 if (const YAML::Node& node_plugins = node[NODE_PLUGINS_KEY])
656 {
657 if (!node_plugins.IsMap())
658 throw std::runtime_error(NODE_PLUGINS_KEY + ", should contain a map of names to plugins!");
659
660 try
661 {
663 }
664 catch (const std::exception& e)
665 {
666 throw std::runtime_error("TaskComposerPluginInfo: Constructor failed to cast '" + NODE_PLUGINS_KEY +
667 "' to tesseract_common::PluginInfoContainer! Details: " + e.what());
668 }
669 }
670
671 return true;
672 }
673};
674
675template <>
676struct convert<tesseract_common::TransformMap>
677{
679 {
680 Node node;
681 for (const auto& pair : rhs)
682 node[pair.first] = pair.second;
683
684 return node;
685 }
686
687 static bool decode(const Node& node, tesseract_common::TransformMap& rhs)
688 {
689 if (!node.IsMap())
690 return false;
691
692 for (const auto& pair : node)
693 rhs[pair.first.as<std::string>()] = pair.second.as<Eigen::Isometry3d>();
694
695 return true;
696 }
697};
698
699template <>
700struct convert<tesseract_common::CalibrationInfo>
701{
703 {
704 Node node;
705 node["joints"] = rhs.joints;
706
707 return node;
708 }
709
710 static bool decode(const Node& node, tesseract_common::CalibrationInfo& rhs)
711 {
712 const YAML::Node& joints_node = node["joints"];
713
714 rhs.joints = joints_node.as<tesseract_common::TransformMap>();
715
716 return true;
717 }
718};
719} // namespace YAML
720
721#endif // TESSERACT_COMMON_YAML_UTILS_H
const YAML::Node & search_paths
Definition: contact_managers_factory_unit.cpp:157
const YAML::Node & search_libraries
Definition: contact_managers_factory_unit.cpp:158
const YAML::Node & continuous_plugins
Definition: contact_managers_factory_unit.cpp:160
const YAML::Node & discrete_plugins
Definition: contact_managers_factory_unit.cpp:159
q[0]
Definition: kinematics_core_unit.cpp:15
Common Tesseract Macros.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
Definition: yaml_utils.h:148
Definition: allowed_collision_matrix.h:16
std::map< std::string, PluginInfo > PluginInfoMap
A map of PluginInfo to user defined name.
Definition: types.h:130
bool compareYAML(const YAML::Node &node1, const YAML::Node &node2)
Checks if the YAML::Nodes are identical.
Definition: yaml_utils.h:65
AlignedMap< std::string, Eigen::Isometry3d > TransformMap
Definition: types.h:66
std::string toYAMLString(const YAML::Node &node)
Converts a YAML::Node to a yaml string.
Definition: yaml_utils.h:47
YAML::Node fromYAMLString(const std::string &string)
Converts yaml string to a YAML::Node.
Definition: yaml_utils.h:58
bool almostEqualRelativeAndAbs(double a, double b, double max_diff=1e-6, double max_rel_diff=std::numeric_limits< double >::epsilon())
Check if two double are relatively equal.
Definition: utils.cpp:393
static Node encode(const Eigen::Isometry3d &rhs)
Definition: yaml_utils.h:246
static bool decode(const Node &node, Eigen::Isometry3d &rhs)
Definition: yaml_utils.h:267
static Node encode(const Eigen::Vector2d &rhs)
Definition: yaml_utils.h:340
static bool decode(const Node &node, Eigen::Vector2d &rhs)
Definition: yaml_utils.h:349
static bool decode(const Node &node, Eigen::VectorXd &rhs)
Definition: yaml_utils.h:324
static Node encode(const Eigen::VectorXd &rhs)
Definition: yaml_utils.h:315
static bool decode(const Node &node, std::set< T, A > &rhs)
Definition: yaml_utils.h:230
static Node encode(const std::set< T, A > &rhs)
Definition: yaml_utils.h:222
static bool decode(const Node &node, tesseract_common::CalibrationInfo &rhs)
Definition: yaml_utils.h:710
static Node encode(const tesseract_common::CalibrationInfo &rhs)
Definition: yaml_utils.h:702
static Node encode(const tesseract_common::ContactManagersPluginInfo &rhs)
Definition: yaml_utils.h:471
static bool decode(const Node &node, tesseract_common::ContactManagersPluginInfo &rhs)
Definition: yaml_utils.h:494
static Node encode(const tesseract_common::KinematicsPluginInfo &rhs)
Definition: yaml_utils.h:364
static bool decode(const Node &node, tesseract_common::KinematicsPluginInfo &rhs)
Definition: yaml_utils.h:387
static bool decode(const Node &node, tesseract_common::PluginInfoContainer &rhs)
Definition: yaml_utils.h:192
static Node encode(const tesseract_common::PluginInfoContainer &rhs)
Definition: yaml_utils.h:181
static Node encode(const tesseract_common::PluginInfo &rhs)
Definition: yaml_utils.h:152
static bool decode(const Node &node, tesseract_common::PluginInfo &rhs)
Definition: yaml_utils.h:163
static bool decode(const Node &node, tesseract_common::TaskComposerPluginInfo &rhs)
Definition: yaml_utils.h:597
static Node encode(const tesseract_common::TaskComposerPluginInfo &rhs)
Definition: yaml_utils.h:574
static Node encode(const tesseract_common::TransformMap &rhs)
Definition: yaml_utils.h:678
static bool decode(const Node &node, tesseract_common::TransformMap &rhs)
Definition: yaml_utils.h:687
The CalibrationInfo struct.
Definition: types.h:257
tesseract_common::TransformMap joints
The joint origin calibration information.
Definition: types.h:269
The contact managers plugin information structure.
Definition: types.h:185
std::set< std::string > search_libraries
A list of library names without the prefix or suffix that contain plugins.
Definition: types.h:190
tesseract_common::PluginInfoContainer continuous_plugin_infos
A map of name to continuous contact manager plugin information.
Definition: types.h:196
std::set< std::string > search_paths
A list of paths to search for plugins.
Definition: types.h:187
tesseract_common::PluginInfoContainer discrete_plugin_infos
A map of name to discrete contact manager plugin information.
Definition: types.h:193
The kinematics plugin information structure.
Definition: types.h:149
std::map< std::string, tesseract_common::PluginInfoContainer > inv_plugin_infos
A map of group name to inverse kinematics plugin information.
Definition: types.h:160
std::set< std::string > search_libraries
A list of library names without the prefix or suffix that contain plugins.
Definition: types.h:154
std::map< std::string, tesseract_common::PluginInfoContainer > fwd_plugin_infos
A map of group name to forward kinematics plugin information.
Definition: types.h:157
std::set< std::string > search_paths
A list of paths to search for plugins.
Definition: types.h:151
PluginInfoMap plugins
Definition: types.h:135
std::string default_plugin
Definition: types.h:134
The Plugin Information struct.
Definition: types.h:104
std::string class_name
The plugin class name.
Definition: types.h:106
YAML::Node config
The plugin config data.
Definition: types.h:109
The task composer plugin information structure.
Definition: types.h:221
tesseract_common::PluginInfoContainer task_plugin_infos
A map of name to task composer task plugin information.
Definition: types.h:232
tesseract_common::PluginInfoContainer executor_plugin_infos
A map of name to task composer executor plugin information.
Definition: types.h:229
std::set< std::string > search_libraries
A list of library names without the prefix or suffix that contain plugins.
Definition: types.h:226
std::set< std::string > search_paths
A list of paths to search for plugins.
Definition: types.h:223
Common Tesseract Types.
Common Tesseract Utility Functions.
object discrete_plugin_infos plugins["plugin_key"]
Definition: tesseract_common_serialization_unit.cpp:148
std::vector< std::string > v2
Definition: tesseract_common_unit.cpp:418
v1["1"]
Definition: tesseract_common_unit.cpp:434
tinyxml2::XMLElement * element
Definition: tesseract_srdf_unit.cpp:815
auto it2
Definition: tesseract_srdf_unit.cpp:1274