Go to the documentation of this file.
3 #include <console_bridge/console.h>
20 std::string
toString(
bool b) {
return b ?
"true" :
"false"; }
24 console_bridge::setLogLevel(console_bridge::LogLevel::CONSOLE_BRIDGE_LOG_INFO);
31 Link link_1(
"link_1");
32 Link link_2(
"link_2");
33 Link link_3(
"link_3");
34 Link link_4(
"link_4");
35 Link link_5(
"link_5");
47 Joint joint_1(
"joint_1");
53 Joint joint_2(
"joint_2");
59 Joint joint_3(
"joint_3");
65 Joint joint_4(
"joint_4");
81 for (
const auto& adj : adjacent_links)
82 CONSOLE_BRIDGE_logInform(adj.c_str());
87 for (
const auto& inv_adj : inv_adjacent_links)
88 CONSOLE_BRIDGE_logInform(inv_adj.c_str());
93 for (
const auto& child_link : child_link_names)
94 CONSOLE_BRIDGE_logInform(child_link.c_str());
99 for (
const auto& child_link : child_link_names)
100 CONSOLE_BRIDGE_logInform(child_link.c_str());
109 CONSOLE_BRIDGE_logInform(
toString(is_acyclic).c_str());
113 bool is_tree = g.
isTree();
114 CONSOLE_BRIDGE_logInform(
toString(is_tree).c_str());
118 Link link_6(
"link_6");
121 CONSOLE_BRIDGE_logInform(
toString(is_tree).c_str());
127 CONSOLE_BRIDGE_logInform(
toString(is_tree).c_str());
131 Joint joint_5(
"joint_5");
145 CONSOLE_BRIDGE_logInform(
toString(is_acyclic).c_str());
150 CONSOLE_BRIDGE_logInform(
toString(is_tree).c_str());
155 CONSOLE_BRIDGE_logInform(
toString(path).c_str());
std::string getTempPath()
void saveDOT(const std::string &path) const
Saves Graph as Graph Description Language (DOT)
bool isTree() const
Determine if the graph is a tree.
Eigen::Isometry3d parent_to_joint_origin_transform
transform from Parent Link frame to Joint frame
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
bool addLink(const Link &link, bool replace_allowed=false)
Adds a link to the graph.
std::vector< std::string > getAdjacentLinkNames(const std::string &name) const
Get a vector of adjacent link names provided a link name.
std::vector< std::string > getInvAdjacentLinkNames(const std::string &name) const
Geta a vectpr pf inverse adjacent link names provided a link name.
std::string child_link_name
ShortestPath getShortestPath(const std::string &root, const std::string &tip) const
Get the shortest path between two links.
bool addJoint(const Joint &joint)
Adds joint to the graph.
std::string toString(const ShortestPath &path)
std::vector< std::string > getJointChildrenNames(const std::string &name) const
Get all children link names for a given joint name.
Holds the shortest path information.
A basic scene graph using boost.
#define TESSERACT_COMMON_IGNORE_WARNINGS_POP
bool removeLink(const std::string &name, bool recursive=false)
Removes a link from the graph.
JointType type
The type of joint.
bool isAcyclic() const
Determine if the graph contains cycles.
std::string parent_link_name
std::vector< std::string > getLinkChildrenNames(const std::string &name) const
Get all children for a given link name.