![]() |
RoboDS First Test
Just ran first test of RoboDS (2015 Android Driverstation), seems to work pretty well. Buttons and joysticks work. The app still needs some work, but if I can find some free time I should have it finished in a week or so.
|
Re: RoboDS First Test
Would you like some volunteers to beta test before the official release?
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
Here is a brief description of my app, and a prompt for some suggestions. Currently the app supports a 'drag n' drop' interface builder with 'Basic Button' and 'Basic Joystick' components. The app was designed so that new widgets of each category (joystick, button, slider, switch, throttle, etc.) can be easily added, so by the time the app is finished I hope to have a collection of widgets in different styles, and to allow users to import their own. The app's action bar contains a voltage indicator, connection indicator, enable button, mode switch, and a menu with settings and layout editing options. When a new widget is added to the layout a dialog comes up asking for the widget settings (joystick number, axis number, size, etc.). I plan to add support for multiple layouts that can be quickly switched out, but that'll have to wait until after the first release. Also in updated versions I'll add support for video and hardware joysticks. Video streaming is NOT currently supported in the app.
I also plan to add indicators to the widget collection, these'll include gauges, LEDs, and a few others. But to use these components the robot will have to include some RoboDS specific code, I don't want to use Smart Dashboard code because I want it to be a little smaller and lighter then the full Smart Dashboard implementation. So here is a prompt: I prefer to use RoboDS in landscape mode since I have a tablet. I do NOT want the app to change orientation with the sensor. So does anyone want an option to set the orientation of layouts to portrait? Is it easier to use a phone in portrait? Any other suggested features? The source code will be put up on Github after the first APK release, so if you'd like to branch it and add your own features feel free to do so. |
Re: RoboDS First Test
That sounds awesome - can't wait to test it out. Nice Job!!!
|
Re: RoboDS First Test
This would be for driving at home, not connecting to the field, right?
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
Quote:
|
Quote:
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
I have the app working good with a static IP, but when I try to use DHCP with InetAdress.getForName("roborio-2657.local") I get an UnknownHostException. If any of you Android developers knows what the problem is please help.
I used the same code in a desktop Java app and it worked perfectly. The INTERNET permission is declared in my manifest. |
Re: RoboDS First Test
Also I'd like to include a moderate collection of widgets in the app, so if anyone wants widgets to match their teams you can send me some graphics or post them as attachements. The graphics should be PNGs with the following elements:
Joysticks: inner graphic, outer graphic, (optional) pressed inner graphic, (optional) pressed outer graphic. All graphics should be approximately square or circle shaped. Sliders: Same as joysticks, except these should NOT be square or circular. They should be longer than they are wide. Throttles: Same as sliders. Buttons: Pressed and depressed graphics. Graphics should not include text since text will be dynamically added when a button is created. Other: Give me a description of what you want. Displays: Not yet supported. |
Quote:
Edit: taking a second look at that article, it doesn't appear to talk about mdns. Android does not appear to have an mdns responder, so you probably won't be able to get dynamic ips working. |
It seems like NSD does support mDNS. See here: http://www.dodgycoder.net/2015/02/se...nsnsd.html?m=1
NSD is only available in API 16 and above, but there also seems to be a library called jmDNS that might work. |
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
Has anyone verified that the app works, if so please post what device you have verified.
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
Just a reminder, I don't know if any of you have artists on your team, but if you do I can put your custom artwork into RoboDS widgets. If you want me to integrate your art just post it here or email it to me.
|
Re: RoboDS First Test
I know that other teams are working on other DS projects, if anyone needs the protocol let me know.
|
Re: RoboDS First Test
Team 4301 has some beta test results:
Quote:
|
Re: RoboDS First Test
The app is only for Android, it is not expected to work on any apple devices. Thanks for the test results.
|
Re: RoboDS First Test
Did a few runs with the app, mainly to test different functions of our (yet to be completed, work in progress) testbed. Only tested in tank drive configuration with one cim per side of the robot, having some glitchy comms with the watchdog triggering and going ballistic making the robot spaz, but that is not the apps fault. This happens when the frc driver station is active while the robods app is also connected to the roborio.if at all possible, support for a Usb external joystick would be great, as I have a tablet with a USB port. Also, I would love to see a dedicated e-stop button or a function that disables the robot if the connection drops. Other than that, I think the app is great.
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
I'm graduating so after today I will no longer have access to a RoboRio, so I wont be able to test the app anymore. I'm gonna clean up my code a little and try to add some features, which will not be tested, then I'll put the code up on github if anyone wants to pick this project up. Sorry I was unable to finish it, and I'll keep trying to add features, but everything I do from here on out will be untested so if anyone wants to test or develop, I'll post a link to the github repo in a few days.
|
Re: RoboDS First Test
I installed the app on my Galaxy S4 running 5.1.1, and tried to control our robot, but I ran into a few problems.
Here is a list of the problems I could find, in rough order of severity:
I can upload some screenshots if you want. I hope this is helpful. |
Re: RoboDS First Test
Wow, that sounds pretty bad. I have already listed some of these bugs, like portrait mode not working and only one layout. But I haven't heard o fthe others yet. Some screenshots would be extremely helpful and you android device also. Sorry for the UI mistakes, I'm guessing you are using a phone, I only have s 7" tablet to test on.
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
4 Attachment(s)
Sorry if I sounded overly negative in my last response. I'm just trying to suggest ways to improve the app.
My phone is a Samsung Galaxy S4 running Android 5.1.1, the absolute latest version, so it definitely has every API you use. The editing bug occurs every time the app is cold started (ie. it has been deleted from the recent apps list), but not when the app is minimized/backgrounded and then opened again. When the app is minimized and then opened again, the joysticks start working as intended. I attached screenshots of some of the bugs:
If you release the code, I'll take a look and it and see if I can help with some of the bugs. |
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
The repo is here https://github.com/raystubbs/RobotDS, I've made some changes after my last test so the app may not work at all, please test the binary before playing with the code to make sure I didn't break anything . The binary is located here https://github.com/raystubbs/RobotDS...pp-release.apk.
|
Re: RoboDS First Test
Thanks!
|
Re: RoboDS First Test
I forked the project and starting working on fixing some of the bugs. The first major change was to create a .gitignore file and remove all the autogenerated code from the repository. I also upgraded all the plugins, tools and targetSdkVersion to the latest versions.
As far as the code itself, you made it sound like it was much more messy than it is. :) So far I have fixed:
*Are the joystick/axis indices are 0 or 1 based? Also, I should mention that the bug fixes have not been pushed to the repository yet, as I am still working on them. |
Re: RoboDS First Test
Quote:
I was planning on changing this, but don't want to mess with it since I can't test it and might just break everything. I know you have other things to work on, I just thought I should share my plan. |
Re: RoboDS First Test
1 Attachment(s)
I just pushed all the work I have done so far to the GitHub repo. Most of the changes have been internal, so the app doesn't have many new features yet.
The biggest visible change is that I removed the drawers for creating controls and replaced them with a floating action button menu. The two main reasons I did this is because I was having trouble getting the drawers to work with RelativeLayout and I wanted something that fit better with Android. I realize that it won't work when there are more types of controls, but I am working on an another design for when that happens. Here is a list of the bigger changes I made to the internals of the app:
I have not touched the communication code at all, but I will try to test it this week and fix any problems I come across. I attached the latest build of the app (not signed or anything), in case you want to test it. I tried to test the UI as much as I could, but I probably missed some bugs. From now on, I will try to make smaller commits and list my changes there, rather than on CD. |
Re: RoboDS First Test
Wow, you really know what you are doing, I have a lot to learn.
|
Re: RoboDS First Test
[quote=lopsided98;1486748]
[\QUOTE] I tested out the UI, it is much more attractive than that I originally had. But I don't see any options for adding multiple layout files. |
Re: RoboDS First Test
[quote=raystubbs;1486768]
Quote:
|
Re: RoboDS First Test
[quote=lopsided98;1486808]
Quote:
|
Re: RoboDS First Test
I tried to test the app today with our robot, and I was able to get control, but I ran into a problem. After somewhere between 5-10 seconds, the robot would disable and I would have to toggle the enable/disable button to get it to start again. Also, sometimes it seemed to emergency stop and the only way I could get control again was to restart the robot. Do you have any idea what could be going on here, because I don't have much experience with the protocol? I'll try to dig through the network code soon and see if I can figure out what's going on.
I also pushed an update with the ability to switch layouts and a packet capture from while I was testing. |
Re: RoboDS First Test
Quote:
I don't remember what the constant is called or its default value, and can't check right now because I'm typing this from an ancient, phone with a tiny keypad. Ijll look at the code when I get the chance and try to give a better reply. |
Re: RoboDS First Test
I looked at the code, the constant
private final int DISCONNECT_DELAY = 1000; //Two secondscontrols how long the connection can last without receiving a valid packet from the rio, if the rio waits longer than 1000 (1 second) then the manager disconnects. Though the comment in the above code says "Two seconds" the code was changes since then and I guess I neglected to change the comment. The other major untested change I made is in when the packets are sent. In the original system I made the DS send a packet every 20 ms regardless of whether it received a packet from the rio or not, in the current system the manager establishes connection with the rio, then it waits for the rio to receive a packet from the rio and responds with a packet of its own. This system could move the packets time-stamp outside of when the rio expects to receive a packet. I don't think this should happen, but it might. So I recommend changing the DISCONNECT_DELAY to about 3000 and testing it before messing with the comm code. |
Re: RoboDS First Test
Quote:
I took a look at your capture, communication seems to continue throughout the first 10 seconds, of course I could not look at every packet. The packets seem to be enabled throughout and there doesn't seem to be any estop. If you could capture while you connect to the robot up to when the app disconnects, and not restart the connection then I might be able to figure it out. |
Re: RoboDS First Test
I'm working on a Wireshark dissector for the protocol, so I'll see if I can find anything unusual, and I'll try to get better data next week when I can test the robot again.
|
Re: RoboDS First Test
Any update on this app?
|
Re: RoboDS First Test
Yes. I stopped developing it since I lost access to a Rio. Bot
lopsided98 has been developing and last I've heard the app should be working, but is yet untested. His repo is here https://github.com/RobotsByTheC/RoboDS. You can download the code and build it or you can ask him for an APK. Let me know how it works will you. |
Re: RoboDS First Test
Thanks.
|
Re: RoboDS First Test
I would be careful, though, as I can't guarantee that it won't cause unintended behavior. Now that school has started again, I should be able to test it fairly soon.
|
Re: RoboDS First Test
Sure. Thanks for opening this up for others and continuing to work on it. I've begun forking the code because I want to use static joystick configuration. Did you find anything via wireshark that might cause issues? Did the 3 second timeout prevent the disconnects you mentioned a while back?
|
Re: RoboDS First Test
Quote:
Also, what do you mean by static joystick configuration? |
Re: RoboDS First Test
By static joystick I mean doing away with the joystick editor and having axes and buttons hard coded.
Have you committed the theoretical robot control fix to your git? |
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
I tested the app last week, and sadly it still does not work. I am quite confused by what it is doing currently, as it appears to be crashing the communication software on the robot.
When I start sending packets to the robot, it never sends anything back. Afterward, when I try to drive the robot with the normal driver station, the robot does not respond until it is rebooted. As far as I can see, there is nothing wrong with the format of the packets being sent, but something is obviously wrong. I'll try to figure out more when I get time. |
Re: RoboDS First Test
How many connection packets do you send at the beginning? How long do you wait for a response? Also you can look for errors and restart the program by ssh-ing into the box and manually relaunching the binary.
The binary is probably in the default home directory, but otherwise it can be found in the program's build script on your workstation. |
Re: RoboDS First Test
Found a problem in PacketManager:
Code:
if (connected && !timeSent) {Here is my implementation: https://github.com/raystubbs/RioComA...omManager.java lines 171-197 |
Re: RoboDS First Test
Quote:
|
Re: RoboDS First Test
Oh OK.
|
Re: RoboDS First Test
Wow, I'm looking forward to this app being more complete; maybe if I convince a nearby team to let me mentor, I'll be able to get access to a bot and start testing this out. I'm a software engineer by trade, and I've been looking to get involved with something FIRST-related and 'Droid-y.
|
| All times are GMT -5. The time now is 16:24. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi