We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 94e32fb + 0dc5381 commit d2ab716Copy full SHA for d2ab716
src/robot_dart/robot.cpp
@@ -1927,7 +1927,14 @@ namespace robot_dart {
1927
boost::filesystem::path path(model_file);
1928
std::string extension = path.extension().string();
1929
if (extension == ".urdf") {
1930
+#if DART_VERSION_AT_LEAST(6, 12, 0)
1931
+ dart::io::DartLoader::Options options;
1932
+ // if links have no inertia, we put ~zero mass and very very small inertia
1933
+ options.mDefaultInertia = dart::dynamics::Inertia(1e-10, Eigen::Vector3d::Zero(), Eigen::Matrix3d::Identity() * 1e-12);
1934
+ dart::io::DartLoader loader(options);
1935
+#else
1936
dart::io::DartLoader loader;
1937
+#endif
1938
for (size_t i = 0; i < packages.size(); i++) {
1939
std::string package = std::get<1>(packages[i]);
1940
std::string package_path = _get_path(package);
0 commit comments