Modified 2021-07-14 by Andrea Censi
Modified 2021-07-14 by Andrea Censi
use the multimeter to check the battery voltage by inserting the probes into the battery terminals. A full battery is 12.6 V, an empty battery is around 10.5 V. If your battery voltage is below this, especially below 9V, the battery may be permanently damaged and needs to be recycled.
Modified 2021-07-14 by Andrea Censi
continue on
Modified 2021-07-14 by Andrea Censi
charge or replace the battery
Modified 2021-07-14 by Andrea Censi
continue on
check the voltage going into the BEC from the PDB
make sure that the BEC is wired the correct way (red wire goes to positive (+), black wire goes to negative (-))
Make sure that the OUT side of the BEC is soldered to the Pi Hat, and the IN side is soldered to the PDB
Make sure there are no stray wire hairs that are shorting out the 5V and the GND rails on the Pi Hat
Modified 2021-07-14 by Andrea Censi
This is the small led near the SD card
continue on
If the light is blinking, then the Pi is not receiving enough power. Check the voltage coming out of the BEC. It should be a constant 5V
If the light does not turn on, then the Pi is not receiving any power.
Make sure that the Pi Hat is attached to the Pi all the way (there is no gap between the GPIO pins and the Pi Hat pin header).
Make sure that the OUT side of the BEC is soldered to the Pi Hat, and the IN side is soldered to the PDB
Make sure that there is not a short between the power and ground rails on the Pi Hat.
Make sure there are no stray wire hairs that are shorting out the 5V and the GND rails on the Pi Hat
Modified 2021-07-14 by Andrea Censi
continue
Make sure that you have flashed your SD card
Make sure that the green LED on the Pi near the SD card is blinking. If this light is not on, then the SD card is not flashed properly. Re-flash the SD card, and if this does not work try a new SD card.
Modified 2021-07-14 by Andrea Censi
continue
If the drone is in access mode (you’re connected to the drone’s WiFi):
make sure that the link is opening to the right address. Try manually typing 192.168.42.1:8081
and press enter in your browser
try another browser. Google Chrome is the browser and know to work correctly
If the drone is in managed mode (the drone is connected to your network):
192.168.42.1
). If you are trying to access the drone via hostname instead of ip, make sure that you append .local
, so it would be duckie-drone.local:8081
Modified 2021-07-14 by Andrea Censi
Does the web interface show up when you browse to 192.168.42.1
? Don’t worry for now if the interface connected or not, just whether or not the interface appears
continue
same steps as the code editor, but the address should be 192.168.42.1
, or duckiesky-drone.local
, or new-ip-address
if the drone is in managed mode.
Modified 2021-07-14 by Andrea Censi
use roscd pidrone_pkg
and then run ./start
. Does the terminal look different?
continue
~/ws/src/pidrone_pkg
Modified 2021-07-14 by Andrea Censi
After running the start code, typ is the key to the left of the 1
on your keyboard, and is on the same key as the ~
. Does the last line on this screen say started core service [/rosout]
?
continue to check the FC node
Quit the screen by typing the tick (`) followed by colon (:
) and the type the word quit
and press enter. You will not see the tick and colon typing, but you will see “quit” as you type at the bottom of the screen. continue on to the next checks.
Modified 2021-07-14 by Andrea Censi
In the terminal, type screen -ls
. Were any sockets found?
You will need to quit each socket found so that only one screen session is running. To do so:
For each socket found, there is a name that looks like 2503.pts-0.duckiesky-drone
. The four numbers at the beginning, 2503
are the session id. Run this command for each session id:
screen -S [session id] -X quit
For example, for this session it would be screen -S 2503 -X quit
Be sure that the ‘S’ and ‘X’ are capitalized.
continue
Modified 2021-07-14 by Andrea Censi
In the terminal, type echo $ROS_MASTER_URI
. Did the terminal print out http://localhost:11311
?
If you’re on the drone’s network, continue on.
If you’re drone is managed mode, then type export ROS_MASTER_URI=[ip address]:11311
where [ip address]
is the ip address of the drone on your network.
Modified 2021-07-14 by Andrea Censi
Navigate to the flight controller node using “tick 1”: ` 1. Press enter to start the node, and then type y
and press enter when prompted if you’re ready to fly. Is the last line printed out “/pidrone/battery”?
continue
Modified 2021-07-14 by Andrea Censi
If the last line printed out says that the USB is not plugged in:
make sure that the USB is plugged into any one of the four USB ports on the Pi.
make sure that the micro USB is plugged into the flight controller. (it should be hot glued in)
rerun python flight_controller_node.py
.
If you get the error again:
make sure that the flight controller is lighting up in some way. If it is not, the micro USB port on the flight controller may be broken. Was it glued down?
try wiggling the micro USB end or using a different USB port on the Pi. If the flight controller never lights up, it may need to be replaced.
Modified 2021-07-14 by Andrea Censi
Navigate to the PID controller node using “tick 2”: ` 2. Is the last line printed out PID Controller Started
?
continue
Modified 2021-07-14 by Andrea Censi
Navigate to the state estimator using “tick 3”: ` 3. Is the last line printed out Starting filter
?
continue
make sure the flight controller node is running, as data is needed from the imu to start the filter.
continue with the checks to make sure the other sensors are working, then try rerunning this script
Modified 2021-07-14 by Andrea Censi
Navigate to the vision node using “tick 4”: ` 4. Is the last line printed out Vision started
?
continue
If the last few lines say something like: “out of resources other than memory”, then the issue is the physical connection from the camera to the Pi.
make sure that the sunny flap is shut (push on the small silver rectangle on the front of the camera and make sure it’s attached firmly)
make sure that the camera cable, or FFC (flexible flat cable) is fully inserted into the camera and the Pi.
On the Pi, make sure the blue side of the FFC is facing towards the USB cables
On the camera, make sure the blue side of the FFC is facing up
Make sure that there are no holes or rips in the FFC. This is a common issue: a crash could have caused a tear, or a hole could have been made when soldering. If this is the case, you will need a new FFC
rerun the vision script
Modified 2021-07-14 by Andrea Censi
Navigate to the IR node using “tick 5”: `5. Is the last line printed out Publishing IR
?
continue
check the connections on the ADC:
make sure there are no shorts between adjacent pins
make sure there are no stray wire hairs causing shorts
make sure the yellow signal wire of the IR sensor connected to “A0” on the ADC
make sure there is 5V across the “V” and “G” pins
Try rerunning the node. If it still does not work, go back through Build Part 2 to check all of the wiring.
Modified 2021-07-14 by Andrea Censi
Navigate to the rosbridge node using “tick 6”: ` 6. Does the last line printed out include the phrase Rosbridge websocket server started on port 9090
?
continue
try rerunning this script.
Modified 2021-07-14 by Andrea Censi
Open up or refresh the drone’s web interface: 192.168.42.1. Does the interface say “Connected” at the top?
continue
wait another 10 seconds and try refreshing again.
Modified 2021-07-14 by Andrea Censi
When you move the drone up and down, does the height reading graph change?
continue
recheck the IR node. rerun the node if needed and then refresh the browser.
Modified 2021-07-14 by Andrea Censi
Move the drone to the left and right over a textured surface. Do the X and Y velocity graphs change?
continue
recheck the vision node. rerun the node if needed and refresh the browser.
Modified 2021-07-14 by Andrea Censi
Is there a long delay between when you move the drone and when the graphs change?
If you are running the drone in access mode, then try quitting the screen with tick colon quit: ` :quit
. rerun the flight code with ./start
and start up the flight controller again. If this does not help, unplug and plug back in the battery to the drone and try again.
If you are running the drone in managed mode, this is probably due to latency in your home network. Take some of the devices offline, or restart the drone and fly in access mode.
continue
Modified 2021-07-14 by Andrea Censi
Click on the web interface and then press the semicolon: ;
. Do the motors on the drone start spinning?
continue
Plug the USB into a computer with Cleanflight and verify that the settings in cleanflight from Build Part 3 FC.
When going back through the settings, double check that:
the yaw is flipped 180 degrees in the “Configuration” tab
the receiver is set to MSP RX Input (so that the FC can receive commands from the Pi over USB) in the “Configuration” tab
the ESC/Motor protocol is set to multishot in the “Configuration” tab.
Modified 2021-07-14 by Andrea Censi
continue
make sure that the arrows inscribed on the propellers are visible from the top of the drone
make sure that the arrows on the props are in the same direction as the arrows on the motors
Take off the propellers from your motors and plug the battery into your drone. In cleanflight, navigate to the motors tab, click “I agree to the risks”, and try to spin up each motor. Make sure that each motor spins in the correct direction.
Make sure that when you spin up motor 1, the correct motor spins (the bottom right). Do this for all of the motors