Working quad with optical flow (Auto-takeoff not working)

As posted in the discord, I have a working quad with optical flow (here flow and tfmini) and I’m trying to get it to do auto takeoff and commands from my jetson nano

I’m indoors so no GPS, any thoughts on what to do? I’ve seen scattered forum posts about this but still having trouble finding info and the Takeoff command fails with “no position estimate” - I also tried setting the EFK origin from mission planner to no avail.

I used this answer in the forum during testing:

Any thoughts @rmackay9 ?

Log file attached

1 12-31-1979 4-00-00 PM.bin (158 KB)
2023-12-01 21-16-44.tlog

Josh

Hi @joshjle,

It looks like there are a number of messages displayed on the ground station that show the vehicle hasn’t been setup at all. Also a very old version of AP is installed. The wiki instructions for initial setup are here.

image

oops sorry - old log this should be the most recent one
4 12-31-1969 4-00-00 PM.bin (485.2 KB)

Also I had success setting the EKF home origin but when I tried the takeoff command this happened:

12/3/2023 5:24:37 PM : Mode change to GUIDED failed: requires position
12/3/2023 5:24:37 PM : Mode change to GUIDED failed: requires position
12/3/2023 5:24:37 PM : Mode change to GUIDED failed: requires position
12/3/2023 5:24:23 PM : EKF3 IMU1 origin set
12/3/2023 5:24:23 PM : EKF3 IMU0 origin set

Hi @joshjle,

I think that the rangefinder may not working.

Can you set the ARMING_CHECK back to 1 and also create another log if possible where the vehicle is lifted up and put back down again. Of course you should be able to see the rangefinder distance in MP’s flight data screen’s Quick or Status tab on the bottom left.

1 Like

outdoor there is a GPS coordinate system for navigation, what navigation do you have for indoor. what I know is some setup Bluetooth or Wifi network indoor, ArUco map using vision, proprietary indoor navigation, etc is required.

Optical flow sensor only help the drone to lock to position indoor when there is no pilot RC input or indoor waypoint commands.

An alternative method which avoids the need to land and change EKF3 parameters between calibration and testing is to setup GPS/Non-GPS transitions so the pilot can manually change between GPS and Optical Flow inflight., have you try this?

imagine you yourself is the drone, how will you navigate indoor without a navigation infrastructure.

May I know besides mavlink, which software packages setup on Jetson Nano, I failed to setup mavsdk-python on Nano but install successfully on Orin NX. But still got some application code execution issue.

I have a better result with Pi4B, both installation and execution.

Hey @rmackay9

Rangefinder is functional - screenshot shows a change when drone is lifted, also updated log attached below. For reference, Loiter and FlowHold modes work fine in the air -

What if I fake a GPS location just for takeoff? Since I’ve already edited the EK3_SRC params to leverage Op Flow and other sensors, will it be able to handle itself after takeoff?

I’d like to use the onboard companion computer to give directional commands.

I have not tried the GPS/Non-GPS transitions because I do not have a functional GPS on-board

Also, I’ve only been able to get MAVProxy functional on Python 2.7 on Jetson Nano - I plan to pipe commands into the interactive MAVProxy shell as a workaround for not getting mavlink, nor the now defunct dronekit working on the Nano

Python 2.x, then you should look at dronekit, more room for the application development.
Personally, I feel developers should let python 2.x go. furthermore, Dronekit cannot work well with more than one UART channels enabled, for example Telem 1 (Dronekit) + Telem 2 (Sik Radio).

If you fake the GPS, how far can the development go. Do you foresee the drone crash into indoor walls? you maybe interested to this article, using motion capture system for external navigation.

Even though you do not have a GPS mounted, you can still setup the transition and keep the RC selection to indoor.

Maybe this is what you are looking for, Guided_NoGPS.