Go to Post In an education culture that hinges on having the perfect grades and perfect SAT scores to get into the perfect colleges, I enjoy providing an environment where students are encouraged to test their own hypothesis, challenge their assumptions, and regularly fail. - Michael Corsetto [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-01-2016, 00:28
AllenGregoryIV's Avatar
AllenGregoryIV AllenGregoryIV is online now
Engineering Coach
AKA: Allen "JAG" Gregory
FRC #3847 (Spectrum)
Team Role: Coach
 
Join Date: Jul 2008
Rookie Year: 2003
Location: Texas
Posts: 2,549
AllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond repute
Send a message via AIM to AllenGregoryIV
RIOdroid: RoboRIO + Android USB Communication

I've been working on this for a while and I'm finally to the point where I think it might be useful to other teams. This is still very young and will need a lot of work before it ever becomes really useful.

The basic idea for the project is to be able to use the power of inexpensive Android devices on FRC robots. Android devices are getting faster and cheaper and they include many sensors and also a mature code base to draw from.

What has been accomplished so far?
  • Complied Android Debug Bridge (ADB) for the roboRIO
  • Modified jadb and usb4java to work with the roboRIO
  • A port forwarding solution between an Android Device and external ports on the roboRIO (This allows for IP Webcam apps to work on the Android device)
  • Simple install script for copying over the needed files and installing needed packages on the roboRIO
  • None of this requires a rooted android device, so it can be used with most cheap pre-paid phones, etc.

Project Home: RIOdroid on Github

What can you currently do?
  • Forward ports from an Android device to the roboRIO and external ports
  • Run ADB commands from your Java code (including running Android shell commands from Java)
  • use LibUSB commands in Java (This will allow you to setup your roboRIO as an Android Accessory)

Most useful thing you can currently do.
  • Auto start a webcam server (like IP Webcam) and forward that port so you can view the video on your driverstation laptop with the web interface controls
  • RIOdroid-test project does this on boot, just have your android device running the webcam server on port 8080, connect the device to the roborio and power on the roborio, go to roborio-XXXX.local:8080 to view the video.

Volunteers
I'm not much of a programmer (anyone looking at the project can probably tell that) I just do it for FRC. If anyone with experience wants to help work on this please let me know. This is just a side project for me that I think could have some cool applications in the future.
__________________

Team 647 | Cyber Wolf Corps | Alumni | 2003-2006 | Shoemaker HS
Team 2587 | DiscoBots | Mentor | 2008-2011 | Rice University / Houston Food Bank
Team 3847 | Spectrum | Coach | 2012-20... | St Agnes Academy
LRI | Alamo Regional | 2014-20...
"Competition has been shown to be useful up to a certain point and no further, but cooperation, which is the thing we must strive for today, begins where competition leaves off." - Franklin D. Roosevelt

Last edited by AllenGregoryIV : 03-01-2016 at 01:01.
Reply With Quote
  #2   Spotlight this post!  
Unread 14-03-2016, 18:10
Peter Mitrano Peter Mitrano is offline
Registered User
no team
 
Join Date: Jan 2016
Location: Worcester MA
Posts: 21
Peter Mitrano is an unknown quantity at this point
Re: RIOdroid: RoboRIO + Android USB Communication

Sounds cool... I think?

If all you're doing is using it as an interface for displaying information, maybe sending a bit of data, and viewing camera streams, why not just write a smart dashboard client for android? Network tables has java bindings and everything...

Please speak up if I'm missing something here...
Reply With Quote
  #3   Spotlight this post!  
Unread 14-03-2016, 18:21
AllenGregoryIV's Avatar
AllenGregoryIV AllenGregoryIV is online now
Engineering Coach
AKA: Allen "JAG" Gregory
FRC #3847 (Spectrum)
Team Role: Coach
 
Join Date: Jul 2008
Rookie Year: 2003
Location: Texas
Posts: 2,549
AllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond repute
Send a message via AIM to AllenGregoryIV
Re: RIOdroid: RoboRIO + Android USB Communication

Quote:
Originally Posted by Peter Mitrano View Post
Sounds cool... I think?

If all you're doing is using it as an interface for displaying information, maybe sending a bit of data, and viewing camera streams, why not just write a smart dashboard client for android? Network tables has java bindings and everything...

Please speak up if I'm missing something here...
That's one of the eventual goals. You still need to able to launch apps from the roboRIO side to make sure it's actually running during a match, etc. Having ADB running on the roboRIO is very helpful for that sort of thing. This is also so we can run it during a match so it needs to be a wired connection that's where getting USB networking and port forwarding working comes in.
__________________

Team 647 | Cyber Wolf Corps | Alumni | 2003-2006 | Shoemaker HS
Team 2587 | DiscoBots | Mentor | 2008-2011 | Rice University / Houston Food Bank
Team 3847 | Spectrum | Coach | 2012-20... | St Agnes Academy
LRI | Alamo Regional | 2014-20...
"Competition has been shown to be useful up to a certain point and no further, but cooperation, which is the thing we must strive for today, begins where competition leaves off." - Franklin D. Roosevelt
Reply With Quote
  #4   Spotlight this post!  
Unread 14-03-2016, 22:55
Peter Mitrano Peter Mitrano is offline
Registered User
no team
 
Join Date: Jan 2016
Location: Worcester MA
Posts: 21
Peter Mitrano is an unknown quantity at this point
Re: RIOdroid: RoboRIO + Android USB Communication

Why would you want the RoboRIO to control the phone? Launching an app during the match doesn't seem like a really key/useful feature. Why not just launch the app once the robot boots? Although it occurs to me that for network tables stuff you'd have to figure out how to connect the android phone to the network... not sure what the rules are about that stuff and if that's even possible.
Reply With Quote
  #5   Spotlight this post!  
Unread 23-03-2016, 21:16
AllenGregoryIV's Avatar
AllenGregoryIV AllenGregoryIV is online now
Engineering Coach
AKA: Allen "JAG" Gregory
FRC #3847 (Spectrum)
Team Role: Coach
 
Join Date: Jul 2008
Rookie Year: 2003
Location: Texas
Posts: 2,549
AllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond repute
Send a message via AIM to AllenGregoryIV
Re: RIOdroid: RoboRIO + Android USB Communication

Quote:
Originally Posted by Peter Mitrano View Post
Why would you want the RoboRIO to control the phone? Launching an app during the match doesn't seem like a really key/useful feature. Why not just launch the app once the robot boots? Although it occurs to me that for network tables stuff you'd have to figure out how to connect the android phone to the network... not sure what the rules are about that stuff and if that's even possible.
I would want the robot to be able to ensure that the app is loaded and to reload it if it crashes, etc. For network tables it works with ADB because you can virtually forward a port over the USB connection.
__________________

Team 647 | Cyber Wolf Corps | Alumni | 2003-2006 | Shoemaker HS
Team 2587 | DiscoBots | Mentor | 2008-2011 | Rice University / Houston Food Bank
Team 3847 | Spectrum | Coach | 2012-20... | St Agnes Academy
LRI | Alamo Regional | 2014-20...
"Competition has been shown to be useful up to a certain point and no further, but cooperation, which is the thing we must strive for today, begins where competition leaves off." - Franklin D. Roosevelt
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:17.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi