Over the course of this summer, I have been working on a research project at the University of Virginia involving a flying camera platform indoors. Seeing as GPS is not a valid option for indoor loitering, I chose to use a combination of px4flow and LIDAR-Lite sensors to maintain position. Seeing as documented personal experiences are in short supply, I figured I would share my experience and what I learned. I also want to say that I have been part of the community for several years, and until now, I have not done anything interesting or new enough to post about, so I am overly excited to be posting :)
As always, the adventure began on the wiki. The PX4FLOW page referenced needing a rangefinder, recommending the LIDAR-Lite, which I hastily ordered. One bit of advice, check to make sure you have all the required cables before you hit order. When they both arrived, I realized I did not have any 4-pin DF13 cables, one of which is used to connect the OF sensor to the Pixhawk.
Not letting that deter me, I started with the LIDAR. Following the instructions on the wiki, I decided to use PWM as my interface, because I did not have the required capacitors for I2C, and my I2C bus was filling up. 15 minutes later, I had the wiring done, and had reflashed the firmware on the copter to the newest 3.3 beta. Configuration was easy, again following the wiki, and a quick test flight verified the sensor's operation. As soon as the DF-13 cable arrived, I again followed the wiki for configuration and setup of the Optical Flow, which went without a hitch.
Now begins the fun part; Tuning and testing. With the sensors installed as shown above, I began the tuning process by focusing the OF camera. This took a bit of time, and a good bit of work. First, the wiki recommends installing specific firmware on the OF Camera. The trouble was, the newer version of QGroundControl refused to let me choose my own firmware to upload. I managed to track down an older version of QGroundControl, and uploaded the firmware. From there, connecting and viewing the video is easy. I would recommend setting the sensor to "video only" mode, as you will get a much higher resolution for focusing.
With the camera focused, I began the tuning procedure in the wiki. This is an absolute must. I thought that it would not be needed, but the results of my first test before tuning were truly too horrendous to even post. With the config rechecked, the camera refocused at the correct distance, and some tuning, the senors resulted in a much better flight, which the logs back up.
Once the OF and gyro data all lined up nicely, I switched the EKF filters from using GPS to using OF, and took the copter outside for my first flight. The results were spectacular, and the copter was able to hold position in wind, without so much as a wobble, up to 25 feet in altitude. Confident, I brought the copter into the reactor room, the environment it would be flying in on a daily basis. When I took off, the copter almost immediately veered off and nearly crashed into a chair. Disheartened, I looked through the logs, and found that the optical flow was, once again, getting inconsistent readings.
After re-reading the wiki page, I realized that the whole reactor room was lit up with nothing but LEDs, and not very bright ones. I immediately brought out all of the drop lights with halogen bulbs I could find in the building and lit up the floor of my test area. The test flight confirmed that the light, and type of light, in that room was the problem, as the copter performed flawlessly. After adding the FPV system, I had a platform that would fly in one spot and live stream video from the air. Below is a test flight I recorded, and sorry for the potato-quality lighting, it is a result of the LED lighting in the room.
The eventual goal is to put the Tarot Gimbal I took off the IRIS+ back on, and use the gopro for video. I have yet to figure out how I intend to do that, as there is very little realestate on the bottom of the IRIS+, but I will update this blog if I manage to figure it out. I hope this helps someone, or was at least entertaining! If anyone has any questions, I will be happy to help. Thanks for reading!