Hello,
I am trying to insert a model from the Python b0 API:
#!/usr/bin/env python3
import b0RemoteApi
client = b0RemoteApi.RemoteApiClient('b0RemoteApi_pythonClient','b0RemoteApiAddOn')
r1 = client.simxLoadModelFromFile('cup.ttm', client.simxServiceCall())
while(True):
pass
And get the following error in the simulator:
Simulation started.
Lua runtime error: ...Sim_Edu_V4_0_0_Ubuntu18_04/lua/b0RemoteApiServer.lua:987: bad argument #2 to 'format' (string expected, got nil)
stack traceback:
: in function 'format'
...Sim_Edu_V4_0_0_Ubuntu18_04/lua/b0RemoteApiServer.lua:987: in function 'PCALL'
...Sim_Edu_V4_0_0_Ubuntu18_04/lua/b0RemoteApiServer.lua:1298: in function
[C]: in function 'nodeSpinOnce'
...Sim_Edu_V4_0_0_Ubuntu18_04/lua/b0RemoteApiServer.lua:1106: in function 'sendAndSpin'
...Sim_Edu_V4_0_0_Ubuntu18_04/lua/b0RemoteApiServer.lua:1638: in function
Lua runtime error: [string -unknown location]:?: simCallScriptFunctionEx: error (simB0.nodeSpinOnce @ 'BlueZero' plugin)
stack traceback:
[C]: in function 'nodeSpinOnce'
...Sim_Edu_V4_0_0_Ubuntu18_04/lua/b0RemoteApiServer.lua:1106: in function 'sendAndSpin'
...Sim_Edu_V4_0_0_Ubuntu18_04/lua/b0RemoteApiServer.lua:1638: in function
The model is an empty new one.
Thanks
Error inserting model from file using b0 Python API
Re: Error inserting model from file using b0 Python API
Hello,
not sure when and why that was modified, but that is a bug. Thanks for mentioning it.
You can fix it by replacing LoadModel by LoadModelFromFile in file lua/b0RemoteApiServer.lua, around line 865 and 866.
Cheers
not sure when and why that was modified, but that is a bug. Thanks for mentioning it.
You can fix it by replacing LoadModel by LoadModelFromFile in file lua/b0RemoteApiServer.lua, around line 865 and 866.
Cheers
Re: Error inserting model from file using b0 Python API
Thanks for the quick answer