Capture the view from 2 simulated Kinects simultaneously inside V-REP

Typically: "How do I... ", "How can I... " questions
Post Reply
ravi
Posts: 85
Joined: 24 Oct 2016, 08:00

Capture the view from 2 simulated Kinects simultaneously inside V-REP

Post by ravi »

I have two simulated Kinects inside a home environment in V-REP. The scene contains following objects sofa, table, chair and two Kinects. Please see below the screenshot of scene hierarchy-
https://www.dropbox.com/s/pagbw2gigsrbq ... y.png?dl=0

The scene can be seen by following the given link below-
https://www.dropbox.com/s/boouicvc0co78 ... e.png?dl=0

My goal is to capture the view from these two Kinects simultaneously at every simulation step. Before obtaining the view, I want to re-position sofa, and chair randomly.

Below are the steps of data acquisition process-
  1. Re-position the objects, i.e., sofa, and chair randomly
  2. Capture the view from Kinect 1 and 2 (Make sure we don't re-position the objects while capturing the view)
  3. At every simulation step, go back to the first step
The scene file can be downloaded from following Dropbox link-
https://www.dropbox.com/s/34nrl9isncvvj ... t.ttt?dl=0

I guess that I should work with the main script, in which I should first declare the handles of each object and then use Kinect handles to capture the view. Following are my questions-
  • How to capture the view in which we first re-position the objects and then capture the view?
  • Should I add more scripts? maybe modify the main script?
  • If a new script is added then how to access both the Kinect camera (color and depth) from this script?

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

Re: Capture the view from 2 simulated Kinects simultaneously inside V-REP

Post by coppelia »

I think you first need to learn basics, since you appear to be missing quite a few bases..

You do not need to touch the main script. You can obtain the handle for all objects inside of a single child script. Where that script is located is not really important in your case. You can move objects and also read the vision sensor images/depth maps from the same child script, since the operations are linked and should happen sequentially.

Cheers

ravi
Posts: 85
Joined: 24 Oct 2016, 08:00

Re: Capture the view from 2 simulated Kinects simultaneously inside V-REP

Post by ravi »

coppelia wrote: 05 Jul 2018, 15:16 You can obtain the handle for all objects inside of a single child scripts
it worked like a charm. thank you very much.

Post Reply