29 const std::vector<std::string> & filtered_links = {},
30 bool transform_inertia =
true,
31 const std::string & base_link =
"",
32 bool with_virtual_links =
true,
33 const std::string & spherical_suffix =
"_spherical",
34 bool remove_filtered_links =
true);
41 operator std::tuple<rbd::MultiBody &, rbd::MultiBodyConfig &, rbd::MultiBodyGraph &>()
43 return std::tie(res.mb, res.mbc, res.mbg);
49 bool transform_inertia_;
50 bool angles_in_degrees_;
51 std::string base_link_;
54 std::map<std::string, rbd::Joint::Type> joint_types_;
55 std::vector<std::string> filtered_links_;
56 bool remove_filtered_links_;
57 bool with_virtual_links_;
58 const std::string & spherical_suffix_;
59 std::unordered_map<std::string, Material> materials_;
60 std::vector<std::string> fixed_links_;
61 std::vector<std::string> removed_links_;
63 Eigen::Matrix3d makeInertia(
double ixx,
double iyy,
double izz,
double iyz,
double ixz,
double ixy);
65 Eigen::Matrix3d MatrixFromRPY(
double r,
double p,
double y);
67 void parseFrame(
const YAML::Node & frame,
const std::string & name, Eigen::Vector3d & xyz, Eigen::Vector3d & rpy);
69 void parseInertia(
const YAML::Node & inertia, Eigen::Matrix3d & inertia_mat);
71 void parseInertial(
const YAML::Node & inertial,
72 const std::string & name,
74 Eigen::Vector3d & xyz,
75 Eigen::Vector3d & rpy,
76 Eigen::Matrix3d & inertia);
78 bool parseGeometry(
const YAML::Node & geometry,
Geometry & data);
80 void parseVisuals(
const YAML::Node & visuals,
81 std::map<std::string, std::vector<Visual>> & data,
82 const std::string & name);
85 void parseMaterial(
const YAML::Node & material);
91 void parseMaterial(
const YAML::Node & material,
Material & out,
bool cache =
true);
93 void parseLink(
const YAML::Node & link);
95 bool parseJointType(
const YAML::Node & type,
96 const std::string & name,
98 std::string & type_name,
101 void parseJointAxis(
const YAML::Node & axis,
const std::string & name, Eigen::Vector3d & joint_axis);
103 void parseJointLimits(
const YAML::Node & limits,
104 const std::string & name,
108 void parseJoint(
const YAML::Node & joint);
113 const std::vector<std::string> & filteredLinksIn = {},
114 bool transformInertia =
true,
115 const std::string & baseLinkIn =
"",
116 bool withVirtualLinks =
true,
117 const std::string & sphericalSuffix =
"_spherical");
121 const std::vector<std::string> & filteredLinksIn = {},
122 bool transformInertia =
true,
123 const std::string & baseLinkIn =
"",
124 bool withVirtualLinks =
true,
125 const std::string & sphericalSuffix =
"_spherical");