python-pcl icon indicating copy to clipboard operation
python-pcl copied to clipboard

Deprecated argument causes ValueError in ICP related .pxi files

Open ilkedemir opened this issue 5 years ago • 3 comments

The deprecated argument in the following line causes a ValueError when running test_registration.py. The update is discussed here in the release notes.

transf = np.empty((4, 4), dtype=np.float32, order='F') ValueError: Non-string object detected for the array ordering. Please pass in 'C', 'F', 'A', or 'K' instead

The corresponding lines across different ICP files:

https://github.com/strawlab/python-pcl/blob/1d83d2d7ce9ce2c22ff5855249459bfc22025000/pcl/pxi/registration/GeneralizedIterativeClosestPoint_180.pxi#L54

https://github.com/strawlab/python-pcl/blob/1d83d2d7ce9ce2c22ff5855249459bfc22025000/pcl/pxi/registration/IterativeClosestPoint_180.pxi#L71

https://github.com/strawlab/python-pcl/blob/1d83d2d7ce9ce2c22ff5855249459bfc22025000/pcl/pxi/registration/IterativeClosestPointNonLinear_180.pxi#L54

If you change 'fortran' to 'F', tests pass.

System:

  • Mac OS 10.15.1
  • Python 3.7.6
  • PCL 1.9.1_8
  • numpy 1.18.1

ilkedemir avatar Apr 23 '20 21:04 ilkedemir

Thanks a lot, this saved my day. Had this error when trying to invoke pcl.IterativeClosestPoint:

E   ValueError: order must be one of 'C', 'F', 'A', or 'K' (got 'fortran')

wedesoft avatar Nov 20 '20 16:11 wedesoft

Thanks a lot, this saved my day. Had this error when trying to invoke pcl.IterativeClosestPoint:

E   ValueError: order must be one of 'C', 'F', 'A', or 'K' (got 'fortran')

i have the same error when trying to invoke pcl.IterativeClosestPoint, and i have changed 'fortran' to 'F' in IterativeClosestPoint_180.pxi, but it didn't work. do i need to re-install python-pcl after change 'fortran' to 'F'? or is there any other place to change ?

jerryzhai26 avatar Dec 19 '20 11:12 jerryzhai26

How to solve this problem?

linzhenpl07 avatar Jul 08 '23 14:07 linzhenpl07