simSetOrientation doesn't seem to work correctly
Posted: 13 Oct 2016, 05:50
Hi There,
I am writing a plugin that sets up a scene before starting a simulation. In order to set up an object I call simSetObjectOrientation and then simSetObjectPosition right after.
The object always gets placed in the exact position I specify, but the orientation does not seem to work. I pass in an orientation of {0.0, 0.0, 80.04} to simSetObjectOrientation but when I select the object in VREP it reports an orientation of (0.0, 0.0, -94.04). I can then use the "object/item rotate" gui button to set to {0.0, 0.0, 80.04} and it goes perfectly where it should. I've tried everything but can't get it to work.
edit: I even printed the output of simGetObjectOrientation right after setting it and it reports the wrong orientation:
SET rotation, x: 0.000000, y: 0.000000, z: 80.040001
GET rotation, x: -0.000000, y: 0.000000, z: -1.641408
What am I doing wrong?
I'm using Vrep 3.3.1 if that helps.
Thanks,
Ian
I am writing a plugin that sets up a scene before starting a simulation. In order to set up an object I call simSetObjectOrientation and then simSetObjectPosition right after.
The object always gets placed in the exact position I specify, but the orientation does not seem to work. I pass in an orientation of {0.0, 0.0, 80.04} to simSetObjectOrientation but when I select the object in VREP it reports an orientation of (0.0, 0.0, -94.04). I can then use the "object/item rotate" gui button to set to {0.0, 0.0, 80.04} and it goes perfectly where it should. I've tried everything but can't get it to work.
edit: I even printed the output of simGetObjectOrientation right after setting it and it reports the wrong orientation:
SET rotation, x: 0.000000, y: 0.000000, z: 80.040001
GET rotation, x: -0.000000, y: 0.000000, z: -1.641408
What am I doing wrong?
I'm using Vrep 3.3.1 if that helps.
Thanks,
Ian