Question on array of SVectors and \

linearalgebra

#1

I’m learning about ICP (Iterative Closest Point) and at this stage try to implement the basics myself (I know about the existing packages).
I have two arrays of points, that I want to match and therefore I want to compute the homogenous transformation between them. The points are represented with static arrays: SArray{Tuple{4},Float32,1,4} (length of 4 because they’re homogenous coordinates), so the arrays of points look like: Array{SArray{Tuple{4},Float32,1,4},1}
I have an equation like: reading_array * transform_matrix = referenc_array (the arrays have the same length).
If I transpose them and try to solve the equation I get the following error:
MethodError: no method matching pinv(::Array{SArray{Tuple{4},Float32,1,4},1}, ::SArray{Tuple{4},Float32,1,4})

My question is, that the method error raises because I have array of arrays instead of matrix? (I read here that it’s better to have that way, but it’s possible that I misinterpreted it.) If so, should I use SMatrix at a size like (ten)thousands×4?


#2

It would be useful if you could provide a self contained example that we can run to reproduce the error.


#3

Most likely not. I’d just use regular arrays for this.