Above plot is time integration of flow sensor int x and y.
Calculated speed is approximately 0.01 m/s while there is no significant movement in forward/backward direction.
It looks like somewhere in position controller yields small errors is body x frame.
How can I solve this problem? or any suggestions on this issue?
So I decided to manually compensate errors in optical flow to local position estimate.
To do that, I need to transform flow int x, y in body frame to NED frame as shown here.
in mc_pos_control_main.cpp
the rotation matrix _R being updated every att update as here
and by subscribing the optical flow orb message, I can get int_x and int_y and put it into matrix::Vector3f _flow_int;
My question is, in order to transform, simply multiply them would work?