Xamla / torch-pcl

Point Cloud Library (PCL) bindings for Torch
BSD 3-Clause "New" or "Revised" License
30 stars 7 forks source link

Error when call require #13

Open saix47 opened 7 years ago

saix47 commented 7 years ago

When I call require in torch, it got error:

th> pcl = require 'pcl' /home/mine/torch/install/share/lua/5.2/trepl/init.lua:384: /home/mine/torch/install/share/lua/5.2/trepl/init.lua:384: /home/mine/torch/install/share/lua/5.2/luarocks/loader.lua:117: error loading module 'pcl.PointTypes' from file '/home/mine/torch/install/share/lua/5.2/pcl/PointTypes.lua': /home/mine/torch/install/share/lua/5.2/pcl/PointTypes.lua:1068: unexpected symbol near char(226) stack traceback: /home/mine/torch/install/share/lua/5.2/trepl/init.lua:501: in function </home/mine/torch/install/share/lua/5.2/trepl/init.lua:494> [C]: in function 'error' /home/mine/torch/install/share/lua/5.2/trepl/init.lua:384: in function 'require' [string "pcl = require 'pcl'"]:1: in main chunk [C]: in function 'xpcall' /home/mine/torch/install/share/lua/5.2/trepl/init.lua:670: in function 'repl' ...mine/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk [C]: in ?

Dose anyone get this error and solve it before?

andreaskoepf commented 7 years ago

@saix47 There were some unicode minus signs at line 1068 in PointTypes.lua. For unknown reasons the code ran on my machine without the error. I have replaced the minus signs with regular '-'. Please let me know if this fixes the problem for you.

saix47 commented 7 years ago

@andreaskoepf I updated and build the package again, but now I get other error:

th> require 'pcl' /home/mine/torch/install/share/lua/5.2/trepl/init.lua:384: /home/mine/torch/install/share/lua/5.2/trepl/init.lua:384: /home/mine/torch/install/share/lua/5.2/pcl/PointTypes.lua:126: unexpected token in function argument 1 on line 1 stack traceback: /home/mine/torch/install/share/lua/5.2/trepl/init.lua:501: in function </home/mine/torch/install/share/lua/5.2/trepl/init.lua:494> [C]: in function 'error' /home/mine/torch/install/share/lua/5.2/trepl/init.lua:384: in function 'require' [string "_RESULT={require 'pcl'}"]:1: in main chunk [C]: in function 'xpcall' /home/mine/torch/install/share/lua/5.2/trepl/init.lua:652: in function 'repl' ...mine/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk [C]: in ?

andreaskoepf commented 7 years ago

@saix47 Could it be you are trying to use torch-pcl with the luaffifb ffi? I have tested torch-pcl only with luajit and its original ffi interface.

saix47 commented 7 years ago

@andreaskoepf yes, I'm using Lua 5.2 and luaffifb because I have trouble with LuaJIT memory limitation before. Currently I'm not sure whether LuaJIT is better.

andreaskoepf commented 7 years ago

@saix47 I will checkout next week whether support of luaffifb for torch-pcl is possible (depends on the amount of work neccessary).

saix47 commented 7 years ago

@andreaskoepf Thank you a lot.