V-REP SDF plugin: could not determine the filesystem location of URI model:// ...

Report crashes, strange behaviour, or apparent bugs
Smitty44
Posts: 37
Joined: 20 Mar 2019, 16:50
Location: East coast, US.

V-REP SDF plugin: could not determine the filesystem location of URI model:// ...

Post by Smitty44 »

So, I had a couple minutes this morning before going to work.
I installed 3.6.1 rev2.

After selecting Plugins, SDF import..., the dialog box opened.
I navigated to my model folder, and to the actual SDF model.
Clicked ok.

And an error message came up.

SDF Plugin
! could not determine the filesystem location of URI model:///meshes/CAD/link_Lf_foot.stl

In the console, it showed VREP had started successfully.

SDF: error: could not parse SDF file. trying again ignoring mandatory values...

I did notice in my model folder, model.SDF and the meshes folder are in the same directory.
Should I copy my SDF model into the default models folder?
I could try that next time I get a chance.

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: V-REP crashes after selecting SDF import option from Plugins drop down menu

Post by fferri »

Hi Smitty44,

model:// URIs should be in the form model://package/path, for example model://mypackage/meshes/cad/test.stl, so your directory structure should be:

path/to/mypackage/file.sdf
path/to/mypackage/meshes/cad/test.stl

Alternatively, you can use file:// URIs (more reliable), which allow you to specify an URI relative to the SDF file, e.g.: file://meshes/cad/test.stl

Smitty44
Posts: 37
Joined: 20 Mar 2019, 16:50
Location: East coast, US.

Re: V-REP crashes after selecting SDF import option from Plugins drop down menu

Post by Smitty44 »

I am brand new to VREP. I don't understand what you are telling me to modify or where to modify it.
Does URI stand for - uniform resource identifier?
Do I change model:// using a Lua script? Just typing it in the line at the bottom of the screen?
What does the word package represent?

My directory structure is:

Folder on my desktop,
VREP models/Biped/file.sdf
VREP models/Biped/Meshes/CAD/test.stl

When I choose Plugins, and then SDF import...there is nothing else to do but navigate to the file.sdf.

Sorry, I am just extremely new to this software.
Thank you for your help.

Smitty44
Posts: 37
Joined: 20 Mar 2019, 16:50
Location: East coast, US.

Re: V-REP crashes after selecting SDF import option from Plugins drop down menu

Post by Smitty44 »

I have been doing a number of searches and I found a post from 2015:

by coppelia » 25 Aug 2015, 15:33
coppelia wrote:Ok, this was added for next release (V3.2.2, but not in the beta!).
You can now specify following in the system/usrset.txt file:

Code: Select all

 // Directories
 // =================================================
 defaultDirectoryForScenes = // absolute path, e.g. d:/myScenes (or leave empty for default path)
 defaultDirectoryForModels = // absolute path, e.g. d:/myModels (or leave empty for default path)
 defaultDirectoryForCadFiles = // absolute path, e.g. d:/myCadFiles (or leave empty for default path)
 defaultDirectoryForMiscFiles = // absolute path, e.g. d:/myMiscFiles (or leave empty for default path)
 defaultDirectoryForExternalScriptEditor = // absolute path, e.g. d:/myScriptTempFiles (or leave empty for default path)
 defaultDirectoryForRemoteApiFiles = // absolute path, e.g. d:/myRemoteApiTransfers (or leave empty for default path)
So, can I alter my system/usrset.txt file by:
defaultDirectoryForModels = // c:/.../desktop/VREP models
defaultDirectoryForCadFiles = // c:/.../desktop/VREP models
Or is it the usrset.txt file which is in my VREP models/Biped/ folder?

Is there documentation somewhere you can point me to, to learn?

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: V-REP crashes after selecting SDF import option from Plugins drop down menu

Post by fferri »

You can open the SDF file in a text editor and replace the model:// with file:// in the URI which is failing to resolve

Smitty44
Posts: 37
Joined: 20 Mar 2019, 16:50
Location: East coast, US.

Re: V-REP crashes after selecting SDF import option from Plugins drop down menu

Post by Smitty44 »

Ok cool. I will try that the next chance I get.
Once again, thank you very much for your help.

Smitty44
Posts: 37
Joined: 20 Mar 2019, 16:50
Location: East coast, US.

Re: V-REP crashes after selecting SDF import option from Plugins drop down menu

Post by Smitty44 »

I edited the model.sdl file.
replace the model:// with file://.
Still having an error, but a little different.

ERROR: mesh'/meshes/CAD/link_Lf_foot.stl' does not exist

No message in the console.

