![]() |
Android Driver Station
Has anyone written a FRC Driverstation app for Android yet?
I've just written one, all that lacks is testing. Wondering if anyone else has done the same. |
Hey keep us updated on this. I read about the I driver station app, and would love to see the android version. I'll help beta test if you'd like.
|
Re: Android Driver Station
Like to Beta test it as well. Since seeing the RobotOpen and Sasquatch system in use, curious to try any new gen DS software.
That and I've got 4 Android devices across the spectrum. |
Re: Android Driver Station
If a beta tester is needed i have two Android 4 devices, tablet and phone
|
Re: Android Driver Station
I should be able to test it on Monday, April 28, if all works as expected I will send the apk file.
|
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
I found a bug I need to fix, after that I could send you the source code if you'd like. One of the main problems I've had is the video streaming. Android is supposed to support rtsp mp4 video streaming but I haven't got it to work.
The bug I am currently working on is android's permissions and network restrictions, my code works running in a java VM on PC (both Windows and Linux), however androids permissions and limits are killing me. I hope to have this fixed in a few days. |
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Quote:
|
1 Attachment(s)
Attachment 16977 screenshot of my device info. Willing to help in any way possible.
|
Re: Android Driver Station
I got it to work, now I'll make some UIs for your different screen sizes then release the apk (hopefully tomorrow).
|
Cool, your awesome.
|
Our team is having our end of season banquet this weekend. Would be cool to show it off there.
|
Re: Android Driver Station
I have a Droid Razr HD phone and Nexus 7 gen 1 Tablet if that helps for the sizing
|
I have many android devices if you want more testing help
|
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. |
Re: Android Driver Station
Quote:
|
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?
|
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?
|
Re: Android Driver Station
I'd suppose you'd just connect to the robot's network and enable...
|
Quote:
|
Re: Android Driver Station
:ahh:
Long time since I last opened the DS...my bad |
Re: Android Driver Station
Quote:
|
Quote:
|
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Quote:
|
Quote:
|
Re: Android Driver Station
I just tested it, the buttons still don't work sorry. I'll work on this.
|
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.
|
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!
|
Tried it on our bot from last year, worked great except for difficulty turning. I think a second joystick on the screen would be great so we could use drive modes that require two.
|
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
I'm rewriting the app with a more readable structure, when I'm finished I'll open source it and anyone can help add those extra features. Also you may have noticed how empty the ui is on large devices, once I get video working I want to put it in the background of the driving view.
|
Re: Android Driver Station
I added another joystick and got the buttons to work, but I'm not sure if it uploaded correctly so let me know if it is the same as before. Here is the link so you don't have to go back: https://github.com/raystubbs/Android-Driverstation
Also I haven't tested the second joystick since we don't have tank drive on or robot, so let me know if that works. |
Getting a, there is a problem parsing the package, error when trying to install.
|
Re: Android Driver Station
Quote:
|
Btw, thanks again for your work on this, and for sharing with the CD community.
|
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Quote:
Great job on the app, by the way. |
Re: Android Driver Station
As I can only offer suggestions, I have no experience with Android apps, offer a settings page to setup joystick configuration. So instead of two separate joysticks, one joystick with 2 axes. (like an xbox controller)
|
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Going to try and test this out later. You should look into adding support for controllers. Would mean we still have full control but don't have to haul a laptop around.
|
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Another temporary solution for controllers is using the sixaxis app,
https://play.google.com/store/apps/d...iscontroll er This allows you to define areas that correlate to button presses on a six-axis PS3 controller, of course you have to root the device and you have to use a six-axis so if you can get OTG cable support it would be epic. |
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
What about a Bluetooth interface for a PS3 controller or Wiimote? I know these things have been done on the Android platform already. I wonder if there's any open source code to pull from.
|
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Quote:
I was thinking more Nvidia Shield, though, which was given away to many teams for free at Champs as I understand it. Big market for you there. I own one personally and it'd be awesome to control the robot from it. For now I can use the Shield's gamepad mapper to use it which should work just as well. There's a lot of potential here. Looking forward to seeing where this goes. |
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Quote:
Today we took two of our robots down to a large fair for kids and let them check out the robots. Our smaller robot that was just a chassis was controlled by your app the entire day from my Shield. I wasn't there as I had another robotics thing going on a short distance away, but I heard of no problems with it. Makes it easy for us to do this since we don't have to haul a laptop around, and even has better battery. |
Re: Android Driver Station
I added a bit of code for external joystick or Shield joystick support, completely untested as I have no joystick nor any means to connect a joystick to my device. If the code works it will only support the joysticks and not the buttons. I kind of doubt that this will work, but please let me know if it does.
Same link: https://github.com/raystubbs/Android-Driverstation. |
Re: Android Driver Station
Anyone who has tried this app please PM me with your device model, OS version, and any comments, complaints, or recomendations. I would like to know which devices the app works on and how well it works. Thanks.:confused:
|
Re: Android Driver Station
Sorry, in the previous version of the app the buttons did not work on a normal sized phone screen. Please don't use this version, it is pretty unpredictable. I fixed the error and uploaded the app to the same repo.
|
Re: Android Driver Station
I just worked out the last major bug in the open source version, I opened up a new repository. It has all of my code and the binary file. Let pe know if the binary doesn't work, I just copied and pasted the UI's from the prototype version so they may have bugs.
Note: Though the UI on larger screens has a video switch, it does not do anything yet. If anyone wants to help on this project, getting the video to work would be great. |
Re: Android Driver Station
I tried both of the versions, and I'm having trouble installing the .apk onto my devices. I also have not had any previous versions of this app. I have a Samsung Galaxy S4 running Android 4.4.2 and I get an error in parsing the package. Do you have any suggestions?
|
Re: Android Driver Station
Quote:
|
With the newest version (from both repos) the app crashes when I try to launch it.
Here's the log from the Binary from the Source repo: 05-23 10:35:48.082 E/AndroidRuntime(4855): java.lang.RuntimeException: Unable to resume activity {com.example.driverstation/com.example.driverstation.MainActivity}: java.lang.NumberFormatException: Invalid int: "30-80" Also, I downloaded the source and am going to look at getting the video feed working for you. |
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Quote:
I don't get this error, could you try re-installing the app. Sorry, I don't know what else to do since I can't work on a problem I don't have. On second thought, what type of device do you have? If it is a problem with the UI that it could be specific to the screen-size. I will launch the app on an emulator of a smaller screen and see what I can find out. |
Re: Android Driver Station
Quote:
Maybe it is a version error, try uninstalling the app, and re-downloading it maybe? If you do this I would suggest redownloading the second app (Android-FRC-Driverstation). |
Quote:
Edit: I think it may be because of the network I'm connected to. The IP I was assigned had 3 characters in the 3rd portion of the IP. I changed my network settings and it was able to start normal. |
Re: Android Driver Station
Quote:
|
Quote:
Also, I was messing around and added some simple code that may be able to display video but I can't test it yet because I don't have a robot or IP camera. I'll test it probably tomorrow at BattleCry. |
Re: Android Driver Station
Quote:
|
Quote:
Edit: wow okay whoops. I dun goofed. Just tried opening it with the code I added and it crashed immediately. I'll keep working on it. |
Re: Android Driver Station
Quote:
Code:
video = (VideoView)findViewById(R.id.video); |
Quote:
|
Re: Android Driver Station
What is the full uri (path) of the image file? I thought of using the image before. I knew the axis had one I just didn't know where it was.
|
Re: Android Driver Station
I'm pretty sure it's just http://10.xx.xx.11/image.jpg
I may be wrong, but I do have a code that theoretically will work. I just can't test it yet. I uploaded the code to a forked repo at https://github.com/crazyman10123/And...-Driverstation I didn't upload a new binary, just the code. |
Re: Android Driver Station
Quote:
I do have a question though, does it work to put your code in the start() method of a thread? I have only ever put code in the run() method. |
I probably should change it to the run() method because the way it is right now, start() would never end. I wasn't even paying attention to that haha thanks.
Edit: I fixed the start/run methods, and uploaded the changes to the repo. I'll also be trying it tomorrow at BattleCry when I have access to our bot. |
Re: Android Driver Station
I have a Galaxy S4 and I don't have the option to set my subnet mask and it is asking me for a lot more information. Like Default Gateway, DNS, etc when I try to set up a static IP as instructed.
|
Re: Android Driver Station
I got it installed on my tablet (an HP Touchpad running CyanogenMod), and the layout looks fine. I haven't been able to test it on our bot yet since we were busy packing for BattleCry :).
|
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Quote:
Edit: Also, if the robot was not enabled than the compressor would not work would it? |
Re: Android Driver Station
I am running the most up to date version and the compressor does not come on until I hit enable but nothing else works.
|
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Quote:
|
Quote:
|
Re: Android Driver Station
Quote:
I found out something about the video, it may not work, but if you would like to try it: On the example of video code in one of my previous posts I made the URI as: "rtsp://10.xx.yy.11/axis-media/media.3gp" It should have been : "rtsp://10.xx.yy.11:554/axis-media/media.3gp?videocodec=h264" In the second URI I added the :554 after the IP address and at the end I added ?videocodec=h264 which is not necessary except for choosing the video settings, it is unneeded for the default settings. |
Re: Android Driver Station
I added code to support physical joysticks and buttons if anyone wants to try it out, I have no idea if it will work, have not tested it at all.
|
Re: Android Driver Station
I'll see what I can do tomorrow, sorry. Didn't have much spare time today haha. Also, I found where the single image is saved, it's at http://10.xx.xx.11/axis-cgi/jpg/image.cgi so I modified my code to load from that with the default settings at about 30 FPS, so I'll see if that works tomorrow as well. I may need to work on a way to get the regular image rather than the CGI page, though, so I've been looking at various JPEG Decoder tutorials trying to find out what to do.
|
Re: Android Driver Station
Quote:
I was messing with the camera a while ago and found another image file at http://10.xx.xx.11/jpg/image.jpg for if the other doesn't work. |
Re: Android Driver Station
Oh, thanks haha. I wrote some code that should be able to get the image from the CGI page, but if it doesn't work (and for some reason I feel like it won't) I'll just switch it over to use the URL you found.
|
Okay, so, I tried the app today after we got eliminated and everything worked: joysticks and buttons. I still haven't gotten the image to show but I am continuing to work on it and hope to have it working soon.
|
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Quote:
It was because the timing on sending the packets was off, it has to be exactly 0.02 seconds. |
Re: Android Driver Station
Quote:
|
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.
|
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. |
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! |
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.
|
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. |
Re: Android Driver Station
Quote:
The GitHub is still up, it's just at a different repo now. https://github.com/raystubbs/Andrid-FRC-Driverstation |
Re: Android Driver Station
Quote:
|
Re: Android Driver Station
Quote:
|
| 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