Hi there!
I’m trying to test Optical flow messages provided by [mavlink](optical flow #100)(Messages (common) · MAVLink Developer Guide)
I took as an example OpenMV cam solution which gets sensor camera parametrs and convert it to the mavlink optical flow message using struct library from python
This camers sends x/y shift + qulity parametrs,everything else are 0
According to test flights after adding lidar and colibrating the camera loiter should work well.
The problem is that I’m always getting ‘bad vision positon’ error in mission planner
however opt_m_x , opt_m_y and opt_qua are comming though and are not 0
Lidar is connected and sonarrange seems aslo calculated properly and >0
I tested 2 scenarions
- just passing random raw data via python script using pmvlink libray. As x/y should be of integer types, the minimum not zero value is 1 or -1 so ±1 shift seems reasonable to me assuming drone is always on the same location.
What looked wierd for me as well is that opt_m_x , opt_m_y sometimes bouncing too match for example from 0.0017 it can go occusionaly to 7, not sure it can be the problem and why it happens if values are not >1.
…
- second scenario just connecting open mv, result is the same -‘bad vision position’
testing and setup was made according to this docs
https://ardupilot.org/copter/docs/common-optical-flow-sensor-setup.html#common-optical-flow-sensor-setup
https://ardupilot.org/copter/docs/common-openmv-optflow.html
copter firmawe 4.5.6, flight controller pixhawk 6c
When script is run for the sitl drone simulation-no errors basically for the same firmawre.
Would appriciate any help or suggestions.