simExtSDF_import changes to simSDF.import when reloading the scene
Posted: 03 Feb 2021, 13:29
Hello everyone,
I am experiencing a rather strange behavior when using a customization script (Ubuntu 20.04, 4.1.0). My overall goal is to import an SDF file programatically from python. I am using Pyrep as an API for that. In order to be able to call the import function, I have written a small customization script. The following is a minimal example:
this works perfectly well when calling the script via the LUA console with sim.callScriptFunction. However, when I save the file, close the editor and reload the scene, suddently my script changed to the following:
Which is in itself already a strange behavior, but even worse, the simSDF command does not work for me. I always get the following error:
Could someone explain this behavior to me? How can I get around this? Alternatively, is there maybe a better way to call the simExtSDF_import function from python, without creating this script? I could also use a different API.
Cheers and many thanks,
Jakob
I am experiencing a rather strange behavior when using a customization script (Ubuntu 20.04, 4.1.0). My overall goal is to import an SDF file programatically from python. I am using Pyrep as an API for that. In order to be able to call the import function, I have written a small customization script. The following is a minimal example:
Code: Select all
function test()
simExtSDF_import("/datasets/models/ycb/006_mustard_bottle/mustard_bottle.sdf")
end
Code: Select all
function test()
simSDF.import("/datasets/models/ycb/006_mustard_bottle/mustard_bottle.sdf")
end
Code: Select all
attempt to index global 'simSDF' (a boolean value)
Cheers and many thanks,
Jakob