Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
kdl_parser.h
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
37#ifndef TESSERACT_SCENE_GRAPH_KDL_PARSER_H
38#define TESSERACT_SCENE_GRAPH_KDL_PARSER_H
39
42#include <string>
43#include <vector>
44
45#include <kdl/tree.hpp>
46#include <kdl/jacobian.hpp>
47#include <console_bridge/console.h>
49
51
53{
59KDL::Frame convert(const Eigen::Isometry3d& transform);
60
66Eigen::Isometry3d convert(const KDL::Frame& frame);
67
73KDL::Vector convert(const Eigen::Vector3d& vector);
74
80Eigen::Vector3d convert(const KDL::Vector& vector);
81
87Eigen::MatrixXd convert(const KDL::Jacobian& jacobian);
88
94KDL::Jacobian convert(const Eigen::MatrixXd& jacobian);
95
102Eigen::MatrixXd convert(const KDL::Jacobian& jacobian, const std::vector<int>& q_nrs);
103
109KDL::Joint convert(const Joint::ConstPtr& joint);
110
116KDL::RigidBodyInertia convert(const Inertial::ConstPtr& inertial);
117
120{
121 KDL::Tree tree;
122 std::string base_link_name;
123 std::vector<std::string> joint_names;
124 std::vector<std::string> active_joint_names;
125 std::vector<std::string> link_names;
126 std::vector<std::string> active_link_names;
127 std::vector<std::string> static_link_names;
128};
129
138
151 const std::vector<std::string>& joint_names,
152 const std::unordered_map<std::string, double>& joint_values);
153
154} // namespace tesseract_scene_graph
155
156#endif // TESSERACT_SCENE_GRAPH_KDL_PARSER_H
#define vector(a, b, c)
Definition: FloatMath.inl:3227
std::shared_ptr< const Inertial > ConstPtr
Definition: link.h:97
std::shared_ptr< const Joint > ConstPtr
Definition: joint.h:286
Definition: graph.h:125
results transform[0]
Definition: collision_core_unit.cpp:144
A basic scene graph using boost.
auto scene_graph
Definition: ikfast_kinematics_7dof_unit.cpp:51
Eigen::MatrixXd jacobian
Definition: kinematics_core_unit.cpp:153
Common Tesseract Macros.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
Definition: graph.h:82
KDLTreeData parseSceneGraph(const SceneGraph &scene_graph)
Convert a Tesseract SceneGraph into a KDL Tree.
Definition: kdl_parser.cpp:410
KDL::Frame convert(const Eigen::Isometry3d &transform)
Convert Eigen::Isometry3d to KDL::Frame.
Definition: kdl_parser.cpp:41
The KDLTreeData populated when parsing scene graph.
Definition: kdl_parser.h:120
KDL::Tree tree
Definition: kdl_parser.h:121
std::vector< std::string > active_link_names
Definition: kdl_parser.h:126
std::string base_link_name
Definition: kdl_parser.h:122
std::vector< std::string > active_joint_names
Definition: kdl_parser.h:124
std::vector< std::string > link_names
Definition: kdl_parser.h:125
std::vector< std::string > joint_names
Definition: kdl_parser.h:123
std::vector< std::string > static_link_names
Definition: kdl_parser.h:127
joint_state joint_names
Definition: tesseract_common_serialization_unit.cpp:75