Page 2 of 2

Re: Point Cloud Importer.ttm not working

Posted: 04 Nov 2019, 09:42
by kilian_ft
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)

Re: Point Cloud Importer.ttm not working

Posted: 05 Nov 2019, 11:13
by coppelia
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

Re: Point Cloud Importer.ttm not working

Posted: 05 Nov 2019, 11:31
by kilian_ft
With this change it does works and all errors are gone.

Thank you a lot for the help!

Best, Kilian