laser scanner

Typically: "How do I... ", "How can I... " questions
Post Reply
kurthybela
Posts: 6
Joined: 07 May 2013, 20:42

laser scanner

Post by kurthybela » 28 Aug 2013, 14:31

Hello!
Can i found tutorial about making laser scanner viewer in vrep? like this:http://www.youtube.com/watch?v=5Q0iRuxEYoI

i didn't find it in official vrep tutorials.
Thank you.

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

Re: laser scanner

Post by coppelia » 29 Aug 2013, 00:26

Hello,

Here is the scene file of the video. It is however a very old scene.

Cheers

kurthybela
Posts: 6
Joined: 07 May 2013, 20:42

Re: laser scanner

Post by kurthybela » 30 Aug 2013, 00:42

coppelia wrote:Hello,

Here is the scene file of the video. It is however a very old scene.

Cheers
is there tutorial for creating this laser viewer window?

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

Re: laser scanner

Post by coppelia » 30 Aug 2013, 10:34

There is no tutorial for that yet. But have a look at the code in the attached child scripts. But basically:
  • add a graph to your scene
  • in the graph dialog, check Explicit handling.
  • in the same dialog, add the data streams you want to record (e.g. positionX of object1 and positionY of object1). Then in Edit XY graphs, add a new XY graph curve based on those 2 data streams.
  • Associate a view with the graph (i.e. [mouse right click on view --> View --> Associate view with selected graph]). Then [mouse right click on view --> View --> Display x/y graph] and [mouse right click on view --> View --> Keep proportions at 1:1]
  • Finally, from a non-threaded child script, do something like:

Code: Select all

simResetGraph(graphHandle)
for i=0,50,1 do
	simSetObjectPosition(objHandle,{math.random(),math.random(),0})
	simHandleGraph(graphHandle,0.0)
end
Make sure you have done a few of the tutorials here, specially this one!

Cheers

Post Reply