Optical Flow and Rangefinder not working

Hi All,

I am trying to build a quad-copter for indoor navigation.

So, I bought a Lidar Lite V3 and OpenMV Cam h7 for Rangefinder and Optical Flow sensors respectively.

I connected the Lidar lite as per the documentation but I am not able to see any data in sonar range or sonar voltage. However, some value is being reflected in rangefinder 1 in Mission Planner. The only thing that I am doing differently is that I am not powering the lidar lite separately i.e. the lidar lite is drawing power form the Pixhawk2.

Another issues was upon connecting the OpenMV Cam I was able to get some values in Mission Planner, but when I try to arm it in GUIDED mode, the command is accepted but the motors do not spin and I get an error message stating Vehicle did not respond to arm/ disarm command.

Please, if someone can guide me on the mistakes I am making.

I have set the following parameters:

RNGFND1_TYPE=15
RNGFND1_ADDR=98

FLOW_TYPE = 5
SERIAL2_PROTOCOL= 1
SERIAL2_BAUD=115
EK2_FLOW_DELAY=80

https://ardupilot.org/copter/docs/common-openmv-optflow.html
https://ardupilot.org/copter/docs/common-rangefinder-lidarlite.html

This is a big NO , connecting to FC does not work at best and may damage FC at worst.
As per wiki you need a dedicated UBEC with Capacitor

Hi,

Yes got you. But the now I am facing issues with Optical Flow sensor- OpenMV cam h7. The Mission Planner reads some data but I am not able to arm the quad in GUIDED mode.

I am not sure whether the Optical flow data is going into position feedback of the autopilot. Is there a message we can monitor for seeing this?

If I remember well the openMV is outputting MavLink type OF message. Technically you can go in Mission Planner and Ctrl_f to invoke Mavlink Inspector to check the signal.

Well I checked the OF message and I am getting some data, but the problem is that the motors do not spin after arming the vehicle.

You need to set EKF home by right-click on the map

Whenever I do that it gives me an error that no SRTM data available for this area.

go in parameter and disable terrain data

Hi,

Thanks so much for the help.

I have disabled the GPS parameters and enabled Optical Flow.

I am able to get all the data, but when I try to arm it in GUIDED it fails Prearm saying mode is not armable.