trace movement of robot

Typically: "How do I... ", "How can I... " questions
Post Reply
cena
Posts: 7
Joined: 14 Jun 2014, 11:08

trace movement of robot

Post by cena »

Hello,
Can anyone please tell me what to do in order to see a trail of the movement of the robot in v-rep. Im using the pioneer p3dx robot. So what I would like is for the program to draw lines to show the path the robot moves during simulation.

Regards
Maruf

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

Re: trace movement of robot

Post by Eric »

Dear Maruf

I think you should start using v-rep by doing the tutorial that are available by clicking help-> help topic. You ll learn a lot about how V-REP works and would be surprise how fast you ll be able to do amazing things.
To answer your question you could do the 1st one called bubblerob tutorial. It is shown in the middle of it how to trace a 3d curve that shows the motion of the robot.

I will however describe here how to proceed...
1_ For the P3DX, right-click->add->graph

2_ double click on Graph icon in the scene hierarchy

3_ add new data stream to record

4_select data stream type Object:Absolute x-position and Object /items to record: Pioneer_p3dx then click ok, rename Data [pioneer_p3dx] by x

5_ repeat step 4 selecting Object:absolute y-position renamed by y and Object:absolute z-position renamed by z

6_click on Edit 3D curve

7_click add new curve and associate X- , Y-, Z-value respectively by x, y, z then click ok

8_ you can now adjust the curve name, color and width in the 3D curve menu...

once you play the scene you should have a trace behind the robot when in motion. If you need to increase the size of the trace before it starts to disappear, double click on Graph and in the Scene Object Properties windows, you can increase the Buffer Size (default being 1000 points). Also, after you stop the simulation, if you select the Graph and go to File->Export->Selected Graphs as CVS, you ll be able to save the points coordinates in a text files editable with excel or other editor.

Cheers

Eric

Post Reply