Page 1 of 1

How can VREP display a robot heading orientation

Posted: 11 Jul 2018, 11:47
by sasyeah
Hello,
I made a drifting mobile robot. I've finally displayed the path(on VREP & on MATLAB using simx.getobjectposition), but can I display the heading of the mobile robot? Because this mobile is perform drifting, so it's important to show the heading too. Not just the path. Can VREP do this? Anyway, I use MATLAB to display all the graph.
Image <- this is what I want
Image <- this is how the mobile path

Re: How can VREP display a robot heading orientation

Posted: 13 Jul 2018, 17:20
by coppelia
Hello,

yes, just use simx.getObjectOrientation.
If your robot's frame doesn't have the Z-axis pointing up, then you can simply attach a dummy to the robot (with its Z-axis pointing up), then read the orientation of the dummy. The 3rd component of the euler angles that are returned is your heading, in radians.

Cheers