simondlevy / PyQuadSim

A open-source quadrotor simulator in Python for Linux [NO LONGER SUPPORTED]
GNU Lesser General Public License v3.0
38 stars 32 forks source link

LUA error: One of the function's argument type is not correct. (simAddForceAndTorque) #3

Open AndreaCensi opened 9 years ago

AndreaCensi commented 9 years ago

I changed the path in the LUA file.

I get the following error when hitting "play":

Default scene was set-up.
Simulator launched.
Loading scene (/Users/andrea/scm/environments/env_fault/src/PyQuadSim/pyquadsim.ttt).  Serialization version is 18.
File was previously written with V-REP version 3.01.03 (rev 2) (V-REP PRO EDU license)
Scene opened.
Simulation started.
Lua call error: [string "SCRIPT Quadricopter"]:33: One of the function's argument type is not correct. (simUnpackFloats)
Simulation stopping...
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable1"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable3"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable2"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable4"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter"]:33: One of the function's argument type is not correct. (simUnpackFloats)
Simulation stopping...
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable1"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable3"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable2"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable4"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter"]:33: One of the function's argument type is not correct. (simUnpackFloats)
Simulation stopping...
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable1"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable3"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable2"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable4"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter"]:33: One of the function's argument type is not correct. (simUnpackFloats)
Simulation stopping...
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable1"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable3"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable2"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable4"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Simulation stopped.

Any idea?

Thanks, A.

simondlevy commented 9 years ago

Hi Andrea,

I got this error the other day when I tried to hit Play without first doing

% chmod +x pyquadsim_server.py

If you've done that and it still doesn't work, let me know.

AndreaCensi commented 9 years ago

Yes, I had done that. ​

simondlevy commented 9 years ago

And you're using the current release of V-REP, 3.1.3?

AndreaCensi commented 9 years ago

Yes, 3.1.3 rev 2.

simondlevy commented 9 years ago

Make sure you also do this, from the instructions:

Once you've installed V-REP and PyQuad Stick and downloaded PyQuadSim, launch V-REP and open the pyquadsim.ttt script from the pyquadsim folder. Go to the Tools menu, select Scripts, and double-click on Child script (associated with Quadricopter). Edit the value of the PYQUADSIM_HOME variable to reflect where you put the folder

Webbefen commented 9 years ago

Hi I am having a similar problem, I am running the package on Macbook Pro mountain lion and have downloaded vrep 3.1.3. what currently happens is one of two things either:

Simulation started.
Lua call error: [string "SCRIPT Quadricopter"]:33: One of the function's argument type is not correct. (simUnpackFloats)
Simulation stopping...
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable1"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable3"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable2"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable4"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter"]:33: One of the function's argument type is not correct. (simUnpackFloats)
Simulation stopping...
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable1"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable3"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable2"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable4"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter"]:33: One of the function's argument type is not correct. (simUnpackFloats)
Simulation stopping...
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable1"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable3"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable2"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable4"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter"]:33: One of the function's argument type is not correct. (simUnpackFloats)
Simulation stopping...
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable1"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable3"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable2"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable4"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Simulation stopped.
Simulation started.
Lua call error: [string "SCRIPT Quadricopter"]:33: One of the function's argument type is not correct. (simUnpackFloats)
Simulation stopping...
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable1"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable3"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable2"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable4"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter"]:33: One of the function's argument type is not correct. (simUnpackFloats)
Simulation stopping...
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable1"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable3"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable2"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable4"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter"]:33: One of the function's argument type is not correct. (simUnpackFloats)
Simulation stopping...
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable1"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable3"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable2"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable4"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter"]:33: One of the function's argument type is not correct. (simUnpackFloats)
Simulation stopping...
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable1"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable3"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable2"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Lua call error: [string "SCRIPT Quadricopter_propeller_respondable4"]:23: One of the function's argument type is not correct. (simAddForceAndTorque)
Simulation stopped.

Over wise it will seemingly work, but the pygame console will just continualy load... 20150316_192155

Hoping that you might be able to help me out.

Thanks in advance Nathanael

daniloitj commented 9 years ago

hello, congratulations for the work, I am having the same problems:

Lua API call error: [string "SCRIPT Quadricopter_propeller_respondable1"]: 23: One of the function's argument type is not correct. (simAddForceAndTorque) Lua API call error: [string "SCRIPT Quadricopter_propeller_respondable3"]: 23: One of the function's argument type is not correct. (simAddForceAndTorque) Lua API call error: [string "SCRIPT Quadricopter_propeller_respondable2"]: 23: One of the function's argument type is not correct. (simAddForceAndTorque) Lua API call error: [string "SCRIPT Quadricopter_propeller_respondable4"]: 23: One of the function's argument type is not correct. (simAddForceAndTorque) Simulation stopped.

I am using: V-rep: 3.2.0 Virtualenv + python2.6 OSX Yosemite 10.10

during the simulation the V-rep the Quadrotor down up and after closing. Any help?

swenzel commented 9 years ago

I don't have this issue but it sounds as if there is a problem decoding the data that was sent by the server. I think that might come from some int that sneaked through. Maybe you can try changing https://github.com/simondlevy/PyQuadSim/blob/master/pyquadsim_server.py#L54 to client.send(struct.pack('%sf' % len(data), *(float(i) for i in data))) to force all numbers to be floats.

Edit: Sorry, looking closer at the source code I don't think this is the problem, all values should be floats. However I can reproduce this when I raise an Exception after connecting to the client. If the exception is thrown within the mainloop I get the stack trace in the pygame window so if you don't see that, your problem should be within 109 and 133. Do you see any exception printout in the console where you started vrep?

msalbego93 commented 9 years ago

Similar problem here. Using windows 7. Any idea so far Simon?

PyQuadSim/pyquadsim_client.lua:28: in function 'sendFloats'
PyQuadSim/pyquadsim_client.lua:138: in main chunk
[C]: in function 'dofile'
[string "SCRIPT Quadricopter"]:21: in main chunk

Lua API call error: [string "SCRIPT Quadricopter_propeller_respondable1"]:23: One of the function's argument type is not correct. (simAddForceAndTorque) Lua API call error: [string "SCRIPT Quadricopter_propeller_respondable3"]:23: One of the function's argument type is not correct. (simAddForceAndTorque) Lua API call error: [string "SCRIPT Quadricopter_propeller_respondable2"]:23: One of the function's argument type is not correct. (simAddForceAndTorque) Lua API call error: [string "SCRIPT Quadricopter_propeller_respondable4"]:23: One of the function's argument type is not correct. (simAddForceAndTorque) Lua runtime error: PyQuadSim/pyquadsim_client.lua:28: attempt to index local 'server' (a nil value) stack traceback: PyQuadSim/pyquadsim_client.lua:28: in function 'sendFloats' PyQuadSim/pyquadsim_client.lua:138: in main chunk [C]: in function 'dofile' [string "SCRIPT Quadricopter"]:21: in main chunk

friend0 commented 9 years ago

Same problem. Even tried hard coding some floats.