Go to Post It's ok to be tired. That's what CD Mods are for. - Jessica Boucher [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #91   Spotlight this post!  
Unread 05-25-2014, 11:07 PM
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Re: Android Driver Station

Quote:
Originally Posted by raystubbs View Post
It's good that everything still works. Any idea why Dr.Gusta's didn't work? I have no idea.
With my iPhone version I have had it where the robot code gets initialized but the run code does not and also the RSL does not signal that it is enabled.

It was because the timing on sending the packets was off, it has to be exactly 0.02 seconds.
  #92   Spotlight this post!  
Unread 05-26-2014, 09:31 AM
raystubbs's Avatar
raystubbs raystubbs is offline
Programmer, Builder, Designer
FRC #2657 (Thundercats)
Team Role: Student
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Deming NM
Posts: 121
raystubbs will become famous soon enough
Re: Android Driver Station

Quote:
Originally Posted by Chiller View Post
With my iPhone version I have had it where the robot code gets initialized but the run code does not and also the RSL does not signal that it is enabled.

It was because the timing on sending the packets was off, it has to be exactly 0.02 seconds.
Thanks for the information, I'll try to fix this.
__________________
"If all else fails, read the instructions."
  #93   Spotlight this post!  
Unread 05-26-2014, 09:33 AM
raystubbs's Avatar
raystubbs raystubbs is offline
Programmer, Builder, Designer
FRC #2657 (Thundercats)
Team Role: Student
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Deming NM
Posts: 121
raystubbs will become famous soon enough
Re: Android Driver Station

I got the video to work, I used dmaciel10123's idea to get it to work, it may not be very fast, I have no idea how it will work since I have only tested it on an emulator. Feedback is appreciated.
__________________
"If all else fails, read the instructions."
  #94   Spotlight this post!  
Unread 05-27-2014, 09:20 PM
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: Android Driver Station

I submitted a pull request that should make it easier to allow people to work on your code. It adds a .gitignore file that ignores the Eclipse build directory and auto-generated files. This makes it so only changes to code and other important files actually show up in the commit so people do not need to merge in a bunch of minor changes each time you push to the repo.

I hope you consider this. Thanks, Ben.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
  #95   Spotlight this post!  
Unread 05-27-2014, 10:08 PM
jpkelly26 jpkelly26 is offline
Registered User
FRC #1807
 
Join Date: Jan 2013
Location: United States
Posts: 2
jpkelly26 is an unknown quantity at this point
Re: Android Driver Station

This is sweet! Thanks.

Installed successfully on Samsung Galaxy SIII running Android 4.3 and on a Motorola Xoom tablet running Android 4.1.2. Next step, get access to our robot!
  #96   Spotlight this post!  
Unread 05-28-2014, 04:50 PM
guniv's Avatar
guniv guniv is offline
Communications / Business
AKA: Josh Witt
FRC #3966 (L&N STEMpunks)
Team Role: Mentor
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Knoxville, TN
Posts: 146
guniv has a spectacular aura aboutguniv has a spectacular aura aboutguniv has a spectacular aura about
Re: Android Driver Station

Now that the iOS app is out, maybe work with them and see how they got features working? You guys are competing in different markets, so collaboration would help a lot. They've gotten video working on their end, apparently. Gonna have some team members pick up the app (our school is 1:1 tech on iPads) and see what they think.
  #97   Spotlight this post!  
Unread 06-09-2014, 10:03 AM
guniv's Avatar
guniv guniv is offline
Communications / Business
AKA: Josh Witt
FRC #3966 (L&N STEMpunks)
Team Role: Mentor
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Knoxville, TN
Posts: 146
guniv has a spectacular aura aboutguniv has a spectacular aura aboutguniv has a spectacular aura about
Re: Android Driver Station

This thread is quite dead. Ray's GitHub seems to be taken down as well.
In any case, I used this app with my Nvidia Shield and it's built in Gamepad Mapper this weekend at a carnival we were at this weekend, and drove around one of our stripped down chassis. I was also able to hand off the Shield to other people and let them drive, like the kid in this video.
  #98   Spotlight this post!  
Unread 06-09-2014, 10:29 AM
dmaciel10123 dmaciel10123 is offline
The Everything Guy
AKA: David Maciel
FRC #3525 (The Nuts and Bolts of Fury)
Team Role: Alumni
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Waterbury, Connecticut
Posts: 100
dmaciel10123 is an unknown quantity at this point
Re: Android Driver Station

Quote:
Originally Posted by guniv View Post
This thread is quite dead. Ray's GitHub seems to be taken down as well.
In any case, I used this app with my Nvidia Shield and it's built in Gamepad Mapper this weekend at a carnival we were at this weekend, and drove around one of our stripped down chassis. I was also able to hand off the Shield to other people and let them drive, like the kid in this video.

The GitHub is still up, it's just at a different repo now.
https://github.com/raystubbs/Andrid-FRC-Driverstation
__________________
  #99   Spotlight this post!  
Unread 06-09-2014, 10:36 AM
guniv's Avatar
guniv guniv is offline
Communications / Business
AKA: Josh Witt
FRC #3966 (L&N STEMpunks)
Team Role: Mentor
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Knoxville, TN
Posts: 146
guniv has a spectacular aura aboutguniv has a spectacular aura aboutguniv has a spectacular aura about
Re: Android Driver Station

Quote:
Originally Posted by dmaciel10123 View Post
The GitHub is still up, it's just at a different repo now.
https://github.com/raystubbs/Andrid-FRC-Driverstation
Oh! My bad. Thanks!
  #100   Spotlight this post!  
Unread 06-09-2014, 04:44 PM
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Re: Android Driver Station

Quote:
Originally Posted by guniv View Post
Now that the iOS app is out, maybe work with them and see how they got features working? You guys are competing in different markets, so collaboration would help a lot. They've gotten video working on their end, apparently. Gonna have some team members pick up the app (our school is 1:1 tech on iPads) and see what they think.
Just released the native iPad version so make sure you update!
  #101   Spotlight this post!  
Unread 06-09-2014, 04:47 PM
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Re: Android Driver Station

Quote:
Originally Posted by raystubbs View Post
I got the video to work, I used dmaciel10123's idea to get it to work, it may not be very fast, I have no idea how it will work since I have only tested it on an emulator. Feedback is appreciated.
I just use a simple html document that loads the feed and if it times out then it displays a message, all with jQuery

Just load the html file into a string and replace {jquery} with the contents of a jquery library file and also replace {te} and {am} with teamNum / 100, teamNum % 100, and also replace width and height with the web views width and height and wallah!

Code:
<html>
	<head>
		<script type="text/javascript">{jquery}</script>
		
		<script type="text/javascript">
            var timeout;
            
			$(function() {
				$("#errordiv").click(reload);
				$("#stream").click(reload);
				
				reload();
			});
			
			function reload()
			{
				$("#error").text("Loading Camera...");
				
				$("#stream").attr("src", "http://10.{te}.{am}.11/mjpg/video.mjpg?resolution=640x480&fps=30");
                
                timeout = setTimeout(function() {
                    //Cam did not load
                                     
                    $("#error").html("Error Loading Camera<br/>Tap to Refresh");
                     
                    $("#stream").css({"display":"none"});
                    $("#errordiv").css({"display":"block"});
                }, 4000);
				
				$("#stream").load(function() {
					$("#stream").css({"display":"block"});
					$("#errordiv").css({"display":"none"});
                                  
                  clearTimeout(timeout);
				}).error(function() {
					$("#error").html("Error Loading Camera<br/>Tap to Refresh");
				
					$("#stream").css({"display":"none"});
					$("#errordiv").css({"display":"block"});
                         
                    clearTimeout(timeout);
				});
			}
		</script>
	</head>
	<body style="padding: 0; margin: 0;">
		<div id="errordiv" style="display: none; background: lightgray; height: 100%; text-align: center;">
			<label id="error" style="position: relative; top: 40%;">Tap to refresh camera</label>
		</div>
		
		<img id="stream" width="{width}" height="{height}"/>
	</body>
</html>
  #102   Spotlight this post!  
Unread 06-09-2014, 07:59 PM
m1506m's Avatar
m1506m m1506m is offline
Registered User
FRC #1506
 
Join Date: Dec 2013
Location: Flint mi
Posts: 56
m1506m is an unknown quantity at this point
Tried the app out tonight, I am able to connect and enable, but since we are set up for cheesy drive, and not tank, I can only go forward and backward. And after about a minute the connection turns off and I loose connection.
  #103   Spotlight this post!  
Unread 06-21-2014, 12:07 PM
DavisC DavisC is offline
Registered User
FRC #0539 (Titans)
Team Role: College Student
 
Join Date: Jul 2011
Rookie Year: 2010
Location: Virginia
Posts: 200
DavisC is just really niceDavisC is just really niceDavisC is just really niceDavisC is just really nice
Re: Android Driver Station

After connecting to the Robot wifi and launching the app, does the app handle everything necessary with IP addresses (in other words, should it just work out of the box like that?)
__________________
FRC Team 539
Student Member: 2010 Breakaway - 2014 Aerial Assist
Mentor: 2015 Recycle Rush - present
  #104   Spotlight this post!  
Unread 06-21-2014, 01:13 PM
guniv's Avatar
guniv guniv is offline
Communications / Business
AKA: Josh Witt
FRC #3966 (L&N STEMpunks)
Team Role: Mentor
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Knoxville, TN
Posts: 146
guniv has a spectacular aura aboutguniv has a spectacular aura aboutguniv has a spectacular aura about
Re: Android Driver Station

Quote:
Originally Posted by DavisC View Post
After connecting to the Robot wifi and launching the app, does the app handle everything necessary with IP addresses (in other words, should it just work out of the box like that?)
We've had to go in through Android's Wi-Fi settings and set the static IP ourselves.
  #105   Spotlight this post!  
Unread 06-23-2014, 08:59 PM
raystubbs's Avatar
raystubbs raystubbs is offline
Programmer, Builder, Designer
FRC #2657 (Thundercats)
Team Role: Student
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Deming NM
Posts: 121
raystubbs will become famous soon enough
Re: Android Driver Station

Sorry for all the problems, some of them may have been caused by bandwidth taken by the video, which I haven't tested. I only have a kindle fire to test with and it worked perfect before I added the video code. I'm not in the U.S right now and don't have access to any robots. I will try to buy another device by the beginning of the school year, so I'll be able to debug for another device.

Reminder: This is an open source project, a pretty easy project, and my first android app. So anyone interested in trying their hand at android development this would be a good place to start.
__________________
"If all else fails, read the instructions."
Closed Thread


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 07:49 PM.

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