I'm working on a scene with several UR5 robots, and I wanted to visualize their workspaces. Your scenes/workspace.ttt example proved very useful, but I do have 2 questions.
In that example you use a deprecated function to create a point cloud:
Code: Select all
if usePointCloud then
sim.addPointCloud(0,255,base,0,5,points,{255,34,34,0,0,0,255,194,194,0,0,0},nil,normals)
end
I gathered it has something to do with the deprecated function, but I'm not sure how to fix it. I know there are new functions available, but I would like to finish the codes with this one.139: One of the function's table size is not correct. (in function 'sim.addPointCloud')
stack traceback:
[C]: in function 'addPointCloud'
[string "UR5#0@childScript"]:139: in function 'doCalculation'
[string "UR5#0@childScript"]:158: in function <[string "UR5#0@childScript"]:154>
EDIT: I tried to do it with the new functions, sim.createPointCloud and sim.insertPointsIntoPointCloud and I still get the same error. I have 2 UR5 robots, each has a non-threaded child script that does the same thing, but only one point cloud is drawn. The second robot reports the above error. If I delete the first script, then the second robot script draws the point cloud without any problems. How could I resolve this issue?
One more thing: In the example, the result is a cloud of reachable points, so I just wanted to ask if there was a similar way to visualize the robot's singularities?
Cheers,
Jovan