Skip to content
This repository was archived by the owner on Jul 26, 2019. It is now read-only.

Tutorial: How to run the firefighting app for a single quadcopter

peterdu2 edited this page Aug 31, 2018 · 23 revisions

Prerequisites:

  1. On quadcopter:

    1. GeographicLib (included in NAVIO image)
    2. Position control code (Clone quadcopter folder into your catkin_ws directory)
    3. ROS VRPN client (apt-get install ros-kinetic-vrpn-client-ros)
    4. rosbridge server (apt-get install ros-kinetic-rosbridge-server)
    5. MAVROS (included in NAVIO image)
  2. On local machine:

    1. Ground control software (only necessary if developing for the drone)
    2. ROS (follow this to install ROS if not previously installed)

Hardware setup:

  • Vicon instructions here
  • Quadcopter:
    1. Plug in battery pack. Placement should be made such that the frame can balance on the center of gravity. Refer to frame manual page 24 for more info.
    2. Power on
    3. SSH from local machine using Raspberry Pi IP of quadcopter (use IP lookup software)

Software instructions:

NOTE: (IF SENDING MANUAL REACHED MESSAGE, MESSAGE NEEDS TO BE "TRUE" (IN ALL CAPS))

  • Local machine:
    • Set up StarL application code
      1. Pull code from newLib (quadcopter branch)
      2. Edit newLib/src/main/java/testmain/TestMain.java as follows:
        1. Set number of robots participating (numRobots) to 2.
        2. Create a new BotInfoSelector object
        3. Set apptoRun to FollowApp
        4. Change selectedRobot to 1.
      3. Edit newLib/src/main/java/testmain/BotInfoSelector.java as follows:
        1. Set IP for drone in the green robot section.
      4. Run mvn clean install
      5. Push changes to repo
      6. Repeat step 2 but ensure that selectedRobot is now 0.
      7. Repeat step 3 but now set IP for UI machine in the red robot section.
      8. Run mvn clean install
    • Run StarL code and UI application
      1. Make sure computer is connected to the same WiFi network as the VICON computer.
      2. Launch RosBridge server: roslaunch rosbridge_server rosbridge_websocket.launch
      3. Launch VRPN client to receive VICON data: roslaunch vrpn_client_ros sample.launch server:=IP (Set IP to that of VICON computer. Note: IP is typically 192.168.1.2)
      4. Clear the following files (in /newLib): tasks.txt and erase.txt
      5. In newLib/UI_files, run vrpn_wrapper.py, then run gui_simply.py
      6. In newlib, start StarL app with ./run.sh
  • Quadcopter (via SSH):
    1. Copy pulled code from Decawave repo to catkin workspace and shell script to home directory
      • cp -r Decawave/ROS/cyphyhouse/quadcopter ~/catkin_ws/src
      • cp Decawave/ROS/cyphyhouse/quadcopter/dronesetup.bash ~
    2. Make the code into the ROS node, work out any library dependencies
      • cd ~/catkin_ws
      • source devel/setup.bash
      • catkin_make
    3. Change to home directory and edit dronesetup.bash line 7 to IP of VICON computer (usually 192.168.1.2)
      • should look like roslaunch vrpn_client_ros sample.launch server:=192.168.1.2 & if using that IP
    4. Run dronesetup.bash