visualizing Pointcloud

Typically: "How do I... ", "How can I... " questions
Post Reply
basti35
Posts: 5
Joined: 08 Aug 2016, 10:21

visualizing Pointcloud

Post by basti35 » 08 Jul 2017, 10:32

Hi, I'm trying to show the content of a ros topic of type sensor_msgs/Pointcloud2 into a pointcloud object.
I can't get the function simInsertPointsIntoPointCloud working. What I always get is the error: "One of the function's argument type is not correct.". I tried also to show a list of points defined in the lua (as in the following piece of code), but I got the same result.

Code: Select all

    points = {}
    for i=0,4 do
      table.insert(points, i*0.2)
      table.insert(points, i*0.2)
      table.insert(points, i*0.2)
    end
    simInsertPointsIntoPointCloud(pclHandle,0,points, {100,100,100}, nil)
Is there some example somewhere?

Thanks in advance.

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

Re: visualizing Pointcloud

Post by coppelia » 10 Jul 2017, 09:54

Hello,

your code works perfectly fine. Could it be that your point cloud handle is actually an invalid handle, or a handle to another object? WHat V-REP version are you running?

Cheers

basti35
Posts: 5
Joined: 08 Aug 2016, 10:21

Re: visualizing Pointcloud

Post by basti35 » 16 Jul 2017, 08:47

Hello!
There was an issue with my code and the handle was invalid. You're right, it works!
I'm running the 3.4.0.
Thanks for the support.

Post Reply