sim.setObjectPosition and sim.setObjectOrientation through user-interface issue
Posted: 19 Aug 2022, 05:04
Hello, I am having trouble with getting sim.setObjectPosition and sim.setObjectOrientation to work properly. Attached along with this question is my scene file, because it’s a lot easier to explain what is going wrong that way!
Basically, if you run the scene and then click “Open Loop Control Course” upon the Custom UI starting, and then “Starting Position”, the robot will not be in the right position / be in the right orientation as described in my script. If you stop the scene and run again, this time pressing “Angle Control Course”, you’ll see the same sort of behaviour. If I pause the simulation and manually move the robot to our positions / orientations specified in the script using the Object Item / Shift and Object / Item Rotate buttons, it moves to our desired place properly - so I must be implementing something incorrectly, but I just can’t seem to figure out what, and have been stuck on this for a very long time!.
All of the functions have been written in the “Script” dummy object. If the code does not make sense, please let me know! Any help would be very very gratefully accepted.
Cheers
https://drive.google.com/file/d/1KPAlRB ... sp=sharing
Basically, if you run the scene and then click “Open Loop Control Course” upon the Custom UI starting, and then “Starting Position”, the robot will not be in the right position / be in the right orientation as described in my script. If you stop the scene and run again, this time pressing “Angle Control Course”, you’ll see the same sort of behaviour. If I pause the simulation and manually move the robot to our positions / orientations specified in the script using the Object Item / Shift and Object / Item Rotate buttons, it moves to our desired place properly - so I must be implementing something incorrectly, but I just can’t seem to figure out what, and have been stuck on this for a very long time!.
All of the functions have been written in the “Script” dummy object. If the code does not make sense, please let me know! Any help would be very very gratefully accepted.
Cheers
https://drive.google.com/file/d/1KPAlRB ... sp=sharing