Interpreting Point Cloud data from Velodyne V16 sensor

Typically: "How do I... ", "How can I... " questions
Post Reply
magnetica
Posts: 5
Joined: 06 Apr 2019, 18:52

Interpreting Point Cloud data from Velodyne V16 sensor

Post by magnetica »

I am having a simple scene with a Velodyne V16 Sensor (x=1.0, y=1.0, z=1.0) surrounded by 3 objects
A. Indoor Plant (x=-0.6, y=1.0, z=1.0)
B. Concrete Box (x=1.0, y=-0.6, z=1.0)
C. 20cmHighWall5cm0 (x=0.2750, y=0.1750, z=1.0)

Velodyne sensor is returning following Point cloud data:
But they don't seem to match any of the above three objects actually. Can someone help me in understanding these and doing away with noise in this data?

Code: Select all

header: 
  seq: 108
  stamp: 
    secs: 3641058
    nsecs: 750000000
  frame_id: "velodyneVPL"
points: 
  - 
    x: -0.281794130802
    y: 0.0996968075633
    z: -0.000301383435726
  - 
    x: -0.343268573284
    y: 0.0996479764581
    z: -0.000336587429047
  - 
    x: -0.428338944912
    y: 0.0995804071426
    z: -0.000698655843735
  - 
    x: -0.452279746532
    y: 0.0995613783598
    z: 0.0145275071263
  - 
    x: -0.452279746532
    y: 0.0995613709092
    z: 0.0341885983944
  - 
    x: -0.452279746532
    y: 0.0995613634586
    z: 0.0536818131804
  - 
    x: -0.452279746532
    y: 0.0995613634586
    z: 0.0730562657118
  - 
    x: -0.452279746532
    y: 0.0995613485575
    z: 0.0923599526286
  - 
    x: -0.452279746532
    y: 0.0995613411069
    z: 0.111640110612
  - 
    x: -0.0506105273962
    y: -0.728387951851
    z: 0.26566195488
  - 
    x: -0.0506105273962
    y: -0.728387951851
    z: 0.296383619308
  - 
    x: -0.0506105273962
    y: -0.728387951851
    z: 0.327604591846
  - 
    x: 0.0321944952011
    y: -0.276300728321
    z: -0.000453285872936
  - 
    x: 0.0214588046074
    y: -0.33588090539
    z: -0.000251650810242
  - 
    x: 0.00668399780989
    y: -0.417877048254
    z: -0.000286251306534
  - 
    x: -0.0149374827743
    y: -0.537870287895
    z: -0.000655725598335
  - 
    x: -0.0472623556852
    y: -0.717264413834
    z: 3.65301966667e-05
  - 
    x: -0.0492666810751
    y: -0.728387832642
    z: 0.0283583179116
      - 
    x: -1.17284154892
    y: -0.717636346817
    z: 0.0755934715271
  - 
    x: -1.17284154892
    y: -0.717636346817
    z: 0.128406569362
  - 
    x: -1.17284154892
    y: -0.717636346817
    z: 0.181284070015
  - 
    x: -1.17284154892
    y: -0.717636346817
    z: 0.234355479479
  - 
    x: -1.17284154892
    y: -0.717636346817
    z: 0.287752151489
  - 
    x: -1.17284154892
    y: -0.717636346817
    z: 0.341608673334
  - 
    x: -1.17284154892
    y: -0.717636346817
    z: 0.396064341068
  - 
    x: -1.17284154892
    y: -0.717636346817
    z: 0.451264292002
  - 

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

Re: Interpreting Point Cloud data from Velodyne V16 sensor

Post by coppelia »

Hello,

if you use an unmodified VPL16 sensor, do the points correctly display?
If you set options to 1+2+8 on line 8 and comment out line 17 (so that lines 18-32 become active), do the points correctly display?

If yes, then your points are correctly sensed. The points returned by simVision.handleVelodyneVPL16 are relative to the first vision sensor in the velodyne sensor (see the matrix multiplication on line 27?)

Cheers

magnetica
Posts: 5
Joined: 06 Apr 2019, 18:52

Re: Interpreting Point Cloud data from Velodyne V16 sensor

Post by magnetica »

Hi,

Thanks for your response. I am able to see the points and detect shapes out of them. But seems like Velodyne VPL-16 is currently returning the points in one quadrant only. It is not able to detect points in every direction. If there any configuration that I may be missing for that?

One screen shot of the points plotted in the pptkviewer is https://drive.google.com/open?id=1oJUzr ... rTqpqv0QvJ
Image

Another question on the same screen shot, apart from detecting the two walls, there are lot of points that belong to some location on the floor. Why are they present here? Any direct way to filter them out?

Thanks.

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

Re: Interpreting Point Cloud data from Velodyne V16 sensor

Post by coppelia »

You have to make a difference whether you are talking about points in V-REP or about those same points you send to another application and have them displayed there. So, in V-REP, do the points look ok, or not? If yes, then you have a problem with:
  • the way you send the points
  • the way you display the points in your other application
If you do not want the floor detected, then, for the floor model, check Model is not renderable.

Cheers

magnetica
Posts: 5
Joined: 06 Apr 2019, 18:52

Re: Interpreting Point Cloud data from Velodyne V16 sensor

Post by magnetica »

Thanks, I am getting all the points in V-REP. I am getting points from all the vision sensors by changing the index in m=sim.getObjectMatrix(visionSensorHandles[1],-1) individually.
I am not able to publish the data from all the vision sensors together (representing the whole scene) to another application/file.
Could you please help me with the changes I need to make in function written below from script shared in the previous post in the same thread.
function sysCall_sensing()

data=simVision.handleVelodyneVPL16(h,sim.getSimulationTimeStep())

-- if we want to display the detected points ourselves:

if ptCloud then

sim.removePointsFromPointCloud(ptCloud,0,nil,0)

else


end



m=sim.getObjectMatrix(visionSensorHandles[1],-1)
point32 = {}
for i=0,#data/3-1,1 do
d={data[3*i+1],data[3*i+2],data[3*i+3]}
d=sim.multiplyVector(m,d)
point32[i+1]={x=d[1], y=d[2], z=d[3]}
end


-- Publish the Lidar PointClouds to ROS Topic

if not pluginNotFound then

pub_data={}
pub_data['header']={stamp=sim.getSystemTime(),frame_id="velodyneVPL"}
pub_data['points']=point32

simROS.publish(lidar_pub,pub_data)
simROS.sendTransform(getTransformStamped(visionSensorHandles[1],'velodyneVPL',-1,'world'))

end

end

Post Reply