Function deprecated? sim.addPointCloud()

Report crashes, strange behaviour, or apparent bugs
Post Reply
omnipOtent
Posts: 7
Joined: 11 Dec 2019, 22:12

Function deprecated? sim.addPointCloud()

Post by omnipOtent »

Hi, I am using CoppeliaSim 4.0.0 rev4 and found a demo scene workspace.ttt
The Lua script associated with the manipulator LBR_iiwa_7_R800 uses a function that does not seem to appear in the current API:

Code: Select all

if usePointCloud then
    sim.addPointCloud(0,255,base,0,5,points,{255,255,255,0,0,0,64,64,64,0,0,0},nil,normals)
end
The workspace calculation seems valid with the KUKA arm, but when I transplanted the code to a UR5 or UR10 arm, the workspace becomes apparently much bigger than it should be.

Also, if I have two arms in the same scene, Lua runtime error comes:
"One of the function's table size is not correct. (sim.addPointCloud)"

Anyone could give a hint? Thanks!

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

Re: Function deprecated? sim.addPointCloud()

Post by coppelia »

Hello,

the sim.addPointCloud function is indeed deprecated. Use instead sim.createPointCloud and sim.insertPointsIntoPointCloud.

About your workspace becoming too large when using a different robot: are you sure your tip object is correctly located on your new robot?

Also, if I take the original scene and duplicate the robot, then I only get an error message because the second robot is trying to rename the convex hull to the same name as the first robot. But fixing this, there is no table size error.

Cheers

omnipOtent
Posts: 7
Joined: 11 Dec 2019, 22:12

Re: Function deprecated? sim.addPointCloud()

Post by omnipOtent »

Thanks for confirming that.

Yes, you are correct, I mistakenly placed the tip dummy somewhere else, now it is fixed.
ConvexHull naming is also resolved.

Another thing that keeps giving me the table size error message is believed to be the naming of the duplicate robot - automatically it is called UR10#0 in the scene and everything along the tree is appended with "#0".
In the associated scripts, how do you suggest me to rename the related objects: "UR10_joint", "UR10_tip", "UR10"?

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

Re: Function deprecated? sim.addPointCloud()

Post by coppelia »

if your model was correctly designed, you should not need to modify the scripts of the duplicated model: CoppeliaSim handles this automatically.

Cheers

Post Reply