link_Lf_foot.stl is one of 18 links.

Its not the first one, and not the last one.
I've gone over it many times, if maybe I did something like a typo.

Here is the beginning section of the model.sdf file:

Code: Select all

<?xml version="1.0" ?>
<sdf version="1.6">
	<model name="">
		<link name="link_Lf_thigh">
			<self_collide>false</self_collide>
			<pose frame="">0.03514979413271674 -0.011205654246100469 -0.06507432057213901 1.5707963267948968 -0.0 0.0</pose>
			<inertial>
				<pose frame="">0.0 0.0 0.0 0 0 0</pose>
				<mass>0.26230292291516605</mass>
				<inertia>
					<ixx>0.0012377013703139157</ixx>
					<ixy>0.0001033096957347604</ixy>
					<ixz>0.000602841390306322</ixz>
					<iyy>0.0015667184786936255</iyy>
					<iyz>-0.0001912326148159651</iyz>
					<izz>0.0004134008056758611</izz>
				</inertia>
			</inertial>
			<collision name="link_Lf_thigh_collision">
				<geometry>
					<mesh>
						<uri>file:///meshes/CAD/link_Lf_thigh.stl</uri>
						<scale>0.001 0.001 0.001</scale>
					</mesh>
				</geometry>
			</collision>
			<visual name="link_Lf_thigh_visual">
				<geometry>
					<mesh>
						<uri>file:///meshes/CAD/link_Lf_thigh.stl</uri>
						<scale>0.001 0.001 0.001</scale>
					</mesh>
				</geometry>
			</visual>
		</link>
		<link name="link_Lf_calf">
			<self_collide>false</self_collide>
			<pose frame="">0.03594746998297489 -0.011355683434754394 -0.1237657197558629 1.5707963267948968 -0.0 0.0</pose>
			<inertial>
				<pose frame="">0.0 0.0 0.0 0 0 0</pose>
				<mass>0.2623028979552199</mass>
				<inertia>
					<ixx>0.004144627087972054</ixx>
					<ixy>0.0001070930837962897</ixy>
					<ixz>0.0011698323032920236</ixz>
					<iyy>0.0044876328456650945</iyy>
					<iyz>-0.0003689297044349492</iyz>
					<izz>0.00042916848455349055</izz>
				</inertia>
			</inertial>
			<collision name="link_Lf_calf_collision">
				<geometry>
					<mesh>
						<uri>file:///meshes/CAD/link_Lf_calf.stl</uri>
						<scale>0.001 0.001 0.001</scale>
					</mesh>
				</geometry>
			</collision>
			<visual name="link_Lf_calf_visual">
				<geometry>
					<mesh>
						<uri>file:///meshes/CAD/link_Lf_calf.stl</uri>
						<scale>0.001 0.001 0.001</scale>
					</mesh>
				</geometry>
			</visual>
		</link>
		<link name="link_Lf_ankle">
			<self_collide>false</self_collide>
			<pose frame="">0.03499295806869025 -0.011423716488769642 -0.16199246326517056 1.5707963267948968 -0.0 0.0</pose>
			<inertial>
				<pose frame="">0.0 0.0 0.0 0 0 0</pose>
				<mass>0.0733834755491051</mass>
				<inertia>
					<ixx>0.001969637867693901</ixx>
					<ixy>2.9334284072555474e-05</ixy>
					<ixz>0.00041568338609679784</ixz>
					<iyy>0.0020499236245647766</iyy>
					<iyz>-0.00013603821795762642</iyz>
					<izz>0.0001369660570628952</izz>
				</inertia>
			</inertial>
			<collision name="link_Lf_ankle_collision">
				<geometry>
					<mesh>
						<uri>file:///meshes/CAD/link_Lf_ankle.stl</uri>
						<scale>0.001 0.001 0.001</scale>
					</mesh>
				</geometry>
			</collision>
			<visual name="link_Lf_ankle_visual">
				<geometry>
					<mesh>
						<uri>file:///meshes/CAD/link_Lf_ankle.stl</uri>
						<scale>0.001 0.001 0.001</scale>
					</mesh>
				</geometry>
			</visual>
		</link>
		<link name="link_Lf_foot">
			<self_collide>false</self_collide>
			<pose frame="">0.04406392624482229 -0.012524811793757305 -0.18446464261120218 1.5707963267948968 -0.0 0.0</pose>
			<inertial>
				<pose frame="">0.0 0.0 0.0 0 0 0</pose>
				<mass>0.2296503796399801</mass>
				<inertia>
					<ixx>0.007916911537967143</ixx>
					<ixy>0.00012705095282459226</ixy>
					<ixz>0.0018652997519963154</ixz>
					<iyy>0.008313845820290086</iyy>
					<iyz>-0.0005300327932216219</iyz>
					<izz>0.0005806808121749132</izz>
				</inertia>
			</inertial>
			<collision name="link_Lf_foot_collision">
				<geometry>
					<mesh>
						<uri>file:///meshes/CAD/link_Lf_foot.stl</uri>
						<scale>0.001 0.001 0.001</scale>
					</mesh>
				</geometry>
			</collision>
			<visual name="link_Lf_foot_visual">
				<geometry>
					<mesh>
						<uri>file:///meshes/CAD/link_Lf_foot.stl</uri>
						<scale>0.001 0.001 0.001</scale>
					</mesh>
				</geometry>
			</visual>
		</link>
		<link name="link_Lf_bicep">
			<self_collide>false</self_collide>
			<pose frame="">0.09600863091067367 -0.02753303054520631 0.08440937987802923 1.5707963267948968 -0.0 0.0</pose>
			<inertial>
				<pose frame="">0.0 0.0 0.0 0 0 0</pose>
				<mass>0.4499679496389737</mass>
				<inertia>
					<ixx>0.0039712662603886405</ixx>
					<ixy>0.001189526958757284</ixy>
					<ixz>-0.003646477746966991</ixz>
					<iyy>0.007579013124743019</iyy>
					<iyz>0.0008924465870197257</iyz>
					<izz>0.004719238276628618</izz>
				</inertia>
			</inertial>
			<collision name="link_Lf_bicep_collision">
				<geometry>
					<mesh>
						<uri>file:///meshes/CAD/link_Lf_bicep.stl</uri>
						<scale>0.001 0.001 0.001</scale>
					</mesh>
				</geometry>
			</collision>
			<visual name="link_Lf_bicep_visual">
				<geometry>
					<mesh>
						<uri>file:///meshes/CAD/link_Lf_bicep.stl</uri>
						<scale>0.001 0.001 0.001</scale>
					</mesh>
				</geometry>
			</visual>
		</link>
		<link name="link_Lf_forearm">
			<self_collide>false</self_collide>
			<pose frame="">0.097042469308621 -0.06530714285243341 0.045546087380057054 1.5707963267948968 -0.0 0.0</pose>
			<inertial>
				<pose frame="">0.0 0.0 0.0 0 0 0</pose>
				<mass>0.04917121472710535</mass>
				<inertia>
					<ixx>0.00034459593278151593</ixx>
					<ixy>0.000312202403679638</ixy>
					<ixz>-0.00021673282796728888</ixz>
					<iyy>0.000583860896364398</iyy>
					<iyz>0.0001484511760018276</iyz>
					<izz>0.000691018847781477</izz>
				</inertia>
			</inertial>
			<collision name="link_Lf_forearm_collision">
				<geometry>
					<mesh>
						<uri>file:///meshes/CAD/link_Lf_forearm.stl</uri>
						<scale>0.001 0.001 0.001</scale>
					</mesh>
				</geometry>
			</collision>
			<visual name="link_Lf_forearm_visual">
				<geometry>
					<mesh>
						<uri>file:///meshes/CAD/link_Lf_forearm.stl</uri>
						<scale>0.001 0.001 0.001</scale>
					</mesh>
				</geometry>
			</visual>
		</link>
		<link name="link_Rt_bicep">
....the rest of the file...

I'm at a stand still. Don't know how to proceed.

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: V-REP crashes after selecting SDF import option from Plugins drop down menu

Post by fferri »

A relative URI should be file://meshes/CAD/link_Lf_thigh.stl, not file:///meshes/CAD/link_Lf_thigh.stl

Smitty44
Posts: 37
Joined: 20 Mar 2019, 16:50
Location: East coast, US.

Re: V-REP crashes after selecting SDF import option from Plugins drop down menu

Post by Smitty44 »

Yes, I tried that too.
Same error.

ERROR: mesh 'meshes/CAD/link_Lf_foot.stl' does not exist.

I guess what I am not understanding is why it is waiting until, link_Lf_foot.stl to abend.

Its not the first link entry.
Its as if there is something specific to it, but that file name is correct.
I have looked through the meshes list numerous times. Bizarre to me.

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: V-REP crashes after selecting SDF import option from Plugins drop down menu

Post by fferri »

Oh, I think this is related to the fact that V-REP changes the working directory on startup (so relative paths are in fact relative to V-REP directory).

Can you try to use file:// scheme with absolute paths?

I will provide a fix for relative file:// URIs.

Post Reply