Retrieving a path pose (x,y,phi)

Typically: "How do I... ", "How can I... " questions
Post Reply
Xnomai
Posts: 4
Joined: 02 Jan 2017, 21:25

Retrieving a path pose (x,y,phi)

Post by Xnomai » 14 Feb 2017, 21:14

Hello

I am planing to program a mobile robot to follow a given path, let's say "a circle" path, I need to have the pose of the robot which are x and y coordinates in the world frame and the orientation phi, this is the first part , and most importantly I need the pose of the path, I mean x,y,phi of the path instantaneously. I can after having those pose vectors calculate the tracking error.

How can I retrieve path and robot poses ?!
Thank you

Eric
Posts: 186
Joined: 11 Feb 2013, 16:39

Re: Retrieving a path pose (x,y,phi)

Post by Eric » 16 Feb 2017, 06:46

Hi

I strongly suggest you you have a look at the first tutorials and spend some time to understand the lua code in them

to get the x,y and phi coordinates of your robot you can use:

Code: Select all

robotP=simGetObjectPosition(robotHandle,-1)
robotO=simGetObjectOrientation(robotHandle,-1)
    
x=robotP[1]
y=robotP[2]
phi=robotO[3]
You should have a look on how the dr12 robots are following the path calculated by the path planner in practicalPathPlanningDemo.ttt demo scene.
You ll need to understand how to use,this, and this functions

Cheers
Eric

Xnomai
Posts: 4
Joined: 02 Jan 2017, 21:25

Re: Retrieving a path pose (x,y,phi)

Post by Xnomai » 16 Feb 2017, 11:55

Thank you Eric very much, I will start with some tutorials.

Post Reply