Giter VIP home page Giter VIP logo

starl's Introduction

StarL 1.5.1

https://wiki.cites.illinois.edu/wiki/display/MitraResearch/StarL

https://www.verivital.slack.com

http://www.verivital.com/

http://www.isis.vanderbilt.edu/

Quick Start Guide

Initiating the App Instance

In order to run your StarL app, first open RobotsActivity.java in starlTemplate and find the following code:

runThread = new FollowApp(gvh);

Change this line so that you instantiate your app instead of FollowApp. You will have to import your app and also create the dependency in the build.gradle of starlTemplate.

dependencies {
    ...
    compile project(':followApp')
}

Setting the Tablet and Drone Info

Open BotInfoSelector.java and set the name, IP addresses, and Bluetooth addresses for each colored robot. For example:

if(color.equals("blue")) {
     name = "bot2"; // this name has to match the one in MatLab for the color
     ip = "10.255.24.152"; // ip address for the mobile device
     if(type == Common.IROBOT) {
         bluetooth = "5C:F3:70:76:CE:B4"; // bluetooth address if using iRobot
         this.type = new Model_iRobot(name, 0,0);
     }
     else if(type == Common.MINIDRONE) {
         bluetooth = "Travis_064729"; // bluetooth address if using Minidrone
         this.type = new Model_quadcopter(name, 0,0);
     }
     else if(type == Common.PHANTOM){
         bluetooth = "Wifi Bridge IP"; // Device IP for wifi bridge if applicable
         this.type = new Model_Phantom(name, 0, 0);
     }
 }

Then back in RobotsActivity.java you can create a robot in the botInfo[] array with the corresponding color:

botInfo[0] = new BotInfoSelector("blue", Common.PHANTOM, Common.NEXUS7);

The total number of robots must be set with:

numRobots = 1;

Configuring the MatLab "GPS"

In UdpGpsReceiver.java you must set the incoming robot position data to be the right type of drone.

case '$':
    try{
        Model_Phantom newpos = new Model_Phantom(parts[i]);
        ...
    }

In this case, all robot position data will be read as Phantom drone data.

Launching the App

Connect a mobile device and press the green arrow. If the app crashes, make sure to enable permissions on the mobile device for the app.

Launching the Drone(s)

If the Bluetooth and Wi-Fi addresses have been correctly entered, or if the DJI remote has been been correctly connected, the application will automatically connect to the robot. The robot name can be tapped in order to switch the robot which the application is connecting to. No other part of the UI is interactable. The checkboxes are status indicators.

In the case that the GPS connects first followed by the drone(s), a launch command will have to be sent via MatLab.

In the case that the GPS connects after the drone has connected, the drone(s) will automatically launch.

Common Reasons for Crashing or not Compiling

  • The proper permissions are not enabled - crash on application launch.
  • MatLab lost track of the drone - crash while the drone is running.
  • The MatLab drone name for a certain color robot is different - crash on connection.
  • Instant Run is enabled. - compile error
  • The project you opened is starlTemplate instead of starl. - compile error regarding Mavlink
  • You do not have the correct build tools or Android libraries installed. Use the SDK manager to fix this. - compile error
  • If you have been running simulations, the Java Platform SE Binary task may have to be stopped. - compile error

Running Simulations

Run Main.java for the StarL application that you want. Main.java also contains the settings for the simulation. In order for the simulation to run, the run configurations must have the classpath of module to be set to the appropriate StarL application. In order for the waypoints to be loaded, the working directory should be set to be the directory containing the waypoints folder.

Note: The waypoint folder handles waypoints for the simulation. Real life waypoints are set in MatLab.

Creating a New StarL Application

The starLTemplate Android application has been designed as the interface for all StarL applications. It is not recommended to write a new Android application. Instead, new StarL applications should be written as a module which can be instantiated with starlTemplate.

Please use the provided applications as a guideline. Essentially, there should be one class which handles the state changes involved in controlling a drone, one class which handles drawing, and one class which contains the settings and runs the simulation.

It is important for every new StarL application to have the appropriate dependencies. The build.gradle should contain the following:

dependencies {
    compile project(':starLib')
    compile project(':starLSim')
}

Features to be Implemented

  • Ability to accept robot position data for multiple types of robots
  • Automatic permission requesting
  • Better crash avoidance calculation
  • Reduce time required to launch simulation
  • Clarify some variables since some drones do not use Bluetooth

New Drone Statuses

DJI SDK - STATUS: PID needs more tuning

@timliang @stirling

Compatible with Mavic and Phantom DJI drones. The tablet must be connected to the remote controller of the drone via USB or Wi-Fi Bridge App. Wi-Fi bridging can be toggled inside DjiController.java.

private static final boolean USING_WIFI_BRIDGE = false;

See the "Setting the Tablet and Drone Info" section for how to change Wi-Fi bridge IP address. Do not set the IP to that of the device running StarL.

Note: When tuning the PID controller, it is important to remember that the controller was designed for the AR Minidrone which has opposite sign conventions for pitch as compared to DJI. Also, the DJI pitch and roll may be flipped.

Ehang SDK - STATUS: Partially Working

@christina @ehrlichwirklich

The PID Controller has not been tuned, and the drone has trouble taking off.

3DR SDK - STATUS: Untested

@austinwilms @yangy14

The 3DR Solo requires a GPS satellite connection and could not be run indoors via MatLab navigation.


For further documentation or implementation clarification regarding the above drones, please message the corresponding authors at https://www.verivital.slack.com.

See the Documentation folder for other materials on the framework.

starl's People

Contributors

abditag2 avatar austinwilms avatar christina954 avatar ehrlichwirklich avatar lin187 avatar mousaalhajlah avatar nhervey avatar stirlingcarter avatar timothy-liang avatar trhoangdung avatar ttj avatar yinghuiyang avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.