Fast 3D sensors: sensor resol VS "Extract coordinates" resol

Typically: "How do I... ", "How can I... " questions
Post Reply
renaud.detry
Posts: 16
Joined: 24 May 2013, 16:29

Fast 3D sensors: sensor resol VS "Extract coordinates" resol

Post by renaud.detry »

Hi,

I see strange things happen with fast 3D vision sensors.

Right now, I'm using the Fast Hokuyo. I've set both the vision sensor resolution AND the "extract coordinates" filter resolution to 128. On my Mac, it works fine. On Linux with Matlab 2011, it sometimes works fine. But other times, about half the points are very close to 0.

In the default Hokuyo, the vision sensor resolution is 256, and the extract coord is 340 or so.

What should I set to the sensor & filter resolution to get 128 points?

Thanks!
Renaud

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

Re: Fast 3D sensors: sensor resol VS "Extract coordinates" r

Post by coppelia »

Hello Renaud,

that is a strange behaviour. When half of the points are close to zero, is the visual representation correct?
I guess there is an error in the way you send the data over to Matlab. Could you show us that code?

The extract coord filter will simply sample points over the whole pixel range of the sensor. So, if your resolution is smaller than the resolution of the extract coord filter, this means that several calculated 3D points will be present twice. It is like if you need to match x step heights with y samples.
While a low x (vision sensor resolution) makes the vision sensor operate faster, a high y will procude more 3D points (while the mapping x->Y is not linear!).

if you require 128 3D points, select a vision sensor resolution around 128 also. Some points will still be double (points close to the center of the picture). If you want more precision (in terms of differentiation of neighbouring points), select a higher resolution for your vision sensor.

Cheers

renaud.detry
Posts: 16
Joined: 24 May 2013, 16:29

Re: Fast 3D sensors: sensor resol VS "Extract coordinates" r

Post by renaud.detry »

Hello,
that is a strange behaviour. When half of the points are close to zero, is the visual representation correct?
I guess there is an error in the way you send the data over to Matlab. Could you show us that code?
The problem does not seem to be related to the remote API - When I display the red "lasers" rays in VREP, only a fraction of the rays are visible. Looking at the data in Matlab, lots of points are almost zero, so I guess those rays don't show because they're too short. Note that I could only witness this effect on Fedora, with matlab 2011 and VREP 3.0.5c. And even then, it's only every second try that things go wrong. On my Mac, no problems at all.

There's other issues related to data transfer via the remote API, I'll talk about that in another post :)

Cheers,
Renaud

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

Re: Fast 3D sensors: sensor resol VS "Extract coordinates" r

Post by coppelia »

I suspect the problem is linked to openGl, since the fast Hokuyo laser scanner model is based on vision sensors. Could you check:
  • in the layers dialog, click the Invert button. You should be able to see the near and far clipping planes of the vision sensor (as a blue line). The vision sensor will see everything after the near clipping plane and before the far clipping planes. Maybe try also to adjust the vision sensor's clipping planes in the vision sensor properties.
  • add a floating view (right click into the scene --> Add --> Floating view), select one of the two vision sensors of your laser scanner, then [right click into the scene --> View --> Associate view with selected vision sensor]. This will display what the vision sensor sees. Since the vision sensor in that model does only need minimal information, the y resolution is just one pixel --> you will only see a long horizontal white line. White --> objects are far, black --> objects are close. Can you check if the floating view also shows the strange behaviour you are describing?
Cheers

renaud.detry
Posts: 16
Joined: 24 May 2013, 16:29

Re: Fast 3D sensors: sensor resol VS "Extract coordinates" r

Post by renaud.detry »

Hi,

Ok I'll try this tomorrow.

I now realize I failed to mention the detail that prompted me to post this question: when I leave the resolution params of the Hokuyo to their default (256/342), it always works fine. That's why my first reaction was to ask if there's a trick in setting these params...

Renaud

Post Reply