uzh-rpg / dslam_open

Public code for "Data-Efficient Decentralized Visual SLAM"
GNU General Public License v3.0
283 stars 73 forks source link

error in initDecentrState.m line 61 #4

Open roaddy opened 6 years ago

roaddy commented 6 years ago

Matlab report an error when running initDecentrState.m in line 61:

T_O_W(1:3,1:3)*full_state{I}.p_W_lm'+T_O_W(1:3,4);

I think the problem maybe caused by mismatch of matrix dimension to plus, so I replace

T_O_W(1:3,4) with iron(ones(1,size(full_state{I}.p_W_lm,1),1),T_O_W(1:3,4)).

It can pass, but I wonder is this correct?

tcies commented 5 years ago

yes, this is due to versions of matlab older than 2016b not supporting broadcasting: https://blogs.mathworks.com/loren/2016/10/24/matlab-arithmetic-expands-in-r2016b/

I think the vanilla way to fix this is with bsxfun.

Sorry, and sorry for the late reply. If you have this fixed, a pull request would be appreciated!