Go to Post Some things can only be revealed by time. - ChrisH [more]
Home
Go Back   Chief Delphi > Technical > Programming > Python
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-01-2016, 10:27
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 214
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Why does RobotPy take longer to deploy?

Hi,

I was curious why this year's version of RobotPy takes about a minute and a half longer to deploy to our robot? This is a relatively minor issue, but I liked when I could deploy code to the robot in about 10-15 seconds. I even deployed during a practice match once last year and I still had plenty of time to play.

The part that seems to take the longest is connecting to the Rio and finding out the versions. Is it because of the new mDNS stuff?

Again, this is a minor issue, but I was wondering what changed to make the deploy process longer?
Reply With Quote
  #2   Spotlight this post!  
Unread 18-01-2016, 12:07
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,032
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Why does RobotPy take longer to deploy?

If your computer cannot resolve the mDNS name correctly, then you would have similar issues in Java or C++, as they all use the same underlying mechanism to resolve the mDNS name.

A similar issue was reported at https://github.com/robotpy/pyfrc/issues/42, and that user was able to resolve their issue by reflashing the firmware on their OM5P-AN.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #3   Spotlight this post!  
Unread 18-01-2016, 12:22
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 542
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Why does RobotPy take longer to deploy?

A minute and a half? Thats just obnoxious... I had 30sec deploy times and I still didn't like it..

I followed this tutorial to flash the router. I also realized, after doing that, that theres a "download firmware" button on the program thats used to assign team numbers to routers. Can't speak for its efficiency since I haven't used it, though.

Before going down this route, though, answer this question- is you're code stalling right between "Robot code deploying" (or whatever) and "WPILib version on robot is 2016.0.0"? Or is there a consistent 5-10sec delay between EVERY step. (If the former, there might also be a long delay near the end, but I'm not sure what debug lines it is between). The former is the issue that was resolved with the reflashing of the router. The latter is probably an issue with the CPU on the programming laptop.
__________________
FRC Team 1684 - Head Programmer (2013-2016)
FRC Team 5460 - Programming Mentor (2015-2016)

FIRST in Michigan - Technical Crew (2015-continuing)

Last edited by Arhowk : 18-01-2016 at 12:26.
Reply With Quote
  #4   Spotlight this post!  
Unread 26-01-2016, 01:28
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,032
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Why does RobotPy take longer to deploy?

4480, were you able to resolve your issue?

I'm sitting down with a roborio and the router finally, and I'm having a similar issue. I did reflash the router, and I can confirm that it's definitely a DNS issue (at least, on my mac it is):

Examining the tcpdump output, it looks like this is happening:
  • t=0, query to multicast 5353
  • t=0.1 response from roborio on IPv6
  • t=0.2 cache flush AAAA from roborio?
  • OSX sends 6 ICMP6 neighbor solicitations trying to find IPv6 address of roborio, no responses
  • t=6 first ssh syn packet to roborio from computer (ipv4)

Here's the raw tcpdump output for those interested:

Code:
OSX Computer is 10.24.23.143
Router is 10.24.23.129
RoboRIO is 10.24.23.22

01:23:50.827794 IP 10.24.23.143.55752 > 10.24.23.129.53: 65077+ SOA? local. (23)
01:23:50.830292 IP 10.24.23.129.53 > 10.24.23.143.55752: 65077 Refused 0/0/0 (23)

01:23:50.945125 IP 10.24.23.143.5353 > 224.0.0.251.5353: 0 [2q] A (QU)? roborio-2423-frc.local. AAAA (QU)? roborio-2423-frc.local. (46)
01:23:50.945654 IP6 fe80::aebc:32ff:febf:435d.5353 > ff02::fb.5353: 0 [2q] A (QU)? roborio-2423-frc.local. AAAA (QU)? roborio-2423-frc.local. (46)
01:23:50.948130 IP 10.24.23.22.5353 > 224.0.0.251.5353: 0*- [0q] 2/0/0 (Cache flush) AAAA fe80::280:2fff:fe17:fa48, (Cache flush) A 10.24.23.22 (78)
01:23:51.120263 IP6 fe80::aebc:32ff:febf:435d > ff02::1:ff17:fa48: ICMP6, neighbor solicitation, who has fe80::280:2fff:fe17:fa48, length 32
01:23:52.121609 IP6 fe80::aebc:32ff:febf:435d > ff02::1:ff17:fa48: ICMP6, neighbor solicitation, who has fe80::280:2fff:fe17:fa48, length 32
01:23:53.122867 IP6 fe80::aebc:32ff:febf:435d > ff02::1:ff17:fa48: ICMP6, neighbor solicitation, who has fe80::280:2fff:fe17:fa48, length 32
01:23:55.124184 IP6 fe80::aebc:32ff:febf:435d > ff02::1:ff17:fa48: ICMP6, neighbor solicitation, who has fe80::280:2fff:fe17:fa48, length 32
01:23:56.125393 IP6 fe80::aebc:32ff:febf:435d > ff02::1:ff17:fa48: ICMP6, neighbor solicitation, who has fe80::280:2fff:fe17:fa48, length 32
01:23:57.146408 IP6 fe80::aebc:32ff:febf:435d > ff02::1:ff17:fa48: ICMP6, neighbor solicitation, who has fe80::280:2fff:fe17:fa48, length 32
01:23:58.158048 IP 10.24.23.143.52204 > 10.24.23.22.22: Flags [S], seq 608500754, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 2000205903 ecr 0,sackOK,eol], length 0
01:23:58.160321 IP 10.24.23.22.22 > 10.24.23.143.52204: Flags [S.], seq 2654078593, ack 608500755, win 29200, options [mss 1460,nop,nop,sackOK,nop,wscale 5], length 0
Interestingly enough, I found a workaround. If I connect to roborio-2423-frc.lan, that works almost instantly. Of course, it would only work when connected to the router, and I suspect the router will be configured differently at competition...
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff

Last edited by virtuald : 26-01-2016 at 01:54.
Reply With Quote
  #5   Spotlight this post!  
Unread 26-01-2016, 01:44
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,032
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Why does RobotPy take longer to deploy?

Oddly enough, I also noticed that there seem to be 2 DHCP pools on the router, and so the robot ends up with a different broadcast IP than what my computer gets, so I cannot receive netconsole output (at least, not on OSX).
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #6   Spotlight this post!  
Unread 26-01-2016, 10:49
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 214
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: Why does RobotPy take longer to deploy?

Quote:
Originally Posted by virtuald View Post
Oddly enough, I also noticed that there seem to be 2 DHCP pools on the router, and so the robot ends up with a different broadcast IP than what my computer gets, so I cannot receive netconsole output (at least, not on OSX).
So I just have to change it to .lan instead of .local and then connect via ethernet each time? Also, that would explain why I can't see any of my messages from the program you wanted me to run.

Even when trying to load the web interface it seems to take longer and sometimes fails to load.

Last edited by team-4480 : 26-01-2016 at 10:57.
Reply With Quote
  #7   Spotlight this post!  
Unread 26-01-2016, 10:58
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,032
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Why does RobotPy take longer to deploy?

Quote:
Originally Posted by team-4480 View Post
So I just have to change it to .lan instead of .local and then connect via ethernet each time?
No, this works via wireless too. When I said "connected" I didn't mean "physically connected".

Quote:
Also, that would explain why I can't see any of my messages from the program you wanted me to run.
There is an alternate way to see the Netconsole output: the driver station this year ships with a message console that should show the netconsole output. You can click the 'gear' icon, and then in the menu click "Console Viewer". I'm not quite sure why it works for the DS yet.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:38.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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