Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Android Driver Station (http://www.chiefdelphi.com/forums/showthread.php?t=129073)

raystubbs 10-05-2014 20:05

Re: Android Driver Station
 
So the app is here http://slideme.org/application/andro...riverstation01 but I'm not sure you'll be3 able to download it yet, so I'm setting up a github repository to be quicker, I'll post a link when finished. Please remember that:

1. This is my first android app, so don't laugh.

2. This is just a prototype, so the UIs will not be very nice and there will probably be a lot of bugs because of the junky design of the code.

Also, the buttons were not working so I changed some code and haven't been able to test it because I don't have access to a robot, so if you test it, please let me know if they work or not.

raystubbs 10-05-2014 20:39

Re: Android Driver Station
 
Quote:

Originally Posted by raystubbs (Post 1384332)
So the app is here http://slideme.org/application/andro...riverstation01 but I'm not sure you'll be3 able to download it yet, so I'm setting up a github repository to be quicker, I'll post a link when finished. Please remember that:

1. This is my first android app, so don't laugh.

2. This is just a prototype, so the UIs will not be very nice and there will probably be a lot of bugs because of the junky design of the code.

Also, the buttons were not working so I changed some code and haven't been able to test it because I don't have access to a robot, so if you test it, please let me know if they work or not.

So here is the repository link https://github.com/raystubbs/Android-Driverstation, please let me know what works and what does not.

lucas.alvarez96 10-05-2014 21:46

Re: Android Driver Station
 
The app opens in my phone with no problems! (Moto G) I'll try it out on the robot whenever I get the chance. Are you planning on uploading the source to the repo?

dmaciel10123 10-05-2014 21:56

App opens fine, but I'm not seeing anywhere for me to be able to configure any settings. How do we connect it to our robot?

lucas.alvarez96 10-05-2014 21:59

Re: Android Driver Station
 
I'd suppose you'd just connect to the robot's network and enable...

dmaciel10123 10-05-2014 22:46

Quote:

Originally Posted by lucas.alvarez96 (Post 1384355)
I'd suppose you'd just connect to the robot's network and enable...

The robot is set to a specific ip, 10.xx.xx.2, where xxxx is the team number. On a local network, devices cannot communicate unless the share a root ip, so the control device needs to be set to 10.xx.xx.y, where y is any number 1-the Max number the bridge allows. This allows the controller and robot to communicate. The driver station provided by FIRST does this for you when you enter your team number. So either the app would have to have a preset team number that it sets the phone to and you simply adjust the ip the robot is on, or you change the ip of the controller to fit.

lucas.alvarez96 10-05-2014 22:49

Re: Android Driver Station
 
:ahh:
Long time since I last opened the DS...my bad

raystubbs 10-05-2014 23:21

Re: Android Driver Station
 
Quote:

Originally Posted by dmaciel10123 (Post 1384361)
The robot is set to a specific ip, 10.xx.xx.2, where xxxx is the team number. On a local network, devices cannot communicate unless the share a root ip, so the control device needs to be set to 10.xx.xx.y, where y is any number 1-the Max number the bridge allows. This allows the controller and robot to communicate. The driver station provided by FIRST does this for you when you enter your team number. So either the app would have to have a preset team number that it sets the phone to and you simply adjust the ip the robot is on, or you change the ip of the controller to fit.

I made my app so that all you have to do is configure the IP of the driverstation and the app will derive the CRIO's IP from that, so first go to the device's wifi settings and long-click the robot access point. Next enable static IP and set it to 10.xx.yy.6, set the netmask to 255.255.255.0 and thats it.

dmaciel10123 10-05-2014 23:26

Quote:

Originally Posted by raystubbs (Post 1384369)
I made my app so that all you have to do is configure the IP of the driverstation and the app will derive the CRIO's IP from that, so first go to the device's wifi settings and long-click the robot access point. Next enable static IP and set it to 10.xx.yy.6, set the netmask to 255.255.255.0 and thats it.

Ah, alright. Awesome. Thanks! I'll probably try it on Monday. That's when I'll next get my hands on a robot. I'm assuming the Joystick would be on USB 1 and the axes would be 1 and 2?

raystubbs 10-05-2014 23:44

Re: Android Driver Station
 
Quote:

I'm assuming the Joystick would be on USB 1 and the axes would be 1 and 2
That's right, also if there is an error don't forget that android exits an app with the back button, pushing home would just pause the app, so if you need to restart the app exit it with the back button.

raystubbs 10-05-2014 23:47

Re: Android Driver Station
 
Quote:

Originally Posted by lucas.alvarez96 (Post 1384350)
The app opens in my phone with no problems! (Moto G) I'll try it out on the robot whenever I get the chance. Are you planning on uploading the source to the repo?

Sorry for the lack of code, in debugging the app I let the code get REALLY unorganized, to give me some time to organize and document it, then I will release it. I don't know how long this will take, since it depends on the time I have to work on it and how busy I am.

dmaciel10123 11-05-2014 10:00

Quote:

Originally Posted by raystubbs (Post 1384376)
That's right, also if there is an error don't forget that android exits an app with the back button, pushing home would just pause the app, so if you need to restart the app exit it with the back button.

Alright. I'm gonna try it on a simple drivetrain before anything serious. I'll post the results as soon as I have them.

raystubbs 12-05-2014 12:50

Re: Android Driver Station
 
I just tested it, the buttons still don't work sorry. I'll work on this.

Andrew Rudolph 12-05-2014 18:52

Re: Android Driver Station
 
This is shaping up nicely, it'd be awesome if it eventually gets support for a bluetooth or usb controllers so it could be used for driver practice with real sticks.

lgphoneeric 12-05-2014 19:37

I just tried it on our competition robot and it worked right away. The only thing I would like to see added would be a second joystick because with a mecanum drive like we have, I can't rotate without it. Very nice app though!


All times are GMT -5. The time now is 07:18.

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