For Stefanie Tellex's class
- Plug in the battery or power supply to the drone.
- Connect to the wifi network corresponding to the name of your drone.
ssh [email protected]
orssh duckiesky@<nameofdrone>.local
.
- On drone, run the following:
roscd pidrone_pkg
./start_pidrone_code.sh
(this launches a screen session)
- On base station:
- Open
pidrone_pkg/web/index.html
(a.k.a. web interface) in a web browser; either double-click .html file or drag-and-drop it into a web browser to get it to render as a web page (meaningless to open/edit the file itself!). - Type IP address or hostname of drone into
hostname
box and clickConnect
.
- Open
-
In the screen session (launched by
./start_pidrone_code.sh
):- Window
0
: Used for roscore. Responsible for starting a ROS Master. - Window
1
: Used for flight controller node. Responsible for receiving desired behavior (e.g. arm drone, move drone forward, etc.) and sending corresponding lower-level signals to flight controller to achieve said behavior. - Window
2
: Used for PID controller node. Node manages multiple PID controllers, such as throttle PID controller. - Window
3
: Used for running a state estimation algorithm. List of supported algorithms includes: exponential moving average, 2D UKF, 7D UKF, and more. - Window
4
: Used for reading data from camera and doing either: 1) optical flow and dead reckoning or 2) localization. Can run optical flow and dead reckoning viapython vision_flow_and_phase.py
; can run localization onboard withpython vision_localization_onboard.py
or offboard withpython vision_localization_offboard.py
. - Window
5
: Used for reading data from the IR sensor and publishing it to a ROS topic. - Window
6
: Used to run a web server that lets a client receive information about the drone or send control input to the drone. - Window
7
: Used to run a web video server that lets a client receive camera image data. - Window
8
: Free window that can be used for anything. - Window
9
: Free window that can be used for anything.
- Window
-
Switch screen windows using
`
+<window number>
. For example,`
+0
switches to window0
. -
Exit the screen by using
`
+:
(i.e.Shift
key +;
key), then typingquit
and pressing theEnter
key. Altogether, you should see:quit
at the bottom left of the terminal window before you press theEnter
key.
- See web interface for a list of drone input controls.
- (Skip step if done before)
On drone, run the following:
-
or alternatively
cd /etc/wpa_supplicant sudo ./generate_wpa_supplicant_conf.sh
When prompted, enter credentials for home network.roscd pidrone_pkg/ cd networking sudo ./generate_wpa_supplicant_conf.sh sudo mv wpa_supplicant.conf /etc/wpa_supplicant
-
- On drone, run the following:
-
or alternatively
roscd pidrone_pkg/ python networking/connect_to_user_wifi.py
cd /etc/wpa_supplicant ./connect_to_user_wifi.sh
- the ssh session to the drone will terminate shortly after. The wifi connection to the drone will disconnect.
-
- On base station:
- connect to home network (instead of drone network)
- open a terminal or command prompt and run
ssh duckiesky@<hostname>
, where<hostname>
is the hostname of the drone (found in file/etc/hostname
). The default isduckiesky-drone
. - A password prompt will appear. After entering the password, the ssh connection to the drone will be complete.
- Starting with release v2.2-kinetic, all releases work on ROS Kinetic (unless specified otherwise). Older releases do not - they only work up to ROS Indigo. Furthermore, releases v2.2-kinetic and higher do not have backward compatibility with older versions of ROS.
- When connected to the power supply, if the drone draws too much power, the supply will not be able to keep up and the drone will shut off and crash into the ground fairly dramatically. It should only fall, since it is no longer recieving power, and this does not happen on battery power. Nobody has been hit by this!?
- Please use git flow paradigm when contributing to this project.