def set_vrep_force(robot, vector_force, shape_name): """ Set a force to apply on Poppy Humanoid. """ vrep_io = next(c for c in robot._controllers if isinstance(c, VrepController)).io raw_bytes = (ctypes.c_ubyte * len(shape_name)).from_buffer_copy(shape_name) vrep_io.call_remote_api("simxSetStringSignal", "shape", raw_bytes, sending=True) packedData = remote_api.simxPackFloats(vector_force) raw_bytes = (ctypes.c_ubyte * len(packedData)).from_buffer_copy(packedData) vrep_io.call_remote_api("simxSetStringSignal", "force", raw_bytes, sending=True)
def set_vrep_force(robot, vector_force, shape_name): """ Set a force to apply on Poppy Humanoid. """ vrep_io = next(c for c in robot._controllers if isinstance(c, VrepController)).io raw_bytes = (ctypes.c_ubyte * len(shape_name)).from_buffer_copy(shape_name) vrep_io.call_remote_api('simxSetStringSignal', 'shape', raw_bytes, sending=True) packedData = remote_api.simxPackFloats(vector_force) raw_bytes = (ctypes.c_ubyte * len(packedData)).from_buffer_copy(packedData) vrep_io.call_remote_api('simxSetStringSignal', 'force', raw_bytes, sending=True)
def set_vrep_force(robot, vector_force, shape_name): """ Set a force to apply on the robot. """ raw_bytes = (ctypes.c_ubyte * len(shape_name)).from_buffer_copy(shape_name) vrep_io.call_remote_api('simxSetStringSignal', 'shape', raw_bytes, sending=True) packedData = remote_api.simxPackFloats(vector_force) raw_bytes = (ctypes.c_ubyte * len(packedData)).from_buffer_copy(packedData) vrep_io.call_remote_api('simxSetStringSignal', 'force', raw_bytes, sending=True)