## Point Cloud Importer.ttm not working

Report crashes, strange behaviour, or apparent bugs
kilian_ft
Posts: 6
Joined: 08 Oct 2019, 14:05

### Re: Point Cloud Importer.ttm not working

I tried to use the new function from above on a Windows PC and it worked there.

When trying exactly the same on Linux it doesn't, so it is probably OS related.

Here is the full output from the Linux PC:

Code: Select all

"pointCloudHandle",19
"options",2
"pts size",27
"cols size",27
"pt","-2.33270000"
"pt","49.86260000"
"pt","-1.92340000"
"pt","-2.33280000"
"pt","49.87500000"
"pt","-1.92300000"
"col","39"
"col","35"
"col","20"
"col","37"
"col","35"
"col","28"
Lua runtime error: [string "CUSTOMIZATION SCRIPT pointCloudImporter"]:44: One of the function's argument type is not correct. (sim.insertPointsIntoPointCloud)
--> Customization script temporarily disabled.
stack traceback:
[C]: in function 'insertPointsIntoPointCloud'
[string "CUSTOMIZATION SCRIPT pointCloudImporter"]:44: in function <[string "CUSTOMIZATION SCRIPT pointCloudImporter"]:11>
Error: [string -unknown location]:?: simCallScriptFunctionEx: error (importClicked_callback)

coppelia
Posts: 7396
Joined: 14 Dec 2012, 00:25

### Re: Point Cloud Importer.ttm not working

Ok, I think I figured it out. On your Linux machine the system uses commas instead of decimal points. So Lua doesn't like decimal points. The workaround is to use following in the init section of your script:

Code: Select all

os.setlocale'C'
This will be implicitely executed by default in the next release, in order to avoid this kind of situations.

Cheers

kilian_ft
Posts: 6
Joined: 08 Oct 2019, 14:05

### Re: Point Cloud Importer.ttm not working

With this change it does works and all errors are gone.

Thank you a lot for the help!

Best, Kilian