I am new in VREP and I am having troubles with a remote API simulation.
I have simulated a vehicle dynamics to retrieve its position and orientation as time goes on (with a different software).
Afterward, I am using a Python script to set the position and orientation of the vehicle inside vrep.
Although orientation increases monotonically (from 0 degree to around 7 degrees), the vehicle (modeled as a simple cuboid) starts rotating and does many turns around the z-axis.
I tried removing the dynamic engine in order to simulate only the kinematics and I made the object not respondable and not dynamic, but the problem persists... Here there is the small piece of code where I loop over the position and orientation:
Many thanks for the help!
Code: Select all
for i in range(n): vrep.simxSynchronousTrigger(clientID) err_pos = vrep.simxSetObjectPosition(clientID, Vehicle_handle, -1, [x_pos[i], y_pos[i], 0], vrep.simx_opmode_oneshot) err_or = vrep.simxSetObjectOrientation(clientID, Vehicle_handle, -1, [0, 0, yaw[i]], vrep.simx_opmode_oneshot) vrep.simxGetPingTime(clientID) time.sleep(Ts)