Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   RoboDS First Test (http://www.chiefdelphi.com/forums/showthread.php?t=136894)

Ben Wolsieffer 14-06-2015 21:40

Re: RoboDS First Test
 
[quote=raystubbs;1486768]
Quote:

Originally Posted by lopsided98 (Post 1486748)
  • Add support for saving multiple layout files and renaming layouts

[\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.

Sorry, I should have clarified that. I added support in the backend for multiple layouts, but there is no UI yet. I'm currently working on one right now.

raystubbs 15-06-2015 01:37

Re: RoboDS First Test
 
[quote=lopsided98;1486808]
Quote:

Originally Posted by raystubbs (Post 1486768)

Sorry, I should have clarified that. I added support in the backend for multiple layouts, but there is no UI yet. I'm currently working on one right now.

Oh, I see. Well thanks for what you're doing, the project would probably be dead by now if you hadn't started working on it.

Ben Wolsieffer 16-06-2015 22:16

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.

raystubbs 17-06-2015 01:34

Re: RoboDS First Test
 
Quote:

Originally Posted by lopsided98 (Post 1487056)
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.

I made some really big untested changes to the comm code before releasing it. I have an idea of what could be the problem, but since I can't test it I'd rather start off with making a smaller change: in the PacketManager class there is a constant that controls connection timeout delay, try giving it a higher value.

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.

raystubbs 17-06-2015 09:38

Re: RoboDS First Test
 
I looked at the code, the constant
private final int DISCONNECT_DELAY = 1000; //Two seconds
controls 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.

raystubbs 17-06-2015 19:54

Re: RoboDS First Test
 
Quote:

Originally Posted by raystubbs (Post 1487082)
I looked at the code, the constant
private final int DISCONNECT_DELAY = 1000; //Two seconds
controls 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.


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.

Ben Wolsieffer 18-06-2015 12:16

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.

Ryan Reliford 02-09-2015 02:06

Re: RoboDS First Test
 
Any update on this app?

raystubbs 02-09-2015 09:35

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.

Ryan Reliford 02-09-2015 12:25

Re: RoboDS First Test
 
Thanks.

Ben Wolsieffer 02-09-2015 14:02

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.

Ryan Reliford 02-09-2015 14:29

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?

Ben Wolsieffer 03-09-2015 09:30

Re: RoboDS First Test
 
Quote:

Originally Posted by Ryan Reliford (Post 1494985)
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?

If you forked my code, then most of the discussion in this thread is not that relevant, as I have rewritten a lot of the connection logic. Last time I tested the app, it connected correctly, but there were a couple of problems that prevented it from being able to control the robot. Those problems are theoretically fixed now.

Also, what do you mean by static joystick configuration?

Ryan Reliford 03-09-2015 21:43

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?

Ben Wolsieffer 03-09-2015 21:53

Re: RoboDS First Test
 
Quote:

Originally Posted by Ryan Reliford (Post 1495145)
Have you committed the theoretical robot control fix to your git?

The code on GitHub is completely up to date.


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