@@ -74,42 +74,6 @@ inline sva::PTransformd convert(const Magnum::Matrix4 & m)
7474 return {r_map.cast <double >(), t_map.cast <double >()};
7575}
7676
77- inline fs::path convertURI (const std::string & uri, [[maybe_unused]] std::string_view default_dir = " " )
78- {
79- const std::string package = " package://" ;
80- if (uri.size () >= package.size () && uri.find (package) == 0 )
81- {
82- size_t split = uri.find (' /' , package.size ());
83- std::string pkg = uri.substr (package.size (), split - package.size ());
84- auto leaf = fs::path (uri.substr (split + 1 ));
85- fs::path MC_ENV_DESCRIPTION_PATH (mc_rtc::MC_ENV_DESCRIPTION_PATH );
86- #ifndef __EMSCRIPTEN__
87- # ifndef MC_RTC_HAS_ROS_SUPPORT
88- // FIXME Prompt the user for unknown packages
89- if (pkg == " jvrc_description" ) { pkg = (MC_ENV_DESCRIPTION_PATH / " .." / " jvrc_description" ).string (); }
90- else if (pkg == " mc_env_description" ) { pkg = MC_ENV_DESCRIPTION_PATH .string (); }
91- else if (pkg == " mc_int_obj_description" )
92- {
93- pkg = (MC_ENV_DESCRIPTION_PATH / " .." / " mc_int_obj_description" ).string ();
94- }
95- else { pkg = default_dir; }
96- # else
97- # ifdef MC_RTC_ROS_IS_ROS2
98- pkg = ament_index_cpp::get_package_share_directory (pkg);
99- # else
100- pkg = ros::package::getPath (pkg);
101- # endif
102- # endif
103- #else
104- pkg = " /assets/" + pkg;
105- #endif
106- return pkg / leaf;
107- }
108- const std::string file = " file://" ;
109- if (uri.size () >= file.size () && uri.find (file) == 0 ) { return fs::path (uri.substr (file.size ())); }
110- return uri;
111- }
112-
11377inline Magnum::Color4 color (const rbd::parsers::Material & m)
11478{
11579 if (m.type == rbd::parsers::Material::Type::COLOR )
0 commit comments