How can VREP display a robot heading orientation

Typically: "How do I... ", "How can I... " questions
Post Reply
sasyeah
Posts: 5
Joined: 02 Mar 2018, 02:26
Contact:

How can VREP display a robot heading orientation

Post 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

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: How can VREP display a robot heading orientation

Post 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

Post Reply