kdl_parser.cpp
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2008, Willow Garage, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of the Willow Garage nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 /* Author: Wim Meeussen & Levi Armstrong */
36 
39 #include <boost/graph/depth_first_search.hpp>
40 #include <console_bridge/console.h>
47 #include <tesseract_common/utils.h>
48 
49 namespace tesseract_scene_graph
50 {
51 KDL::Frame convert(const Eigen::Isometry3d& transform)
52 {
53  KDL::Frame frame;
54 
55  // translation
56  frame.p[0] = transform(0, 3);
57  frame.p[1] = transform(1, 3);
58  frame.p[2] = transform(2, 3);
59 
60  // rotation matrix
61  frame.M.data[0] = transform(0, 0);
62  frame.M.data[1] = transform(0, 1);
63  frame.M.data[2] = transform(0, 2);
64  frame.M.data[3] = transform(1, 0);
65  frame.M.data[4] = transform(1, 1);
66  frame.M.data[5] = transform(1, 2);
67  frame.M.data[6] = transform(2, 0);
68  frame.M.data[7] = transform(2, 1);
69  frame.M.data[8] = transform(2, 2);
70 
71  return frame;
72 }
73 
74 Eigen::Isometry3d convert(const KDL::Frame& frame)
75 {
76  Eigen::Isometry3d transform;
77 
78  // translation
79  transform(0, 3) = frame.p[0];
80  transform(1, 3) = frame.p[1];
81  transform(2, 3) = frame.p[2];
82 
83  // rotation matrix
84  transform(0, 0) = frame.M.data[0];
85  transform(0, 1) = frame.M.data[1];
86  transform(0, 2) = frame.M.data[2];
87  transform(1, 0) = frame.M.data[3];
88  transform(1, 1) = frame.M.data[4];
89  transform(1, 2) = frame.M.data[5];
90  transform(2, 0) = frame.M.data[6];
91  transform(2, 1) = frame.M.data[7];
92  transform(2, 2) = frame.M.data[8];
93 
94  // Bottom row
95  transform(3, 0) = 0;
96  transform(3, 1) = 0;
97  transform(3, 2) = 0;
98  transform(3, 3) = 1;
99 
100  return transform;
101 }
102 
103 KDL::Vector convert(const Eigen::Vector3d& vector) { return KDL::Vector{ vector(0), vector(1), vector(2) }; }
104 
105 Eigen::Vector3d convert(const KDL::Vector& vector) { return Eigen::Vector3d{ vector(0), vector(1), vector(2) }; }
106 
107 Eigen::MatrixXd convert(const KDL::Jacobian& jacobian) { return jacobian.data; }
108 
109 KDL::Jacobian convert(const Eigen::MatrixXd& jacobian)
110 {
111  if (jacobian.rows() != 6)
112  throw std::runtime_error("Eigen Jacobian must have six rows!");
113 
114  KDL::Jacobian matrix;
115  matrix.data = jacobian;
116 
117  return matrix;
118 }
119 
120 Eigen::MatrixXd convert(const KDL::Jacobian& jacobian, const std::vector<int>& q_nrs)
121 {
122  Eigen::MatrixXd matrix(jacobian.rows(), q_nrs.size());
123 
124  for (int j = 0; j < static_cast<int>(q_nrs.size()); ++j)
125  {
126  auto c = static_cast<unsigned>(q_nrs[static_cast<size_t>(j)]);
127  matrix.col(j) = jacobian.data.col(c);
128  }
129 
130  return matrix;
131 }
132 
133 KDL::Joint convert(const std::shared_ptr<const Joint>& joint)
134 {
135  KDL::Frame parent_joint = convert(joint->parent_to_joint_origin_transform);
136  const std::string& name = joint->getName();
137 
138  switch (joint->type)
139  {
140  case JointType::FIXED:
142  {
143  return KDL::Joint(name, KDL::Joint::None);
144  }
145  case JointType::REVOLUTE:
146  {
147  KDL::Vector axis = convert(joint->axis);
148  return KDL::Joint{ name, parent_joint.p, parent_joint.M * axis, KDL::Joint::RotAxis };
149  }
151  {
152  KDL::Vector axis = convert(joint->axis);
153  return KDL::Joint{ name, parent_joint.p, parent_joint.M * axis, KDL::Joint::RotAxis };
154  }
156  {
157  KDL::Vector axis = convert(joint->axis);
158  return KDL::Joint{ name, parent_joint.p, parent_joint.M * axis, KDL::Joint::TransAxis };
159  }
160  default:
161  {
162  CONSOLE_BRIDGE_logWarn("Converting unknown joint type of joint '%s' into a fixed joint", name.c_str());
163  return KDL::Joint(name, KDL::Joint::None);
164  }
165  }
166 }
167 
168 KDL::RigidBodyInertia convert(const std::shared_ptr<const Inertial>& inertial)
169 {
170  KDL::Frame origin = convert(inertial->origin);
171 
172  // the mass is frame independent
173  double kdl_mass = inertial->mass;
174 
175  // kdl and urdf both specify the com position in the reference frame of the link
176  KDL::Vector kdl_com = origin.p;
177 
178  // kdl specifies the inertia matrix in the reference frame of the link,
179  // while the urdf specifies the inertia matrix in the inertia reference frame
180  KDL::RotationalInertia urdf_inertia =
181  KDL::RotationalInertia(inertial->ixx, inertial->iyy, inertial->izz, inertial->ixy, inertial->ixz, inertial->iyz);
182 
183  // Rotation operators are not defined for rotational inertia,
184  // so we use the RigidBodyInertia operators (with com = 0) as a workaround
185  KDL::RigidBodyInertia kdl_inertia_wrt_com_workaround =
186  origin.M * KDL::RigidBodyInertia(0, KDL::Vector::Zero(), urdf_inertia);
187 
188  // Note that the RigidBodyInertia constructor takes the 3d inertia wrt the com
189  // while the getRotationalInertia method returns the 3d inertia wrt the frame origin
190  // (but having com = Vector::Zero() in kdl_inertia_wrt_com_workaround they match)
191  KDL::RotationalInertia kdl_inertia_wrt_com = kdl_inertia_wrt_com_workaround.getRotationalInertia();
192 
193  return KDL::RigidBodyInertia(kdl_mass, kdl_com, kdl_inertia_wrt_com);
194 }
195 
196 bool KDLTreeData::operator==(const KDLTreeData& rhs) const
197 {
198  bool equal = true;
199  equal &= (base_link_name == rhs.base_link_name);
200  equal &= (joint_names == rhs.joint_names);
201  equal &= (active_joint_names == rhs.active_joint_names);
202  equal &= (floating_joint_names == rhs.floating_joint_names);
203  equal &= (link_names == rhs.link_names);
204  equal &= (active_link_names == rhs.active_link_names);
205  equal &= (static_link_names == rhs.static_link_names);
206 
207  auto isometry_equal = [](const Eigen::Isometry3d& iso_1, const Eigen::Isometry3d& iso_2) {
208  return iso_1.isApprox(iso_2, 1e-5);
209  };
210  equal &= tesseract_common::isIdenticalMap<tesseract_common::TransformMap, Eigen::Isometry3d>(
211  floating_joint_values, rhs.floating_joint_values, isometry_equal);
212 
213  return equal;
214 }
215 
216 bool KDLTreeData::operator!=(const KDLTreeData& rhs) const { return !operator==(rhs); }
217 
222 struct kdl_tree_builder : public boost::dfs_visitor<>
223 {
224  kdl_tree_builder(KDLTreeData& data) : data_(data) {}
225 
226  template <class u, class g>
227  void discover_vertex(u vertex, const g& graph)
228  {
229  const Link::ConstPtr& link = boost::get(boost::vertex_link, graph)[vertex];
230 
231  // constructs the optional inertia
232  KDL::RigidBodyInertia inert(0);
233  if (link->inertial)
234  inert = convert(link->inertial);
235 
236  // Get incoming edges
237  auto num_in_edges = static_cast<int>(boost::in_degree(vertex, graph));
238  if (num_in_edges == 0) // The root of the tree will have not incoming edges
239  {
240  std::size_t num_v = boost::num_vertices(graph);
241  std::size_t num_e = boost::num_edges(graph);
242  data_.link_names.reserve(num_v);
243  data_.active_link_names.reserve(num_v);
244  data_.static_link_names.reserve(num_v);
245  data_.joint_names.reserve(num_e);
246  data_.active_joint_names.reserve(num_e);
247  data_.floating_joint_names.reserve(num_e);
248 
249  data_.link_names.push_back(link->getName());
250  data_.static_link_names.push_back(link->getName());
251  data_.base_link_name = link->getName();
252  return;
253  }
254 
255  data_.link_names.push_back(link->getName());
256 
257  boost::graph_traits<Graph>::in_edge_iterator ei, ei_end;
258  boost::tie(ei, ei_end) = boost::in_edges(vertex, graph);
260  const Joint::ConstPtr& parent_joint = boost::get(boost::edge_joint, graph)[e];
261  data_.joint_names.push_back(parent_joint->getName());
262 
263  if (parent_joint->type == JointType::FLOATING)
264  {
265  data_.floating_joint_names.push_back(parent_joint->getName());
266  data_.floating_joint_values[parent_joint->getName()] = parent_joint->parent_to_joint_origin_transform;
267  }
268 
269  KDL::Joint kdl_jnt = convert(parent_joint);
270  if (kdl_jnt.getType() != KDL::Joint::None)
271  {
272  data_.active_joint_names.push_back(parent_joint->getName());
273  data_.active_link_names.push_back(link->getName());
274  }
275  else
276  {
277  auto it =
278  std::find(data_.active_link_names.begin(), data_.active_link_names.end(), parent_joint->parent_link_name);
279  if (it != data_.active_link_names.end())
280  data_.active_link_names.push_back(link->getName());
281  else
282  data_.static_link_names.push_back(link->getName());
283  }
284 
285  // construct the kdl segment
286  KDL::Segment sgm(link->getName(), kdl_jnt, convert(parent_joint->parent_to_joint_origin_transform), inert);
287 
288  // add segment to tree
289  data_.tree.addSegment(sgm, parent_joint->parent_link_name);
290  }
291 
292 protected:
293  KDLTreeData& data_; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
294 };
295 
300 struct kdl_sub_tree_builder : public boost::dfs_visitor<>
301 {
302  kdl_sub_tree_builder(KDLTreeData& data,
303  const std::vector<std::string>& joint_names,
304  const std::unordered_map<std::string, double>& joint_values,
305  const tesseract_common::TransformMap& floating_joint_values)
306  : data_(data), joint_names_(joint_names), joint_values_(joint_values), floating_joint_values_(floating_joint_values)
307  {
308  for (const auto& floating_joint_value : floating_joint_values)
309  data_.floating_joint_values.at(floating_joint_value.first) = floating_joint_value.second;
310  }
311 
312  template <class u, class g>
313  void discover_vertex(u vertex, const g& graph)
314  {
315  const Link::ConstPtr& link = boost::get(boost::vertex_link, graph)[vertex];
316 
317  // constructs the optional inertia
318  KDL::RigidBodyInertia inert(0);
319  if (link->inertial)
320  inert = convert(link->inertial);
321 
322  // Get incoming edges
323  auto num_in_edges = static_cast<int>(boost::in_degree(vertex, graph));
324  if (num_in_edges == 0) // The root of the tree will have not incoming edges
325  {
326  data_.base_link_name = link->getName();
327  data_.tree = KDL::Tree(link->getName());
328  segment_transforms_[link->getName()] = KDL::Frame::Identity();
329 
330  std::size_t num_v = boost::num_vertices(graph);
331  std::size_t num_e = boost::num_edges(graph);
332  data_.link_names.reserve(num_v);
333  data_.static_link_names.reserve(num_v);
334  data_.active_link_names.reserve(num_v);
335  data_.active_joint_names.reserve(num_e);
336 
337  data_.link_names.push_back(link->getName());
338  data_.static_link_names.push_back(link->getName());
339  return;
340  }
341 
342  boost::graph_traits<Graph>::in_edge_iterator ei, ei_end;
343  boost::tie(ei, ei_end) = boost::in_edges(vertex, graph);
344  SceneGraph::Edge e = *ei;
345  const Joint::ConstPtr& parent_joint = boost::get(boost::edge_joint, graph)[e];
346  bool found = (std::find(joint_names_.begin(), joint_names_.end(), parent_joint->getName()) != joint_names_.end());
347  KDL::Joint kdl_jnt = convert(parent_joint);
348  KDL::Frame parent_to_joint = (parent_joint->type == JointType::FLOATING) ?
349  convert(data_.floating_joint_values.at(parent_joint->getName())) :
350  convert(parent_joint->parent_to_joint_origin_transform);
351 
352  KDL::Segment kdl_sgm(link->getName(), kdl_jnt, parent_to_joint, inert);
353  std::string parent_link_name = parent_joint->parent_link_name;
354 
355  if (parent_joint->type == JointType::FIXED || parent_joint->type == JointType::FLOATING)
356  segment_transforms_[parent_joint->child_link_name] = segment_transforms_[parent_link_name] * kdl_sgm.pose(0.0);
357  else
358  segment_transforms_[parent_joint->child_link_name] =
359  segment_transforms_[parent_link_name] * kdl_sgm.pose(joint_values_.at(parent_joint->getName()));
360 
361  if (!started_ && found)
362  {
363  started_ = found;
364 
365  // construct the kdl segment to root if needed
366  if (parent_link_name != data_.base_link_name)
367  {
368  std::string world_joint_name = data_.base_link_name + "_" + parent_link_name;
369  KDL::Segment world_sgm = KDL::Segment(parent_link_name,
370  KDL::Joint(world_joint_name, KDL::Joint::None),
371  segment_transforms_[parent_link_name],
372  KDL::RigidBodyInertia(0));
373  data_.tree.addSegment(world_sgm, data_.base_link_name);
374  }
375  link_names_.push_back(parent_link_name);
376  link_names_.push_back(link->getName());
377  data_.static_link_names.push_back(parent_link_name);
378  data_.link_names.push_back(parent_link_name);
379  data_.link_names.push_back(link->getName());
380  data_.active_link_names.push_back(link->getName());
381  data_.active_joint_names.push_back(parent_joint->getName());
382 
383  // construct the kdl segment
384  KDL::Segment sgm = KDL::Segment(link->getName(), kdl_jnt, parent_to_joint, inert);
385 
386  // add segment to tree
387  data_.tree.addSegment(sgm, parent_link_name);
388  }
389  else if (started_)
390  {
391  auto it = std::find(link_names_.begin(), link_names_.end(), parent_link_name);
392 
393  if (it == link_names_.end() && !found)
394  return;
395 
396  if (it == link_names_.end() && found)
397  {
398  data_.link_names.push_back(parent_link_name);
399  link_names_.push_back(parent_link_name);
400  data_.static_link_names.push_back(parent_link_name);
401 
402  KDL::Frame new_tree_parent_to_joint =
403  segment_transforms_[data_.base_link_name].Inverse() * segment_transforms_[parent_joint->parent_link_name];
404 
405  // construct the kdl segment
406  std::string new_joint_name = data_.base_link_name + "_to_" + parent_link_name + "_joint";
407  KDL::Segment sgm = KDL::Segment(parent_link_name,
408  KDL::Joint(new_joint_name, KDL::Joint::None),
409  new_tree_parent_to_joint,
410  KDL::RigidBodyInertia(0));
411 
412  // add segment to tree
413  data_.tree.addSegment(sgm, data_.base_link_name);
414  }
415  else if (it != link_names_.end() && !found)
416  {
417  if (parent_joint->type == JointType::FIXED || parent_joint->type == JointType::FLOATING)
418  parent_to_joint = kdl_sgm.pose(0.0);
419  else
420  parent_to_joint = kdl_sgm.pose(joint_values_.at(parent_joint->getName()));
421 
422  kdl_jnt = KDL::Joint(parent_joint->getName(), KDL::Joint::None);
423  }
424 
425  data_.link_names.push_back(link->getName());
426  link_names_.push_back(link->getName());
427 
428  auto active_it = std::find(data_.active_link_names.begin(), data_.active_link_names.end(), parent_link_name);
429  if (active_it != data_.active_link_names.end() || kdl_jnt.getType() != KDL::Joint::None)
430  data_.active_link_names.push_back(link->getName());
431  else
432  data_.static_link_names.push_back(link->getName());
433 
434  if (kdl_jnt.getType() != KDL::Joint::None)
435  data_.active_joint_names.push_back(parent_joint->getName());
436 
437  // construct the kdl segment
438  KDL::Segment sgm = KDL::Segment(link->getName(), kdl_jnt, parent_to_joint, inert);
439 
440  // add segment to tree
441  data_.tree.addSegment(sgm, parent_link_name);
442  }
443  }
444 
445 protected:
446  KDLTreeData& data_; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
447  int search_cnt_{ -1 };
448  bool started_{ false };
449  std::map<std::string, KDL::Frame> segment_transforms_;
450  std::vector<std::string> link_names_;
451 
452  const std::vector<std::string>& joint_names_; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
453  // NOLINTNEXTLINE(cppcoreguidelines-avoid-const-or-ref-data-members)
454  const std::unordered_map<std::string, double>& joint_values_;
455  // NOLINTNEXTLINE(cppcoreguidelines-avoid-const-or-ref-data-members)
457 };
458 
459 KDLTreeData parseSceneGraph(const SceneGraph& scene_graph)
460 {
461  if (!scene_graph.isTree())
462  throw std::runtime_error("parseSubSceneGraph: currently only works if the scene graph is a tree.");
463 
464  const std::string& root_name = scene_graph.getRoot();
465  const Link::ConstPtr& root_link = scene_graph.getLink(root_name);
466 
467  KDLTreeData data;
468  data.tree = KDL::Tree(root_name);
469 
470  // warn if root link has inertia. KDL does not support this
471  if (root_link->inertial)
472  {
473  CONSOLE_BRIDGE_logWarn("The root link %s has an inertia specified in the URDF, but KDL does not "
474  "support a root link with an inertia. As a workaround, you can add an extra "
475  "dummy link to your URDF.",
476  root_name.c_str());
477  }
478 
479  kdl_tree_builder builder(data);
480 
481  std::map<SceneGraph::Vertex, size_t> index_map;
482  boost::associative_property_map<std::map<SceneGraph::Vertex, size_t>> prop_index_map(index_map);
483 
484  int c = 0;
485  Graph::vertex_iterator i, iend;
486  for (boost::tie(i, iend) = boost::vertices(scene_graph); i != iend; ++i, ++c)
487  boost::put(prop_index_map, *i, c);
488 
489  boost::depth_first_search(
490  static_cast<const Graph&>(scene_graph),
491  boost::visitor(builder).root_vertex(scene_graph.getVertex(root_name)).vertex_index_map(prop_index_map));
492 
493  assert(data.link_names.size() == scene_graph.getLinks().size());
494  assert(data.active_joint_names.size() <= scene_graph.getJoints().size());
495  assert(data.active_link_names.size() < scene_graph.getLinks().size());
496  return data;
497 }
498 
499 KDLTreeData parseSceneGraph(const SceneGraph& scene_graph,
500  const std::vector<std::string>& joint_names,
501  const std::unordered_map<std::string, double>& joint_values,
502  const tesseract_common::TransformMap& floating_joint_values)
503 {
504  if (!scene_graph.isTree())
505  throw std::runtime_error("parseSubSceneGraph: currently only works if the scene graph is a tree.");
506 
507  KDLTreeData data;
508  data.tree = KDL::Tree(scene_graph.getRoot());
509 
510  kdl_sub_tree_builder builder(data, joint_names, joint_values, floating_joint_values);
511 
512  std::map<SceneGraph::Vertex, size_t> index_map;
513  boost::associative_property_map<std::map<SceneGraph::Vertex, size_t>> prop_index_map(index_map);
514 
515  int c = 0;
516  Graph::vertex_iterator i, iend;
517  for (boost::tie(i, iend) = boost::vertices(scene_graph); i != iend; ++i, ++c)
518  boost::put(prop_index_map, *i, c);
519 
520  boost::depth_first_search(static_cast<const Graph&>(scene_graph),
521  boost::visitor(builder)
522  .root_vertex(scene_graph.getVertex(scene_graph.getRoot()))
523  .vertex_index_map(prop_index_map));
524 
525  if (data.tree.getNrOfJoints() != joint_names.size())
526  throw std::runtime_error("parseSubSceneGraph: failed to generate sub-tree given the provided joint names.");
527 
528  return data;
529 }
530 
531 } // namespace tesseract_scene_graph
tesseract_scene_graph::JointType::REVOLUTE
@ REVOLUTE
tesseract_scene_graph::Graph
boost::adjacency_list< boost::listS, boost::listS, boost::bidirectionalS, VertexProperty, EdgeProperty, GraphProperty > Graph
Definition: graph.h:108
boost::edge_joint
@ edge_joint
Definition: graph.h:65
tesseract_scene_graph::JointType::FLOATING
@ FLOATING
tesseract_scene_graph::kdl_sub_tree_builder::joint_names_
const std::vector< std::string > & joint_names_
Definition: kdl_parser.cpp:484
tesseract_scene_graph::kdl_sub_tree_builder::data_
KDLTreeData & data_
Definition: kdl_parser.cpp:478
tesseract_scene_graph::KDLTreeData::active_joint_names
std::vector< std::string > active_joint_names
Definition: kdl_parser.h:164
tesseract_scene_graph::KDLTreeData::static_link_names
std::vector< std::string > static_link_names
Definition: kdl_parser.h:168
utils.h
boost::vertex_link
@ vertex_link
Definition: graph.h:53
tesseract_common::TransformMap
AlignedMap< std::string, Eigen::Isometry3d > TransformMap
tesseract_scene_graph::SceneGraph::Edge
SceneGraph::edge_descriptor Edge
Definition: graph.h:133
tesseract_scene_graph::kdl_tree_builder::discover_vertex
void discover_vertex(u vertex, const g &graph)
Definition: kdl_parser.cpp:259
tesseract_scene_graph::convert
KDL::Frame convert(const Eigen::Isometry3d &transform)
Convert Eigen::Isometry3d to KDL::Frame.
Definition: kdl_parser.cpp:83
tesseract_scene_graph::kdl_sub_tree_builder::kdl_sub_tree_builder
kdl_sub_tree_builder(KDLTreeData &data, const std::vector< std::string > &joint_names, const std::unordered_map< std::string, double > &joint_values, const tesseract_common::TransformMap &floating_joint_values)
Definition: kdl_parser.cpp:334
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
tesseract_scene_graph::Joint::ConstPtr
std::shared_ptr< const Joint > ConstPtr
Definition: joint.h:278
tesseract_scene_graph::KDLTreeData::link_names
std::vector< std::string > link_names
Definition: kdl_parser.h:166
joint.h
tesseract_scene_graph::parseSceneGraph
KDLTreeData parseSceneGraph(const SceneGraph &scene_graph)
Convert a Tesseract SceneGraph into a KDL Tree.
Definition: kdl_parser.cpp:491
tesseract_scene_graph::KDLTreeData::base_link_name
std::string base_link_name
Definition: kdl_parser.h:162
tesseract_scene_graph::JointType::PRISMATIC
@ PRISMATIC
tesseract_scene_graph::KDLTreeData::active_link_names
std::vector< std::string > active_link_names
Definition: kdl_parser.h:167
tesseract_scene_graph::kdl_sub_tree_builder::search_cnt_
int search_cnt_
Definition: kdl_parser.cpp:479
tesseract_scene_graph::KDLTreeData::floating_joint_names
std::vector< std::string > floating_joint_names
Definition: kdl_parser.h:165
kdl_parser.h
tesseract_scene_graph::kdl_sub_tree_builder::link_names_
std::vector< std::string > link_names_
Definition: kdl_parser.cpp:482
tesseract_scene_graph::kdl_sub_tree_builder::started_
bool started_
Definition: kdl_parser.cpp:480
tesseract_scene_graph::KDLTreeData::operator!=
bool operator!=(const KDLTreeData &rhs) const
Definition: kdl_parser.cpp:248
tesseract_scene_graph::JointType::CONTINUOUS
@ CONTINUOUS
tesseract_scene_graph::KDLTreeData::joint_names
std::vector< std::string > joint_names
Definition: kdl_parser.h:163
graph.h
A basic scene graph using boost.
eigen_types.h
TESSERACT_COMMON_IGNORE_WARNINGS_POP
#define TESSERACT_COMMON_IGNORE_WARNINGS_POP
tesseract_scene_graph::kdl_sub_tree_builder::discover_vertex
void discover_vertex(u vertex, const g &graph)
Definition: kdl_parser.cpp:345
tesseract_scene_graph::KDLTreeData::floating_joint_values
tesseract_common::TransformMap floating_joint_values
Definition: kdl_parser.h:169
tesseract_scene_graph::KDLTreeData::operator==
bool operator==(const KDLTreeData &rhs) const
Definition: kdl_parser.cpp:228
tesseract_scene_graph::kdl_tree_builder
Every time a vertex is visited for the first time add a new segment to the KDL Tree;.
Definition: kdl_parser.cpp:254
tesseract_scene_graph::kdl_tree_builder::data_
KDLTreeData & data_
Definition: kdl_parser.cpp:325
tesseract_scene_graph::kdl_tree_builder::kdl_tree_builder
kdl_tree_builder(KDLTreeData &data)
Definition: kdl_parser.cpp:256
macros.h
tesseract_scene_graph
Definition: fwd.h:32
tesseract_scene_graph::KDLTreeData::tree
EIGEN_MAKE_ALIGNED_OPERATOR_NEW KDL::Tree tree
Definition: kdl_parser.h:161
tesseract_scene_graph::JointType::FIXED
@ FIXED
tesseract_scene_graph::kdl_sub_tree_builder::joint_values_
const std::unordered_map< std::string, double > & joint_values_
Definition: kdl_parser.cpp:486
tesseract_scene_graph::kdl_sub_tree_builder::floating_joint_values_
const tesseract_common::TransformMap & floating_joint_values_
Definition: kdl_parser.cpp:488
tesseract_scene_graph::kdl_sub_tree_builder::segment_transforms_
std::map< std::string, KDL::Frame > segment_transforms_
Definition: kdl_parser.cpp:481


tesseract_scene_graph
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:01:49