Eigen plugin.
This library is mostly compatible with the old matrix.lua library.
Replace:
local matrix = require 'matrix-2'
with:
local matrix = require 'simEigen'
The main difference from matrix.lua is that the functions in this library are all (or almost) implemented in C++.
There are both functions that operate in place (i.e.: on the current matrix) and functions that return a new matrix, so it is possible to optimize code even further, by avoiding too many memory allocations.
There are a few methods that have different names and different semantics with respect to matrix.lua, or have been added/removed:
-
m:sameshape()/m:offset()not present -
m:get()deprecated; usem:item() -
m:set()deprecated; usem:setitem() -
m:rowref()/m:dataref()not present (operation is anyways slow, and a vectorized operation would be preferable; -
m:setrow()/m:setcol()work also with plain tables; -
m:slice()not present; usem:block()orm:blockassign()which have different order of parameters and different semantics -
m:flip()not present -
m:droprow()/m:dropcol()not present -
m:at()not present -
m:repmat()/m:ones()/m:zeros()not present -
m:applyfunc()/m:applyfunc2()/m:applyfuncidx()not present -
m:binop()/m:fold()/m:mult()not present -
m:random()not present -
m:tointeger()not present -
m:gauss()not present -
m:inv()not present; usem:pinv() -
m:ult()/m:power()/m:diag()not present -
m:axis()/m:hom()/m:nonhom()not present -
m:eq()/m:ne()/m:lt()/m:gt()/m:le()/m:ge()/m:all()/m:any()/m:isnan()/m:nonzero()/m:where()not present -
m:t()can be also written asm.T, andm:transpose()transposes in place -
Vector:linspace()now is insimEigen.Matrix;:logspace()/:geomspace()not present -
classes
Vector3/Vector4/Vector7/Matrix3x3/Matrix4x4removed or replaced byVector/Quaternion/Pose
- Install required packages for simStubsGen: see simStubsGen's README
- Checkout, compile and install into CoppeliaSim:
$ git clone https://github.com/CoppeliaRobotics/simEigen.git
$ cd simEigen
$ git checkout coppeliasim-v4.5.0-rev0
$ mkdir -p build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ cmake --build .
$ cmake --install .NOTE: replace coppeliasim-v4.5.0-rev0 with the actual CoppeliaSim version you have.