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 16-05-2014 13:20

Re: Android Driver Station
 
Quote:

Originally Posted by guniv (Post 1385718)
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.

I did a little research on adding support for a physical joystick, it seems pretty easy but you need an OTG cable. I just ordered one, so hopefully by the end of summer vacation (August) the app will support a physical joystick.

Andrew Rudolph 16-05-2014 13:41

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.

raystubbs 16-05-2014 13:57

Re: Android Driver Station
 
Quote:

Originally Posted by Andrew Rudolph (Post 1385762)
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.

Thanks for the info, it could prove useful, however I am developing on a Kindle Fire 2nd gen. (which doesn't have Bluetooth) and haven't gotten around to figuring out how to root it. Also I would like the app to be available to those who do not want to root their device.

Joel Glidden 16-05-2014 14:01

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.

raystubbs 16-05-2014 14:05

Re: Android Driver Station
 
Quote:

Originally Posted by Joel Glidden (Post 1385769)
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.

It would be awsome to eventually add support for these devices, but really I'm not that good a programmer yet, this is actually my first android app, and I've never worked with bluetooth before. Hopfully when I open source the app some of you at CD can help me out with some of this.

guniv 16-05-2014 22:02

Re: Android Driver Station
 
Quote:

Originally Posted by raystubbs (Post 1385756)
I did a little research on adding support for a physical joystick, it seems pretty easy but you need an OTG cable. I just ordered one, so hopefully by the end of summer vacation (August) the app will support a physical joystick.

OTG cables are absolutely awesome, I can transfer photos from my DSLR to my tablet and post to our team's FB page in a minute.

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.

raystubbs 16-05-2014 22:31

Re: Android Driver Station
 
Quote:

Originally Posted by guniv (Post 1385890)
OTG cables are absolutely awesome, I can transfer photos from my DSLR to my tablet and post to our team's FB page in a minute.

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.

I cannot guaranty it since I know nothing about the Shield, but I just looked it up and if I'm guessing correctly and if the Shield runs android, than the same code to add support for an external joystick will also work perfectly for the Shield joystick.

guniv 17-05-2014 18:29

Re: Android Driver Station
 
Quote:

Originally Posted by raystubbs (Post 1385896)
I cannot guaranty it since I know nothing about the Shield, but I just looked it up and if I'm guessing correctly and if the Shield runs android, than the same code to add support for an external joystick will also work perfectly for the Shield joystick.

Awesome.

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.

raystubbs 18-05-2014 18:20

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.

raystubbs 20-05-2014 13:15

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:

raystubbs 21-05-2014 08:33

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.

raystubbs 22-05-2014 17:14

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.

Spok 22-05-2014 22:28

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?

raystubbs 23-05-2014 09:51

Re: Android Driver Station
 
Quote:

Originally Posted by Spok (Post 1387030)
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?

You get a parsing error on both versions? Others have installed it on their galaxys. Do you have "Allow applications from unknown sources" enabled? This needs to be enabled if it is not.

dmaciel10123 23-05-2014 10:32

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.


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