Go to Post The short answer is there is no shortcut. - JDNovak [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 01-20-2018, 04:07 PM
rustyraptor rustyraptor is offline
Registered User
FRC #5613
 
Join Date: Nov 2017
Location: United States
Posts: 8
rustyraptor is an unknown quantity at this point
2018 field for robotpy simulator

We're using robotpy this year. We are starting on developing a field for the simulator to test things out however it is taking us a lot of work to do so. Is there a field already out there that we can use? It would be cool if someone could develop a field editor for the robotpy simulator.
Reply With Quote
  #2   Spotlight this post!  
Unread 01-20-2018, 06:54 PM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #6367 (), FRC #7240 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,382
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: 2018 field for robotpy simulator

You can cheat by just creating an image file. That's what was done last year.

Edit: https://github.com/robotpy/pyfrc/blo...cli_sim.py#L16 is where last year's parameters are. If you make one, feel free to PR it, or send it to me and I'll add it so others can benefit.

Edit: Last year's field gif: https://github.com/robotpy/pyfrc/blo...2017-field.gif
__________________
Maintainer of RobotPy (Python for FRC) & WPILib Contributor
Creator of pyfrc (Robot Simulator + utilities for Python), pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript), and lots more...

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 : 01-20-2018 at 06:58 PM.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-24-2018, 06:07 PM
rustyraptor rustyraptor is offline
Registered User
FRC #5613
 
Join Date: Nov 2017
Location: United States
Posts: 8
rustyraptor is an unknown quantity at this point
Re: 2018 field for robotpy simulator

How do we load an image into the simulator? Is there documentation somewhere for the json file?
Reply With Quote
  #4   Spotlight this post!  
Unread 01-25-2018, 08:01 PM
rustyraptor rustyraptor is offline
Registered User
FRC #5613
 
Join Date: Nov 2017
Location: United States
Posts: 8
rustyraptor is an unknown quantity at this point
Re: 2018 field for robotpy simulator

Nevermind we found it by looking at the code.
Reply With Quote
  #5   Spotlight this post!  
Unread 01-26-2018, 11:30 PM
jlawhead jlawhead is offline
Registered User
FRC #7094
 
Join Date: Jan 2018
Location: Bay Saint Louis, MS
Posts: 2
jlawhead is an unknown quantity at this point
Re: 2018 field for robotpy simulator

I created a config file and some images for the simulator representing the 2018 Power Up field. One image has zone markings and the other is just the field drawing:

https://github.com/GeospatialPython/FRC/tree/master/sim
Reply With Quote
  #6   Spotlight this post!  
Unread 02-08-2018, 10:48 AM
celttechie celttechie is offline
Registered User
FRC #3160
 
Join Date: Jan 2017
Location: Grove, OK
Posts: 8
celttechie is an unknown quantity at this point
Re: 2018 field for robotpy simulator

That's great, thanks! I had created a field with just the points defined for the outside edges of the switch and platforms... Couldn't get the scale ends to show up on it, though.

If this is fairly accurate, I'll just work with the image.

For anyone that's interested, here's what I had for a full field:

{
"pyfrc": {

"robot": {
"w": 3,
"h": 2.33,
"starting_x": 5,
"starting_y": 52,
"starting_angle": -90
},

"field": {
"w": 27,
"h": 54,
"px_per_ft": 12,

"objects": [
{ "color": "grey",
"points": [ [7,12.5], [20,12.5], [20,17.1], [7,17.1] ] },

{ "color": "grey",
"points": [ [7, 36.9], [20, 36.9], [20, 41.5], [7, 41.5] ] },

{ "color": "blue",
"points": [ [8.1, 21.75], [18.9, 21.75], [18.8, 27], [8.1, 27] ] },

{ "color": "red",
"points": [ [8.1, 27], [18.9, 27], [18.9, 32.25], [8.1, 32.25] ] },

{ "color": "grey",
"points": [ [6, 25], [6, 25], [9, 29], [9, 29] ] },

{ "color": "grey",
"points": [ [18, 25], [18, 25], [21, 29], [21, 29] ] }
]
}
}
}
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 11:58 AM.

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


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