I am trying to call a script function using simxCallScriptFunction.
Code: Select all
clientID = vrep.simxStart('127.0.0.1', 19999, True, True, 5000, 5) # Connect to V-REP
res, retInts, retFloats, retStrings, retBuffer = vrep.simxCallScriptFunction(clientID, "scriptHan", sim_scripttype_childscript, "moveOnPath", [], [], [], [], simx_opmode_blocking)
Traceback (most recent call last):
File "C:\Users\dmoon04\javaclipseworkspace\sonicFinal.py", line 688, in <module>
res, retInts, retFloats, retStrings, retBuffer = vrep.simxCallScriptFunction(clientID, "scriptHan", sim_scripttype_childscript, "moveOnPath", [], [], [], [], simx_opmode_blocking)
File "C:\Users\dmoon04\javaclipseworkspace\vrep.py", line 1359, in simxCallScriptFunction
inputBufferV=ct.cast(inputBufferV,ct.POINTER(ct.c_ubyte)) # IronPython needs this
File "C:\Python27\lib\ctypes\__init__.py", line 502, in cast
return _cast(obj, obj, typ)
ctypes.ArgumentError: argument 1: <type 'exceptions.TypeError'>: wrong type
I can connect to the server side, and print clientID (which is 0). The solutions I've seen with this concerns strings where you would need to import ctypes and add b but I these solutions account for strings types. I saw this solution, https://stackoverflow.com/questions/312 ... in-python3 but I do not understand exactly what should be done.
I hope I've given enough information. All help is greatly appreciated. Thanks.
Some of the things I've tried:
Code: Select all
n = ctypes.c_ubyte(clientID)
n = c_uint(clientID)